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.
| Author |
Topic |
|
petek
Posting Yak Master
192 Posts |
Posted - 2008-11-18 : 09:16:18
|
| Hi all,Does anybody know how query a remote server....I haev two linked servers i need to know how to query the machines at each end.Kind RegardsPete. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-18 : 09:17:55
|
| use OPENQUERY or just use four part names as server.db.schema.object |
 |
|
|
petek
Posting Yak Master
192 Posts |
Posted - 2008-11-18 : 09:18:31
|
| do you have an example please...Kind RegardsPete. |
 |
|
|
petek
Posting Yak Master
192 Posts |
Posted - 2008-11-18 : 09:20:13
|
| I got it i thinkSelect * from SQL.Test.dbo.table_1Kind RegardsPete. |
 |
|
|
petek
Posting Yak Master
192 Posts |
Posted - 2008-11-18 : 09:20:37
|
| is it possibleit use this to exec a stored procedure??Kind RegardsPete. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-18 : 09:21:22
|
| http://doc.ddart.net/mssql/sql70/sp_adda_17.htm |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-18 : 09:22:06
|
quote: Originally posted by petek is it possibleit use this to exec a stored procedure??Kind RegardsPete.
yup. its possible. just use server.db.schema.procedurename |
 |
|
|
ayamas
Aged Yak Warrior
552 Posts |
Posted - 2008-11-18 : 09:22:07
|
| I think Exec SQL.Test.dbo.YourStoredProc |
 |
|
|
petek
Posting Yak Master
192 Posts |
Posted - 2008-11-18 : 09:24:37
|
| you guys are the best, thanks again....Kind RegardsPete. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-18 : 09:25:55
|
Cheers |
 |
|
|
|
|
|