-
DDL for Views and Procedures..
Hello all..
I need to backup ( DDL scripts) all the Views and Procedures for a Schema called 'XYZ'. How do we do it ?..
I know EXP/IMP will backup tables, views, and all that kind of stuff. But i want to backup the DDL definitions of only the VIEWS and Procedures ..
Any help is appreciated..
thanks
Ron
-
You can either...
1) Export with rows=n, which will export all your DDL
or
2) Extract DDL using any tool that allows it
or
3) Extract DDL one by one using DBMS_METADATA.GET_DDL system package.
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
-
dbms_metadata can be used, support PAVB
Also, after the export , one can import using
imp username/password show=y log=file.txt
this will not perform an import, but will dump all the SQLs that normally would be executed to the log file
-
-- OR --
Download SQL Developer (free from Oracle).
"The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb
-
Originally Posted by LKBrwn_DBA
I'm wondering what part of "Extract DDL using any tool that allows it" wasn't clear
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
-
There are many tools to extract DDL, but it's allways good to specify a free tool by Oracle in case the OP does not know about it!
"The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|