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. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created a sql database and filled it with some good data. Now I'm trying to move all the stored procedure over to another database instance. I exported the entire source database, including beloved stored procedures to a .sql file. Now I'm looking for a way to read that data into the other computer's sql server installation.

So far, I've tried looking through the Visual Studio UI for hints, and using sqlcmd with an input file. After using sqlcmd with the .sql file, some rows were affected, but they didn't show up in the server explorer.

share|improve this question
On re-reading your question, it's not clear whether your problem is export/import of data (which I originally thought, hence my answer below) or whether you are just unable to execute your .sql script on the new server. Which is it? – Mark Storey-Smith Nov 13 '11 at 14:34
If the script has the insert/create procedure/ect statements, can't you just run it against the new database in SQL Sever Management studio or via the command line? – Ben Brocka Nov 13 '11 at 17:34
@MarkStorey-Smith: Both, actually. First, I'm trying to export and import date from one sql server to another. Second, my first attempt at doing so failed. Thanks for the answer. – lowerkey Nov 13 '11 at 21:51
up vote 6 down vote accepted

Do you want to move data as a one off exercise or do you want to add the data to source control?

share|improve this answer

Your Answer


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.