Oracle Imp show=y & Indexfile: How to generate sql scripts from Oracle dump file?


imp SHOW=Y
Import (imp) is the oracle utility to read export dump files and insert them into database. Export dump files can only be read by imp utility. Using SHOW=Y option, the content of the dump file can be generated into readable ASCII format. If we use this option with Y as the value the content of the dump will not be inserted into the database whereas it will spool the sql statements to the log file. SHOW option can be used only with FULL=Y, FROMUSER, TOUSER and TABLES mode.


Scenario: Generate table creation script for a schema from the dump
Imp file=exp_schema.dmp log=imp_schema_script.log full=y show=y rows=n

imp indexfile=index.sql
Indexfile: This is another option with import (imp) utility to generate index DDL script from the export dump.  INDEXFILE option will spool the CREATE INDEX statements (including storage parameters) to the filename which specify in the indexfile. This will not generate primary key indexes.
DATA PUMP Reference Guide ….

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...
 

dba topics. Copyright 2011-14 All Rights Reserved | Site Map | Contact | Disclaimer