Search This Blog

Wednesday, July 16, 2014

afadmprf.sh and afcpctx.sh failed during autoconfig

Error:

[AutoConfig Error Report]
The following report lists errors AutoConfig encountered during each
phase of its execution.  Errors are grouped by directory and phase.
The report format is:
      <filename>  <phase>  <return code where appropriate>

  [PROFILE PHASE]
  AutoConfig could not successfully execute the following scripts:
    Directory: /data02/erpval/oracle/valcomn/admin/install/VAL_s603914se2sl196
      afadmprf.sh             INSTE8_PRF         1
      afcpctx.sh              INSTE8_PRF         1


AutoConfig is exiting with status 2

Solution: followed below steps 
1. removed the log files from $APPLCSF
[applval@S603914SE2SL196 log]$ find . -type f -mtime +7 -exec rm -rf {} \;
2. cd $APPL_TOP

3. Source the APPSORA.env file.

4. Run relink as follows:
adrelink.sh force=y ranlib=y "AD all"

4a. Then run the following:
adrelink.sh force=y ranlib=y "fnd FNDCPUCF"

5. Run adadmin

6. Select option 2 "Maintain Applications Files Menu".

7. Select option 2 "Relink Applications Programs".

8. Relink all modules' programs.

9.then re-run the autoconfig and update the status
Reference: Autoconfig Failing On Concurrent Node At Afadmprf.sh & Afcpctx.sh INSTE8_PRF 1 (Doc ID 1634846.1)
After Appling 11i.ATG_PF.H.Delta.7 Error On afadmprf.sh & afcpctx.sh (Doc ID 943614.1)

Concurrent services not coming up after services restart/server reboot

Concurrent services not coming up after services restart/server reboot

Error in ICM log file:
Routine AFPEIM encountered an error while starting concurrent manager STANDARD with library /data02/erpval/oracle/valappl/fnd/11.5.0/bin/FNDLIBR.

Check that your system has enough resources to start a concurrent manager process. Contact your system admin : 16-JUL-2014 13:27:05
Starting STANDARD Concurrent Manager               : 16-JUL-2014 13:27:05
Service Manager FNDSM_S603914SE2SL196_VAL could not initialize. The Service Manager has been unable to verify its environment and create its log file.
Routine AFPEIM encountered an error while starting concurrent manager STANDARD with library /data02/erpval/oracle/valappl/fnd/11.5.0/bin/FNDLIBR.

Check that your system has enough resources to start a concurrent manager process. Contact your system admin : 16-JUL-2014 13:27:06
Starting STANDARD Concurrent Manager               : 16-JUL-2014 13:27:06
Service Manager FNDSM_S603914SE2SL196_VAL could not initialize. The Service Manager has been unable to verify its environment and create its log file.
Routine AFPEIM encountered an error while starting concurrent manager STANDARD with library /data02/erpval/oracle/valappl/fnd/11.5.0/bin/FNDLIBR.

Check that your system has enough resources to start a concurrent manager process. Contact your system admin : 16-JUL-2014 13:27:06
Starting STANDARD Concurrent Manager               : 16-JUL-2014 13:27:06
Service Manager FNDSM_S603914SE2SL196_VAL could not initialize. The Service Manager has been unable to verify its environment and create its log file.
Routine AFPEIM encountered an error while starting concurrent manager STANDARD with library /data02/erpval/oracle/valappl/fnd/11.5.0/bin/FNDLIBR.

Check that your system has enough resources to start a concurrent manager process. Contact your system admin : 16-JUL-2014 13:27:06

Solution: followed the below steps as part of resolutions.

1.ran cmclean.sql
2.exec FND_CONC_CLONE.SETUP_CLEAN;
3. execute autoconfig on db nodes
4. execute autoconfig on apps nodes
5. started the services
 


 

Sunday, May 11, 2014

Steps for configuring OCM



[orauser@erp1 ~]$ grep -i jdk $CONTEXT_FILE
         <JDK_TOP oa_var="s_jdktop">/data/d02/orauser/usertest/db/tech_st/11.2.0/jdk/jre</JDK_TOP>
         <JRE_TOP oa_var="s_jretop">/data/d02/orauser/usertest/db/tech_st/11.2.0/jdk/jre</JRE_TOP>
         <ADJVAPRG oa_var="s_adjvaprg" osd="UNIX">/data/d02/orauser/usertest/db/tech_st/11.2.0/jdk/jre/bin/java</ADJVAPRG>
         <JAVA_HOME oa_var="s_db_java">/data/d02/orauser/usertest/db/tech_st/11.2.0/jdk/jre</JAVA_HOME>
[orauser@erp1 ~]$ export JAVA_HOME=/data/d02/orauser/usertest/db/tech_st/11.2.0/jdk/jre
[orauser@erp1 ~]$ cd $ORACLE_HOME/ccr/bin




[orauser@erp1 bin]$ ./setupCCR -s 123456 xyz.abc@doman.com

** Installing base package **
Deploying core - Version 10.3.4.0.0

** Registering installation with Oracle Configuration Manager server(s) **
Deploying engines - Version 10.2.7.1.0
Deploying metricdata - Version 10.2.4.0.3
Deploying scripts - Version 10.3.4.0.0

** Getting package updates from ContentServer **
Deploying core - Version 12.0.0.0.1
Deploying engines - Version 12.0.0.0.0
Deploying metricdata - Version 12.0.0.0.0
Deploying ocmcert - Version 12.0.0.0.1
Deploying scripts - Version 12.0.0.0.1

** Starting the Oracle Configuration Manager Scheduler **
Oracle Configuration Manager - Release: 12.0.0.0.1 - Production
Copyright (c) 2005, 2013, Oracle and/or its affiliates.  All rights reserved.
------------------------------------------------------------------
Starting Oracle Configuration Manager...
Waiting for status from Oracle Configuration Manager....
Start Date               10-May-2014 23:51:27
Last Collection Time     -
Next Collection Time     11-May-2014 23:49:00
Collection Frequency     Daily at 23:49
Collection Status        scheduled collection running
Log Directory            /data/d02/orauser/usertest/db/tech_st/11.2.0/ccr/hosts/erp1.com/log
Registered At            10-May-2014 23:49:25
Automatic Update         On
Collector Mode           Connected

Oracle Configuration Manager successfully started.

Oracle Configuration Manager has been configured in connected mode. If the
target ORACLE_HOME is running a database, please refer to the
"Post-installation Database Configuration" section of the OCM Installation
and Administration Guide
(http://www.oracle.com/technology/documentation/ocm.html) to complete the
installation.

View configuration data reports and access valuable configuration best
practices by going to My Oracle Support.
[orauser@erp1 bin]$

 Steps to drop OCM:

[orauser@erp1 bin]$ ./emCCR stop
Oracle Configuration Manager - Release: 12.0.0.0.1 - Production
Copyright (c) 2005, 2013, Oracle and/or its affiliates.  All rights reserved.
------------------------------------------------------------------
Oracle Configuration Manager Stopped...
[orauser@erp1 bin]$


[orauser@erp1 scripts]$ sqlplus '/as sysdba'

SQL*Plus: Release 11.2.0.3.0 Production on Sun May 11 00:00:29 2014

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> @dropocm.sql
SQL> SET serveroutput on
SQL> set verify off
SQL>
SQL> -- handle 11+ databases (ACLs)
SQL> @@dropocm11plus
SQL> Rem
SQL> Rem dropocm11plus.sql
SQL> Rem
SQL> Rem Copyright (c) 2011, 2013, Oracle and/or its affiliates.
SQL> Rem All rights reserved.
SQL> Rem
SQL> Rem    NAME
SQL> Rem         dropocm11plus.sql - <one-line expansion of the name>
SQL> Rem
SQL> Rem    DESCRIPTION
SQL> Rem         <short description of component this file declares/defines>
SQL> Rem
SQL> Rem    NOTES
SQL> Rem         <other useful comments, qualifications, etc.>
SQL> Rem
SQL> Rem    MODIFIED   (MM/DD/YY)
SQL> Rem    imunusam    09/16/13 - To fix bug 17461614
SQL> Rem    jsutton     09/03/13 - make more tolerant of no xmldb
SQL> Rem    jsutton     09/16/11 - put 11+ operations in separate file
SQL> Rem    jsutton     09/16/11 - Created
SQL> Rem
SQL>
SQL>
SQL> SET serveroutput on
SQL> set verify off
SQL>
SQL> DECLARE
  2    l_instvers       VARCHAR2(100);
  3    l_comp_cnt       NUMBER;
  4    l_regexp_match   NUMBER;
  5    TYPE p_acl_ids_type  IS TABLE OF VARCHAR2(4000);
  6    TYPE p_acl_priv_type IS TABLE OF NUMBER;
  7    l_acl_ids        p_acl_ids_type;
  8    l_acl_privs      p_acl_priv_type;
  9    l_acl_cnt        NUMBER;
 10
 11  BEGIN
 12    -- Drop the Network ACL if the ACL was created.
 13    select LPAD(version,10,'0') into l_instvers from v$instance;
 14    IF l_instvers >= '11.0.0.0.0' THEN
 15      -- check for XML DB installed
 16      EXECUTE IMMEDIATE
 17      'select count(*) from dba_registry where COMP_NAME = ''Oracle XML Database'' and STATUS = ''VALID''' into l_comp_cnt;
 18      -- XML DB installed, proceed
 19      IF l_comp_cnt > 0 THEN
 20        -- drop the entire ACL if it is the one we created
 21        EXECUTE IMMEDIATE
 22        'select count(*) from dba_network_acls where regexp_like(acl,''.oracle-sysman-ocm-Resolve-Access.xml$'')' into l_regexp_match;
 23        IF (l_regexp_match > 0) THEN
 24          EXECUTE IMMEDIATE
 25          'BEGIN ' ||
 26          '  DBMS_NETWORK_ACL_ADMIN.DROP_ACL(''oracle-sysman-ocm-Resolve-Access.xml''); ' ||
 27          '  COMMIT;' ||
 28          'END;';
 29        END IF;
 30        -- check for resolve privilege for OCM user
 31        -- get all ACLIDs and determine whether ORACLE_OCM has resolve privilege through each
 32        BEGIN
 33          EXECUTE IMMEDIATE
 34          'SELECT acl, DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE_ACLID(aclid, ''ORACLE_OCM'', ''resolve'') acl_priv ' ||
 35          '  FROM dba_network_acls' BULK COLLECT INTO l_acl_ids, l_acl_privs;
 36          EXCEPTION
 37            WHEN OTHERS THEN NULL;
 38        END;
 39        -- walk the collection
 40        FOR i IN 1..l_acl_ids.count LOOP
 41          BEGIN
 42            IF (l_acl_privs(i) IS NOT NULL AND l_acl_privs(i) > 0) THEN
 43              -- remove resolve privilege
 44              EXECUTE IMMEDIATE
 45              'BEGIN ' ||
 46              '  DBMS_NETWORK_ACL_ADMIN.DELETE_PRIVILEGE(acl => ' || l_acl_ids(i) || ',principal => ''ORACLE_OCM'');' ||
 47              '  COMMIT;' ||
 48              'END;' ;
 49            END IF;
 50            EXCEPTION
 51              WHEN OTHERS THEN NULL;
 52          END;
 53        END LOOP;
 54      END IF;
 55    END IF;
 56  END;
 57  /

PL/SQL procedure successfully completed.

SQL>
SQL> DECLARE
  2    l_user_dropped   BOOLEAN;
  3
  4   /*
  5    * Procedure to drop user.
  6    * If p_throw_exp is TRUE, throw exception if user cannot be dropped.
  7    */
  8    PROCEDURE drop_user
  9       (p_user IN VARCHAR2, p_dir_name IN VARCHAR2, p_dir_name2 IN VARCHAR2,
 10        p_throw_user_drop_exp BOOLEAN := FALSE,o_user_dropped OUT BOOLEAN)
 11    IS
 12      l_ll_user_exists       NUMBER;
 13      l_ll_pkg_exists       NUMBER;
 14      l_vers            v$instance.version%TYPE;
 15      l_compat_vers     v$parameter.value%TYPE;
 16      l_dirobj_cnt   NUMBER;
 17    BEGIN
 18      BEGIN
 19        select count(*) into l_ll_user_exists from dba_users where username = p_user;
 20        o_user_dropped := FALSE;
 21        IF l_ll_user_exists = 1 THEN
 22          SELECT count(*) into l_ll_pkg_exists FROM sys.user$ u, sys.obj$ o WHERE u.name = p_user AND o.name ='MGMT_DB_LL_METRICS' AND o.owner# = u.user# AND o.type# = 9 AND o.status LIKE '%' ;
 23          IF l_ll_pkg_exists = 1 THEN
 24            execute immediate 'drop user '|| p_user ||' cascade';
 25            o_user_dropped := TRUE;
 26          ELSIF p_throw_user_drop_exp  THEN
 27            RAISE_APPLICATION_ERROR(-20030,'Could not drop the OCM user ''' || p_user || '''. It does not contain OCM schema. Please drop this user to proceed.');
 28          END IF;
 29        END IF;
 30      EXCEPTION
 31        WHEN OTHERS THEN
 32          IF  p_throw_user_drop_exp  THEN
 33            raise_application_error(-20006,SQLERRM);
 34          ELSE
 35             NULL;
 36          END IF;
 37      END;
 38      select substr(version,1,5) into l_vers from v$instance;
 39      begin
 40        select substr(value,1,5) into l_compat_vers from v$parameter where lower(name) = 'compatible';
 41        exception
 42          WHEN NO_DATA_FOUND THEN
 43            l_compat_vers := l_vers;
 44      end;
 45      IF l_vers != '9.0.1' AND l_vers != '8.1.7' AND l_compat_vers != '8.1.7' THEN
 46        select count(*) into l_dirobj_cnt from  dba_directories where DIRECTORY_NAME = p_dir_name ;
 47        IF l_dirobj_cnt = 1 THEN
 48          execute immediate 'DROP DIRECTORY ' || p_dir_name;
 49        END IF;
 50        IF p_dir_name2 IS NOT NULL THEN
 51          select count(*) into l_dirobj_cnt from  dba_directories where DIRECTORY_NAME = p_dir_name2 ;
 52          IF l_dirobj_cnt = 1 THEN
 53            execute immediate 'DROP DIRECTORY ' || p_dir_name2;
 54          END IF;
 55        END IF;
 56      END IF;
 57    END drop_user;
 58
 59  BEGIN
 60     -- Drop previous OCM user
 61     -- discard the return value
 62     drop_user('CCR','CCR_CONFIG_DIR',NULL,FALSE,l_user_dropped);
 63
 64     -- Drop current OCM user
 65     drop_user('ORACLE_OCM','ORACLE_OCM_CONFIG_DIR','ORACLE_OCM_CONFIG_DIR2',TRUE,l_user_dropped);
 66     if( l_user_dropped ) THEN
 67       DBMS_OUTPUT.PUT_LINE('Dropped previous OCM schema successfully.');
 68     ELSE
 69       DBMS_OUTPUT.PUT_LINE('No previous OCM schema to drop.');
 70     END IF;
 71  END;
 72  /
Dropped previous OCM schema successfully.

PL/SQL procedure successfully completed.

SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

Ref:
OCM ( Oracle Configuration Manager ) and My Oracle Support : FAQ and Troubleshooting (Doc ID 369619.1)
Upgrading Oracle Configuration Manager (OCM) within E-Business Suite Release 12.0 (Doc ID 727157.1)

Tuesday, May 6, 2014

ORA-00245: control file backup operation failed , RMAN-03009

Error:
RMAN-03009: failure of backup command on disk4 channel at 05/06/2014 13:35:20
ORA-00245: control file backup operation failed
continuing other job steps, job failed will not be re-run
channel disk3: finished piece 1 at 06-MAY-2014 13:35:21
piece handle=/RMAN/Hot/SOA/SOA_20140506/DB_20140506_0kp7jv4o_1_1 tag=FULL_20140506 comment=NONE
channel disk3: backup set complete, elapsed time: 00:00:01
channel disk1: finished piece 1 at 06-MAY-2014 13:35:55
piece handle=/RMAN/Hot/SOA/SOA_20140506/DB_20140506_0gp7jv4n_1_1 tag=FULL_20140506 comment=NONE
channel disk1: backup set complete, elapsed time: 00:00:36
channel disk2: finished piece 1 at 06-MAY-2014 13:35:55
piece handle=/RMAN/Hot/SOA/SOA_20140506/DB_20140506_0hp7jv4n_1_1 tag=FULL_20140506 comment=NONE
channel disk2: backup set complete, elapsed time: 00:00:36
released channel: disk1
released channel: disk2
released channel: disk3
released channel: disk4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup plus archivelog command at 05/06/2014 13:35:55
RMAN-03009: failure of backup command on disk4 channel at 05/06/2014 13:35:20
ORA-00245: control file backup operation failed
RMAN> RMAN>
Recovery Manager complete.
2014/05/06 13:35:56 ERROR: RMAN FULL backup Failed
Symptoms:
In RAC environment any form of controlfile backup may fail with ORA-0245 if the location of the Snapshot Controlfile is not a shared location.
The backup of the controlfile actualy makes a backup of the SNAPSHOT controlfile. The Snapshot controlfile is created when the controlfile is about to be backed up.
The Snapshot controlfile is a read-consistent copy of the controlfile.
 Solution:
 This is a RAC specific 'configuration' issue and the correct configuration is as described below
It is changed behaviour which requires that the snapshot controlfile in a RAC environment, is on a shared location. 
1. Check the snapshot controlfile location:

RMAN>  show snapshot controlfile name;
RMAN configuration parameters for database with db_unique_name SOAPROD are:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/d06/soa/product/product/11.2.0/dbs/snapcf_SOA1.f'; # default

2. Configure the snapshot controlfile to a shared disk:
RMAN> RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/RMAN/Hot/SOA/snapcf_SOA1.f';
Or in case of ASM use
RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+<DiskGroup>/snapcf_<DBNAME>.f';

Ref: ORA-245: In RAC environment from 11.2 onwards Backup Or Snapshot controlfile needs to be in shared location (Doc ID 1472171.1)

Friday, March 7, 2014

RMAN-06026: some targets not found - aborting restore & RMAN-03002 while restoring

While doing restore database I got below errors:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 03/07/2014 22:17:33
RMAN-06026: some targets not found - aborting restore

Cause: I unexpectedly RMAN> catalog start with '/nfs/orafra/prod/PROD_C/backupset/2014_03_08/' noprompt; which is not yet available

It cataloged very old files as below

searching for all files in the recovery area
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /nfs/orafra/webdb0/STG3/archivelog/PROD/archivelog/2013_10_11/o1_mf_1_1_95kgmq5h_.arc
File Name: /nfs/orafra/webdb0/STG3/archivelog/PROD/autobackup/2013_10_11/o1_mf_n_828561497_95kgpty2_.bkp

searching for all files that match the pattern /nfs/orafra/prod/PROD_C/backupset/2014_03_08/
no files found to be unknown to the database


Trying to restore the data base using below commands and got mentioned errors

RUN {
allocate channel d1 type disk;
allocate channel d2 type disk;
allocate channel d3 type disk;
allocate channel d4 type disk;
restore database;
recover database;
release channel d1;
release channel d2;
release channel d3;
release channel d4;

}
exit;

Error:

released channel: d1
released channel: d2
released channel: d3
released channel: d4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 03/07/2014 22:17:33
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 79 found to restore
RMAN-06023: no backup or copy of datafile 78 found to restore





Solution Followed:


RMAN> list incarnation of database;


List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       PROD 3555113110       PARENT  8242472798304 24-JUL-09
2       2       PROD 3555113110       PARENT  8242490168035 25-JUL-09
3       3     PROD 3555113110       PARENT  8506956585999 03-OCT-13
4       4     PROD 3555113110       CURRENT 8507435956232 11-OCT-13

RMAN> reset database to incarnation 3;

database reset to incarnation 3

RMAN> list incarnation of database;


List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1    PROD 3555113110       PARENT  8242472798304 24-JUL-09
2       2      PROD 3555113110       PARENT  8242490168035 25-JUL-09
3       3       PROD 3555113110       CURRENT 8506956585999 03-OCT-13
4       4     PROD 3555113110       ORPHAN  8507435956232 11-OCT-13

RMAN> exit
and initiated the restore with no issues



 

Thursday, December 12, 2013

Scripts to find USED,FREE and total DataBase sizes

--> Script to find Total DB size:

select a.data_size+b.temp_size+c.redo_size "total_size"
from ( select sum(bytes)/1024/1024/1024 data_size
         from dba_data_files ) a,
     ( select nvl(sum(bytes)/1024/1024/1024,0) temp_size
         from dba_temp_files ) b,
     ( select sum(bytes)/1024/1024/1024 redo_size
         from sys.v_$log ) c;


--> Script to find Total and Free DB sizes:

col "Database Size" format a20
col "Free space" format a20
select round(sum(used.bytes) / 1024 / 1024 /1024) || ' GB' "Database Size"
,      round(free.p / 1024 / 1024 /1024) || ' GB' "Free space"
from (select bytes from v$datafile
      union all
      select bytes from v$tempfile
      union all
      select bytes from v$log) used
,    (select sum(bytes) as p from dba_free_space) free
group by free.p
/

--> Script to find USED DB size:

SELECT round(SUM(bytes)/1024/1024/1024) "GB" FROM dba_segments;

--> Script to report true free space within the used portion of the TEMPFILE:

SELECT   A.tablespace_name tablespace, D.mb_total,
         SUM (A.used_blocks * D.block_size) / 1024 / 1024 mb_used,
         D.mb_total - SUM (A.used_blocks * D.block_size) / 1024 / 1024 mb_free
FROM     v$sort_segment A,
         (
         SELECT   B.name, C.block_size, SUM (C.bytes) / 1024 / 1024 mb_total
         FROM     v$tablespace B, v$tempfile C
         WHERE    B.ts#= C.ts#
         GROUP BY B.name, C.block_size
         ) D
WHERE    A.tablespace_name = D.name
GROUP by A.tablespace_name, D.mb_total;

RC:crs services are not coming up after removal OS user - CRS-0184: Cannot communicate with the CRS daemon after reboot

Steps performed in CRS startup issue and its resolution after OS user (ORATEST) removal:
--> Error message: the message lists the serverpool, listener and data type entries for user “ORATEST”
[SYSTEM.CRSD.TYPES.ora!database!type.TYPE_ACL.CONFIG]
ORATEXT : DEFAULT=owner:ORATEST:rwx,pgrp:oinstall:rwx,other::r--~FLAGS=_CONFIG~ID=1078~TYPE=_STRING~
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : PROCR_NONE, OTHER_PERMISSION : PROCR_NONE, USER_NAME : root, GROUP_NAME : root}
[SYSTEM.CRSD.RESOURCES.ora!LISTENER_ORATEST_myhost1!lsnr]
[SYSTEM.CRSD.RESOURCES.ora!LISTENER_ORATEST_myhost1!lsnr.CONFIG]
ORATEXT : ACL=owner:ORATEST:rwx,pgrp:oinstall:rwx,other::r--~ACTION_FAILURE_TEMPLATE=~ACTION_SCRIPT=/d06/ORATEST/product/11.2.0/bin/racgwrap%CRS_SCRIPT_SUFFIX%~AGENT_FILENAME=%CRS_HOME%/bin/oraagent%CRS_EXE_SUFFIX%~ALIAS_NAME=ora.%CRS_CSS_NODENAME_LOWER_CASE%.LISTENER_ORATEST_myhost1_%CRS_CSS_NODENAME_UPPER_CASE%.lsnr~AUTO_START=never~BASE_TYPE=ora.local_resource.type~CHECK_INTERVAL=60~CHECK_TIMEOUT=30~DEFAULT_TEMPLATE=PROPERTY(RESOURCE_CLASS=listener) PROPERTY(LISTENER_NAME=PARSE(%NAME%, ., 2))~DEGREE=1~DESCRIPTION=Oracle Listener resource~ENABLED=1~ENDPOINTS=TCP:1521~LOAD=1~LOGGING_LEVEL=1~NAME=ora.LISTENER_ORATEST_myhost1.lsnr~NLS_LANG=~NOT_RESTARTING_TEMPLATE=~OFFLINE_CHECK_INTERVAL=0~ORACLE_HOME=/d06/ORATEST/product/11.2.0~PORT=1521~PROFILE_CHANGE_TEMPLATE=~RESTART_ATTEMPTS=5~SCRIPT_TIMEOUT=60~START_DEPENDENCIES=hard(type:ora.cluster_vip_net1.type) pullup(type:ora.cluster_vip_net1.type)~START_TIMEOUT=180~STATE_CHANGE_TEMPLATE=~STOP_DEPENDENCIES=hard(intermediate:type:ora.cluster_vip_net1.type)~STOP_TIMEOUT=0~TYPE=ora.listener.type~TYPE_ACL=owner:crstest:rwx,pgrp:oinstall:rwx,other::r--~TYPE_VERSION=1.2~UPTIME_THRESHOLD=1d~USR_ORA_ENV=~USR_ORA_OPI=false~VERSION=11.2.0.2.0~
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : PROCR_NONE, OTHER_PERMISSION : PROCR_NONE, USER_NAME : root, GROUP_NAME : root}

..
[SYSTEM.CRSD.RESOURCES.ora!LISTENER_ORATEST_myhost2!lsnr.CONFIG]
ORATEXT : ACL=owner:ORATEST:rwx,pgrp:oinstall:rwx,other::r--~ACTION_FAILURE_TEMPLATE=~ACTION_SCRIPT=/d06/ORATEST/product/11.2.0/bin/racgwrap%CRS_SCRIPT_SUFFIX%~AGENT_FILENAME=%CRS_HOME%/bin/oraagent%CRS_EXE_SUFFIX%~ALIAS_NAME=ora.%CRS_CSS_NODENAME_LOWER_CASE%.LISTENER_ORATEST_myhost2_%CRS_CSS_NODENAME_UPPER_CASE%.lsnr~AUTO_START=restore~BASE_TYPE=ora.local_resource.type~CHECK_INTERVAL=60~CHECK_TIMEOUT=30~DEFAULT_TEMPLATE=PROPERTY(RESOURCE_CLASS=listener) PROPERTY(LISTENER_NAME=PARSE(%NAME%, ., 2))~DEGREE=1~DESCRIPTION=Oracle Listener resource~ENABLED=1~ENDPOINTS=TCP:1521~LOAD=1~LOGGING_LEVEL=1~NAME=ora.LISTENER_ORATEST_myhost2.lsnr~NLS_LANG=~NOT_RESTARTING_TEMPLATE=~OFFLINE_CHECK_INTERVAL=0~ORACLE_HOME=/d06/ORATEST/product/11.2.0~PORT=1521~PROFILE_CHANGE_TEMPLATE=~RESTART_ATTEMPTS=5~SCRIPT_TIMEOUT=60~START_DEPENDENCIES=hard(type:ora.cluster_vip_net1.type) pullup(type:ora.cluster_vip_net1.type)~START_TIMEOUT=180~STATE_CHANGE_TEMPLATE=~STOP_DEPENDENCIES=hard(intermediate:type:ora.cluster_vip_net1.type)~STOP_TIMEOUT=0~TYPE=ora.listener.type~TYPE_ACL=owner:crstest:rwx,pgrp:oinstall:rwx,other::r--~TYPE_VERSION=1.2~UPTIME_THRESHOLD=1d~USR_ORA_ENV=~USR_ORA_OPI=false~VERSION=11.2.0.2.0~
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : PROCR_NONE, OTHER_PERMISSION : PROCR_NONE, USER_NAME : root, GROUP_NAME : root}


--> The commands to stop and delete the server pool associated with ORATEST.

[root@myhost1 ~]# cd $GRID_HOME/bin
./crsctl stop resource ora.ORATEST.db
./crsctl delete resource ora.ORATEST.db
./crsctl delete serverpool ora.ORATEST
./crsctl getperm serverpool ora.ORATEST
./crsctl status serverpool

--> Commands to remove the  ORATEST listeners
[root@myhost1 bin]# ./srvctl remove listener -l LISTENER_ORATEST_myhost1
[root@myhost1 bin]# ./srvctl remove listener -l LISTENER_ORATEST_myhost2
[root@myhost1 bin]# ./srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): myhost1,myhost2

--> Commands executed during action to delete data type

1. Check database type
# ./crsctl status type |grep database
TYPE_NAME=ora.database.type

2. Check/Remove database
cd $ORACLE_HOME/bin
$srvctl config database -d ORATEST
$srvctl remove database -d db_name

3. Delete database type resource
cd $GRID_HOME/bin
# ./crsctl delete type ora.database.type
# ./crsctl status type |grep database
/d01/crstest/product/11.2.0/bin/crsctl status type  ora.database.type -p | grep DEFAULT_VALUE=owner
4. Get ocrdump With ROOT user
cd $GRID_HOME/bin
./ocrdump /tmp/ocrdump_after.log
# cat /tmp/ocrdump_after.log|grep -i ORATEST
5. Add database
Syntax --
$ ./srvctl add database -d <db_name> -p <Spfile> -o<Oracle_home>
$ ./srvctl add instance -d <db_name> -i <instance_name> -n <node>

Commands --
./srvctl add database -d VAL -o /d01/oraval/product/10.2.0
./srvctl add instance -d VAL -i VAL1 -n myhost1
./srvctl add instance -d VAL -i VAL2 -n myhost2

6. Get ocrdump.
./ocrdump /tmp/ocrdump_withdb.log
7. Stop/Start CRS (As OS user already deleted)
[root@myhost2 bin]# id ORATEST
id: ORATEST: No such user
#crsctl stop crs
#crsctl start crs
8. Stop crs/reboot node
#crsctl stop crs
9. Reboot nodes.
10. Check CRS services:
[root@myhost1 bin]# ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       myhost1
               ONLINE  ONLINE       myhost2
ora.asm
               OFFLINE OFFLINE      myhost1
               OFFLINE OFFLINE      myhost2
ora.gsd
               OFFLINE OFFLINE      myhost1
               OFFLINE OFFLINE      myhost2
ora.net1.network
               ONLINE  ONLINE       myhost1
               ONLINE  ONLINE       myhost2
ora.ons
               ONLINE  ONLINE       myhost1
               ONLINE  ONLINE       myhost2
ora.registry.acfs
               OFFLINE OFFLINE      myhost1
               OFFLINE OFFLINE      myhost2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       myhost2
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       myhost1
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       myhost1
ora.VAL.VAL1.inst
      1        ONLINE  ONLINE       myhost1
ora.VAL.VAL2.inst
      1        ONLINE  ONLINE       myhost2
ora.VAL.db
      1        ONLINE  ONLINE       myhost1
ora.cvu
      1        ONLINE  ONLINE       myhost1
ora.oc4j
      1        ONLINE  ONLINE       myhost1
ora.myhost1.LISTENER_VAL_myhost1.lsnr
      1        ONLINE  ONLINE       myhost1
ora.myhost1.vip
      1        ONLINE  ONLINE       myhost1
ora.myhost2.LISTENER_VAL_myhost2.lsnr
      1        ONLINE  ONLINE       myhost2
ora.myhost2.vip
      1        ONLINE  ONLINE       myhost2
ora.scan1.vip
      1        ONLINE  ONLINE       myhost2
ora.scan2.vip
      1        ONLINE  ONLINE       myhost1
ora.scan3.vip
      1        ONLINE  ONLINE       myhost1


Transportable tablespace refresh

  1.check tablespace for the user which need to refresh -------------------------------------------------------------------  SQL> select ...