dbTalk Databases Forums  

Export all tables to CSV files

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Export all tables to CSV files in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jack
 
Posts: n/a

Default Export all tables to CSV files - 12-08-2003 , 03:36 PM






I am trying to write a DTS package to export all the tables in a database to CSV files and I hope to do this with the DTS paclage picking up all the table names from the information_schema view

I know how to extract all table names into a recordset and store in a global variable
I know how to iterate the recordset and call a task parameterised with the table names

Please would someone help me with the Data Pump task to export the table to a CSV

Thank you.. Jack

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Export all tables to CSV files - 12-08-2003 , 04:00 PM






Can you use this in a loop then ?

Bulk Export Task
(http://www.sqldts.com/Default.aspx?237)

--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Jack" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
I am trying to write a DTS package to export all the tables in a database
to CSV files and I hope to do this with the DTS paclage picking up all the
table names from the information_schema view.
Quote:
I know how to extract all table names into a recordset and store in a
global variable.
I know how to iterate the recordset and call a task parameterised with the
table names.

Please would someone help me with the Data Pump task to export the table
to a CSV.

Thank you.. Jack



Reply With Quote
  #3  
Old   
Darren Green
 
Posts: n/a

Default Re: Export all tables to CSV files - 12-08-2003 , 04:04 PM



In article <DF56BE9A-088D-495E-93D1-A6B15791FA74 (AT) microsoft (DOT) com>, Jack
<anonymous (AT) discussions (DOT) microsoft.com> writes
Quote:
I am trying to write a DTS package to export all the tables in a
database to CSV files and I hope to do this with the DTS paclage
picking up all the table names from the information_schema view.

I know how to extract all table names into a recordset and store in a
global variable.
I know how to iterate the recordset and call a task parameterised with
the table names.

Please would someone help me with the Data Pump task to export the
table to a CSV.

The problem with the DataPump task is that you must set the source and
destination column collections and then add transforms between them all.
Whilst you could write some ActiveX Script to handle this, it is rather
hard work.

Personally I use a custom task I wrote, and then wrap this in a loop via
script. I can send you a demo package if you want.

Bulk Export Task
(http://www.sqldts.com/default.aspx?237)

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.