Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
viperbyte
Posting Yak Master
132 Posts |
Posted - 2013-11-11 : 08:50:22
|
Good morning everybody.Now that I'm finished with my asp.net web app I need to move the database which is LocalDB to SQL Server. The source database is in an app_data folder in an asp.net project. How do you guys move a database of that kind to an SQL Server? I'd be happy with scripting, graphical or any kind of solution. I'm hoping I won't have to resort to creating the db by hand. |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-11-11 : 09:06:21
|
Startup SQL Server Management Studio and connect to (localDB)\V11.0. If you don't see the database, right-click on Databases, select attach, find your database file and attach it. Then you can take a backup and restore that backup onto other servers.I suppose you could take the database file directly and attach that to other servers as well, but for reasons that I don't recall, whenever I had to do this (which was not in the recent past), I backed it up and then ported to other servers.If you are using MVC4/Entity Framework with migration scripts, you can point your connection string to the target server and run the migration scripts. |
|
|
viperbyte
Posting Yak Master
132 Posts |
Posted - 2013-11-11 : 14:06:51
|
Thank you very much. |
|
|
|
|
|