AWE Memory implementation on Windows 2000/2003 Servers

Applies to:

Oracle Server – Enterprise Edition
Microsoft Windows (32-bit)
Purpose

To address the growing need for use of more memory on 32-Bit Windows platforms, and explain how AWE is implemented by Oracle on Windows.

Scope and Application

  • Oracle DBA’s running on the Microsoft Windows platform.
  • Oracle Support Analysts, Field Engineers troubleshooting problems related to AWE and/or memory issues on Windows.

Implementing Address Windowing Extensions (AWE) or VLM on 32-bit Windows Platforms

AWE Memory implementation on Windows 2000

A common question on the Windows NT/Windows 2000 platform. revolves around how to take advantage of systems with more than 4 GB of RAM. As discussed in My Oracle Support Document 46001.1 and Document 46053.1, the 32-Bit process address space for any process on Windows equates to a total of 4GB of addressable virtual memory. Of this, by default, 2GB is reserved for the process itself, and 2GB for the kernel. On systems running either Windows 2000 Advanced Server, or Windows NT 4.0 Enterprise Edition, this ratio can be changed by adding the /3GB switch to the BOOT.INI system configuration file, allowing a process to address 3GB and reserving 1GB for the kernel. However, the total addressable memory for a single process is still only 4GB. See also Document 1036312.6: Utilizing Up to 3GB Virtual Memory on Windows NT Server 4.0

For Windows 2008 the /3GB equivalent is:
BCDEDIT /Set IncreaseUserVa 3072


What can be done to address memory beyond 4GB?

The answer is to take advantage of Physical Address Extensions (PAE), or Address Windowing Extensions (AWE). These two terms are used interchangeably, so the rest of this document will refer to this simply as AWE. AWE support is available if you are running on a machine with more than 4GB of physical RAM which is running any of the below Windows operating systems:

  • Windows 2000 Datacenter Server
  • Windows 2000 Advanced Server
  • Windows 2003 Data Center Edition (32-Bit)
  • Windows 2003 Enterprise Edition (32-Bit)

On the above operating systems, AWE support is built into the OS. No special drivers are needed to take advantage of the additional memory.

AWE CANNOT be used on the following Operating Systems:

  • Windows 2000 Server (Standard)
  • Windows 2000 Professional
  • Windows XP Home Edition
  • Windows XP Professional
  • Windows 2003 Standard Edition
  • Windows 2003 Web Edition

Note: On 64-Bit Windows operating systems, there is no need for AWE implementation support, because the directly addressable memory for a single process on 64-Bit Windows is 8 Terabytes.
Note: AWE is enabled by default on systems which have DEP (Data Execution Prevention) enabled. So even if /PAE is not set for those systems it is still active.

Oracle versions that can use AWE

Oracle can take advantage of AWE in the following 32-Bit RDBMS releases:

  • Oracle 8.1.6.x
  • Oracle 8.1.7.x
  • Oracle 9.2.x
  • Oracle 10.x
  • Oracle 11.x

Oracle does NOT implement AWE support in release 9.0.1.x.

AWE support is available on both the Enterprise Edition of Oracle and the Standard Edition of Oracle. However, on Standard Edition of 9.2.0.1, you may receive the following error if trying to start the database with USE_INDIRECT_DATA_BUFFERS=TRUE:
ORA-439 – FEATURE NOT ENABLED: VERY LARGE MEMORY

In Standard Edition 9.2.0.2 and 9.2.0.3, you will not receive the above errors, but VLM functionality is still not enabled. Refer to BUG#2945011 for more detail. This BUG is fixed in 9.2.0.3 Patch 2, and is also fixed in 9.2.0.4 and onwards releases.

For RAC environments AWE can be used as well. As it is enabled at the system level, AWE is enabled for instances running on individual nodes.

Enabling support at the OS level

AWE can be enabled at the OS by adding the /PAE switch to the BOOT.INI file as in:
multi(0)disk(0)rdisk(0)partition(1)\WINNT=”Microsoft Windows 2000 Advanced Server” /PAE
It is possible to have BOTH the /PAE and /3GB switch in place on the same machine, like in:
multi(0)disk(0)rdisk(0)partition(1)\WINNT=”Microsoft Windows 2000 Advanced Server” /3GB /PAE
However, be aware that when /3GB is in place, the server will only be able to recognize up to 16GB of RAM. If you are working with a server with more than 16GB of RAM, you will need to choose between the two.

It is important to note that once either or both of these switches are in place in the BOOT.INI, ALL processes running can take advantage of these switches. Thus, in a case where multiple Oracle instances are running on the same server, ALL instances can take advantage of the additional memory afforded by these switches, up to the amount of physical memory on the box.

Operating System Privileges Needed at the OS Level

In order to take advantage of the additional memory afforded through PAE, the operating system user account which is used to start the OracleService<SID> must be granted the ‘Lock Pages in Memory’ system privilege at the operating system level. By default, the OracleService<SID> starts as the LocalSystem account. The LocalSystem account has the privilege to Lock Pages in Memory granted to it by default.

However, if you change the OracleService<SID> to logon as a user OTHER than LocalSystem, you may see the following errors when attempting to start the database with USE_INDIRECT_DATA_BUFFERS set to TRUE :
SQL> startup pfile=c:\temp\initscott.ora
ORA-27102: out of memory
OSD-00010: Message 10 not found; product=RDBMS; facility=SOSD

O/S-Error: (OS 1300) Not all privileges referenced are assigned to the caller.
To rectify this, you must grant the ‘Lock pages in memory’ privilege to the user that the OracleService<SID> starts as. To do this, click on:
Start -> Programs -> Administrative Tools -> Local Security Policy
(on a Domain Controller, click on ‘Domain Security Policy’ instead of ‘Local Security Policy’)
Double-click on the ‘Lock Pages in memory’ policy.
Add the appropriate user and click ‘Ok’.
Restart the OracleService<SID>

Understanding the Oracle implementation of AWE support

What the PAE switch allows you to do from the Oracle perspective is to increase the amount of memory that can be used for the Oracle Database Block Buffer Cache. It is important to note that this additional memory can ONLY be used by Oracle in the form. of an increased value for DB_BLOCK_BUFFERS.

There is still confusion on the old style. of VLM versus AWE on Windows 2000. With VLM on Windows NT 4.0, there was the concept of pointers pointing to the extended memory area, but that is no longer the case on Windows 2000. Instead, the windowing technology as described in these articles is being used. For more information on AWE/PAE implementation on the Windows platform, refer to Microsoft’s website.

As mentioned previously, with AWE enabled, this allows the process(es) (in this case ORACLE.EXE) to use memory above and beyond the 4GB mark defined by a 32-Bit Process Address space. The physical location of these blocks does not matter. However, the database blocks must still be accessed from within a ‘window’, which exists (logically) in that regular 3GB process address space. The size of this window is defined by a registry setting in the HOME key for Oracle (HKLM\Software\Oracle\Homex) called AWE_WINDOW_MEMORY. By default, this value is 1GB, so if this value is not set in the registry, AWE_WINDOW_MEMORY will be 1GB. The pages in physical memory above 4GB are then mapped into this window (and paged back into physical memory above 4GB when there is demand for space in thw window for other blocks) for the ORACLE.EXE process to be able to access them in its conventional address space.

If you add the registry key yourself, the datatype should be a string value, or a REG_SZ. The value for AWE_WINDOW_MEMORY must be specified in BYTES.

It is important to realize that any database blocks accessed by Oracle (or any user/background thread within ORACLE.EXE) must first be mapped into the ‘window’ defined by AWE_WINDOW_MEMORY. In this scenario, it does not matter where the blocks are physically located – there is no need to be concerned with where the blocks are physically residing. The window will be drawn around the block (i.e. the block will be mapped) wherever it is located in memory. If the block is in memory but has not been mapped into the ‘window’, then it may be necessary to unmapped another block that IS in the window, in order to accommodate the new block. While this mapping and unmapping of blocks does add some cost, it is still faster than incurring an I/O operation to read the block from disk. This will be discussed further down in the section on troubleshooting.
Note: Keep in mind that if there are multiple instances on a machine with the /PAE switch enabled, ALL instances can take advantage of the additional memory. However, AWE_WINDOW_MEMORY cannot be set on a per-instance basis, so all databases that are running out of the Oracle Home where AWE_WINDOW_MEMORY is set will inherit the same value.

Enabling AWE Support at the Database/Instance Level

To enable the AWE implementation on Oracle, you must set the following parameter in the instance parameter file (or spfile) used to start the instance:
USE_INDIRECT_DATA_BUFFERS=TRUE
Note again that the buffer cache MUST be defined using the parameter DB_BLOCK_BUFFERS, no matter what version of the RDBMS you are running. The feature allowing for Multiple block sizes in a database will be disabled if you set USE_INDIRECT_DATA_BUFFERS=TRUE, and you CANNOT specify the DB_CACHE_SIZE parameter to define the size of the buffer cache.

If you attempt to startup a database with this combination of parameters:
USE_INDIRECT_DATA_BUFFERS=TRUE
DB_CACHE_SIZE=xxxxx (Any number)
the startup will fail with the following error:
SQL> startup
ORA-00385: cannot enable Very Large Memory with new buffer cache parameters
You must change DB_CACHE_SIZE to use DB_BLOCK_BUFFERS instead.

AWE_WINDOW_MEMORY Within the 3GB Process Address Space

If you are using /PAE and the /3GB switch together, the address space for ORACLE.EXE will be 3GB. The value for AWE_WINDOW_MEMORY must come from the normal address space used by the ORACLE.EXE process. Memory that comes from that 3GB address space addressable by the ORACLE.EXE process includes the following:

  • The Value for AWE_WINDOW_MEMORY
  • The rest of the SGA (shared pool, large pool, java pool, redo log buffers, etc)
  • Overhead for ORACLE.EXE and DLL’s (65-100M depends on version & options)
  • Stack space for all threads (defaults to 1MB per thread, unless orastack is used)
  • PGA and UGA memory for all user sessions

Therefore, the value for AWE_WINDOW_MEMORY should be tuned such that mapping and unmapping operations are avoided as much as possible, while still allowing enough memory within the 3GB address space for the rest of the process memory that MUST fit within the 3GB (i.e. overhead, remaining SGA components and all user connection memory (stack + UGA + PGA) noted above).

The total size of the buffer cache can then be set to the amount of physical memory remaining above the 4GB barrier, plus AWE_WINDOW_MEMORY. On a machine with 12GB of RAM, using the default value of 1GB for AWE_WINDOW_MEMORY, your total buffer cache could theoretically be as high as 9GB:
(Total RAM – 4GB + AWE_WINDOW_MEMORY) = 12GB – 4GB + 1GB = 9GB
In reality, your maximum buffer cache size will be somewhat less than this, allowing for some overhead and additional processes running on the system.

Attempting to startup the database with a buffer cache larger than the maximum value as calculated above may result in the following errors:
ORA-27102 out of memory
OSD-00034 Message 34 not found; Product=RDBMS;facility =SOSD
O/S Error: (OS 8) Not enough storage is available to process this command
Note: If you are on Release 9.2, another possible cause for these errors is noted further down, in the troubleshooting section.
As mentioned above, the buffer cache must be specified using DB_BLOCK_BUFFERS rather than DB_CACHE_SIZE, so assuming an 8K block size (8192), to get a 9GB buffer cache, you would set the following init parameters:
DB_BLOCK_BUFFERS = 1179648
DB_BLOCK_SIZE = 8192

Troubleshooting AWE_WINDOW_MEMORY implementation

Minimum Value Required for AWE_WINDOW_MEMORY in 9.2 and Above

Here are key points to understand when using AWE_WINDOW_MEMORY:

  1. Under Oracle 8.1.7 we do NOT enforce a minimum value for AWE_WINDOW_MEMORY to be able to start the database.
  2. This was changed under Oracle9i Release 2, such that we DO enforce a minimum value for AWE_WINDOW_MEMORY. This change was done to help improve performance by enforcing a larger window size.
  3. You can alter the minimum required value for AWE_WINDOW_MEMORY under 9.2 by changing/setting the value of the parameter _DB_BLOCK_LRU_LATCHES. Under 8.1.7, this parameter was named DB_BLOCK_LRU_LATCHES. However, under 9.x, this parameter was changed to be a hidden parameter.

The minimum value for AWE_WINDOW_MEMORY starting with 9.2 is calculated as such:
MIN(AWE_WINDOW_MEMORY)=(4096 * DB_BLOCK_SIZE * _DB_BLOCK_LRU_LATCHES)/8
Starting with 9.2, to calculate the value for _DB_BLOCK_LRU_LATCHES, we need this formula:
_DB_BLOCK_LRU_LATCHES = (Max buffer pools * SETS_PER_POOL)

  • Max Buffer Pools is a constant = 8
  • SETS_PER_POOL is variable, and depends on whether or not VLM is enabled:

SETS_PER_POOL = 2*CPU_COUNT (if VLM is enabled)
SETS_PER_POOL= CPU_COUNT/2 (if VLM is NOT enabled)

Recall that VLM is enabled by setting USE_INDIRECT_DATA_BUFFERS=TRUE.

So, as you can see, the value for _DB_BLOCK_LRU_LATCHES in 9.2 and higher releases of Oracle is dependent on the number of CPUs in the box, and therefore MIN(AWE_WINDOW_MEMORY) is dependent on the # of CPUs as well as the DB_BLOCK_SIZE. The larger the Block Size, and the more CPUs in a system, the higher the value for MIN(AWE_WINDOW_MEMORY). Here are a couple of example configurations and caclulations showing MIN(AWE_WINDOW_MEMORY).
Example #1:

# of CPU’s = 8
DB_BLOCK_SIZE = 8192
Total RAM = 8GB

SETS_PER_POOL = 2 * CPU_COUNT = 16
_DB_BLOCK_LRU_LATCHES = (max buffer Pools * sets_per_pool) = 8*16 = 128
MIN(AWE_WINDOW_MEMORY) =(4096*DB_BLOCK_SIZE*_DB_BLOCK_LRU_LATCHES)/8 =
( 4096 * 8192 * 128) / 8 = 536870912 bytes = 512 MB

Example #2:

# of CPU’s = 16
DB_BLOCK_SIZE = 8192
Total RAM = 16 GB

SETS_PER_POOL = 2 * CPU_COUNT = 32
_DB_BLOCK_LRU_LATCHES = (max buffer Pools * sets_per_pool) = 8*32 = 256
MIN(AWE_WINDOW_MEMORY) =(4096*DB_BLOCK_SIZE*_DB_BLOCK_LRU_LATCHES)/8 =
( 4096 * 8192 * 256) / 8 = 1073741824 bytes = 1024 MB

The values above are the minimum values required for AWE_WINDOW_MEMORY to be set to, UNLESS you explicitly set _DB_BLOCK_LRU_LATCHES to a lower value. If AWE_WINDOW_MEMORY is not set to the minimum value, you will receive the following errors:
ORA-27102 out of memory
OSD-00034 Message 34 not found; Product=RDBMS;facility =SOSD
O/S Error: (OS 8) Not enough storage is available to process this command
If you receive these errors when trying to start the database under 9.2 or higher, this may be because the AWE_WINDOW_MEMORY value in the registry is set too low for the calculated minimum value. If you cannot increase the value for AWE_WINDOW_MEMORY, then you can explicitly set _DB_BLOCK_LRU_LATCHES to a value lower than the calculated value, and retry the startup.

_DB_BLOCK_LRU_LATCHES must be at least 8 (equal to the maximum number of buffer pools).

Note: Recall from the earlier section that these errors may also occur if you are trying to start up with a buffer cache that is too large for the  physical memory available.

Note: The same errors above have also been observed with a buffer cache that is too small. When USE_INDIRECT_DATA_BUFFERS is set to TRUE the value for DB_BLOCK_BUFFERS should equate to a buffer cache that is AT LEAST equal to AWE_WINDOW_MEMORY. In most cases, the total buffer cache size will be greater than AWE_WINDOW_MEMORY. If you attempt to start up with a buffer cache that is too small (i.e. < AWE_WINDOW_MEMORY) that may also result in the ORA-27102 error.

Note: It has been observed on some systems that you may need to add a few additional meg to AWE_WINDOW_MEMORY to calculate for overhead. Therefore, if you go through the above calculations, and the instance still does not start, try adding an additional 10 Meg or so to the calculated value.

Note: Also, keep in mind that when calculating the # of CPUs in the system, you have to take hyperthreading into account. On a hyperthreaded system, the OS will think that you have double the # of CPUs in the system over what you actually  have, and this is the number that must be used in the calculations.

CPU Spins Possible When Using AWE Implementation

Use caution when setting _DB_BLOCK_LRU_LATCHES or AWE_WINDOW_MEMORY too low. If we are unable to map a requested buffer into the window because all of the space defined by AWE_WINDOW_MEMORY is in use with buffers already actively being accessed, then we spin and wait, checking every so often until an existing buffer in the window can be unmapped, and a new buffer can be mapped in.

This spin will consume CPU cycles until enough buffers can be Mapped/Unmapped to satisfy the request. In some cases, there may be so many buffers needing to be mapped into the window, that DBWR will consume 100% of cycles on all CPUs, effectively locking up the machine. This is normal behavior. under some circumstances, and is simply an indication that AWE_WINDOW_MEMORY is too small.

Monitoring Mapping Operations in 9.2 and later releases

Starting with 9.2, we have added additional statistics which can be measured in V$SESSTAT (sesssion level statistics) and V$SYSSTAT (system wide statistics):
STATISTIC# NAME
———- ——————————
154 number of map operations
155 number of map misses
The following query will give you system wide information on map operations and map misses:
SQL> select * from v$sysstat where statistic# in
(select statistic# from v$statname where name like ‘number of map %’);
If the # of map misses is relatively high, or particularly of the # of map misses increases consistently over time, this may be an indication that the value for AWE_WINDOW_MEMORY is set too low.
Note: The statistic# values change from Oracle version to Oracle version, so you cannot easily query on the statistics 154 and 155. Instead you should check V$STATNAME to see which statistics numbers are associated with these statistics.

Automatic Shared Memory Management and AWE

Oracle10g introduces the concept of Automatic Shared Memory Management, whereby the Oracle kernel will dynamically adjust SGA parameters such as SHARED_POOL_SIZE, JAVA_POOL_SIZE, DB_CACHE_SIZE, etc.

This is enabled by setting the parameter SGA_TARGET to a non-zero value. However, in order for this to work properly, you must use DB_CACHE_SIZE for the buffer cache. When setting USE_INDIRECT_DATA_BUFFERS, you cannot set DB_CACHE_SIZE, as noted above. Therefore, SGA_TARGET should not be set when using AWE – these two features are mutually exclusive. When setting USE_INDIRECT_DATA_BUFFERS=TRUE on Oracle10g and higher Oracle releases, you should also set SGA_TARGET to 0.

Diagnosing Spins Associated With AWE in 8.1.x

The above statistics are not available in 8.1.7, so if you are encountering problems with CPU spins, with AWE_WINDOW_MEMORY enabled, it is more difficult to diagnose.

Any diagnosis can start by identifying and monitoring the thread associated with DBWR via the following query:
SQL> select b.name, p.spid from v$process p, v$bgprocess b
where p.addr=b.paddr;

NAME SPID
—– ———
PMON 1900
DBW0 1956
LGWR 572
CKPT 1908
SMON 1808
RECO 920
SNP0 1784
SNP1 1892
SNP2 1896
SNP3 1844

10 rows selected.
As you can see, DBWR has an SPID of 1956, which will equate to the thread ID of that thread within the Oracle executable. This thread can then be monitored using Performance Monitor and/or the PSLIST utility, which is available as a free download from http://www.sysinternals.com

If your monitoring shows that DBWR is consuming excessive CPU, you can attempt to get an error stack from that thread using oradebug:
SQL> oradebug setospid 1956
Oracle pid: 3, Windows thread id: 1956, image: ORACLE.EXE
SQL> oradebug unlimit
Statement processed.
SQL> oradebug dump errorstack 3
Statement processed.
This should dump the error stack to the DBWR trace file, generated in the background dump destination directory. If the error stack contains the function SKGMMAP, this is an indication that DBWR is working to map/unmap database block buffers.
Note: In 8.1.7 of the RDBMS, you cannot use DBWR_IO_SLAVES in combination with USE_INDIRECT_DATA_BUFFERS, due to Bug:3042660 and Bug:2215894. You must leave DBWR_IO_SLAVES at its default value – otherwise, buffers are not unmapped and eventually a spin of the process will result. This problem is resolved in 9.2.0.1 – the fix is NOT backported to 8.1.7.

Minimal downtime database upgrade from Oracle 10g to Oracle 12c

Minimal downtime database upgrade from Oracle 10g to Oracle 12c

This note describes the procedure of migrating as well as upgrading an Oracle 10g Release 2 database to Oracle 12c (12.1.0.2) using a combination of RMAN Incremental backups and the new Oracle 12c command line parallel upgrade utility.

This method minimizes the outage required for the migration as well as database upgrade and the outage is limited to the time it takes to backup the last set of archive log files generated since the last Level 1 incremental backup and the time taken to run the catupgrd.sql upgrade script (which can now be run from the command line in parallel).

In this example we are moving a database from one Linux host 5.3 to another Linux 5.7 host, moving from ASM to non-ASM as well as upgrading the database.

Let us take a look at the steps involved.

Copy the new 12c Pre-Upgrade scripts to the Oracle 10g database server and execute it in the Oracle 10.2.0.5 database

[oracle@cls18 ~]$ mkdir preupgrade

[oracle@cls18 ~]$ cd preupgrade/

[oracle@cls18 preupgrade]$ scp -rp oracle@198.168.82.211:/app/oracle/product/12.1.0.2/dbhome_1/preupgrade/* .

oracle@198.168.82.211’s password:

emremove.sql      100%   19KB  19.2KB/s   00:00

preupgrd.sql        100%   14KB  13.8KB/s   00:00

utluppkg.sql         100%  484KB 483.9KB/s   00:00

[oracle@cls18 preupgrade]$ sqlplus sys as sysdba

SQL*Plus: Release 10.2.0.5.0 – Production on Mon Dec 1 09:25:44 2014

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

Enter password:

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 – 64bit Production

With the Partitioning, Real Application Clusters, OLAP, Data Mining

and Real Application Testing options

SQL> @preupgrd.sql

Loading Pre-Upgrade Package…

***************************************************************************

Executing Pre-Upgrade Checks in DEV18…

***************************************************************************

************************************************************

====>> ERRORS FOUND for DEV18 <<====

The following are *** ERROR LEVEL CONDITIONS *** that must be addressed

prior to attempting your upgrade.

Failure to do so will result in a failed upgrade.

1) Check Tag:    COMPATIBLE_PARAMETER

Check Summary: Verify compatible parameter value is valid

Fixup Summary:

“”compatible” parameter must be increased manually prior to upgrade.”

+++ Source Database Manual Action Required +++

2) Check Tag:    PURGE_RECYCLEBIN

Check Summary: Check that recycle bin is empty prior to upgrade

Fixup Summary:

“The recycle bin will be purged.”

You MUST resolve the above errors prior to upgrade

************************************************************

************************************************************

====>> PRE-UPGRADE RESULTS for DEV18 <<====

ACTIONS REQUIRED:

  1. Review results of the pre-upgrade checks:

/app/DEV18/product/product/10.2.0/db_1/cfgtoollogs/DEV18/preupgrade/preupgrade.log

  1. Execute in the SOURCE environment BEFORE upgrade:

/app/DEV18/product/product/10.2.0/db_1/cfgtoollogs/DEV18/preupgrade/preupgrade_fixups.sql

  1. Execute in the NEW environment AFTER upgrade:

/app/DEV18/product/product/10.2.0/db_1/cfgtoollogs/DEV18/preupgrade/postupgrade_fixups.sql

************************************************************

***************************************************************************

Pre-Upgrade Checks in DEV18 Completed.

***************************************************************************

***************************************************************************

***************************************************************************

SQL>

Review the preupgrade.log file

[oracle@cls18 preupgrade]$ cat /app/DEV18/product/product/10.2.0/db_1/cfgtoollogs/DEV18/preupgrade/preupgrade.log

Oracle Database Pre-Upgrade Information Tool 12-01-2014 09:26:09

Script Version: 12.1.0.2.0 Build: 006

**********************************************************************

Database Name:  DEV18

Container Name:  Not Applicable in Pre-12.1 database

Container ID:  Not Applicable in Pre-12.1 database

Version:  10.2.0.5.0

Compatible:  10.2.0.3.0

Blocksize:  8192

Platform:  Linux x86 64-bit

Timezone file:  V14

**********************************************************************

[Update parameters]

–> If Target Oracle is 64-bit, refer here for Update Parameters:

WARNING: –> “sga_target” needs to be increased to at least 650117120

**********************************************************************

**********************************************************************

[Renamed Parameters]

[No Renamed Parameters in use]

**********************************************************************

**********************************************************************

[Obsolete/Deprecated Parameters]

–> background_dump_dest         11.1       DESUPPORTED  replaced by  “diagnostic_dest”

–> user_dump_dest               11.1       DESUPPORTED  replaced by  “diagnostic_dest”

[Changes required in Oracle Database init.ora or spfile]

**********************************************************************

[Component List]

**********************************************************************

–> Oracle Catalog Views                   [upgrade]  VALID

–> Oracle Packages and Types              [upgrade]  VALID

–> JServer JAVA Virtual Machine           [upgrade]  VALID

–> Oracle XDK for Java                    [upgrade]  VALID

–> Real Application Clusters              [upgrade]  VALID

–> Oracle Workspace Manager               [upgrade]  VALID

–> OLAP Analytic Workspace                [upgrade]  VALID

–> Oracle Enterprise Manager Repository   [upgrade]  VALID

–> Oracle Text                            [upgrade]  VALID

–> Oracle XML Database                    [upgrade]  VALID

–> Oracle Java Packages                   [upgrade]  VALID

–> Oracle Multimedia                      [upgrade]  VALID

–> Oracle Spatial                         [upgrade]  VALID

–> Data Mining                            [upgrade]  VALID

–> Expression Filter                      [upgrade]  VALID

–> Rule Manager                           [upgrade]  VALID

–> Oracle OLAP API                        [upgrade]  VALID

**********************************************************************

[Tablespaces]

**********************************************************************

–> SYSTEM tablespace is adequate for the upgrade.

minimum required size: 1259 MB

–> UNDOTBS1 tablespace is adequate for the upgrade.

minimum required size: 400 MB

–> SYSAUX tablespace is adequate for the upgrade.

minimum required size: 1552 MB

–> TEMP tablespace is adequate for the upgrade.

minimum required size: 60 MB

[No adjustments recommended]

**********************************************************************

**********************************************************************

[Pre-Upgrade Checks]

**********************************************************************

ERROR: –> Compatible set too low

“compatible” currently set at 10.2.0.3.0 and must

be set to at least 11.0.0 prior to upgrading the database.

Do not make this change until you are ready to upgrade

because a downgrade back to 10.2 is not possible once compatible

has been raised.

Update your init.ora or spfile to make this change.

WARNING: –> “ORACLE_OCM” user found in database

This is an internal account used by Oracle Configuration Manager.

Please drop this user prior to upgrading.

WARNING: –> Enterprise Manager Database Control repository found in the database

In Oracle Database 12c, Database Control is removed during

the upgrade. To save time during the Upgrade, this action

can be done prior to upgrading using the following steps after

copying rdbms/admin/emremove.sql from the new Oracle home

– Stop EM Database Control:

$> emctl stop dbconsole

– Connect to the Database using the SYS account AS SYSDBA:

SET ECHO ON;

SET SERVEROUTPUT ON;

@emremove.sql

Without the set echo and serveroutput commands you will not

be able to follow the progress of the script.

WARNING: –> “DMSYS” schema exists in the database

The DMSYS schema (Oracle Data Mining) will be removed

from the database during the database upgrade.

All data in DMSYS will be preserved under the SYS schema.

Refer to the Oracle Data Mining User’s Guide for details.

WARNING: –> Database contains INVALID objects prior to upgrade

The list of invalid SYS/SYSTEM objects was written to

registry$sys_inv_objs.

The list of non-SYS/SYSTEM objects was written to

registry$nonsys_inv_objs unless there were over 5000.

Use utluiobj.sql after the upgrade to identify any new invalid

objects due to the upgrade.

INFORMATION: –> OLAP Catalog(AMD) exists in database

Starting with Oracle Database 12c, OLAP Catalog component is desupported.

If you are not using the OLAP Catalog component and want

to remove it, then execute the

ORACLE_HOME/olap/admin/catnoamd.sql script before or

after the upgrade.

INFORMATION: –> Older Timezone in use

Database is using a time zone file older than version 18.

After the upgrade, it is recommended that DBMS_DST package

be used to upgrade the 10.2.0.5.0 database time zone version

to the latest version which comes with the new release.

Please refer to My Oracle Support note number 977512.1 for details.

ERROR: –> RECYCLE_BIN not empty.

Your recycle bin contains 56 object(s).

It is REQUIRED that the recycle bin is empty prior to upgrading.

Immediately before performing the upgrade, execute the following

command:

EXECUTE dbms_preup.purge_recyclebin_fixup;

WARNING: –> Existing schemas with network ACLs exist

Database contains schemas with objects dependent on network packages.

Refer to the Upgrade Guide for instructions to configure Network ACLs.

USER UTILITY has dependent objects.

USER DBAMON has dependent objects.

USER ORACLE_OCM has dependent objects.

INFORMATION: –> There are existing Oracle components that will NOT be

upgraded by the database upgrade script.  Typically, such components

have their own upgrade scripts, are deprecated, or obsolete.

Those components are:  OLAP Catalog

**********************************************************************

[Pre-Upgrade Recommendations]

**********************************************************************

*****************************************

********* Dictionary Statistics *********

*****************************************

Please gather dictionary statistics 24 hours prior to

upgrading the database.

To gather dictionary statistics execute the following command

while connected as SYSDBA:

EXECUTE dbms_stats.gather_dictionary_stats;

^^^ MANUAL ACTION SUGGESTED ^^^

**********************************************************************

[Post-Upgrade Recommendations]

**********************************************************************

*****************************************

******** Fixed Object Statistics ********

*****************************************

Please create stats on fixed objects two weeks

after the upgrade using the command:

EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;

^^^ MANUAL ACTION SUGGESTED ^^^

**********************************************************************

************  Summary  ************

2 ERRORS exist that must be addressed prior to performing your upgrade.

5 WARNINGS that Oracle suggests are addressed to improve database performance.

3 INFORMATIONAL messages that should be reviewed prior to your upgrade.

After your database is upgraded and open in normal mode you must run

rdbms/admin/catuppst.sql which executes several required tasks and completes

the upgrade process.

You should follow that with the execution of rdbms/admin/utlrp.sql, and a

comparison of invalid objects before and after the upgrade using

rdbms/admin/utluiobj.sql

If needed you may want to upgrade your timezone data using the process

described in My Oracle Support note 1509653.1

***********************************

In the Oracle 10g database execute the Pre-Upgrade fixup scripts

SQL>   EXECUTE dbms_preup.purge_recyclebin_fixup;

PL/SQL procedure successfully completed.

SQL> EXECUTE dbms_stats.gather_dictionary_stats;

PL/SQL procedure successfully completed.

SQL> SET ECHO ON;

SQL> SET SERVEROUTPUT ON;

SQL> @emremove.sql

…..

Dropping synonym : MGMT$TARGET_PROPERTIES …

Dropping synonym : MGMT$TARGET_TYPE …

Finished phase 5

Starting phase 6 : Dropping Oracle Enterprise Manager related other roles …

Finished phase 6

The Oracle Enterprise Manager related schemas and objects are dropped.

Do the manual steps to studown the DB Control if not done before running this

script and then delete the DB Control configuration files

PL/SQL procedure successfully completed.

Take a level 0 RMAN Incremental backup

RMAN> run {

2> allocate channel c1 type disk;

3> backup incremental level 0 database format ‘/app/DEV18/oradump/bkp_lev0.%U’;

4> release channel c1;

5> }

released channel: ORA_SBT_TAPE_1

released channel: ORA_SBT_TAPE_2

released channel: ORA_SBT_TAPE_3

released channel: ORA_SBT_TAPE_4

released channel: ORA_SBT_TAPE_5

allocated channel: c1

channel c1: sid=266 instance=DEV181 devtype=DISK

Starting backup at 01-DEC-14

channel c1: starting incremental level 0 datafile backupset

channel c1: specifying datafile(s) in backupset

input datafile fno=00010 name=+DEV18_DATA_01/DEV18/datafile/utility_data.266.798291365

input datafile fno=00003 name=+DEV18_DATA_01/DEV18/datafile/sysaux.257.747180651

input datafile fno=00015 name=+DEV18_DATA_01/DEV18/datafile/rpo_data.276.798291365

input datafile fno=00020 name=+DEV18_DATA_01/DEV18/datafile/dw_data.282.821809927

channel c1: starting piece 1 at 01-DEC-14

channel c1: finished piece 1 at 01-DEC-14

piece handle=/app/DEV18/oradump/bkp_lev0.8ppp2gus_1_1 tag=TAG20141201T094147 comment=NONE

channel c1: backup set complete, elapsed time: 00:00:25

Finished backup at 01-DEC-14

Starting Control File and SPFILE Autobackup at 01-DEC-14

piece handle=/app/DEV18/product/product/10.2.0/db_1/dbs/c-1508569629-20141201-00 comment=NONE

Finished Control File and SPFILE Autobackup at 01-DEC-14

released channel: c1

Copy the password file and init.ora from 10g source to Oracle 12c target database environment

oracle@cls18 dbs]$ scp -rp orapwDEV181 oracle@198.168.82.211:/app/oracle/product/12.1.0/dbhome_1/dbs

oracle@198.168.82.211’s password:

orapwDEV181  100% 1536     1.5KB/s   00:00

[oracle@cls18 dbs]$ scp -rp initDEV181.ora oracle@198.168.82.211:/app/oracle/product/12.1.0/dbhome_1/dbs

oracle@198.168.82.211’s password:

initDEV181.ora

Edit the init.ora parameter file in the 12c database environment and make changes like ….

remove deprecated 10g parameters like background and core dumps

change compatible

add diagnostic_dest

change control file location as in this example we are moving from ASM source on 10g to non-ASM target in 12c

add db_file_name_convert and log_file_name_convert

In the Oracle 12c environment start the instance in NOMOUNT state

[oracle@vosap02 dbs]$ export ORACLE_SID=DEV181

[oracle@vosap02 dbs]$ sqlplus sys as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Sun Nov 30 23:08:13 2014

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Enter password:

Connected to an idle instance.

SQL> startup nomount;

ORACLE instance started.

Total System Global Area  880803840 bytes

Fixed Size                  2930416 bytes

Variable Size             469764368 bytes

Database Buffers          402653184 bytes

Redo Buffers                5455872 bytes

Restore control file backup

[oracle@vosap02 backup]$ pwd

/app/oracle/oradata/DEV181/backup

[oracle@vosap02 backup]$ ls

bkp_lev0.8ppp2gus_1_1  c-1508569629-20141201-00

[oracle@vosap02 backup]$ rman target /

Recovery Manager: Release 12.1.0.2.0 – Production on Sun Nov 30 23:14:52 2014

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

connected to target database: DEV18 (not mounted)

RMAN> restore controlfile from ‘/app/oracle/oradata/DEV181/backup/c-1508569629-20141201-00’;

Starting restore at 30-NOV-14

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=12 device type=DISK

channel ORA_DISK_1: restoring control file

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

output file name=/app/oracle/oradata/DEV181/control01.ctl

output file name=/app/oracle/oradata/DEV181/control02.ctl

output file name=/app/oracle/oradata/DEV181/control03.ctl

Finished restore at 30-NOV-14

RMAN> alter database mount;

Statement processed

released channel: ORA_DISK_1

RMAN> catalog start with ‘/app/oracle/oradata/DEV181/backup’;

searching for all files that match the pattern /app/oracle/oradata/DEV181/backup

List of Files Unknown to the Database

=====================================

File Name: /app/oracle/oradata/DEV181/backup/bkp_lev0.8ppp2gus_1_1

File Name: /app/oracle/oradata/DEV181/backup/c-1508569629-20141201-00

Do you really want to catalog the above files (enter YES or NO)? YES

cataloging files…

cataloging done

List of Cataloged Files

=======================

File Name: /app/oracle/oradata/DEV181/backup/bkp_lev0.8ppp2gus_1_1

File Name: /app/oracle/oradata/DEV181/backup/c-1508569629-20141201-00Regards,

Restore Level 0 backup

In this example we are changing the data file names at the database level via the SET NEWNAME FOR DATABASE command.

We can also change the data file names at the individual data file level using the SET NEWNAME FOR DATAFILE command

RMAN>  run {

2> allocate channel c1 type disk;

3> allocate channel c2 type disk;

4> SET NEWNAME FOR DATABASE   TO  ‘/app/oracle/oradata/DEV181/%b’;

5> SET NEWNAME FOR tempfile  1 TO  ‘/app/oracle/oradata/DEV181/%b’;

6> restore database;

7> switch datafile all;

8> switch tempfile all;

9> release channel c1;

10> release channel c2;

11> }

allocated channel: c1

channel c1: SID=12 device type=DISK

allocated channel: c2

channel c2: SID=249 device type=DISK

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 30-NOV-14

channel c1: starting datafile backup set restore

channel c1: specifying datafile(s) to restore from backup set

channel c1: restoring datafile 00001 to /app/oracle/oradata/DEV181/system.256.747180649

channel c1: restoring datafile 00002 to /app/oracle/oradata/DEV181/undotbs1.258.747180651

channel c1: restoring datafile 00003 to /app/oracle/oradata/DEV181/sysaux.257.747180651

channel c1: reading from backup piece /app/DEV18/oradump/bkp_lev0.8ppp2gus_1_1

channel c1: errors found reading piece handle=/app/DEV18/oradump/bkp_lev0.8ppp2gus_1_1

channel c1: failover to piece handle=/app/oracle/oradata/DEV181/backup/bkp_lev0.8ppp2gus_1_1 tag=TAG20141201T094147

channel c1: restored backup piece 1

channel c1: restore complete, elapsed time: 00:00:15

Finished restore at 30-NOV-14

datafile 1 switched to datafile copy

input datafile copy RECID=18 STAMP=865034590 file name=/app/oracle/oradata/DEV181/system.256.747180649

datafile 2 switched to datafile copy

input datafile copy RECID=19 STAMP=865034590 file name=/app/oracle/oradata/DEV181/undotbs1.258.747180651

datafile 3 switched to datafile copy

input datafile copy RECID=20 STAMP=865034591 file name=/app/oracle/oradata/DEV181/sysaux.257.747180651

datafile 4 switched to datafile copy

input datafile copy RECID=21 STAMP=865034591 file name=/app/oracle/oradata/DEV181/users.259.747180651

input datafile copy RECID=33 STAMP=865034591 file name=/app/oracle/oradata/DEV181/dw_data.282.821809927

datafile 21 switched to datafile copy

input datafile copy RECID=34 STAMP=865034591 file name=/app/oracle/oradata/DEV181/gg_data.283.838134609

renamed tempfile 1 to /app/oracle/oradata/DEV181/temp.264.747180711 in control file

renamed tempfile 2 to /app/oracle/oradata/DEV181/temp_others.281.798291417 in control file

released channel: c1

released channel: c2

Take a level 0 RMAN Incremental backup

At this stage there is no application outage and to simulate that we make some changes in the source 10g database

SQL> create table system.myobjects_1

2  tablespace users as select * from dba_objects;

Table created.

[oracle@cls18 oradump]$ rman target /

Recovery Manager: Release 10.2.0.5.0 – Production on Mon Dec 1 12:29:49 2014

Copyright (c) 1982, 2007, Oracle. All rights reserved.

connected to target database: DEV18 (DBID=1508569629)

RMAN> run {
allocate channel c1 type disk;
backup incremental level 1 database format ‘/app/DEV18/oradump/bkp_lev1.%U’;
release channel c1;
}
2> 3> 4> 5>
using target database control file instead of recovery catalog
allocated channel: c1
channel c1: sid=238 instance=DEV181 devtype=DISK

Starting backup at 01-DEC-14
channel c1: starting incremental level 1 datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00010 name=+DEV18_DATA_01/DEV18/datafile/utility_data.266.798291365
input datafile fno=00003 name=+DEV18_DATA_01/DEV18/datafile/sysaux.257.747180651

input datafile fno=00020 name=+DEV18_DATA_01/DEV18/datafile/dw_data.282.821809927
channel c1: starting piece 1 at 01-DEC-14
channel c1: finished piece 1 at 01-DEC-14
piece handle=/app/DEV18/oradump/bkp_lev1.8rpp2qri_1_1 tag=TAG20141201T123040 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:07
Finished backup at 01-DEC-14

Starting Control File and SPFILE Autobackup at 01-DEC-14
piece handle=/app/DEV18/product/product/10.2.0/db_1/dbs/c-1508569629-20141201-01 comment=NONE
Finished Control File and SPFILE Autobackup at 01-DEC-14

released channel: c1

Copy the level 1 incremental backup to target and register

[oracle@cls18 oradump]$ scp -rp bkp_lev1.8rpp2qri_1_1 oracle@198.168.82.211:/app/oracle/oradata/DEV181/backup                   oracle@198.168.82.211’s password:

bkp_lev1.8rpp2qri_1_1   100%  108MB  18.0MB/s   00:06

RMAN> catalog start with ‘/app/oracle/oradata/DEV181/backup’;

searching for all files that match the pattern /app/oracle/oradata/DEV181/backup

List of Files Unknown to the Database

=====================================

File Name: /app/oracle/oradata/DEV181/backup/bkp_lev1.8rpp2qri_1_1

Do you really want to catalog the above files (enter YES or NO)? YES

cataloging files…

cataloging done

List of Cataloged Files

=======================

File Name: /app/oracle/oradata/DEV181/backup/bkp_lev1.8rpp2qri_1_1RMAN>

Recover the database – note it will fail when it tries to apply a non-existent archive log file

RMAN> run {

2> allocate channel c1 type disk;

3> recover database;

4> }

allocated channel: c1

channel c1: SID=12 device type=DISK

Starting recover at 30-NOV-14

channel c1: starting incremental datafile backup set restore

channel c1: specifying datafile(s) to restore from backup set

destination for restore of datafile 00001: /app/oracle/oradata/DEV181/system.256.747180649

destination for restore of datafile 00002: /app/oracle/oradata/DEV181/undotbs1.258.747180651

destination for restore of datafile 00003: /app/oracle/oradata/DEV181/sysaux.257.747180651…

destination for restore of datafile 00021: /app/oracle/oradata/DEV181/gg_data.283.838134609

channel c1: reading from backup piece /app/oracle/oradata/DEV181/backup/bkp_lev1.8rpp2qri_1_1

channel c1: piece handle=/app/oracle/oradata/DEV181/backup/bkp_lev1.8rpp2qri_1_1 tag=TAG20141201T123040

channel c1: restored backup piece 1

channel c1: restore complete, elapsed time: 00:00:03

starting media recovery

unable to find archived log

archived log thread=1 sequence=53490

released channel: c1

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of recover command at 11/30/2014 23:36:09

RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 53490 and starting SCN of 5982863583825

RMAN>

Let us make some more changes in the database – perform a final archive logfile switch to ensure all changes written to disk from log buffer cache

OUTAGE STARTS NOW!

SQL> create table system.myobjects_2

2  tablespace users as select * from dba_objects;

Table created.

SQL> alter system switch logfile;

System altered

Take a backup of the archive log files generated since the last Level 1 incremental backup using the command

BACKUP ARCHIVELOG ALL NOT BACKED UP 1 TIMES

Copy the archivelog backup to target and register

[oracle@cls18 oradump]$ scp -rp bkp_arch.8tpp2rb6_1_1 oracle@198.168.82.211:/app/oracle/oradata/DEV181/backup

oracle@198.168.82.211’s password:

bkp_arch.8tpp2rb6_1_1   100% 2101MB  19.3MB/s   01:49

RMAN> catalog start with ‘/app/oracle/oradata/DEV181/backup’;

searching for all files that match the pattern /app/oracle/oradata/DEV181/backup

List of Files Unknown to the Database

=====================================

File Name: /app/oracle/oradata/DEV181/backup/bkp_arch.8tpp2rb6_1_1

Do you really want to catalog the above files (enter YES or NO)? YES

cataloging files…

cataloging done

List of Cataloged Files

=======================

File Name: /app/oracle/oradata/DEV181/backup/bkp_arch.8tpp2rb6_1_1

Run a LIST BACKUP OF ARCHIVELOG command and note the last archive log file which has been backed up

RMAN> list backup of archivelog all;

1    53495   5982863638922 01-DEC-14 5982863650457 01-DEC-14

1    53496   5982863650457 01-DEC-14 5982863662947 01-DEC-14

1    53497   5982863662947 01-DEC-14 5982863673387 01-DEC-14

1    53498   5982863673387 01-DEC-14 5982863674424 01-DEC-14

1    53499   5982863674424 01-DEC-14 5982863674684 01-DEC-14

Recover the database until the sequence number noted above + 1 (53499+1)

oracle@vosap02 backup]$ rman target /

Recovery Manager: Release 12.1.0.2.0 – Production on Sun Nov 30 23:44:43 2014

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

connected to target database: DEV18 (DBID=1508569629, not open)

RMAN> run {

2> allocate channel c1 type disk;

3> set until sequence 53500 thread 1;

4> recover database;

5> }

using target database control file instead of recovery catalog

allocated channel: c1

channel c1: SID=12 device type=DISK

executing command: SET until clause

Starting recover at 30-NOV-14

starting media recovery

channel c1: starting archived log restore to default destination

channel c1: restoring archived log

archived log thread=1 sequence=53490

channel c1: restoring archived log

channel c1: restoring archived log

archived log thread=1 sequence=53498

channel c1: restoring archived log

archived log thread=1 sequence=53499

channel c1: reading from backup piece /app/oracle/oradata/DEV181/backup/bkp_arch.8tpp2rb6_1_1

channel c1: piece handle=/app/oracle/oradata/DEV181/backup/bkp_arch.8tpp2rb6_1_1 tag=TAG20141201T123859

channel c1: restored backup piece 1

channel c1: restore complete, elapsed time: 00:00:03

archived log file name=/app/oracle/oradata/DEV181/arch/1_53490_747180704.log thread=1 sequence=53490

archived log file name=/app/oracle/oradata/DEV181/arch/1_53491_747180704.log thread=1 sequence=53491

archived log file name=/app/oracle/oradata/DEV181/arch/1_53492_747180704.log thread=1 sequence=53492

archived log file name=/app/oracle/oradata/DEV181/arch/1_53493_747180704.log thread=1 sequence=53493

archived log file name=/app/oracle/oradata/DEV181/arch/1_53494_747180704.log thread=1 sequence=53494

archived log file name=/app/oracle/oradata/DEV181/arch/1_53495_747180704.log thread=1 sequence=53495

archived log file name=/app/oracle/oradata/DEV181/arch/1_53496_747180704.log thread=1 sequence=53496

archived log file name=/app/oracle/oradata/DEV181/arch/1_53497_747180704.log thread=1 sequence=53497

archived log file name=/app/oracle/oradata/DEV181/arch/1_53498_747180704.log thread=1 sequence=53498

archived log file name=/app/oracle/oradata/DEV181/arch/1_53499_747180704.log thread=1 sequence=53499

media recovery complete, elapsed time: 00:00:02

Finished recover at 30-NOV-14

released channel: c1

Open the database with RESETLOGS UPGRADE

Ignore the error related to block change tracking – we will disable that.

RMAN> alter database open resetlogs upgrade;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of sql statement command at 11/30/2014 23:47:30

ORA-19751: could not create the change tracking file

ORA-19750: change tracking file: ‘+DEV18_DATA_01/DEV18/changetracking/ctf.278.864472519’

ORA-17502: ksfdcre:1 Failed to create file +DEV18_DATA_01/DEV18/changetracking/ctf.278.864472519

ORA-17501: logical block size 4294967295 is invalid

ORA-29701: unable to connect to Cluster Synchronization Service

ORA-17503: ksfdopn:2 Failed to open file +DEV18_DATA_01/DEV18/changetracking/ctf.278.864472519

ORA-15001: diskgroup “DEV18_DATA_01” does not exist or

SQL> alter database disable block change tracking;

Database altered.

Shut down the database and open it in the Oracle 12c environment in STARTUP UPGRADE mode

[oracle@vosap02 backup]$ sqlplus sys as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Mon Dec 1 02:08:11 2014

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Enter password:

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> shutdown immediate;

ORA-01109: database not open

Database dismounted.

ORACLE instance shut down.

SQL> startup upgrade;

ORACLE instance started.

Total System Global Area  880803840 bytes

Fixed Size                  2930416 bytes

Variable Size             469764368 bytes

Database Buffers          402653184 bytes

Redo Buffers                5455872 bytes

Database mounted.

Database opened.

Execute the catctl.pl perl script which will call the catupgrd.sql in parallel mode

[oracle@vosap02 oracle]$ cd $ORACLE_HOME/rdbms/admin

$ORACLE_HOME/perl/bin/perl catctl.pl -n 4 -l /app/oracle catupgrd.sql

[oracle@vosap02 admin]$ $ORACLE_HOME/perl/bin/perl catctl.pl -n 4 -l /app/oracle catupgrd.sql

Argument list for [catctl.pl]

SQL Process Count     n = 4

SQL PDB Process Count N = 0

Input Directory       d = 0

Phase Logging Table   t = 0

Log Dir               l = /app/oracle

Script                s = 0

Serial Run            S = 0

Upgrade Mode active   M = 0

Start Phase           p = 0

End Phase             P = 0

Log Id                i = 0

Run in                c = 0

Do not run in         C = 0

Echo OFF              e = 1

No Post Upgrade       x = 0

Reverse Order         r = 0

Open Mode Normal      o = 0

Debug catcon.pm       z = 0

Debug catctl.pl       Z = 0

Display Phases        y = 0

Child Process         I = 0

catctl.pl version: 12.1.0.2.0

Oracle Base           = /app/oracle

Analyzing file catupgrd.sql

Log files in /app/oracle

catcon: ALL catcon-related output will be written to /app/oracle/catupgrd_catcon_26248.lst

catcon: See /app/oracle/catupgrd*.log files for output generated by scripts

catcon: See /app/oracle/catupgrd_*.lst files for spool files, if any

Number of Cpus        = 2

SQL Process Count     = 4

——————————————————

Phases [0-73]

Serial   Phase #: 0 Files: 1     Time: 138s

Serial   Phase #: 1 Files: 5     Time: 31s

Restart  Phase #: 2 Files: 1     Time: 0s

Parallel Phase #: 3 Files: 18    Time: 9s

Restart  Phase #: 4 Files: 1     Time: 0s

Serial   Phase #: 5 Files: 5     Time: 14s

Serial   Phase #: 6 Files: 1     Time: 10s

Serial   Phase #: 7 Files: 4     Time: 5s

Restart  Phase #: 8 Files: 1     Time: 1s

Parallel Phase #: 9 Files: 62    Time: 26s

Restart  Phase #:10 Files: 1     Time: 0s

Serial   Phase #:11 Files: 1     Time: 10s

Restart  Phase #:12 Files: 1     Time: 0s

Parallel Phase #:13 Files: 91    Time: 9s

Restart  Phase #:14 Files: 1     Time: 0s

Parallel Phase #:15 Files: 111   Time: 14s

Restart  Phase #:16 Files: 1     Time: 0s

Serial   Phase #:17 Files: 3     Time: 0s

Restart  Phase #:18 Files: 1     Time: 0s

Parallel Phase #:19 Files: 32    Time: 19s

Restart  Phase #:20 Files: 1     Time: 0s

Serial   Phase #:21 Files: 3     Time: 5s

Restart  Phase #:22 Files: 1     Time: 0s

Parallel Phase #:23 Files: 23    Time: 69s

Restart  Phase #:24 Files: 1     Time: 0s

Parallel Phase #:25 Files: 11    Time: 39s

Restart  Phase #:26 Files: 1     Time: 0s

Serial   Phase #:27 Files: 1     Time: 0s

Restart  Phase #:28 Files: 1     Time: 0s

Serial   Phase #:30 Files: 1     Time: 0s

Serial   Phase #:31 Files: 257   Time: 15s

Serial   Phase #:32 Files: 1     Time: 0s

Restart  Phase #:33 Files: 1     Time: 0s

Serial   Phase #:34 Files: 1     Time: 3s

Restart  Phase #:35 Files: 1     Time: 0s

Restart  Phase #:36 Files: 1     Time: 0s

Serial   Phase #:37 Files: 4     Time: 44s

Restart  Phase #:38 Files: 1     Time: 0s

Parallel Phase #:39 Files: 13    Time: 50s

Restart  Phase #:40 Files: 1     Time: 0s

Parallel Phase #:41 Files: 10    Time: 6s

Restart  Phase #:42 Files: 1     Time: 0s

Serial   Phase #:43 Files: 1     Time: 6s

Restart  Phase #:44 Files: 1     Time: 0s

Serial   Phase #:45 Files: 1     Time: 39s

Serial   Phase #:46 Files: 1     Time: 0s

Restart  Phase #:47 Files: 1     Time: 0s

Serial   Phase #:48 Files: 1     Time: 99s

Restart  Phase #:49 Files: 1     Time: 0s

Serial   Phase #:50 Files: 1     Time: 113s

Restart  Phase #:51 Files: 1     Time: 0s

Serial   Phase #:52 Files: 1     Time: 21s

Restart  Phase #:53 Files: 1     Time: 0s

Serial   Phase #:54 Files: 1     Time: 162s

Restart  Phase #:55 Files: 1     Time: 0s

Serial   Phase #:56 Files: 1     Time: 48s

Restart  Phase #:57 Files: 1     Time: 0s

Serial   Phase #:58 Files: 1     Time: 154s

Restart  Phase #:59 Files: 1     Time: 0s

Serial   Phase #:60 Files: 1     Time: 242s

Restart  Phase #:61 Files: 1     Time: 0s

Serial   Phase #:62 Files: 1     Time: 36s

Restart  Phase #:63 Files: 1     Time: 0s

Serial   Phase #:64 Files: 1     Time: 2s

Serial   Phase #:65 Files: 1 Calling sqlpatch with LD_LIBRARY_PATH=/app/oracle/product/12.1.0/dbhome_1/lib; export LD_LIBRARY_PATH;/app/oracle/product/12.1.0/dbhome_1/perl/bin/perl -I /app/oracle/product/12.1.0/dbhome_1/rdbms/admin -I /app/oracle/product/12.1.0/dbhome_1/rdbms/admin/../../sqlpatch /app/oracle/product/12.1.0/dbhome_1/rdbms/admin/../../sqlpatch/sqlpatch.pl -verbose -upgrade_mode_only > /app/oracle/catupgrd_datapatch_upgrade.log 2> /app/oracle/catupgrd_datapatch_upgrade.err

returned from sqlpatch

Time: 21s

Serial   Phase #:66 Files: 1     Time: 31s

Serial   Phase #:68 Files: 1     Time: 0s

Serial   Phase #:69 Files: 1 Calling sqlpatch with LD_LIBRARY_PATH=/app/oracle/product/12.1.0/dbhome_1/lib; export LD_LIBRARY_PATH;/app/oracle/product/12.1.0/dbhome_1/perl/bin/perl -I /app/oracle/product/12.1.0/dbhome_1/rdbms/admin -I /app/oracle/product/12.1.0/dbhome_1/rdbms/admin/../../sqlpatch /app/oracle/product/12.1.0/dbhome_1/rdbms/admin/../../sqlpatch/sqlpatch.pl -verbose > /app/oracle/catupgrd_datapatch_normal.log 2> /app/oracle/catupgrd_datapatch_normal.err

returned from sqlpatch

Time: 32s

Serial   Phase #:70 Files: 1     Time: 73s

Serial   Phase #:71 Files: 1     Time: 0s

Serial   Phase #:72 Files: 1     Time: 0s

Serial   Phase #:73 Files: 1     Time: 21s

Grand Total Time: 1620s

LOG FILES: (catupgrd*.log)

Upgrade Summary Report Located in:

/app/oracle/product/12.1.0/dbhome_1/cfgtoollogs/DEV18/upgrade/upg_summary.log

Grand Total Upgrade Time:    [0d:0h:27m:0s]

Review the upgrade summary log file

[oracle@vosap02 oracle]$ cat /app/oracle/product/12.1.0/dbhome_1/cfgtoollogs/DEV18/upgrade/upg_summary.log

Oracle Database 12.1 Post-Upgrade Status Tool           12-01-2014 02:37:12

Component                               Current         Version  Elapsed Time

Name                                    Status          Number   HH:MM:SS

Oracle Server                          UPGRADED      12.1.0.2.0  00:09:22

JServer JAVA Virtual Machine              VALID      12.1.0.2.0  00:01:38

Oracle Real Application Clusters     OPTION OFF      12.1.0.2.0  00:00:02

Oracle Workspace Manager                  VALID      12.1.0.2.0  00:00:34

OLAP Analytic Workspace                   VALID      12.1.0.2.0  00:00:19

OLAP Catalog                         OPTION OFF      10.2.0.5.0  00:00:00

Oracle OLAP API                           VALID      12.1.0.2.0  00:00:22

Oracle XDK                                VALID      12.1.0.2.0  00:01:52

Oracle Text                               VALID      12.1.0.2.0  00:00:37

Oracle XML Database                       VALID      12.1.0.2.0  00:02:05

Oracle Database Java Packages             VALID      12.1.0.2.0  00:00:10

Oracle Multimedia                         VALID      12.1.0.2.0  00:02:33

Spatial                                UPGRADED      12.1.0.2.0  00:04:01

Final Actions                                                    00:00:50

Post Upgrade                                                     00:01:09

Total Upgrade Time: 00:25:57

PL/SQL procedure successfully completed.

Elapsed: 00:00:00.12

Grand Total Upgrade Time:    [0d:0h:27m:0s]

Run post-upgrade steps

Upgrade timezone data to version 18

SQL> startup upgrade

ORACLE instance started.

Total System Global Area  880803840 bytes

Fixed Size                  2930416 bytes

Variable Size             469764368 bytes

Database Buffers          402653184 bytes

Redo Buffers                5455872 bytes

Database mounted.

Database opened.

SQL> SELECT * FROM v$timezone_file;

FILENAME                VERSION     CON_ID

——————– ———- ———-

timezlrg_14.dat              14          0

SQL> EXEC DBMS_DST.BEGIN_UPGRADE(18);

PL/SQL procedure successfully completed.

SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value

FROM DATABASE_PROPERTIES

WHERE PROPERTY_NAME LIKE ‘DST_%’

ORDER BY PROPERTY_NAME;  2    3    4

PROPERTY_NAME

——————————————————————————–

VALUE

——————————————————————————–

DST_PRIMARY_TT_VERSION

18

DST_SECONDARY_TT_VERSION

14

DST_UPGRADE_STATE

UPGRADE

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup;

ORACLE instance started.

Total System Global Area  880803840 bytes

Fixed Size                  2930416 bytes

Variable Size             469764368 bytes

Database Buffers          402653184 bytes

Redo Buffers                5455872 bytes

Database mounted.

Database opened.

SQL> set serverout on

SQL> VAR numfail number

BEGIN

DBMS_DST.UPGRADE_DATABASE(:numfail,

parallel => TRUE,

log_errors => TRUE,

log_errors_table => ‘SYS.DST$ERROR_TABLE’,

log_triggers_table => ‘SYS.DST$TRIGGER_TABLE’,

error_on_overlap_time => FALSE,

error_on_nonexisting_time => FALSE);

DBMS_OUTPUT.PUT_LINE(‘Failures:’|| :numfail);

END;

/SQL>   2    3    4    5    6    7    8    9   10   11

Table list: “ROSODS”.”STS_TEST”

Number of failures: 0

Table list: “RH_SCHEDULE”.”SCHED_TRAIN_LOCATION”

Number of failures: 0

Table list: “RH_SCHEDULE”.”SCHED_RPO”

Number of failures: 0

Table list: “RH_SCHEDULE”.”SCHED_MASTER_TRAIN_BUNDLE”

Number of failures: 0

Table list: “RH_SCHEDULE”.”SCHED_MASTER_TRAIN”

Number of failures: 0

Table list: “RH_SCHEDULE”.”SCHED_CHANGE_REASON”

Number of failures: 0

Table list: “STG_OWNER”.”STG_TRAIN_SCHED_RPO”

Number of failures: 0

Table list: “STG_OWNER”.”STG_TRAIN_SCHEDULE_LOCATION”

Number of failures: 0

Table list: “STG_OWNER”.”STG_TRAIN_SCHEDULE”

Number of failures: 0

Table list: “STG_OWNER”.”STG_OUT_TRAIN_SCHED_MQ2_EXT”

Number of failures: 0

Table list: “STG_OWNER”.”STAGING_WEIGHBRIDGE_VEHICLE”

Number of failures: 0

Table list: “STG_OWNER”.”STAGING_WEIGHBRIDGE_READING”

Number of failures: 0

Table list: “STG_OWNER”.”STAGING_TRAIN_RUNNING”

Number of failures: 0

Table list: “STG_OWNER”.”STAGING_SPEED_RESTRICTION_LOC”

Number of failures: 0

Table list: “STG_OWNER”.”STAGING_SPEED_RESTRICTION”

Number of failures: 0

Table list: “STG_OWNER”.”STAGING_OUT_VEHICLES_TRIP_EXT”

Number of failures: 0

Table list: “STG_OWNER”.”STAGING_LOAD_DUMP”

Number of failures: 0

Table list: “STG_OWNER”.”STAGING_CONSIST_TRAIN”

Number of failures: 0

Table list: “STG_OWNER”.”STAGING_CONSIST_RAKE”

Number of failures: 0

Table list: “STG_OWNER”.”STAGING_CONSIST_AEI_VEHICLE”

Number of failures: 0

Table list: “STG_OWNER”.”STAGING_CONSIST”

Number of failures: 0

Table list: “RPO”.”STG_RPO_PLANNING_CHANGE”

Number of failures: 0

Table list: “GSMADMIN_INTERNAL”.”AQ$_CHANGE_LOG_QUEUE_TABLE_S”

Number of failures: 0

Table list: “GSMADMIN_INTERNAL”.”AQ$_CHANGE_LOG_QUEUE_TABLE_L”

Number of failures: 0

Failures:0

PL/SQL procedure successfully completed.

SQL> VAR fail number

BEGIN

DBMS_DST.END_UPGRADE(:fail);

DBMS_OUTPUT.PUT_LINE(‘Failures:’|| :fail);

END;

/SQL>   2    3    4    5

An upgrade window has been successfully ended.

Failures:0

PL/SQL procedure successfully completed.

SQL> SELECT * FROM v$timezone_file;

FILENAME                VERSION     CON_ID

——————– ———- ———-

timezlrg_18.dat              18          0

Recompile INVALID Objects

Run utlrp followed by utluiobj.sql

SQL> @utluiobj.sql

.

Oracle Database 12.1 Post-Upgrade Invalid Objects Tool 12-01-2014 19:21:50

.

This tool lists post-upgrade invalid objects that were not invalid

prior to upgrade (it ignores pre-existing pre-upgrade invalid objects).

.

Owner                     Object Name                     Object Type

.

PL/SQL procedure successfully completed.

A best practice is to gather system statistics 24-48 hours after the upgrade

SQL> exec DBMS_STATS.GATHER_SYSTEM_STATS(‘start’);

<< Run it for several hours during periods of normal workload>>

SQL> exec DBMS_STATS.GATHER_SYSTEM_STATS(‘stop’);

RAC IP Change

The steps should be something like:

– stop all db, asm and nodeapps (only clusterware stack is running)
– you are suppose to know new public, private and vip address/ip
– delete current private and public configuration using oifcfg delif
– set new ones with oifcfg setif
– redefine vip with srvctl modify nodeapps
– stop CRS
– make sure that new IP are changed on system level (dns, etc/hosts etc…) and restart server
crs_stop -all

crs_start -all

crs_stat -p ora.rachost1.vip
crs_stat -p ora.rachost2.vip
srvctl modify nodeapps -n rachost1 -A 192.168.180.88/255.255.255.0/pub
srvctl modify nodeapps -n rachost2 -A 192.168.180.89/255.255.255.0/pub

Note#276434

283684.1

Stopping Resources

3. Stop the nodeapps resources (and all dependent resources ASM/DB only if required):

10g and 11gR1, as Oracle Clusterware owner:

$ srvctl stop instance -d <db_name> -i <inst_name> (optional for 10.2.0.3+)
$ srvctl stop asm -n <node_name> (optional for 10.2.0.3+)
$ srvctl stop nodeapps -n <node_name>

eg,
$ srvctl stop instance -d RACDB -i RACDB1
$ srvctl stop asm -n racnode1
$ srvctl stop nodeapps -n racnode1

11gR2, as Grid Infrastructure owner:

$ srvctl stop instance -d <db_name> -n <node_name> (optional)
$ srvctl stop vip -n <node_name> -f

eg,
$ srvctl stop instance -d RACDB -n racnode1
$ srvctl stop vip -n racnode1 -f

Restarting Resources

8. Start the nodeapps and the other resources

10g and 11gR1, as Oracle Clusterware owner:

$ srvctl start nodeapps -n <node_name>
$ srvctl start asm -n <node_name> (optional for 10.2.0.3+)
$ srvctl start instance -d <dbanme> -i <inst> (optional for 10.2.0.3+)

eg:
$ srvctl start nodeapps -n racnode1
$ srvctl start asm -n racnode1
$ srvctl start instance -d RACDB -i RACDB1
11gR2, as Grid Infrastructure owner:

$ srvctl start vip -n <node_name>
$ srvctl start instance -d <db_name> -n <node_name> (optional)

eg,
$ srvctl start vip -n racnode1
$ srvctl start instance -d RACDB -n racnode1

9. Verify the new VIP is ONLINE and bind to the public network interface

$ crs_stat -t (or $ crsctl stat res -t for 11gR2)

$ ifconfig -a
(netstat -in for HP or ipconfig /all for windows)

===========

yum groupinstall “Desktop” “X Window System” “General Purpose Desktop”

General RAC and RMAN Information

The following Unix shell scripts can be used to automate the Data Guard Switchover process of a physical standby database.

It is very important that the scripts are run in the correct order and on right machine.

These scripts are based on a few customisations. The *.sh scripts are located in a directory called “/var/opt/oracle/dataguard” and there is another file called “set$ORACLE_SID” which is located under “/var/opt/oracle/cronjobs”. This script sets the environment for the individual Oracle instance like the $ORACLE_SID and the $ORACLE_HOME.

On the machine where the Primary Database is running we need to run the following scripts

$ cd /var/opt/oracle/dataguard
$ ./pre_switchover_check.sh
$ ./make_me_standby.sh

On the machine where the Standby Database is running we need to run the following script:

$ cd /var/opt/oracle/dataguard
$ ./make_me_primary.sh

After the switchover is completed, we need to run the following script on the machine where the former Primary (now new Standby) database is running:

$ cd /var/opt/oracle/dataguard
$ ./start_recovery.sh

pre_switchover_check.sh

!/bin/ksh

if [ “$1” = “” ]
then
echo
=======================
On the machine where the Primary Database is running we need to run the following scripts

$ cd /var/opt/oracle/dataguard
$ ./pre_switchover_check.sh
$ ./make_me_standby.sh

On the machine where the Standby Database is running we need to run the following script:

$ cd /var/opt/oracle/dataguard
$ ./make_me_primary.sh

After the switchover is completed, we need to run the following script on the machine where the former Primary (now new Standby) database is running:

$ cd /var/opt/oracle/dataguard
$ ./start_recovery.sh

pre_switchover_check.sh

!/bin/ksh

if [ “$1” = “” ]
then
echo “”
echo “##################################################################”
echo “# PLEASE ENTER ORACLE_SID AS THE FIRST COMMAND LINE ARGUMENT #”
echo “# SCRIPT USAGE : pre_switchover_check.sh #”
echo “##################################################################”
echo “”
exit
fi

ORACLE_SID=`echo $1 |tr ‘[A-Z]’ ‘[a-z]’`; export ORACLE_SID;

ls -l /var/opt/oracle/cronjobs/set$ORACLE_SID > /dev/null
if [ $? != 0 ]
then
echo “”
echo “##################################################################”
echo “# ENVIRONMENT SETTING SET FILE NOT FOUND…!!! #”
echo “# /var/opt/oracle/cronjobs/set$ORACLE_SID #”
echo “##################################################################”
echo “”
exit
fi

. /var/opt/oracle/cronjobs/set$ORACLE_SID

DB=`echo $1 |tr ‘[a-z]’ ‘[A-Z]’`; export DB;

echo “”
echo “##################################################################”
echo “# PERFORMING PRE-SWITCHOVER CHECKS FOR $DB #”
echo “##################################################################”
echo “”

sqlplus -s /nolog |&
print -p “connect / as sysdba”
print -p “set feedback off pause off pagesize 0 heading off verify off linesize 500 term off ”
print -p “set sqlprompt ””
read -p JUNK
print -p “SELECT DATABASE_ROLE DBROLE FROM V\$DATABASE;”
read -p DBROLE
print -p “SELECT COUNT(FILE#) FILESTAT FROM V\$DATAFILE WHERE STATUS IN (‘RECOVER’, ‘OFFLINE’);”
read -p FILESTAT
print -p “SELECT COUNT(FILE#) BKPSTAT FROM V\$BACKUP WHERE STATUS = ‘ACTIVE’;”
read -p BKPSTAT
print -p “SELECT LOG_ARCHIVED-LOG_APPLIED LOGGAP
FROM (SELECT MAX(SEQUENCE#) LOG_ARCHIVED
FROM V\$ARCHIVED_LOG WHERE DEST_ID=1 AND ARCHIVED=’YES’
AND RESETLOGS_CHANGE#=(SELECT MAX(RESETLOGS_CHANGE#)
FROM V\$ARCHIVED_LOG)),
(SELECT MAX(SEQUENCE#) LOG_APPLIED
FROM V\$ARCHIVED_LOG WHERE DEST_ID=2
AND APPLIED=’YES’
AND RESETLOGS_CHANGE#=(SELECT MAX(RESETLOGS_CHANGE#) FROM V\$ARCHIVED_LOG)) ;”
read -p LOGGAP
print -p “EXIT”

echo “CHECKING CURRENT DATABASE ROLE…”
if [ “$DBROLE” = “PHYSICAL STANDBY” ]
then
echo “”
echo “##################################################################”
echo “# ERROR ! ! ! NOT A PRIMARY DATABASE, PLEASE RUN IT ON PRIMARY #”
echo “##################################################################”
echo “”
exit
else
echo “”
echo ” OK ”
echo “”
fi

echo “CHECKING LOG GAP BETWEEN PRIMARY & STANDBY…”
if [ $LOGGAP -ne 0 ]
then
echo “”
echo “######################################################################”
echo “# ERROR ! ! ! PRIMARY & STANDBY ARE NOT IN SYNC, LOG GAP = $LOGGAP #”
echo “######################################################################”
echo “”
exit
else
echo “”
echo ” OK ”
echo “”
fi

echo “CHECKING FILES OFFLINE OR RECOVER STATUS…”
if [ $FILESTAT -ne 0 ]
then
echo “”
echo “##################################################################”
echo “# ERROR ! ! ! ONE OR MORE FILE/S OFFLINE OR IN RECOVER STATUS #”
echo “##################################################################”
echo “”
exit
else
echo “”
echo ” OK ”
echo “”
fi

echo “CHECKING FILES IN BACKUP MODE…”
if [ $BKPSTAT -ne 0 ]
then
echo “”
echo “##################################################################”
echo “# ERROR ! ! ! ONE OR MORE FILE/S ARE IN BACKUP MODE #”
echo “##################################################################”
echo “”
exit
else
echo “”
echo ” OK ”
echo “”
fi

echo “”
echo “##################################################################”
echo “# ALL PRE-SWITCHOVER CHECKS SUCCEEDED… PROCEED WITH SWITCHOVER #”
echo “##################################################################”
echo “”
make_me_standby.sh

#!/bin/ksh

if [ “$1” = “” ]
then
echo “”
echo “##################################################################”
echo “# PLEASE ENTER ORACLE_SID AS THE FIRST COMMAND LINE ARGUMENT #”
echo “# SCRIPT USAGE : make_me_standby.sh #”
echo “##################################################################”
echo “”
exit
fi

ORACLE_SID=`echo $1 |tr ‘[A-Z]’ ‘[a-z]’`; export ORACLE_SID;

ls -l /var/opt/oracle/cronjobs/set$ORACLE_SID > /dev/null
if [ $? != 0 ]
then
echo “”
echo “##################################################################”
echo “# ENVIRONMENT SETTING SET FILE NOT FOUND…!!! #”
echo “# /var/opt/oracle/cronjobs/set$ORACLE_SID #”
echo “##################################################################”
echo “”
exit
fi

. /var/opt/oracle/cronjobs/set$ORACLE_SID

DB=`echo $1 |tr ‘[a-z]’ ‘[A-Z]’`; export DB;

sqlplus -s /nolog |&
print -p “connect / as sysdba”
print -p “set feedback off pause off pagesize 0 heading off verify off linesize 500 term off”
print -p “set sqlprompt ””
read -p JUNK
print -p “SELECT DATABASE_ROLE DBROLE FROM V\$DATABASE;”
read -p DBROLE
print -p “SELECT COUNT(FILE#) FILESTAT FROM V\$DATAFILE WHERE STATUS IN (‘RECOVER’, ‘OFFLINE’);”
read -p FILESTAT
print -p “SELECT COUNT(FILE#) BKPSTAT FROM V\$BACKUP WHERE STATUS = ‘ACTIVE’;”
read -p BKPSTAT
print -p “SELECT LOG_ARCHIVED-LOG_APPLIED LOGGAP
FROM (SELECT MAX(SEQUENCE#) LOG_ARCHIVED
FROM V\$ARCHIVED_LOG WHERE DEST_ID=1 AND ARCHIVED=’YES’
AND RESETLOGS_CHANGE#=(SELECT MAX(RESETLOGS_CHANGE#)
FROM V\$ARCHIVED_LOG)),
(SELECT MAX(SEQUENCE#) LOG_APPLIED
FROM V\$ARCHIVED_LOG WHERE DEST_ID=2
AND APPLIED=’YES’
AND RESETLOGS_CHANGE#=(SELECT MAX(RESETLOGS_CHANGE#) FROM V\$ARCHIVED_LOG)) ;”
read -p LOGGAP
print -p “EXIT”

if [ “$DBROLE” = “PHYSICAL STANDBY” ]
then
echo “”
echo “##################################################################”
echo “# ERROR ! ! ! NOT A PRIMARY DATABASE, PLEASE RUN IT ON PRIMARY #”
echo “##################################################################”
echo “”
exit
fi

if [ $LOGGAP -ne 0 ]
then
echo “”
echo “######################################################################”
echo “# ERROR ! ! ! PRIMARY & STANDBY ARE NOT IN SYNC, LOG GAP = $LOGGAP #”
echo “######################################################################”
echo “”
exit
fi

echo “CHECKING FILES OFFLINE OR RECOVER STATUS…”
if [ $FILESTAT -ne 0 ]
then
echo “”
echo “##################################################################”
echo “# ERROR ! ! ! ONE OR MORE FILE/S OFFLINE OR IN RECOVER STATUS #”
echo “##################################################################”
echo “”
exit
fi

if [ $BKPSTAT -ne 0 ]
then
echo “”
echo “##################################################################”
echo “# ERROR ! ! ! ONE OR MORE FILE/S ARE IN BACKUP MODE #”
echo “##################################################################”
echo “”
exit
fi

echo “”
echo “##################################################################”
echo “# ALL PRE-SWITCHOVER CHECKS SUCCEEDED… #”
echo ” SWITCHING $DB TO STANDBY ROLE, PLEASE CONFIRM … ”
echo “##################################################################”
echo “”
echo “”
echo “Continue? – Please enter ‘Y’ to proceed & ‘N’ to exit”
read ans
if [ “$ans” = ‘Y’ -o “$ans” = ‘y’ ]
then
sqlplus -s /nolog < /tmp/make_me_standby.log
connect / as sysdba;
startup force;
alter database commit to switchover to standby with session shutdown;
shutdown immediate;
startup nomount;
alter database mount standby database;
select database_role from v\$database;
EOF
cat /tmp/make_me_standby.log
$ORACLE_HOME/bin/lsnrctl stop PRIMARY_$DB
else
echo “Quitting …..”
exit
fi

echo “”
echo “####################################################################”
echo “# PLEASE CONFIRM THAT THE STATUS OF DATABASE IS NOW “STANDBY” #”
echo “# #”
echo “# On OLD STANDBY Host please run the following script: #”
echo “# /var/opt/oracle/dataguard/make_me_primary.sh #”
echo “####################################################################”
echo “”
make_me_primary.sh

#!/bin/ksh

if [ “$1” = “” ]
then
echo “”
echo “##################################################################”
echo “# PLEASE ENTER ORACLE_SID AS THE FIRST COMMAND LINE ARGUMENT #”
echo “# SCRIPT USAGE : make_me_primary.sh #”
echo “##################################################################”
echo “”
exit
fi

ORACLE_SID=`echo $1 |tr ‘[A-Z]’ ‘[a-z]’`; export ORACLE_SID;

ls -l /var/opt/oracle/cronjobs/set$ORACLE_SID > /dev/null
if [ $? != 0 ]
then
echo “”
echo “##################################################################”
echo “# ENVIRONMENT SETTING SET FILE NOT FOUND…!!! #”
echo “# /var/opt/oracle/cronjobs/set$ORACLE_SID #”
echo “##################################################################”
echo “”
exit
fi

. /var/opt/oracle/cronjobs/set$ORACLE_SID

DB=`echo $1 |tr ‘[a-z]’ ‘[A-Z]’`; export DB;

sqlplus -s /nolog |&
print -p “connect / as sysdba”
print -p “set feedback off pause off pagesize 0 heading off verify off linesize 500 term off”
print -p “set sqlprompt ””
read -p JUNK
print -p “SELECT DATABASE_ROLE DBROLE FROM V\$DATABASE;”
read -p DBROLE
print -p “exit”

if [ “$DBROLE” = “PRIMARY” ]
then
echo “”
echo “##################################################################”
echo “# ERROR ! ! ! NOT STANDBY DATABASE, PLEASE RUN IT ON STANDBY #”
echo “##################################################################”
echo “”
exit
fi

echo “”
echo “##################################################################”
echo “# SWITCHING $DB TO PRIMARY ROLE, PLEASE CONFIRM … #”
echo “##################################################################”
echo “”
echo “Continue? – Please enter ‘Y’ to proceed & ‘N’ to exit”
read ans
if [ “$ans” = ‘Y’ -o “$ans” = ‘y’ ]
then
sqlplus -s /nolog < /tmp/make_me_primary.log
connect / as sysdba;
alter database commit to switchover to primary with session shutdown;
shutdown immediate;
startup mount;
alter system set log_archive_dest_state_2=enable scope=both;
alter database set standby database to maximize performance;
alter database open;
select database_role from v\$database;
EOF
cat /tmp/make_me_primary.log
$ORACLE_HOME/bin/lsnrctl start PRIMARY_$DB
else
echo “Quitting …..”
exit
fi

echo “####################################################################”
echo “# PLEASE CONFIRM THAT THE STATUS OF DATABASE IS NOW “PRIMARY” #”
echo “# #”
echo “# On NEW STANDBY Host please run the following script: #”
echo “# /var/opt/oracle/dataguard/start_recovery.sh #”
echo “####################################################################”
start_recovery.sh

#!/bin/ksh

if [ “$1” = “” ]
then
echo “”
echo “##################################################################”
echo “# PLEASE ENTER ORACLE_SID AS THE FIRST COMMAND LINE ARGUMENT #”
echo “# SCRIPT USAGE : start_recovery.sh #”
echo “##################################################################”
echo “”
exit
fi

ORACLE_SID=`echo $1 |tr ‘[A-Z]’ ‘[a-z]’`; export ORACLE_SID;

ls -l /var/opt/oracle/cronjobs/set$ORACLE_SID > /dev/null
if [ $? != 0 ]
then
echo “”
echo “##################################################################”
echo “# ENVIRONMENT SETTING SET FILE NOT FOUND…!!! #”
echo “# /var/opt/oracle/cronjobs/set$ORACLE_SID #”
echo “##################################################################”
echo “”
exit
fi

. /var/opt/oracle/cronjobs/set$ORACLE_SID

DB=`echo $1 |tr ‘[a-z]’ ‘[A-Z]’`; export DB;

sqlplus -s /nolog |&
print -p “connect / as sysdba”
print -p “set feedback off pause off pagesize 0 heading off verify off linesize 500 term off”
print -p “set sqlprompt ””
read -p JUNK
print -p “SELECT DATABASE_ROLE DBROLE FROM V\$DATABASE;”
read -p DBROLE
print -p “exit”

if [ “$DBROLE” = “PRIMARY” ]
then
echo “”
echo “##################################################################”
echo “# ERROR ! ! ! NOT STANDBY DATABASE, PLEASE RUN IT ON STANDBY #”
echo “##################################################################”
echo “”
exit
fi

echo “”
echo “##################################################################”
echo “# STARTING RECOVERY FOR $DB STANDBY, PLEASE CONFIRM … #”
echo “##################################################################”
echo “”
echo “Continue? – Please enter ‘Y’ to proceed & ‘N’ to exit”
read ans
if [ “$ans” = ‘Y’ -o “$ans” = ‘y’ ]
then
sqlplus -s /nolog < /tmp/start_recovery.log
connect / as sysdba;
recover managed standby database disconnect;
alter system set log_archive_dest_state_2=defer scope=both;
EOF
cat /tmp/start_recovery.log
ps -ef | grep ora_mrp0_$ORACLE_SID |grep -v grep > /dev/null
if [ $? != 0 ]
then
echo “”
echo “##################################################################”
echo “# RECOVERY PROCESS NOT RUNNING… PLEASE CHECK #”
echo “##################################################################”
echo “”
exit
else
echo “##################################################################”
echo “# MRP PROCESS SUCESSFULLY STARTED #”
echo “##################################################################”
echo “”
echo “####################################################################”
echo “# SWITCHOVER COMPLETE #”
echo “”
echo “* Perform Database Post-Switchover Checklist! ”
echo “####################################################################”
fi
else
echo “Quitting …..”
exit
fi

Nyps-prh5-ed03

Nyps-prh5-ed09

Njvs-drh6-as01

/usr/sbin/useradd -u 200 -g oinstall -G dba oracle
/u01/crs/oracle/product/11.2.0.2/crs
mkdir -p crs/oracle/product/11.2.0.2/crs
It must have at least 100 MB of free disk space for the OCR
and 20 MB of free disk space for the CRS voting disk.

For improved reliability, you should choose a file system on a highly available storage device,
for example, a RAID device that implements mirroring.
truncate table PSDBFLDLABLLANG;
truncate table PSMENUITEMLANG;
truncate table PSRECDEFNLANG;
## rem
alter table PSDBFLDLABLLANG modify (LONGNAME varchar2(35));
alter table PSMENUITEMLANG modify (ITEMLABEL varchar2(35));

— Set all valid, non-partitioned context indexes to UNUSABLE

DECLARE

CURSOR usr_idxs IS select * from user_indexes

where status = ‘VALID’ and index_type = ‘DOMAIN’

and partitioned = ‘NO’;

cur_idx usr_idxs% ROWTYPE;

v_sql VARCHAR2(1024);

BEGIN

OPEN usr_idxs;

LOOP

FETCH usr_idxs INTO cur_idx;

EXIT WHEN NOT usr_idxs%FOUND;

v_sql:= ‘ALTER INDEX ‘ || cur_idx.index_name || ‘ UNUSABLE;’;

EXECUTE IMMEDIATE v_sql;

dbms_output.put_line( ‘INDEX ‘ || cur_idx.index_name || ‘ UNUSABLE;’;

END LOOP;

CLOSE usr_idxs;

END;

— Rebuild all unusable, non-partitioned context indexes

DECLARE

CURSOR usr_idxs IS select * from user_indexes

where status = ‘UNUSABLE’ and index_type = ‘DOMAIN’

and partitioned = ‘NO’;

cur_idx usr_idxs% ROWTYPE;

v_sql VARCHAR2(1024);

BEGIN

OPEN usr_idxs;

LOOP

FETCH usr_idxs INTO cur_idx;

EXIT WHEN NOT usr_idxs%FOUND;

v_sql:= ‘ALTER INDEX ‘ || cur_idx.index_name || ‘ REBUILD;’;

EXECUTE IMMEDIATE v_sql;

dbms_output.put_line( ‘INDEX ‘ || cur_idx.index_name || ‘ REBUILD DONE;’;

END LOOP;

CLOSE usr_idxs;

END;

To make CTX_OBJECTS partitioned index UNUSABLE on all partitions, simply run

alter INDEX CTX_OBJECTS local unusable;
alter table PSRECDEFNLANG modify (RECDESCR varchar2(35));
73.0 3.0 41603.7 48.0 0.0 0.4 0.0 4.9 0 37 ssd50
916.1 598.1 7360.7 15809.4 0.0 1.9 0.0 1.3 1 88 ssd53
SQL> select count(*) from objects; ARCHIVEPT

COUNT(*)
———-
9741023
PS_DN_DNLABELS_TMP,PS_DN_LABEL_UNION,PS_DN_PY_MAILDROP
1. Query datadump jobs

SQL> select owner_name, state , JOB_NAME from DBA_DATAPUMP_JOBS ;

OWNER_NAME STATE JOB_NAME
—————————— —————————— ——————————
VI EXECUTING SYS_IMPORT_FULL_01
SYSTEM NOT RUNNING SYS_EXPORT_SCHEMA_01

2. Attach the job SYS_IMPORT_FULL_01

$ impdp vi/vi attach=SYS_IMPORT_FULL_01
SQL>
SQL>
SQL>
SQL> select owner_name, state , JOB_NAME from DBA_DATAPUMP_JOBS ;

OWNER_NAME STATE
—————————— ——————————
JOB_NAME
——————————
ARCHIVE NOT RUNNING
SYS_EXPORT_FULL_01
SQL> exit
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
bash-3.00$ pwd
/export/home/oraherm/migration
bash-3.00$ sqlplus /nolog

SQL*Plus: Release 11.2.0.2.0 Production on Mon Aug 15 12:48:40 2011

Copyright (c) 1982, 2010, Oracle. All rights reserved.

SQL> conn /as sysdba
Connected.
SQL> !date
Mon Aug 15 12:48:48 EDT 2011
SELECT group# “GROUP”,
bytes “SIZE”,
status “STATUS”
FROM v$log;

— and your redo log switch time

SELECT ROUND(AVG(1440 * (b.first_time – a.first_time)), 0) “Log switch
time – minutes”
FROM v$loghist a, v$log b
WHERE b.sequence# = a.sequence# + 1
AND a.sequence# = (SELECT MAX(sequence#) FROM v$loghist)
ORDER BY a.sequence#;

create or replace
trigger ARCHIVE.SET_NLS_ONLOGON
AFTER LOGON ON DATABASE

DECLARE
cmmd1 VARCHAR2(100);
cmmd2 VARCHAR2(100);

BEGIN
cmmd1:=’ALTER SESSION SET NLS_SORT=BINARY_CI’;
cmmd2:=’ALTER SESSION SET NLS_COMP=BINARY’;
EXECUTE IMMEDIATE cmmd1;
EXECUTE IMMEDIATE cmmd2;
END SET_NLS_ONLOGON;
NLS_CHARACTERSET=AL32UTF8
NLS_NCHAR_CHARACTERSET=UTF8
Poply-db-clif.nydailynews.com
alter database add LOGFILE
GROUP 8 ‘/ora21/wcdb/oradata/WCENTER/redo08.log’ size 50M;
alter database add LOGFILE
GROUP 9 ‘/ora21/wcdb/oradata/WCENTER/redo09.log’ size 50M;
alter database add LOGFILE
GROUP 10 ‘/ora21/wcdb/oradata/WCENTER/redo10.log’ size 50M;
alter database add LOGFILE
GROUP 11 ‘/ora21/wcdb/oradata/WCENTER/redo11.log’ size 50M;
alter database add logfile group 11 ‘/as24/asdb/oradata/ARCHIVE/redo11.log’ size 500M;
alter database add logfile group 12 ‘/as24/asdb/oradata/ARCHIVE/redo12.log’ size 500M;
alter database add logfile group 13 ‘/as24/asdb/oradata/ARCHIVE/redo13.log’ size 500M;
alter database add logfile group 14 ‘/as24/asdb/oradata/ARCHIVE/redo14.log’ size 500M;
alter database add logfile group 15 ‘/as24/asdb/oradata/ARCHIVE/redo15.log’ size 500M;
alter database add logfile group 16 ‘/as24/asdb/oradata/ARCHIVE/redo16.log’ size 500M;
alter database add logfile group 17 ‘/as24/asdb/oradata/ARCHIVE/redo17.log’ size 500M;
GROUP 2 ‘/u02/oradata/redo02.log’SIZE 50M,
GROUP 3 ‘/u03/oradata/redo03.log’SIZE 50M,
GROUP 4 ‘/u04/oradata/redo04.log’SIZE 50M;

3Ncrypt!0n
RMAN> connect target sys/oracle@prima
connected to target database: PRIMA (DBID=1904029631)
connect auxiliary sys/Atex$ysP@ARCHIVEDR

duplicate target database for standby from active database nofilenamecheck;
SELECT DEST_ID “ID”,
STATUS “DB_status”,
DESTINATION “Archive_dest”,
ERROR “Error”
FROM V$ARCHIVE_DEST WHERE DEST_ID <=5;
0.0 1.0 0.0 8.0 0.0 1.0 0.0 1001.0 0 100 c5t1d1

SELECT SWITCHOVER_STATUS FROM V$DATABASE;
All 3 users (hermes,wcenter,lucene) – REPL/network/repAdmin.sh – script will tell you whihc one is master
also, run adm menu on NJ side to check any process – which indicates that NJ is not master

cron job -script repl_pool_send.sh — will transfer files to NJ from NY (all users hermes, wcenter, lucene)
all logs can be found in $HOME/log directory ( replication log is repl_xfer.log)

Running Oracle 11g root script…

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
Creating /usr/local/bin directory…
Copying dbhome to /usr/local/bin …
Copying oraenv to /usr/local/bin …
Copying coraenv to /usr/local/bin …
Creating /var/opt/oracle/oratab file…
Entries will be added to the /var/opt/oracle/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.

To configure Grid Infrastructure for a Stand-Alone Server run the following command as the root user:
/u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib -I/u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/roothas.pl
To configure Grid Infrastructure for a Cluster execute the following command:
/u01/app/11.2.0/grid/crs/config/config.sh
This command launches the Grid Infrastructure Configuration Wizard. The wizard also supports silent operation,
and the parameters can be passed through the response file that is available in the installation media.
/usr/local/etc/ssh_host_rsa_key.pub on node: dn-clif-db01
Validating remote binaries..
Unable to find /usr/local/etc/ssh_host_rsa_key.pub on node: dn-clif-db01
Logfile Location : /u01/app/11.2.0/grid/inventory/Scripts/sshsetup2_2011-08-24_09-35-02-AM.log
Validating remote binaries..
Unable to find /usr/local/etc/ssh_host_rsa_key.pub on node: dn-clif-db01
c2t0d2s6: configured with capacity of 499.98GB — DATA
c2t0d3: configured with capacity of 50.00GB — ARCH
c2t0d4: configured with capacity of 150.00GB — FRA
c2t0d5: configured with capacity of 1023.94MB — OCR
c2t0d6: configured with capacity of 1023.94MB — VOTING
emcpower2c: configured with capacity of 1023.94MB
emcpower3g: configured with capacity of 150.00GB
emcpower4g: configured with capacity of 50.00GB
emcpower5d: configured with capacity of 499.98GB
emcpower6f: configured with capacity of 1023.94MB

c2t0d2s6: configured with capacity of 499.98GB
c2t0d3: configured with capacity of 50.00GB
c2t0d4: configured with capacity of 150.00GB
c2t0d5: configured with capacity of 1023.94MB
c2t0d6: configured with capacity of 1023.94MB
emcpower1a: configured with capacity of 1023.94MB
emcpower2c: configured with capacity of 150.00GB
emcpower3g: configured with capacity of 1023.94MB
emcpower5d: configured with capacity of 50.00GB
emcpower6f: configured with capacity of 499.98GB

Specify disk (enter its number): 22
selecting emcpower6f
[disk formatted]
FORMAT MENU:
disk – select a disk
type – select (define) a disk type
partition – select (define) a partition table
current – describe the current disk
format – format and analyze the disk
repair – repair a defective sector
label – write label to the disk
analyze – surface analysis
defect – defect list management
backup – search for backup labels
verify – read and display labels
save – save new disk/partition definitions
inquiry – show vendor, product and revision
volname – set 8-character volume name
!<cmd> – execute <cmd>, then return
quit
format> partiton
`partiton’ is not expected.
format> partition
PARTITION MENU:
0 – change `0′ partition
1 – change `1′ partition
2 – change `2′ partition
3 – change `3′ partition
4 – change `4′ partition
5 – change `5′ partition
6 – change `6′ partition
7 – change `7′ partition
select – select a predefined table
modify – modify a predefined partition table
name – name the current table
print – display the current table
label – write partition map and label to the disk
!<cmd> – execute <cmd>, then return
quit
partition> print
Current partition table (original):
Total disk cylinders available: 63998 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 0 0 (0/0/0) 0
1 swap wu 0 0 (0/0/0) 0
2 backup wu 0 – 63997 499.98GB (63998/0/0) 1048543232
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 usr wm 0 – 63997 499.98GB (63998/0/0) 1048543232
7 unassigned wm 0 0 (0/0/0) 0

partition> 6
Part Tag Flag Cylinders Size Blocks
6 usr wm 0 – 63997 499.98GB (63998/0/0) 1048543232

Enter partition id tag[usr]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]: 5
Enter partition size[1048461312b, 63993c, 63997e, 511944.00mb, 499.95gb]:
partition> p
Current partition table (unnamed):
Total disk cylinders available: 63998 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 0 0 (0/0/0) 0
1 swap wu 0 0 (0/0/0) 0
2 backup wu 0 – 63997 499.98GB (63998/0/0) 1048543232
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 usr wm 5 – 63997 499.95GB (63993/0/0) 1048461312
7 unassigned wm 0 0 (0/0/0) 0

partition> l
Ready to label disk, continue? yes

partition> p
Current partition table (unnamed):
Total disk cylinders available: 63998 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 0 0 (0/0/0) 0
1 swap wu 0 0 (0/0/0) 0
2 backup wu 0 – 63997 499.98GB (63998/0/0) 1048543232
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 usr wm 5 – 63997 499.95GB (63993/0/0) 1048461312
7 unassigned wm 0 0 (0/0/0) 0

partition> q
FORMAT MENU:
disk – select a disk
type – select (define) a disk type
partition – select (define) a partition table
current – describe the current disk
format – format and analyze the disk
repair – repair a defective sector
label – write label to the disk
analyze – surface analysis
defect – defect list management
backup – search for backup labels
verify – read and display labels
save – save new disk/partition definitions
inquiry – show vendor, product and revision
volname – set 8-character volume name
!<cmd> – execute <cmd>, then return
quit
format> q

c2t0d2: configured with capacity of 499.98GB
c2t0d3: configured with capacity of 50.00GB
c2t0d4: configured with capacity of 150.00GB
c2t0d5: configured with capacity of 1023.94MB
c2t0d6: configured with capacity of 1023.94MB
emcpower2c: configured with capacity of 1023.94MB –OCR
emcpower3g: configured with capacity of 150.00GB — FRA
emcpower4g: configured with capacity of 50.00GB — ARCH
emcpower5d: configured with capacity of 499.98GB — DATA
emcpower6f: configured with capacity of 1023.94MB — Voting Disk
13. emcpower2c <DGC-RAID5-0531 cyl 32766 alt 2 hd 4 sec 16>
/pseudo/emcp@2
14. emcpower3g <DGC-RAID5-0531 cyl 61438 alt 2 hd 256 sec 20>
/pseudo/emcp@3
15. emcpower4g <DGC-RAID5-0531 cyl 40958 alt 2 hd 256 sec 10>
/pseudo/emcp@4
16. emcpower5d <DGC-RAID10-0531 cyl 63998 alt 2 hd 256 sec 64>
/pseudo/emcp@5
17. emcpower6f <DGC-RAID5-0531 cyl 32766 alt 2 hd 4 sec 16>
/pseudo/emcp@6

Task resolv.conf Integrity – This task checks consistency of file /etc/resolv.conf file across nodes

List of errors:

PRVF-5640 : Both search and domain entries are present in file “/etc/resolv.conf” on the following nodes: dn-clif-db02  –
Cause:  Both ‘search’ and ‘domain’ entries were found in resolv.conf file on the nodes specified.  – Action:

Make sure that only one of these entries exist in file resolv.conf. It is preferable to use entry ‘search’ in resolv.conf.

The SSH LoginGraceTime setting – Checks the SSH LoginGraceTime setting, which controls how long the SSH server allows for a successful login.

List of errors:

PRVE-0038 : The SSH LoginGraceTime setting on node “dn-clif-db02” may result in users being
disconnected before login is completed  – Cause:  The LoginGraceTime timeout value is too low which is causing users
to be disconnected before their login completes.
– Action:  Oracle recomments setting the LoginGraceTime to a value of zero (unlimited).

chown oracle:dba emcpower5d
chmod 660 emcpower5d
chown oracle:dba emcpower6f
chmod 660 emcpower6f
chown oracle:dba emcpower4g
chmod 660 emcpower4g
chown oracle:dba emcpower3g
chmod 660 emcpower3g
chown oracle:dba emcpower2c
chmod 660 emcpower2c

chown oracle:dba emcpower1a
chmod 660 emcpower1a
chown oracle:dba emcpower2c
chmod 660 emcpower2c
chown oracle:dba emcpower3g
chmod 660 emcpower3g
chown oracle:dba emcpower5d
chmod 660 emcpower5d
chown oracle:dba emcpower6f
chmod 660 emcpower6f
/tmp/deinstall2011-08-25_02-58-15PM/perl/bin/perl -I/tmp/deinstall2011-08-25_02-58-15PM/perl/lib -I/tmp/deinstall2011-08-25_02-58-15PM/crs/install /tmp/deinstall2011-08-25_02-58-15PM/crs/install/roothas.pl -force -deconfig -paramfile /tmp/deinstall2011-08-25_02-58-15PM/response/deinstall_Ora11g_gridinfrahome1.rsp
/tmp/deinstall2011-08-25_03-04-13PM/perl/bin/perl -I/tmp/deinstall2011-08-25_03-04-13PM/perl/lib -I/tmp/deinstall2011-08-25_03-04-13PM/crs/install /tmp/deinstall2011-08-25_03-04-13PM/crs/install/roothas.pl -force -deconfig -paramfile /tmp/deinstall2011-08-25_03-04-13PM/response/deinstall_Ora11g_gridinfrahome1.rsp
[root@dn-clif-db01:/u01/app/11.2.0/grid]#./root.sh
Running Oracle 11g root script…

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of “dbhome” have not changed. No need to overwrite.
The contents of “oraenv” have not changed. No need to overwrite.
The contents of “coraenv” have not changed. No need to overwrite.

Entries will be added to the /var/opt/oracle/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user ‘root’, privgrp ‘root’..
Operation successful.
OLR initialization – successful
root wallet
root wallet cert
root cert export
peer wallet
profile reader wallet
pa wallet
peer wallet keys
pa wallet keys
peer cert request
pa cert request
peer cert
pa cert
peer root cert TP
profile reader root cert TP
pa root cert TP
peer pa cert TP
pa peer cert TP
profile reader pa cert TP
profile reader peer cert TP
peer user cert
pa user cert
Adding daemon to inittab
ACFS-9200: Supported
ACFS-9300: ADVM/ACFS distribution files found.
ACFS-9307: Installing requested ADVM/ACFS software.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9309: ADVM/ACFS installation correctness verified.
CRS-2672: Attempting to start ‘ora.mdnsd’ on ‘dn-clif-db01’
CRS-2676: Start of ‘ora.mdnsd’ on ‘dn-clif-db01’ succeeded
CRS-2672: Attempting to start ‘ora.gpnpd’ on ‘dn-clif-db01’
CRS-2676: Start of ‘ora.gpnpd’ on ‘dn-clif-db01’ succeeded
CRS-2672: Attempting to start ‘ora.cssdmonitor’ on ‘dn-clif-db01’
CRS-2672: Attempting to start ‘ora.gipcd’ on ‘dn-clif-db01’
CRS-2676: Start of ‘ora.cssdmonitor’ on ‘dn-clif-db01’ succeeded
CRS-2676: Start of ‘ora.gipcd’ on ‘dn-clif-db01’ succeeded
CRS-2672: Attempting to start ‘ora.cssd’ on ‘dn-clif-db01’
CRS-2672: Attempting to start ‘ora.diskmon’ on ‘dn-clif-db01’
CRS-2676: Start of ‘ora.diskmon’ on ‘dn-clif-db01’ succeeded
CRS-2676: Start of ‘ora.cssd’ on ‘dn-clif-db01’ succeeded

ASM created and started successfully.

Disk Group OCR_DG created successfully.

The ora.asm resource is not ONLINE
Did not succssfully configure and start ASM at /u01/app/11.2.0/grid/crs/install/crsconfig_lib.pm line 6465.
/u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib -I/u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/rootcrs.pl execution failed
[root@dn-clif-db02:/u01/app/11.2.0/grid]#./root.sh
Running Oracle 11g root script…

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of “dbhome” have not changed. No need to overwrite.

The contents of “oraenv” have not changed. No need to overwrite.
The contents of “coraenv” have not changed. No need to overwrite.

Entries will be added to the /var/opt/oracle/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user ‘root’, privgrp ‘root’..
Operation successful.
OLR initialization – successful
root wallet
root wallet cert
root cert export
peer wallet
profile reader wallet
pa wallet
peer wallet keys
pa wallet keys
peer cert request
pa cert request
peer cert
pa cert
peer root cert TP
profile reader root cert TP
pa root cert TP
peer pa cert TP
pa peer cert TP
profile reader pa cert TP
profile reader peer cert TP
peer user cert
pa user cert
Adding daemon to inittab
ACFS-9200: Supported
ACFS-9300: ADVM/ACFS distribution files found.
ACFS-9307: Installing requested ADVM/ACFS software.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9309: ADVM/ACFS installation correctness verified.
CRS-2672: Attempting to start ‘ora.mdnsd’ on ‘dn-clif-db02’
CRS-2676: Start of ‘ora.mdnsd’ on ‘dn-clif-db02’ succeeded
CRS-2672: Attempting to start ‘ora.gpnpd’ on ‘dn-clif-db02’
CRS-2676: Start of ‘ora.gpnpd’ on ‘dn-clif-db02’ succeeded
CRS-2672: Attempting to start ‘ora.cssdmonitor’ on ‘dn-clif-db02’
CRS-2672: Attempting to start ‘ora.gipcd’ on ‘dn-clif-db02’
CRS-2676: Start of ‘ora.cssdmonitor’ on ‘dn-clif-db02’ succeeded
CRS-2676: Start of ‘ora.gipcd’ on ‘dn-clif-db02’ succeeded
CRS-2672: Attempting to start ‘ora.cssd’ on ‘dn-clif-db02’
CRS-2672: Attempting to start ‘ora.diskmon’ on ‘dn-clif-db02’
CRS-2676: Start of ‘ora.diskmon’ on ‘dn-clif-db02’ succeeded
CRS-2676: Start of ‘ora.cssd’ on ‘dn-clif-db02’ succeeded

Mounting Disk Group OCR_DG failed with the following message:
ORA-15032: not all alterations performed
ORA-15017: diskgroup “OCR_DG” cannot be mounted
ORA-15003: diskgroup “OCR_DG” already mounted in another lock name space
Configuration of ASM … failed
see asmca logs at /u01/app/oracle/cfgtoollogs/asmca for details
Did not succssfully configure and start ASM at /u01/app/11.2.0/grid/crs/install/crsconfig_lib.pm line 6465.
/u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib -I/u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/rootcrs.pl execution failed
/usr/bin/ndd -get /dev/tcp tcp_status | grep TCP_CLOSE_WAIT | awk ‘{ printf “ndd -set /dev/tcp tcp_discon 0x%s\n”, $1 }’ |sh

/etc/init.d/ohasd deinstall
alter system set log_archive_dest_2=’Service=HERMESDR LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=HERMESDR
alter system set log_archive_dest_2=’log_archive_dest_2 string service=”wcenterdr”, LGWR ASYN
C NOAFFIRM delay=0 optional co
mpression=disable max_failure=
0 max_connections=1 reopen=300
db_unique_name=”wcenterdr” ne
t_timeout=30, valid_for=(all_l
ogfiles,primary_role)
S

cp -p aaapp.dbf
aalarge.dbf
adapp.dbf
amapp.dbf
avapp.dbf
bdapp.dbf
[root@dn-clif-db01:/u01/app/11.2.0/grid]#./root.sh
Running Oracle 11g root script…

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of “dbhome” have not changed. No need to overwrite.
The contents of “oraenv” have not changed. No need to overwrite.
The contents of “coraenv” have not changed. No need to overwrite.

Entries will be added to the /var/opt/oracle/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user ‘root’, privgrp ‘root’..
Operation successful.
OLR initialization – successful
root wallet
root wallet cert
root cert export
peer wallet
profile reader wallet
pa wallet
peer wallet keys
pa wallet keys
peer cert request
pa cert request
peer cert
pa cert
peer root cert TP
profile reader root cert TP
pa root cert TP
peer pa cert TP
pa peer cert TP
profile reader pa cert TP
profile reader peer cert TP
peer user cert
pa user cert
Adding daemon to inittab
ACFS-9200: Supported
ACFS-9300: ADVM/ACFS distribution files found.
ACFS-9307: Installing requested ADVM/ACFS software.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9309: ADVM/ACFS installation correctness verified.
CRS-2672: Attempting to start ‘ora.mdnsd’ on ‘dn-clif-db01’
CRS-2676: Start of ‘ora.mdnsd’ on ‘dn-clif-db01’ succeeded
CRS-2672: Attempting to start ‘ora.gpnpd’ on ‘dn-clif-db01’
CRS-2676: Start of ‘ora.gpnpd’ on ‘dn-clif-db01’ succeeded
CRS-2672: Attempting to start ‘ora.cssdmonitor’ on ‘dn-clif-db01’
CRS-2672: Attempting to start ‘ora.gipcd’ on ‘dn-clif-db01’
CRS-2676: Start of ‘ora.cssdmonitor’ on ‘dn-clif-db01’ succeeded
CRS-2676: Start of ‘ora.gipcd’ on ‘dn-clif-db01’ succeeded
CRS-2672: Attempting to start ‘ora.cssd’ on ‘dn-clif-db01’
CRS-2672: Attempting to start ‘ora.diskmon’ on ‘dn-clif-db01’
CRS-2676: Start of ‘ora.diskmon’ on ‘dn-clif-db01’ succeeded
CRS-2676: Start of ‘ora.cssd’ on ‘dn-clif-db01’ succeeded

ASM created and started successfully.

Disk Group OCFS_DG created successfully.

clscfg: -install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user ‘root’, privgrp ‘root’..
Operation successful.
CRS-4256: Updating the profile
Successful addition of voting disk 2bc660964acb4fe5bf7700109c0a26a5.
Successfully replaced voting disk group with +OCFS_DG.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
## STATE File Universal Id File Name Disk group
— —– —————– ——— ———
1. ONLINE 2bc660964acb4fe5bf7700109c0a26a5 (/dev/rdsk/emcpower3g) [OCFS_DG]
Located 1 voting disk(s).
CRS-2672: Attempting to start ‘ora.asm’ on ‘dn-clif-db01’
CRS-2676: Start of ‘ora.asm’ on ‘dn-clif-db01’ succeeded
CRS-2672: Attempting to start ‘ora.OCFS_DG.dg’ on ‘dn-clif-db01’
CRS-2676: Start of ‘ora.OCFS_DG.dg’ on ‘dn-clif-db01’ succeeded
ACFS-9200: Supported
ACFS-9200: Supported
CRS-2672: Attempting to start ‘ora.registry.acfs’ on ‘dn-clif-db01’
CRS-2676: Start of ‘ora.registry.acfs’ on ‘dn-clif-db01’ succeeded
Configure Oracle Grid Infrastructure for a Cluster … succeeded

[root@dn-clif-db02:/u01/app/11.2.0/grid]#./root.sh
Running Oracle 11g root script…

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of “dbhome” have not changed. No need to overwrite.
The contents of “oraenv” have not changed. No need to overwrite.
The contents of “coraenv” have not changed. No need to overwrite.

Entries will be added to the /var/opt/oracle/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user ‘root’, privgrp ‘root’..
Operation successful.
OLR initialization – successful
Adding daemon to inittab
ACFS-9200: Supported
ACFS-9300: ADVM/ACFS distribution files found.
ACFS-9307: Installing requested ADVM/ACFS software.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9309: ADVM/ACFS installation correctness verified.
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node dn-clif-db01, number 1, and is terminating
An active cluster was found during exclusive startup, restarting to join the cluster
Configure Oracle Grid Infrastructure for a Cluster … succeeded
create diskgroup OCFS_DG external redundancy disk ‘/dev/rdsk/emcpower3g’,’/dev/rdsk/emcpower4g’;
create diskgroup DATA_DG external redundancy disk ‘/dev/rdsk/emcpower0a’;
create diskgroup ARCH_DG external redundancy disk ‘/dev/rdsk/emcpower1a’;
create diskgroup FRA_DG external redundancy disk ‘/dev/rdsk/emcpower2a’;

crsctl check cluster
crsctl stop cluster
crsctl start cluster

shutdown app and schedulers on PRDHR88
shutdown listener on PRDHR88

Shutdown database
start up and set recyclebin off
make sure all files are autoextend form
start import
http://eportal/sites/QueensCourier/Finance/Lists/QueensCourierContracts/AllItems.aspx
[root@dn-clif-db02:/dev/rdsk]#sync
[root@dn-clif-db02:/dev/rdsk]#sync
[root@dn-clif-db02:/dev/rdsk]#sync
[root@dn-clif-db02:/dev/rdsk]#shutdown -y -g10 -i6
ALTER SYSTEM QUIESCE RESTRICTED
Use can use rman to restore Database to New server.
1.restore the controlfile to filesystem
or
alter database backup controlfile to ‘/u01/…./controlfile.cntrl’;
and then move the controlfile to New server.
2. On primary database
SQL> select file_name from dba_data_files ;
+INFDATA/infprod/datafile/users.259.625755629
+INFDATA/infprod/datafile/sysaux.257.625755627
+INFDATA/infprod/datafile/undotbs1.258.625755629
+INFDATA/infprod/datafile/system.256.625755627

to generate list of datafiles.
select ‘ set newname for datafile ‘||file_id ||’ to ”c:\oradata\’||substr(file_name,27)||”’ ;’
from dba_data_files;

set newname for datafile 4 to ‘c:\oradata\users.259.625755629’ ;
set newname for datafile 3 to ‘c:\oradata\sysaux.257.625755627’ ;
set newname for datafile 2 to ‘c:\oradata\undotbs1.258.625755629’ ;
set newname for datafile 1 to ‘c:\oradata\system.256.625755627′ ;
3.Startup mount
4. restore the Database
5.recover the database
6.Alter database open resetlogs;
alter system set control_files=’+DATA/ctf1.dbf’ scope=spfile

Starting up and Shutting down with SRVCTL

Enter the following SRVCTL syntax from the command line, providing the required database name and instance name,
or include more than one instance name to start more than one specific instance:

srvctl start instance -d db_name -i “inst_name_list” [-o start_options] [-c connect_str | -q]

Note that this command will also start all enabled and non-running services that have the listed
instances either as preferred or available instances.

To stop one or more instances, enter the following SRVCTL syntax from the command line:

srvctl stop instance -d name -i “inst_name_list” [-o stop_options] [-c connect_str | -q]

This command will also stop the services related to the terminated instances on the nodes where the
instances were running.

To start or stop your entire cluster database, that is, all of the instances and its enabled services,
enter the following SRVCTL commands:

srvctl start database -d name [-o stop_options] [-c connect_str | -q]

srvctl stop database -d name [-o stop_options] [-c connect_str | -q]

crsctl check cluster
crsctl stop cluster
crsctl start cluster

connection with workaround:
jdbc:oracle:thin:@(DESCRIPTION=(RETRY_COUNT=5)(ADDRESS_LIST=(ADDRESS=(PROTOCOL
=tcps)(HOST=159.8.144.39)(PORT=1523))(ADDRESS=(PROTOCOL=tcps)(HOST=159.8.144.4
0)(PORT=1523))(ADDRESS=(PROTOCOL=tcps)(HOST=159.8.144.41)(PORT=1523)))(CONNECT
alter database add logfile group 14 ‘/pshr/oradata/PRDHR90/redo14.log’ size 500M;
alter database add logfile group 15 ‘/pshr/oradata/PRDHR90/redo15.log’ size 500M;
alter database add logfile group 16 ‘/pshr/oradata/PRDHR90/redo16.log’ size 500M;
alter database add logfile group 17 ‘/pshr/oradata/PRDHR90/redo17.log’ size 500M;
alter database add logfile group 18 ‘/pshr/oradata/PRDHR90/redo18.log’ size 500M;
alter database add logfile group 19 ‘/pshr/oradata/PRDHR90/redo19.log’ size 500M;
alter database add logfile group 20 ‘/pshr/oradata/PRDHR90/redo20.log’ size 500M;

PFILE=”, DATABASE=’0′
2011-09-20 10:47:05.876 RSM0: HEALTH CHECK WARNING: ORA-16714: the value of property ArchiveLagTarget is inconsistent with the database setting
2011-09-20 10:47:05.897 RSM Warning: Property ‘LogArchiveMaxProcesses’ has inconsistent values:METADATA=’4′, SPFILE=”, DATABASE=’4′
2011-09-20 10:47:05.898 RSM0: HEALTH CHECK WARNING: ORA-16714: the value of property LogArchiveMaxProcesses is inconsistent with the database setting
2011-09-20 10:47:05.919 RSM Warning: Property ‘LogArchiveMinSucceedDest’ has inconsistent values:METADATA=’1′, SPFILE=”, DATABASE=’1′
2011-09-20 10:47:05.919 RSM0: HEALTH CHECK WARNING: ORA-16714: the value of property LogArchiveMinSucceedDest is inconsistent with the database setting
2011-09-20 10:47:06.023 SPFILE is missing value for property ‘LogArchiveTrace’ with sid=’POLOPOLY1′
2011-09-20 10:47:06.024 RSM Warning: Property ‘LogArchiveTrace’ has inconsistent values:METADATA=’0′, SPFILE='(missing)’, DATABASE=’0′
2011-09-20 10:47:06.024 RSM0: HEALTH CHECK WARNING: ORA-16714: the value of property LogArchiveTrace is inconsistent with the database setting
2011-09-20 10:47:06.051 SPFILE is missing value for property ‘LogArchiveFormat’ with sid=’POLOPOLY1′
2011-09-20 10:47:06.051 RSM Warning: Property ‘LogArchiveFormat’ has inconsistent values:METADATA=’%t_%s_%r.arc’, SPFILE='(missing)’, DATABASE=’%t_%s_%r.arc’
2011-09-20 10:47:06.051 RSM0: HEALTH CHECK WARNING: ORA-16714: the value of property LogArchiveFormat is inconsistent with the database setting

Select Database_role,switchover_status from v$database;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DELAY 120;
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.20.70)(PORT=1721)))(CONNECT_DATA=(SERVICE_NAME=POLOPOLY)))
Configuring Virtual IP Address in Linux
Invoke the linuxconf tool. ( type linuxconf in the shell prompt and press Enter ). For starting this tool you have to be logged in as Super user.
In the displayed menu, select the menu item : IP Aliases for virtual hosts and press Enter. This will display the two interfaces eth0 and lo. (Ethernet interfaces in Linux are called by such names as eth0 and eth1)
Select eth0 and press Enter. This will show all the IP aliases configured for the selected interface.
In the field IP alias or range, enter the desired IP address or the range with a corresponding Netmask.

Example

IP alias or range : 177.177.177.1-25
Netmask : 255.255.255.0

Note:
These commands have to be executed with the super user privilege.
You will have to re-start the system for the changes to take effect.
When you are configuring a large number of IP address, it might take a long time to boot up.
Using the following command, we can configure Virtual IPs in the Linux box at run-time without
re-booting the machine or re-starting the network.

/sbin/ip addr add 172.19.1.2/32 dev eth0
/sbin/ip addr add 172.19.1.3/32 dev eth0

The same interfaces can be made down by using the following command.

/sbin/ip addr del 172.19.1.2/32 dev eth0
/sbin/ip addr del 172.19.1.3/32 dev eth0

Note:
These commands have to be executed with the super user privilege.
It can be used in versions up to 7.2
The configurations will not be available when you re-start your system.
Configuring Virtual IP Address in Solaris

Follow the three simple steps that will help you to configure virtual IP address :
Edit the /etc/hosts file and add additional IP addresses, along with the associated hostname.
For example : To add 192.168.0.1 (web1) and 192.168.0.2 (web2) to the system, enter in the following manner.
192.168.0.1 web1
192.168.0.2 web2

The system needs to be configured for the newly added IP addresses.
Create the startup files so that the system will automatically add the new IP addresses upon bootup.

a. Create new files in the /etc directory. The file names should follow the following convention
according to the new ip address added.

hostname.hme0:1
hostname.hme0:2

b. The contents of these files will be a single line with the respective hostname entered. For example:
File Name
Contents
hostname.hme0:1
hostname.hme0:2
web1
web2
The file “hostname.hme0:1” will contain “web1” and “hostname.hme0:2” will contain “web2”.

If you look in the “/etc” directory, you will find a file named “hostname.hme0” (which is the real interface,
the :n represents the virtual interface). In this file, you will find the name of your system. If you look in
the “/etc/hosts” file, you will find your IP address.

Now you have configured virtual IP address for two new interfaces that you have added ( .hme0:1 and .hme0:2 .
To activate this virtual IP address, you have to provide the following commands :
# ifconfig hme0:1 plumb
# ifconfig hme0:2 plumb

The system startup in Solaris searches the “/etc” directory for files named “hostname.*”. When it finds
one or more of these files, it reads the hostname from them, looks up the hostname in the “/etc/hosts” file
for a match, and if found, configures the interface with the IP address of the match.

Please re-boot your system for the virtual IP address to be configured in your system.

(OR)

To configure the interface without re-starting the system, use the “ifconfig” command. To add the two IP
addresses, type:

# ifconfig hme0:1 192.168.0.1 up
# ifconfig hme0:2 192.168.0.2 up

After having issued these two commands, the system would recognize the new IP addresses immediately,
without re-booting the system.

=============

oracle@dn-clif-db01:/export/home/oracle $ ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
lo0:1: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
zone oradb
inet 127.0.0.1 netmask ff000000
bge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 10.10.20.20 netmask ffffff00 broadcast 10.10.20.255
groupname ipmpgrp
bge0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
zone oradb
inet 10.10.20.22 netmask ffffff00 broadcast 10.10.20.255
bge0:2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
zone oradb
inet 10.10.20.23 netmask ffffff00 broadcast 10.10.20.255
bge0:3: flags=1040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4> mtu 1500 index 2
inet 10.10.20.52 netmask ffffff00 broadcast 10.10.20.255
bge0:4: flags=1040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4> mtu 1500 index 2
inet 10.10.20.50 netmask ffffff00 broadcast 10.10.20.255
bge0:5: flags=1040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4> mtu 1500 index 2
inet 10.10.20.53 netmask ffffff00 broadcast 10.10.20.255
bge0:6: flags=1040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4> mtu 1500 index 2
inet 10.10.20.54 netmask ffffff00 broadcast 10.10.20.255
bge1: flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER> mtu 1500 index 3
inet 10.10.20.55 netmask ffffff00 broadcast 10.10.20.255
groupname ipmpgrp
bge2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
inet 192.168.1.100 netmask ffffff00 broadcast 192.168.1.255
bge2:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
inet 169.254.77.199 netmask ffff8000 broadcast 169.254.127.255
bge3: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 5
inet 192.168.1.101 netmask ffffff00 broadcast 192.168.1.255
bge3:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 5
inet 169.254.149.30 netmask ffff8000 broadcast 169.254.255.255
===
oracle@dn-clif-db02:/export/home/oracle $ ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
bge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 10.10.20.21 netmask ffffff00 broadcast 10.10.20.255
groupname ipmpgrp
bge0:1: flags=1040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4> mtu 1500 index 2
inet 10.10.20.51 netmask ffffff00 broadcast 10.10.20.255
bge1: flags=19040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER,FAILED> mtu 1500 index 3
inet 10.10.20.56 netmask ffffff00 broadcast 10.10.20.255
groupname ipmpgrp
bge2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
inet 192.168.1.200 netmask ffffff00 broadcast 192.168.1.255
bge2:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
inet 169.254.97.113 netmask ffff8000 broadcast 169.254.127.255
bge3: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 5
inet 192.168.1.201 netmask ffffff00 broadcast 192.168.1.255
bge3:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 5
inet 169.254.151.108 netmask ffff8000 broadcast 169.254.255.255

====================
chown oracle:dba /dev/rdsk/c6t0017380001BF15DBd0s*
chown oracle:dba /dev/rdsk/c6t0017380001BF15DCd0s*
chown oracle:dba /dev/rdsk/c6t0017380001BF15DDd0s*
chown oracle:dba /dev/rdsk/c6t0017380001BF15E0d0s*
chown oracle:dba /dev/rdsk/c6t0017380001BF15E1d0s*
chmod 660 /dev/rdsk/c6t0017380001BF15DBd0s*
chmod 660 /dev/rdsk/c6t0017380001BF15DCd0s*
chmod 660 /dev/rdsk/c6t0017380001BF15DDd0s*
chmod 660 /dev/rdsk/c6t0017380001BF15E0d0s*
chmod 660 /dev/rdsk/c6t0017380001BF15E1d0s*
[root@njps-sol10-admarc1:/u01/app/oracle/product/grid]#./root.sh
Running Oracle 11g root script…

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
Creating /usr/local/bin directory…
Copying dbhome to /usr/local/bin …
Copying oraenv to /usr/local/bin …
Copying coraenv to /usr/local/bin …
Creating /var/opt/oracle/oratab file…
Entries will be added to the /var/opt/oracle/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/oracle/product/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user ‘root’, privgrp ‘other’..
Operation successful.
OLR initialization – successful
root wallet
root wallet cert
root cert export
peer wallet
profile reader wallet
pa wallet
peer wallet keys
pa wallet keys
peer cert request
pa cert request
peer cert
pa cert
peer root cert TP
profile reader root cert TP
pa root cert TP
peer pa cert TP
pa peer cert TP
profile reader pa cert TP
profile reader peer cert TP
peer user cert
pa user cert
Adding daemon to inittab
ACFS-9200: Supported
ACFS-9300: ADVM/ACFS distribution files found.
ACFS-9307: Installing requested ADVM/ACFS software.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9309: ADVM/ACFS installation correctness verified.
CRS-2672: Attempting to start ‘ora.mdnsd’ on ‘njps-sol10-admarc1’
CRS-2676: Start of ‘ora.mdnsd’ on ‘njps-sol10-admarc1’ succeeded
CRS-2672: Attempting to start ‘ora.gpnpd’ on ‘njps-sol10-admarc1’
CRS-2676: Start of ‘ora.gpnpd’ on ‘njps-sol10-admarc1’ succeeded
CRS-2672: Attempting to start ‘ora.cssdmonitor’ on ‘njps-sol10-admarc1’
CRS-2672: Attempting to start ‘ora.gipcd’ on ‘njps-sol10-admarc1’
CRS-2676: Start of ‘ora.cssdmonitor’ on ‘njps-sol10-admarc1’ succeeded
CRS-2676: Start of ‘ora.gipcd’ on ‘njps-sol10-admarc1’ succeeded
CRS-2672: Attempting to start ‘ora.cssd’ on ‘njps-sol10-admarc1’
CRS-2672: Attempting to start ‘ora.diskmon’ on ‘njps-sol10-admarc1’
CRS-2676: Start of ‘ora.diskmon’ on ‘njps-sol10-admarc1’ succeeded
CRS-2676: Start of ‘ora.cssd’ on ‘njps-sol10-admarc1’ succeeded

ASM created and started successfully.

Disk Group OCFS created successfully.

clscfg: -install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user ‘root’, privgrp ‘other’..
Operation successful.
CRS-4256: Updating the profile
Successful addition of voting disk 039f261ed5494fbdbf0991621127f5cd.
Successfully replaced voting disk group with +OCFS.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
## STATE File Universal Id File Name Disk group
— —– —————– ——— ———
1. ONLINE 039f261ed5494fbdbf0991621127f5cd (/dev/rdsk/c6t0017380001BF15E0d0s4) [OCFS]
Located 1 voting disk(s).
CRS-2672: Attempting to start ‘ora.asm’ on ‘njps-sol10-admarc1’
CRS-2676: Start of ‘ora.asm’ on ‘njps-sol10-admarc1’ succeeded
CRS-2672: Attempting to start ‘ora.OCFS.dg’ on ‘njps-sol10-admarc1’
CRS-2676: Start of ‘ora.OCFS.dg’ on ‘njps-sol10-admarc1’ succeeded
ACFS-9200: Supported
ACFS-9200: Supported
CRS-2672: Attempting to start ‘ora.registry.acfs’ on ‘njps-sol10-admarc1’
CRS-2676: Start of ‘ora.registry.acfs’ on ‘njps-sol10-admarc1’ succeeded
Configure Oracle Grid Infrastructure for a Cluster … succeeded
NODE2

# ./root.sh
Running Oracle 11g root script…

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
Creating /usr/local/bin directory…
Copying dbhome to /usr/local/bin …
Copying oraenv to /usr/local/bin …
Copying coraenv to /usr/local/bin …
Creating /var/opt/oracle/oratab file…
Entries will be added to the /var/opt/oracle/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/oracle/product/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user ‘root’, privgrp ‘other’..
Operation successful.
OLR initialization – successful
Adding daemon to inittab
ACFS-9200: Supported
ACFS-9300: ADVM/ACFS distribution files found.
ACFS-9307: Installing requested ADVM/ACFS software.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9309: ADVM/ACFS installation correctness verified.
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node njps-sol10-admarc1, number 1, and is terminating
An active cluster was found during exclusive startup, restarting to join the cluster
Configure Oracle Grid Infrastructure for a Cluster … succeeded
ce1:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 7
inet 169.254.145.32 netmask ffff0000 broadcast 169.254.255.255

169.254.243.106

Toll free :- 1-866-344-8592 Ext 111 / Direct :- 202-684-7111
Fax :- 1-866- 580-4047

+DATA/admcprd/datafile/users01_admdev.dbf
+DATA/admcprd/datafile/users02_admdev.dbf
+DATA/admcprd/datafile/users03_admdev.dbf
+DATA/admcprd/datafile/users04_admdev.dbf
+DATA/admcprd/datafile/users05_admdev.dbf
+DATA/admcprd/datafile/index01_admdev.dbf
+DATA/admcprd/datafile/index02_admdev.dbf
+DATA/admcprd/datafile/index03_admdev.dbf
+DATA/admcprd/datafile/index04_admdev.dbf
+DATA/admcprd/datafile/index05_admdev.dbf

http://www.capemaywhalewatcher.com/whales-dolphin.htm
http://www.yelp.com/biz/whale-watching-wildwood
http://www.funnewjersey.com/upload_user/Outdoor_Adventure/WHALE_WATCHING.htm
http://wildwoodsnj.com/
oracle@dnlvnjmanagement:/export/home/oracle(BOEDBT)\ $ df -k
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/bootdg/rootvol
10086988 7247443 2738676 73% /
/proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
fd 0 0 0 0% /dev/fd
/dev/vx/dsk/bootdg/var
10086988 6766213 3219906 68% /var
/dev/dsk/c6t5001738001BF0142d2s0
103243889 86547120 16696769 84% /data_backup
/dev/dsk/c6t5001738001BF0142d3s0
154295858 46569387 107726471 31% /psoft_data1
/dev/dsk/c1t2d0s3 13429995 12089351 1206345 91% /u01
/dev/dsk/c1t2d0s4 10327372 7064978 3159121 70% /u02_L
swap 19952584 4576 19948008 1% /tmp
/dev/vx/dsk/bootdg/home
16641482 10085411 6389657 62% /export/home
njsun7210nas:/export/unix_server_bkps
2147483648 546834824 1600648824 26% /ufsdump
njsun7210nas.ny.dnroot.int:/export/unix_nj_backup_fs1_prod
2147483648 1109948866 1037534781 52% /backup
vf-njunixwin:/vol/vf_njunixwin_datavol1/QA_h11_drop_folder
125829120 40077328 85751792 32% /h11_drop
vf-nywwwnas:/vol/nywwwnas_vfDatavol3/h11_drop_folder
83886080 13142872 70743208 16% /mnt
You have new mail in /var/mail//oracle
-rw-r–r– 1 root other 126525512 Jun 2 2011 VMware-converter-all-4.3.0-292238.exe
drwxr-xr-x 3 root other 512 Jul 8 2011 as24
drwxr-xr-x 9 root root 512 Sep 2 2011 data_backup
drwxr-xr-x 3 cent other 512 Oct 21 2011 mnt1
drwxrwxrwx 4 hermes hermes 4096 Nov 10 2011 mnt
dr-xr-xr-x 1 root root 1 Feb 21 19:15 xfn
dr-xr-xr-x 1 root root 1 Feb 21 19:15 net
dr-xr-xr-x 1 root root 1 Feb 21 19:15 home
dr-xr-xr-x 6 root root 512 Feb 21 19:16 vol
drwxr-xr-x 2 root other 512 Feb 24 15:46 krishna
drwxr-xr-x 6 edwboxi staff 512 Mar 12 13:32 psoft_data1
lrwxrwxrwx 1 root other 12 Apr 3 16:48 venkat -> /psoft_data1
lrwxrwxrwx 1 root other 12 Apr 3 21:10 bob_apps -> /psoft_data1
drwxrwxrwx 21 hermes hermes 4096 Jun 14 11:23 h11_drop
drwxr-xr-x 2 root other 512 Jun 26 10:30 a
drwxrwxrwx 32 root other 34 Jul 3 15:04 ufsdump
drwxrwxr-x 19 root root 1024 Jul 5 11:34 u02_L
drwxrwxrwx 34 root other 35 Jul 6 09:47 backup
drwxr-xr-x 18 root sys 44544 Jul 6 09:54 dev
drwxr-xr-x 2 root sys 1024 Jul 6 10:03 sbin
drwxr-xr-x 57 root sys 6144 Jul 6 10:14 etc
drwxrwxrwt 24 root sys 3513 Jul 6 14:08 tmp
dr-xr-xr-x 122 root root 480032 Jul 6 14:08 proc
edwboxi@dnlvnjmanagement:/ $ cd /bob_apps
edwboxi@dnlvnjmanagement:/bob_apps $ ls -ltr
total 22
drwx—— 2 root root 8192 Sep 6 2007 lost+found
drwxr-xr-x 5 oracle dba 512 Jan 25 11:55 oradata
drwxr-xr-x 4 root other 512 Mar 12 13:58 u02_L
drwxr-xr-x 11 edwboxi staff 512 Jun 21 09:50 bobxi2

/global/prod/arch/admdev/arch_1_409167_409167.arc

njzssol10boapp

UPDATE marketing_fact
SET (sub_service_cd, sub_promo_cd_1, sub_promo_cd_2, sub_lst_str_src_1,
sub_lst_str_src_2, subscriber_key) = (SELECT subscriber_dim.service_cd,
subscriber_dim.promo_cd_1,
subscriber_dim.promo_cd_2,
subscriber_dim.last_hard_start_src_1,
subscriber_dim.last_hard_start_src_2,
subscriber_dim.subscriber_key
FROM subscriber_dim, candidate_dim
WHERE subscriber_dim.rrn = candidate_dim.rrn
AND marketing_fact.candidate_key = candidate_dim.candidate_key)
WHERE marketing_fact.campaign_key = 13190
# more udptcp_rac
#!/sbin/sh
case “$1” in
‘start’)
ndd -set /dev/tcp tcp_smallest_anon_port 9000
ndd -set /dev/tcp tcp_largest_anon_port 65500
ndd -set /dev/udp udp_smallest_anon_port 9000
ndd -set /dev/udp udp_largest_anon_port 65500
;;
‘state’)
ndd /dev/tcp tcp_smallest_anon_port
ndd /dev/tcp tcp_largest_anon_port
ndd /dev/udp udp_smallest_anon_port
ndd /dev/udp udp_largest_anon_port
;;
*)
echo “Usage: $0 { start | state }”
exit 1
;;
esac

ORACLE DBA
HAPPINESS IS REAL WHEN SHARED
HomeAbout MeUseful QueriesUseful ScriptsDisclaimer
In sweet memories of my ever loving brother “kutty thambi ” ARUN KUMAR
MONDAY, DECEMBER 28, 2009
Recovering a Standby database from a missing archivelog
Hi friends,
today i came across one issue recovering a standby database from a missing archivelog files.

on primary database

SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/oradata/archive
Oldest online log sequence 16
Next log sequence to archive 18
Current log sequence 18

on standby database
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/oradata/archive
Oldest online log sequence 13
Next log sequence to archive 0
Current log sequence 18

i tried to solve the problem using shutdownabort.com document
Register a missing log file

alter database register physical logfile ”;
If FAL doesn’t work and it says the log is already registered

alter database register or replace physical logfile ”;
If that doesn’t work, try this…

shutdown immediate
startup nomount
alter database mount standby database;
alter database recover automatic standby database;
wait for the recovery to finish – then cancel
shutdown immediate
startup nomount
alter database mount standby database;
alter database recover managed standby database disconnect;
Check which logs are missing
Run this on the standby…

select local.thread#
, local.sequence# from
(select thread#
, sequence#
from v$archived_log
where dest_id=1) local
where local.sequence# not in
(select sequence#
from v$archived_log
where dest_id=2 and
thread# = local.thread#)
/
THREAD# SEQUENCE#
———- ———-
1 9
1 10
1 11
1 12
1 13
1 14
1 15
still i the archive logs are not applied to the standby database.

finally i tried recovering a standby database using rman , el-caro blog document
i got a solution, now my primary and standby database has equal archives.

A Physical Standby database relies on continuous application of
archivelogs from a Primary Database to be in synch with it. In Oracle
Database versions prior to 10g in the event of an archivelog gone
missing or corrupt you had to rebuild the standby database from scratch.

In
10g you can use an incremental backup and recover the standby using the
same to compensate for the missing archivelogs as shown below

In
the case below archivelogs with sequence numbers 137 and 138 which are
required on the standby are deleted to simulate this problem.

Step 1: On the standby database check the current scn.

SQL> select current_scn from v$database;

CURRENT_SCN
———–
548283

Step 2: On the primary database create the needed incremental backup from the above SCN

login to primary database rman target /

RMAN> backup device type disk incremental from scn 548283 database format ‘/u01/backup/bkup_%U’;

Starting backup at 28-DEC-09

using channel ORA_DISK_1
backup will be obsolete on date 04-JAN-10
archived logs will not be kept or backed up
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/demo1/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/demo1/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/demo1/rman01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/demo1/rman02.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/demo1/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/demo1/users01.dbf
channel ORA_DISK_1: starting piece 1 at 28-DEC-09
channel ORA_DISK_1: finished piece 1 at 28-DEC-09
piece handle=/u01/backup/bkup_07l21ukv_1_1 tag=TAG20091228T143302 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:24:19

using channel ORA_DISK_1
backup will be obsolete on date 04-JAN-10
archived logs will not be kept or backed up
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 28-DEC-09
channel ORA_DISK_1: finished piece 1 at 28-DEC-09
piece handle=/u01/backup/bkup_08l2202v_1_1 tag=TAG20091228T143302 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 28-DEC-09

RMAN>

Step 3: Cancel managed recovery at the standby database

SQL>recover managed standby database cancel;
Media recovery complete.

Move the backup files to a new folder called new_incr so that they are the only files in that folder.

Step 4: Catalog the Incremental Backup Files at the Standby Database

[oracle@rac1 bin]$ . oraenv
ORACLE_SID = [RAC1] ? stby
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 is /u01/app/oracle
[oracle@rac1 bin]$ rman target /

Recovery Manager: Release 11.1.0.6.0 – Production on Mon Dec 28 15:01:33 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

connected to target database: DEMO1 (DBID=3710229940, not open)

RMAN> catalog start with ‘/u01/backup/new_incr’;

using target database control file instead of recovery catalog
searching for all files that match the pattern /u01/backup/new_incr

List of Files Unknown to the Database
=====================================
File Name: /u01/backup/new_incr/bkup_08l2202v_1_1
File Name: /u01/backup/new_incr/bkup_07l21ukv_1_1

Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files…
cataloging done

List of Cataloged Files
=======================
File Name: /u01/backup/new_incr/bkup_08l2202v_1_1
File Name: /u01/backup/new_incr/bkup_07l21ukv_1_1
Step 5: Apply the Incremental Backup to the Standby Database

RMAN> recover database noredo;

Starting recover at 28-DEC-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=141 device type=DISK
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u01/app/oracle/oradata/stby/system01.dbf
destination for restore of datafile 00002: /u01/app/oracle/oradata/stby/sysaux01.dbf
destination for restore of datafile 00003: /u01/app/oracle/oradata/stby/undotbs01.dbf
destination for restore of datafile 00004: /u01/app/oracle/oradata/stby/users01.dbf
destination for restore of datafile 00005: /u01/app/oracle/oradata/stby/rman01.dbf
destination for restore of datafile 00006: /u01/app/oracle/oradata/stby/rman02.dbf
channel ORA_DISK_1: reading from backup piece /u01/backup/new_incr/bkup_07l21ukv_1_1
channel ORA_DISK_1: piece handle=/u01/backup/new_incr/bkup_07l21ukv_1_1 tag=TAG20091228T143302
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
Finished recover at 28-DEC-09

RMAN>

Step 6: Put the standby database back to managed recovery mode.

SQL> recover managed standby database nodelay disconnect;
Media recovery complete.

From the alert.log you will notice that the standby database is still looking for the old log files

*************************************************
FAL[client]: Failed to request gap sequence
GAP – thread 1 sequence 137-137
DBID 768471617 branch 600609988
**************************************************

This is because the controlfile has not been updated.
Hence the standby controlfile has to be recreated

On the primary DATABASE

SQL> alter database create standby controlfile as
2 ‘/u01/control01.ctl’;

Copy the standby control file to the standby site and restart the standby database in managed recovery mode…

NOW CHECK THE ARCHIVE LOG LIST ON BOTH PRIMARY AND STANDBY DATABASE,
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/oradata/archive
Oldest online log sequence 20
Next log sequence to archive 22
Current log sequence 22
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/oradata/archive
Oldest online log sequence 20
Next log sequence to archive 0
Current log sequence 22
SQL>

RHEL Oracle ASMLib Availability and Support

Issue

  • Oracle ASM (Automated Storage Management) is a data volume manager for Oracle databases. ASMLib is an optional utility that can be used on Linux systems to manage Oracle ASM devices. ASM assists users in disk management by keeping track of storage devices dedicated to Oracle databases and allocating space on those devices according to the requests from Oracle database instances.
  • I have tried installing Oracle ASM using the RPMs downloaded from the Oracle site. However, when attempting to install them, I get this error:
[root@host tmp]# rpm -ivh oracleasmlib-2.0.4-1.el6.x86_64.rpm
warning: oracleasmlib-2.0.4-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
error: Failed dependencies:
        oracleasm >= 1.0.4 is needed by oracleasmlib-2.0.4-1.el6.x86_64

Environment

  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7

Resolution

Overview

ASMLib consists of the following components:

  • An open source (GPL) kernel module package: kmod-oracleasm
  • An open source (GPL) utilities package: oracleasm-support
  • A closed source (proprietary) library package: oracleasmlib

ASM features and functionality are available without ASMLib. The use of ASMLib does not affect database performance.

The ASMLib kernel module package is provided as a convenience to Red Hat customers via the Red Hat Network Customer Portal. Red Hat Global Support Services will field ASMLib related issues and use commercially reasonable effort to support the ASMLib kernel module, until such an effort requires knowledge of or modifications to Oracle’s proprietary dependent component(s).

Red Hat Enterprise Linux 6

Red Hat Enterprise Linux 6 customers who use ASMLib can obtain the other two components (the ASMLib utilities package and the proprietary library package) at the locations (subject to change) described in the steps below.

Installing and Configuring ASMLib:

To obtain, install, and configure ASMLib:

  1. Enable the Red Hat Enterprise Linux 6 Server repository on Red Hat Network Customer Portal
  2. Download the ASMLib utilities package (oracleasm-support) and ASMLib library package (oracleasmlib) from the following location:
    http://www.oracle.com/technetwork/server-storage/linux/asmlib/rhel6-1940776.html
  3. Install the ASMLib kernel module package as root using the following command:
    # yum install kmod-oracleasm
    
  4. Install the ASMLib library package obtained from step 2 as root using the following command, with the downloaded package:
    # yum localinstall oracleasmlib-<version>.x86_64.rpm    # Where <version> is the revision downloaded in the previous step
    
  5. Install the ASMLib utilities package obtained from step 2 as root using the following command, with the downloaded package:
    # yum localinstall oracleasm-support-<version>.x86_64.rpm
    

    All three required ASMLib components should now be installed on your system.

  6. Configure ASMLib using the following command:
    oracleasm init
    

Support for ASMLib

The ASMLib kernel module package is provided as a convenience to Red Hat customers via the Red Hat Network Customer Portal. Red Hat Global Support Services will respond to ASMLib related issues and use commercially reasonable efforts to support the ASMLib kernel module until such an effort requires knowledge of or modifications to Oracle’s proprietary dependent component(s).

Since the ASMLib kernel module package is now updated with each kernel release, please update the relevant kmod-oracleasm package with each kernel update.

Additionally, updates may be provided for the kmod-oracleasm package independent of a kernel update. You may find the latestkmod-oracleasm packages in the base RHEL channel.

Oracle will provide support for the other two required ASMLib components (oracleasm-support and oracleasmlib) on Red Hat Enterprise Linux 6. Customers can obtain these two ASMLib components at the location (subject to change) described in the steps above.

Note that the ASMLib kernel module package ABIs are not guaranteed per Red Hat’s Supplementary software package support terms as stated at https://access.redhat.com/support/offerings/production/scope_moredetail.html.

Alternatives to ASMLib

Please note that Red Hat is continuing to develop fully open source alternatives to ASMLib. Red Hat has provided a reference architecture for Oracle RAC clusters using upstream-accepted technologies such as dm-multipath and udev. This reference architecture is available at: https://access.redhat.com/knowledge/articles/216093.

Red Hat Enterprise Linux 7

The ASMLib kernel module (kmod-oracleasm) is available with Red Hat Enterprise Linux. Red Hat Enterprise Linux 7 customers who use ASMLib can obtain the other two components (the ASMLib utilities package and the proprietary library package) at the locations (subject to change) described in the steps below.

Installing and Configuring ASMLib:

To obtain, install, and configure ASMLib:

Enable the Red Hat Enterprise Linux 7 Server repository on Red Hat Network Customer Portal

Download the ASMLib utilities package (oracleasm-support) and ASMLib library package (oracleasmlib) from the following location:
http://www.oracle.com/technetwork/server-storage/linux/asmlib/ol7-2352094.html

Install the ASMLib kernel module package as root using the following command:

# yum install kmod-oracleasm

Install the ASMLib library package obtained from step 2 as root using the following command, with the downloaded package:

# yum localinstall oracleasmlib-<version>.x86_64.rpm    # Where <version> is the revision downloaded in the previous step

Install the ASMLib utilities package obtained from step 2 as root using the following command, with the downloaded package:

# yum localinstall oracleasm-support-<version>.x86_64.rpm

All three required ASMLib components should now be installed on your system.

Configure ASMLib using the following command:

oracleasm init

For more detailed steps on configuring ASMLib, refer to the ASMLib documentation:
http://www.oracle.com/technetwork/indexes/documentation/index.html

Support for ASMLib

The ASMLib kernel module (kmod-oracleasm) is available with Red Hat Enterprise Linux. Red Hat Global Support Services will respond to ASMLib related issues and use commercially reasonable efforts to support the ASMLib kernel module until such an effort requires knowledge of or modifications to Oracle’s proprietary dependent component(s).

Since the ASMLib kernel module package is now updated with each kernel release, please update the relevant kmod-oracleasm package with each kernel update.

Oracle will provide support for the other two required ASMLib components (oracleasm-support and oracleasmlib) on Red Hat Enterprise Linux 7.
Customers can obtain these two ASMLib components at the location (subject to change) described in the steps above.

Note that the ASMLib kernel module package ABIs are not guaranteed per Red Hat’s Supplementary software package support terms as stated at https://access.redhat.com/support/offerings/production/scope_moredetail.html.

Additional Information:

  1. Guide the oracledata official documentation to configure the oracleasm.
    especially for the “Disk Scan Ordering” item. Please see the following reference
    for more detailed configuration instruction:
    http://docs.oracle.com/cd/E11882_01/install.112/e41961/storage.htm#CWLIN301
  2. SELinux may prevent oracleasm.service (systemd) from starting during the system boot. Please see section#2.10 Oracle ASM Fails to Initialize with SELinux in Enforcing Mode in the following link for more detailed instructions on how to workaround the issue:

    Click to access E53499.pdf

    Hint: The oracleasm script fails if SELinux is in Enforcing mode.

    The suggested workaround is to disable the SELInux policy module for Oracle
    ASM before running oracleasm:

    # semodule -d oracleasm
    # semodule -l | grep oracleasm
        oracleasm
        1.0.0 
       Disabled
    
  3. Secureboot

With UEFI secure boot enabled system, oracleasm kernel module can not be loaded,
there are two workarounds for this problem:
* disable secure boot in the BIOS and reboot, and then load the kmod-oracleasm module in.
* sign oracleasm kernel module after install kmod-oracleasm with the vendor’s own secureboot keys.

Please refer to the Red Hat Enterprise 7 System Administration Guide below for how to sign a third party module for second workaround method above:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-signing-kernel-modules-for-secure-boot.html

Important Note:
When using the ‘oracleasm deletedisk’ command, please be sure that using this command is the intention and that the correct device is used.
In RHEL 7, using this command will delete the data in the device without warning, even when the device is active.

Oracle ASMLib Downloads for Oracle Linux 6

Oracle ASMLib Downloads for Oracle Linux 6

Note: All ASMLib installations require the oracleasmlib and oracleasm-support packages appropriate for their machine.

The oracleasm-support package can be downloaded from the Unbreakable Linux Network(ULN) if you have an active support subscription, or from http://public-yum.oracle.com if you do not.

The oracleasm kernel driver is built into the Unbreakable Enterprise Kernel for Oracle Linux 6 and does not need to be installed manually.

The oracleasm kernel driver for the 64-bit (x86_64) Red Hat Compatible Kernel for Oracle Linux 6 can be installed manually from ULN or http://public-yum.oracle.com using the yum tool:

# yum install kmod-oracleasm

This kernel driver is not version-specific and does not need to be upgraded when the kernel is upgraded.

Also, see the release notes.

Jump to:

Oracle ASMLib 2.0

Intel IA32 (x86) Architecture

Intel EM64T (x86_64) Architecture