SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Could not find server 'ADSI' in sys.servers
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

17 Posts

Posted - 05/31/2010 :  09:11:27  Show Profile  Reply with Quote
Hi all,
I have a problem with running SP which connect to the active directory.
I wrote:

ALTER PROCEDURE [...System_CreateActiveDirectoryUserTable] AS

IF NOT EXISTS (SELECT srv.name FROM sys.servers srv WHERE srv.server_id != 0 AND srv.name = N'ADSI')
EXEC master.dbo.sp_addlinkedserver
@server = N'ADSI'
,@srvproduct=N'Active Directory Service Interfaces'
EXEC master.dbo.sp_addlinkedsrvlogin

.. (some code)
And then I try to do F5 and I got this message:

Could not find server 'ADSI' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.

but when I running the Code I wrote to you Manualy and then the other code its work.
what could be the reason?
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000