Alter database clear unarchived logfile group... who, what?

I am the sole DBA for our site, all of them running RHEL 5, Oracle 11.2.0.3.
I recently (within the last hour), received a text message from one of our databases that poll the alert.log...
ORA-1031 signalled during: ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 3
Unfortunately, the 'audit database' was not enabled (it is now!), and the trace file generated did not contain anything of use.
I know someone has been loading data since 1:30pm up until near the time I received this text, and I'm wondering if he is mucking in the system, or if this command can somehow be generated automatically by Oracle. If so, I certainly wouldn't expect an ORA-1031insufficient permissions error....
I checked my v$log, v$logfile, and did a log switch just to check if any possibility of redo log corruption, but all looks fine.
Has anyone else ever had random Oracle errors like this?....

Hi,
That's someone manually doing something when they really don't know what they are doing. I've only had to run that command once in 16 years as a dba. Oracle wouldn't ever run that itself.
Cheers,
Harry

Similar Messages

  • ALTER DATABASE ADD STANDBY LOGFILE GROUP

    version 10 & 11g
    creating standby logfile groups on primary db is optional or needed? what could be advantages of both?
    I am reading 2 articles one is creating that other not?
    http://www.orafaq.com/node/2030
    & 736863.1 Notes

    DBA2008 wrote:
    version 10 & 11g
    creating standby logfile groups on primary db is optional or needed? what could be advantages of both? at primary database it is optional ,but it would be good candidate for switchover activity , it makes ensure that if you make any planned maintenance activity at primary site and switchover within yours data guard environment from primary database to physcial standby database ,if you create standby redo log at primary database it is not in use right now but it will be used when yours primary database switch to standby database after switching to physical standby databsae as a primary database.
    Khurram

  • ORA-1624 signalled during: ALTER DATABASE CLEAR....

    Hi,
    I get this error in my alert file what it means?
    ORA-1624 signalled during: ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 1...
    Thanks
    Edited by: vittel on Sep 3, 2008 1:28 PM
    Edited by: vittel on Sep 3, 2008 1:29 PM

    Hi,
    First thanks for your quick response.
    The only thing that we have running in the database is a scheduled program how run every 3 min to switch the current log and he applied the archive log to the standby database!!!
    It can be a session how is trying to do this "Alter database clear unarchived logfile...." ?
    Thanks

  • I missed to add Standby Logfile groups? What now?

    Hi there
    I have created a Standby database in a test environment using RMAN   (followed the procedure given here -> URL:  Creating a Standby Database with Recovery Manager).
    When I tried to start the recovery on Standby, I got the following error:
    [code]
    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT
    ERROR at line 1:
    ORA-38500: USING CURRENT LOGFILE option not available without stand
    SQL> select NAME, OPEN_MODE, GUARD_STATUS, DATABASE_ROLE from v$database;
    NAME      OPEN_MODE  GUARD_S DATABASE_ROLE
    PRIM      MOUNTED    NONE    PHYSICAL STANDBY
    SQL>
    [/code]
    I missed the step to add standby logfile groups. Do I need to recreate the Standby database now? I mean, add standby logfile groups to Primary, then take full RMAN backup and recreate the standby database (following the procedure described in the URL above)?
    I am using Oracle 10gR2 on OEL 5.8.
    Please advise!
    Best regards

    OK thank you both - I have added the standby logfile groups both on Primary and Standby (mounted) database and I was able to successfully issue the following command:
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
    I hope this was the right thing to do under the circumstances, right?
    And now there seems to be a gap:
    PRIM_SQL> SELECT MAX(SEQUENCE#) FROM V$ARCHIVED_LOG;
    MAX(SEQUENCE#)
                11
    STDBY_SQL> SELECT MAX(SEQUENCE#) FROM V$LOG_HISTORY;
    MAX(SEQUENCE#)
                 9
    I issued "alter system switch logfile" few times on the Primary but logs don't seem to be shipping? How to check this and fix?
    EDIT: OK I checked the Primary alert log file and see following messages:
    Error 1031 received logging on to the standby
    Tue Jun 25 15:22:43 2013
    Errors in file /u01/app/oracle/admin/prim/bdump/prim_arc0_6880.trc:
    ORA-01031: insufficient privileges
    PING[ARC0]: Heartbeat failed to connect to standby 'stan'. Error is 1031.
    Tue Jun 25 15:27:43 2013
    Error 1031 received logging on to the standby
    Tue Jun 25 15:27:43 2013
    Errors in file /u01/app/oracle/admin/prim/bdump/prim_arc0_6880.trc:
    ORA-01031: insufficient privileges
    PING[ARC0]: Heartbeat failed to connect to standby 'stan'. Error is 1031.
    Tue Jun 25 15:32:43 2013
    I do have password file both on Primary and Standby servers. What is this "ORA-01031: insufficient privileges" referring to?
    EDIT#2:
    I copied the password file from Primary DB server to Standby server (with same name "orapwprim" - previously I used "orapwstan" name for standby password file) and the "login issue" is resolved. But now I see following error in the alert log file on Primary:
    PING[ARC0]: Heartbeat failed to connect to standby 'stan'. Error is 1031.
    Tue Jun 25 15:48:08 2013
    ARCH: Possible network disconnect with primary database
    Any clues here?
    EDIT#3:
    Sorry I was a bit impatient I guess.The logs a re being shipped and applied now.
    Thank you both!
    Best regards
    Message was edited by: user130038 (added alert log file info)
    Message was edited by: user130038 (Added EDIT#2)
    Message was edited by: user130038 (added EDIT#3)

  • ORA-01184: logfile group 1 already exists

    After startup nomount, I try to create database as follows:
    CREATE DATABASE SISDEV04
         LOGFILE GROUP 1 '/sisdev04/dbs/log01a.dbf'
    SIZE 10M
         ,     GROUP 1 '/sisdev04/dbs/log01b.dbf'
    SIZE 10M
         ,     GROUP 2 '/sisdev04/dbs/log02a.dbf'
    SIZE 10M
         ,     GROUP 2 '/sisdev04/dbs/log02b.dbf'
    SIZE 10M
         NOARCHIVELOG
         CHARACTER SET ZHT16BIG5
         NATIONAL CHARACTER SET ZHT16BIG5
         DATAFILE '/sisdev04/dbs/system01.dbf'      
              SIZE 210M AUTOEXTEND OFF
         , '/sisdev04/dbs/rbs01.dbf'
    SIZE 105M AUTOEXTEND OFF
         , '/sisdev04/dbs/temp01.dbf'
    SIZE 105M AUTOEXTEND OFF
         , '/sisdev04/dbs/users01.dbf'
    SIZE 1050M AUTOEXTEND OFF
         , '/sisdev04/dbs/ts_index_ivr01.dbf'
    SIZE 105M AUTOEXTEND OFF
         , '/sisdev04/dbs/ts_ivr01.dbf'
    SIZE 21M AUTOEXTEND OFF
         , '/sisdev04/dbs/ts_ems01.dbf'
    SIZE 21M AUTOEXTEND OFF
         , '/sisdev04/dbs/ts_index_ems01.dbf'
    SIZE 21M AUTOEXTEND OFF
    However, I receive such error:
    ORA-01501: CREATE DATABASE failed
    ORA-01184: logfile group 1 already exists
    I have checked that there is no files in '/sisdev04/dbs/' before I issue the command, what can I do?

    Hello...
    Excuse me..
    May be I have same problem..
    I use Oracle Streams to replicate table in one to another database. While i configure setup replication occur this errror.
    How to resolve this problem i have?
    SQL> SQL> Connecting to source database as STRMADMIN
    SQL> Executing ..
    SQL> connect STRMADMIN/******
    SQL> Connected.
    SQL> SQL> SQL> Executing ..
    SQL> DROP DATABASE LINK DBSTG
    SQL>
    Database link dropped.
    SQL> SQL> Executing ..
    SQL> CREATE DATABASE LINK DBSTG connect to strmadmin identified by ****** using '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.4.10.21)(PORT=1521)))(CONNECT_DATA=(SID=dbstg)(server=DEDICATED)))'
    SQL>
    Database link created.
    SQL> Executing ..
    SQL> ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(dbstg,dbsd)' scope=both
    SQL>
    System altered.
    SQL> Executing ..
    SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_3='SERVICE="(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.4.10.21)(PORT=1521)))(CONNECT_DATA=(SID=dbstg)(server=DEDICATED)))" ASYNC NOREGISTER VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=dbstg' scope=both
    SQL>
    System altered.
    SQL> Executing ..
    SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_3=DEFER scope=both
    SQL>
    System altered.
    SQL> CONNECT TO DOWNSTREAM DB AND SETUP LOG PARAMS
    SQL> Executing ..
    SQL> connect strmadmin/******@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.4.10.21)(PORT=1521)))(CONNECT_DATA=(SID=dbstg)(server=DEDICATED)))
    SQL> Connected.
    SQL> SQL> Executing ..
    SQL> DROP DATABASE LINK DBSD
    SQL>
    Database link dropped.
    SQL> SQL> SQL> Executing ..
    SQL> CREATE DATABASE LINK DBSD connect to STRMADMIN identified by ****** using '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=t0031)(PORT=1521)))(CONNECT_DATA=(SID=dbsd)(server=DEDICATED)))'
    SQL>
    Database link created.
    SQL> Executing ..
    SQL> CREATE OR REPLACE DIRECTORY STANDBY_LOG_LOC AS '/u01/app/oracle/admin/dbstg/srl_dbsd/'
    SQL>
    Directory created.
    SQL> 1* CREATE OR REPLACE DIRECTORY STANDBY_LOG_LOC AS '/u01/app/oracle/admin/dbstg/srl_dbsd/'
    SQL> Executing ..
    SQL> ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(dbstg,dbsd)' scope=both
    SQL>
    System altered.
    SQL> Executing ..
    SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_3=ENABLE scope=both
    SQL>
    System altered.
    SQL> Executing ..
    SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_3='LOCATION=/u01/app/oracle/admin/dbstg/srl_dbsd/ VALID_FOR=(STANDBY_LOGFILE,PRIMARY_ROLE)'scope=both
    SQL>
    System altered.
    SQL> Executing ..
    SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 ('/u01/app/oracle/admin/dbstg/srl_dbsd/log4a.rdo', '/u01/app/oracle/admin/dbstg/srl_dbsd/slog4b.rdo') SIZE 104857600
    SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 ('/u01/app/oracle/admin/dbstg/srl_dbsd/log4a.rdo', '/u01/app/oracle/admin/dbstg/srl_dbsd/slog4b.rdo') SIZE 104857600
    ERROR at line 1:
    ORA-01184: logfile group 4 already exists
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Error from SQLPLUS: 160

  • ORA-301 Signalled during: ALTER DATABASE ...

    Hi,
    I tried to add 4 standby redologs to our standby setup, and first file went well.
    theothers already got error ORA-301:
    ALTER DATABASE ADD STANDBY LOGFILE GROUP 8 '/export/home/oracle/logs/redo8.log' SIZE 2G
    Fri May 31 15:31:22 2013
    Completed: ALTER DATABASE ADD STANDBY LOGFILE GROUP 8 '/export/home/oracle/logs/redo8.log' SIZE 2G
    ALTER DATABASE ADD STANDBY LOGFILE GROUP 9 '/export/home/oracle/logs/redo9.log' SIZE 2G
    ORA-301 signalled during: ALTER DATABASE ADD STANDBY LOGFILE GROUP 9 '/export/home/oracle/logs/redo9.log' SIZE 2G...
    ALTER DATABASE ADD STANDBY LOGFILE GROUP 10 '/export/home/oracle/logs/redo10.log' SIZE 2G
    ORA-301 signalled during: ALTER DATABASE ADD STANDBY LOGFILE GROUP 10 '/export/home/oracle/logs/redo10.log' SIZE 2G...
    ALTER DATABASE ADD STANDBY LOGFILE GROUP 11 '/export/home/oracle/logs/redo11.log' SIZE 2G
    ORA-301 signalled during: ALTER DATABASE ADD STANDBY LOGFILE GROUP 11 '/export/home/oracle/logs/redo11.log' SIZE 2G...
    Fri May 31 16:33:39 2013
    I tried to track any info in the web and metalink, but it's the first time I encounter an ORA error with no documentation... :(
    Some facts:
    The oracle is 11.2.0 on Linux
    There is no space issue on disk
    Thanks for any help/ideas...

    thanks for the reply.
    first one I stated in the original post. there is tons of storage :)
    for the others 2 -
    user has priviledge... he created the first file succesfully...
    those files do not exist on the disk already.
    Thanks

  • Standby db: continue manualluy alter database register logfile

    Hi,
    in my standby db 10.2.0.4, on linux platform, some archive log are not register properly and i need to perform the register logfile manually.
    Which test a can i do to solve this problem?
    Thank you.

    This is my standby alert log:
    -- Connected User is Valid
    RFS[10]: Assigned to RFS process 26620
    RFS[10]: Identified database type as 'physical standby'
    Tue Sep 14 05:05:58 2010
    Errors in file /oracle/admin/orcl/udump/orcl1_rfs_26620.trc:
    ORA-16401: archivelog rejected by RFS
    Redo Shipping Client Connected as PUBLIC
    -- Connected User is Valid
    RFS[11]: Assigned to RFS process 26622
    RFS[11]: Identified database type as 'physical standby'
    Tue Sep 14 05:05:58 2010
    Errors in file /oracle/admin/orcl/udump/orcl1_rfs_26622.trc:
    ORA-16401: archivelog rejected by RFS
    Tue Sep 14 05:06:03 2010
    Media Recovery Log /database/arch/orcl/arc1_16195_326468442.ARC
    Media Recovery Waiting for thread 2 sequence 16536
    Tue Sep 14 05:20:46 2010
    alter database register logfile '/database/arch/orcl/arc2_16536_326468442.ARC'
    Tue Sep 14 05:20:46 2010
    There are 1 logfiles specified.
    ALTER DATABASE REGISTER [PHYSICAL] LOGFILE
    Resynchronizing thread 2 from sequence 16535 to 16536
    Completed: alter database register logfile '/database/arch/orcl/arc2_16536_326468442.ARC'
    Tue Sep 14 05:20:48 2010
    Media Recovery Log /database/arch/orcl/arc2_16536_326468442.ARC
    Tue Sep 14 05:21:07 2010
    Media Recovery Log /database/arch/orcl/arc1_16196_326468442.ARC
    Media Recovery Log /database/arch/orcl/arc1_16197_326468442.ARC
    Media Recovery Log /database/arch/orcl/arc1_16198_326468442.ARC
    Media Recovery Waiting for thread 1 sequence 16199
    Tue Sep 14 05:45:29 2010
    RFS[6]: Archived Log: '/database/arch/orcl/arc1_16199_326468442.ARC'
    Tue Sep 14 05:45:29 2010
    RFS[8]: Archived Log: '/database/arch/orcl/arc1_16200_326468442.ARC'
    Tue Sep 14 05:45:29 2010
    RFS[6]: Archived Log: '/database/arch/orcl/arc1_16201_326468442.ARC'
    Tue Sep 14 05:45:40 2010
    Media Recovery Log /database/arch/orcl/arc1_16199_326468442.ARC
    Media Recovery Waiting for thread 2 sequence 16537
    Tue Sep 14 06:00:05 2010
    alter database register logfile '/database/arch/orcl/arc2_16537_326468442.ARC'
    Tue Sep 14 06:00:05 2010
    There are 1 logfiles specified.
    ALTER DATABASE REGISTER [PHYSICAL] LOGFILE
    alter database register are performed from a scheduled shell script that check log from V$ARCHIVED_LOG

  • ALTER DATABASE SET COMPATIBILTY_LEVEL executes irrespective of IF EXIST condition

    Hi,
    Problem:
    I want to set compatibility_level only when it is greater than 110.
    Solution:
    Select the compatibility level and if it is greater than 110, I alter database set compatibility level=110
    ISSUE
    Irrespective of IF Exist statement the alter database statement is executed all the time.
    Here is the sql statement
    IF EXISTS (
    SELECT * FROM sys.databases where compatibility_level >110 AND name='mydatabase'
    BEGIN
    ALTER DATABASE mydatabase SET COMPATIBILITY_LEVEL = 110
    END
    What is that I am missing here ??
    please support.

    Hi Gokula,
    Based on my tested, the syntax of your query is correct which you can see on the screenshots below.
    When COMPATIBILITY_LEVEL is 120.
    When COMPATIBILITY_LEVEL is 110.
    So in your scenario, please check the current COMPATIBILITY_LEVEL.
    Regards,
    Charlie Liao
    TechNet Community Support

  • What if "ALTER DATABASE OPEN" WORKS WHEN DB IS INCONSISTENT???

    Hello Everyone,
    I heard from couple of friends that in the case of recovery , oracle database opens despite the fact that some of the data files are inconsistent.
    Is this really true? If it is, then i think its a bug with specific Oracle patch or release.
    Is there anyone who has experienced a similar situation in the past? Please share.
    Thanks.
    sapguy

    Appreciate your response. I ran into a situation where we are not sure of what time choose to choose recovery (point in time) and ended up recovering file by file and its been 100 files .. .none of those files helped with "Media recovery complete" message . This is database refresh from production backup.
    Then when i am trying to issue ALTER DATABASE OPEN RESETLOGS  one of main guy says do not issue OPEN command as it may corrupt the database.
    I came across one of friend who ran into similar situation and he was able open the database , but LATER database started issuing ora 600 due to corrupted files or whatever which never happened.   Forgive me .. if my text is confusing.
    Thanks.

  • Alter database register logfile

    Hi,
    I just setup a dr site for our client for R/3 production system.
    I had two options to automatically apply the logfiles in standby system.
    Option 1: Wrote a script to automate the archive from primary to standby and then apply on standby.
    Option 2: Just moved the archive from primary to standby and fired the command alter database managed standby database;
    Here i had to fire one more command on different sql session to register the archive on standby system. Registering log file has to be done for all archive logs.
    Currently the standby system is running based on option1.
    My question is,
    why do i need to register these archive files?
    Is there any way, this registration can be skipped?
    Regards,
    Iyyappan

    Hello Iyyappan,
    at first we have to clarify: A logical or a physical standby database?
    For example:
    If the primary database is unavailable, you have to perform the register manually.
    It is described by the oracle dataguard concepts:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/log_transport.htm#i1148216
    And take a look at here what a "gap" is:
    http://www.dba-oracle.com/t_oracledataguard_37_archive_gap_sequence_.htm
    Regards
    Stefan

  • Alter database switch logfile

    Hi friends,
    Oracle DB 9i
    I am making a standby database backup (hi-brid), and keep updating every hour on top of the hour sked it with the archive logs generated.
    I am just confused a little. If I have 3 logfiles, and if I command "alter database switch log files", does the 3 logfiles
    be converted to the backup archive logs ? or only one of them only, and I have to issue the command 3x so that I will be able to get all the latest transaction inside the 3 redo logfiles to be applied at the standby server.
    Thanks a lot,
    Ms Inday

    crystal wrote:
    oh i see :D , so at any time there is one and only one redo log group that has data? all the other 2 are empty?not empty, but already archived. When an online redo log fills, there is an automatic switch to the next group. As soon as the switch is complete, the archiver will start archiving the group that was just filled. Archiving does not wait until all redo groups are filled.
    =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2010.12.17 14:54:47 =~=~=~=~=~=~=~=~=~=~=~=
    login as: oracle
    oracle@vmlnx01's password:
    Last login: Fri Dec 17 14:49:39 2010 from 192.168.160.1
    [oracle@vmlnx01 ~]$ sqlplus / as sysdba
    SQL*Plus: Release 10.2.0.4.0 - Production on Fri Dec 17 14:55:08 2010
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select group#, archived, status from v$log order by 1;
    alter system switch logfile;
        GROUP# ARC STATUS
    1 YES INACTIVE
    2 YES INACTIVE
    3 NO  CURRENT
    SQL>
    System altered.
    SQL> select group#, archived, status from v$log order by 1;
    alter system switch logfile;
        GROUP# ARC STATUS
    1 NO  CURRENT
    2 YES INACTIVE
    3 YES ACTIVE
    SQL>
    System altered.
    SQL> select group#, archived, status from v$log order by 1;
    alter system switch logfile;
        GROUP# ARC STATUS
    1 YES ACTIVE
    2 NO  CURRENT
    3 YES ACTIVE
    SQL>
    System altered.
    SQL> select group#, archived, status from v$log order by 1;
    alter system switch logfile;
        GROUP# ARC STATUS
    1 YES INACTIVE
    2 YES INACTIVE
    3 NO  CURRENT
    SQL>
    System altered.
    SQL> select group#, archived, status from v$log order by 1;
    alter system switch logfile;
        GROUP# ARC STATUS
    1 NO  CURRENT
    2 YES INACTIVE
    3 YES ACTIVE
    SQL>
    System altered.
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [oracle@vmlnx01 ~]$ exit
    logout

  • Alter database OR alter system?? what is the logic?

    Hi,
    this is just a general question not related to any particular issue. I seem to be missing the logic behind when we need to use the "alter system ... " statements and when we need to use the "alter database ..." statements. Is there a logic I can use to guess ? Or we only need to remember them (or look up for them)?
    Let's take an example.
    alter database archivelog; & alter system checkpoint;
    OR
    alter database add logfile; & alter system set undo_retention=800;
    If you have a key that can be generally applied please let me know as I am not able to find it. Thank you,
    enrico

    I am not sure if there is a general rule but this is what I use:
    alter database is about modifying the database architecture, like data files, archived log files etc.
    alter system is about modifying the instance. so, you are modifying the way oracle runs. Remember that all parameters should be done with alter system (like undo_retention)
    hope this will help you.

  • What is the use of 'ALTER DATABASE CLOSE'?

    Hello Everybody,
    SQL*Plus: Release 10.1.0.2.0 - Production on Ma Aug 15 21:28:30 2005
    Copyright © 1982, 2004, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> conn / as sysdba
    Connected.
    SQL> startup force
    ORACLE instance started.
    Total System Global Area 171966464 bytes
    Fixed Size 787988 bytes
    Variable Size 145750508 bytes
    Database Buffers 25165824 bytes
    Redo Buffers 262144 bytes
    Database mounted.
    Database opened.
    SQL> select status from v$instance;
    STATUS
    OPEN
    SQL> alter database close;
    Database altered.
    SQL> select status from v$instance;
    STATUS
    MOUNTED
    SQL> alter database open;
    alter database open
    ERROR at line 1:
    ORA-16196: database has been previously opened and closed
    If i have to shutdown the instance and database then
    WHAT IS THE USE OF 'ALTER DATABASE CLOSE' ?
    I need explanation. Why should i shutdown?
    Dont give me this answer.
    ORA-16196: database has been previously opened and closed
    Cause: The instance has already opened and closed the database, which is allowed only once in its lifetime.
    Action: Shut down the instance.

    If you read the documentation you will see that there is no ALTER DATABASE CLOSE command.
    This is an undocumented Oracle command, which we are not supposed to use. Consequently we are not allowed to complain about the way that it works. Instead we're supposed to use SHUTDOWN IMMEDIATE.
    Cheers, APC

  • What is the Use of  "Alter database activate standby database"

    Hi ,
    I appreciate your time.
    I just wanted to know what is the use of "Alter database activate standby database" command when doing the failover. How different it will act in failover process. Can we use this command in SwitchOver.
    Thanks in advance.

    Hi Uwe Hesse,
    Wonderfull... good info....
    So my understanding is that the use of "ACTIVATE PHYSICAL STANDBY DATABASE" is conditional and depends on the redo log gap and the Database status(Able to mount or not).
    Condition 1: If the Db is in Mount state and Redo log gap is successfully filled.
    1) Flush any unsent redo from the primary database to the target standby database.
    SQL> ALTER SYSTEM FLUSH REDO TO target_db_name;
    Note: If the above Statement Completes successfully without any errors.
    2) Stop Redo Apply.
    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
    3) Finish applying all received redo data.
    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
    4) Verify that the target standby database is ready to become a primary database.
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    5) Switch the physical standby database to the primary role.
    SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN;
    Condition 2: If the DB is not able Mount and Redo Gap can't be filled.
    Important Note: If the the above command in STEP3 gives error, some received redo data was not applied. Try to resolve the cause of the error and re-issue the statement before proceeding.
    If the error condition cannot be resolved, a failover can still be performed (with some data loss) by issuing the following SQL statement on the target standby database:
    SQL> ALTER DATABASE ACTIVATE PHYSICAL STANDBY DATABASE;
    Thanks in advance.

  • What happens at backend when we fire alter database commit to switchover to physical standby

         Hi,
    What exactly happens at backend when we fire alter database commit to switchover to physical standby.
    how the transition happens?
    Thanks

    Hi,
    The following will happen at the backend
    1.) Notifies the primary database that a switchover is about to occur
    2.) Disconnect all users from the primary database
    3.) Generate a special redo record that signals the End of Redo (EOR)
    4.) Converts the primary database into a standby database
    5.) Once the standby database applies the final EOR record, guaranteeing that no data loss has been lost, converts the standby database into the primary database.
    The new standby database (old primary) starts to receive the redo records and continues process until we switch back again. It is important to remember that both databases receive the EOR record so both databases know the next redo that will be received.
    Regards,
    Pradeep. V

Maybe you are looking for

  • Mid 2010 MacBook Pro i7 - Crashing - Low $ - HEELLPP

    My mid 2010 Macbook pro 15" with i7 running 10.85 has recently started crashing. I've really only used it extensively for the last 2 years so it's been doing quite well but has now started black screening then rebooting with no - at least not apparen

  • Having software problem, Windows 7 Home, how to format and reinstall

    Having software problems, Windows 7.  I have the HP  P6510 desktop. I have backed up my data to ext. drive, and  I have the Windows 7 Home CD which I purchased.  Most of the reading I've done to "format & reinstall" seem to say I don't need to format

  • "Edit In ... Photoshop Elements" not working in LR4.0 Mac

    Just upgraded to LR4 from 3 on my Mac runing OS-X Lion. I can no longer select "Edit In...", the option is there but does nothing. Any clues please?

  • Can't update my Iphone 4

    I've been trying like for the tenth time to update my Iphone IOS and I just can't. It takes some time for Itunes to download the available IOS and when it's almost downloaded, an error occurs, saying that the time for downloading is over. How come? I

  • Problem with Mysql DataBase

    hi all, I am new to this topic,so could any one please help me on this problem. How to Connect MySQL database with java , I am getting errors with Driver and data source. which ODBC data source (user DSN,system DSN or file DSN ....) So please help me