Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BCP and Table Export

Status
Not open for further replies.

NWChowd

Programmer
May 26, 2002
84
US
Hi All,
I need to get rid of (delete) about 50 tables in our current database. However, I would like to archive the data in a csv file (just in case). I need the field names to be included in the csv file. I am using SQL Server 7.0. Can I use BCP to do this, rather than having to right-click>All Tasks> Export Data>etc. on each table I want to delete? or is there a better solution than BCP. I'd rather not use the Data Export Wizard 50X, if possible.

any direction is greatly appreciated.

Thanks,
Dennis

======================================
"I wish that I may never think the smiles of the great and powerful a sufficient inducement to turn aside from the straight path of honesty and the convictions of my own mind."
-David Ricardo, classical economist
======================================
 
Why not just make a special backup of the database and copy it off to CD. You could also detach the database, copy the files to CD and reattach. If you ever need the data again, just reattach the database files under a new name on against another SQl Server.
 
Not sure I want to detach the database, as it's our data warehouse, and is used constantly. However, you've definitely given me some different ideas about how I can accomplish the objective. how about exporting the 50 tables to a newly created non-production database, and then taking a complete backup of the new database, then killing the new database after the backup?

======================================
"I wish that I may never think the smiles of the great and powerful a sufficient inducement to turn aside from the straight path of honesty and the convictions of my own mind."
-David Ricardo, classical economist
======================================
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top