Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

SQL query required

Created: 04 Mar 2014 • Updated: 06 Mar 2014 | 4 comments
GTK's picture
This issue has been solved. See solution.

hi

 

this KB details how to find the index item count if the EV directory DB is on the same SQL server as EV Vault store

 

http://www.symantec.com/business/support/index?page=content&id=HOWTO59167

 

I need to know the Query if the vault stores are on different SQL servers/instances to that of the EV directory DB

 

can anyone help?

Operating Systems:

Comments 4 CommentsJump to latest comment

Rob.Wilcox's picture

Once you've setup a linked SQL server, you can do this sort of thing:

http://www.databasejournal.com/features/mssql/arti...

SOLUTION
GTK's picture

hi Rob

can i not just run a join query or something ?

Rob.Wilcox's picture

Yes, like it's described in the article.

After you've setup things up as a linked server.

GabeV's picture

Hello GTK,

Once you have added the SQL instance as a linked server (http://msdn.microsoft.com/en-us/library/ms190479.aspx), you can join the tables (or views) from that server using [Server\Instance].[Database] format. For instance:

SELECT local.name AS LocalLogins, linked.name AS LinkedLogins
FROM master.sys.server_principals AS local
LEFT JOIN [SRVR002\ACCTG].master.sys.server_principals AS linked
    ON local.name = linked.name ;
GO

http://msdn.microsoft.com/en-us/library/ff772782.aspx

In this query, SRV002\ACCTG is the linked server but you can use it in the JOIN section as usual.

I hope this helps.

“Success is not final, failure is not fatal: it is the courage to continue that counts.”–Winston Churchill