Sql Server Linked Server Examples:
Select AddLinked Server
SELECT * FROM MASTER.DBO.SYSSERVERS
Step1:
EXEC SP_ADDLINKEDSERVER
@SERVER='SERVER\SQL2005',
@SRVPRODUCT='',
@PROVIDER='SQLNCLI', Or (sqloledb)
@DATASRC='SERVER\SQL2005'
Step2:
SP_ADDLINKEDSRVLOGIN 'SERVER\SQL2005', 'FALSE', NULL, 'SA', '1234'
Setp3:
Select the addlinkServer Table.
SELECT * FROM [SERVER\SQL2005].SIVASSRETAIL.DBO.CITYMAS
Drop AddLink Server.
EXEC SP_DROPSERVER 'SERVER\SQL2005','DROPLOGINS'
0 Comments