Last post Sep 16, 2015 03:55 AM by Angie xu - MSFT
Sep 02, 2015 09:59 AM|malikmeister|LINK
I have visual studio web developer express. I develop a website on my local PC that works with a SQL server database hosted on a server at a web-hosting company. I would like to script out the database, (which I know how to do) and then put a local version
of SQL server (perhaps 'localdb', perhaps another) and run the script so that I recreate the database on my local PC. Then I want to link to it. I've tried this a couple of times over the years, and I end up download 'localdb', which after running the install
program, is unfindable on my PC. So I can't run the script within it. And even if I could, I would not know the connection string.
Sep 02, 2015 03:54 PM|mostafasydney|LINK
If you are using Visual Studio 2012 or 2013 then you can connect to the localdb database in the following ways:
Hope this will help.
Sep 03, 2015 03:58 AM|Angie xu - MSFT|LINK
There are some examples of SQL Server connection strings for typical ASP.NET web application scenarios. It also includes instructions for converting connection strings between SQL Server Express and LocalDB. such as:
connectionString="Data Source=(LocalDB)\v11.0;AttachDbFileName=|DataDirectory|\DatabaseFileName.mdf;InitialCatalog=DatabaseName;Integrated Security=True;MultipleActiveResultSets=True" />
Please let me know if you need any help.
Sep 09, 2015 09:39 AM|malikmeister|LINK
An odd thing happened when I tried to follow directions above. I already had sql server management studio 2014 on my local PC, because I administer a remote server with it. But I assumed I did not have anything else, so I downloaded sql server 2014 express,
and ran it. It passed all the checks except being able to restart the PC, so I restarted the PC myself, and then ran 'setup'. It succeeded with 'setup', but I can't find the programs that I installed on my PC.
I have a BAK file that I made from my remote database, and I also have a SQL file which is the scripted-out commands that can create that database. But I can't use either if I can't find localdb, or any other database on my local PC.
Does this happen to anyone else?
Sep 16, 2015 03:55 AM|Angie xu - MSFT|LINK
But I can't use either if I can't find localdb, or any other database on my local PC.
Do you have trouble to connect to local/ remote database in SQL Server management studio?
Here are some resources for you:
Connecting to the Database Engine and
View or Configure Remote Server Connection Options
hope it helps.