Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Identifying the syntax of how a db object was created

Re: Identifying the syntax of how a db object was created

From: Dave A <dave_and_vanna_at_hotmail.com>
Date: Thu, 12 Oct 2000 22:07:30 -0500
Message-ID: <sucurqnicg0a9b@corp.supernews.com>

No.

You can get information on how to recreate the object as it is right now, however. You would employ dynamic sql to build the create statements from values found in tables like dba_indexes, dba_tables, ect.

Let me give you an example, lets consider a basic index creation statement:

create index owner.index_name on table_name(column_name);

To use dynamic sql to build the create statements for every index currently existing you would write the following:

select 'create index '||owner||'.'||index_name||' on '||table_name||'('||column_name||');' from dba_ind_columns;

Of course if you want to specify other information like storage parameters, tablespace to store the index etc you may have to join two or more tables to get the information.

And, if this is confusing to you, there are guis that will do this for you like DBArtisan or many others.

--
Dave A


<martinhurst_at_my-deja.com> wrote in message
news:8s5eb4$9qq$1_at_nnrp1.deja.com...

> Is there an easy way to determine how a database
> object was created in Oracle, ie is this stored
> in one of the system tables, so that an
> index/table can be dropped and recreated if you
> do not have access to the original creation
> scripts/command ?
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Thu Oct 12 2000 - 22:07:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US