Tuesday, March 26, 2013

RMAN-08132 ORA-00245


On RAC database, backups starts fail with following warnings:

allocate channel for maintenance type disk;

RMAN retention policy is set to recovery window of 14 days
RMAN-08132: WARNING: cannot update recovery area reclaimable file list

ORA-00245: control file backup failed; target is likely on a local file system

The configuration for control file snapshot is on local disk (not shared)


RMAN> show all;
...
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_sapcc1.f'; # default

Depending on the configuration, the snapshot controlfile might be created on 'Node 1', but is than read on 'Node 2' as that related channel is making a backup of the controlfile.



Wednesday, March 13, 2013

Send mail from command line

One useful tool in administering servers is sending emeial from command line or batch script. This can be accomplished with mail command.

mail -s "Subject" -c <CC address> <e-mail address>

insert mail text
press CONTORL+D to finish and send mail

In case of empty message body:

[user@server ~]$ mail -s "Subject" mail.name@mail.com
EOT
Null message body; hope that's ok

PRCR-1079 : Failed to start resource ora.sapccstandby.db


After duplicating database to a standby database, when trying to start standby database using srvctl utility following errors might appear:

[oracle@oracle-node-dr ~]$ srvctl start database -d sapdbstandby
PRCR-1079 : Failed to start resource ora.sapdbstandby.db
CRS-5010: Update of configuration file "/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initsapdbstandby.ora" failed: details at "(:CLSN00014:)" in "/u01/app/11.2.0/grid/log/oracle-node-dr/agent/ohasd/oraagent_grid/oraagent_grid.log"
CRS-5017: The resource action "ora.sapdbstandby.db start" encountered the following error:
CRS-5010: Update of configuration file "/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initsapdbstandby.ora" failed: details at "(:CLSN00014:)" in "/u01/app/11.2.0/grid/log/oracle-node-dr/agent/ohasd/oraagent_grid/oraagent_grid.log"
. For details refer to "(:CLSN00107:)" in "/u01/app/11.2.0/grid/log/oracle-node-dr/agent/ohasd/oraagent_grid/oraagent_grid.log".

CRS-2674: Start of 'ora.sapdbstandby.db' on 'oracle-node-dr' failed

Workaround

Change permissions on initsapdbstandby.ora

[oracle@oracle-node-dr dbhome_1]$ cd $ORACLE_HOME
[oracle@oracle-node-dr dbhome_1]$ chmod 775 dbs
[oracle@oracle-node-dr dbhome_1]$ cd dbs
[oracle@oracle-node-dr dbs]$ chmod 775 initsapdbstandby.ora

Start database resource:

[oracle@oracle-node-dr ~]$ srvctl start database -d sapdbstandby

Check available resources:

[grid@oracle-node-dr ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       oracle-node-dr
ora.FRA.dg
               ONLINE  ONLINE       oracle-node-dr
ora.LISTENER.lsnr
               ONLINE  ONLINE       oracle-node-dr
ora.asm
               ONLINE  ONLINE       oracle-node-dr           Started
ora.ons
               OFFLINE OFFLINE      oracle-node-dr
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       oracle-node-dr
ora.diskmon
      1        OFFLINE OFFLINE
ora.evmd
      1        ONLINE  ONLINE       oracle-node-dr
ora.sapdbstandby.db
      1        ONLINE  INTERMEDIATE oracle-node-dr           Mounted (Closed)
[grid@oracle-node-dr ~]$