Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the Name of MSDE 2 Installation

Status
Not open for further replies.

johnfrederick

Programmer
Sep 30, 2002
34
0
0
US
I installed MSDE 2 from the .NET Prof kit and the Client Tools from a SQL2000 Evaluation disk. Seems to work fine, EXCEPT:

The name of the server is P600\ASPNET where P600 is my machine name. I have to put Server=P600\ASPNET in my connect strings and localhost doesn't work. If I move a demo to my laptop, I'll have to fix all these references to make them work. Is there a way to change the server name to the machine name so localhost will work?
 
Do you have a prior installation of SQL Server on your machine (maybe a SQL7 install)? What you have there is a named instance of SQL 2000, just like I have on mine, where my default install (addressable as localhost) is SQL7 and simply bears tha name of my machine.

I'm not sure there's any way round this - not an easy one anyway. Hope fully your connection string aren't all hard coded, so you can change them just the once. Otherwise I'm not sure what to suggest (except this might be a good time to rethink your connection string strategy).

Unless anyone else knows different, of course...

HTH,

Graham
 
I'm not sure how to fix your problem, but just as a useful tip - I always put my connection code in #include files in my ASP pages. Then you only have to change it on one page if your database details change. --James
 
Thanks to grahams and JamesLean for responding.
1. When I uninstalled an Evaluation SQLServer and then installed .NET and MSDE 2, it left a record of a server with the machine name with no services assigned. It couldn't be started. In Enterprise Mgr, I deleted the server registration and it went away with no problems.
2. When I did a brand new os build and .NET installation, It still was named P600\ASPNET.
3. My connection strings are all hard coded. If I can't get localhost to work, I guess I'll try to collect them in one place where I can find them easily.
 
My Feb. 18, 2003 posting had errors.

When the .NET Prof. copy of MSDE 2000 is installed, it gets named: P600\VSDOTNET where P600 is my machine name. Server=localhost doesn't work. You have to use Server+P600\VSDOTNET

Apparently, all the sql calls from the .NET IDE us the login: P600\ASPNET. It doesn't matter what you put in the uid parameter in the connect string.
 
I raised this question with the local gurus at a meeting last night and I guess I have the answer.

1. The name is assigned to a SQLServer when it's installed. The name can't be changed later.
2. Normally, a single installation is given the name of the machine and it responds to SERVER=localhost. What I have is a "named instance" and it can't be made to respond to SERVER=localhost.
3. I'm doing ASP.NET. It is suggested that I put a variable in Web.Config(a pool of global variables and code) and use it to generate the connect strings.

Not the answer I had hoped for, but thanks to grahams and JamesLean for contributing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top