DBIDUMPER(1)
πΎ DBIDUMPER β dump database to delimited file πΎ
okay bestie, gather round, because this little perl script is about to dump your whole database into a delimited file and honestly? it ate. it's called dbidumper, it lives in the User Contributed Perl Documentation corner of the manual, and it's giving very much "sql*loader but make it accessible." π
β¨ SYNOPSIS β¨
dbidumper [OPTION]...
<< meanwhile in your control file >>
OPTIONS (export=100,rows=100)
EXPORT DATA REPLACE INTO FILE 'test.dat'
FIELDS TERMINATED BY TAB ENCLOSED BY '"' AND '"'
WITH HEADER FROM
SELECT * FROM MY_TABLE
like, you run it with options, or you let your control file do the talking. either way, slay. π
πΈ DESCRIPTION πΈ
So here's the tea, bestie: dbidumper dumps data from a select statement into an output file. periodt. π
It's lowkey trying to mirror the functionality and behavior of sql*loader β the control file syntax is similar, and dbidumper uses a subset of the sql*loader options. And plot twist: options can also be specified in the control file. But here's the rule β the command line versions take precedence. π
π«Ά The Options (yes, every single one)
userid=username/password@sidβ your login info for the database connection.
Note: for security reasons, it is customary to place this option inside the control file. (bestie, pls don't put your password on the command line, the process list is NOT your friend π)
If the sid includes a colon, the full string will be used as the DBI dsn. For example:
userid=username/password@mysql:database
Will connect to mysql's 'database' database as username. iconic behavior honestly. β¨
If the environment variable ORACLE_SID is available, it will be used if not specified here.
control=filenameβ the input control filename. Defaults to standard input. See the CONTROL FILE section below for layout and description. πoutput=filenameβ the output filename for data. Defaults to standard output. Ifrowsis given, it can contain a template consisting of three or moreXs. TheXs will be replaced with the file sequence number. If the template does not contain three or moreXs, the sequence number will be appended to the filename with a dot. Examples, because examples are everything:rows=1000 output=outputXXXXX.datData will be written tooutput00001.dat,output00002.dat, etc.rows=1000 output=output.datData will be written tooutput.dat.0001,output.dat.0002, etc.output=outputXXXXX.datData will be written tooutputXXXXX.dat
(yes, that last one just... stays. no rows means no numbering, and we respect that. π)
rows=nβ number of rows per output file. Defaults to all rows in one output file.export=nβ total number of rows to export. Use this to limit output or restart a dump. πskip=nβ number of rows to skip from the beginning. The file sequence number will be preserved, so ifrows=nis set, this can be used to restart a job. (resume queen energy fr fr π)writesize=nβ block size to write the file. Defaults to write each record as returned from the database. If set,dbidumperwill collect rows into a buffer at most n bytes large before writing to file. π§Ίsilent=trueβ suppress normal logging information.dbidumperwill only report errors. the quiet luxury option. π
π¦ DEPENDENCIES π¦
This program depends on the following perl modules, available from a CPAN mirror near you:
Parse::RecDescentβ Recursive parserDBIβ Standard database interface
go give your CPAN mirror a little kiss, it's holding this whole thing together. π
π CONTROL FILE π
The control file used for dbidumper is very similar to sql*loader's. The full specification is:
[ OPTIONS ([option], ...) ]
EXPORT DATA [ REPLACE | APPEND ] [ INTO FILE 'filename' ]
[ FIELDS
[ TERMINATED [BY] {TAB | 'string' | X'hexstring'} ] |
[ ENCLOSED [BY] {'string' | X'hexstring'}
[AND] ['string' | X'hexstring'] ]
]
[ WITH HEADER ]
FROM
select_statement
look at all those optional brackets. so much freedom. so many choices. main character energy. β
π AUTHOR π
Written by Warren Smith (warren.smith@acxiom.com)
π BUGS π
None yet.
...bestie that is either the most iconic thing ever written in a manpage or the most ominous. no in-between. π
and that's the whole page, babe β this was DBIDUMPER(1) from the User Contributed Perl Documentation, running under perl v5.42.0, dated 2025-07-25. go dump something gorgeous. πβ¨π
π¦ where this page comes from
- fedora 43: perl-DBI-Dumper 2.01-61.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms