Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003

    Unhappy Unanswered: Script Backup....

    Hi Folks,

    Is there any possibility of exporting the database script alone to single file.
    The script should contain all table structures,procedures ,funtions,packages etc and not the data in the table.

    With few tools it is possible to done through a gui with user interaction.
    My problem is whether the same can be done from the command prompt...

    Thanx in advance..

  2. #2
    Join Date
    Nov 2002
    exp <usr>/<pwd>@SID rows=n

  3. #3
    Join Date
    Sep 2003
    Virginia, USA
    If you want the output to be a binary (non editable) file stored in a proprietary format, please use Oracle's export utility.

    If you want the output to be a plain text file that you can open in any editor, don't use Oracle's export. Oracle 10g has a metadata package. In older releases, you need a set of custom code to do the job. See Oracle Technology Network ( Such code is also found on various Oracle user forums that allow pinning of sample code.
    Author, Oracle Database 10g: From Nuts to Soup

  4. #4
    Join Date
    Dec 2003
    Oklahoma, USA

    This might help

    This will be the long way around, but it will work...

    First: exp full=Y rows=N statistics=NONE file=full.dmp
    Second: imp file=full.dmp show=Y full=Y log=db.log

    First part, exports the entire database to the full.dmp file without rows; statistics=NONE will avoid warnings of "questionable statistics", plus it avoids having to export more than necessary.

    Second part, using import, simply shows (show=Y) what would execute if you to really imported the full.dmp file. The log=db.log will capture everything that is about to fly by on the screen. From this log file, you will have extra information displayed, but all of the objects will be there, plus the "CREATE" script used to create the object. Be aware, this will also output procedures/functions/packages -- and since most of the Oracle packages are "wrapped", when they print out, you will see what looks like streams of hexidecimal code. This is completely normal.

    Best of luck!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts