Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> ANNOUNCE: DDL::Oracle v1.03
Release of DDL::Oracle, Version 1.03
===========================================================================
CHANGES Rewrote routine for CREATE TRIGGER, which was buggy, farkled and less than a stellar effort. Added support for SCHEMA and DATABASE triggers.
Separated CREATE PACKAGE BODY from the CREATE PACKAGE function, giving it its own function. Apologies to users who may have scripts which rely on the original behavior -- you will need to adapt them if you upgrade to 1.03 and beyond.
Added a new configure attribute -- "heading" -- which, if set to zero, omits the heading REM's containing name, rank, serial number and time of day.
DESCRIPTION Designed for Oracle DBA's and users, for Oracle versions 7.3, 8.0 and 8i. Reverse engineers database objects (tables, indexes, users, profiles, tablespaces, roles, constraints, etc.). Generates DDL to *resize* tables and indexes to the provided standard or to a user defined standard. Can reorganize/defragment tablespaces.
SYNOPSIS
use DBI;
use DDL::Oracle;
my $dbh = DBI->connect(
"dbi:Oracle:dbname", "username", "password", { PrintError => 0, RaiseError => 1 } );
# Use default resizing and schema options. # query default DBA_xxx tables (could use USER_xxx for non-DBA types) DDL::Oracle->configure(
dbh => $dbh, );
# Create a list of one or more objects
my $sth = $dbh->prepare(
"SELECT owner , name FROM dba_tables WHERE tablespace_name = 'MY_TBLSP' -- your millage may vary "
my $obj = DDL::Oracle->new(
type => "table", list => $list, ); ); my $ddl = $obj->create; # or $obj->resize; or $obj->drop; etc.
print $ddl; # Use STDOUT so user can redirect to desired file.
AUTHOR
Richard V. Sutherland
rvsutherland_at_yahoo.com
COPYRIGHT Copyright (c) 2000, 2001 Richard V. Sutherland. All rights reserved. This module is free software. It may be used, redistributed, and/or modified under the same terms as Perl itself. See:
http://www.perl.com/perl/misc/Artistic.html
AVAILABILITY
===========================================================================
DDL::Oracle is available from the CPAN, and from:
http://sourceforge.net/projects/ddl-oracle/ Received on Sat Feb 24 2001 - 18:21:21 CST
![]() |
![]() |