Reply to Re: SQL Query question

Your name:

Reply:


Posted by Erland Sommarskog on 01/02/06 10:16

Sandy (a@a.com) writes:
> I want to write a query which reads data from a DataBase D1.table1 which
> is on some other machine and put it in DataBase D2.table2 The problem is
> 'How do i specify the IPAddress and the login information in a update
> Query'
> Can it be done using stored procedures..

You need to set up a linked server. To do this you use the system procedure
sp_addlinkedserver. To specify login information, you need to use
sp_addlinkedsrvlogin.

Once you have this working, you can refer to the remote table with four-
part notation, for instance SELECT ... FROM server.database.dbo.tbl


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация