Wednesday 27 January 2016

WFLOAD Command to download/upload Oracle Workflow




WFLOAD Command to download Oracle Workflow

Syntax-
WFLOAD <apps/pwd>@<connectstring> 0 Y DOWNLOAD FILE_NAME.wft item_type

Modes-
UPGRADE – Protection and Customization levels of data
UPLOAD  - Only protection level of data.Not supporting customisation
FORCE   - Force upload, protection or customization not supported
For example-
WFLOAD apps/passed123@DEVL 0 Y DOWNLOAD APEXP_TEMP.wft APEXP


WFLOAD Command to upload Oracle Workflow

Syntax-
WFLOAD <apps/pwd>@<connectstring> 0 Y {UPLOAD | UPGRADE | FORCE} FILE_NAME.wft

For Example-
WFLOAD apps/passed123@DEVL 0 Y UPLOAD APEXP_TEMP.wft


Seeded Workflow Files Location

You can also download seeded workflow definition files directly from below directory-

$<Application_TOP>/patch/115/import/<LANG>

For example- Account Payables workflow file can be found at-
$AP_TOP/patch/115/import/US 
 
Thanks 
Srini

Refreshing VS Cloning an e-Business Suite Environment


Just a quick note on refreshing vs cloning, what each of them means and when you should perform them.

What is Refreshing?

A refresh is where the data in the target environment has been synchronized with a copy of production. This is done by taking a copy of the production database and restoring it to the target environment.

What is Cloning?

Cloning means that an identical copy of production has been taken and restore to the target environment. This is done by taking both a copy of the production database as well as all of the application files.

When should you Clone or Refresh?

There are a couple of scenarios when cloning should be performed:

1. Building a new environment.
 
2. Patches or other configuration changes have been made to the target environment so that they are now out of sync.

3. Beginning of development cycles. Before major development efforts take place, its wise to re-clone dev, test environments so that your 100% positive that the environments are in sync.

There is only one scenario in which you should refresh an environment:

1. Your 100% confident that the environments are in sync and need an updated copy of the production data in order to reproduce issues.

Technically, if proper change control processes are being followed, test and production environments should be identical. So in the case of test, you should be able to get away with performing refreshes. However, to ease concerns and for comfort levels, test environments are usually re-cloned at the beginning of new development cycles as well.

Thanks
Srini

File System ARCHITECTURE in R12



File System ARCHITECTURE

R12  File System COMPLETE ARCHITECTURE






INST_TOP in R12

INST TOP directory:

(applmgr) - ls
 
 admin/ appl/ certs/ logs/ ora/ out/ pids/ portal/ rgf/
 
(applmgr) -



The Whys and wherefores:

You may get a question why is the change??

There is a need to separate

Code
Data
Config

To ease maintenance of the system. To avoid NFS/MUTEX related issues. Above issue will get resolved if the configuration/lcck files are stored in local system. Another advantage is to gain performance accessing local file system is better than NFS file system.

This directory $INST_TOP got introduced newly in R12. Instance top contains all the config files, log files, ssl certificates, document root etc. Addition of this directory makes the middle-tier more organised, since data is kept separate from config/log files. Another advantage is that, multiple instances can easily share the same middle tier. To create a new instance that shares an existing middle-tier, just create a new instance_top with proper config files and NFS mount the middle tier in the server.
INSTANCE TOP - STRUCTURE
$INST_TOP: APPS_BASE/inst/apps/CONTEXT_NAME/
/admin

    /scripts
ADMIN_SCRIPTS_HOME: Find all AD scripts here
/appl
APPL_CONFIG_HOME. For standalone envs, this is set to $APPL_TOP
    /fnd/12.0.0/secure
FND_SECURE: dbc files here
    /admin
All Env Config files here
/certs
SSL Certificates go here
/logs
LOG_HOME: Central log file location. All log files are placed here (except adconfig)
/ora
ORA_CONFIG_HOME
    /10.1.2
'C' Oracle home config, Contains tnsnames and forms listener servlet config files
    /10.1.3
Apache & OC4J config home, Apache, OC4J and opmn
This is the 'Java' oracle home configuration for OPMN, Apache and OC4J
/pids
Apache/Forms server PID files here
/portal
Apache's DocumentRoot folder

AD SCRIPTS
$ADMIN_SCRIPTS_HOME: $INST_TOP/admin/scripts
adautocfg.sh run autoconfig     
adstpall.sh stop all services
adstrtal.sh start all services
adapcctl.sh start/stop/status Apache only
adformsctl.sh start/stop/status OC4J Forms
adoacorectl.sh start/stop/status OC4J oacore
adopmnctl.sh start/stop/status opmn
adalnctl.sh start/stop RPC listeners (FNDFS/FNDSM)
adcmctl.sh start/stop Concurrent Manager
gsmstart.sh start/stop FNDSM
jtffmctl.sh start/stop Fulfillment Server
adpreclone.pl Cloning preparation script
adoafmctl.sh adoafmctl.sh to start/stop/status OC4J oafm
(webservice, mapviewer)
adexecsql.pl Execute sql scripts that update the profiles in an AutoConfig run
java.sh Call java executable with additional args, (used by opmn, Conc. Mgr)

LOG FILES
Location of various log files
AD Script log files (adapcctl.sh,...) $INST_TOP/logs/appl/admin/log
CM Log Files ($APPLCSF/$APPLLOG) $INST_TOP/logs/appl/conc/log
AD tools log files (adpatch, ...) $APPL_CONFIG_HOME/admin/$TWO_TASK/log
OPMN Log Files (Text & ODL) $INST_TOP/logs/ora/10.1.3/opmn
Apache Log Files (Text & ODL) $INST_TOP/logs/ora/10.1.3/Apache
OC4J Log Files (Text) $INST_TOP/logs/ora/10.1.3/j2ee/oacore/
OC4J Log Files (ODL) $INST_TOP/logs/ora/10.1.3/j2ee/oacore/log/oacore_default_group_1/oc4j

SSL CERTIFICATES
$INST_TOP/certs
/Apache/ewallet.p12
 
/opmn/cwallet.sso
 
/opmn/ewallet.p12
 
certs is the default directory for SSL or any other certificate files
used by this instance. To use a centrally staged certificate, change
the appropriate context file and run autoconfig

All DBA Views




 DBA Views 


Storage Information
DBA_EXTENTS, DBA_FREE_SPACE, DBA_OBJECTS,
DBA_OBJECT_SIZE, DBA_SEGMENTS, DBA_TABLESPACES,
DBA_ROLLBACK_SEGS, DBA_UNDO_EXTENTS

Operating System
DBA_DATA_FILES, DBA_EXP_FILES, DBA_TEMP_FILES

Privileges
DBA_COL_PRIVS, DBA_PROFILES, DBA_ROLES,
DBA_ROLE_PRIVS, DBA_SYS_PRIVS, DBA_TAB_PRIVS,
DBA_UPDATABLE_COLUMNS

Indexes
DBA_INDEXES, DBA_IND_COLUMNS,
DBA_IND_EXPRESSIONS, DBA_IND_PARTITIONS

Tables/Views
DBA_TABLES, DBA_TAB_COLUMNS, DBA_TAB_PARTITIONS,
DBA_TAB_COMMENTS,
DBA_UNUSED_COL_TABS, DBA_VIEWS

Constraints
DBA_CONSTRAINTS, DBA_CONS_COLUMNS

Triggers
DBA_TRIGGERS, DBA_TRIGGER_COLS,
DBA_INTERNAL_TRIGGERS

Materialized Views
DBA_MVIEW_AGGREGATES, DBA_MVIEW_ANALYSIS,
DBA_MVIEW_DETAIL_RELATIONS, DBA_MVIEW_JOINS,
DBA_MVIEW_KEYS

Partitions
DBA_PART_COL_STATISTICS, DBA_PART_HISTOGRAMS,
DBA_PART_INDEXES, DBA_PART_KEY_COLUMNS,
DBA_PART_LOBS, DBA_PART_TABLES,
DBA_IND_SUBPARTITIONS, DBA_LOB_PARTITIONS,
DBA_LOB_SUBPARTITIONS

Objects, Methods and Types
DBA_OBJECT_TABLES, DBA_METHOD_PARAMS,
DBA_METHOD_RESULTS, DBA_TYPES, DBA_TYPE_ATTRS,
DBA_TYPE_METHODS, DBA_DIMENSIONS, DBA_LOBS

Operators
DBA_OPANCILLARY, DBA_OPARGUMENTS,
DBA_OPBINDINGS, DBA_OPERATORS

Summaries
DBA_SUMMARIES, DBA_SUMMARY_AGGREGATES,
DBA_SUMMARY_DETAIL_TABLES, DBA_SUMMARY_JOINS,
DBA_SUMMARY_KEYS

Miscellaneous
DBA_DB_LINKS, DBA_SOURCE, DBA_SEQUENCES,
DBA_SYNONYMS, DBA_USERS, DBA_OUTLINES,
DBA_JOBS, DBA_JOBS_RUNNING, DBA_LIBRARIES,
DBA_PENDING_TRANSACTIONS, DBA_RULESETS,
DBA_OUTLINE_HINTS, DBA_POLICIES,
DBA_SUBPART_KEY_COLUMNS, DBA_TS_QUOTAS,
DBA_JAVA_POLICY, USER_JAVA_POLICY

Dynamic Performance Views

Instance Level Tuning

v$GLOBAL_TRANSACTION, v$OBJECT_DEPENDENCY,
 v$SHARED_POOL_RESERVED, v$SORT_SEGMENT,
v$SYSTEM_CURSOR_CACHE, v$SORT_USAGE, v$STATNAME,
v$SYSSTAT, v$SYSTEM_EVENT, v$TRANSACTION, v$LATCH,
v$LIBRARYCACHE, v$ROLLSTAT, v$ROWCACHE,
vRSGASTAT, v$SQLAREA, v$SQLTEXT, v$WAITSTAT

Recovery Based Views
v$ARCHIVE, v$ARCHIVE_DEST, v$BACKUP_CORRUPTION,
v$BACKUP_DEVICE, v$BACKUP_REDOLOG,
v$DELETED_OBJECT, v$RECOVERY_LOG, v$RECOVER_FILE,
v$ARCHIVED_LOG, v$BACKUP, v$BACKUP_DATAFILE,
v$BACKUP_PIECE, v$BACKUP_SET,
v$RECOVERY_FILE_STATUS, v$RECOVERY_STATUS,
v$DATABASE_BLOCK_CORRUPTION,
v$DATABASE_INCARNATION

Cache Views
v$CACHE, 
v$LIBRARYCACHE, 
v$SUBCACHE,
v$DB_OBJECT_CACHE, 
v$ROWCACHE

Control File Views
v$CONTROLFILE, 
v$CONTROLFILE_RECORD_SELECTION

Cursor and SQL Views
v$SYSTEM_CURSOR_CACHE, v$OPEN_CURSOR, v$SQLAREA,
v$SQL, v$SQLTEXT, v$SQLTEXT_WITH_NEWLINES,
v$SQL_CURSOR, v$SQL_BIND_METADATA,
v$SQL_SHARED_MEMORY, v$SQL_BIND_DATA,
v$SQL_WORKAREA, v$SQL_WORKAREA_ACTIVE

Security Views
v$ENABLEDPRIVS, v$PWFILE_USERS

Session Views
v$ACCESS, v$MYSTAT, v$PROCESS, v$SESSION ,
v$SESSION_CONNECT_INFO, v$SESSION_CURSOR_CACHE,
v$SESSION_EVENT, v$SESSION_LONGOPS,
v$SESSION_OBJECT_CACHE, v$SESSION_WAIT, v$SESSTAT
(needs v$statname, v$session join), v$SESS_IO

Latch and Lock Views
v$BUFFER_POOL, v$CACHE_LOCK, v$CLASS_PING,
v$DLM_CONVERT_LOCAL, v$DLM_CONVERT_REMOTE,
v$DLM_LATCH, v$DLM_MISC, v$ENQUEUE_LOCK,
v$EVENT_NAME, v$FALSE_PING, v$FILE_PING, v$LATCH,
v$LATCHHOLDER, v$LATCHNAME, v$LATCH_CHILDREN,
v$LATCH_MISSES, v$LATCH_PARENT, v$LOCK,
v$LOCK_ACTIVITY, v$LOCK_ELEMENT, v$LOCKED_OBJECT,
v$LOCKS_WITH_COLLISIONS, v$PING, v$RESOURCE,
v$RESOURCE_LIMIT, v$TRANSACTION_ENQUEUE, v$LOCK

Instance Views
v$ACTIVE_INSTANCES, v$BGPROCESS, v$BH,
v$COMPATIBILITY, v$COMPATSEG, v$COPY_CORRUPTION,
v$DATABASE, v$DATAFILE, v$DATAFILE_COPY,
v$DATAFILE_HEADER, v$DBFILE, v$DBLINK, v$DB_PIPES,
v$INSTANCE, v$LICENSE, v$OFFLINE_RANGE, v$OPTION,
v$ROLLSTAT, v$SGA, v$SGA_STAT, v$TABLESPACE,
v$TRANSACTION, v$UNDOSTAT, v$VERSION

Fixed Views
v$FIXED_TABLE, v$FIXED_VIEW_DEFINITION,
v$INDEXED_FIXED_COLUMN

Miscellaneous Views
v$TIMER, v$TYPE_SIZE, v$SEQUENCES
MTS and Parallel Server Views
v$CIRCUIT, v$DISPATCHER, v$DISPATCHER_RATE, v$MTS,
v$QUEUE, v$REQDIST, v$SHARED_SERVER, v$THREAD

File Mapping
v$MAP_LIBRARY, v$MAP_FILE, v$MAP_FILE_EXTENT,
v$MAP_ELEMENT, v$MAP_EXT_ELEMENT,
v$MAP_SUBELEMENT, v$MAP_COMP_LIST,
v$MAP_FILE_IO_STACK


Thanks
Srini

How to Apply an 11i Patch When adpatch is Already Running

 
1. Using the adctrl utility, shutdown the workers.

a. adctrl
b. Select option 3 "Tell worker to shutdown/quit"

2. Backup the FND_INSTALL_PROCESSES table which is owned by the APPLSYS schema

a. sqlplus applsys/
b. create table fnd_Install_processes_back
as select * from fnd_Install_processes;
c. The 2 tables should have the same number of records. select count(*) from fnd_Install_processes_back;
select count(*) from fnd_Install_processes;

3. Backup the AD_DEFERRED_JOBS table.

a. sqlplus applsys/
b. create table AD_DEFERRED_JOBS_back as select * from AD_DEFERRED_JOBS;
c. The 2 tables should have the same number of records.
select count(*) from AD_DEFERRED_JOBS_back;
select count(*) from AD_DEFERRED_JOBS;

4. Backup the .rf9 files located in $APPL_TOP/admin//restart directory.
At this point, the adpatch session should have ended and the cursor should
be back at the Unix prompt.
a. cd $APPL_TOP/admin/
b. mv restart restart_back
c. mkdir restart

5. Drop the FND_INSTALL_PROCESSES table and the AD_DEFERRED_JOBS table.
a. sqlplus applsys/
b. drop table FND_INSTALL_PROCESSES;
c. drop table AD_DEFERRED_JOBS;

6. Apply the new patch.

7. Restore the .rf9 files located in $APPL_TOP/admin//restart_back
directory.


a. cd $APPL_TOP/admin/
b. mv restart restart_
c. mv restart_back restart

8. Restore the FND_INSTALL_PROCESSES table which is owned by the APPLSYS
schema.


a. sqlplus applsys/
b. create table fnd_Install_processes
as select * from fnd_Install_processes_back;
c. The 2 tables should have the same number of records.
select count(*) from fnd_Install_processes;
select count(*) from fnd_Install_processes_back;

9. Restore the AD_DEFERRED_JOBS table.
a. sqlplus applsys/
b. create table AD_DEFERRED_JOBS
as select * from AD_DEFERRED_JOBS_back;
c. The 2 tables should have the same number of records.
select count(*) from AD_DEFERRED_JOBS_back;
select count(*) from AD_DEFERRED_JOBS;

10. Re-create synonyms

a. sqlplus apps/apps
b. create synonym AD_DEFERRED_JOBS for APPLSYS.AD_DEFERRED_JOBS;
c. create synonym FND_INSTALL_PROCESSES FOR APPLSYS.FND_INSTALL_PROCESSES;

11. Start adpatch, it will resume where it stopped previously.
Note:175485.1
 
Thanks
Srini

Oracle Apps DBA Interview Questions




              ARCHITECTURE RELATED QUESTIONS
Q)  What is session time out parameter & where all you define     these values?

Q)  How to determine Oracle Apps 11i Version?
 
Q)  What is your Oracle Apps 11i Webserver Version and how to find it ?            
 
Q)  What is forms server executable Name?
 
Q)  What is forms client executable Name?
 
Q)  How to check number of forms users at any time ?
 
Q)  What are different modes of forms in which you can start Forms Server and which one is default ?
 
Q)  Where is HTML Cache stored in Oracle Apps Server?
 
Q)  How will you find Invalid Objects in database ?
 
Q)  What is make program in Unix?
 
Q)  How can u change the log files location suppose CM log file location is APPLCSF
 
Q)  Conflict resolution managers resolves the conflicts yes, but hw it knows that there are conflicts ? why conflicts occur?
 
Q)  What is adovars.env file ?
 
Q)  Whats main concurrent Manager types.
 
Q)  Why should Apps & Applsys passwords always be the same ?
 
Q)  Explain Architecture of Oracle Apps 11i.
 
Q)  What are various components in Application/Middle Tier.   
 
Q)  Where is Concurrent Manager log file location.
 
Q)  Where is applications start/stop scripts stored ?
 
Q)  What are main configuration files in Web Server (Apache)?
 
Q)  What is use of Apps listener ?
 
Q)  How to start Apps listener ?
 
Q)  Whats is difference between two env files in <CONTEXT_NAME>.env and APPS<CONTEXT_NAME>.env under $APPL_TOP ?
 
Q)  How to confirm if Report Server is Up & Running ?
 
Q)  How to confirm if Apps Listener is Up & Running ?
 
Q)  Where is appsweb.cfg or appsweb_$CONTEXT.cfg stored & why its used ?
 
Q)  What is .dbc file, where its stored, what’s use of .dbc file?


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

             HOW TO FIND THE VERSIONS OF EBS COMPONENTS


1): How to find Forms Version in 11i ?
2): How to find Forms Version in Apps from command Line ?
3): How to find Jinitiator Version ?
4): How to find Version of any file in Oracle Apps 11i ?
5): How to find Operation System Version (Unix/Linux) ?
6): How to find if your Operating System is 32 bit or 64 Bit ?
7): Can I run 64 bit application on 32 bit Operating system ?
 
8) How to find if your database is 32 bit or 64 bit(Useful in applying Patches) ?
 
9): How to find OUI version ?
10): How to find Database version ?
11): How to find Oracle Workflow Cartridge Release Version ?
12): Determining the Current Version of OJSP ?
13): How to find opatch Version ?
14): How to find Version of Apps 11i ?
15): How to Discoverer Version installed with Apps ?
16): How to find Workflow Version embedded in Apps 11i ?
17): How to find version of JDK Installed on Apps ?
18): How to find out version of a package ?
19):How to find the database/sqlplus version?
      Ans : select banner from v$version;
20):How to find out what are the languages enabled in u r        applications?
     Ans : Query fnd_languages



Thanks
Srini

RAC Interview Queries ...



What command would you use to check the availability of the RAC system?
crs_stat -t -v (-t -v are optional) 
How do we verify that RAC instances are running?
SQL>select * from V$ACTIVE_INSTANCES;
The query gives the instance number under INST_NUMBER column,host_:instancename under INST_NAME column.

What are Oracle Clusterware Components ? Voting Disk — Oracle RAC uses the voting disk to manage cluster membership by way of a health check and arbitrates cluster ownership among the instances in case of network failures. The voting disk must reside on shared disk.   Oracle Cluster Registry (OCR) — Maintains cluster configuration information as well as configuration information about any cluster database within the cluster. The OCR must reside on shared disk that is accessible by all of the nodes in your cluster
 
How do you backup the OCR ?
There is an automatic backup mechanism for OCR. The default location is : $ORA_CRS_HOME\cdata\"clustername"\
To display backups :
#ocrconfig -showbackup
To restore a backup :
#ocrconfig -restore
With Oracle RAC 10g Release 2 or later, you can also use the export command:
#ocrconfig -export -s online, and use -import option to restore the contents back.
With Oracle RAC 11g Release 1, you can do a manaual backup of the OCR with the command:
# ocrconfig -manualbackup
 
How do you backup voting disk ?
#dd if=voting_disk_name of=backup_file_name
 
How do I identify the voting disk location ?
#crsctl query css votedisk
 
How do I identify the OCR file location ?
check /var/opt/oracle/ocr.loc or /etc/ocr.loc ( depends upon platform)
or
#ocrcheck
 
Is ssh required for normal Oracle RAC operation ?
"ssh" are not required for normal Oracle RAC operation. However "ssh" should be enabled for Oracle RAC and patchset installation.
 
What is SCAN?
Single Client Access Name (SCAN) is s a new Oracle Real Application Clusters (RAC) 11g Release 2 feature that provides a single name for clients to access an Oracle Database running in a cluster. The benefit is clients using SCAN do not need to change if you add or remove nodes in the cluster.
Click here for more details from Oracle
 
What is the purpose of Private Interconnect ?
Clusterware uses the private interconnect for cluster synchronization (network heartbeat) and daemon communication between the the clustered nodes. This communication is based on the TCP protocol.RAC uses the interconnect for cache fusion (UDP) and inter-process communication (TCP). Cache Fusion is the remote memory mapping of Oracle buffers, shared between the caches of participating nodes in the cluster.
 
 Why do we have a Virtual IP (VIP) in Oracle RAC?    Without using VIPs or FAN, clients connected to a node that died will often wait for a TCP timeout period (which can be up to 10 min) before getting an error. As a result, you don't really have a good HA solution without using VIPs. When a node fails, the VIP associated with it is automatically failed over to some other node and new node re-arps the world indicating a new MAC address for the IP. Subsequent packets sent to the VIP go to the new node, which will send error RST packets back to the clients. This results in the clients getting errors immediately.

How many nodes are supported in a RAC Database?
10g Release 2, support 100 nodes in a cluster using Oracle Clusterware, and 100 instances in a RAC database.

What is voting disk?
Voting Disk is a file that sits in the shared storage area and must be accessible by all nodes in the cluster. All nodes in the cluster registers their heart-beat information in the voting disk, so as to confirm that they are all operational. If heart-beat information of any node in the voting disk is not available that node will be evicted from the cluster. The CSS (Cluster Synchronization Service) daemon in the clusterware maintains the heart beat of all nodes to the voting disk. When any node is not able to send heartbeat to voting disk, then it will reboot itself, thus help avoiding the split-brain syndrome.
For high availability, Oracle recommends that you have a minimum of three or odd number (3 or greater) of votingdisks.
Voting Disk – is file that resides on shared storage and Manages cluster members. Voting disk reassigns cluster ownership between the nodes in case of failure.
The Voting Disk Files are used by Oracle Clusterware to determine which nodes are currently members of the cluster. The voting disk files are also used in concert with other Cluster components such as CRS to maintain the clusters integrity.
Oracle Database 11g Release 2 provides the ability to store the voting disks in ASM along with the OCR. Oracle Clusterware can access the OCR and the voting disks present in ASM even if the ASM instance is down. As a result CSS can continue to maintain the Oracle cluster even if the ASM instance has failed.

How many voting disks are you maintaining ?
By default Oracle will create 3 voting disk files in ASM.
Oracle expects that you will configure at least 3 voting disks for redundancy purposes. You should always configure an odd number of voting disks >= 3. This is because loss of more than half your voting disks will cause the entire cluster to fail.
You should plan on allocating 280MB for each voting disk file. For example, if you are using ASM and external redundancy then you will need to allocate 280MB of disk for the voting disk. If you are using ASM and normal redundancy you will need 560MB.

Why we need to keep odd number of voting disks ?
Oracle expects that you will configure at least 3 voting disks for redundancy purposes. You should always configure an odd number of voting disks >= 3. This is because loss of more than half your voting disks will cause the entire cluster to fail.

What is SCAN? (11gR2 feature)
Single Client Access Name (SCAN) eliminates the need to change TNSNAMES entry when nodes are added to or removed from the Cluster. RAC instances register to SCAN listeners as remote listeners. Oracle recommends assigning 3 addresses to SCAN, which will create 3 SCAN listeners, though the cluster has got dozens of nodes.. SCAN is a domain name registered to at least one and up to three IP addresses, either in DNS (Domain Name Service) or GNS (Grid Naming Service). The SCAN must resolve to at least one address on the public network. For high availability and scalability, Oracle recommends configuring the SCAN to resolve to three addresses.

What are SCAN components in a cluster?
1.SCAN Name
2.SCAN IPs (3)
3.SCAN Listeners (3)

What are the requirements for Oracle Clusterware?
1. External Shared Disk to store Oracle Cluster ware file (Voting Disk and Oracle Cluster Registry – OCR)
2. Two netwrok cards on each cluster ware node (and three set of IP address) -
Network Card 1 (with IP address set 1) for public network
Network Card 2 (with IP address set 2) for private network (for inter node communication between rac nodes used by clusterware and rac database)
IP address set 3 for Virtual IP (VIP) (used as Virtual IP address for client connection and for connection failover)
3. Storage Option for OCR and Voting Disk – RAW, OCFS2 (Oracle Cluster File System), NFS, …..

How to find location of OCR file when CRS is down?
If you need to find the location of OCR (Oracle Cluster Registry) but your CRS is down.
When the CRS is down:
Look into “ocr.loc” file, location of this file changes depending on the OS:
On Linux: /etc/oracle/ocr.loc
On Solaris: /var/opt/oracle/ocr.loc
When CRS is UP:
Set ASM environment or CRS environment then run the below command:
ocrcheck

In 2 node RAC, how many NIC’s are r using ?
2 network cards on each clusterware node
Network Card 1 (with IP address set 1) for public network
Network Card 2 (with IP address set 2) for private network (for inter node communication between rac nodes used by clusterware and rac database)

In 2 node RAC, how many IP’s are r using ?
6 – 3 set of IP address
## eth1-Public: 2
## eth0-Private: 2
## VIP: 2

How to find IP’s information in RAC ?
Edit the /etc/hosts file as shown below:
# Do not remove the following line, or various programs
# that requires network functionality will fail.
127.0.0.1 localhost.localdomain localhost
## Public Node names
192.168.10.11 node1-pub.hingu.net node1-pub
192.168.10.22 node2-pub.hingu.net node2-pub
## Private Network (Interconnect)
192.168.0.11 node1-prv node1-prv
192.168.0.22 node2-prv node2-prv
## Private Network (Network Area storage)
192.168.1.11 node1-nas node1-nas
192.168.1.22 node2-nas node2-nas
192.168.1.33 nas-server nas-server
## Virtual IPs
192.168.10.111 node1-vip.hingu.net node1-vip
192.168.10.222 node2-vip.hingu.net node2-vip

What is difference between RAC ip addresses ?
Public IP adress is the normal IP address typically used by DBA and SA to manage storage, system and database. Public IP addresses are reserved for the Internet.
Private IP address is used only for internal clustering processing (Cache Fusion) (aka as interconnect). Private IP addresses are reserved for private networks.
VIP is used by database applications to enable fail over when one cluster node fails. The purpose for having VIP is so client connection can be failover to surviving nodes in case there is failure

Can application developer access the private ip ?
No. private IP address is used only for internal clustering processing (Cache Fusion) (aka as interconnect)

How many OCR and voting disks should one have?
For redundancy, one should have at least two OCR disks and three voting disks (raw disk partitions).
These disk partitions should be spread across different physical disks.
  
Why we required to maintain odd number of voting disks?
Odd number of disk are to avoid split brain,When Nodes in cluster can't talk to each other they run to lock the Voting disk and whoever lock the more disk will survive,if disk number are even there are chances that node might lock 50% of disk (2 out of 4) then how to decide which node to evict.whereas when number is odd, one will be higher than other and each for cluster to evict the node with less number.
How you check the health of Your RAC Database?
 'crsctl' command from root or oracle user can be used to check the clusterware health But for starting or stopping we have to use root user or any privilege user.
[oracle@TEST_NODE1 ~]$ crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy

How you will backup your RAC Database?
Backup strategy of RAC Database:An RAC Database consists of
1)OCR
2)Voting disk 
3)Database files, controlfiles, redolog files & Archive log files
Give the usage of srvctl ?
srvctl start instance -d db_name -i "inst_name_list" [-o start_options]
srvctl stop instance -d name -i "inst_name_list" [-o stop_options]
srvctl stop instance -d orcl -i "orcl3,orcl4" -o immediate
srvctl start database -d name [-o start_options]
srvctl stop database -d name [-o stop_options]
srvctl start database -d orcl -o mount


What are the major RAC wait events?
In a RAC environment the buffer cache is global across all instances in the cluster and hence the processing differs.
The most common wait events related to this are gc cr request
and gc buffer busy
 GC CR request :the time it takes to retrieve the data from the remote cache
Reason: RAC Traffic Using Slow Connection or Inefficient queries (poorly tuned queries will increase the amount of data blocks requested by an Oracle session.
The more blocks requested typically means the more often a block will need to be read from a remote instance via the interconnect.)
GC BUFFER BUSY: It is the time the remote instance locally spends accessing the requested data block.

How do we verify an existing current backup of OCR?
We can verify the current backup of OCR using the following command : ocrconfig -showbackup

How to move OCR and Voting disk to new storage device? ( verify in non-prod first)

Moving OCR
==========
You must be logged in as the root user, because root owns the OCR files.
 Also an ocrmirror must be in place before trying to replace the OCR device.
Make sure there is a recent backup of the OCR file before making any changes:
ocrconfig –showbackup
If there is not a recent backup copy of the OCR file, an export can be taken for the current OCR file. Use the following command to generate an export of the online OCR file:
In 10.2
# ocrconfig –export -s online
In 11g
# ocrconfig -manualbackup
The new OCR disk must be owned by root, must be in the oinstall group, and must have permissions set to 640. Provide at least 100 MB disk space for the OCR.
On one node as root run:
# ocrconfig -replace ocr
# ocrconfig -replace ocrmirror
Now run ocrcheck to verify if the OCR is pointing to the new file

Moving Voting Disk
==================
Note: crsctl votedisk commands must be run as root
Shutdown the Oracle Clusterware (crsctl stop crs as root) on all nodes before making any modification to the voting disk. Determine the current voting disk location using:
crsctl query css votedisk
Take a backup of all voting disk:
dd if=voting_disk_name of=backup_file_name
To move a Voting Disk, provide the full path including file name:
crsctl delete css votedisk –force
crsctl add css votedisk –force
After modifying the voting disk, start the Oracle Clusterware stack on all nodes
# crsctl start crs
Verify the voting disk location using
crsctl query css votedisk

What is split brain ?
In RAC environment, server nodes communicate with each other using High speed private interconnects network. A split brain situation happens when all the links of the private interconnect fail to respond to each other but instances are still up and running. So each instance thinks that the other nodes/instances are dead and that it should take over the ownership.
In split brain situation, instances independtly access the data and modify the same blocks and the database will end up with changed database overwritten which could lead to data corruption. To avoid this, various algorithm are implemented to handle split brain scenario.
In RAC, the IMR (Instance Membership Recovery) service is one of the one of the efficient algorithm used to detect & resolve the split-brain syndrome. When one instance fails to communicate with other instances or when one instance becomes inactive due to any reason and is unable to issue the control file heartbeat, the split brain is detected and the detecting instance will evict the failed instance from the database.This process is called node eviction.





What is FAN?
Applications can use Fast Application Notification (FAN) to enable rapid failure detection, balancing of connection pools after failures, and re-balancing of connection pools when failed components are repaired.The FAN process uses system events that Oracle publishes when cluster servers become unreachable or if network interfaces fail.

What is FCF?
Fast Connection Failover provides high availability to FAN integrated clients, such as clients that use JDBC, OCI, or ODP.NET. If you configure the client to use fast connection failover, then the client automatically subscribes to FAN events and can react to database UP and DOWN events.
In response, Oracle gives the client a connection to an active instance that provides the  requested database service.


What is the difference between CRSCTL and SRVCTL?
crsctl manages clusterware-related operations:
·        Starting and stopping Oracle Clusterware
·        Enabling and disabling Oracle Clusterware daemons
·        Registering cluster resources
srvctl manages Oracle resource–related operations:
·        Starting and stopping database instances and services
·        Also from 11gR2 manages the cluster resources like network,vip,disks etc

How to control Oracle Clusterware?
To start or stop Oracle Clusterware on a specific node:
# crsctl stop crs
# crsctl start crs
To enable or disable Oracle Clusterware on a specific node:
# crsctl enable crs
# crsctl disable crs

How to check the cluster (all nodes) status?
To check the viability of Cluster Synchronization Services (CSS) across nodes:
$ crsctl check cluster
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online

How to check the cluster (one node) status?
$ crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
How do you troubleshoot node reboot ?
Please check metalink ...
Note 265769.1 Troubleshooting CRS Reboots
Note.559365.1 Using Diagwait as a diagnostic to get more information for diagnosing Oracle Clusterware Node evictions.  
 
 
Thanks
Srini