Ask the Expert

When I move my app to the production server, how will my apps resolve the previous server name?

I am developing my first application with a SQL database. On my laptop I have a server and a SQL server name, and, of course, my connections to the database have those names. My question is: when I have to move the application to the production server with a different name, how will my applications resolve the previous server name? What are the recommendations for this type of situation?
The best way to deal with this issue is to use the SQL Server Client Network Utility and create a new alias for the database. This will point to different physical servers in your development and production machines, of course. Next, in your configuration files, as well as your code, in the connection string Data source attribute, use that alias. You can even point the alias to an specific SQL Server instance, if you have more than one in a single server.

This was first published in July 2003

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

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
Sort by: OldestNewest

Forgot Password?

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

Your password has been sent to: