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.
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.
- 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?
Latest posts by Manvendra Deo Singh (see all)
- Understanding Hybrid Buffer Pool in SQL Server - December 30, 2018
- Fix:VIEW SERVER STATE permission was denied on object ‘server’, database ‘master’ - August 30, 2018
- SQL Server Error 5184: Cannot use file ‘I:\Path\Techyaz.mdf’ for clustered server - August 29, 2018