1SQLT(1) User Contributed Perl Documentation SQLT(1)
2
3
4
6 sqlt - convert SQL schema using SQL::Translator
7
9 For help:
10
11 sqlt -h⎪--help
12
13 For a list of all parsers and producers:
14
15 sqlt -l⎪--list
16
17 To translate a schema:
18
19 sqlt -f⎪--from⎪--parser MySQL
20 -t⎪--to⎪--producer Oracle
21 [options]
22 file [file2 ...]
23
24 General Options:
25
26 -d⎪--debug Print debug info
27 -v⎪--validate Validate the schema
28 --version Show the version of SQL::Translator
29 --trace Print parser trace info
30 --show-warnings Print warnings to STDERR
31
32 DBI Parser Options:
33
34 --dsn DSN for connecting to database
35 (see also --use-same-auth below)
36 --db-user Database user
37 --db-password Database password
38
39 xSV Parser Options:
40
41 --fs The field separator
42 --rs The record separator
43 --no-trim Don't trim whitespace on fields
44 --no-scan Don't scan fields for data types and sizes
45
46 MySQL Parser Options:
47
48 --mysql-parser-version Target MySQL parser version for dealing with
49 /*! comments; default = 30000
50
51 General Producer Options
52
53 --producer-db-user Database user for producer
54 --producer-db-pass Database password for producer
55 --producer-dsn DSN for producer
56 --use-same-auth Use these DSN, user, password for producer output
57
58 DB Producer Options:
59
60 --add-drop-table Add 'DROP TABLE' statements before creates
61 --quote-table-names Quote all table names in statements
62 --quote-field-names Qjuote all field names in statements
63 --no-comments Don't include comments in SQL output
64
65 Diagram Producer Options:
66
67 --imap-file Filename to put image map data
68 --imap-url URL to use for image map
69
70 Dumper Producer Options:
71
72 --skip Comma-separated list of tables to skip
73 --skiplike Regex for tables to skip
74 --add-truncate Add "TRUNCATE TABLE" statements for each table
75
76 HTML/POD Producer Options:
77
78 --pretty Use CGI::Pretty for the output
79 --title Title of schema
80
81 TTSchema Producer Options:
82
83 --template The path to the template
84 --tt-var var=value Pass extra variables to the template
85 --tt-conf option=value Pass extra config options to Template
86
87 XML-SQLFairy Producer Options:
88
89 --add-prefix Use an explicit namespace prefix of 'sqlf:'
90 --prefix=<p> Use the namespace prefix given as argument.
91 --no-newlines Write the XML as a single line.
92 --indent=<n> Use <n> characters of whitespace to indent the XML.
93
94 ClassDBI Producer Options:
95
96 --package Base package name for Class::DBI modules.
97
99 This script is part of the SQL Fairy project. It will try to convert
100 any source file for which it has a grammar into any format for which it
101 has a producer.
102
103 If using "show-warnings," be sure to redirect STDERR to a separate
104 file. In bash, you could do this:
105
106 $ sql_translator.pl -f MySQL -t PostgreSQL --show-warnings \
107 file.sql 1>out 2>err
108
109 You can specify a parser or producer located in any module that Perl
110 knows about, allowing you to easily substitute your own.
111
113 Ken Youens-Clark <kclark@cpan.org>, darren chamberlain <dar‐
114 ren@cpan.org>.
115
117 SQL::Translator, <http://sqlfairy.sourceforge.net>.
118
119
120
121perl v5.8.8 2007-10-24 SQLT(1)