Quantcast
Channel: Doyensys Allappsdba Blog..
Viewing all 1640 articles
Browse latest View live

Post 12c Upgrade : ORA 68 Error

$
0
0

Recently after 12C database upgrade one of  our customer complaints that they are facing ORA-00068: invalid value parameter _query_execution_time_limit error.

 .


When we checked alert log, we noticed following information message


WARNING: Oracle executable binary mismatch detected.
Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
SOLUTION:

!. Database is working and we want to suppress the messages we can alter the system as below
alter system set "_disable_image_check" = TRUE
2. Bounce database.

Where is EBS Heading Beyond R12.2.6

$
0
0
EBS Product Development has announced the roadmap for EBS.
According to Cliff Godwin, Oracle SVP, release 12.3 will be, “a consumption and uptake of underlying latest database and middleware Java technologies, so we can leverage those while keeping the stack under E-Business Suite modern.” E-Business suite will continue to evolve along with new technology, 

A brief overview of E-Business Suite’s roadmap.



Anways the update roadmap also includes the support information.
According to this support information;
EBS 12.1 will be supported through Dec 2012.
EBS 12.2 will be supported through Sep 2023.
The new future relase  will be supported through 2030.

Hopefully this new major release will be announced in 2019-2020. 

Happy EBS Learning ..

ORA-19815: WARNING: db_recovery_file_dest_size of 32212254720 bytes is 99.98% used, and has 5718016 remaining bytes available. ORA-19815: WARNING: db_recovery_file_dest_size of 1073741824 bytes is 100.00% used, and has 0 remaining bytes available.

$
0
0
Issue

ORA-19815: WARNING: db_recovery_file_dest_size of 32212254720 bytes is 99.98% used, and has 5718016 remaining bytes available.
ORA-19815: WARNING: db_recovery_file_dest_size of 1073741824 bytes is 100.00% used, and has 0 remaining bytes available.

Solution:


Its because your db_recovery_file_dest_size is full:

SQL> show parameter db_recovery_file_dest_size

NAME TYPE VALUE
———————————— ———– ——————————
db_recovery_file_dest_size big integer 45G
SQL>

SQL> set lines 100
col name format a60
select name, floor(space_limit / 1024 / 1024) “Size MB”, ceil(space_used / 1024 / 1024) “Used MB” from v$recovery_file_dest order by name;SQL> SQL>

NAME Size MB Used MB
———————————————————— ———- ———-
/data01/oracle/fast_recovery_area 46080 46080

SQL>

To Resolve this:

Connect to RMAN prompt.

-bash-3.2$ rman target /

Recovery Manager: Release 11.2.0.3.0 – Production on Tue Aug 11 06:54:21 2012

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

connected to target database: DB1 (DBID=12345)

RMAN>crosscheck archivelog all;

RMAN>delete expired archivelog all;

Warning: ORA-16826: apply service state is inconsistent with the DelayMins property

$
0
0
Issue:

Warning: ORA-16826: apply service state is inconsistent with the DelayMins property

Reason:

This is because of the wrong configuration to time delay paramater in dataguard

Work around:

Please refere < Doc ID 249703.1>

DGMGRL> edit database <standby database> set state=apply-off;
DGMGRL> edit database <standby database> set state=apply-on;

or

SQL>alter database recover managed standby database cancel;

SQL> alter database recover managed standby database using current logfile disconnect;

Database goes down automatically after starts up.ORA-07445: exception encountered: core dump [kmmlrl()+6723] [SIGSEGV] [ADDR:0x8] [PC:0x8BB9B2D] [Address not mapped to object] []

$
0
0

ORA-07445: exception encountered: core dump [kmmlrl()+6723] [SIGSEGV] [ADDR:0x8] [PC:0x8BB9B2D] [Address not mapped to object] []


Symptoms

   After starting the database it goes down automatically with the following errors in the alert log file.

Completed: ALTER DATABASE OPEN 
Fri Jul 14 14:08:33 2017 
Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x8] [PC:0x8BB9B2D, kmmlrl()+6723] 
Errors in file /Oracle/cig/app/cig/diag/rdbms/orcl/orcl/trace/orcl_pmon_14242.trc (incident=123636): 
ORA-07445: exception encountered: core dump [kmmlrl()+6723] [SIGSEGV] [ADDR:0x8] [PC:0x8BB9B2D] [Address not mapped to object] [] 
Incident details in: /Oracle/cig/app/cig/diag/rdbms/orcl/orcl/incident/incdir_123636/orcl_pmon_14242_i123636.trc 
Fri Jul 14 14:08:35 2017 
Trace dumping is performing id=[cdmp_20170714140835] 
Fri Jul 14 14:09:13 2017 
DBRM (ospid: 14250): terminating the instance due to error 472

Solution
-----------

Step 1:

     If you are using apex in your environment then comment the dispatcher patameter value in the parameter file and try to start the database.

Step 2:

   Now the database will start normally,but if you set the dispatcher value it will work and the dispatcher value will be taken.

Step 3:

  Now if you try to set the port for apex you will face the below error(for all the port it will throw the below error).

ORA-07445: exception encountered: core dump [kmmlrl()+6723] [SIGSEGV] [ADDR:0x8] [PC:0x8BB9B2D] [Address not mapped to object] [] 
Incident details in: /Oracle/cig/app/cig/diag/rdbms/orcl/orcl/incident/incdir_140436/orcl_pmon_15661_i140436.trc 
  

Step 4:
     
   Bounce the server and then set the port it will work fine,and apex will open.
    The issue is that port number

Warning: ORA-16792: configurable property value is inconsistent with database setting

$
0
0
Issue:

Warning: ORA-16792: configurable property value is inconsistent with database setting

Reason:

Mismatch of parameter values between spfile, Data Guard Broker configuration and the database.

solution:

DGMGRL> show configuration;

Configuration - oracle_dg

  Protection Mode: MaxPerformance
  Databases:
    oracle_dgp  - Primary database
    oracle_dgs  - Physical standby database
      Warning: ORA-16792: configurable property value is inconsistent with database setting

Fast-Start Failover: DISABLED

Configuration Status:
WARNING


DGMGRL> show database 'oracle_dgs''InconsistentProperties'
INCONSISTENT PROPERTIES
    INSTANCE_NAME      PROPERTY_NAME   MEMORY_VALUE   SPFILE_VALUE   BROKER_VALUE
            voice   StandbyArchiveLocation             /arch        /archivelog/arch              0

change the value of /arch location in dataguard configuration to solve this issue.

DGMGRL>edit database oracle_dgs set property StandbyArchiveLocation='/archlog/arch/';

after that, we should get the output like this.


DGMGRL> show database 'oracle_dgs''InconsistentProperties'
INCONSISTENT PROPERTIES
    INSTANCE_NAME      PROPERTY_NAME   MEMORY_VALUE   SPFILE_VALUE   BROKER_VALUE


DGMGRL> show configuration;

Configuration - oracle_dg

Protection Mode: MaxPerformance
  Databases:
    oracle_dgp  - Primary database
    oracle_dgs - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

ORA-20100: ORA-20100: File o2127370.tmp creation failed.

$
0
0
Concurrent request failed with the following error in log file.

Error
--------
ORA-20100: ORA-20100: File o2127370.tmp creation failed.
File could not be opened or operated on as requested.

Action: Make sure the directory - /usr/tmp - is a valid directory with write permissions and is accessible from the database server node for write operations. This d
ORA-20100: ORA-20100: File o2127370.tmp creation failed.
File could not be opened or operated on as requested.

Action: Make sure the directory - /usr/tmp - is a valid directory with write permissions and is accessible from the database server node for wr
+---------------------------------------------------------------------------+
Start of log messages from FND_FILE
+---------------------------------------------------------------------------+
p_event_class_rec.application_id201
p_event_class_rec.tax_event_type_codeCREATE
+---------------------------------------------------------------------------+
End of log messages from FND_FILE
+---------------------------------------------------------------------------+


+---------------------------------------------------------------------------+
Executing request completion options...


Cause:
----------

   This issue usually occurs if you are using same UTL directory for more than one instance.if other instance is an clone of production than this issue occurs because of the tmp file of one instance will be same of other instance.


Solution:
----------


Step 1: Go to the UTL directory location,check for the tmp file with the tmp file in the log file.

Step 2 : If the file exists move that file or remove that file then rerun the request.


FS-CANT OPEN TEMPFILE

$
0
0

Error While opening output file and logfile.



Symptoms
-------------

       After completion of the request we cant open the output file and logfile,we will face the below error.



Solution:
-----------

Step 1: Check for the Space in the tmp file location and clear the files,now you can open the logfiles.



Failover to a Physical Standby Database When data protection mode is in MAXIMUM PROTECTION or MAXIMUM AVAILABILITY

$
0
0
Step 1:

Use the following procedure when the data protection mode is in MAXIMUM PROTECTION or MAXIMUM AVAILABILITY:

Before starting the failover operation, update the initialization parameter file on the physical Oracle instance
that is used for failover.  Include other standby databases in the Data Guard environment used as the archival destination
so that after the failover, the redo data can be archived from the new primary database to other standby databases.


Step 2:

In order to initiate the failover operation, the target physical Oracle instance should be placed
in MAXIMUM PERFORMANCE data protection mode using the following statement:

ALTER DATABASE SET Oracle instance TO MAXIMIZE PERFORMANCE.


Step 3 :

Allow the MRP to finish applying the redo data from the archived redo log file and the standby redo log files.

Step 4 :

Issuing the following statement will cause the MRP to terminate when it has applied all the available redo data:

ALTER DATABASE RECOVER MANAGED Oracle instance FINISH;

In Case If the standby redo log files on the target physical Oracle instance are corrupt,
or it is not desirable to apply the changes that are in the standby
redo log file, MRP can be completed by skipping the standby redo logs by using the following statement:

ALTER DATABASE RECOVER MANAGED Oracle instance FINISH SKIP STANDBY LOGFILE;

Step 5:

Once the MRP has finished applying all the redo data, issue the following statement to transition the physical
Oracle instance to the primary role. Status of managed recovery process
can be obtained from the v$managed_standby view or from the alert log file.

ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;

Step 6:

On all other standby databases, both physical and logical, register the standby
redo log file from the new primary database. The following statement will register
a log file with a database, and if the recovery process is running on a database,
the redo data from the log file will be applied:

ALTER DATABASE REGISTER LOGFILE ‘filespec’;

Step 7:

Finally, restart the new primary database to enable the read/write operation.
Update the Oracle Net configuration so that the new primary database will start serving the requests from applications.

Failover to a Physical Standby Database When data protection mode is in MAXIMUM PERFORMANCE

$
0
0
Step 1:

If the primary database was running in MAXIMUM PERFORMANCE mode prior to failure,
the procedure of failover is slightly different. In this case the following issues should be evaluated:

Since the protection mode is MAXIMUM PERFORMANCE, the physical Oracle instance may not have standby redo logs configured.
After the loss of the primary database, there may be an archive gap on the
standby database. These gaps should be resolved before transitioning the standby into the primary role.

If possible, manually copy the online redo logs from the original primary database to the target physical Oracle instance and register the
online redo log files using the ALTER DATABASE statement. After registering
the online redo log files, check the alert log file to verify the recovery process has applied the redo from these log files.


Step 2 :

The failover to a physical Oracle instance is similar to a switchover operation. Oracle provides the functionality of
converting a physical Oracle instance into the primary database without considering any of the above mentioned data recovery options.
This is kind of intentional data loss failover and can be achieved using the following statement:

ALTER DATABASE ACTIVATE STANDBY DATABASE;

If a standby log file has been created on the physical standby database,
issuing the above-mentioned statement will result in an Oracle error. The activation of
the physical Oracle instance can be force by skipping the standby log files:

ALTER DATABASE ACTIVATE Oracle instance SKIP STANDBY LOGFILE;

Set up and control automatic failover using the Fast-Start Failover

$
0
0


Step 1:

Fast-Start Failover: Installation. The FSFO application software is automatically loaded as part of the
standard installation when an Oracle 11g database home is created. Either DGMGRL or Oracle EM Grid Control
can be used to control the FSFO when a complete database home installation is present. Alternatively,
FSFO may be installed by downloading the Oracle 11g Client installation software from otn.oracle.com and
then installing just the Oracle Client Administrator on the desired server; however, it’s important to
note that when it has been installed on a separate server, the FSFO can only be managed via the DGMGRL utility.

Fast-Start Failover: Basic Configuration. Since it’s certainly possible that more than one physical standby database
could exist in a Data Guard configuration, the first thing that I’ll need to establish is which physical standby
database should be paired with the primary database in case a fast-start failover is initiated. I’ll do that by
setting a value for the FastStartFailoverTarget parameter via the DGMGRL utility.
Note that I’ve chosen the primary database as the fast-start failover target for the selected physical standby database as well:

DGMGRL> EDIT DATABASE orcl_primary SET PROPERTY FastStartFailoverTarget = 'orcl_stdby1';

DGMGRL> EDIT DATABASE orcl_stdby1 SET PROPERTY FastStartFailoverTarget = 'orcl_primary';


Step 2:

Next, I’ll establish how long the Fast-Start Failover Observer should wait until it decides that the primary database
is unreachable by setting a value of 180 seconds for the FastStartFailoverThreshold parameter:

EDIT CONFIGURATION SET PROPERTY FastStartFailoverThreshold = '180';
Now that the basic fast-start failover configuration is completed, I can confirm its status with the SHOW FAST_START FAILOVER command:

DGMGRL> show fast_start failover

Fast-Start Failover: DISABLED
  Threshold:           90 seconds
  Target:              (none)
  Observer:            orcl_stdby1
  Lag Limit:           30 seconds
  Shutdown Primary:    TRUE
  Auto-reinstate:      TRUE

Configurable Failover Conditions
  Health Conditions:
    Corrupted Controlfile          YES
    Corrupted Dictionary           YES
    Inaccessible Logfile            NO
    Stuck Archiver                  NO
    Datafile Offline               YES

  Oracle Error Conditions:
    (none)

DGMGRL> show database verbose orcl_primary;

Database
  Name:            orcl_primary
  Role:            PRIMARY
  Enabled:         YES
  Intended State:  TRANSPORT-ON
  Instance(s):
    orcl_primary

  Properties:
    DGConnectIdentifier             = 'orcl_primary'
    ObserverConnectIdentifier       = ''
    LogXptMode                      = 'ASYNC'
    DelayMins                       = '0'
    Binding                         = 'OPTIONAL'
    MaxFailure                      = '0'
    MaxConnections                  = '1'
    ReopenSecs                      = '300'
    NetTimeout                      = '30'
    RedoCompression                 = 'DISABLE'
    LogShipping                     = 'ON'
    PreferredApplyInstance          = ''
    ApplyInstanceTimeout            = '0'
    ApplyParallel                   = 'AUTO'
    StandbyFileManagement           = 'AUTO'
    ArchiveLagTarget                = '0'
    LogArchiveMaxProcesses          = '4'
    LogArchiveMinSucceedDest        = '1'
    DbFileNameConvert               = ''
    LogFileNameConvert              = ''
    FastStartFailoverTarget         = 'orcl_stdby1'
    StatusReport                    = '(monitor)'
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    SendQEntries                    = '(monitor)'
    LogXptStatus                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    HostName                        = '11gPrimary'
    SidName                         = 'orcl_primary'
    StandbyArchiveLocation          = '/u01/app/oracle/flash_recovery_area/ORCL/'
    AlternateLocation               = ''
    LogArchiveTrace                 = '0'
    LogArchiveFormat                = 'log_%s_%t_%r.arc'
    LatestLog                       = '(monitor)'
    TopWaitEvents                   = '(monitor)'

Current status for "orcl_primary":
SUCCESS

DGMGRL> show database verbose orcl_stdby1

Database
  Name:            orcl_stdby1
  Role:            PHYSICAL STANDBY
  Enabled:         YES
  Intended State:  APPLY-ON
  Instance(s):
    orcl_stdby1

  Properties:
    DGConnectIdentifier             = 'orcl_stdby1'
    ObserverConnectIdentifier       = ''
    LogXptMode                      = 'ASYNC'
    DelayMins                       = '0'
    Binding                         = 'OPTIONAL'
    MaxFailure                      = '0'
    MaxConnections                  = '1'
    ReopenSecs                      = '300'
    NetTimeout                      = '30'
    RedoCompression                 = 'DISABLE'
    LogShipping                     = 'ON'
    PreferredApplyInstance          = ''
    ApplyInstanceTimeout            = '0'
    ApplyParallel                   = 'AUTO'
    StandbyFileManagement           = 'AUTO'
    ArchiveLagTarget                = '0'
    LogArchiveMaxProcesses          = '4'
    LogArchiveMinSucceedDest        = '1'
    DbFileNameConvert               = ''
    LogFileNameConvert              = '/u01/app/oracle/oradata/orcl/, /u01/app/oracle/oradata/stdby/'
    FastStartFailoverTarget         = 'orcl_primary'
    StatusReport                    = '(monitor)'
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    SendQEntries                    = '(monitor)'
    LogXptStatus                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    HostName                        = '11gStdby'
    SidName                         = 'orcl_stdby1'
    StandbyArchiveLocation          = '/u01/app/oracle/flash_recovery_area/STDBY/'
    AlternateLocation               = ''
    LogArchiveTrace                 = '0'
    LogArchiveFormat                = 'log_%s_%t_%r.arc'
    LatestLog                       = '(monitor)'
    TopWaitEvents                   = '(monitor)'

Current status for "orcl_stdby1":
SUCCESS

Step 3:

Enable fast start failover:

enable fast_start failover

Step 4:  Activating the Fast-Start Failover Observer

Now that the configuration of FSFO is complete, all I need to do is enable the configuration via DGMGRL as shown below. Note that I’m also enabling logging of Data Guard Broker activity for the command-line utility so that I can track any unexpected issues related to the FSFO’s performance or configuration:

[oracle@11gStdby ~]$ dgmgrl -logfile 11gStdby1_observer.log
DGMGRL for Linux: Version 11.1.0.6.0 - Production

Copyright (c) 2000, 2005, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/oracle
Connected.
DGMGRL> ENABLE FAST_START FAILOVER;
Enabled.
Finally, it’s time to start up FSFO. Once again, I’ll use DGMGRL to start the Fast-Start Failover Observer process:

DGMGRL> START OBSERVER;
Once the FSFO is started, I can confirm that it’s been activated properly with the SHOW CONFIGURATION and SHOW DATABASE commands:

DGMGRL> show configuration verbose

Configuration
  Name:                MAA_orcl
  Enabled:             YES
  Protection Mode:     MaxPerformance
  Databases:
    orcl_primary - Primary database
    orcl_stdby1  - Physical standby database
                 - Fast-Start Failover target

Fast-Start Failover: ENABLED
  Threshold:           180 seconds
  Target:              orcl_stdby1
  Observer:            11gStdby
  Lag Limit:           30 seconds
  Shutdown Primary:    TRUE
  Auto-reinstate:      TRUE

Current status for "MAA_orcl":
Warning: ORA-16608: one or more databases have warnings

DGMGRL> show database orcl_primary

Database
  Name:            orcl_primary
  Role:            PRIMARY
  Enabled:         YES
  Intended State:  TRANSPORT-ON
  Instance(s):
    orcl_primary

Current status for "orcl_primary":
SUCCESS

DGMGRL> show database orcl_stdby1

Database
  Name:            orcl_stdby1
  Role:            PHYSICAL STANDBY
  Enabled:         YES
  Intended State:  APPLY-ON
  Instance(s):
    orcl_stdby1

Current status for "orcl_stdby1":
SUCCESS

DGMGRL> show fast_start failover

Fast-Start Failover: ENABLED
  Threshold:           180 seconds
  Target:              orcl_stdby1
  Observer:            11gStdby
  Lag Limit:           30 seconds
  Shutdown Primary:    TRUE
  Auto-reinstate:      TRUE

Configurable Failover Conditions
  Health Conditions:
    Corrupted Controlfile          YES
    Corrupted Dictionary           YES
    Inaccessible Logfile            NO
    Stuck Archiver                  NO
    Datafile Offline               YES

  Oracle Error Conditions:
    (none)

Step 5:

Automatic Detection of Failover Conditions: An Example

Now that FSFO is fully configured and is ready to detect a failover situation, I’ll use the same technique I used in the prior article about Data Guard failover to simulate a failure of the primary database: I’ll simply issue the kill -9 <pid> command against its Server Monitor (SMON) background process. Once again, the death of the primary database is almost immediately recorded in its alert log:

. . .
Tue Aug 25 18:54:10 2009
Errors in file /u01/app/oracle/diag/rdbms/orcl_primary/orcl_primary/trace/orcl_primary_pmon_6166.trc:
ORA-00474: SMON process terminated with error
PMON (ospid: 6166): terminating the instance due to error 474
Instance terminated by PMON, pid = 6166
. . .
Just as before, the loss of connectivity to the primary database is reflected within the alert log of the corresponding physical standby databases by its Remote File Server (RFS) background process:

. . .
Tue Aug 25 18:54:49 2009
RFS[2]: Possible network disconnect with primary database
Tue Aug 25 18:54:49 2009
RFS[1]: Possible network disconnect with primary database
Tue Aug 25 18:55:49 2009
. . .
This time, however, there’s a dramatic difference! After approximately three minutes have elapsed, there’s a sudden flurry of activity at the physical standby site as the FSFO automatically detects the failure of the primary database. In Listing 7.1, I’ve captured the alert logs of both databases as well as the Data Guard Broker log entries to show all of the actions that Oracle 11g initiates during a Fast-Start Failover. After the automatic failover is complete, the Data Guard configuration fully reflects the successful actions of the FSFO:

DGMGRL> show configuration verbose

Configuration
  Name:                MAA_orcl
  Enabled:             YES
  Protection Mode:     MaxPerformance
  Databases:
    orcl_stdby1  - Primary database
    orcl_primary - Physical standby database (disabled)
                 - Fast-Start Failover target

Fast-Start Failover: ENABLED
  Threshold:           180 seconds
  Target:              orcl_primary
  Observer:            11gStdby
  Lag Limit:           30 seconds
  Shutdown Primary:    TRUE
  Auto-reinstate:      TRUE

Current status for "MAA_orcl":
Warning: ORA-16608: one or more databases have warnings

DGMGRL> show database verbose orcl_stdby1

Database
  Name:            orcl_stdby1
  OEM Name:        orcl_11gStdby1
  Role:            PRIMARY
  Enabled:         YES
  Intended State:  TRANSPORT-ON
  Instance(s):
    orcl_stdby1

  Properties:
    DGConnectIdentifier             = 'orcl_stdby1'
    ObserverConnectIdentifier       = ''
    LogXptMode                      = 'ASYNC'
    DelayMins                       = '0'
    Binding                         = 'OPTIONAL'
    MaxFailure                      = '0'
    MaxConnections                  = '1'
    ReopenSecs                      = '300'
    NetTimeout                      = '30'
    RedoCompression                 = 'DISABLE'
    LogShipping                     = 'ON'
    PreferredApplyInstance          = ''
    ApplyInstanceTimeout            = '0'
    ApplyParallel                   = 'AUTO'
    StandbyFileManagement           = 'AUTO'
    ArchiveLagTarget                = '0'
    LogArchiveMaxProcesses          = '4'
    LogArchiveMinSucceedDest        = '1'
    DbFileNameConvert               = ''
    LogFileNameConvert              = '/u01/app/oracle/oradata/orcl/, /u01/app/oracle/oradata/stdby/'
    FastStartFailoverTarget         = 'orcl_primary'
    StatusReport                    = '(monitor)'
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    SendQEntries                    = '(monitor)'
    LogXptStatus                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    HostName                        = '11gStdby'
    SidName                         = 'orcl_stdby1'
    StandbyArchiveLocation          = '/u01/app/oracle/flash_recovery_area/STDBY/'
    AlternateLocation               = ''
    LogArchiveTrace                 = '0'
    LogArchiveFormat                = 'log_%s_%t_%r.arc'
    LatestLog                       = '(monitor)'
    TopWaitEvents                   = '(monitor)'

Current status for "orcl_stdby1":
Warning: ORA-16829: fast-start failover configuration is lagging


DGMGRL> show database verbose orcl_primary

Database
  Name:            orcl_primary
  OEM Name:        orcl_11gPrimary
  Role:            PHYSICAL STANDBY
  Enabled:         NO
  Intended State:  APPLY-ON
  Instance(s):
    orcl_primary

  Properties:
    DGConnectIdentifier             = 'orcl_primary'
    ObserverConnectIdentifier       = ''
    LogXptMode                      = 'ASYNC'
    DelayMins                       = '0'
    Binding                         = 'OPTIONAL'
    MaxFailure                      = '0'
    MaxConnections                  = '1'
    ReopenSecs                      = '300'
    NetTimeout                      = '30'
    RedoCompression                 = 'DISABLE'
    LogShipping                     = 'ON'
    PreferredApplyInstance          = ''
    ApplyInstanceTimeout            = '0'
    ApplyParallel                   = 'AUTO'
    StandbyFileManagement           = 'AUTO'
    ArchiveLagTarget                = '0'
    LogArchiveMaxProcesses          = '4'
    LogArchiveMinSucceedDest        = '1'
    DbFileNameConvert               = ''
    LogFileNameConvert              = ''
    FastStartFailoverTarget         = 'orcl_stdby1'
    StatusReport                    = '(monitor)'
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    SendQEntries                    = '(monitor)'
    LogXptStatus                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    HostName                        = '11gPrimary'
    SidName                         = 'orcl_primary'
    StandbyArchiveLocation          = '/u01/app/oracle/flash_recovery_area/ORCL/'
    AlternateLocation               = ''
    LogArchiveTrace                 = '0'
    LogArchiveFormat                = 'log_%s_%t_%r.arc'
    LatestLog                       = '(monitor)'
    TopWaitEvents                   = '(monitor)'

Current status for "orcl_primary":
Error: ORA-16661: the standby database needs to be reinstated

Script to know the top sessions and locks

$
0
0
col machine for a40

SELECT * FROM (SELECT TO_CHAR (s.logon_time,'mm/dd hh:mi:ssAM') loggedon, s.sid, s.status,FLOOR (last_call_et / 60)
"Last Call Elapsed Time (m)", s.username, s.osuser, p.spid, s.module || ' - ' || s.program uprogram, s.machine,
s.sql_hash_value FROM v$session s, v$process p WHERE p.addr = s.paddr AND s.TYPE = 'USER' AND s.username IS
NOT NULL AND s.status = 'ACTIVE' AND last_call_et > 0 ORDER BY 4 DESC) WHERE ROWNUM < 11;


select /*+RULE */ s.sid, s.serial#, p.spid, s.process, substr(s.module,1,20) module, to_char(sysdate - s.last_call_et/60/60/24,'DD-MON-YYYY HH24:MI') last_call,
decode(block ,0,'NO','YES') BLOCKER, decode(request,0,'NO','YES') WAITER from
v$lock l,v$session s, v$process p where (l.request > 0 or l.block > 0 )
and s.sid = l.sid and p.addr = s.paddr order by last_call_et desc;

Deinstall of Grid Infrastructure Cluster

$
0
0
Step 1:

How to clean up a failed Grid Infrastructure installation.
It specifically focuses on what to do if the "root.sh" script fails during this process and you want to rewind and start again.


On all cluster nodes except the last, run the following command as the "root" user.

perl $GRID_HOME/crs/install/rootcrs.pl -verbose -deconfig -force


Step 2:

On the last cluster node, run the following command as the "root" user.

perl $GRID_HOME/crs/install/rootcrs.pl -verbose -deconfig -force -lastnode

This final command will blank the OCR configuration and voting disk.

You should be in a position to rerun the "root.sh" file now, but if you are using ASM, you will need to prepare your ASM disks before doing so.

Step 3: As grid user, run $GRID_HOME/deinstall/deinstall

finally as root in all racnodes

rm -rf /etc/oraInst.loc
rm -rf /opt/ORCLfmap

Step 4:

ASM Disks

Once you attempt an installation, your ASM disks are marked as being used, so they can no longer be used as candidate disks. To revert them to candidate disk do the following.

Overwrite the header for the relevant partitions using the "dd" command.

dd if=/dev/zero of=/dev/sdb1 bs=1024 count=100

Remove and create the ASM disk for each partition.

/etc/init.d/oracleasm deletedisk DATA /dev/sdb1
 /etc/init.d/oracleasm createdisk DATA /dev/sdb1

The disks will now be available as candidate disks.



ORA-01555 / ORA-600 in standby database after switchover

$
0
0
After doing a SwitchOver from Production to standby(open read only), We were facing frequent ORA-01555 error.

This is a Oracle bug in 11.2 as per the below oracle doc.

Bug 22241601 ORA-600 [kdsgrp1] / ORA-1555 / ORA-600 [ktbdchk1: bad dscn] / ORA-600 [2663] due to Invalid Commit SCN in INDEX ( Doc ID 1608167.1 ).

As a solution we need to set below parameter on Production and standby.

alter system set "_ktb_debug_flags"=8 scope=both;

After this there was no issue in queries running in standby database.

Launch EC2 Instance from AWSCLI

$
0
0

Launch EC2 Instance from AWSCLI


In this blogpost, I will show you how to launch EC2 instance from AWSCLI (AWS command line).  This is very quick when compared to creating instances with console.  Please check my previous post about how to launch EC2 from AWS Console.

First, we need to install the AWS CLI, then configure it and finally launchEC2 using CLI.

Download appropriate AWS CLI MSI installer for your system, here I will be using Windows version.  Once installed, go to Windows command prompt and type aws.  If you are getting any output, then it means aws cli was installed.


Now, we need to configure AWS CLI with security credentials.  If you don’t have them, then we need to create them.   

For the sake of easiness, I am creating security credentials for root user, don't share the credentials with anyone and delete them or make them inactive after your activity.

In the navigation panel, choose user and  My Security Credentials



Press Continue to Security Credentials

 

Then click 'Create New Access Key' from Access Keys





Click Download Key File, the downloaded file will be in .csv format.  Keep the file in a safe location and don't share it with anyone.  It will contain AWSAccessKeyId and AWSSecretKey.




Now, we need to configure aws cli with the security credentials

In the command prompt, type:  aws configure
It will prompt you Access Key ID, Secret Access Key, Region and Output format; enter the first two from csv file that we have downloaded; enter region as us-west-2 - we will be using Oregon as our region; leave output as default.



We need few more details in order to launch ec2 instance from console.

They are:

1.    image-id:  The AWS AMI ID - OS media.  Here we will be using ami-6df1e514
2.    instance-type:  AWS is providing different types of instances optimized to fit different use cases.  They comprise varying combinations of CPU, memory, storage, and networking capacity and give us the flexibility to choose the appropriate mix of resources for our applications.  We will be launching t2.micro instance
3.    key-name:  Security key pair.  I had already created MyKeyPair key pair.
4.    region:  The region where we would like our instance to be hosted.  We will be hosting our instance in us-west-2 region (Oregon).

Now use the below command to launch EC2 instance from AWS CLI

aws ec2 run-instances --image-id ami-6df1e514 --count 1 --instance-type t2.micro --key-name MyKeyPair --region us-west-2


Here --count is number of instance we would like to launch

========================================================================
C:\Users\AVK>aws ec2 run-instances --image-id ami-6df1e514 --count 1 --instance-type t2.micro --key-name MyKeyPair --region us-west-2
{
    "Instances": [
        {
            "Monitoring": {
                "State": "disabled"
            },
            "PublicDnsName": "",
            "StateReason": {
                "Message": "pending",
                "Code": "pending"
            },
            "State": {
                "Code": 0,
                "Name": "pending"
            },
            "EbsOptimized": false,
            "LaunchTime": "2017-08-06T11:01:49.000Z",
            "PrivateIpAddress": "172.31.32.238",
            "ProductCodes": [],
            "VpcId": "vpc-deed20b8",
            "StateTransitionReason": "",
            "InstanceId": "i-09c9b5f291e9e63a6",
            "ImageId": "ami-6df1e514",
            "PrivateDnsName": "ip-172-31-32-238.us-west-2.compute.internal",
            "KeyName": "MyKeyPair",
            "SecurityGroups": [
                {
                    "GroupName": "default",
                    "GroupId": "sg-29ee3753"
                }
            ],
            "ClientToken": "",
            "SubnetId": "subnet-56facb1f",
            "InstanceType": "t2.micro",
            "NetworkInterfaces": [
                {
                    "Status": "in-use",
                    "MacAddress": "06:83:86:09:94:6a",
                    "SourceDestCheck": true,
                    "VpcId": "vpc-deed20b8",
                    "Description": "",
                    "NetworkInterfaceId": "eni-570b8669",
                    "PrivateIpAddresses": [
                        {
                            "PrivateDnsName": "ip-172-31-32-238.us-west-2.compute.internal",
                            "Primary": true,
                            "PrivateIpAddress": "172.31.32.238"
                        }
                    ],
                    "PrivateDnsName": "ip-172-31-32-238.us-west-2.compute.internal",
                    "Attachment": {
                        "Status": "attaching",
                        "DeviceIndex": 0,
                        "DeleteOnTermination": true,
                        "AttachmentId": "eni-attach-1460d0f8",
                        "AttachTime": "2017-08-06T11:01:49.000Z"
                    },
                    "Groups": [
                        {
                            "GroupName": "default",
                            "GroupId": "sg-29ee3753"
                        }
                    ],
                    "Ipv6Addresses": [],
                    "OwnerId": "xxxxxxxxxxxxx",
                    "SubnetId": "subnet-56facb1f",
                    "PrivateIpAddress": "172.31.32.238"
                }
            ],
            "SourceDestCheck": true,
            "Placement": {
                "Tenancy": "default",
                "GroupName": "",
                "AvailabilityZone": "us-west-2b"
            },
            "Hypervisor": "xen",
            "BlockDeviceMappings": [],
            "Architecture": "x86_64",
            "RootDeviceType": "ebs",
            "RootDeviceName": "/dev/xvda",
            "VirtualizationType": "hvm",
            "AmiLaunchIndex": 0
        }
    ],
    "ReservationId": "r-075a4bba42ad67047",
    "Groups": [],
    "OwnerId": "xxxxxxxxxxxxx"
}

C:\Users\AVK>
========================================================================

Make a note of the InstanceID and go to AWS console and then to EC2 dashboard; our instance is launched and it is up and running.





Connect to it using the public DNS/IP.

Now we are able to launch an EC2 instance from AWS CLI successfully. 

Happy Learning!!!


 

opatchauto failed with error code 2

$
0
0
Opatchauto:

In general, when we invoke opatchauto, opatch will patch both the GI stack and the database software stack. Since we do not have a database running, patch will skip the database software stack and only apply the PSU to the GI Home. Before we invoke the opatchauto command, let’s create the ocm.rsp response file by executing the OCM Installation Response Generator (emocmrsp).

Now we are going to patch the ORACLE_HOME,its automatically bounce the databases which are running under this ORACLE_HOME.We have to execute a command as a root user.

ERROR:

UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed while applying patch


While applying 12c patch, it failed with below error

[root@test.doy.com] /oracle/app/oracle/product/12.1.0/dbrac_1/OPatch/opatchauto apply  /orashare1/OPatch/psu/gipsu/25901062 -oh /oracle/app/oracle/product/12.1.0/dbrac_1 -ocmrf /oracle/app/oracle/ocm.rsp

OPatch Automation Tool
Copyright (c) 2015, Oracle Corporation.  All rights reserved.

OPatchauto version : 12.1.0.1.5
OUI version        : 12.1.0.2.0
Running from       : /oracle/product/grid/12.1.0

opatchauto log file: /oracle/product/grid/12.1.0/cfgtoollogs/opatchauto/20132450/opatch_gi_2017-02-24_03-25-09_deploy.log

Parameter Validation: Successful

Grid Infrastructure home:
/oracle/product/grid/12.1.0
RAC home(s):
/oracle/product/db/12.1.0

Configuration Validation: Successful

Patch Location: /oracle/archivelog/patch/20132450
Grid Infrastructure Patch(es): 19769473 19769479 19769480 19872484
RAC Patch(es): 19877336 19769479 19769480

Patch Validation: Successful

Stopping RAC (/oracle/product/db/12.1.0) ... Successful

Applying patch(es) to "/oracle/product/db/12.1.0" ...
Command "/oracle/product/db/12.1.0/OPatch/opatch napply -phBaseFile /tmp/OraDB12Home1_patchList -local  -invPtrLoc /oracle/product/grid/12.1.0/oraInst.loc -oh /oracle/product/db/12.1.0 -silent -ocmrf /oracle/archivelog/patch/unconfig_GI.rsp" execution failed:
UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.

Log file Location for the failed command: /oracle/product/db/12.1.0/cfgtoollogs/opatch/opatch2017-02-24_03-26-10AM_1.log

For more details, please refer to the log file "/oracle/product/grid/12.1.0/cfgtoollogs/opatchauto/20132450/opatch_gi_2017-02-24_03-25-09_deploy.debug.log".

Apply Summary:

Following patch(es) failed to be installed:
GI Home: /oracle/product/grid/12.1.0: 19769473, 19769479, 19769480, 19872484
RAC Home: /oracle/product/db/12.1.0: 19877336, 19769479, 19769480

opatchauto failed with error code 2.


Checking the log it shows that

[Feb 24, 2017 3:26:17 AM]    Finish fuser command /sbin/fuser /oracle/product/db/12.1.0/lib/libclntsh.so.12.1 at Tue Feb 24 03:26:17 PST 2015
[Feb 24, 2017 3:26:17 AM]    Start fuser command /sbin/fuser /oracle/product/db/12.1.0/lib/libasmclntsh12.so at Tue Feb 24 03:26:17 PST 2015
[Feb 24, 2017 3:26:17 AM]    Finish fuser command /sbin/fuser /oracle/product/db/12.1.0/lib/libasmclntsh12.so at Tue Feb 24 03:26:17 PST 2015
[Feb 24, 2017 3:26:17 AM]    Following executables are active :
            7                /oracle/product/db/12.1.0/lib/libclntsh.so.12.1
[Feb 24, 2017 3:26:17 AM]    Prerequisite check "CheckActiveFilesAndExecutables" failed.
            7                The details are:
            7
            7
            7                Following executables are active :
            7                /oracle/product/db/12.1.0/lib/libclntsh.so.12.1
[Feb 24, 2017 3:26:17 AM]    OUI-67073:UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
[Feb 24, 2017 3:26:17 AM]    Finishing UtilSession at Tue Feb 24 03:26:17 PST 2015
[Feb 24, 2017 3:26:17 AM]    Log file location: /oracle/product/db/12.1.0/cfgtoollogs/opatch/opatch2015-02-24_03-26-10AM_1.log
[Feb 24, 2017 3:26:17 AM]    Stack Description: java.lang.RuntimeException: Prerequisite check "CheckActiveFilesAndExecutables" failed.
[Feb 24, 2017 3:26:17 AM]    StackTrace: oracle.opatch.OPatchSessionHelper.runApplyPrereqs(OPatchSessionHelper.java:6516)
[Feb 24, 2017 3:26:17 AM]    StackTrace: oracle.opatch.opatchutil.NApply.process(NApply.java:1617)


Reason:

Someone is accessing Oracle library

Solution:

Using fuser, find who is accessing and kill it.

fuser  /oracle/app/oracle/product/12.1.0/dbrac_1/lib/libclntsh.so.12.1

kill -9 pid

[root@test.doy.com] fuser  /oracle/app/oracle/product/12.1.0/dbrac_1/lib/libclntsh.so.12.1
/oracle/app/oracle/product/12.1.0/dbrac_1/lib/libclntsh.so.12.1: 112053m

[root@test.doy.com] /oracle/home/oracle$ ps -ef|grep 112053
oracle   112053 111991  0 Feb23 pts/0    00:00:00 sqlplus

[root@test.doy.com] /oracle/home/oracle$ kill -9 112053

[root@test.doy.com] /oracle/app/oracle/product/12.1.0/dbrac_1/OPatch/opatchauto apply  /orashare1/OPatch/psu/gipsu/25901062 -oh /oracle/app/oracle/product/12.1.0/dbrac_1 -ocmrf /oracle/app/oracle/ocm.rsp

Oracle Application Testing Suite (OATS) Installation guide

INSIGHT ABOUT ORACLE APPLICATION TESTING SUITE (OATS)

Article 20

$
0
0
PL/SQL Block to assign multiple responsibilities to a user


declare

res_user_name varchar2(100);
res_app_sn varchar2(200);
res_respkey varchar2(200);
res_sgkey varchar2(200);
res_desc varchar2(200);
res_name varchar2(200);

cursor usrname is select user_name from fnd_user where user_name in ('Username'); ------- User to whom responsibilities has to be assigned

cursor respname is

SELECT fa.application_short_name,fr.responsibility_key,frg.security_group_key,frt.description,frt.responsibility_name
FROM apps.fnd_responsibility fr,apps.fnd_application fa,apps.fnd_security_groups frg,apps.fnd_responsibility_tl frt
WHERE fr.application_id = fa.application_id
AND fr.data_group_id = frg.security_group_id
AND fr.responsibility_id = frt.responsibility_id
AND frt.LANGUAGE = 'US'
AND frt.responsibility_name in
(SELECT frtl.responsibility_name
FROM apps.fnd_user_resp_groups_direct furd, apps.fnd_responsibility_tl frtl
WHERE furd.responsibility_id = frtl.responsibility_id
and frtl.LANGUAGE = 'US'
and frtl.responsibility_name in ('Responsibility_Name1','Responsibility_Name2')); ----------- List of Valid Responsibilities

begin

open usrname;
loop
fetch usrname into res_user_name;
exit when usrname%notfound;

open respname;
loop
fetch respname into res_app_sn,res_respkey,res_sgkey,res_desc,res_name;
exit when respname%notfound;
fnd_user_pkg.addresp (username => res_user_name,
resp_app => res_app_sn,
resp_key => res_respkey,
security_group => res_sgkey,
description => res_desc,
start_date => SYSDATE,
end_date => NULL
);
commit;
end loop;
close respname;

end loop;
close usrname;
end;
/

Article 19

$
0
0
PL/SQL Block to replicate a user’s Active responsibility



declare

res_user_name varchar2(100);
res_app_sn varchar2(200);
res_respkey varchar2(200);
res_sgkey varchar2(200);
res_desc varchar2(200);
res_name varchar2(200);

cursor usrname is select user_name from fnd_user where user_name in ('Username1','Username2','Username3'); ------- Target User

cursor respname is
SELECT fa.application_short_name,fr.responsibility_key,frg.security_group_key,frt.description,frt.responsibility_name
FROM apps.fnd_responsibility fr,apps.fnd_application fa,apps.fnd_security_groups frg,apps.fnd_responsibility_tl frt
WHERE fr.application_id = fa.application_id
AND fr.data_group_id = frg.security_group_id
AND fr.responsibility_id = frt.responsibility_id
AND frt.LANGUAGE = 'US'
AND frt.responsibility_name in
(SELECT frtl.responsibility_name
FROM apps.fnd_user_resp_groups_direct furd, apps.fnd_responsibility_tl frtl
WHERE furd.responsibility_id = frtl.responsibility_id
AND furd.user_id IN ( SELECT user_id FROM apps.fnd_user WHERE user_name='Source_User' ) -------- Source User
AND (furd.end_date is null)
and frtl.LANGUAGE = 'US');

begin

open usrname;
loop
fetch usrname into res_user_name;
exit when usrname%notfound;

open respname;
loop
fetch respname into res_app_sn,res_respkey,res_sgkey,res_desc,res_name;
exit when respname%notfound;
fnd_user_pkg.addresp (username => res_user_name,
resp_app => res_app_sn,
resp_key => res_respkey,
security_group => res_sgkey,
description => res_desc,
start_date => SYSDATE,
end_date => NULL
);
commit;
end loop;
close respname;

end loop;
close usrname;
end;
/
Viewing all 1640 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>