After applying CU8 for SQL 2012 SP2 @@Servername was null
Somehow ended up in condition of no entry in sys.servers for server_id 0
select * from sys.servers where server_id=0
This returned 0 rows. Can add the local server with:
sp_addserver '<servername>', local
Then had to restart the server for it to take effect
If it will be a while before can reboot, then suggest using
serverproperty('ServerName')
No comments:
Post a Comment