Solved

How to change @@servername?

Posted on 1998-07-10
2
1,522 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

896 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now