Quantcast

Create Script in TOAD

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Create Script in TOAD

Gerald Novak
I wish to find all the indexes, and sql needed to recreate them from a system table.
I can create a script in toad to export them.
Is there any way that I can see the code that creates the script?
This would not only answer this specific issue but help in the future as well.

Jerry
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Create Script in TOAD

Yechiel Adar-2
You can use Database=>Spool Sql=>Spool Sql to Screen or file.
You can also use the Sql Monitor to catch the commands.

Adar Yechiel
Rechovot, Israel



Gerald Novak wrote:

>
> I wish to find all the indexes, and sql needed to recreate them from a
> system table.
> I can create a script in toad to export them.
> Is there any way that I can see the code that creates the script?
> This would not only answer this specific issue but help in the future
> as well.
>  
> Jerry
>  
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Create Script in TOAD

John Dorlon
In reply to this post by Gerald Novak
Hi Jerry,

Toad runs several queries to create scripts for objects.  You can see what they are with SQL Monitor, but what you can't see is what Toad does with the results to turn them into a script.

If you want to get a script for an object by running a query, try dbms_metadata with a query like this:

select dbms_metadata.get_ddl('INDEX', 'PK_DEPT', 'SCOTT') from dual

-John




From: [hidden email] [mailto:[hidden email]] On Behalf Of Gerald Novak
Sent: Wednesday, November 26, 2008 10:17 AM
To: '[hidden email]'
Subject: [toad] Create Script in TOAD

I wish to find all the indexes, and sql needed to recreate them from a system table.
I can create a script in toad to export them.
Is there any way that I can see the code that creates the script?
This would not only answer this specific issue but help in the future as well.

Jerry

Loading...