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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Linked SERVER Issue

Author  Topic 

aparna2007
Starting Member

1 Post

Posted - 2012-01-06 : 02:10:27
Hi All,

I am working on linked server name is "ADMIN-PC" and "APARNA-PC"

I have made Store Procedure for collecting data from Two SERVER,
In Store Procedure i am trying to pull all the DATA from the both server.In Store Procedure name of the databses is coming in Column and G/L account of all the database in row.
I am running the SP in "ADMIN-PC" and data is coming, Now same SP running in SQL using APARNA-PC server name in the ADMIN system its giving an error "Msg 208, Level 16, State 1, Line 1
Invalid object name 'APARNA_2050.dbo.Temp_ReportData'."

Aparna

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-01-06 : 06:19:57
Couple of things:

1. You should use the four-part naming convention when using linked servers. So it should be something like:APARNA_2050.TheDatabaseNameHere.dbo.Temp_ReportData. If APARNA_2050 is the database name, then this does not apply when running queries on APARNA.

2. Linking is not mutual. If you added APARNA-PC as a linked server on ADMIN-PC, you will be able to run queries on ADMIN-PC and refer to APARNA-PC. But, you won't be able to run queries on APARNA-PC and refer to ADMIN-PC. To be able to do that, you should link to ADMIN-PC on APARNA-PC.
Go to Top of Page
   

- Advertisement -