Enabling media recovery in 10g
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Enabling media recovery in 10g

  1. #1
    Join Date
    Nov 2006
    Posts
    158

    Enabling media recovery in 10g

    Hi All,

    I'm trying to understand the functionality of the "alter database begin backup" command in 10g. When i issue this command with a test database, i get the following error: ORA-01123: cannot start online backup; media recovery not enabled.

    How do i enable media recovery?

    Thanks in advance for your help!

  2. #2
    Join Date
    Jan 2001
    Posts
    2,828
    Hi

    I would suggest you read the oracle concepts guide.

    regards
    Hrishy

  3. #3
    Join Date
    Aug 2007
    Posts
    14
    To enable archivelog mode so that Oracle saves the old redo logs to disk after a log switch before overwriting them when it cycles back around, perform the following commands. Oracle requires at least two redo logs (log groups) in order to accommodate possible archiving, since one could be being spooled during archiving to the archivelogs directory while changes currently being made to the database are being written to the other by the log writer.

    $ vi $ORACLE_HOME/dbs/initPROD.ora
    Edit init.ora file to contain the archive parameters (directory name and file format and the start flag):
    log_archive_dest = /u01/oradata/PROD/archivelogs/
    log_archive_format = arch_PROD_%S.arc
    log_archive_start = true
    ("archive log start" can also be used when connected as sysdba to start the arch process, if you don't want it automatically done through init.ora; but, neither of these turn on archivelog mode - they just start the arch process itself.)
    $ mkdir /u01/oradata/PROD/archivelogs
    $ sqlplus "/ as sysdba"
    SQL> shutdown immediate
    SQL> startup mount
    SQL> alter database archivelog;
    Turns on archivelog mode for the database.
    SQL> alter database open;
    SQL> archive log list
    Shows that you are now in archivelog mode, that archiving is enabled, and shows you the current log sequence numbers. You can "alter system switch logfile;" a few times to see archivelog files going into the log_archive_dest directory.
    SQL> select * from v$database;
    Also shows that you are in archivelog mode.

  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    Quote Originally Posted by Kailash Chandra
    To enable archivelog mode so that Oracle saves the old redo logs to disk after a log switch before overwriting them when it cycles back around, perform the following commands. Oracle requires at least two redo logs (log groups) in order to accommodate possible archiving, since one could be being spooled during archiving to the archivelogs directory while changes currently being made to the database are being written to the other by the log writer.

    $ vi $ORACLE_HOME/dbs/initPROD.ora
    Edit init.ora file to contain the archive parameters (directory name and file format and the start flag):
    log_archive_dest = /u01/oradata/PROD/archivelogs/
    log_archive_format = arch_PROD_%S.arc
    log_archive_start = true
    ("archive log start" can also be used when connected as sysdba to start the arch process, if you don't want it automatically done through init.ora; but, neither of these turn on archivelog mode - they just start the arch process itself.)
    $ mkdir /u01/oradata/PROD/archivelogs
    $ sqlplus "/ as sysdba"
    SQL> shutdown immediate
    SQL> startup mount
    SQL> alter database archivelog;
    Turns on archivelog mode for the database.
    SQL> alter database open;
    SQL> archive log list
    Shows that you are now in archivelog mode, that archiving is enabled, and shows you the current log sequence numbers. You can "alter system switch logfile;" a few times to see archivelog files going into the log_archive_dest directory.
    SQL> select * from v$database;
    Also shows that you are in archivelog mode.
    you need to get with the times ad work out what is and what isnt required for a 10g database

    You also he is on some unix systemm not much use if you are on windows is it?

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