SQLT-DUMPER(1)

hey bestie πŸ’– welcome to the SQLT-DUMPER(1) page, part of the User Contributed Perl Documentation. we’re about to make schema dumping make sense, no cap.

✨ NAME ✨

sqlt-dumper β€” create a dumper script from a schema. πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

sqlt-dumper -d Oracle [options] schema.sql > dumper.pl

./dumper.pl > data.sql

✨ Options ✨

  • -h|--help β€” show help and exit.
  • --skip=t1[,t2] β€” skip the tables in a comma-separated list.
  • --skiplike=regex β€” skip tables matching the regular expression.
  • -u|--user β€” database username.
  • -p|--password β€” database password.
  • --dsn β€” DSN for DBI.

πŸ’– DESCRIPTION πŸ’–

okay so here’s the tea β˜•: this script uses SQL::Translator to parse the SQL schema and create a Perl script that can connect to the database and dump the data as INSERT statements (a la mysqldump) or MySQL’s LOAD FILE syntax. iconic behavior, honestly. 🌈

you may specify tables to β€œskip” β€” and yes, you can also use a β€œskiplike” regular expression for that β€” and the generated dumper script will not have those tables. but plot twist 🫒: these will also be options in the generated dumper, so you can wait to specify these options when you dump your database. literally so flexible.

the database username, password, and DSN can be hardcoded into the generated script, or part of the DSN can be intuited from the "database" argument. slay. πŸ’…

🌸 AUTHOR 🌸

Ken Youens-Clark <kclark@cpan.org>. πŸ‘‘

πŸ¦‹ SEE ALSO πŸ¦‹

  • perl
  • SQL::Translator
  • SQL::Translator::Producer::Dumper

and that’s the vibe check βœ… β€” this page is from perl v5.42.0, dated 2024-12-12. periodt. πŸ’œ

πŸ“¦ where this page comes from