Thursday, March 29, 2012

Export DB to SQL Script

How?
I am wanting to export a db.
It is unlikely that i will have access to a destination server via a network
or internet
connection. So i am intending to export my db to an sql script.
I have used the generate sql script option previously, but have found it
only exports the db objects. I need to export both the db objects and the
data they contain.
Any helpful suggestions would be appreciated!!Hi
If your database is small enought to fit onto a CD/DVD then you could use a
backup and restore it onto the new server
http://support.microsoft.com/defaul...b;en-us;Q314546
Failing that you should look at the BCP utility.
If you want to script as insert statements then check out
http://vyaskn.tripod.com/code.htm#inserts although I would not recommend it
for large amounts of data.
John
"AJ" wrote:

> How?
> I am wanting to export a db.
> It is unlikely that i will have access to a destination server via a netwo
rk
> or internet
> connection. So i am intending to export my db to an sql script.
> I have used the generate sql script option previously, but have found it
> only exports the db objects. I need to export both the db objects and the
> data they contain.
> Any helpful suggestions would be appreciated!!|||DB Ghost - www.dbghost.com
1. Use the data and schema scripter to script out all your tables and data
into a temporary directory.
2. Use the change manager - option one to build a database using the scripts
above and record the build into a SQL file. This step ensure the SQL is in
the correct dependancy order which Enterprise Manager cannot always do.
"AJ" wrote:

> How?
> I am wanting to export a db.
> It is unlikely that i will have access to a destination server via a netwo
rk
> or internet
> connection. So i am intending to export my db to an sql script.
> I have used the generate sql script option previously, but have found it
> only exports the db objects. I need to export both the db objects and the
> data they contain.
> Any helpful suggestions would be appreciated!!

No comments:

Post a Comment