Click to See Complete Forum and Search --> : Generating an SQL Script from MSSQL that populates tables with data


shaz
June 2nd, 2005, 07:55 PM
I'm new to MSSQL (came over from MySQL) and while the Server Enterprise Manager is a great tool, I find it extremely annoying that there is a way to generate an SQL script that builds all the database tables, but there is no way to easily generate and SQL script that also populates the tables.

With MySQL, that was *the* way to back up a database. It was very handy because it was super easy to take the created scripts and move them to another database. Or to create a script that creates empty tables, but prepopulates certain tables like, for instance, a US_States table where the data will always be the same.

Does anyone know of a tool that can do what I want so that I don't have to hand code hundreds of insert statements into my SQL script?

Thanks.

Krzemo
June 3rd, 2005, 03:32 AM
With MSSQL it is extremly easy to move database from one place to another. U can copy files and attach them in destination place or make a backup ( with few clicks) and restore it into new database. It is faster and
safer way.

U can also use DTS packages for scripting out and moveing data from/into any data source.

Best regards,
Krzemo.