Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Servername is Incorrect

Posted on 2006-06-20
5
Medium Priority
?
798 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 800 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 1200 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

722 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