After setting the db to archive log mode what to do?

Hi All,
We have a database which is being used as production database since one week and running in NoArchive Log mode. Now i wanted to change that to Archive Log mode because i want to take hot backup using RMAN daily/weekly. My doubt is..after changing the db to Archive Log mode, can i take backup using RMAN (i got a RMAN script to take a hot backup of db)? which will contain all the backup with control files and spfiles? or do i have to do anything before taking hotbackup.
Thanks,
Praveen.

Yes you are fine. BTW, how many archive destinations did you configure.
Usually it is more than 1 on two different Disks.
TEST CASE:
NOARCHIVELOG Database
Change it ARCHIVELOG
Take a hot backup and try to restore/recover it.
STATUS=SUCCES
Can someone explain this to me please:-
Ensure DB in noarchivelog mode
SQL> archive log list
Database log mode No Archive Mode
SQL> startup mount;
SQL> alter database archivelog;
SQL> alter database open;
-- DID Not take a COLD BACKUP
-- Right after switching the mode I am taking hot backup
RMAN> backup incremental level=0 database ;
RMAN> backup archivelog all delete all input;
Nuke the datafiles
RMAN> SET DBID=1299283748;
RMAN> restore controlfile from autobackup;
run
set until logseq=79 ;
restore database;
recover database;
sql 'alter database open resetlogs';
Database is opened restored / recovered?
I totally agree we should take a cold backup right after switching the mode. Can someone explain the above though.
Message was edited by:
gopalora

Similar Messages

  • Changing archive log mode without shutting down database

    Hi all,
    Is there any way to set the database to archive log mode before shutting down the database and when the database shuts and starts, the database should be automatically in archive log mode?
    because we can not shutdown the database in weekdays and we have system reboot on weekend and we are not here on that day. So is there a way to set the database in archive log at the memory level so that when the database reboots, it should automatically start in archive log mode.
    my environment is windows server 2008 R2 with oracle 11.2.0.3
    Thanks in advance.
    Edited by: 931643 on Dec 5, 2012 10:37 AM

    931643 wrote:
    thank you for the reply Max Seleznev,
    First I thought of writing script in order to include in that process. But we can not run any commands in the sqlplus using the windows jobs. for eg:
    you can write a batch file as below:
    cd \
    sqlplus / as sysdba
    select name,open_mode from v$database;
    when you run this, it will open until sqlplus prompt but then will not execute the query.
    What did you expect? Well, actually, I know what you expected. But think about it for a second. You have a batch file with the mentioned three lines. How does that batch file get processed .. what is happening when it is being processed?
    It is not being processed by sqlplus, it is being processed by the windows command processor. Just like the cmd.exe. Each line is read by the command processor and executed accordingly. So ....
    cd \the command processor calls 'cd' , and passes the value '\' to do with as it sees fit. 'cd' then changes the current directory of the session to whatever is indicated by the passed parameter. in this case, that value is '\' , so the resulting current directory is the base (root, in *nix terms) of the current drive.  When 'cd' has finished, it returns control to the command processor, who then reads the next line ....
    sqlplus / as sysdbathe command processor calls sqlplus.exe and passes it the command line parms '/ as sysdba' to do with as it (sqlplus) sees fit. sqlplus does whatever it does with what it has been given In this case it tries to connect to whatever local database is indicated by the value of ORACLE_SID, then waits for more input. Whenever sqlplus exits (how does it know to exit?) it returns control to the command processor, who then reads the next line ....
    select name,open_mode from v$database;The command processor will read this line and attempt to find an executable file named 'select' and pass it the rest of the command line 'name,open_mode from v$database;'
    Hmm, what do you suppose will happen with that operation?
    that is the reason I am figuring out whether there is an alternate way.yes but you have to use the proper technique. And since you are building this into a production stop/start without testing the actual stop/start commands ... what do you suppose will be the outcome if something goes wrong?
    After hours and weekend work is one reason DBA's make more money than developers.
    >
    Thanks

  • Archive log mode doubt

    Hi All,
    We have 10g R2 database running on RHEL 4 OS. In order to set the archive log mode for the database, if we set only log_archive_dest_n parameter is only enough or we have to set db_recovery_file_dest_size and db_recovery_file_dest also? i know that these 2 parameters are required to configure the flash_recovery_area. my doubt is whether, do we need to set flash_recovery_area parameters and log_archive_dest_n parameters to take backup of databases or set only the log_archive_dest_n parameter and enable archive log mode and take backup using RMAN?
    Thanks,
    Praveen.

    Hi,
    To use RMAN to take a hot backup you need only set LOG_ARCHIVE_DEST_n and place the database in archive log mode. RMAN can be used to backup changed data even after a nologging operation, and you can move away from archivelog mode.
    http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10726/configbp.htm
    There is also the new "block change tracking" B&R that does not need archivelog mode:
    http://www.dba-oracle.com/t_block_change_tracking.htm

  • Switching database to archive log mode

    1.When I switch the database to archive log mode,
    I have to do full offline(consistent) backup.
    2.When the database is working in archive log mode
    I can do inconsistent(online) backups.
    Why is there consistent backup needed after swiching
    to archive log mode, is there not inconsistent backup
    enough after switching (the databease operates
    in archive log mode and as in point 2 I can make inconsistent backups).

    Hello,
    Oracle recommands to do offline backup after switching to archivelog as an immediate crash-recovery procedure. Look at the following example:
    1/ You switch your base to archivelog.
    2/ Work is started right away.
    3/ Your DB crashes => You got your archived redo logs, but none of the other files.
    Now, let's put a
    1b/ Backup (offline) your database.
    Now, in 3, youg got everything you need to restore the base, because 3 can happen WHILE your are ONLINE Backing up the base.
    That's the point.
    Regards,
    Yoann.

  • Is the only way to import large amount of data and database objects into a primary database is to shutdown the standby, turn off archive log mode, do the import, then rebuild the standby?

    I have a primary database that need to import large amount of data and database objects. 1.) Do I shutdown the standby? 2.) Turn off archive log mode? 3.) Perform the import? 4.) Rebuild the standby? or is there a better way or best practice?

    Instead of rebuilding the (whole) standby, you take an incremental (from SCN) backup from the Primary and restore it on the Standby.  That way, if, for example
    a. Only two out of 12 tablespaces are affected by the import, the incremental backup would effectively be only the blocks changed in those two tablespaces (and some other changes in system and undo) {provided that there are no other changes in the other ten tablespaces}
    b. if the size of the import is only 15% of the database, the incremental backup to restore to the standby is small
    Hemant K Chitale

  • Archive log mode in oracle 10g

    Hi,
    I would like to know the archive log mode in oracle 10g and I use this code in SQLPlus
    select log_mode from v$database
    But it displayed: "2" not : NOARCHIVELOG or ARCHIVELOG
    It displayed a number, not a String.
    How could I know this?
    Thanks

    Hi Paul
    Because I am a newbie in DBA Oracle so I got many difficulties.
    You are very kind to help me.
    So I have some more questions:
    1. when I executed this code, it always reported error:
    $ tmp=`${ORACLE_HOME}/bin/sqlplus -s / as sysdba << EOF
    set heading off feedback off;
    exit
    EOF`
    tmp='ERROR:
    ORA-01031: insufficient privileges
    SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] | /
    SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] | /
    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus'
    so when I updated like this:
    tmp=`${ORACLE_HOME}/bin/sqlplus -s sys/syspass@db02 as sysdba <<EOF     
                   set heading off feedback off;
                   exit
                   EOF`
    It run correctly.
    2. With Paul's guide:
    Do not execute Oracle commands from root, execute them as oracle user. This works to me :
    $ tmp=`${ORACLE_HOME}/bin/sqlplus -s / as sysdba << EOF
    set heading off feedback off
    alter database backup controlfile to '${CONTROLFILE_DIR}/<file name>';
    alter database backup controlfile to trace;
    exit
    EOF`
    Of course CONTROLFILE_DIR must be set to a directory with write permission for oracle user.
    For ex: I have an Unix account: unix/unix
    and a Sys Oracle account: oracle/oracle
    I login with Unix acount (unix/unix) and call script file that contains above code.
    tmp=`${ORACLE_HOME}/bin/sqlplus -s oracle/oracle@db02 as sysdba <<EOF     
                   set heading off feedback off
                   alter database backup controlfile to '${CONTROLFILE_DIR}/backup_control.ctl';
                   alter database backup controlfile to trace;
                   exit
                   EOF`
    Unix report as following: Linux error: 13: Permission denied.
    CONTROLFILE_DIR directory is read,write,execute for account unix/unix.
    Of course CONTROLFILE_DIR must be set to a directory with write permission for oracle user. You mean I have to create a Unix user is the same to Oracle user so that Oracle user can have permission to write.
    Please guilde more detail.
    Thanks for your attention.
    Message was edited by:
    user481034

  • Disabling Log_Archive_Start in Archive Log Mode

    Guys,
    I have a Database running in Archive Log mode.
    I have a situation where in I have to do bunch of bulk updates for which I dont want any logs generated.
    sO I was thinking to set the intialization parameter log_archive_start to false before I run the DML updates
    ALTER SYSTEM SET log_archive_start = false
    after the DML is run I will turn it back on
    ALTER SYSTEM SET log_archive_start = True
    Do you think if this is the right to go about or would I have to switch from Archive Log Mode to No Archive Log Mode
    run the DML update and then switch back to Archive Log Mode
    Any comments/suggestions/inputs woo

    Hello,
    I would use some other way to get a full nologing behaviour.
    First, ensure your tablespace is in force logging mode.
    ALTER TABLESPACE data FORCE LOGGING NOLOGGING;
    ALTER TABLESPACE index FORCE LOGGING NOLOGGING;
    This will ensure that you're usually logging.
    Set all tables/indexes to be nologging
    BEGIN
    FOR vRes IN (SELECT OWNER,TABLE_NAME FROM DBA_TABLES WHERE TABLESPACE_NAME='data')
    LOOP
    EXECUTE IMMEDIATE 'ALTER TABLE ' || vRes.OWNER || '.' || vRes.TABLE_NAME ' NOLOGGING';
    END LOOP;
    END;
    Do even for indexes.
    From now on, when you want to do your huge amount of updates/... targetting objects in tablespaces data and index, jou just have to:
    ALTER TABLESPACE data NO FORCE LOGGING;
    ALTER TABLESPACE indexes NO FORCE LOGGING;
    - Your DML
    ALTER TABLESPACE data FORCE LOGGING;
    ALTER TABLESPACE indexes FORCE LOGGING.
    4 commands to disable logging for every object in the tablespace.
    Beware, when in NOLOGGING mode, you won't be able to "RECOVER" any of the tables. Thiis is not crash-friendly, but you'll have no redo info generated, which is what you require.
    Regards,
    Yoann.

  • Archive log mode required for async. CDC?

    Hello there,
    I have tried to set up asyn. HotLog CDC on my 10g database but after creating a publisher I get the following error Message when creating a change set with the publisher:
    BEGIN
    DBMS_CDC_PUBLISH.CREATE_CHANGE_SET(
    change_set_name => 'MY_CHANGESET',
    description => 'First Change set',
    change_source_name => 'HOTLOG_SOURCE',
    stop_on_ddl => 'y',
    begin_date => sysdate,
    end_date => sysdate+20);
    END;
    following Error-Message:
    BEGIN
    ERROR at line 1:
    ORA-00258: manual archiving in NOARCHIVELOG mode must identify log
    ORA-06512: at "SYS.DBMS_CAPTURE_ADM_INTERNAL", line 115
    ORA-06512: at line 1
    ORA-06512: at "SYS.DBMS_CDC_PUBLISH", line 57
    ORA-06512: at line 2
    Does this mean that I have to activate the ARCHIVE LOG-mode, and if yes, how do I do this with the Enterprise Manager?
    I already set the LOG_ARCHIVE_START initparam to "true".
    Klaus

    To place a database in archivelog mode you must:
    Be sure that the log_archive_start and log_archive_dest
    parameters are set in the init file.
    Shut the instance down.
    startup mount;
    alter database archivelog;
    alter database open;

  • Standby Database (Archive Log Mode)

    I'm going to be setting up a standby database.
    I understand that the primary database must be in archive log mode.
    Is there any reason for the standby database to be in archivelog mode?

    Since your primary Db is in archive log mode, so will be your standby, when it is made primary.But. you can use STANDBY REDO LOGS from 9i version, where these Standby Redo Logs then store the information received from the Primary Database.
    As per metalink:-
    >
    Standby Redo Logs are only supported for the Physical Standby Database in Oracle 9i and as well for Logical Standby Databases in 10g. Standby Redo Logs are only used if you have the LGWR activated for archival to the Remote Standby Database.If you have Standby Redo Logs, the RFS process will write into the Standby RedoLog as mentioned above and when a log switch occurs, the Archiver Process of the Standby Database will archive this Standby Redo Log to an Archived Redo Log, while the MRP process applies the information to the Standby Database. In a Failover situation, you will also have access to the information already written in the Standby Redo Logs, so the information will not be lost.
    >
    Check metalink Doc ID: Note:219344.1
    Regards,
    Anand

  • Question about import in archive log mode

    Hello.
    I am a developer, I have ordered to write a script that makes the import of a schema of a database (release 9.2.0.7). That import will be done once a day. I have seen that in my development environment the import creates 54 archivers files (10M aprox. each), that means more that half a Gb a day, it seems too much to me.
    I cannot see why all those archivers can be useful. Would a good way of proceeding the following?
    1. Forcing an archiver just before the import (I do not know how to do that) so that a backup could be done to the state before the import.
    2. Disabling archive log mode during the import and enabling it just after the import (I do not know how to do that).
    3. Forcing a new archiver just after the import (I do not know how to do that).
    Thanks in advance.

    540M is not that much.
    One would question why you need to import every day,
    there must be better ways to do this.
    The three steps you propose look like an awful
    scenario, as it would require the database to switch
    from archivelog to noarchivelog and vice versa.
    This would require the database to close twice a
    day.
    The scenario is also incomplete as one would need to
    take a backup after the import
    If you can convince your DBA to close the database
    twice a day, he should write the script, which he can
    easily derive from the docs.
    But likely he will visit Billy Verreynne to borrow
    his lead pipe, and rightly so ;)
    Sybrand Bakker
    Senior Oracle DBAThanks for the answer.
    A few things:
    - Sorry for my ignorance, I have no experience in database backups, I do not understand why I need to backup just after the import.
    - That database is not critical, it is just for a team who will test on that database several applications, so the database will only need to be open during the office schedule.
    - I have no dba. The client has a dba for several databases but I have no contact with him/her nor my boss has.

  • Physical standby in archive log mode

    HI ,
    Our phyiscal standby database is running in archive log mode,
    1.Is it manadatory to have it in archive log mode ?
    2.As it is in archive log mode , does it produce any archivelog ?

    Hello again;
    The Standby is a clone of the Primary. I assume we are talking Physical Standby.
    Why does it need to produce archive in standby role?Its does not produce archive in the Standby role. I have seen a Standby produce a log now and then, but not log after log like a primary. A Standby database does not write Redo or use Redo logs, it uses Standby Redo logs. Since Redo logs are not used, archive is not written.
    Why it is manadatory to enable archive log in standby?Smart design I'm thinking. Why would Oracle make us add this complex step to a failover/switchover?
    Keep it simple if possible.
    Data Guard Concepts and Administration 11g Release 2 (11.2) E10700-02
    Database Concepts
    http://docs.oracle.com/cd/E11882_01/server.112/e25789/process.htm
    Best Regards
    mseberg

  • Archive log mode

    Hi
    i m using oracle 10gR2 after installation i enable the archive log mode.
    1) How can i determine the size of archive log?
    2)When i enable the archive log mode after switch it genrate the second archive (01_MF_1_2_43.ARC) instead of first (01_MF_1_1_43.ARC) why?
    Thanks

    The size of archived logs will normally be the same as the size of online redo logs. However, if you switch the logs before the get filled with redo, the size of archived log will be smaller depending in the amount of redo.

  • Archive log mode  in 3 node rac database

    Sir I am using oracle 10.2.0.1 and created 3 node cluster setup on.OS i am using linux 4
    I am too much confuse in setting up this cluster in archive log mode bec why we need to false cluater_database parameter to setup cluster in archive log mode.
    I have search lot of documents but all are saying we not need setting this parameter flase perior to 10.2.But what is the actual concept behind setting this parameter to false in early release and why we need not to set it false.Please help me.
    I know how to set up in archive log mode but this parameter create confusion.
    Thanks sir in advance

    I also dont't know all the details about this but I'll try to explain what I know. Setting cluster_database to false in a rac environment is usually done when you need to mount the database from one instance exclusively. This is still needed when you upgrade the catalog, for example during release update (from 10.2.0.1 to 10.2.0.4 for example). Now with switching archivelog mode someone at oracle must have discovered that it is sufficient when the database is mounted by only one instance and you can actually save one step.
    As I (and propably most of you) don't switch archiving on or off on a daily basis, I don't worry about this a lot, simply turn this on when I create a new database and then leave it on forever.
    Bjoern

  • SGEN & database archive log mode

    Hi Experts,
    To apply ABAP support packs, I disabled archive log mode of databse and successfully applied support packs.
    As post processing, I kicked off SGEN.
    Is it required that database be in "NO Archive log mode"  while SGEN is running or can I enable it.
    Thanks
    Putla

    Not sure what database it is.. but if it is ORACLE...
    $sqlplus / as sysdba
    SQL> shutdown immediate;
    SQL> startup mount;
    SQL> Alter database noarchivelog;
    SQL> alter database open;
    After the completion of SGEN.....
    $sqlplus / as sysdba
    SQL> shutdown immediate;
    SQL> alter database mount;
    SQL> alter database archivelog;
    SQL> alter database open;

  • When creating a tablespace why should we enable LOGGING when a database is already on ARCHIVE LOG mode

    Question :
    When creating a tablespace why should we enable LOGGING when a database is already on ARCHIVE LOG mode ?
    Example:
    Create Tablespace
    CREATE SMALLFILE TABLESPACE "TEST_DATA"
    LOGGING
    DATAFILE '+DG_TEST_DATA_01(DATAFILE)' SIZE 10G
    AUTOEXTEND ON NEXT  500K MAXSIZE 31000M
    EXTENT MANAGEMENT LOCAL
    SEGMENT SPACE MANAGEMENT AUTO;
    LOGGING: Generate redo logs for creation of tables, indexes and  partitions, and for subsequent inserts. Recoverable
    Are they not logged and not recoverable if we do not enable LOGGING? What is that ARCHIVELOG mode does?

    What is that ARCHIVELOG Mode Does?
    Whenever your database is in archive log mode , Oracle will backup the redo log files in the form of Archives so that we can recover the database to the consistent state in case of any failure.
    Archive logging is essential for production databases where the loss of a transaction might be fatal.
    Why Logging?
    Logging is safest method to ensure that all the changes made at the tablespace will be captured and available for recovery in the redo logs.
    It is just the level at which we defines:
    Force Logging at DB level
    Logging at Tablespace Level
    Logging at schema Level
    Before the existence of FORCE LOGGING, Oracle provided logging and nologging options. These two options have higher precedence at the schema object level than the tablespace level; therefore, it was possible to override the logging settings at the tablespace level with nologging setting at schema object level.

Maybe you are looking for

  • Hand made or generated GUI code, what do proffesional use?

    Hello! I am currious about what programs people that work as a programmer use? Is it common that they use programs that generats code like Netbeens for instance? I tryed that program in design mode to make a gui, but when I looked at the code it had

  • Error when trying to export images from LR5 to Photoshop CC

    When I try to export an image without LR adjustments (original or copy) from LR5 to Photoshop CC, I get this message: "Adobe Photoshop CC cannot be opened because of a problem. Check with the developer to make sure Adobe Photoshop CC works with this

  • Problems installing Lightroom 4.4 on Windows 7 Ultimat 64bit

    Hi everyone, I have probplems installing Lightroom 4.4 on Windows 7 Ultimate 64bit and hope somebody can help me. By the way: Lightromm 4.3 is still working fine. Installation fails with the meassage "Fehler beim Lesen von Datei: C:\Users\Markus\AppD

  • OCR capabilities in Adobe Reader

    My old computer crashed.  I have a new Windows 8 machine.  I've loaded Adobe Reader XI.  My printer is and Epson Workforce 840.  My old Windows 7 machine would scan a document and allow me select text from the scan.  I can't figure out how to do this

  • Download failure for pages, keynote and numbers

    Can anyone help me? I was having a very tough time updating pages, numbers and keynote under Mavericks - so, I upgraded to Yosemite. Then I had a very tough time upgrading to Yosemite - now finally done.   And again, I receive the messages "Numbers/P