~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to contrib/oracle/ora2pg.html

  • Committer: alvherre
  • Date: 2005-12-16 21:24:52 UTC
  • Revision ID: svn-v4:db760fc0-0f08-0410-9d63-cc6633f64896:trunk:1
Initial import of the REL8_0_3 sources from the Pgsql CVS repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<HTML>
 
2
<HEAD>
 
3
<TITLE>Ora2Pg - Oracle to PostgreSQL database schema converter</TITLE>
 
4
</HEAD>
 
5
 
 
6
<BODY>
 
7
 
 
8
<A NAME="__index__"></A>
 
9
<!-- INDEX BEGIN -->
 
10
 
 
11
<UL>
 
12
 
 
13
        <LI><A HREF="#name">NAME</A></LI>
 
14
        <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
 
15
        <LI><A HREF="#description">DESCRIPTION</A></LI>
 
16
        <LI><A HREF="#abstract">ABSTRACT</A></LI>
 
17
        <LI><A HREF="#requirement">REQUIREMENT</A></LI>
 
18
        <LI><A HREF="#public methods">PUBLIC METHODS</A></LI>
 
19
        <UL>
 
20
 
 
21
                <LI><A HREF="#new hash_options">new HASH_OPTIONS</A></LI>
 
22
                <LI><A HREF="#export_data filename">export_data FILENAME</A></LI>
 
23
                <LI><A HREF="#export_sql filename">export_sql FILENAME</A></LI>
 
24
                <LI><A HREF="#send_to_pgdb dest_datasrc dest_user dest_passwd">send_to_pgdb DEST_DATASRC DEST_USER DEST_PASSWD</A></LI>
 
25
                <LI><A HREF="#modify_struct table_name arrayof_fieldname">modify_struct TABLE_NAME ARRAYOF_FIELDNAME</A></LI>
 
26
        </UL>
 
27
 
 
28
        <LI><A HREF="#private methods">PRIVATE METHODS</A></LI>
 
29
        <UL>
 
30
 
 
31
                <LI><A HREF="#_init hash_options">_init HASH_OPTIONS</A></LI>
 
32
                <LI><A HREF="#_grants">_grants</A></LI>
 
33
                <LI><A HREF="#_sequences">_sequences</A></LI>
 
34
                <LI><A HREF="#_triggers">_triggers</A></LI>
 
35
                <LI><A HREF="#_functions">_functions</A></LI>
 
36
                <LI><A HREF="#_packages">_packages</A></LI>
 
37
                <LI><A HREF="#_tables">_tables</A></LI>
 
38
                <LI><A HREF="#_views">_views</A></LI>
 
39
                <LI><A HREF="#_get_sql_data">_get_sql_data</A></LI>
 
40
                <LI><A HREF="#_get_data table">_get_data TABLE</A></LI>
 
41
                <LI><A HREF="#_sql_type internal_type length precision scale">_sql_type INTERNAL_TYPE LENGTH PRECISION SCALE</A></LI>
 
42
                <LI><A HREF="#_column_info table owner">_column_info TABLE OWNER</A></LI>
 
43
                <LI><A HREF="#_primary_key table owner">_primary_key TABLE OWNER</A></LI>
 
44
                <LI><A HREF="#_unique_key table owner">_unique_key TABLE OWNER</A></LI>
 
45
                <LI><A HREF="#_foreign_key table owner">_foreign_key TABLE OWNER</A></LI>
 
46
                <LI><A HREF="#_get_users">_get_users</A></LI>
 
47
                <LI><A HREF="#_get_roles">_get_roles</A></LI>
 
48
                <LI><A HREF="#_get_all_grants">_get_all_grants</A></LI>
 
49
                <LI><A HREF="#_get_indexes table owner">_get_indexes TABLE OWNER</A></LI>
 
50
                <LI><A HREF="#_get_sequences">_get_sequences</A></LI>
 
51
                <LI><A HREF="#_get_views">_get_views</A></LI>
 
52
                <LI><A HREF="#_alias_info">_alias_info</A></LI>
 
53
                <LI><A HREF="#_get_triggers">_get_triggers</A></LI>
 
54
                <LI><A HREF="#_get_functions">_get_functions</A></LI>
 
55
                <LI><A HREF="#_get_packages">_get_packages</A></LI>
 
56
                <LI><A HREF="#_table_info">_table_info</A></LI>
 
57
        </UL>
 
58
 
 
59
        <LI><A HREF="#author">AUTHOR</A></LI>
 
60
        <LI><A HREF="#copyright">COPYRIGHT</A></LI>
 
61
        <LI><A HREF="#bugs">BUGS</A></LI>
 
62
        <LI><A HREF="#see also">SEE ALSO</A></LI>
 
63
        <LI><A HREF="#acknowledgements">ACKNOWLEDGEMENTS</A></LI>
 
64
</UL>
 
65
<!-- INDEX END -->
 
66
 
 
67
<HR>
 
68
<P>
 
69
<H1><A NAME="name">NAME</A></H1>
 
70
<P>Ora2Pg - Oracle to PostgreSQL database schema converter</P>
 
71
<P>
 
72
<HR>
 
73
<H1><A NAME="synopsis">SYNOPSIS</A></H1>
 
74
<PRE>
 
75
        BEGIN {
 
76
                $ENV{ORACLE_HOME} = '/usr/local/oracle/oracle816';
 
77
        }</PRE>
 
78
<PRE>
 
79
        use strict;</PRE>
 
80
<PRE>
 
81
        use Ora2Pg;</PRE>
 
82
<PRE>
 
83
        # Init the database connection
 
84
        my $dbsrc = 'dbi:Oracle:host=testdb.samse.fr;sid=TEST;port=1521';
 
85
        my $dbuser = 'system';
 
86
        my $dbpwd = 'manager';</PRE>
 
87
<PRE>
 
88
        # Create an instance of the Ora2Pg perl module
 
89
        my $schema = new Ora2Pg (
 
90
                datasource =&gt; $dbsrc,           # Database DBD datasource
 
91
                user =&gt; $dbuser,                # Database user
 
92
                password =&gt; $dbpwd,             # Database password
 
93
                {
 
94
                        PrintError =&gt; 0,
 
95
                        RaiseError =&gt; 1,
 
96
                        AutoCommit =&gt; 0
 
97
                }
 
98
        );</PRE>
 
99
<PRE>
 
100
        # Create the POSTGRESQL representation of all objects in the database
 
101
        $schema-&gt;export_schema(&quot;output.sql&quot;);</PRE>
 
102
<PRE>
 
103
        exit(0);</PRE>
 
104
<P>or if you only want to extract some tables:</P>
 
105
<PRE>
 
106
        # Create an instance of the Ora2Pg perl module
 
107
        my @tables = ('tab1', 'tab2', 'tab3');
 
108
        my $schema = new Ora2Pg (
 
109
                datasource =&gt; $dbsrc,           # Database DBD datasource
 
110
                user =&gt; $dbuser,                # Database user
 
111
                password =&gt; $dbpwd,             # Database password
 
112
                tables =&gt; \@tables,
 
113
        or                                      # Tables to extract
 
114
                tables =&gt; [('tab1','tab2')],
 
115
                debug =&gt; 1                      # To show somethings when running
 
116
        );</PRE>
 
117
<P>or if you only want to extract the 10 first tables:</P>
 
118
<PRE>
 
119
        # Create an instance of the Ora2Pg perl module
 
120
        my $schema = new Ora2Pg (
 
121
                datasource =&gt; $dbsrc,           # Database DBD datasource
 
122
                user =&gt; $dbuser,                # Database user
 
123
                password =&gt; $dbpwd,             # Database password
 
124
                max =&gt; 10                       # 10 first tables to extract
 
125
        );</PRE>
 
126
<P>or if you only want to extract tables 10 to 20:</P>
 
127
<PRE>
 
128
        # Create an instance of the Ora2Pg perl module
 
129
        my $schema = new Ora2Pg (
 
130
                datasource =&gt; $dbsrc,           # Database DBD datasource
 
131
                user =&gt; $dbuser,                # Database user
 
132
                password =&gt; $dbpwd,             # Database password
 
133
                min =&gt; 10,                      # Begin extraction at indice 10
 
134
                max =&gt; 20                       # End extraction at indice 20
 
135
        );</PRE>
 
136
<P>To choose a particular Oracle schema to export just set the following option
 
137
to your schema name:</P>
 
138
<PRE>
 
139
        schema =&gt; 'APPS'</PRE>
 
140
<P>This schema definition can also be needed when you want to export data. If export
 
141
failed and complain that the table doesn't exists use this to prefix the table name
 
142
by the schema name.</P>
 
143
<P>If you want to use PostgreSQL 7.3 schema support activate the init option
 
144
'export_schema' set to 1. Default is no schema export</P>
 
145
<P>To know at which indices tables can be found during extraction use the option:</P>
 
146
<PRE>
 
147
        showtableid =&gt; 1</PRE>
 
148
<P>To extract all views set the type option as follow:</P>
 
149
<PRE>
 
150
        type =&gt; 'VIEW'</PRE>
 
151
<P>To extract all grants set the type option as follow:</P>
 
152
<PRE>
 
153
        type =&gt; 'GRANT'</PRE>
 
154
<P>To extract all sequences set the type option as follow:</P>
 
155
<PRE>
 
156
        type =&gt; 'SEQUENCE'</PRE>
 
157
<P>To extract all triggers set the type option as follow:</P>
 
158
<PRE>
 
159
        type =&gt; 'TRIGGER'</PRE>
 
160
<P>To extract all functions set the type option as follow:</P>
 
161
<PRE>
 
162
        type =&gt; 'FUNCTION'</PRE>
 
163
<P>To extract all procedures set the type option as follow:</P>
 
164
<PRE>
 
165
        type =&gt; 'PROCEDURE'</PRE>
 
166
<P>To extract all packages and body set the type option as follow:</P>
 
167
<PRE>
 
168
        type =&gt; 'PACKAGE'</PRE>
 
169
<P>Default is table extraction</P>
 
170
<PRE>
 
171
        type =&gt; 'TABLE'</PRE>
 
172
<P>To extract all data from table extraction as INSERT statement use:</P>
 
173
<PRE>
 
174
        type =&gt; 'DATA'</PRE>
 
175
<P>To extract all data from table extraction as COPY statement use:</P>
 
176
<PRE>
 
177
        type =&gt; 'COPY'</PRE>
 
178
<P>and data_limit =&gt; n to specify the max tuples to return. If you set
 
179
this options to 0 or nothing, no limitation are used. Additional option
 
180
'table', 'min' and 'max' can also be used.</P>
 
181
<P>When use of COPY or DATA you can export data by calling method:</P>
 
182
<P>$schema-&gt;export_data(``output.sql'');</P>
 
183
<P>Data are dumped to the given filename or to STDOUT with no argument.
 
184
You can also send these data directly to a PostgreSQL backend using
 
185
 the following method:</P>
 
186
<P>$schema-&gt;send_to_pgdb($destdatasrc,$destuser,$destpasswd);</P>
 
187
<P>In this case you must call <CODE>export_data()</CODE> without argument after the
 
188
call to method send_to_pgdb().</P>
 
189
<P>If you set type to COPY and you want to dump data directly to a PG database,
 
190
you must call method send_to_pgdb but data will not be sent via DBD::Pg but
 
191
they will be load to the database using the psql command. Calling this method
 
192
is istill required to be able to extract database name, hostname and port
 
193
information. Edit the $PSQL variable to match the path of your psql
 
194
command (nothing to edit if psql is in your path).</P>
 
195
<P>
 
196
<HR>
 
197
<H1><A NAME="description">DESCRIPTION</A></H1>
 
198
<P>Ora2Pg is a perl OO module used to export an Oracle database schema
 
199
to a PostgreSQL compatible schema.</P>
 
200
<P>It simply connect to your Oracle database, extract its structure and
 
201
generate a SQL script that you can load into your PostgreSQL database.</P>
 
202
<P>I'm not a Oracle DBA so I don't really know something about its internal
 
203
structure so you may find some incorrect things. Please tell me what is
 
204
wrong and what can be better.</P>
 
205
<P>It currently dump the database schema (tables, views, sequences, indexes, grants),
 
206
with primary, unique and foreign keys into PostgreSQL syntax without editing the
 
207
SQL code generated.</P>
 
208
<P>It now can dump Oracle data into PostgreSQL DB as online process. You can choose
 
209
what columns can be exported for each table.</P>
 
210
<P>Functions, procedures and triggers PL/SQL code generated must be reviewed to match
 
211
the PostgreSQL syntax. Some usefull recommandation on porting Oracle to PostgreSQL
 
212
can be found at <A HREF="http://techdocs.postgresql.org/">http://techdocs.postgresql.org/</A> under the ``Converting from other
 
213
Databases to PostgreSQL'' Oracle part. I just notice one thing more is that the
 
214
<CODE>trunc()</CODE> function in Oracle is the same for number or date so be carefull when
 
215
porting to PostgreSQL to use <CODE>trunc()</CODE> for number and <CODE>date_trunc()</CODE> for date.</P>
 
216
<P>
 
217
<HR>
 
218
<H1><A NAME="abstract">ABSTRACT</A></H1>
 
219
<P>The goal of the Ora2Pg perl module is to cover all part needed to export
 
220
an Oracle database to a PostgreSQL database without other thing that provide
 
221
the connection parameters to the Oracle database.</P>
 
222
<P>Features must include:</P>
 
223
<PRE>
 
224
        - Database schema export (tables, views, sequences, indexes),
 
225
          with unique, primary and foreign key.
 
226
        - Grants/privileges export by user and group.
 
227
        - Table selection (by name and max table) export.
 
228
        - Export Oracle schema to PostgreSQL 7.3 schema.
 
229
        - Predefined functions/triggers/procedures/packages export.
 
230
        - Data export.
 
231
        - Sql query converter (todo)</PRE>
 
232
<P>My knowledge regarding database is really poor especially for Oracle
 
233
so contribution is welcome.</P>
 
234
<P>
 
235
<HR>
 
236
<H1><A NAME="requirement">REQUIREMENT</A></H1>
 
237
<P>You just need the DBI, DBD::Pg and DBD::Oracle perl module to be installed</P>
 
238
<P>
 
239
<HR>
 
240
<H1><A NAME="public methods">PUBLIC METHODS</A></H1>
 
241
<P>
 
242
<H2><A NAME="new hash_options">new HASH_OPTIONS</A></H2>
 
243
<P>Creates a new Ora2Pg object.</P>
 
244
<P>Supported options are:</P>
 
245
<PRE>
 
246
        - datasource    : DBD datasource (required)
 
247
        - user          : DBD user (optional with public access)
 
248
        - password      : DBD password (optional with public access)
 
249
        - schema        : Oracle internal schema to extract
 
250
        - type          : Type of data to extract, can be TABLE,VIEW,GRANT,SEQUENCE,
 
251
                          TRIGGER,FUNCTION,PROCEDURE,DATA,COPY,PACKAGE
 
252
        - debug         : Print the current state of the parsing
 
253
        - export_schema : Export Oracle schema to PostgreSQL 7.3 schema
 
254
        - tables        : Extract only the given tables (arrayref)
 
255
        - showtableid   : Display only the table indice during extraction
 
256
        - min           : Indice to begin extraction. Default to 0
 
257
        - max           : Indice to end extraction. Default to 0 mean no limits
 
258
        - data_limit    : Number max of tuples to return during data extraction (default 0 no limit)</PRE>
 
259
<P>Attempt that this list should grow a little more because all initialization is
 
260
done by this way.</P>
 
261
<P>
 
262
<H2><A NAME="export_data filename">export_data FILENAME</A></H2>
 
263
<P>Print SQL data output to a filename or
 
264
to STDOUT if no file is given.</P>
 
265
<P>Must be used only if type option is set to DATA or COPY
 
266
=cut</P>
 
267
<P>sub export_data
 
268
{
 
269
        my ($self, $outfile) = @_;</P>
 
270
<PRE>
 
271
        $self-&gt;_get_sql_data($outfile);
 
272
}</PRE>
 
273
<P>
 
274
<H2><A NAME="export_sql filename">export_sql FILENAME</A></H2>
 
275
<P>Print SQL conversion output to a filename or
 
276
simply return these data if no file is given.</P>
 
277
<P>
 
278
<H2><A NAME="send_to_pgdb dest_datasrc dest_user dest_passwd">send_to_pgdb DEST_DATASRC DEST_USER DEST_PASSWD</A></H2>
 
279
<P>Open a DB handle to a PostgreSQL database</P>
 
280
<P>
 
281
<H2><A NAME="modify_struct table_name arrayof_fieldname">modify_struct TABLE_NAME ARRAYOF_FIELDNAME</A></H2>
 
282
<P>Modify a table structure during export. Only given fieldname
 
283
will be exported.</P>
 
284
<P>
 
285
<HR>
 
286
<H1><A NAME="private methods">PRIVATE METHODS</A></H1>
 
287
<P>
 
288
<H2><A NAME="_init hash_options">_init HASH_OPTIONS</A></H2>
 
289
<P>Initialize a Ora2Pg object instance with a connexion to the
 
290
Oracle database.</P>
 
291
<P>
 
292
<H2><A NAME="_grants">_grants</A></H2>
 
293
<P>This function is used to retrieve all privilege information.</P>
 
294
<P>It extract all Oracle's ROLES to convert them as Postgres groups
 
295
and search all users associated to these roles.</P>
 
296
<P>Set the main hash $self-&gt;{groups}.
 
297
Set the main hash $self-&gt;{grantss}.</P>
 
298
<P>
 
299
<H2><A NAME="_sequences">_sequences</A></H2>
 
300
<P>This function is used to retrieve all sequences information.</P>
 
301
<P>Set the main hash $self-&gt;{sequences}.</P>
 
302
<P>
 
303
<H2><A NAME="_triggers">_triggers</A></H2>
 
304
<P>This function is used to retrieve all triggers information.</P>
 
305
<P>Set the main hash $self-&gt;{triggers}.</P>
 
306
<P>
 
307
<H2><A NAME="_functions">_functions</A></H2>
 
308
<P>This function is used to retrieve all functions information.</P>
 
309
<P>Set the main hash $self-&gt;{functions}.</P>
 
310
<P>
 
311
<H2><A NAME="_packages">_packages</A></H2>
 
312
<P>This function is used to retrieve all packages information.</P>
 
313
<P>Set the main hash $self-&gt;{packages}.</P>
 
314
<P>
 
315
<H2><A NAME="_tables">_tables</A></H2>
 
316
<P>This function is used to retrieve all table information.</P>
 
317
<P>Set the main hash of the database structure $self-&gt;{tables}.
 
318
Keys are the names of all tables retrieved from the current
 
319
database. Each table information compose an array associated
 
320
to the table_info key as array reference. In other way:</P>
 
321
<PRE>
 
322
    $self-&gt;{tables}{$class_name}{table_info} = [(OWNER,TYPE)];</PRE>
 
323
<P>DBI TYPE can be TABLE, VIEW, SYSTEM TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY,
 
324
ALIAS, SYNONYM or a data source specific type identifier. This only extract
 
325
TABLE type.</P>
 
326
<P>It also get the following informations in the DBI object to affect the
 
327
main hash of the database structure :</P>
 
328
<PRE>
 
329
    $self-&gt;{tables}{$class_name}{field_name} = $sth-&gt;{NAME};
 
330
    $self-&gt;{tables}{$class_name}{field_type} = $sth-&gt;{TYPE};</PRE>
 
331
<P>It also call these other private subroutine to affect the main hash
 
332
of the database structure :</P>
 
333
<PRE>
 
334
    @{$self-&gt;{tables}{$class_name}{column_info}} = $self-&gt;_column_info($class_name, $owner);
 
335
    @{$self-&gt;{tables}{$class_name}{primary_key}} = $self-&gt;_primary_key($class_name, $owner);
 
336
    @{$self-&gt;{tables}{$class_name}{unique_key}}  = $self-&gt;_unique_key($class_name, $owner);
 
337
    @{$self-&gt;{tables}{$class_name}{foreign_key}} = $self-&gt;_foreign_key($class_name, $owner);</PRE>
 
338
<P>
 
339
<H2><A NAME="_views">_views</A></H2>
 
340
<P>This function is used to retrieve all views information.</P>
 
341
<P>Set the main hash of the views definition $self-&gt;{views}.
 
342
Keys are the names of all views retrieved from the current
 
343
database values are the text definition of the views.</P>
 
344
<P>It then set the main hash as follow:</P>
 
345
<PRE>
 
346
    # Definition of the view
 
347
    $self-&gt;{views}{$table}{text} = $view_infos{$table};</PRE>
 
348
<P>
 
349
<H2><A NAME="_get_sql_data">_get_sql_data</A></H2>
 
350
<P>Returns a string containing the entire SQL Schema definition compatible with PostgreSQL</P>
 
351
<P>
 
352
<H2><A NAME="_get_data table">_get_data TABLE</A></H2>
 
353
<P>This function implements a Oracle-native data extraction.</P>
 
354
<P>Return a list of array reference containing the data</P>
 
355
<P>
 
356
<H2><A NAME="_sql_type internal_type length precision scale">_sql_type INTERNAL_TYPE LENGTH PRECISION SCALE</A></H2>
 
357
<P>This function return the PostgreSQL datatype corresponding to the
 
358
Oracle internal type.</P>
 
359
<P>
 
360
<H2><A NAME="_column_info table owner">_column_info TABLE OWNER</A></H2>
 
361
<P>This function implements a Oracle-native column information.</P>
 
362
<P>Return a list of array reference containing the following informations
 
363
for each column the given a table</P>
 
364
<P>[(
 
365
  column name,
 
366
  column type,
 
367
  column length,
 
368
  nullable column,
 
369
  default value
 
370
)]</P>
 
371
<P>
 
372
<H2><A NAME="_primary_key table owner">_primary_key TABLE OWNER</A></H2>
 
373
<P>This function implements a Oracle-native primary key column
 
374
information.</P>
 
375
<P>Return a list of all column name defined as primary key
 
376
for the given table.</P>
 
377
<P>
 
378
<H2><A NAME="_unique_key table owner">_unique_key TABLE OWNER</A></H2>
 
379
<P>This function implements a Oracle-native unique key column
 
380
information.</P>
 
381
<P>Return a list of all column name defined as unique key
 
382
for the given table.</P>
 
383
<P>
 
384
<H2><A NAME="_foreign_key table owner">_foreign_key TABLE OWNER</A></H2>
 
385
<P>This function implements a Oracle-native foreign key reference
 
386
information.</P>
 
387
<P>Return a list of hash of hash of array reference. Ouuf! Nothing very difficult.
 
388
The first hash is composed of all foreign key name. The second hash just have
 
389
two key known as 'local' and remote' corresponding to the local table where the
 
390
foreign key is defined and the remote table where the key refer.</P>
 
391
<P>The foreign key name is composed as follow:</P>
 
392
<PRE>
 
393
    'local_table_name-&gt;remote_table_name'</PRE>
 
394
<P>Foreign key data consist in two array representing at the same indice the local
 
395
field and the remote field where the first one refer to the second.
 
396
Just like this:</P>
 
397
<PRE>
 
398
    @{$link{$fkey_name}{local}} = @local_columns;
 
399
    @{$link{$fkey_name}{remote}} = @remote_columns;</PRE>
 
400
<P>
 
401
<H2><A NAME="_get_users">_get_users</A></H2>
 
402
<P>This function implements a Oracle-native users information.</P>
 
403
<P>Return a hash of all users as an array.</P>
 
404
<P>
 
405
<H2><A NAME="_get_roles">_get_roles</A></H2>
 
406
<P>This function implements a Oracle-native roles
 
407
information.</P>
 
408
<P>Return a hash of all groups (roles) as an array of associated users.</P>
 
409
<P>
 
410
<H2><A NAME="_get_all_grants">_get_all_grants</A></H2>
 
411
<P>This function implements a Oracle-native user privilege
 
412
information.</P>
 
413
<P>Return a hash of all tables grants as an array of associated users.</P>
 
414
<P>
 
415
<H2><A NAME="_get_indexes table owner">_get_indexes TABLE OWNER</A></H2>
 
416
<P>This function implements a Oracle-native indexes information.</P>
 
417
<P>Return hash of array containing all unique index and a hash of
 
418
array of all indexes name which are not primary keys for the
 
419
given table.</P>
 
420
<P>
 
421
<H2><A NAME="_get_sequences">_get_sequences</A></H2>
 
422
<P>This function implements a Oracle-native sequences
 
423
information.</P>
 
424
<P>Return a hash of array of sequence name with MIN_VALUE, MAX_VALUE,
 
425
INCREMENT and LAST_NUMBER for the given table.</P>
 
426
<P>
 
427
<H2><A NAME="_get_views">_get_views</A></H2>
 
428
<P>This function implements a Oracle-native views information.</P>
 
429
<P>Return a hash of view name with the SQL query it is based on.</P>
 
430
<P>
 
431
<H2><A NAME="_alias_info">_alias_info</A></H2>
 
432
<P>This function implements a Oracle-native column information.</P>
 
433
<P>Return a list of array reference containing the following informations
 
434
for each alias of the given view</P>
 
435
<P>[(
 
436
  column name,
 
437
  column id
 
438
)]</P>
 
439
<P>
 
440
<H2><A NAME="_get_triggers">_get_triggers</A></H2>
 
441
<P>This function implements a Oracle-native triggers information.</P>
 
442
<P>Return an array of refarray of all triggers informations</P>
 
443
<P>
 
444
<H2><A NAME="_get_functions">_get_functions</A></H2>
 
445
<P>This function implements a Oracle-native functions information.</P>
 
446
<P>Return a hash of all function name with their PLSQL code</P>
 
447
<P>
 
448
<H2><A NAME="_get_packages">_get_packages</A></H2>
 
449
<P>This function implements a Oracle-native packages information.</P>
 
450
<P>Return a hash of all function name with their PLSQL code</P>
 
451
<P>
 
452
<H2><A NAME="_table_info">_table_info</A></H2>
 
453
<P>This function retrieve all Oracle-native tables information.</P>
 
454
<P>Return a handle to a DB query statement</P>
 
455
<P>
 
456
<HR>
 
457
<H1><A NAME="author">AUTHOR</A></H1>
 
458
<P>Gilles Darold &lt;<A HREF="mailto:gilles@darold.net">gilles@darold.net</A>&gt;</P>
 
459
<P>
 
460
<HR>
 
461
<H1><A NAME="copyright">COPYRIGHT</A></H1>
 
462
<P>Copyright (c) 2001 Gilles Darold - All rights reserved.</P>
 
463
<P>This program is free software; you can redistribute it and/or modify it under
 
464
the same terms as Perl itself.</P>
 
465
<P>
 
466
<HR>
 
467
<H1><A NAME="bugs">BUGS</A></H1>
 
468
<P>This perl module is in the same state as my knowledge regarding database,
 
469
it can move and not be compatible with older version so I will do my best
 
470
to give you official support for Ora2Pg. Your volontee to help construct
 
471
it and your contribution are welcome.</P>
 
472
<P>
 
473
<HR>
 
474
<H1><A NAME="see also">SEE ALSO</A></H1>
 
475
<P><EM>DBI</EM>, <A HREF="/DBD/Oracle.html">the DBD::Oracle manpage</A>, <A HREF="/DBD/Pg.html">the DBD::Pg manpage</A></P>
 
476
<P>
 
477
<HR>
 
478
<H1><A NAME="acknowledgements">ACKNOWLEDGEMENTS</A></H1>
 
479
<P>Thanks to Jason Servetar who decided me to implement data extraction.</P>
 
480
 
 
481
</BODY>
 
482
 
 
483
</HTML>