Re: SQL to Generate CREATEs from System Tables?
Date: 8 Nov 94 20:18:27 EST
Message-ID: <1994Nov8.201827.1_at_corp02.d51.lilly.com>
In article <1994Nov8.105425_at_ebi.ac.uk>, ditommaso_at_ebi.ac.uk (MATTEO DITOMMASO) writes:
> I am looking for a SQL script to generate CREATEs for all tables & indexes
> in a database. I would like to use these scripts to recreate the database
> with new INITIAL and NEXT extents after a full export and before a full import.
> Anyone out there have such a script that they would share?
>
> Thanks for any assistance.
>
> Matteo diTommaso
> European Bioinformatics Institute
> ditommaso_at_ebi.ac.uk
The script that ORACLE uses to build the data dictionary tables is SQL.BSQ.
Under VMS, the file is located in ORA_RDBMS. Under UNIX (Solaris), it is in $ORACLE_HOME/dbs
The process for reorganizing the system tables would go something like this:
- Do full database export using EXP.
- Generate a listing of your tablespace files.
- Shut down the database and do a cold backup (just in case ).
- Delete your current database files.
- Save a copy of sql.bsq.
- Modify sql.bsq to have the new initial and next values that you want.
- Create your database. I typically use the install procedure from Oracle, ORACLEINS on VMS, ORAINST on Solaris.
- Restore the original copy of sql.bsq, so any subsequent database creations are not affected.
- Create your tablespaces, using the listing that you generated in step 2.
- Do your full database import using IMP.
Good luck!
-- Bob Swisshelm | swisshelm_at_Lilly.com | 317 276 5472 Eli Lilly and Company | Lilly Corporate Center | Indianapolis, IN 46285Received on Wed Nov 09 1994 - 02:18:27 CET