Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a website that is configured with ASP.NET and references data from a MSSQL 2000 server. I can see references in the code to the databases it needs, but the SQL server is not installed locally on the webserver, and I don't see where it references the server location.

My ultimate purpose is to decomission the MSSQL 2000 server and consolidate its databases over to another SQL server I have running, but I need to be sure that the website picks up the database once it has been transferred to the new server.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

When you say you can "see references in the code to the databases it needs", where are you finding this information?

Generally to see what connections you're using, you'll want to open your web.config file at the root of your website. This file can actually exist at the root of other folders too.

You'll see code like this:

Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

Which is a connectionstring in your web.config.

share|improve this answer
    
I must have been looking in the wrong spot. I'll check there to see if the connection is listed. I was looking at the specific .ASP and .HTML files from the parts of the site that I knew referenced the server, but I haven't had much experience with ASP, so I didn't know where to look. –  CaedJar4 Aug 25 '10 at 18:55

You'll need to look at the connection strings in the ASP.NET code. Typically these are set up globally in the web.config file(s) in the <connectionStrings> section, although they can also be created programatically within code (but hopefully that is not the case).

There are number of ways you can create connection strings. To find the server name for SQL Server you'll typically want to look for the server or data source attributes.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.