Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> ANNOUNCE: DDL::Oracle v1.11
Release of DDL::Oracle, Version 1.11 ===========================================================================
CHANGES Added configure method attribute 'grants', which optionally adds GRANT statements to the CREATE <object> DDL for those object types having GRANTs. Previously, GRANTs were generated from the GRANTEE perspective, which was less than helpful. This change corrects this problem. The default is to exclude them.
Added configure method attribute 'storage', which optionally excludes the STORAGE clause as well as the PCT_FREE, PCT_USED, INITRANS and MAXTRANS clauses. The default is to include them.
Added configure method attribute 'tblspace', which optionally excludes the TABLESPACE clause from DDL for tables and indexes. The default is to include it.
Note: the 'storage' and 'tblspace' options were suggested
by DBA Mark Proctor, whose developers import DDL::Oracle generated project DDL into their own schemas [which have individually configured object sizing and default tablespaces]. Thank you, Mark!
Fixed bug #425876 regarding the CREATE SCHEMA, and the schema name in various objects.
Fixed bug #426596 regarding CREATE TRIGGER statements with the UPDATE OF <column[s]> attribute.
Note: These two bugs were previously fixed in patch #427911.
Fixed bug #445871 submitted by Richard Michaud regarding Foreign Key constraints which referenced a table in a different schema. Thanks Richard!
Implemented a bug fix submitted by Michael Talarczyk having to do with a sporadic condition in column DEFAULT values. Thanks, Michael!
SYNOPSIS
use DBI;
use DDL::Oracle;
my $dbh = DBI->connect(
"dbi:Oracle:dbname", "username", "password", { PrintError => 0, RaiseError => 1, } );
# Use default resize 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 , table_name FROM dba_tables WHERE tablespace_name = 'MY_TBLSP' -- your mileage may vary " );
$sth->execute;
my $list = $sth->fetchall_arrayref;
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.
# Here's another example, this time for type 'components'. This type
# differs from the norm, because it has no owner and no name.
my $obj = DDL::Oracle->new(
type => 'components', list => [[ 'no owner','no name' ]] );
my $ddl = $obj->create;
print $ddl;
AUTHOR
Richard V. Sutherland
rvsutherland_at_yahoo.com
COPYRIGHT Copyright (c) 2000, 2001,2002, 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 Thu May 23 2002 - 04:15:53 CDT