Code differentiating between SQL Server 2000 and SQL Server 2005

Tags:
SQL Database
SQL Server 2000
SQL Server 2005
If SQL Server 2000 and SQL Server 2005 run on the same server, how can your code differentiate which database to use? Can you give the new instance of SQL a different name?

Answer Wiki

Thanks. We'll let you know when a new response is added.

The instance would need to have a different name. If you install SQL 2005 on the same server that already has SQL 2000 installed and you use the same instance the instance will be upgraded from SQL 2000 to SQL 2005.

Within your connection string where you specify the server name you specify the instance name as well.

<pre>Default Instance: SERVERNAME
Named Instance: SERVERNAME\INSTANCE_NAME</pre>

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following