Solved

Servername is Incorrect

Posted on 2006-06-20
5
774 Views
Last Modified: 2012-05-05
SQL2K

When I register a server [ISASRV1] through Enterprise Manager , I Can see correct servername is there.

But the result of
select srvid, srvname  from master.dbo.sysservers order by srvid
is
Srvid         srvname
0      ISASRV
1      HP_SPIN_LOC

The srvname ISASRV is incorrect. It should have been ISASRV1.

Q.1 How it happend.
Q2. How to fix.
0
Comment
Question by:Mateen
  • 2
  • 2
5 Comments
 
LVL 3

Expert Comment

by:chhapia_chintak
ID: 16941343
You can fix this by executing follwoing code.

exec sp_dropserver 'ISASRV', 'droplogins'
GO
exec sp_addserver 'ISASRV1','LOCAL'

then restart the server.

Then execute the same query
"select srvid, srvname  from master.dbo.sysservers order by srvid"

you will find ISASRV1 for svrid 0.
0
 
LVL 28

Assisted Solution

by:imran_fast
imran_fast earned 200 total points
ID: 16941654
Q.1 How it happend.
When you install your sql server on the machine the server name was ISASV and afterwards you rename the server name to be ISASV1


Q2. How to fix.

above mentioned post by chhapia_chintak
or
go to master.dbo.sysservers  table and rename isasrv to ISASRV1 by issuing an update statement.
0
 

Author Comment

by:Mateen
ID: 16948733
Hi Imran_fast
renaming the servername is easier. But when I rename it syas

[ Adhoc Update to System Catalogs are not enabled. The system Administrator must reconfigure Sql Server to allow this. ]
0
 
LVL 3

Accepted Solution

by:
chhapia_chintak earned 300 total points
ID: 16948866
Run below code then you can update the servername

EXEC sp_configure 'allow updates', 1
RECONFIGURE WITH OVERRIDE
GO
0
 
LVL 28

Expert Comment

by:imran_fast
ID: 16948889
Hi Mateen,
By default update to any system table like (sysobjects, syscolumns) is not allowed.
to allow updates on such system tables you have to configure your server to allow updates as chhapia_chintak suggested.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

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.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
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.

805 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