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

NAME

6       sqlt - convert SQL schema using SQL::Translator
7

SYNOPSIS

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         General Parser Options:
33
34           --skip             Comma-separated list of tables to skip (only implemented in some parsers)
35           --ignore_opts      Comma-separated list of table options to ignore
36
37         DBI Parser Options:
38
39           --dsn              DSN for connecting to database
40                              (see also --use-same-auth below)
41           --db-user          Database user
42           --db-password      Database password
43
44         xSV Parser Options:
45
46           --fs               The field separator
47           --rs               The record separator
48           --no-trim          Don't trim whitespace on fields
49           --no-scan          Don't scan fields for data types and sizes
50
51         MySQL Parser Options:
52
53           --mysql-parser-version  Target MySQL parser version for dealing with
54                                     /*! comments; default = 30000
55
56         MySQL Producer Options:
57
58           --mysql-version  MySQL server version
59
60         General Producer Options
61
62           --producer-db-user   Database user for producer
63           --producer-db-pass   Database password for producer
64           --producer-dsn       DSN for producer
65           --use-same-auth      Use these DSN, user, password for producer output
66
67         DB Producer Options:
68
69           --add-drop-table   Add 'DROP TABLE' statements before creates
70           --quote-table-names  Quote all table names in statements
71           --quote-field-names  Qjuote all field names in statements
72           --no-comments      Don't include comments in SQL output
73
74         PostgreSQL Producer Options:
75
76           --postgres-version   PostgreSQL server version
77
78         Diagram Producer Options:
79
80           --imap-file        Filename to put image map data
81           --imap-url         URL to use for image map
82
83         Dumper Producer Options:
84
85           --skip             Comma-separated list of tables to skip
86           --skiplike         Regex for tables to skip
87           --add-truncate     Add "TRUNCATE TABLE" statements for each table
88
89         HTML/POD Producer Options:
90
91           --pretty           Use CGI::Pretty for the output
92           --title            Title of schema
93
94         TTSchema Producer Options:
95
96           --template             The path to the template
97           --tt-var var=value     Pass extra variables to the template
98           --tt-conf option=value Pass extra config options to Template
99
100         XML-SQLFairy Producer Options:
101
102           --add-prefix       Use an explicit namespace prefix of 'sqlf:'
103           --prefix=<p>       Use the namespace prefix given as argument.
104           --no-newlines      Write the XML as a single line.
105           --indent=<n>       Use <n> characters of whitespace to indent the XML.
106
107         ClassDBI Producer Options:
108
109           --package          Base package name for Class::DBI modules.
110

DESCRIPTION

112       This script is part of the SQL Fairy project.  It will try to convert
113       any source file for which it has a grammar into any format for which it
114       has a producer.
115
116       If using "show-warnings," be sure to redirect STDERR to a separate
117       file.  In bash, you could do this:
118
119           $ sql_translator.pl -f MySQL -t PostgreSQL --show-warnings \
120              file.sql 1>out 2>err
121
122       You can specify a parser or producer located in any module that Perl
123       knows about, allowing you to easily substitute your own.
124

AUTHOR

126       Ken Youens-Clark <kclark@cpan.org>, darren chamberlain
127       <darren@cpan.org>.
128

SEE ALSO

130       SQL::Translator, <http://sqlfairy.sourceforge.net>.
131
132
133
134perl v5.12.0                      2009-09-24                           SQLT(1)
Impressum