I have a server named say 'SRVMAIN'. Using Enterprise Manager I added a linked server 'LNKDSRVR1' (existing server).
I m able to access any database in 'LNKDSRVR1' by writing a query in query analyzer of 'SRVMAIN' as
SELECT * FROM LNKDSRVR1.TESTDB.DBO.TESTTABLE
Now if I have server as 'linkedserver'. Again I added a linked server in 'SRVMAIN' as 'linkedserver'.
When I write a query as
SELECT * FROM linkedserver.TESTDB_new.DBO.TESTTABLE_new
I get an error message:
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near ''.
As linkedserver is an existing database, I cannot drop and rename it. It has huge amount of real data.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!