Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Looking for a tool to print ORACLE schema as set of text or HTML pages.

by sevensven (Pilgrim)
on Nov 09, 2001 at 22:35 UTC ( [id://124431]=note: print w/replies, xml ) Need Help??


in reply to Looking for a tool to print ORACLE schema as set of text or HTML pages.

Sugestions ? why yes, I've one for you : RDBAL and RDBAL::Schema

Links ? got two for you, here you go, RDBAL and RDBALL::Schema on CPAN

RDBAL - Relational DataBase Abstraction Layer class (ReDBALl) is a very interesting module, that could even (and has been, trust me on that) be used to automate html input form creation. It will allow you the get exactly the information your looking for, without having to fidle with the RDBM that you happen to be using at the time.

Here is what I'm using to get tables, stored procedures and stored procedures code out of the database (yes, there are more ways to get this info, but using perl and CPAN modules is just so sweet, you've got to love it ;-)

use RDBAL; use RDBAL::Schema; use strict; # generic RDBALL::Connect # $X = RDBAL::Connect('username', 'password', 'server') or die ("cant +connect: $!"); # here i'm using ODBC to get to a MSSQL database my $X = RDBAL::Connect('user','password', 'dsn_name', 'ODBC', 'databas +e') or die ("cant connect: $!"); print "rdbal connected\n"; my $schema = new RDBAL::Schema ($X,'visao') or die ("cant make schema +for visao : $!"); my $database = $schema->Database() or die ("cant get database from sch +ema : $!"); my @user_tables = $schema->User_Tables() or die ("cant get user tables + from schema : $!"); my @procedures = $schema->Procedures() or die ("cant get procedures fr +om schema : $!"); foreach my $t (@user_tables) { print "[table] : $t\n"; } foreach my $p (@procedures) { print "[procedure] : $p\n"; my $comments = $schema->Comments($p); print "[procedure code] : $comments\n"; } print "that's all, folks.\n"

  • Comment on Re: Looking for a tool to print ORACLE schema as set of text or HTML pages.
  • Download Code

Replies are listed 'Best First'.
Re^2: Looking for a tool to print ORACLE schema as set of text or HTML pages.
by Anonymous Monk on Apr 29, 2009 at 17:26 UTC
    Question: In your code, for an Oracle database, what would $database contain in the following code (the SID or DSN e.g): $schema = new RDBAL::Schema($X,$database, -get_system => 1);

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://124431]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-25 16:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found