473,387 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Instance name vs servername

Someone renamed a server from 2A to A.
When I do @@servername I get 2A.
The server/machine name is 2.

Should my triggers say 2A or 2? Does it matter?

Thanks
Dec 29 '07 #1
3 2154
(ja*******@gmail.com) writes:
Someone renamed a server from 2A to A.
When I do @@servername I get 2A.
The server/machine name is 2.

Should my triggers say 2A or 2? Does it matter?
EXEC sp_dropserver '2A'
EXEC sp_addserver 'A', 'local'

Restart SQL Server. After this, @@servername should return the correct
value.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Dec 29 '07 #2
On Dec 29, 12:55*pm, Erland Sommarskog <esq...@sommarskog.sewrote:
*(jantan...@gmail.com) writes:
Someone renamed a server from 2A to A.
When I do @@servername I get 2A.
The server/machine name is 2.
Should my triggers say 2A or 2? *Does it matter?

EXEC sp_dropserver '2A'
EXEC sp_addserver 'A', 'local'

Restart SQL Server. After this, @@servername should return the correct
value.

--
Erland Sommarskog, SQL Server MVP, esq...@sommarskog.se

Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books...
Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Thanks... Do you think have the old name will have caused performance
problems?

Dec 29 '07 #3
(ja*******@gmail.com) writes:
Thanks... Do you think have the old name will have caused performance
problems?
I don't what possible performance problems you have experienced, or how
you use @@servername, so I cannot really comment.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Dec 29 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Agnes | last post by:
Please help, i had completed over 30-50 reports, now. our client insist to change the database name. anyshorcut that I can change the database name in the report without re-write all of them ??...
4
by: Ferdinand Zaubzer | last post by:
With System.Security.Principal.WindowsIdentity.GetCurrent().Name I get the user name of the current Windows user. But how can I get the full name? Thanks Ferdinand
3
by: Adam Tibi | last post by:
Hi, Is there a way of getting the domain name of tghe currently executing site, I tried using this silly code: public static string GetDomainName() { string serverName =...
6
by: Adam Tibi | last post by:
Hello, I want to get the right most name of the a domain name, for example: if the domain is www.myweb.com , I want to get myweb.com something.myweb.com --> myweb.com www.myweb.com.au --> ...
0
by: JedTheHead | last post by:
Windows 2003 R2 SE, SP2. I am using the code below in a VBScript to create printers on a remote printer server, CMC-PRN. The code works flawlessly and creates the port and the printer just fine,...
1
by: CK | last post by:
We have a server with Sql Server 2000 on it. We installed Sql Server 2005 on the same box. It was named SERVERNAME\SQL2005. What I need to do is basically decommision the Sql Server 2000 server and...
4
by: jtammyg | last post by:
Hi! I have the following snippet that gives the name of the sql servers installed: Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load...
2
by: Daniel Ngu | last post by:
Hi, I'm in the process of moving a database from a server running Windows 2000 SP4 to a PC running XP SP2. Basically, here's what I've managed to do so far: Made a full backup of the database...
0
by: Jakh | last post by:
Our prod SQL server name from Query Analyzer shows as "prodsql6" by command "select @@servername, @@servicename" where as on enterprise manager it shows as "prodsql1". The host name is prodsql1. The...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.