Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
SQL Server Express
»
Machine Name Change
Machine Name Change
Rate Topic
Display Mode
Topic Options
Author
Message
Grant Fritchey
Grant Fritchey
Posted Thursday, December 20, 2007 6:02 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 4:50 AM
Points: 13,371,
Visits: 25,143
I'm grossly ignorant of SQL Express, so please excuse me if this is obvious.
If you change the machine name in SQL Server, the server, you will, in all likelihood have to reinstall the server. According to our support people, if they change the machine name with MSDE, they have to reimage the machine to get the database back online. The question is, does the same thing happen with SQL Express? If so, is there a good way to work around it, or does it require you to basically reinstall?
Thanks for any help.
----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #435160
Steve Jones - SSC Editor
Steve Jones - SSC Editor
Posted Thursday, December 20, 2007 6:51 AM
SSC-Dedicated
Group: Administrators
Last Login: Yesterday @ 1:47 PM
Points: 31,406,
Visits: 13,722
The sp_dropserver/addserver doesn't work?
I'd be surprised as this is the same codebase as the Workgroup/Standard/Enterprise versions.
Follow me on Twitter:
@way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
Post #435176
Grant Fritchey
Grant Fritchey
Posted Thursday, December 20, 2007 6:54 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 4:50 AM
Points: 13,371,
Visits: 25,143
You're talking to the wrong guy. I'm posting this for our tech support guys. Luckily, I don't have to muck about in Express (yet). I'll try it out & get back to you.
----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #435179
Grant Fritchey
Grant Fritchey
Posted Thursday, December 20, 2007 7:05 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 4:50 AM
Points: 13,371,
Visits: 25,143
That drops linked servers on a local machine. That's not going to help with Express is it?
----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #435188
Joy Garon
Joy Garon
Posted Thursday, December 20, 2007 7:26 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, December 13, 2012 4:52 AM
Points: 166,
Visits: 55
Actually I just did this yesterday, however, it was on SQL Server 2005 Standard edition. Not sure it applies to Express.
I opened SQL Server Management Studio, created a new query then entered and ran the following:
DECLARE @var1 nvarchar(50)
DECLARE @var2 nvarchar(50)
SET @var1 = convert(nvarchar(50),@@SERVERNAME)
SET @var2 = convert(nvarchar(50),SERVERPROPERTY('MachineName'))
EXEC sp_dropserver @var1
EXEC sp_addserver @var2, local
GO
Post #435197
DonaldW
DonaldW
Posted Friday, December 21, 2007 7:13 AM
Ten Centuries
Group: General Forum Members
Last Login: Friday, January 18, 2013 1:22 PM
Points: 1,309,
Visits: 482
Steve Jones - Editor (12/20/2007)
The sp_dropserver/addserver doesn't work?
I'd be surprised as this is the same codebase as the Workgroup/Standard/Enterprise versions.
I agree. According to BoL the sp_addserver even allows for named instances. I suspect that this also worked with MSDE but I have not tried it myself.
Post #435623
leokarp
leokarp
Posted Friday, December 21, 2007 8:31 AM
Grasshopper
Group: General Forum Members
Last Login: Tuesday, March 12, 2013 8:36 AM
Points: 22,
Visits: 275
DonaldW (12/21/2007)
I agree. According to BoL the sp_addserver even allows for named instances. I suspect that this also worked with MSDE but I have not tried it myself.
Proven - it works with MSDE. I did it myself multiple times.
Post #435670
rbarrera
rbarrera
Posted Wednesday, January 16, 2008 11:36 AM
Grasshopper
Group: General Forum Members
Last Login: Friday, May 11, 2012 8:22 AM
Points: 23,
Visits: 167
Here is a batch file I wrote:
SC CONFIG SQLBROWSER START= DEMAND
NET START SQLBROWSER
REM THIS WILL UPDATE THE INSTANCE NAME ON A CLIENT, WHERE THE PC NAME HAS BEEN CHANGED AFTER THE INSTALLATION OF SQL
REM YOU SHOULD NOT BE USING DELIMINATORS (- SIGN) IN YOUR PC NAMES!!!! USE (_ UNDERSCORE) INSTEAD, OTHERWISE THIS SCRIPT WILL NOT WORK
%SYSTEMDRIVE% SET
"%ProgramFiles%\Microsoft SQL Server\90\Tools\Binn\SQLCMD" -S "127.0.0.1\(yourinstanceifyouhaveone)" -Q "EXEC sp_dropserver @server = @@servername"
"%ProgramFiles%\Microsoft SQL Server\90\Tools\Binn\SQLCMD" -S "127.0.0.1\(yourinstanceifyouhaveone)" -Q "EXEC sp_addserver %COMPUTERNAME%, 'local'"
REM RESTARTING SERVICES FOR SQL SERVERNAME TO TAKE EFFECT
NET STOP MSSQL$(yourinstanceifyouhaveone) /y
NET STOP SQLSERVERAGENT /y
NET STOP MSSQLSERVER /y
NET START MSSQL$(yourinstanceifyouhaveone)
NET START MSSQLSERVER
NET START SQLSERVERAGENT
REM ADDS A SHORT DELAY FOR SQL TO RESTART
PING 127.0.0.1
PING 127.0.0.1
PING 127.0.0.1
PING 127.0.0.1
NET STOP SQLBROWSER
You may have to modify the code if you're using an instance or not.
Post #443888
Grant Fritchey
Grant Fritchey
Posted Wednesday, January 16, 2008 12:01 PM
SSChampion
Group: General Forum Members
Last Login: Today @ 4:50 AM
Points: 13,371,
Visits: 25,143
Looks good. Thanks.
----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #443910
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.