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

Thread: controlfile to trace

  1. #1
    Join Date
    Feb 2003
    Location
    Tehran/Iran
    Posts
    94

    controlfile to trace

    Dear all,
    Backing up the controlfile as following works well:
    alter database backup controlfile to 'control01.bkp'

    Backing up the controlfile to text file trace doesn't work:
    alter database backup controlfile to trace;

    There is no trace file after issuing the the above command.

    Do you have any idea what can be wrong.

    Regards
    Hamid

  2. #2
    Join Date
    Jul 2002
    Location
    California
    Posts
    128
    Where are you looking for the trace file?

    The trace file will be in the udump destination...
    alapps

    Fast, Cheap, Reliable... Pick Two(2)

  3. #3
    Join Date
    Feb 2003
    Location
    Tehran/Iran
    Posts
    94
    Thanks,
    I searched in all subdirectories under the $ORACLE_HOME , and couldn't find any trace file by using unix command:
    find $ORACLE/HOME -name trace

    Thanks
    Hamid

  4. #4
    Join Date
    Jan 2003
    Posts
    78
    The trace file is located in the location specified by the USER_DUMP_DEST initialization parameter. The file name is something like this:

    ora_xxxxxx.trc

    When you searched for trace file you looked for file named trace and that is not correct. Go to user_dump_dest directory and use following command to get trace file name in which you will find create controlfile command:

    grep "CREATE CONTROLFILE" *.trc

    Hope this helps.
    HTH.
    Shripad Godbole
    OCP DBA (8,8i,9i)

    "Let's document it and call it a feature."

  5. #5
    Join Date
    Feb 2003
    Location
    Tehran/Iran
    Posts
    94
    Thanks,
    The udump contains the file.
    Last but leat:
    Do ypu know how to recreate the controlfile from the trace file.

    //Hamid
    Last edited by hamhey; 03-02-2003 at 03:50 AM.

  6. #6
    Join Date
    Jan 2003
    Posts
    78
    You then edit the trace file to create a script that creates a new control file based on the control file that was current when you generated the trace file.
    HTH.
    Shripad Godbole
    OCP DBA (8,8i,9i)

    "Let's document it and call it a feature."

  7. #7
    Join Date
    Feb 2003
    Posts
    40
    Editing means ..remove all the unwanted lines and store only the statements starting with " CREATE CONTROLFILE ...DATAFILE ...;'
    and save it in a name say recreate_ctl.sql

    Start the database in nomount stage
    ie after just instance is started
    run recreate_ctl.sql

    Controlfile gets recreated.
    Open the Database.

    Instead of doing step by step U can save from "startup nomount ...
    alter database open " and execute it at a stretch.

    But I prefer to go stage by stage..

    Be careful in doing so (like not missing any datafile ...etc) as U are recreating controlfile itself

    cheers
    K.Chithra
    Oracle DBA

  8. #8
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796
    Amar
    "There is a difference between knowing the path and walking the path."

    Amar's Blog  Get Firefox!

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