Friday, May 26, 2023

.::: Change Server Name in Microsoft SQL Server MSSQL :::.

1. Check before
select @@servername as ServerName, @@version as VersionSQL;
exec sp_helpserver;
 
 

2. change hostname sql

EXEC sp_dropserver 'mssql';
GO
EXEC sp_addserver 'newmssql', local;
GO


3. restart sql

4. Check after

select @@servername as ServerName, @@version as VersionSQL;
exec sp_helpserver;
 


https://learn.microsoft.com/en-us/sql/database-engine/install-windows/rename-a-computer-that-hosts-a-stand-alone-instance-of-sql-server?view=sql-server-ver16


EXEC sp_dropserver 'newmssql';
GO
EXEC sp_addserver 'mssql', local;
GO

No comments:

Post a Comment

Popular Posts