DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: DDL for Views and Procedures..

  1. #1
    Join Date
    Oct 2002
    Posts
    284

    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

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    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.

  3. #3
    Join Date
    Nov 2006
    Location
    Sofia
    Posts
    630
    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

  4. #4
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,492

    Talking


    -- OR --
    Download SQL Developer (free from Oracle).


    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  5. #5
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Quote Originally Posted by LKBrwn_DBA

    -- OR --
    Download SQL Developer (free from Oracle).
    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.

  6. #6
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,492

    Talking


    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
  •  


Click Here to Expand Forum to Full Width