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
 Transact-SQL (2000)
 Distributed Query without a Linked Server

Author  Topic 

mdelgado
Posting Yak Master

141 Posts

Posted - 2002-10-29 : 12:43:53
Can anyone tell me if I can query another SQL server without having to run "EXEC sp_addlinkedserver"?

In other words, can I use a 4 part name to qualify a server?
i.e. Select * from server2.Dbase1.dbo.tbl1

thanks...

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-10-29 : 12:46:15
quote:
In other words, can I use a 4 part name to qualify a server?
i.e. Select * from server2.Dbase1.dbo.tbl1
Yes, but you need to add and configure the linked server first, which means you need to run sp_addlinkedserver.

Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2002-10-29 : 13:02:53
You can do an openrowset which includes all the info for the connection and so doesn't need anything set up.

Look it up in bol.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

royv
Constraint Violating Yak Guru

455 Posts

Posted - 2002-10-29 : 14:06:34
Why can't you run sp_addlinkedserver?

***************************************
Death must absolutely come to enemies of the code!
Go to Top of Page
   

- Advertisement -