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
 SQL Server 2012 Forums
 Other SQL Server 2012 Topics
 How to create a SQL Server link server

Author  Topic 

jaide smith
Starting Member

1 Post

Posted - 2013-01-19 : 07:36:01
If select SQL linked server in the GUI you can't specify a different name for the SQL Server. You can only use the SQL host name as the Link Server name.

Here is an example of creating a Linked Server via script to specify link server name myGX620 for the SQL Server host name GX620.



/****** Object: LinkedServer [myGX620] Script Date: 04/07/2009 22:49:10 ******/

EXEC master.dbo.sp_addlinkedserver

@server = N'myGX620',

@srvproduct=N'MSSQL',

@provider=N'SQLNCLI',

@provstr=N'PROVIDER=SQLOLEDB;SERVER=GX620'



EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'myGX620',

@useself=N'False',@locallogin=NULL,@rmtuser=N'sa',@rmtpassword='P@ssword!'

Internet Marketing Auckland | Web Design Auckland

srimami
Posting Yak Master

160 Posts

Posted - 2013-02-06 : 00:12:56
Hi Smith,

What is expected from users related to link server? You have provided solution related to link server.

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-02-06 : 01:42:40
see the steps involved

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=164892

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -