question

SQLLover21-0870 avatar image
0 Votes"
SQLLover21-0870 asked Yufeishao-0810 answered

Invalid Urn filter on server level SQL Server error

I am trying to alter permissions to some of my users using GUI. When I press Script Out or OK, I am receiving this error attached. Has anyone experienced this error and what did you to resolve this issue?

119899-error1.png


sql-server-generalsql-server-transact-sql
error1.png (42.2 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Yufeishao-0810 avatar image
0 Votes"
Yufeishao-0810 answered

Hi @SQLLover21-0870,

According to my test, this error occurs when the computer name is inconsistent with the server name stored in the SQL server instance.

SQL Server Setup sets the server name to the computer name during the installation, it seems the Hostname of the computer has been changed in your environment.

To check this, you can use the following script:

 select host_name()
 select @@servername

If the result is different, you can use the following script to change it:

 EXEC sp_dropserver '<old_name>';  
 GO  
 EXEC sp_addserver '<new_name>', local;  
 GO

After executing the above command, please restart the instance of SQL Server.

See below for more information:
https://docs.microsoft.com/en-us/sql/database-engine/install-windows/rename-a-computer-that-hosts-a-stand-alone-instance-of-sql-server?view=sql-server-ver15


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.