sysinfo i/o

All Your Base Are Belong To Us

  • /
  • WINTEL
    • ACTIVE DIRECTORY
    • CITRIX
    • COMMANDS
    • EXCHANGE
    • IIS
    • POWERSHELL
    • MSSQL SERVER
  • LINUX
    • APACHE
    • BASH
    • NGINX
    • MONITORING
    • UTILITIES
  • SCRIPTS
    • SHELL
    • BATCH
    • POWERSHELL
  • DOWNLOADS
  • TIPS
  • NETWORKING
    • SSL
    • DNS
    • VPN
  • LINKS
    • COUCH POTATO
    • GITHUB
    • IPCONFIG.IO
    • PRIVATEBIN
    • UNIFI CLOUD
    • UPTIME ROBOT
    • TRAVISFLIX
    • VSCODE
  • ABOUT
    • CONTACT
Home / Operating Systems / Windows / SQL Server / Change SQL Server Name

November 8, 2012 9:08 am By Travis Leave a Comment

Change SQL Server Name

If you’ve changed your Operating System hostname, you should reflect that change in SQL Server by updating the name in the Master database. SQL Server doesn’t support updating the name when involved in database mirroring, replication, or clustered environments. You’ll have to remove the feature, update the name, then re-add the feature.

 

SELECT * FROM [master].[sys].[servers]
 --Look for server_id=0 name is pointing to Server A
 --Server_id=0 is local server
 SELECT @@SERVERNAME --Returns(Server A)
 EXEC sp_dropserver 'ServerA'
 EXEC sp_addserver 'ServerB',local
 --Important step
 --Restart the local sql server service and the sql server agent service
 SELECT @@SERVERNAME --Returns(Server B)
 SELECT * FROM [master].[sys].[servers]
 --Look for server_id=0 name is pointing to Server B
 --Server_id=0 is local server

Read more about updating the name by Jugal Shah.

Filed Under: SQL Server, Windows Tagged With: SQL

My Tweets

POPULAR DOWNLOADS

  • KMS Pico Activator (1102 downloads)
  • VERIZON S7 SM-G930V (886 downloads)
  • AT&T S7 G930AATT1APB5 (882 downloads)
  • AT&T S7 Edge SM-G935A (689 downloads)
  • VERIZON S7 EDGE SM-G935V (530 downloads)
  • Odin_v3.12.3.zip (483 downloads)
  • T-MOBILE S7 EDGE SM-G935T (458 downloads)
  • Lucky Patcher v6.3.9 (435 downloads)
  • Lucky Patcher v6.4.2 (432 downloads)
  • Lucky Patcher v6.3.7 (416 downloads)

POPULAR POSTS

  • Samsung Galaxy S9 G960/G965 Stock ROM Firmware Download
    Samsung Galaxy S9 G960/G965 Stock ROM Firmware Download
  • Force Delete Windows Server DHCP Failover Relationship
    Force Delete Windows Server DHCP Failover Relationship
  • Android Connect to Microsoft SSTP VPN Free
    Android Connect to Microsoft SSTP VPN Free
  • How to Remove OneDrive from Quick Access
    How to Remove OneDrive from Quick Access
  • Official Samsung Galaxy S7 USA Stock ROM Firmware Download
    Official Samsung Galaxy S7 USA Stock ROM Firmware Download
  • Activate Windows and Office with KMSpico
    Activate Windows and Office with KMSpico
  • Nginx no "ssl_certificate" is defined in server listening on SSL port while SSL handshaking
    Nginx no "ssl_certificate" is defined in server listening on SSL port while SSL handshaking
  • PowerShell Scripts
    PowerShell Scripts
  • Bittorrent IP Blocklists
    Bittorrent IP Blocklists

Made with