TSQL question involving linked servers...

NuclearNed

Raconteur
May 18, 2001
7,850
341
126
I really don't know much about linked servers, so I'm not sure this is even possible...

I have a linked server named "SITE_SERVER", which has a catalog named "HRMS_SITE" which corresponds to a database named "HRMS_SITE". The HRMS_SITE catalog has several tables listed under it, all of which correspond to tables in the HRMS_SITE database. I need to add a table to the HRMS_SITE catalog so that I can reference it via the linked server.

Can anyone show me a script that will add a table to this catalog? (or tell me that I don't know what I'm talking about)
 

KLin

Lifer
Feb 29, 2000
29,731
267
126
Does the table exist in the database? IF so, you should be able to query it via a linked server. Open up query analyzer and try this


SELECT * from openquery(SITE_SERVER, 'SELECT * from TableNameInQuestion')
 

NuclearNed

Raconteur
May 18, 2001
7,850
341
126
Originally posted by: KLin
Does the table exist in the database? IF so, you should be able to query it via a linked server. Open up query analyzer and try this


SELECT * from openquery(SITE_SERVER, 'SELECT * from TableNameInQuestion')

Thanks for the response.

I just found the answer to my problem. It turned out to be a security/permissions issue.