Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
istock1
Starting Member
4 Posts |
Posted - 2008-01-14 : 14:01:15
|
All,I am attempting to write a stored procedure that compares tables on the local server and a linked server. Before comparing these tables (sysindexes), I would like to run DBCCUpdateUsage on both servers. The local instance runs fine:DBCCUpdateUsage(test1)But when I try to point it to the linked server:DBCCUpdateUsage(lnksrv.test1)I get an "Incorrect syntax near '.'" error message. Is there a way around this?Thanks! |
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2008-01-16 : 05:48:47
|
I do not think you can run DBCC statements across servers.the only way around it that I can think of is to create a job on the Linked Server with the DBCC statement in it and run the job. |
 |
|
|
|
|