different server later on?

geetar_king

New member
Joined
Jan 26, 2012
Messages
4
Programming Experience
1-3
I do not have too much experience setting up SQL Server.

If I install SQL Server locally on my computer and then write my program will it be possible to transfer the SQL server to a different server later on? This would give me ability to develop/test without network connectivity.
 
In your connection string, assuming SqlClient, the Data Source attribute specifies the machine and instance name. When accessing an instance on your own machine you can use the machine name but most commonly people will use "(local)" or ".". The first option is most commonly used for a default instance, i.e. there is no instance name and just the machine name is used. The second option is most commonly used for a named instance, e.g. ".\SQLExpress". You can simply change the machine and/or instance name in your connection string and, assuming the appropriate configuration and permissions, everything will just work. Often times the connection string is stored in the config file, which allows changing the database location without recompiling the app.
 
Back
Top