Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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"


In reply to Re: Looking for a tool to print ORACLE schema as set of text or HTML pages. by sevensven
in thread Looking for a tool to print ORACLE schema as set of text or HTML pages. by pmas

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-03-28 21:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found