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:
- How to Change SQL Server Instance Name?
- How to Rename SQL Server Instance that is running with SQL Server Reporting Services?
- Fix Error 15434: Could not drop login “domain\loginname” as the user is currently logged in
- Fix Error 15174: Login owns one or more databases. Change the owner of database before dropping the login.
- How to Change Hostname of RHEL system?
- Fix SQL Error 18456: failed to open the explicitly specified database - September 18, 2021
- Fix Always ON Connection Timeout Error 35206 in SQL Server - July 23, 2021
- How to Enable Preview Features in Azure Data Studio - July 15, 2021