July 16, 2012 at 5:08 pm
Hi Im trying to create a linked server which is throwing the below error:
"Linked server has been updated but failed to connection test. Do you want to edit the linked server properties?
An exception occurred while executing the Transact sql Statement or Batch.
Login failed for the user xxxxxxxxxxxx"
Linked server properties:
/****** Object: LinkedServer [SQL Instance Name] Script Date: 07/16/2012 15:51:12 ******/
EXEC master.dbo.sp_addlinkedserver @server = N'SQL Instance Name', @srvproduct=N'SQL Server'
/* For security reasons the linked server remote logins password is changed with ######## */
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N' My SQL Instance Name',@useself=N'False',@locallogin=NULL,@rmtuser=N'DBGrowthMSDBAccess',@rmtpassword='########'
GO
EXEC master.dbo.sp_serveroption @server=N'My SQL Instance Name', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'My SQL Instance Name', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'My SQL Instance Name', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'My SQL Instance Name', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'My SQL Instance Name', @optname=N'rpc', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'My SQL Instance Name', @optname=N'rpc out', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'My SQL Instance Name', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'My SQL Instance Name', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'My SQL Instance Name', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'My SQL Instance Name', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'My SQL Instance Name', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'My SQL Instance Name', @optname=N'use remote collation', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'My SQL Instance Name', @optname=N'remote proc transaction promotion', @optvalue=N'true'
GO
July 17, 2012 at 12:37 am
I think you are trying to create it from a Different server. Please create the Linked server where you want to connect to the other server. And also make sure you the permissions to create Linked Servers.
Thanks
S.R.Kundur
July 17, 2012 at 7:41 am
Duplicate post. Please direct all replies here. http://www.sqlservercentral.com/Forums/Topic1330452-1550-1.aspx
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply