Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

More specific my db is hosted at appharbor and I want to copy that db to my local SQL Server Express 2012. Up until now I have used Management Studio to export the data and later used the schema compare feature in Visual Studio 2012, but I guess there must be an easier way

share|improve this question

migrated from stackoverflow.com Jul 11 '12 at 19:33

This question came from our site for professional and enthusiast programmers.

1 Answer 1

You should talk to your support team at appharbor. Presumably there is a way to take a backup of your database, store it on the file system somewhere, and then download the .BAK file (through http or, more likely, ftp). This should be a lot less work than your current process, but it depends on your host providing the facility to do so. This also assumes that your backup file would be < 10 GB (since this is the maximum supported by Express) and that it doesn't use any features not supported in Express Edition (such as Data Compression, SQL Server Agent, etc.).

You can do this using just Management Studio, e.g. you can right-click your database, Tasks > Generate Scripts and select all objects and on the Scripting Options tab make sure to go into advanced and select the option to script both schema and data. This will generate a humongous script that you can run on your local machine after you've created an empty database. Personally I find a backup / restore much more reliable and a lot less hassle.

But asking here isn't going to be much help - unless you happen to come across someone who has done this specific thing at that specific host using the specific hosting plan you have, there is little chance any of us knows what options you have - appharbor is going to be able to help you answer that question a lot more accurately than any of us.

share|improve this answer
    
Since I can access both db's through management studio and easily can export tables and data I can't understand why I can't get sp.'s, indexes and the alike the same way. Using just management studio. –  TT. Jul 11 '12 at 19:31
4  
You can, but a backup is much more reliable and much less work. –  Aaron Bertrand Jul 11 '12 at 19:32
    
Thx for the answer Aaron. A possibility to create a backup to my local computer would be ideal. Hassling the guys over at Appharbor every time I need a backup seems a bit to much –  terjetyl Jul 11 '12 at 19:47
3  
I'm not suggesting you ask appharbor: "hey guys, can you make me a backup?" I'm suggesting you ask them: "hey guys, can you tell me how I can create a backup of my database periodically, so that I can download it and develop locally?" –  Aaron Bertrand Jul 11 '12 at 19:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.