December 3, 2009 at 8:21 am
Ok, I'm trying to create a linked server connection going from a 2005 to a 2000 server. This is what I'm doing
exec sp_addlinkedserver 'svrname', 'SQL Server'
go
exec sp_addlinkedsrvlogin
@rmtsrvname = 'svrname'
,@useself = 'false'
,@locallogin = 'sql2005login'
,@rmtuser = 'sql2000login'
,@rmtpassword = 'pwd'
go
and here's what I'm getting
Msg 15466, Level 16, State 2, Procedure sp_addlinkedsrvlogin, Line 91
An error occurred during decryption.
Msg 15185, Level 16, State 1, Procedure sp_addlinkedsrvlogin, Line 98
There is no remote user 'sql2000login' mapped to local user 'sql2005login' from the remote server 'svrname'.
any ideas?
_____________________________________________________________________
- Nate
December 3, 2009 at 8:27 am
Do you have the SQL login -- 'sql2005login' at both the Instances?
Blog -- LearnSQLWithBru
Join on Facebook Page Facebook.comLearnSQLWithBru
Twitter -- BruMedishetty
December 3, 2009 at 8:41 am
It's actually a Windows account 'domain\sql2005login' but yes, it's on both instances.
_____________________________________________________________________
- Nate
December 7, 2009 at 8:32 am
ok, changed to
exec sp_addlinkedsrvlogin
@rmtsrvname = 'targetsrvname'
,@useself = 'true'
,@locallogin = NULL
,@rmtuser = 'sql2000login'
,@rmtpassword = 'pwd'
and here's what I'm getting
OLE DB provider "SQLNCLI" for linked server "targetsrvname" returned message "Communication link failure".
Msg 10054, Level 16, State 1, Line 0
TCP Provider: An existing connection was forcibly closed by the remote host.
Msg 18452, Level 14, State 1, Line 0
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
_____________________________________________________________________
- Nate
December 7, 2009 at 8:45 am
RP this is the syntax i've always used,a dn works without any problems for me:
here i'm connecting to a SQL instance named "DBSQL2K5", but for fun, I'm aliasing it as MyLinkedServer; they can both be the same name, of course.
--#################################################################################################
--Linked server Syntax for SQL Server With Alias
--#################################################################################################
EXEC master.dbo.sp_addlinkedserver @server = N'MyLinkedServer',@srvproduct = N'', @datasrc = N'DBSQL2K5', @provider = N'SQLOLEDB';
-- Add Default Login (if applicable)
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname = N'MyLinkedServer',
@useself = N'False',
@locallogin = NULL,
@rmtuser = N'sa',
@rmtpassword = 'NotARealPassword';
Lowell
December 7, 2009 at 9:03 am
Nope, same thing.
Msg 15466, Level 16, State 2, Procedure sp_addlinkedsrvlogin, Line 91
An error occurred during decryption.
Msg 15185, Level 16, State 1, Procedure sp_addlinkedsrvlogin, Line 98
There is no remote user 'sql2000login' mapped to local user '(null)' from the remote server 'targetsrvname'.
this server was recently upgraded (new server w/ fresh install) and then the master db was re-attached, could this have anything to do with it?
_____________________________________________________________________
- Nate
December 7, 2009 at 9:11 am
can you connect with SSMS to the server 'targetsvrname' as the user sql2000login?
if the server was rebuilt, the login sql2000login might not exist and need to be re-added.
Lowell
December 7, 2009 at 9:53 am
Yep, login works. it was the 2005 box (source) that was upgraded.
_____________________________________________________________________
- Nate
December 7, 2009 at 11:54 am
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname = N'targetsrvname',
@useself = N'False',
@locallogin = NULL,
@rmtuser = N'sql2000user',
@rmtpassword = 'pwd';
on execute generates
Msg 15466, Level 16, State 2, Procedure sp_addlinkedsrvlogin, Line 91
An error occurred during decryption.
Msg 15185, Level 16, State 1, Procedure sp_addlinkedsrvlogin, Line 98
There is no remote user 'sql2000user' mapped to local user '(null)' from the remote server 'targetsrvname'.
_____________________________________________________________________
- Nate
December 7, 2009 at 12:09 pm
I google the error and I found some links you may want to check:
http://www.eggheadcafe.com/software/aspnet/31120336/linked-server-error.aspx
http://social.msdn.microsoft.com/Forums/en/sqlsecurity/thread/b1b94766-daba-4679-9dd3-725f8fd35206
Please let me know if it helps.
December 7, 2009 at 12:17 pm
I found this link http://social.msdn.microsoft.com/Forums/en/sqlsecurity/thread/f4d292c0-72d5-4075-adf3-03427542567e where the ALTER SERVICE MASTER KEY FORCE REGENERATE its explained. I hope it helps.
December 9, 2009 at 6:42 am
ok,
use master
ALTER SERVICE MASTER KEY FORCE REGENERATE
worked. thanks all for your help!
_____________________________________________________________________
- Nate
Viewing 15 posts - 1 through 15 (of 15 total)
You must be logged in to reply to this topic. Login to reply