April 3, 2017 at 7:07 am
hi
i am trying to get log shiping setup on one of our servers, but when i try to complete the job, it says server name GRNSQL004 does not exist
which in fairness, it does not exist, the primary server i am working on is called grnsql001
but when i select @@servername i get GRNSQL004..
how do i go about fixing this? i can read online about dropserver, but the very name makes me fearful of trying as this is my main business critical sql server
any advice?
mal
April 3, 2017 at 7:25 am
dopydb - Monday, April 3, 2017 7:07 AMhii am trying to get log shiping setup on one of our servers, but when i try to complete the job, it says server name GRNSQL004 does not exist
which in fairness, it does not exist, the primary server i am working on is called grnsql001but when i select @@servername i get GRNSQL004..
how do i go about fixing this? i can read online about dropserver, but the very name makes me fearful of trying as this is my main business critical sql server
any advice?
mal
Did you rename the server in the past? That is usually how this happens. When @@servername is incorrect the meta data for the server name is incorrect. It's explained in several places and is actually not that unusual. Did you read about it in this article?:
SERVERPROPERTY (Transact-SQL)
The way to fix it is what you have read about:sp_dropserver 'GRNSQL004';
GO
sp_addserver 'grnsql001', local;
GO
You need to restart the server for the changes to take effect so you would want to do this during a maintenance window.
Sue
April 3, 2017 at 7:27 am
Sue
April 3, 2017 at 7:34 am
hi Sue
thanks for this, cant remeber the server ever being 004, must have been done by the hardware guys and then changes later, i guess if i find i have any issues i can always rename back to grnsql004? although id be 99.5% sure nothing references 004
mal
April 3, 2017 at 7:51 am
dopydb - Monday, April 3, 2017 7:34 AMhi Suethanks for this, cant remeber the server ever being 004, must have been done by the hardware guys and then changes later, i guess if i find i have any issues i can always rename back to grnsql004? although id be 99.5% sure nothing references 004
mal
Yes...and that would be one of the advantages of doing it during a maintenance window. You'd have time to mess around with it. I've had to do it more times that I care to think about and you feel more comfortable with it after you've done it a couple of times. Here is another couple of things you can run and check the mismatches:
SELECT @@SERVERNAME
SELECT SERVERPROPERTY('MachineName')
SELECT SERVERPROPERTY('ServerName')
Books Online /SQL Server help files also have more information in the topic on @@SERVERNAME
Sue
April 4, 2017 at 3:22 am
all worked fine ! thanks for help Sue
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply