Last post May 26, 2015 06:53 AM by PatriceSc
May 23, 2015 02:21 PM|malikmeister|LINK
I've been using Visual Studio for a while with a project that uses a remote database hosted on a server far away from my home.
Now, the project is going live, and for me to make modifications, I have to try them out locally.
So I did the following:
1. I backed up the database from the remote server to a BAK file on a my local PC
2. I downloaded Sql Server Express LocalDB 2014.
My questions are:
a) Is "LocalDB" a better choice than "Sql Server Express" ?
b) How do I add a BAK file to "localdb"?
c) how to I make a connection string that will tell the visual studio where the local database now is?
May 24, 2015 10:33 PM|Edwin Guru Singh|LINK
As per this case, check the following details :
a) you can choose sql server express because refer below :
click here to refer about Restore a Database Backup (SQL Server Management Studio)
click here to refer about SQL Server connection strings with .Net framework data provider
May 26, 2015 06:30 AM|malikmeister|LINK
I would think LocalDB would be adequate, because I'm not using remote connections to my home PC, just trying to make a copy of a live online database that I can work with privately from Visual Studio. I did try and download it, but when I do a search now
for 'localdb' on my PC, I don't find it. So I will be forced to install sql server express anyway.
Thanks for the info.
May 26, 2015 06:53 AM|PatriceSc|LINK
If really installed you should have been able to connect to localdb using the appropriate connection string and you could then use a RESTORE statement (I assume the file you have is a db backup):
http://www.connectionstrings.com/sqlconnection/localdb-automatic-instance/ (not sure which version of LocalDB is installed).