How to create a SQL View if the database table is located on another SQL server?
Example :
I am currently working at SQL Server "S01", but need to create a sql view to table customer on "Marketing" database located on SQL Server "S02"
if the table is reside on the same machine then it's simple for me, but this customer table is not located on "S01" but located on different machine "S02"
how to do this? any tutorial?
thanks a lot
YonscunThe way to make that easy is to right click at the top of Enterprise Manager and register the other server so it becomes local to you. So you just choose the server in the drop down list in Query Analyzer. Hope this helps.|||First make a linked server to S02 from S01 (make sure username and password is correct)
then right click in view, choose new view.
put this code :
select *
from S02.Marketing.dbo.Customer
done!
No comments:
Post a Comment