Fix Error 15190: There are still remote logins for the server ‘DBSERVER’.

I got this error 15190 while renaming SQL Server Instance name. I was not able to drop the existing SQL Server instance name using sp_dropserver stored procedure and was getting error 15190. Full description of this error is given below.

Server: Msg 15190, Level 16, State 1, Procedure sp_dropserver
There are still remote logins for the server ‘DBSERVER’.

Error 15190 – Root Cause

As we know we need to first drop the existing details of SQL Server instance name from metadata system table sys.servers and then add new instance name in order to change the instance name. I was doing the same and running below command to drop the old instance name.

sp_dropserver <old_Name>; 
GO

I had received this error 15190 while executing above command and that is because of some remote logins present of the SQL Server instance.

If your database server has any remote login that you use for linked servers or some other purposes then you will get such issues. We need to drop all the remote logins to fix this issue and execute above command successfully.

Solution

To fix this issue we need to identify remote logins and drop them before changing the SQL Server instance name. We will be using a system stored procedure sp_dropremotelogin to drop all remote logins from our SQL Server instance. Run below command to drop all remote logins from a default instance of SQL Server.

sp_dropremotelogin old_name; 
GO

If you have named instance running on your database server then you can run below command. Make sure to change the name of server in place of Old_DBSERVER\Instancename.

sp_dropremotelogin Old_DBSERVER\Instancename; 
GO

Once all remote logins have been dropped you can go ahead and perform your SQL Server Instance name change operation. Make sure to create remote logins for your linked servers or alias post changing the instance name.

I hope you like this article. Please follow our Facebook page and Twitter handle to get latest updates.

Read More:

Manvendra Deo Singh: I am working as a Technical Architect in one of the top IT consulting firm. I have expertise on all versions of SQL Server since SQL Server 2000. I have lead multiple SQL Server projects like consolidation, upgrades, migrations, HA & DR. I love to share my knowledge. You can contact me on my social accounts for any consulting work.
Related Post
Leave a Comment