Sunday, February 12, 2012

Best way to create a remote database and data within it?

Is there any tool that will allow me to create a script for creating a database with all its objects like triggers, indexes, relationships etc. and also populating the tables with data ? So far I haven't found any.

Enterprise Manager will easily let you script all the objects. Right click on an object and select All Tasks and then Generate SQL Script. You can then elect to generate scripts for all objects.

You can use a third party tool to script the data (I have usedRed Gate's SQL Data Compare). Or you could generate scripts using a SELECT statement if you really wanted to.

No comments:

Post a Comment