Linked Server


exec sp_dropserver @server = ‘WMSREPLICADB’ ,@droplogins = ‘droplogins’

go

 

EXEC sp_addlinkedserver

@server = ‘WMSREPLICADB’ ,

@srvproduct = ”,

@provider= ‘SQLOLEDB’,

@datasrc=  ‘100.64.0.152’  

GO

 

sp_addlinkedsrvlogin

@rmtsrvname = ‘WMSREPLICADB’  

 ,@useself = ‘FALSE’    

 ,@locallogin = ‘SQLDBA’     

,@rmtuser  = ‘portaluser’     

,@rmtpassword =  ‘portaluser’

GO

 

select top 1 * from [WMSREPLICADB].[geo].[geo1].[sku]

GO

 

EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname = N’WMSREPLICADB’, @locallogin = NULL , @useself = N’False’, @rmtuser = N’portaluser’, @rmtpassword = N’portaluser’

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: