[CLUE-Tech] OT: SQL Server dump-to-text

Dave Anselmi anselmi at americanisp.net
Sun Dec 23 11:52:56 MST 2001


"Chris K. Chew" wrote:

> Well yes, and no.
>
> To clarify, I found that SQL Server is able to dump the database to a
> records-only sql text file.  The file will contain no information about the
> table structures, however.  I was hoping that ms would remain faithful to
> the SQL standard and give me a genuine sql dump of the database including
> CREATE TABLE statements.  I searched both the Internet and every related
> book in the local computer bookstore, but couldn't find anything telling me
> that it can do it, much less how to do it.  I like to know how, if it is
> indeed possible.

Look in the SQL Server books on-line, in the howto section (enterprise manager,
and databases):

<quote>
To generate a script

Expand a server group; then expand a server.
Expand Databases, right-click the database to script, point to All Tasks, and
then click Generate SQL Scripts....
On the General tab, select the database objects to script. By default, all
objects in the database are scripted.
On the Formatting tab, select from the script formatting options:
</quote>

And so on...

Seems that this is just what you are looking for.  Of course the script may be
transact-sql and may require massaging to work with another db.  And you already
know how to dump the data itself.

Dave





More information about the clue-tech mailing list