1DBIDUMPER(1)          User Contributed Perl Documentation         DBIDUMPER(1)
2
3
4

NAME

6       dbidumper - dump database to delimited file
7

SYNOPSIS

9               dbidumper [OPTION]...
10
11               << meanwhile in your control file >>
12               OPTIONS (export=100,rows=100)
13               EXPORT DATA REPLACE INTO FILE 'test.dat'
14               FIELDS TERMINATED BY TAB ENCLOSED BY '"' AND '"'
15               WITH HEADER FROM
16               SELECT * FROM MY_TABLE
17

DESCRIPTION

19       Dumps data from a select statement into an output file. dbidumper tries
20       to mirror the functionality and behavior of sql*loader. The control
21       file syntax is similar, and dbidumper utilizes a subset of the
22       sql*loader options. Options can also be specified in the control file.
23       The command line versions take precedence.
24
25       userid=username/password@sid
26           Login information for database connection.
27
28           Note: For security reasons, it is customary to place this option
29           inside the control file.
30
31           If the sid includes a colon, the full string will be used as the
32           DBI dsn. For example:
33
34                   userid=username/password@mysql:database
35
36           Will connect to mysql's 'database' database as username.
37
38           If the environment variable ORACLE_SID is available, it will be
39           used if not specified here.
40
41       control=filename
42           Input control filename. Defaults to standard input. See "CONTROL
43           FILE" for layout and description.
44
45       output=filename
46           Output filename for data. Defaults to standard output. If rows is
47           given, can contain template consisting of three or more Xs. The Xs
48           will be replaced with the file sequence number. If the template
49           does not contain three or more Xs, the sequence number will be
50           appended to the filename with a dot. Examples:
51
52           rows=1000 output=outputXXXXX.dat
53               Data will be written to output00001.dat, output00002.dat, etc.
54
55           rows=1000 output=output.dat
56               Data will be written to output.dat.0001, output.dat.0002, etc.
57
58           output=outputXXXXX.dat
59               Data will be written to outputXXXXX.dat
60
61       rows=n
62           Number of rows per output file. Defaults to all rows in one output
63           file.
64
65       export=n
66           Total number of rows to export. Use to limit output or restart
67           dump.
68
69       skip=n
70           Number of rows to skip from beginning. File sequence number will be
71           preserved, so if rows=n is set, this can be used to restart a job.
72
73       writesize=n
74           Block size to write file. Defaults to write each record as returned
75           from database. If set, dbidumper will collect rows into a buffer at
76           most n bytes large before writing to file.
77
78       silent=true
79           Suppress normal logging information. dbidumper will only report
80           errors.
81

DEPENDENCIES

83       This program depends on the following perl modules, available from a
84       CPAN mirror near you:
85
86       Parse::RecDescent - Recursive parser
87       DBI - Standard database interface
88

CONTROL FILE

90       The control file used for dbidumper is very similar to sql*loader's.
91       The full specification is:
92
93               [ OPTIONS ([option], ...) ]
94               EXPORT DATA [ REPLACE | APPEND ] [ INTO FILE 'filename' ]
95               [ FIELDS
96                       [ TERMINATED [BY] {TAB | 'string' | X'hexstring'} ] |
97                       [ ENCLOSED [BY] {'string' | X'hexstring'}
98                               [AND] ['string' | X'hexstring'] ]
99               ]
100               [ WITH HEADER ]
101               FROM
102               select_statement
103

AUTHOR

105       Written by Warren Smith (warren.smith@acxiom.com)
106

BUGS

108       None yet.
109
110
111
112perl v5.36.0                      2022-07-22                      DBIDUMPER(1)
Impressum