Solved

How to change @@servername?

Posted on 1998-07-10
2
1,526 Views
Last Modified: 2008-03-03
Hello,
Something must be done by me so that there are
two entries in master.dbo.sysservers, they are :
srvid=0, srvname = nt1 ......
srvid=1, srvname = mynt ......

Also, i found host_name() = mynt but @@servername = nt1.
Now, i want to do replication.  While creating 'distribution' database, it comlain , nt1 cannot be found.

Should i just modify master.dbo.sysservers directly?
Does srvid = 0  mean it is @@servername?

Many thanks.
rgds.
alan
alanpong@hkstar.com
0
Comment
Question by:alanpong
2 Comments
 
LVL 1

Author Comment

by:alanpong
ID: 1091724
the server is mssql 6.5.
0
 
LVL 2

Accepted Solution

by:
odessa earned 50 total points
ID: 1091725
Easy and simple if you want to change the name of your SQL server
execute system SP sp_addserver server_name [, LOCAL]
where server_name is the name you want to be and LOCAL stands for that to change your local server name. you must restart server for changing
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question