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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Linking tables across servers

Author  Topic 

marcuscoker
Starting Member

13 Posts

Posted - 2007-02-23 : 08:23:49
Hi I was wondering if anybody can help me with this.

I have two database servers and would to link a table from a database on one of the servers to a database on the other server.

At the moment i am able to call a table from another database on the same server by

DatabaseName.dbo.TableName
How would i do this when the database i am linking to is on another server?

Thanks

Marcus

Andraax
Aged Yak Warrior

790 Posts

Posted - 2007-02-23 : 08:39:39
Hey!

You first have to define a linked server using enterprise manager or the sp_addlinkedserver system procedure.

After that is done, you refer to the table by ServerName.DatabaseName.dbo.TableName.

Go to Top of Page

marcuscoker
Starting Member

13 Posts

Posted - 2007-02-23 : 09:06:58
hi thanks

Have done that and all seems to work fine, and i am able to return data, however when it comes to the moment to save the view and when i save the view i get the folloing error message


ODBC error [Microsoft][ODBC SQL Driver][SQL Server]The operation could not be performed because the OLE DB Provider 'SQLOLEDB' was unable to begin a distributed transaction.

Any ideas what could be going wrong

Thanks

Marcus
Go to Top of Page

Andraax
Aged Yak Warrior

790 Posts

Posted - 2007-02-23 : 10:11:40
Hey again.

Do you have the "Microsoft Distributed Transaction Coordinator" service started on the servers? I think that is needed to be on.
Go to Top of Page

marcuscoker
Starting Member

13 Posts

Posted - 2007-02-23 : 10:52:51
hi i have made sure that was running, i found that i managed to get it to work when i ran through query analyser

thanks

marcus
Go to Top of Page
   

- Advertisement -