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

x
?
Solved

Connection Problem cause by Change Computer Name

Posted on 2009-07-06
10
Medium Priority
?
272 Views
Last Modified: 2012-05-07
Hi,

I have a server let's say "Server". The connection is doing fine, until some change it to "Server01".

Could we solve this problem by not changing the computer name back ?

Thank you.

0
Comment
Question by:emi_sastra
[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
  • 6
  • 4
10 Comments
 
LVL 17

Accepted Solution

by:
pssandhu earned 2000 total points
ID: 24786822
Can you not update your connection string with the new server name?
P.
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 24786850
Hi pssandhu,

I could recompile my application, not problem with that.
How about the data? It is gone,  I mean how to attach the data to the new instance and the new sql server instance (new computer name) is not there yet.

Thank you.
0
 
LVL 17

Expert Comment

by:pssandhu
ID: 24786978
Has the SQL Server instance name changed as well? If all that was done was to change the server name then the defaul or named sql server name will not change.
Are you running into errors when you change your connection string?
P.
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 1

Author Comment

by:emi_sastra
ID: 24786988
-Has the SQL Server instance name changed as well?
Not yet.

Are you running into errors when you change your connection string?
Yes, since there is no database there.

Thank you.
0
 
LVL 17

Expert Comment

by:pssandhu
ID: 24787037
<<Yes, since there is no database there.>>
So it's a new server then? If the server was renamed then the database shouldn't disappear or get deleted. If there is no database then either it must be a new server/machine or the target machine has been rebult.
Sorry but I am missing something obvious here?
P.
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 24787127
-So it's a new server then?
No, it is not.

-If the server was renamed then the database shouldn't disappear or get deleted.
Yes, its still there on HD folder.

Are you running into errors when you change your connection string?
Yes, and I should say since the sql instance name is not the same as the computer name (still "server").

Because the servername = "ComputerName\SQLEXPRESS", when the computer name is changed then will get exception when try to connect it.

Thank you.
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 24787282
I just tried to rename my computer, restart it.

Now, I can't even use SQL Management to see the database.

Thank you.
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 24787334
I could access it using browse.
Does it mean that when I change my computer name then the Windows change the sql instance also like:

Server\SQLEXPRESS to Server01\SQLEXPRESS

What I need just recompile my app using Server01\SQLEXPRESS as connection string?

Thank you.
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 24787429
Hi pssandhu,

I get it now.
I seems like it is new feature of SQL 2005, rename SQL instance automatically when computer name is renamed.
It does not behave like that in SQL 7.

Thanks for the discussion.
0
 
LVL 17

Expert Comment

by:pssandhu
ID: 24787448
Oh, cool. I was just testing the theory. Awesome!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

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