Re: Throwing this out there for discussion

From: SoulSurvivor <markyg_7_at_yahoo.co.uk>
Date: 28 Jan 2003 01:48:04 -0800
Message-ID: <8d9c6fd.0301280148.14e54f9e_at_posting.google.com>


I can relate to the original posters scenario!

You can use the views which Daniel suggested as a starter. But you have to hope that their database has foreign key relationships for USER_CONSTRAINTS and USER_DEPENDENCIES it to be beneficial!

I had a script once which used some of those views to create a list of all tables in a schema with indexes, foreign key constraints, check constraints etc, basically a starting point for you to start joining tables for reporting. Only prob is i no longer have the script!

Also, remember Free TOAD is free so the skinflint company cant moan for the cost. There maybe a few trial or free programs out there which will reverse engineer a DB and give you a ER Diagram.

M

DA Morgan <damorgan_at_exesolutions.com> wrote in message news:<3E35C19D.3C75C3D1_at_exesolutions.com>...
> Tom Swier wrote:
>
> > This is the scenario:
> >
> > You walk into a company that has an 8i (8.1.7) database running on
> > UNIX. There is no documentation for the database, i.e., there is
> > absolutely no documentation that tells what the applications that hit
> > the database are doing, when they do it, or how they do it. You don't
> > have access to the application source code (written in C) to figure
> > out what the applications are doing. Users access the database with
> > these applications from client workstations running Win2K. The company
> > won't pay to buy ERWin or any other tool so you can reverse-engineer
> > the database. How do you figure out what is going on so you can
> > generate adhoc reports and do updates on the database like the
> > applications do, but using SQL and PL/SQL?
> >
> > I had a person ask me this and I stood there like an idiot because I
> > couldn't answer their question due to all the foot-shuffling and
> > hemming and hawing. I thought I had it bad!
> >
> > Tom
>
> SELECT table_name, column_name, data_type, etc.
> FROM user_tab_columns;
>
> SELECT from user_dependencies
> SELECT from user_source
> SELECT from user_constraints
> SELECT from user_triggers
> SELECT from user_synonyms
> SELECT from user_sequences
> SELECT from user_sys_privs
> SELECT from user_tab_privs
> SELECT from user_col_privs
> etc.
>
> Then
>
> SELECT from v_$open_cursor
> etc.
>
> Intersperse with cursing the moron that bought a product without
> documentation, source code, or a clue about what he/she was doing.
> Remembering full well that their blood pressure is lower than yours.
>
> Daniel Morgan
Received on Tue Jan 28 2003 - 10:48:04 CET

Original text of this message