Skip to main content

Posts

Showing posts from March, 2014

Rac Commands

srvctl commands in Oracle RAC  SRVCTL: (Server Control utility)  srvctl command target [options]  commands: enable|disable|start|stop|relocate|status|add|remove|modify|getenv|setenv|unsetenv|config targets: database/db|instance/inst|service/serv|nodeapps|asm|listener  targets: database/db|instance/inst|service/serv|nodeapps|asm|listener |diskgroup|home|ons|eons|filesystem|gns|oc4j|scan|scan_listener |srvpool|server|VIP -- From Oracle 11g R2  srvctl -help or srvctl -v  srvctl -V -- prints version  srvctl version: 10.2.0.0.0 (or) srvctl version: 11.2.0.1.0  srvctl -h -- print usage  srvctl status service –h  Database:  srvctl add database -d db_name -o ORACLE_HOME [-m domain_name][-p spfile] [-A name|ip/netmask]  [-r {PRIMARY|PHYSICAL_STANDBY|LOGICAL_STANDBY|SNAPSHOT_STANDBY}]  [-s start_options] [-n db_name] [-y {AUTOMATIC|MANUAL}]  srvctl add database -d prod -o /u01/oracle/product/102/prod Oracle Rac  Sta...

HOW DOES 11G R2 CLUSTERWARE START ASM WHEN ASM SPFILE IS STORED ON ASM ITSELF?

  Beginning with the version 11g Release 2, the ASM spfile is stored automatically in the first disk group created during Grid Infrastructure installation. Since voting disk/OCR are stored on ASM, ASM needs to be started on the node. To startup ASM, its SPfile is needed. But SPFILE is again located on ASM diskgroup only.  How does clusterware resolve this issue? - When a node of an Oracle Clusterware cluster restarts, OHASD is started by platform-specific means. OHASD accesses OLR (Oracle Local Registry) stored on the local file system to get the data needed to complete OHASD initialization -  OHASD brings up GPNPD and CSSD. CSSD accesses the GPNP Profile stored on the local file system which contains the following vital bootstrap data; a. ASM_DISKSTRING parameter (if specified) to locate the disks on which ASM disks are configured. b. SM SPFILE location : Name of the diskgroup containing ASM spfile c. Location of  Voting Files : ASM - CSSD s...

How to restore OCR in 11gR2 grid infrastrcture in ASM without starting CRS?

If your OCR is corrupted and you have to restore, first you have access to diskgroup on which OCR is places. To start ASM you have to start CRS, and CRS can't be started since OCR is no available. How to resolve this issue? You can start ASM with CRS running. If ASM is not running you will get segmentation fault. [root@tdc-ovn-0083 tdc-ovn-0083]# ocrconfig -restore /oraclecrsware/product/11.2.0/cdata/crs2/backup00.ocr Segmentation faulT Start resources without CRS on one node only. [root@tdc-ovn-0083 tdc-ovn-0083]# crsctl start crs -excl -nocrs CRS-4123: Oracle High Availability Services has been started. CRS-2672: Attempting to start 'ora.mdnsd' on 'tdc-ovn-0083' CRS-2676: Start of 'ora.mdnsd' on 'tdc-ovn-0083' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'tdc-ovn-0083' CRS-2676: Start of 'ora.gpnpd' on 'tdc-ovn-0083' succeeded CRS-2672: Attempting to start 'ora.cssdmonitor' on 'tdc-o...

What is CPU Patch and how to apply it in a RAC Environment

What is CPU Patch and how to apply it in a RAC Environment What is CPU patch? A Critical Patch Update is a collection of patches for multiple security vulnerabilities. Critical Patch Update patches are usually cumulative but each advisory describes only the security fixes added since the previous Critical Patch Update advisory. Thus, prior Critical Patch Update advisories should be reviewed for information regarding earlier published security fixes. When is CPU Patches Released? CPU patches is released 4 times a year. January, April, July &October. Information about the latest CPU Patch can be found in the below link http://www.oracle.com/technetwork/topics/security/alerts-086861.html Note: To download the latest CPU patch, one must have a valid oracle support login. How to apply a Database CPU patch in a RAC Environment? 1} Shutdown the Database instance on Node 1 2} Ensure that the $PATH has the following executables: make , ar , ld , and nm . export PATH=$...

Partitioned Tables TESTING

create table prime ( x primary key ) as  select user_id from all_users; create table DEMO1  as select user_id from all_users; alter table DEMO1 add constraint DEMO1_pk primary key(user_id); alter table DEMO1 add constraint DEMO1_fk foreign key(user_id) referencesp(x);  2 create table DEMO2 (username varchar2(30),user_id number, created date  ) partition by hash(user_id) partitions 8; exec dbms_redefinition.can_redef_table( user, 'DEMO1' ); exec dbms_redefinition.start_redef_table( user, 'DEMO1', 'DEMO2' ); **************************************** variable nerrors number begin dbms_redefinition.copy_table_dependents ( user, 'DEMO1','DEMO2',copy_indexes => dbms_redefinition.cons_orig_params,num_errors => :nerrors ); end; / *************************************** exec dbms_redefinition.finish_redef_table( user, 'DEMO1', 'DEMO2' ); select dbms_metadata.get_ddl( 'TABLE', 'DEMO1' ) from dual;   CREATE TA...

How to Add a Node to Oracle RAC (11gR2)

Getting Started This guide shows how to add a node to an existing 11gR2 Oracle RAC cluster. It is assumed that the node in question is available and is not part of a GNS/Grid Plug and Play cluster. In other words, the database is considered to be ‘Administrator-Managed.’ Also, the database software is non-shared and uses role separation where ‘grid’ is the clusterware owner and ‘oracle’ owns the database software. This guide uses a 2-node cluster running CentOS 5.7 (x64). There are two pre-existing nodes ‘rac1′ and ‘rac2.’ We will be adding ‘rac3′ to the cluster. This guide does not cover node preparation steps/prerequisites. The assumption is that since there is a pre-existing cluster the user knows how to prepare a node – from a prerequisite perspective – for cluster addition. Verify Requirements The cluster verify utility – ‘cluvfy’ – is used to determine that the new node is, in fact, ready to be added to the cluster. Verify New Node (HWOS) From an existing node, ru...