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 2005 Forums
 SQL Server Administration (2005)
 Linked server prerequisite

Author  Topic 

gangadhara.ms
Aged Yak Warrior

549 Posts

Posted - 2011-08-12 : 02:30:23
Hi All,

I want to create a Linked server on my local machine to test server database.

When i tried to create the linked server i am getting the below error.

Msg 15007, Level 16, State 1, Procedure sp_addlinkedsrvlogin, Line 76
'joggs' is not a valid login or you do not have permission.
Msg 15007, Level 16, State 1, Procedure sp_addlinkedsrvlogin, Line 76
'webuser' is not a valid login or you do not have permission.


What are the prerequisites to get create this.

I am using the below query to create linked server

EXEC master.dbo.sp_addlinkedserver @server = N'MSG', @srvproduct=N'Active Directory Services 2.5', @provider=N'ADsDSOObject', @datasrc=N'adsdatasource'
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'MSG',@useself=N'False',@locallogin=NULL,@rmtuser=NULL,@rmtpassword=NULL
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'MSG',@useself=N'False',@locallogin=N'joggs',@rmtuser=N'sys_my',@rmtpassword='***************'
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'MSG',@useself=N'True',@locallogin=N'webuser',@rmtuser=NULL,@rmtpassword=NULL

GO
EXEC master.dbo.sp_serveroption @server=N'MSG', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'MSG', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'MSG', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'MSG', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'MSG', @optname=N'rpc', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'MSG', @optname=N'rpc out', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'MSG', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'MSG', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'MSG', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'MSG', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'MSG', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'MSG', @optname=N'use remote collation', @optvalue=N'true'


Thanks,
Gangadhara MS
SQL Developer and DBA

manju3606
Yak Posting Veteran

78 Posts

Posted - 2011-08-12 : 05:56:24
check your login permission

Manju
Go to Top of Page

jagdonru
Starting Member

3 Posts

Posted - 2011-08-17 : 09:38:17
Test log in permissions in the target server and use GUI. Its easier :)
Go to Top of Page
   

- Advertisement -