Renaming an MSSQL instance (Invalid Urn filter on server level)

If you rename a host on which MSSQL is running, the MSSQL server will not be renamed internally, causing the error message “Invalid Urn filter on server level” to pop up. What this means, in this case, is that the connected SQL server doesn’t match the name the client has for it.

You can check this by running the following query:

SELECT @@SERVERNAME AS 'Server Name';

To correct the server name, from (for the sake of example) “foo” to “bar”, run this query:

sp_dropserver 'foo';
GO
sp_addserver 'bar', local;
GO

Restart the server and run the SELECT query again to verify the change.

More information available here, archived here.

20 Comments

1 Trackback

Leave a Reply

Your email address will not be published. Required fields are marked *