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
 View data from 2 servers

Author  Topic 

staticbob
Yak Posting Veteran

99 Posts

Posted - 2006-04-06 : 07:31:49
Guys,

How do I create a view that will pull data from dbases on 2 different servers ?

I have 2 server names....

svr10mbr01
svr11mbr02

2 Databases...

PWBstaff on svr10mbr01
PWBdata on svr10mbr02

I need to create a view in PWBdata that will do something like....

Select * from PWBstaff.dbo.staff

Is this possible, if so what is the syntax.

Ta
Bob

"I dislilke 7am. If &am were a person, I would kick 7am in the biscuits." - Paul Ryan, dailyramblings.com

shallu1_gupta
Constraint Violating Yak Guru

394 Posts

Posted - 2006-04-06 : 07:38:03
Specify Server name preceeding DBName
Select * from svr10mbr01.PWBstaff.dbo.staff
Go to Top of Page

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-04-06 : 07:51:28
first you need to register the servers..

lookout for sp_addlinkedserver on Book online

If Debugging is the process of removing Bugs then i Guess programming should be process of Adding them.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-04-06 : 08:43:28
Also look for OpenDatasource

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -