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
 Acces Data of a Linked Server

Author  Topic 

cidmi.dovic
Yak Posting Veteran

53 Posts

Posted - 2007-04-30 : 09:58:08
Hi, I'm using Sql 2000 and I have a linked server called SRV\SRV.
The link works because I can list all tables.

How can I access the data i'm trying:


SELECT * FROM [SRV\SRV].Database.Table

And it don't works.
What am i doing bad?
Thanks.

sshelper
Posting Yak Master

216 Posts

Posted - 2007-04-30 : 10:03:00
You are missing the dbo part in your query:

SELECT * FROM [SRV\SRV].Database.[dbo].Table

SQL Server Helper
http://www.sql-server-helper.com
Go to Top of Page

cidmi.dovic
Yak Posting Veteran

53 Posts

Posted - 2007-04-30 : 10:09:40
Thank, it works!
Go to Top of Page

cidmi.dovic
Yak Posting Veteran

53 Posts

Posted - 2007-04-30 : 10:18:00
Now another problem.

I'm trying to make a SQL query into a stored procedure. This is the response:

The operation could not be performed because the OLE DB provider 'SQLOLEDB' was unable to begin a distributed transaction

I've tried :

BEGIN DISTRIBUTED TRAN
-- Comprueba si el día actual es un día laborable
SET @Tipo = (SELECT *
FROM [SRV\SRV].Database.dbo.Table)
COMMIT TRAN

But it does'nt works.
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2007-04-30 : 10:23:20
google first, then ask..


http://support.microsoft.com/kb/329332



-ec
Go to Top of Page
   

- Advertisement -