2

I'm working on a MS SQL Server 2008 database. I have all the rights to create and change tables, views, procedures, etc. But I have no right to export or import the database.

Therefore, I am looking for a tool which can create a script with all the necessary CREATE / INSERT Statements for all objects and all data lines in an MS SQL Server database.

The SQL Server Management Studio can do this partially, but only for single objects, not for whole all objects at once, and also not for data.

Is there any tool which can do this?

1 Answers1

1

Right click on your database in Enterprise Manager, Tasks, Generate Scripts. Follow the wizard. Don't forget to select "Script Data" in the options. Also see here for a PowerShell script doing what you want.

Community
  • 1
  • 1
David Brabant
  • 41,623
  • 16
  • 83
  • 111
  • DAVID, THANK YOU SO MUCH! It works!!! I had always looked into the "Script Database" menu (which does not work), and so I have totally overseen that there is a second option in the "Tasks" menu. Great ! –  Sep 18 '12 at 08:13