SQL SERVER – FIX: Msg 15190 – There are still remote logins or linked logins for the server

SQL
1 Comment

One of the most successful offerings from me has been Comprehensive Database Performance Health Check. Sometimes during my assistance, some random issues appear which I try to solve as well. In a recent engagement, one of their developers asked a question about an error which he was receiving while running sp_dropserver. In this blog, we would see how to fix error 15190 – There are still remote logins or linked logins for the server.

Here is the query which we were using to drop the linked server.

EXEC sp_dropserver 'SQLAUTHORITY'

And here is the output

Msg 15190, Level 16, State 1, Procedure sp_dropserver, Line 56 [Batch Start Line 11] There are still remote logins or linked logins for the server ‘SQLAUTHORITY’.

In SSMS, we could see below.

SQL SERVER - FIX: Msg 15190 - There are still remote logins or linked logins for the server sp_drop-err-01

SOLUTION/WORKAROUND

As the message says, there are logins associated with the linked server. So, if you want to know what they are, you can use

EXEC sp_helplinkedsrvlogin

to find them and drop them one by one using below system stored procedure.

EXEC sp_droplinkedsrvlogin

In my case, I was not worried about them and I used below.

EXEC master.dbo.sp_dropserver @server=N'SQLAUTHORITY', @droplogins='droplogins'

After adding the additional parameter, I was able to drop linked server. Well, sometimes there are simple solutions to complex problems. Let me know if you have ever faced such error with your production environment.

Reference: Pinal Dave (https://blog.sqlauthority.com)

, , , ,
Previous Post
SQL SERVER – Fix : Error Msg 1813, Level 16, State 2, Line 1 Could not open new database databasename. CREATE DATABASE is aborted
Next Post
SQL SERVER – Error 21028 : Replication Components are not Installed on This Server

Related Posts

1 Comment. Leave new

Leave a Reply

Menu