RAC-interview questions
What are the main important components of Oracle clusterware
1) Oracle Cluster Registry (OCR) .
2) Voting disks .
3)Background processes that manage clusterwide operations and provide functionality for Oracle 11g R1 and 11g R2 RAC
What is OCR ?
OCR is the one which manages Oracle Clusterware and Oracle RAC database configuration information
what is OLR?
OLR is the one which resides on every node in the cluster and manages Oracle Clusterware configuration information for each particular node.
What is Voting disks?
Voting disks are the one which manage information about node membership. Each voting disk must be accessible by all nodes in the cluster for nodes to be members of the cluster
Where Oracle OCR and Voting disks to be kept?
Oracle recommends to use Oracle ASM to store OCR and voting disks.
What should be permission of voting disks?
Voting disk file should be having permission as grid owner and member of oinstall group. if not , it should be corrected.
for ex:
grid@myserver>$ ls -l /dev/rhdisk18
crwxrwxrwx 1 root oinstall 36, 02 Feb 10 20:28 /dev/rhdisk18
$ su root
root@myserver> # chown grid:oinstall /dev/rhdisk18
# exit
$ ls -l /dev/rhdisk18
crwxrwxrwx 1001 grid oinstall 36, 19 Sep 09 20:29 /dev/rhdisk18
What are utilities can be used to manage OCR and the Oracle Local Registry (OLR) ?
OCRCONFIG, OCRDUMP, and OCRCHECK.
What is default location of OLR?
OLR is located on local storage on each node in a cluster and Its default location is
What is OCRCHECK ?
OCRCHECK displays all OCR locations that are registered .
what is the command which is used to check Oracle Clusterware is running on the node or not ?
crsctl check crs
What is syntax to replace OCR location?
ocrconfig -replace current_OCR_location -replacement new_OCR_location.
MAXQUERYLEN : Identifies the length of the longest query (in seconds) executed in the instance during the period.
You can use this statistic to estimate the proper setting of the UNDO_RETENTION initialization parameter.
The length of a query is measured from the cursor open time to the last fetch/execute time of the cursor.
Only the length of those cursors that have been fetched/executed during the period are reflected in the view.
Query which orders the MAXQUERYLEN column of v$undostat data in descending order .
select *
from v$undostat us , v$sql s
where us.MAXQUERYID = s.sql_id
order by UNDOBLKS desc;
We can use maxqueryid column present in v$undostat to join with v$sql view in order to get sql query which is using undo space.
How do you get the undo usage ?
UNDOBLKS column present in the v$undostat gives the number of undo blocks are being used currently. you have to multiply with size of block to get the usage.
how total undo size is calculated.
Content column present in dba_tablespaces provides information regarding whether tablespace is a temporary tablespace , permanent tablespace or undo tablespaces.
there you can retrive all undo tablespaces. sometimes tablespace may be offline . so filter only online undo tablespace using status column of dba_tablespaces
now I need all the datafiles associated to these undo tablespaces to get bytes or size of datafiles. this we can get from v$datafile but concern is v$datafile doesn't contain
any undotablespace name or any tablespace name . it contain tablespace number hence I need to combine tablespace_name of dba_tablespaces to name column of v$tablespace
which contain tablespace name with it id. so here I am getting id of tablespace with I need to combine with v$datafile to get total bytes used for undo tablespace.
SQL> select sum(d.bytes) "undo"
2 from v$datafile d,
3 v$tablespace t,
4 dba_tablespaces s
5 where s.contents = 'UNDO'
6 and s.status = 'ONLINE'
7 and t.name = s.tablespace_name
8 and d.ts# = t.ts#;
UNDO
----------
104857600
HOw do you check whether FTP is configured and running or not ?
I found that I have several services running related to ftp
cat /etc/services | grep ftp
ftp-data 20/tcp
ftp 21/tcp
tftp 69/udp
sftp 115/tcp
ftps-data 989/tcp # FTP over SSL (data)
ftps 990/tcp
venus-se 2431/udp # udp sftp side effect
codasrv-se 2433/udp # udp sftp side effect
frox 2121/tcp # frox: caching ftp proxy
zope-ftp 8021/tcp # zope management by ftp
The /etc/services file is used to tell what ports are standard for a given service. It does not mean that they are installed. If you look at the file, you can see that ftp data is transferred on port 21 using TCP and that port 21 is the standard ftp port and also uses TCP. It is a tool that client and servers can use to determine what ports to open for a connection. It is also a reference for administration purposes to know what service goes w/ what ports.
HTH
Forrest
/etc/services file contain service port number and protocol.
if you want to view running service use nmap or netstat command
netstat -antlp | grep ftp
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 26142/vsftpd
nmap localhost or IPADDRESS
Starting Nmap 4.62 ( http://nmap.org ) at 2010-07-18 13:12 PDT
Interesting ports on localhost (127.0.0.1):
Not shown: 1705 closed ports
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
25/tcp open smtp
80/tcp open http
......
.....
....
[root@localhost ~]# find / -name groupadd 2>/null/dev
bash: /null/dev: No such file or directory
[root@localhost ~]# find / -name groupadd
/usr/sbin/groupadd
[root@localhost ~]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/o/bin
[root@localhost ~]# set PATH=$PATH:groupadd -g 1200 asmadmin
[root@localhost ~]# groupadd -g 1201 asmdba
bash: groupadd: command not found
[root@localhost ~]# groupadd -g 1202 asmoper
bash: groupadd: command not found
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# set PATH=$PATH:/usr/sbin
[root@localhost ~]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/o/bin
[root@localhost ~]# export PATH=$PATH:/usr/sbin
[root@localhost ~]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/o/bin:/usr/sbin
[root@localhost ~]# groupadd -g 1200 asmadmin
[root@localhost ~]#
C100129463
CREATE SEQUENCE CA_PAID_LEAVERS.GENERATE_SCH_ID
START WITH 6000
MAXVALUE 9999999999999999999999999999
MINVALUE 6000
NOCYCLE
CACHE 20
ORDER;
select * from dba_tables where table_name=PS_LOCATION_TBL@;
select * from PS_LOCATION_TBL@HR8_SOURCE.NAT.BT.COM;
select * from dba_db_links;
what is that 2 square brackets that is present at the bottom?
one is foreground color and other is background colour
what is color picker dialogue box ?
if you want exact colour of a things present in photo . how do u get that ?
eye dropper tool.
sometime you wanna to fill enter foreground or background with one colour then how do you achive that?
edit->fill->there u have options
what is the use of gradient tool?
how do make use rectangular marquee tool?
how to deselect selected area?
what is add to selection , subtract from selection, intersect with selection?
where the brightness menu appears?
image--> brightness
what is revert and wr is it?
select any image with rectangular maquee tool . go to select ---> modift --- feather .wht is the use of it?
wt is the use of load selection and save selection?
Peoplesoft
Components of a PeopleSoft System
PeopleSoft is a chain of linked technologies that stretch between the user and the database.
The database is fundamental to the entire structure, but the technology stack stretches out through the BEA Tuxedo Application Server and the Java servlet to the user's browser
How do you memorise Peoplesoft Diagram ?
1) Peoplesoft schema it contains peoplesoft tables and application tables
of course who will monitor application tables.
Peoplesoft tools Application server
there will be webserver it is java enabled web browser between the Internet browser and Peoplesoft tool application
How people soft applications connect webserver . it is through Jolt and how webserver will connect to internet browser it is through HTTP.
what ever I have explained above is Application execution part .
There are actually 2 parts
1) application Execution part.
2) application Development part.
Application development part also contains people soft application server that server host application development tools. it is through Tuxedo
Server Node requirement .
1) A minimum of 2 GB RAM is required for the complete Grid Infrastructure and RAC software installation
2) A minimum of 1 GB free space is required in the
3) A minimum of 10 GB free space is required for the entire Clusterware home , Grid home and RAC software home .
4) shared storage space to place Clusterware critical components like Oracle Cluster Registry (OCR) and Voting Disk.
5) shared storage disks for Automatic Storage Management, if you consider using ASM to host the datafiles
6) Configure the server swap size to be 1.5 time if the RAM on the server is <=2 GB. Otherwise, configure the sever swap size to be equal to the RAM size
7)Each server must have a minimum of two network adapters or network interface cards (NIC) configured to be able to support the public and private networks
Network Requirments
---------------------
every node that is going to be part of the cluster must be configured with a minimum of two NIC interfaces
one for the public communication and another for the private communication.
You also need to secure three IP addresses, Public, Private, and VIP respectively for each individual node.
The VIP subnet must be configured on the same subnet as the public address
Private network is also called as interconnect .
An optimal private network (interconnect) configuration is very important for the Clusterware to boost the interconnect performance, as well as to avoid node evictions syndrome from occurring
after confirguring this private network ... whatever interface we get will be used for the internode communication (heartbeat mechanism) by the Clusterware also Oracle RAC database instances to send and receive data blocks
Considering the pivotal role played by the internode communication in the Clusterware, Oracle highly advises to configure the private network on a separate dedicated network switch for this interface with high speed NICs
How to avoid Network Delays ?
For example, use a 1 GB Ethernet connection and a diversified subnet address from the public access to overcome the network delays.
For a better performance and high-speed network transmission, you could also use the InfiniBand technology instead of 1GB Ethernet.
What can be done from network end to avoid single point of Failure ?
To avoid Single Point of Failure occurrence for interconnect connectivity, you can also implement the interconnect aggregation method by bonding multiple network interfaces together into a single logical network interface or using the redundant switches method.
Where to IP address should be Configured and how it should be configured ?
Ip address can be configured in ethier /etc/host file or DNS server .
IP address should be configured with full quelified hostname and domain name
These IP addresses with their fully qualified hostname and domain name either need to be configured on the Domain Name Server (DNS) or added to the /etc/hosts file.
DOnt know what is meaning of this
" Beginning with Oracle 11g R2 a maximum of three additional IP addresses in a round-robin fashion are needed for a Single Client Access Name (SCAN)." and
"Unlike the other three IP (Public, Private, and VIP) addresses and hostnames, the SCAN must be assigned a unique name across all nodes and it must remain on the same subnet as a public and VIP address."
What protocol will be supported by public network and Private network ?
You will need to ensure that the public network interface supports TCP/IP and that the private network adapter supports UDP.
What are the mandatory groups are required for each node
Groups : Oinstall , dba ,oper , asmadmin .
What is the mandatory user is required for each node or server ?
User : Oracle
What is command to create group?
groupadd –g 500 oinstall
groupadd –g 501 dba
groupadd –g 502 oper
groupadd –g 503 asmadmin
As per oracle recommandations, What is the name that should be created as Primary group ? and how do you create that ?
Oinstall group should be created as primary group and other groups should be created as secondary.
Command to create is as below
useradd –u 1000 –g oinstall –G dba,oper,asmadmin oracle
passwd oracle
What is secure shell ? How to configure Secure Shell (SSH) passwordless connectivity between the nodes?
What is use of configuring Secure Shell (SSH) passwordless connectivity between the nodes ?
it is neccessary as Oracle universal installer uses ssh and scp commands internally during the installation phase to perform remote operations in which it copies the software from the local to other nodes.
Steps Need to be followed for installation.
===========================================
1) get to know about server (Node) requirements
2) Network requirements.
3) configure Kernel parameter /etc/sysctl.conf
4) Install RPM packages.
5) create Groups and users.
6) Set or configure limits for the user in order to improve the shell limits ie /etc/security/limits.conf
7) Add session user limits
/etc/pam.d/login
8) set the .bash_profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
9) configure the Secure Shell (SSH) passwordless connectivity between the nodes.
This can be configured in 2 ways.
a) manually it was untill 11.1 release
b) it's been automated in 11.2 release . It can be configured automatically by OUI during installation phase.
The preceding configuration prerequisites are best done with the coordination of storage, system, and network teams.
10)Verifying prerequisites with the CLUVFY utility
***************************************************************************************************************************************************
Although we managed to build each node of the cluster cautiously to meet all essential recommendations for a successful cluster configuration,
we can further ensure that everything is in the right place just before the installation process kicks off. With the CLUVFY utility . Cluster Verify utility
Where do you get this cluster verify utility(runcluvfy.sh) ?
Clusterware software location or grid software location.
How do you check node accessibility between nodes using Cluster verify utility.?
runcluvfy.sh : Run cluster verify utlity
./runcluvfy.sh comp nodereach –n raclinux1,raclinux2 –verbose
This command will work in all rac release.
How to check if node accessibility, user equivalence, network interface, and shared storage are configured properly or not?
./runcluvfy.sh stage -post hwos -n raclinux1,raclinux2 –verbose . This command is availabe from 11g r2
remember : every stage hengide(hwos) anta post madu
One more command is there to check
./runcluvfy.sh stage -pre crsinst -n raclinux1,raclinux2 –verbose
What is Fixup flag ?
when the –fixup flag is used with the CLUVFY utility, it creates the fixup shell script in the directory named with the fixupdir flag for those requirements that have failed to meet the prerequisites criteria on the servers
You can, as the root user, execute those scripts over the servers to fix the problems reported during the checks validation.
./runcluvfy.sh stage -pre crsinst -n raclinux1,raclinux2 –fixup –fixupdir /tmp/fixups.sh
Initiating Oracle Universal Installer for Oracle 11g R1 Clusterware
===================================================================
How many installation procedure in RAC
Unlike the standalone installation process, Oracle Real Application Clusters (RAC) comes in a two-phase installation procedure; an Oracle Clusterware is configured in the first phase, followed by the Oracle RAC (RDBMS) software installation process
2 Phase
=======
1) Oracle Clusterware installation
2) Oracle RAC database installation.
How do you start clustware configuration ?
To begin the Clusterware configuration proceedings,initiate the ./runInstaller command either from the Oracle 11g R1 Clusterware staged software area or from the installation DVD/CD source
Explain all steps of Clusterware configuration
1) Welcome Screen.
2) OUI(Oracle universal installer) will inform you to enter ORacle inventory directory and Operation system group name.
If Oracle_Base is already set then , then Oracle by default suggest appropriate location.
3) Enter Oracle Clusterware home name and specify oracle clusterware location for Oracle Clusterware software binaries.
4) (Product specific Prerequisite check)after this , OUI then performs mandatory prerequisite checks to ensure that all essential recommendations such as kernel parameters value, physical memory, OS packages, and settings are actually met on nodes.
5)Specify Cluster Configuration screen, in which the OUI detects and displays the local node's Public, Private, and VIP name details under the Cluster Name section, as configured in DNS or as mentioned in the /etc/hosts file.
In order to add more node details that are likely to be part of the Clusterware installation, click on the Add button and enter the Public, Private, and VIP names for each node.
The Cluster Name field suggests a default cluster name for this cluster environment. As a best practice, ensure you set a unique cluster name if you are going to hold multiple cluster environments in your network.
6)Specify Network Interface Usage , you are required to configure the network interface types for the public and the private communication.
By default, the public and private interfaces are configured to private interface type. However, do not worry; select the correct interface from the list for the public interface.
7)Specify Oracle Cluster Registry (OCR) Location : OCR is one of the critical components of an Oracle Clusterware, which maintains and manages essential details for the cluster sources s
Such as RAC databases, listeners, instances, and services. As of Oracle 11g R1, OCR can be placed either on a shared block on a raw device or on a shared filesystem to which all the participating nodes must have read and write permissions
Considering the criticality of the OCR contents to the cluster functionality,
Oracle provides an option to make (mirror) the OCR file redundant, with a Minimum of two copies, to avoid a Single Point of Failure situation.
To enable the Oracle redundancy option, choose the Normal Redundancy option and specify the mirror copy disk location accordingly
If you are depending on the system-provided (RAID) protection level, you can then choose the External Redundancy option.
However, Oracle strongly recommends you to multiplex the OCR file.
Next you need to provide path of the OCR.
8) Specify Voting Disk configuration : The voting disk is another critical constituent of an Oracle Clusterware, which maintains and consists of important details about the cluster nodes membership, such as which node is part of the cluster, who (node) is joining the cluster, and who (node) is leaving the cluster.
Given the importance of voting disk availability, Oracle provides Normal and External redundancy options to multiplex the voting disk to maintain high availability
You will need to ensure that all the nodes participating in the cluster have read/write permissions on disks.
Specify voting disk location and you can have upto max 32 voting disk in a cluster.
Not Understood : Note: A node in the cluster must be able to access more than half of the voting disks at any time in order to be able to tolerate a failure of n voting disks. Therefore, it is strongly recommended that you configure an odd number of voting disks such as 3, 5, and so on.
9) Install ,Once the installation begins on the local node, OUI displays the progress installation bar
10)Once installation is done , OUI then brings up a pop-up Execute Configuration scripts window
log in as root user, and you must run the scripts (orainstRoot.sh and root.sh) in sequence across all the nodes as instructed.
11).When the root.sh script is executed successfully across the nodes, click on OK to complete the Oracle Clusterware Installation process and proceed to the final stage.
12)Configuration Assistants, OUI then moves further to configure Oracle Notification, Private Interconnect, and Cluster Verifications Utility (CLUVFY) on the Configuration Assistants screen
How do you search for a file.. in liux.
There are 3 types
1) using find command.
2) Using locate command
3) which command
1)
$ find / -name uuencode 2>/dev/null
/usr/bin/uuencode
2) $ locate uuencode
/usr/bin/uuencode
/usr/share/man/man1/uuencode.1.gz
/usr/share/man/man1p/uuencode.1p.gz
/usr/share/man/man5/uuencode.5.gz
3)which uuencode
How to signal the end of stdin input in bash
Ctrl+C sends a kill signal to the running process.
Ctrl+D sends an End of Transmission character.
How to get windows server uptime ?
Event : Cache buffer chains
===========
Regards,
Claudia
we will explore about following topics.
explore :
What are services provided by ORacle Clusterware ?
Oracle Clusterware provides several key services essential to an Oracle 11g RAC configuration, including the following:
Group Services to manage cluster services within 11g RAC
Node Monitor or the "heartbeat" to monitor the status of nodes in 11g RAC cluster
Locking services performed by the LMS database process to manage concurrency activities for 11g RAC cluster
HA Resource management for failover or load-balancing activities in 11g RAC
What was old name of Oracle clusterware?
Oracle 11g Clusterware is Oracle's implementation of cluster management software, which was introduced in the 10g release of Oracle RAC software. It was originally called Cluster Ready Services (CRS) and is the complex software that exists under the hood of all Oracle 11g RAC environments.
In order to manage a large 11g RAC environment,
one must first understand the key processes that
make up the Oracle 11g Clusterware architecture.
so what are those key process that make up the oracle 11g
clusterware architecture ?
Oracle Clusterware consists of the following items:
Oracle Cluster Registry
Voting disk
Control files (SCLS_SRC) for Clusterware
Initialization and shutdown scripts for Clusterware
Oracle 11g Clusterware background processes
Additional background processes for Oracle 11g Clusterware
WHat is the purpose of Oracle cluster registry
The Oracle Cluster Registry's purpose is to hold cluster
and database configuration information for RAC
and Cluster Ready Services (CRS) such as
the cluster node list, cluster database instance to node mapping,
and CRS application resource profiles.
As such, the OCR contains all configuration
information for Oracle 11g Clusterware,
including network communication settings
where the Clusterware daemons or background processes listen, along with the cluster interconnect information for 11g RAC network configuration and the location of the 11g voting disk.
The OCR must be stored on shared raw devices, OCFS/OCFS2
(Oracle Cluster Filesystem or an approved NFS or supported
cluster filesystem) within an Oracle 11g RAC environment.
HOw to check the status of OCR configuration?
using OCRCHECK
what output you get by OCRCHECK when everthing is normal ?
[oracle@raclinux1 ~]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 297084
Used space (kbytes) : 3852
Available space (kbytes) : 293232
ID : 2007457116
Device/File Name : /dev/raw/raw5
Device/File integrity check succeeded
Device/File Name : /dev/raw/raw6
Device/File integrity check succeeded
Cluster registry integrity check succeeded
WHat is VOting disk ?
The Voting disk manages cluster node membership and must be stored on either a shared raw disk or OCFS/OCFS2 cluster filesystem. As such, the Voting disk is the key communication mechanism within the Oracle Clusterware where all nodes in the cluster read and write heartbeat information. In addition, the Voting disk is also used to shut down, fence, or reboot either single or multiple nodes whenever network communication is lost between any node within the cluster, in order to prevent the dreaded split-brain condition and thus protect the database information.
How do you check Voting disk configuration information or status of voiting disk?
[oracle@raclinux1 ~]$ crsctl query css votedisk
0. 0 /dev/raw/raw7
1. 0 /dev/raw/raw8
2. 0 /dev/raw/raw9
located 3 votedisk(s).
what is understood from above output ?
This output from crsctl tells us that we have three vote disks for the 11g Clusterware environment and that they are available and free of errors.
Oracle provides a suite of utilities and scripts that are to be used by the database administrator in charge of an Oracle 11g RAC environment. It is imperative to master these tools so that the 11g Clusterware can be monitored on a proactive basis to avoid any failures or downtimes in the clustered environment for Oracle 11g RAC. The key Clusterware administration utilities that we will discuss in this chapter include the following:
which Utility is used to monitor the status of Clusterware resources in Oracle 11g RAC environments. ?
CRS_STAT -h
what is command to examine the general status for Clusterware resources and applications ?
crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.inst application ONLINE OFFLINE
ora....B2.inst application ONLINE OFFLINE
ora.RACDB.db application ONLINE OFFLINE
ora....SM1.asm application ONLINE OFFLINE
ora....X1.lsnr application ONLINE OFFLINE
ora....X1.lsnr application ONLINE OFFLINE
ora....ux1.gsd application ONLINE ONLINE raclinux1
ora....ux1.ons application ONLINE ONLINE raclinux1
ora....ux1.vip application ONLINE OFFLINE
ora.target.db application ONLINE OFFLINE
ora....t1.inst application ONLINE OFFLINE
ora.test.db application ONLINE OFFLINE
ora....t1.inst application ONLINE OFFLINE
What is command to get the clusterware parameter ?
$ crs_stat -p
NAME=ora.RACDB.RACDB1.inst
TYPE=application
ACTION_SCRIPT=/u01/app/oracle/product/11.1.0/db_1/bin/racgwrap
ACTIVE_PLACEMENT=0
AUTO_START=1 dictates whether resource will restart on crs restart
CHECK_INTERVAL=600 how often crs checks this resource
DESCRIPTION=CRS application for Instance
FAILOVER_DELAY=0
FAILURE_INTERVAL=0
FAILURE_THRESHOLD=0
HOSTING_MEMBERS=raclinux1
OPTIONAL_RESOURCES=
PLACEMENT=restricted
REQUIRED_RESOURCES=ora.raclinux1.vip ora.raclinux1.ASM1.asm
RESTART_ATTEMPTS=5
SCRIPT_TIMEOUT=600 ĆØ timeout for script which checks resource
START_TIMEOUT=0
STOP_TIMEOUT=0
UPTIME_THRESHOLD=7d
USR_ORA_ALERT_NAME=
USR_ORA_CHECK_TIMEOUT=0
USR_ORA_CONNECT_STR=/ as sysdba
USR_ORA_DEBUG=0
USR_ORA_DISCONNECT=false
Sometimes there will be a problem that causes the Oracle Clusterware to fail or resources to become unavailable due to permission and ownership settings for the Oracle Clusterware. If you wish to examine the Clusterware permissions and ownership, you can use the crs_stat –ls option as shown here: ]$ crs_stat -ls
Name Owner Primary PrivGrp Permission
-----------------------------------------------------------------
ora....B1.inst oracle oinstall rwxrwxr--
ora....B2.inst oracle oinstall rwxrwxr--
ora.RACDB.db oracle oinstall rwxrwxr--
ora....SM1.asm oracle oinstall rwxrwxr--
ora....X1.lsnr oracle oinstall rwxrwxr--
ora....X1.lsnr oracle oinstall rwxrwxr--
ora....ux1.gsd oracle oinstall rwxr-xr--
ora....ux1.ons oracle oinstall rwxr-xr--
Which utility is used to manage the Oracle cluster registery and what are functionalities provided by utility ?
The OCRCONFIG utility provides you with the ability to manage the Oracle 11g Cluster Registry. As such, it provides you with
the following functionalities to administer the OCR:
Exporting and importing OCR contents to a file
Restoring a corrupted OCR from a physical backup
Adding or replacing an OCR copy with another OCR file
Repairing a damaged OCR with a new OCR version
$ ocrconfig -help
Name:
ocrconfig - Configuration tool for Oracle Cluster Registry.
Synopsis:
ocrconfig [option]
option:
-export <filename> [-s online]
- Export cluster register contents to a file
-import <filename>
- Import cluster registry contents from a file
-upgrade [<user> [<group>]]
- Upgrade cluster registry from previous version
-downgrade [-version <version string>]
- Downgrade cluster registry to the specified version
-backuploc <dirname> - Configure periodic backup location
-showbackup - Show backup information
-restore <filename> - Restore from physical backup
-replace ocr|ocrmirror [<filename>]
- Add/replace/remove a OCR device/file
-overwrite - Overwrite OCR configuration on disk
-repair ocr|ocrmirror <filename> - Repair local OCR configuration
-help - Print out this help information
Note
Note: A log file will be created in
A log file will be created in $ORACLE_HOME/log/<hostname>/client/ocrconfig_<pid>.log. Please ensure you have file creation privileges in the above directory before running this tool.
Clusterware configuration tool or CLSCFG. This utility provides a host of features for managing and updating your Oracle 11g RAC Clusterware configurations, allowing you to perform the following administration tasks for the Oracle 11g Clusterware:
Creating a new 11g Clusterware configuration
Upgrading existing Clusterware
Adding or removing nodes from the current 11g Clusterware
In order to display all of the possible options and parameters when using this utility for clscfg, you can issue the –help parameter to the clscfg command utility. The help option to clscfg provides the general syntax as shown next:
$ clscfg -help
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 11G Release 1.
clscfg -- Oracle cluster configuration tool
This tool is typically invoked as part of the Oracle Cluster Ready
Services install process. It configures cluster topology and other
settings. Use -help for information on any of these modes.
Use one of the following modes of operation.
-install - creates a new configuration
-upgrade - upgrades an existing configuration
-downgrade - downgrades an existing configuration
-add - adds a node to the configuration
-delete - deletes a node from the configuration
-local - creates a special single-node configuration for ASM
-concepts - brief listing of terminology used in the other modes
-trace - may be used in conjunction with any mode above for tracing
WARNING: Using this tool may corrupt your cluster configuration. Do not
use unless you positively know what you are doing.
Last but not least in our tour of essential Oracle 11g RAC Clusterware tools is the Clusterware Verification Utility or CLUVFY. CLUVFY provides status checks for the before and after conditions of the 11g Clusterware installation. The syntax for the Cluster Verification Utility,
Best practices for cluster installation dictate that you should run the cluster verification utility from the installation media to ensure that all prerequisites are met. Furthermore, we advise you to also run these for each stage of the installation and also post-installation to ensure that the environment has been configured without errors. For instance, use the script
The help option for
We will provide an example of using the Cluster Verification Utility to diagnose the status for post-installation of the Oracle 11g Clusterware as follows:
This tells us that we need to fix the issues with
Clusterware startup sequence for Oracle 11g R2
Understanding how the clusterware startup occurs is critical to the diagnosis and resolution of Oracle RAC problems.
In Unix and Linux operating systems, there is a master daemon process named INIT that functions to start up additional system background processes. The INIT process first spawns the init.ohasd process, which in turn starts up the Oracle High Availability Services Daemon (OHASD). In turn, the OHASD daemon then spawns additional Clusterware processes at each startup level as shown next:
Level 1—OHASD spawns:
Cssdagent: Agent responsible for spawning CSSD
Orarootagent: Agent responsible for managing all root-owned ohasd resources
Oraagent: Agent responsible for managing all Oracle-owned ohasd resources
cssdmonitor: Monitors CSSD and node health (along wth the cssdagent)
Level 2—OHASD rootagent spawns:
Cluster Ready Services Daemon (CRSD)—primary daemon responsible for managing cluster resources
Cluster Time Synchronization Services Daemon (CTSSD)
Diskmon—provides disk monitoring services
ASM Cluster File System (ACFS) Drivers
During the second level of startup for Clusterware, the oraagent spawns the following Clusterware processes for 11g R2:
MDNSD: Used for DNS lookup
GIPCD: Used for inter-process and inter-node communication
GPNPD: Grid Plug and Play Profile Daemon
EVMD: Event Monitor Daemon
ASM: Resource for monitoring ASM instances
Level 3—CRSD spawns:
orarootagent: Agent responsible for managing all root-owned CRSD resources
oraagent: Agent responsible for managing all Oracle-owned CRSD resources
Level 4—CRSD rootagent spawns:
Network resource: To monitor the public network
SCAN VIP(s): Single Client Access Name Virtual IPs
Node VIPs: One per node
ACFS Registery: For mounting ASM Cluster File system
GNS VIP (optional): VIP for GNS
During this phase for Clusterware startup with 11g R2, the oraagent spawns the following processes:
ASM Resouce: ASM Instance(s) resource
Diskgroup: Used for managing/monitoring ASM diskgroups
DB Resource: Used for monitoring and managing the DB and instances
SCAN Listener: Listener for single client access name, listening on SCAN VIP
Listener: Node listener listening on the Node VIP
Services: Used for monitoring and managing services
ONS: Oracle Notification Service
eONS: Enhanced Oracle Notification Service
GSD: For 9i backward compatibility
GNS (optional): It is a grid naming service that performs name resolution
Log file locations for Oracle 11g RAC and ASM
The important Clusterware daemon logs are located under the <GRID_HOME>/log/<nodename> directory. There are additional logfiles located under the <GRID_HOME>/log/<nodename>directory as listed next:
alert<NODENAME>.log - look here first for most clusterware issues
./admin:
./agent:
./agent/crsd:
./agent/crsd/oraagent_oracle:
./agent/crsd/ora_oc4j_type_oracle:
./agent/crsd/orarootagent_root:
./agent/ohasd:
./agent/ohasd/oraagent_oracle:
./agent/ohasd/oracssdagent_root:
./agent/ohasd/oracssdmonitor_root:
./agent/ohasd/orarootagent_root:
./client:
./crsd:
./cssd:
A daemon is a long-running background process that response for service requests. The term originated with Unix, but most operating systems use daemons in some form or another. In Unix, the names of daemons conventionally end in "d". Some examples include inetd , httpd , nfsd , sshd , named , and lpd .
How to check thecurrent state of the Oracle 11g Clusterware resources. ?
How to check the current state of the Oracle 11g Clusterware resources. ?
CRS_STAT -t .
What are frequently experienced problems as RAC DBA ?
failing, missing, or offline of Clusterware resources.
How do you ensure that all of the required Oracle 11g Clusterware processes for RAC are online and running for the Clusterware?
There are 3 commands
ps -ef|grep crsd
ps -ef|grep cssd
ps -ef|grep evmd
[oracle@sdrac01 11.1.0]$ ps -ef|grep crsd
root 2853 1 0 Apr04 ? 00:00:00
/u01/app/oracle/product/11.1.0/crs/bin/crsd.bin reboot
[oracle@sdrac01 11.1.0]$ ps -ef|grep cssd
root 2846 1 0 Apr04 ? 00:03:15 /bin/sh /etc/init.d/init.cssd fatal
root 3630 2846 0 Apr04 ? 00:00:00 /bin/sh /etc/init.d/init.cssd daemon
/u01/app/oracle/product/11.1.0/crs/bin/ocssd.bin
[oracle@sdrac01 11.1.0]$ ps -ef|grep evmd
oracle 3644 2845 0 Apr04 ? 00:00:00
/u01/app/oracle/product/11.1.0/crs/bin/evmd.bin
oracle 9595 29413 0 23:59 pts/3 00:00:00 grep evmd
Failed or corrupted vote disks will negatively impact your Oracle 11g RAC environment so what are best guideliness can be followed to avoid voting failed or corrupted ?
The following guidelines will ensure best practices for the vote disk component of the Oracle 11g Clusterware:
•Implement multiple copies of the vote disk on different disk volumes to eliminate Single Point of Failure.
•Make sure that you take regular backups for vote disks with the dd utility (Unix/Linux) or copy utility (Windows).
•If you are using the dd utility for backing up the vote disks,
there should be 4k block size on a Linux/Unix platform to ensure complete blocks are backed up for the voting disk.
For syntax on how to use the dd command to back up the vote disks, consult the Oracle Clusterware documentation and the Unix/Linux manual pages for dd.
=======================
When you may need to re-install CRS ?
Without a backup of the vote disk, you must reinstall CRS!
means if you dont have back of Vote disk then you may need to reinstall CRS.
====================
if OCR is damaged or lost due to either a disk failure or other problem, the Oracle 11g Clusterware will cease to function normally so what are the
guidelines can be followed to avoid OCR failure ?
Recommended guidelines for the OCR are :
•Maintain frequent backups of OCR on separate disk volumes to avoid Single Point of Failure whenever a change is made to the cluster resources
•Use the OCRCONFIG utility to perform recovery
•Find and maintain safe backups for the OCR
•Export the OCR whenever changes are made to cluster resources
==========
./ocrconfig -showbackup
Oracle 11g Clusterware log file analysis
Where do you get the logfiles for clusterware ?
$CRS_HOME contains logfiles for the Clusterware base directory
Where do you get the logfiles for VIP and ONS resources?
$CRS_HOME\log\nodename\racg
ASM logs are located under $ORACLE_BASE/diag/asm/+asm/<ASM Instance Name>/trace
Oracle provides a useful script named diagcollection.pl, which can be found under the <GRID_HOME>/bin directory. This script, when executed, will automatically collect important Oracle 11g Clusterware files that can be sent to Oracle support engineers for analysis. You must be logged into Linux as the root user in order to run this script.
Automatic Storage Management (ASM) simplifies the storage management for all Oracle database file types.
It renders the capabilities of a volume manager and filesystem together into the Oracle database kernel.
Although, it inherits the Stripe And Mirror Everything (SAME) functionality, it strips the data (extents)
evenly across the ASM disks of a disk group by default and provides the mirroring functionality as an option.
The management and administration of ASM is made easy through a well-known set of SQL statements, such as, CREATE, ALTER, DROP, and through GUI tools
While the ASM was initially intended for managing and maintaining only the Oracle database files and other related files,
its functionality has been significantly improved in 11g R1 and R2 versions to manage all types of data. The following are some of
the key features and benefits of ASM
It simplifies the storage configuration management for Oracle datafiles and other files.
It eliminates the need for third-party software, (for example, volume manager) to manage the storage for the databases.
When a datafile is created, it is divided into equally sized (1, 2, 4, 8, 16, 32, or 64 MB) extents that are scattered evenly across the disks of a disk group to provide balanced I/O to improve performance and prevent hot spot symptoms.
It is built on the Stripe and Mirror Everything (SAME) functionality.
It supports both non-RAC and RAC databases efficiently.
It has the ability to add and remove ASM disks online without actually disturbing the ongoing operations.
It can be managed and administrated using a set of known SQL statements.
It performs automatic online redistribution for the data whenever a disk is being added or dropped.
With ASM 11g R2, in addition to all database file types, it can also be used to store non-Oracle datafile types such as binaries, images, and so on. Beginning with ASM 11g R2, it provides the ability of a preferred read functionality, when ASM mirroring features are enabled.
It supports multiversioning of databases.
It supports a multipathing feature to prevent outages from disk path failures
Diagram A: In this diagram, an application is being connected to a database that is running on Node 1 and the database datafiles are configured on a typical filesystem storage. As summarized earlier, the filesystem is built from a Logical Volume Group (LVG) and the LVG is prepared on the shared storage. Therefore, to prepare the storage for the database, (filesystem and volume groups), you generally need a third-party tool, such as Volume Manager.
Diagram B: In this diagram, an application is being connected to a database that is running on Node 1 and the database datafiles are configured on ASM storage. ASM storage renders the capabilities of the filesystem and volume manager and manages the storage. In contrast to a filesystem, ASM storage does not require any third-party tools to manage the storage for the database and eliminates the need of building a volume group and filesystem creation. This would bypass the layers involved between the database and storage, thus improving the read performance.
ASM disk
ASM disk
A disk is a primary element of an ASM instance. A disk could be built or formed either from a Logical Unit Number (LUN) by a storage array, a disk partition or an entire disk, or a logical volume or Network Attached File (NFS). An ASM instance discovers the disks within the paths specified with the ASM_DISKSTRING initialization parameter. Whenever a new disk is discovered by the ASM instance, the header status of the disk is set to the CANDIDATE flag and makes the disk available in the instance
After the disks are successfully discovered by the local ASM instance, they will appear in the V$ASM_DISK dynamic view of the
local ASM instance and the disks are ready to use to build a new ASM disk group, or can be added to any pre-existing ASM disk groups.
However, when no particular paths for the disks are specified with the ASM_DISKSTRING initialization parameter,
ASM by default look in the following OS specific paths to discover the disks:
Operating System
Path
Linux
/dev/
HPUX
/dev/rdsk/*
AIX
/dev/*
Solaris
/dev/rdsk/*
Windows
\\.\orcldisk*
On a cluster environment, ensure that all ASM disks are visible across all nodes and each node must
have the exact set of permissions (660) and ownership (oracle:dba) to avoid running into any sorts of problems.
Oracle also strongly advises to have the same size of disks in a disk group to maintain the disk group balance.
On the other hand, you have the flexibility to define a different naming convention for a disk across the nodes in a cluster.
The following limits, as of 11g R2, have been imposed on ASM disks:
A maximum of 10,000 disks
Up to 2 TB maximum storage per ASM disk, with EXADATA 4PB per ASM disk
ASM disk group
A disk group is a logical container for one or more ASM disks and is the highest level of data structure in ASM.
When a database is configured to employ the disk group, the disk group then becomes the default location for its datafiles.
The disk group can be used to place various database file types, such as datafiles, online redo, archivelogs, RMAN backupsets,
OCR and Voting disks (in 11g R2), and more. ASM also provides the flexibility of utilizing a single disk group by multiple ASM instances
and databases across a cluster.
After a disk group is successfully created and mounted for the first time in the ASM instance, the name of the disk group is automatically affiliated with the ASM_DISKGROUPS initialization parameter to be able to mount the disk group at ASM instance restarts.
In general, when a datafile is created in a disk group, the datafile extents are striped/distributed
evenly across the available disks of the disk group. Optionally, you can also set the following specified mirroring level
at the disk group to protect the data integrity by storing redundant copies of data (extents) in a separate failure group
to cope with the disk outage symptom:
External redundancy: Relies on the STORAGE (RAID)-level mirroring redundancy option to protect the data
Normal redundancy: Provides a default two-way mirroring option
High redundancy: Provides a three-way mirroring redundancy option of ASM files
As of 11g R2, the following limits have been imposed on the ASM instance:
A maximum of 63 disk groups in a storage system
1 million files per disk group
The following diagram illustrates the structure of a disk group with three disks assigned to it:
The following diagram illustrates the hierarchal structure of a disk group when multiple databases are using it:
Staring with 10g R1 and onwards, Oracle supports two types of instances: RDBMS and ASM.
An ASM instance is a special kind of instance with only Shared Global Area (SGA) that typically consists of memory components such as Shared Pool,
Large Pool, Free Memory and ASM Cache, and a set of default background process, with some additional ASM-specific background processes.
The ASM instance doesn't hold any physical structure and the name of the instance typically starts with +ASM. The instance would be generally named as +ASMn (where n represents the instance number) in a cluster environment. The INSTANCE_TYPE initialization parameter controls the role played by these two instances.
The ASM instance configuration requires only a handful of initialization parameters. These parameters are discussed in the following section
ASM instances efficiently support both non-RAC and RAC databases.
Only one ASM instance is required per node, irrespective of the number of databases/instances running on the node.
In an RAC environment, you need to configure one ASM instance per node and these ASM instances across the cluster
communicate with each other using an interconnected network communication. The database instances interact with the ASM instance to manage the database datafiles. ASM instances typically listen on 1521 port by default.
instance_type
Defines the type of the instance, such as RDBMS and ASM. However, this has been made optional in an Oracle Grid Infrastructure ASM.
asm_diskstring :
Used by the ASM instance to identify and discover the disks mentioned in the paths. Once the disks are discovered,
they will appear in the V$ASM_DISK dynamic view. The disk discovery occurs when an ASM instance is initiated,
when you issue a query against the V$ASM_DISK/V$ASM_DISKGROUP dynamic views, or when you MOUNT, UNMOUNT, RESIZE, ADD a disk.
It is a dynamic parameter and you can specify multiple paths within this parameter.
asm_diskgroups
A dynamic parameter that holds the list of the disk group names that are created and mounted in an ASM instance.
These disk groups are set to mount automatically at ASM instance startup. Whenever you successfully create or drop a disk group,
the change will reflect to this parameter automatically and influence the subsequent instance start-up.
asm_power_limit
Manages the degree of parallelism to speed up the ASM disk rebalance operations, for example, whenever a disk is being dropped from
an existing disk group or when the disk group rebalance is initiated manually.
This is a dynamic parameter that can be set in the range from 0 to 11 (1024 in 11gR2 and above).
Considering the size of a disk group, you may increase the limit of the POWER to speed up the rebalancing operation.
Multiple ASM instances can hold the different values across a cluster. When no limit is specified,
it uses the default value for the rebalancing operation.
processes
Apart from the SGA initialization parameter value, the PROCESSES initialization parameter value has some influence over the ASM instance. Therefore, you may use the following formula to tune the PROCESSES initialization parameter when multiple database instances are accessing the instance:
Processes = 50+50*n (where n indicates the number of instances used to connect to the ASM instance)
ASMB
ASMB exists in both typical database instances and ASM instances and is responsible for receiving an extent map for the new file.
RBAL
Rebalance Master process exists in databases and ASM. In databases, RBAL manages ASM disk group. In an ASM instance, RBAL coordinates disk group rebalance activity. RBAL also assists in opening all device files as part of the discovery operation.
GMON
ASM Disk group Monitor Process monitors all the mounted disk groups and is responsible for maintaining consistent disk membership and status information.
PZ9n
Parallel Slave Processes are used to fetch data from GV$ dynamic view in a cluster
ASM dynamic views
To manage and supervise the ASM instance and its primary components (disk and disk group) effectively, you really need to know the ASM specific dynamic views, and how to map them to extract useful information about disks, disk groups, and so on. This section will help you to understand the use of the ASM specific dynamic views available in ASM.
There are about 19 dynamic views available, as of 11g R2, and each dynamic view provides different helpful information. All the ASM dynamic views are predefined with V$ASM_. In the following section, we are going to focus on a handful of ASM dynamic views.
V$ASM_DISK
When an ASM instance completes the disk discovery operation by reading the disk header information, all disks (used and usable) will then list in the V$ASM_DISK view. Each individual disk has a row in the V$ASM_DISK dynamic view and contains very useful information. The PATH column specifies the disk's name and location. The HEADER_STATUS column, in most cases, contains the following three possible values:
CANDIDATE: Indicates that the unused disks are ready for use.
FORMER: Indicates that the disk was formerly part of a disk group and is now ready for use.
MEMBER: Indicates that the disk is currently part of an active disk group.
Apart from the preceding values, the view also contains other useful information about the disks, such as total size, free size, physical reads, redundancy level, and so on. On the flipside, every time you run a query against this view, ASM initiates disk discovery operations for the new disks, where it reads all disk header information. Querying against this view could be an expensive operation at times, and could impact performance.
The following list of SQL statements demonstrates some of the useful queries against the view. However, prior to running these commands, ensure you are connected to an ASM instance through sqlplus with SYSASM privilege:
SELECT path,header_status,total_mb
FROM v$asm_disk WHERE header_status ORDER BY header_status;
The preceding command displays information about all the disks.
SELECT path,header_status,total_mb,
FROM v$asm_disk WHERE header_status in ('CANDIDATE','FORMER','PROVISIONED');
The preceding command displays information about the disks that are eligible to use.
V$ASM_DISKGROUP
After a disk group is successfully created in the local ASM instance, the disk group summary is visible in the V$ASM_DISKGROUP view. Each disk group maintains a row in the view along with the important information, such as disk group number and name, total disk group size, used space, free space, redundancy type, compatibility, mount state, and so on. Every time a query is run against the view, it is likely to have a similar impact to querying the V$ASM_DISK views. The following SQL command extracts the mounted disk group's name, total disk group size, and the free space left in the group:
SELECT name,state,total_mb,usable_file_mb FROM v$asm_diskgroup;
V$ASM_OPERATION
V$ASM_OPERATION is one of the useful views that displays a row for each long-running operation in the ASM instance. For example, when a disk is being dropped or attached to an existing disk group, an ASM should initiate and complete the rebalancing operations just before releasing the subject disk. Therefore, the view will present useful details, such as the amount of work that has been completed, and show the estimated time (in minutes) required to complete the operations. This should help you to understand how long the operation will take to complete. The following SQL command produces the ongoing long-running operations in the ASM instance:
SELECT * FROM v$asm_operation;
V$ASM_DISK_STAT
Although the V$ASM_DISK and V$ASM_DISK_STAT views display nearly identical information, querying the V$ASM_DISK_STAT view results is a less expensive operation in comparison to the V$ASM_DISK view. On the flip side, this view doesn't display the details about new disks on the system that the ASM instance has yet to discover. As querying the view is less expensive, it is strongly recommended that you use this view in order to display the information and statistics (read/write) about the existing disks.
V$ASM_DISKGROUP_STAT
The V$ASM_DISKGROUP_STAT view displays statistical information about the mounted disk groups in the ASM instance. Unlike the V$ASM_DISKGROUP view, a query against this view doesn't result in new disk discovery operations but is less expensive in terms of performance. Therefore, it is recommended to use this view to display existing disk group information and statistical information about the disk groups.
V$ASM_CLIENT
When the V$ASM_CLIENT view is queried in the ASM instance, it displays the information about the database instances that are using the disk groups mounted and managed by the ASM instance.
ASM instance startup/shutdown
Managing an ASM instance is no different from managing the typical RDBMS database instances. The ASM instance could be managed by either using a set of SQLPLUS commands or the cluster aware SRVCTL utility. Nevertheless, it is strongly recommended that you use the SRVCTL utility for managing the (start/stop) ASM instance in an RAC environment.
The ASM instance can be opened either in NOMOUNT, MOUNT, or RESTRICTED modes with the STARTUP command at the SQLPLUS prompt. When you have a planned maintenance on an ASM instance, you can open the ASM instance in a RESTRICT mode to avoid any possible connections from the database instances. When the ASM instance is opened gracefully, it first discovers the disks and then mounts all the existing disk groups on the local instance.
To shut down the local ASM instance, you can use the various options available with the SHUTDOWN command in the SQLPLUS prompt. The supported options are NORMAL, IMMEDIATE, TRANSACTIONAL, and ABORT. As mentioned previously, you can use the SRVCTL utility to bring down the ASM instance as well. The following list of examples demonstrates how to start up/shut down an ASM instance using SQLPLUS and SRVCTL utilities:
srvctl stop asm –n raclinux1 –o normal:immediate:transactional:abort
export ORACLE_SID=+ASM1
export ORACLE_HOME=$ASM_HOME (in 11gR1)
export ORACLE_HOME=$ORA_GRID_HOME (in 11gR2)
sqlplus / as sysasm
SQL> SHUTDOWN NORMAL:IMMEDIATE:TRANSACTIONAL:ABORT
This example stops the ASM instance on raclinux1 node. Alternatively, you can also use either of the shutdown options.
srvctl start asm –n raclinux1 –o nomount:mount:restrict
export ORACLE_SID=+ASM1
export ORACLE_HOME=$ASM_HOME (in 11gR1)
export ORACLE_HOME=$ORA_GRID_HOME (in 11gR2)
sqlplus / as sysasm
SQL> STARTUP NOMOUNT:MOUNT:RESTRICT
This startup command starts up the ASM instance on raclinux1 node. When you start the instance in NOMOUNT mode, an ASM instance will be started without mounting the existing disk groups. When the instance is started in RESTRICT mode, no database instance can attach to the ASM instance and all the disk groups are opened in restricted mode too.
Ensure that the database instances that are currently associated with the local ASM instance are stopped prior to shutting down the local ASM instance to avoid encountering an ASM instance shutdown error. In this case, the ASM instance will remain opened. Alternatively, you could use the ABORT option to forcefully shut down the currently connected database's instance before shutting down the ASM instance. It is also strongly recommended to dismount any existing Oracle Cluster File System (ACFS) to avoid any application I/O errors.
Note
Note: If the voting disk and OCR files are placed in a disk group, you will not be able to stop the ASM instance. In order to stop the ASM instance, you need to stop the cluster.
ASM disk group administration
In this section, we are going to focus on the available methods to create and manage an ASM disk group. In this context, we will explain how to create an ASM disk group using the various available mirroring options, such as ASM and external mirroring options. We will also summarize how to modify existing disk group parameters and how to drop a disk group with various options.
Creating a disk group
In general, once an ASM instance completes the ASM disk's discovery operation, you can then use the ASM disks to either build a disk group or add it to a pre-existing disk group. You need at least one eligible ASM disk (with HEADER_STATUS either CANDIDATE, FORMER, or PROVISIONED) to be able to build a disk group or to add to a pre-existing disk group. There are various methods to create a disk group, such as, DBCA (in pre 11g R2), ASMCA (with 11g R2), Grid Control, and CREATE DISKGROUP SQL statement in the SQLPLUS prompt. Although the easiest and most convenient way to build and manage a disk group is to use the GUI tools such as DBCA, ASMCA, or Grid Control, we are going to demonstrate how to create and manage a disk group using a set of SQL statements.
In order to create a disk group on the local ASM instance, you first need to identify the eligible ASM disks discovered by the instance. The following SQL statements are useful to list the eligible ASM disks:
export ORACLE_SID=+ASM1
export ORACLE_HOME=$ASM_HOME (in 11gR1)
export ORACLE_HOME=$ORA_GRID_HOME (in 11gR2)
SQL> SELECT path,header_status,mode_status,total_mb
FROM v$asm_disk
WHERE header_status IN ('CANDIDATE','FORMER','PROVISIONED');
The query lists each disk's information along with the path, the header status, and size of the disk. Once you list the disks, you can use the following set of SQL statements to create a new disk group with different levels of mirroring options.
The following SQL statement creates a new disk group named DATA with one ASM disk, sde1 located under the /dev/ location. The EXTERNAL REDUNDANCY clause in the SQL statement indicates that you are relying on the STORAGE-level mirroring (protection) option, not using the Oracle-provided mirroring level:
CREATE DISKGROUP data EXTERNAL REDUNDANCY DISK '/dev/sde1';
The following SQL statement creates a new disk group named DATA that consists of two failure groups with one disk to each failure group, using the Oracle-provided NORMAL redundancy (a two-way mirroring) level:
CREATE DISKGROUP data NORMAL REDUNDANCY
FAILGROUP fgp1 DISK '/dev/sde1',
FAILGROUP fgp2 DISK '/dev/sdf1';
The following SQL statement creates a new disk group named DATA with three failure groups with one disk to each failure group, using the Oracle-provided highest level of redundancy, a three-way mirroring-level option:
CREATE DISKGROUP data HIGH REDUNDANCY
FAILGROUP fgp1 DISK '/dev/sde1',
FAILGROUP fgp2 DISK '/dev/sdf1',
FAILGROUP fgp3 DISK '/dev/sdg1';
Note
Note: Failure groups are used to copy the redundant copies of every extent.
When the mirroring option is skipped, ASM applies the NORMAL REDUNDANCY (a two-way mirroring) level by default.
After a disk group is successfully built, it will then automatically mount in the local instance. If a server parameter file is being used (SPFILE), the name of the disk group is successfully added to the ASM_DISKGROUP initialization parameter in order to mount the disk group automatically on ASM instance restarts. In order to make the disk group available on other ASM instances in a cluster, you simply need to mount the disk group running the ALTER DISKGROUP data MOUNT statement (ensure the same set of disks are accessible on the other nodes).
Altering a disk group
One of the prime advantages of using ASM is the ability to manage pre-existing disk groups without actually interrupting the database's ongoing operations. In other words, you can manage the disk group tasks online, where you can dynamically add and drop a disk from a pre-existing disk group at any given time without requiring any database downtime.
The following list of SQL statements (valid only in the ASM instance) demonstrates how to add an ASM disk to a pre-existing disk group:
ALTER DISKGROUP data ADD DISK '/dev/sdf1';
ALTER DISKGROUP data ADD DISK '/dev/sdf1','/dev/sdg2'
REBALANCE POWER 3;
The first statement adds a disk to the DATA disk group and the second statement adds two disks to the DATA disk group with rebalancing power 3. The REBALANCE POWER clause helps to speed up the rebalancing operation with the degree of parallelism.
The following list of SQL statements (valid only in the ASM instance) demonstrates how to drop an ASM disk from an existing disk group.
You can get the name of the disks associated with the DATA disk group using the following SQL statement:
export ORACLE_SID=+ASM1 – assuming that we are logging in first ASM instance.
export ORACLE_HOME=$ASM_HOME (in 11gR1)
export ORACLE_HOME=$ORA_GRID_HOME (in 11gR2)
SQL> SELECT disk_number,name FROM v$asm_disk WHERE group_number = (SELECT group_number FROM v$asm_diskgroup WHERE NAME = 'DATA');
Once the disk names are identified, use the following SQL statements to drop a disk from an existing disk group DATA:
ALTER DISKGROUP data DROP DISK '/dev/sdf1';
ALTER DISKGROUP data DROP DISK 'DATA_0001'
REBALANCE POWER 3;
While the disk is being dropped from a disk group, you can measure the time left to finish the task using the V$ASM_OPERATION dynamic view. The EST_MINUTES column of the view will tell you the estimated amount of time (in minutes) left to finish the ongoing operation.
Additionally, while the disk drop operation for a disk group is running, at any given time you can cancel all the pending drop operations of the disk group using the following SQL statement:
ALTER DISKGROUP data UNDROP DISKS;
However, you cannot recover an already dropped disk, or the disks that are being dropped using the FORCE clause.
Dropping a disk group
In this section, we will explore a set of SQL statements that will help you to drop a pre-existing disk group and its associated files. Ensure the disk group is mounted on the local ASM instance, from where you are going to run the DROP DISKGROUP command. The disk group shouldn't be mounted on any other ASM instance. If it is, dismount the disk group on the other ASM instances first, or use the FORCE clause to bypass the verification of the disk group being used on other ASM instances.
The following SQL statement drops a disk group DATA:
DROP DISKGROUP data;
DROP DISKGROUP data FORCE;
The following SQL statement drops a disk group DATA and all its associated files:
DROP DISKGROUP data INCLUDING CONTENTS;
After dropping a disk group successfully, ASM then rewrites the header by removing the ASM formatting information of each of the disks associated with the disk group to make the disks available for reuse. The header status of the disks will be subsequently set to the FORMER state
You can create an ASM instance initially using various methods: manual, interactive GUI tools such as DBCA (in 11g R1), ASMCA (from 11g R2 onwards), and Grid Control. In the following section, we are going to exhibit the ASM instance configuration using the DBCA tool for Oracle 11g R1. Then we will cover how to configure the ASM instance using the ASMCA tool.
The following procedure explains the steps that are involved in creating an ASM instance using the DBCA tool in 11g R1:
the operating system will spawn logfiles called message files .
Message files are the operating system logfiles that are generated on a regular basis as part of the operating system functions.
These can be viewed with your favorite editor such as the vi or Emacs editor in Linux and/or Unix.
•Sun: /var/adm/messages
•HP-UX: /var/adm/syslog/syslog.log
•Tru64: /var/adm/messages
•Linux: /var/log/messages
•IBM: /bin/errpt -a > messages.out
WHere the clusterware log files exist for clusterware ?
•11.1 and 10.2: <CRS_HOME>/log/<node name>/cssd
•10.1: <CRS_HOME>/css/log
WHat is OPROCD ? where log files exist ?
/etc/oracle/oprocd or /var/opt/oracle/oprocd
Clusterware log and trace files are located
if 10.2 and above then it's
<CRS_HOME>/log.
if it's 10.1
<CRS_HOME>/crs/log
<CRS_HOME>/crs/init
<CRS_HOME>/css/log
<CRS_HOME>/css/init
<CRS_HOME>/evm/log
<CRS_HOME>/evm/init
<CRS_HOME>/srvm/log
what is server control utlity ?
The Server Control Utility (SRVCTL), srvctl, is a cluster command-line utility that is installed by default on all nodes and is used to administer and manage the RAC database and its associated instances for operations such as start and stop, enable and disable, moving a database and instances across nodes, and adding and removing instances/database. When srvctl is used for some of the operations such as add, remove, enable, disable, and move a database and its instances, the information is stored in the Oracle Cluster Registry.
However, the start and stop operations of a database and instances are done with the cooperation of the Cluster Ready Service Daemon process (CRSD) in the cluster environment.
how to check on which nodes the RAC database instances are configured on and where the instances are running:
[oracle@raclinux]srvctl status database -d racdb
instance racdb1 is running on node raclinux1
how to start and stop rac database?
srvctl stop database -d RACDB
srvctl start database -d RACDB
how to start and stop rac database instance?
srvctl start instance -d racdb i racdb1
srvctl stop instance -d racdb i racdb1
Use the server control utility (
As of Oracle 11g R2, the
What are the important initialization parameters that must have a unique value across all instances of an RAC database?
INSTANCE_NAME
INSTANCE_NUMBER
UNDO_TABLESPACE
THREAD
What are important initialization parameters that must have the same values across all the instances of an RAC database: ?
ACTIVE_INSTANCE_COUNT
CLUSTER_DATABASE
CLUSTER_DATABASE_INSTANCES
CONTROL_FILES
COMPATIBLE
DB_NAME
DB_UNIQUE_NAME
DB_BLOCK_SIZE
DB_RECOVERY_FILE_DEST
DB_RECOVERY_FILE_DEST_SIZE
INSTANCE_TYPE
RESULT_CACHE_MAX_SIZE
REMOTE_LOGIN_PASSWORDFILE
UNDO_MANAGEMENT
MEMORY_MAX_TARGET: Defines the maximum limit of SGA and PGA size for this Oracle instance. You cannot change the value to this parameter dynamically.
•MEMORY_TARGET: Specifies the amount of shared memory allocated at instance startup. Oracle dynamically manages the SGA plus PGA values. Unlike the MEMORY_MAX_TARGET parameter, it is a dynamic parameter and it can be increased or decreased provided that its value doesn't exceed the value of the MEMORY_MAX_TARGET parameter.
Use the following SQL command to find out the current values of AMM parameters on this instance:
SELECT name,value/1024/1024 size_in_mb FROM v$parameter where NAME in ('memory_max_target','memory_target');
NAME SIZE_IN_MB
---------------------------------------- ------------------------------
memory_max_target 404
memory_target 404
When the MEMORY_MAX_TARGET initialization parameter is unset, the database automatically sets its value equal to MEMORY_TARGET value. You can easily disable this feature by setting the MEMORY_TARGET initialization parameter value to 0.
You can use the following command to disable the AMM feature dynamically:
alter system set MEMORY_TARGET=0 scope=both sid='*';
Note
The value sid='*' indicates that the change should apply to all the instances of this database.
The following sample command is used to stop all the services that are part of RACDB database:
SRVCTL ADD SERVICE syntax and options
Using the following commands, a particular service can be started and stopped on a particular instance:
SRVCTL ADD SERVICE syntax and options
SRVCTL ADD SERVICE syntax and options
Parameter
Valuanticipate
es
Description
TYPE
Session
When a user connection is lost due to an instance crash, a new session is automatically established on a surviving instance. This type of failover does not support replay of the queries that were in progress.
Select
Re-establishes the lost user connection on a surviving instance, and replays the queries that were in progress.
None
Is the default mode without failover functionality.
METHOD
Basic
Re-establishes the lost user connections at failover time. Doesn't require much work on the backup server until failover time.
Preconnect
Pre-establishes the connection on another instance to provide rapid failover facility.
DELAY
Specifies the amount of time (in seconds) to wait between connect attempts.
RETRIES
Specifies the number of re-attempts to connect after a failover.
Once the TAF policies are set and connections are established in the instance using these policies, you can obtain the TAF policy details of the connections querying the v$session view in the database using the following SQL statement:
SELECT machine,failover_type,failover_method,failed_over
FROM v$session
The TAF can be used only with applications and interfaces that have OCI support.
The TAF policy doesn't go well with JDBC connections. To configure TAF with JDBC connections, you need to implement Fast Connection Fallover (FCF).
Establish :
set up, start, initiate, institute, form, found, create, inaugurate, build, construct, install
Surviving :
synonyms: remain alive, live, sustain oneself, pull through, get through, hold on/out, make it, keep
anticipate
expect, foresee, predict, be prepared for, bargain on, reckon on, figure on
How do we know which database instances are part of a RAC cluster?
You can query the V$ACTIVE_INSTANCES view to determine the member instances of the RAC cluster.
What is a VIP in RAC use for?
The VIP is an alternate Virtual IP address assigned to each node in a cluster. During a node failure the VIP of the failed node moves to the surviving node and
relays to the application that the node has gone down.
Without VIP, the application will wait for TCP timeout and then find out that the session is no longer live due to the failure.
What would be the possible performance impact in a cluster if a less powerful node (e.g. slower CPU’s) is added to the cluster?
All processing will show down to the CPU speed of the slowest server.
How do you backup ASM Metadata?
You can use md_backup to restore the ASM diskgroup configuration in-case of ASM diskgroup storage loss
What files can be stored in the ASM diskgroup?
In 11g the following files can be stored in ASM diskgroups.
•Datafiles
•Redo logfiles
•Spfiles
In 12c the files below can also new be stored in the ASM Diskgroup
•Password file
What components of the Grid should I back up?
The backups should include OLR, OCR and ASM Metadata.
Is there an easy way to verify the inventory for all remote nodes
You can run the opatch lsinventory -all_nodes command from a single node to look at the inventory details for all nodes in the cluster.
How do you find out what object has its blocks being shipped across the instance the most?
You can use the dba_hist_seg_stats.
How do you find out what OCR backups are available?
The ocrconfig -showbackup can be run to find out the automatic and manually run backups.
Where does the Clusterware write when there is a network or Storage missed heartbeat?
The network ping failure is written in $CRS_HOME/log
What is the interconnect used for?
What is the difference between Crash recovery and Instance recovery?
When an instance crashes in a single node database on startup a crash recovery takes place.
In a RAC enviornment the same recovery for an instance is performed by the surviving nodes called Instance recovery.
What are the important initialization parameters that must have a unique value across all instances of an RAC database?
INSTANCE_NAME
INSTANCE_NUMBER
UNDO_TABLESPACE
THREAD
What are important initialization parameters that must have the same values across all the instances of an RAC database: ?
ACTIVE_INSTANCE_COUNT
CLUSTER_DATABASE
CLUSTER_DATABASE_INSTANCES
CONTROL_FILES
COMPATIBLE
DB_NAME
DB_UNIQUE_NAME
DB_BLOCK_SIZE
DB_RECOVERY_FILE_DEST
DB_RECOVERY_FILE_DEST_SIZE
INSTANCE_TYPE
RESULT_CACHE_MAX_SIZE
REMOTE_LOGIN_PASSWORDFILE
UNDO_MANAGEMENT
MEMORY_MAX_TARGET: Defines the maximum limit of SGA and PGA size for this Oracle instance. You cannot change the value to this parameter dynamically.
•MEMORY_TARGET: Specifies the amount of shared memory allocated at instance startup. Oracle dynamically manages the SGA plus PGA values. Unlike the MEMORY_MAX_TARGET parameter, it is a dynamic parameter and it can be increased or decreased provided that its value doesn't exceed the value of the MEMORY_MAX_TARGET parameter.
Use the following SQL command to find out the current values of AMM parameters on this instance:
SELECT name,value/1024/1024 size_in_mb FROM v$parameter where NAME in ('memory_max_target','memory_target');
NAME SIZE_IN_MB
---------------------------------------- ------------------------------
memory_max_target 404
memory_target 404
When the MEMORY_MAX_TARGET initialization parameter is unset, the database automatically sets its value equal to MEMORY_TARGET value. You can easily disable this feature by setting the MEMORY_TARGET initialization parameter value to 0.
You can use the following command to disable the AMM feature dynamically:
alter system set MEMORY_TARGET=0 scope=both sid='*';
Note
The value sid='*' indicates that the change should apply to all the instances of this database.
========================
Backing Up Voting Disks
Because the node membership information does not usually change, you do not need to back up the voting disk every day. However, back up the voting disks at the following times:
•After installation
•After adding nodes to or deleting nodes from the cluster
•After performing voting disk add or delete operations
dd if=voting_disk_name of=backup_file_name
If your voting disk is stored on a raw device, use the device name in place of voting_disk_name. For example:
dd if=/dev/sdd1 of=/tmp/voting.dmp
When you use the dd command for making backups of the voting disk, the backup can be performed while the Cluster Ready Services (CRS) process is active;
you do not need to stop the crsd.bin process before taking a backup of the voting disk.
Recovering Voting Disks
If a voting disk is damaged, and no longer usable by Oracle Clusterware, you can recover the voting disk if you have a backup file. Run the following command to recover a voting disk where backup_file_name
is the name of the voting disk backup file and voting_disk_name is the name of the active voting disk:
dd if=backup_file_name of=voting_disk_name
Adding and Removing Voting Disks
To add or remove a voting disk, first shut down Oracle Clusterware on all nodes,
then use the following commands as the root user, where path is the fully qualified path for the additional voting disk.
If the new voting disk is stored on a network file server (NFS), then create an empty voting disk file location with the
correct owner and permissions before running this command.
To add a voting disk:
crsctl add css votedisk path
To remove a voting disk:
crsctl delete css votedisk path
Backing Up and Recovering the Oracle Cluster Registry
Oracle Clusterware automatically creates OCR backups every 4 hours.
At any one time, Oracle Clusterware always retains the latest 3 backup copies of the OCR that are 4 hours old, 1 day old, and 1 week old.
The default location for generating backups on Red Hat Linux systems is CRS_home/cdata/cluster_name where cluster_name is
the name of your cluster and CRS_home is the home directory of your Oracle Clusterware installation.
Viewing Available OCR Backups
ocrconfig -showbackup
Because of the importance of OCR information, Oracle recommends that you use the ocrconfig tool to make copies of the automatically created backup files at least once a day.
In addition to using the automatically created OCR backup files, you should also export the OCR contents to a file before and after making significant configuration changes, such as adding or deleting nodes from your environment, modifying Oracle Clusterware resources, or creating a database. Exporting the OCR contents to a file lets you restore the OCR if your configuration changes cause errors. For example, if you have unresolvable configuration problems, or if you are unable to restart your cluster database after such changes, then you can restore your configuration by importing the saved OCR content from the valid configuration.
To export the contents of the OCR to a file, use the following command, where backup_file_name is the name of the OCR backup file you want to create:
ocrconfig -export backup_file_name
What are daily activities ?
Ensuring that Primary and standby databases are in sync or not
checking tablespace utilization , if any tablespaces reach more than 80% then adding datafiles to it.
Checking RMAN backup status , OCR and VOTING DISK backups.
Exporting and importing tables .
I have done 9i database cloning.
I have applied patches on both standalone and standby databases.
Configured Netbackup client on database side to take backups to HYDRA storage.
I have worked on database SWITCH OVER activities when there is a OS maintaince activities.
Identifying Blocking session. taking neccessary actions .
Identifying HUng session taking neccesary actions .
Monitoring undo usage and temp usage , if any queries using maximum undo or temp then idenitifing those query and sending to APPLICATION team.
User creation and assigning privileges.
Refreshing Materialized views
if any huge data to be deleted , then if we use delete command then it takes long time and undo utilization run out of space so in that situation I was taking table backup using export and importing only data that is required.
Resloving User connectiviy issues.
I have configured connection from MS-ACCESS to oracle database via ODBC
Generating EXplain plan.
Generated AWR REPORT , ASH REPORT and ADDM report.
When batch process are taking very long time , then taking trace file of session.
performing gather statistics on table which are not upto to date.
Exporting and importing tables .
1)checking tablespace utilization , if any tablespaces reach more than 80% then adding datafiles to it.
2)Checking RMAN backup status , OCR and VOTING DISK backups.
3)I have done 9i database cloning.
cloning ge 2 db beke beku so nin standby and primary anta anko
4)I have applied patches on both standalone and standby databases.
5)Ensuring that Primary and standby databases are in sync or not
6)I have worked on database SWITCH OVER activities when there is a OS maintaince activities.
7)Resloving User connectiviy issues.
8)User creation and assigning privileges.
9)Identifying Blocking session. taking neccessary actions .
10)Identifying HUng session taking neccesary actions .
11)Monitoring undo usage and temp usage , if any queries using maximum undo or temp then idenitifing those query and sending to APPLICATION team.
12)if any huge data to be deleted , then if we use delete command then it takes long time and undo utilization run out of space so in that situation
I was taking table backup using export and importing only data that is required.
13)Refreshing Materialized views
14)When batch process are taking very long time , then taking trace file of session.
15)performing gather statistics on table which are not upto to date.
16)Generating EXplain plan.
17)Generated AWR REPORT , ASH REPORT and ADDM report.
18)Configured Netbackup client on database side to take backups to HYDRA storage.
19)I have configured connection from MS-ACCESS to oracle database via ODBC
20) Changing intialization parameter
21)Tuning memory components.
22) DB LINK creation.
8850
getting around should never be expensive.......
Types of Standby Databases.
Primary and standby databases intialization parameter.
if Password file changed between databases then how to resolve that issue.
==============
Standby database is block-by-block copy of the primary database . It uses redo apply services to sync standby database with primary database.
Logical Standby database : here redo data is first converted into SQL statements
and then applied to the standby database. This process is called SQL Apply.
and allows both read/write while redo is being applied. Thus, you can also create database objects on the standby database
that don't exist on the primary database.
Disadvantage is
Logical standby database doesn't support some datatypes to be replicated in a logical standby environment:
BFILE
Collections (including VARRAYS and nested tables)
Multimedia data types (including Spatial, Image, and Oracle Text)
ROWID and UROWID
User-defined types
Hence The logical standby database doesn't guarantee to contain all primary data because of the unsupported data types,
objects, and DDLs. Also, SQL Apply consumes more hardware resources. Therefore, it certainly brings more performance issues and
administrative complexities than Redo Apply.
Snapshot standby database :
When you want do some tests or change the data of the database then physical standby can be converted into snapshot
standby database so that write operation can be done the database but the disadvantage is redo will recevied and archived at standby database but doesnt get applied
When you're finished with the snapshot standby database, it's possible to reverse all the changes made to the database and
turn it back to a physical standby again then redo data received from the primary will be applied.
Apply services.
Redo Apply keeps a block-by-block copy of the primary database. By default, Redo Apply automatically runs a parallel apply processes,
which is equal to the number of CPUs of the standby database server minus one. These parallel recovery processes are controlled by the MRP process,
which is the background process responsible for the applying redo data.
Redo Apply has the following benefits for its users:
it supports all data types
Redo Apply has higher performance when compared with SQL Apply or any other replication solutions
It offers simple management by keeping the database structure exactly the same as the primary database with its fully automated architecture
It's possible to take advantages of Active Data Guard and snapshot standby for reporting and testing
Backups taken from physical standby databases are ready to be restored to primary. So we can offload the backup from primary
Redo Apply offers a strong corruption detection and prevention mechanism.
It's possible to use physical standby databases for the rolling upgrades of the database software, which is known as transient logical standby
The real-time apply feature applies the redo as it's received. This feature makes it possible to query real-time or near real-time data from
the standby database
By offering these features, Redo Apply (physical standby database) has become a very popular and widely used-technology for the high availability
and disaster recovery of Oracle databases.
How to get the information of redo data generated per second ?
in load profile of AWR report , there is a name like redo size per second and redo size per transaction. you have to consider redo size per transaction
and also you can get redo generated from per second using instance stats activity of AWR report.
Once you get this information you can use the information to get required bandwidth.
Required bandwidth (Mbps) = ((Redo rate bytes per sec. / 0.7) * 8) / 1,000,000
Preparing the primary database.
Primary database should be archivelog mode.
how to check whether database is in archive log mode or not
archive log list
if primary database is not in archive log mode then convert the database to archive log mode
shutdown the database
startup the database in mount mode
alter database archive log
open the database
then check if database is in mount stage or not.
Questions
1)what is oracle server ?
2)what is oracle instance ?
3)what is SGA ? and what is it consist of ?
4)what is redolog buffer ?
5)what happens when commit complete?
6)what is purpose of redolog buffer and database buffer cache ?
1)what are the types of standby databases ?
2)What is physical standby database ?
3)what is logical standby database ? what is advantage and disadvantage ?
4)what is snapshot standby database ? what is advantage and disadvantage ?
5)what are types of apply services ?
6)what is redo apply services ?
7)what is sql apply services ?
How to get the information of redo data generated per second ?
crsctl query css votedisk
which whether votedisk is online or not , file id of vote disk , diskgroup which belongs to and file name
if you press asmca in cmd prompt , a graphical tool get opened.
8850
getting around should never be expensive.......
Types of Standby Databases.
Primary and standby databases intialization parameter.
if Password file changed between databases then how to resolve that issue.
==============
Standby database is block-by-block copy of the primary database . It uses redo apply services to sync standby database with primary database.
Logical Standby database : here redo data is first converted into SQL statements
and then applied to the standby database. This process is called SQL Apply.
and allows both read/write while redo is being applied. Thus, you can also create database objects on the standby database
that don't exist on the primary database.
Disadvantage is
Logical standby database doesn't support some datatypes to be replicated in a logical standby environment:
BFILE
Collections (including VARRAYS and nested tables)
Multimedia data types (including Spatial, Image, and Oracle Text)
ROWID and UROWID
User-defined types
Hence The logical standby database doesn't guarantee to contain all primary data because of the unsupported data types,
objects, and DDLs. Also, SQL Apply consumes more hardware resources. Therefore, it certainly brings more performance issues and
administrative complexities than Redo Apply.
Snapshot standby database :
When you want do some tests or change the data of the database then physical standby can be converted into snapshot
standby database so that write operation can be done the database but the disadvantage is redo will recevied and archived at standby database but doesnt get applied
When you're finished with the snapshot standby database, it's possible to reverse all the changes made to the database and
turn it back to a physical standby again then redo data received from the primary will be applied.
Apply services.
Redo Apply keeps a block-by-block copy of the primary database. By default, Redo Apply automatically runs a parallel apply processes,
which is equal to the number of CPUs of the standby database server minus one. These parallel recovery processes are controlled by the MRP process,
which is the background process responsible for the applying redo data.
Redo Apply has the following benefits for its users:
it supports all data types
Redo Apply has higher performance when compared with SQL Apply or any other replication solutions
It offers simple management by keeping the database structure exactly the same as the primary database with its fully automated architecture
It's possible to take advantages of Active Data Guard and snapshot standby for reporting and testing
Backups taken from physical standby databases are ready to be restored to primary. So we can offload the backup from primary
Redo Apply offers a strong corruption detection and prevention mechanism.
It's possible to use physical standby databases for the rolling upgrades of the database software, which is known as transient logical standby
The real-time apply feature applies the redo as it's received. This feature makes it possible to query real-time or near real-time data from
the standby database
By offering these features, Redo Apply (physical standby database) has become a very popular and widely used-technology for the high availability
and disaster recovery of Oracle databases.
How to get the information of redo data generated per second ?
in load profile of AWR report , there is a name like redo size per second and redo size per transaction. you have to consider redo size per transaction
and also you can get redo generated from per second using instance stats activity of AWR report.
Once you get this information you can use the information to get required bandwidth.
Required bandwidth (Mbps) = ((Redo rate bytes per sec. / 0.7) * 8) / 1,000,000
Preparing the primary database.
Primary database should be archivelog mode.
how to check whether database is in archive log mode or not
archive log list
if primary database is not in archive log mode then convert the database to archive log mode
shutdown the database
startup the database in mount mode
alter database archive log
open the database
then check if database is in mount stage or not.
Questions
1)what is oracle server ?
2)what is oracle instance ?
3)what is SGA ? and what is it consist of ?
4)what is redolog buffer ?
5)what happens when commit complete?
6)what is purpose of redolog buffer and database buffer cache ?
1)what are the types of standby databases ?
2)What is physical standby database ?
3)what is logical standby database ? what is advantage and disadvantage ?
4)what is snapshot standby database ? what is advantage and disadvantage ?
5)what are types of apply services ?
6)what is redo apply services ?
7)what is sql apply services ?
How to get the information of redo data generated per second ?
crsctl query css votedisk
which whether votedisk is online or not , file id of vote disk , diskgroup which belongs to and file name
if you press asmca in cmd prompt , a graphical tool get opened.
What are the main important components of Oracle clusterware
1) Oracle Cluster Registry (OCR) .
2) Voting disks .
3)Background processes that manage clusterwide operations and provide functionality for Oracle 11g R1 and 11g R2 RAC
What is OCR ?
OCR is the one which manages Oracle Clusterware and Oracle RAC database configuration information
what is OLR?
OLR is the one which resides on every node in the cluster and manages Oracle Clusterware configuration information for each particular node.
What is Voting disks?
Voting disks are the one which manage information about node membership. Each voting disk must be accessible by all nodes in the cluster for nodes to be members of the cluster
Where Oracle OCR and Voting disks to be kept?
Oracle recommends to use Oracle ASM to store OCR and voting disks.
What should be permission of voting disks?
Voting disk file should be having permission as grid owner and member of oinstall group. if not , it should be corrected.
for ex:
grid@myserver>$ ls -l /dev/rhdisk18
crwxrwxrwx 1 root oinstall 36, 02 Feb 10 20:28 /dev/rhdisk18
$ su root
root@myserver> # chown grid:oinstall /dev/rhdisk18
# exit
$ ls -l /dev/rhdisk18
crwxrwxrwx 1001 grid oinstall 36, 19 Sep 09 20:29 /dev/rhdisk18
What are utilities can be used to manage OCR and the Oracle Local Registry (OLR) ?
OCRCONFIG, OCRDUMP, and OCRCHECK.
What is default location of OLR?
OLR is located on local storage on each node in a cluster and Its default location is
Grid_home
/cdata/
host_name
.olr
where Grid_home
is nothing but Oracle Grid Infrastructure home and host_name
is host name of the node.
What is OCRCHECK ?
OCRCHECK displays all OCR locations that are registered .
what is the command which is used to check Oracle Clusterware is running on the node or not ?
crsctl check crs
What is syntax to replace OCR location?
ocrconfig -replace current_OCR_location -replacement new_OCR_location.
MAXQUERYLEN : Identifies the length of the longest query (in seconds) executed in the instance during the period.
You can use this statistic to estimate the proper setting of the UNDO_RETENTION initialization parameter.
The length of a query is measured from the cursor open time to the last fetch/execute time of the cursor.
Only the length of those cursors that have been fetched/executed during the period are reflected in the view.
Query which orders the MAXQUERYLEN column of v$undostat data in descending order .
select *
from v$undostat us , v$sql s
where us.MAXQUERYID = s.sql_id
order by UNDOBLKS desc;
We can use maxqueryid column present in v$undostat to join with v$sql view in order to get sql query which is using undo space.
How do you get the undo usage ?
UNDOBLKS column present in the v$undostat gives the number of undo blocks are being used currently. you have to multiply with size of block to get the usage.
how total undo size is calculated.
Content column present in dba_tablespaces provides information regarding whether tablespace is a temporary tablespace , permanent tablespace or undo tablespaces.
there you can retrive all undo tablespaces. sometimes tablespace may be offline . so filter only online undo tablespace using status column of dba_tablespaces
now I need all the datafiles associated to these undo tablespaces to get bytes or size of datafiles. this we can get from v$datafile but concern is v$datafile doesn't contain
any undotablespace name or any tablespace name . it contain tablespace number hence I need to combine tablespace_name of dba_tablespaces to name column of v$tablespace
which contain tablespace name with it id. so here I am getting id of tablespace with I need to combine with v$datafile to get total bytes used for undo tablespace.
SQL> select sum(d.bytes) "undo"
2 from v$datafile d,
3 v$tablespace t,
4 dba_tablespaces s
5 where s.contents = 'UNDO'
6 and s.status = 'ONLINE'
7 and t.name = s.tablespace_name
8 and d.ts# = t.ts#;
UNDO
----------
104857600
HOw do you check whether FTP is configured and running or not ?
I found that I have several services running related to ftp
cat /etc/services | grep ftp
ftp-data 20/tcp
ftp 21/tcp
tftp 69/udp
sftp 115/tcp
ftps-data 989/tcp # FTP over SSL (data)
ftps 990/tcp
venus-se 2431/udp # udp sftp side effect
codasrv-se 2433/udp # udp sftp side effect
frox 2121/tcp # frox: caching ftp proxy
zope-ftp 8021/tcp # zope management by ftp
The /etc/services file is used to tell what ports are standard for a given service. It does not mean that they are installed. If you look at the file, you can see that ftp data is transferred on port 21 using TCP and that port 21 is the standard ftp port and also uses TCP. It is a tool that client and servers can use to determine what ports to open for a connection. It is also a reference for administration purposes to know what service goes w/ what ports.
HTH
Forrest
/etc/services file contain service port number and protocol.
if you want to view running service use nmap or netstat command
netstat -antlp | grep ftp
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 26142/vsftpd
nmap localhost or IPADDRESS
Starting Nmap 4.62 ( http://nmap.org ) at 2010-07-18 13:12 PDT
Interesting ports on localhost (127.0.0.1):
Not shown: 1705 closed ports
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
25/tcp open smtp
80/tcp open http
......
.....
....
[root@localhost ~]# find / -name groupadd 2>/null/dev
bash: /null/dev: No such file or directory
[root@localhost ~]# find / -name groupadd
/usr/sbin/groupadd
[root@localhost ~]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/o/bin
[root@localhost ~]# set PATH=$PATH:groupadd -g 1200 asmadmin
[root@localhost ~]# groupadd -g 1201 asmdba
bash: groupadd: command not found
[root@localhost ~]# groupadd -g 1202 asmoper
bash: groupadd: command not found
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# set PATH=$PATH:/usr/sbin
[root@localhost ~]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/o/bin
[root@localhost ~]# export PATH=$PATH:/usr/sbin
[root@localhost ~]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/o/bin:/usr/sbin
[root@localhost ~]# groupadd -g 1200 asmadmin
[root@localhost ~]#
C100129463
CREATE SEQUENCE CA_PAID_LEAVERS.GENERATE_SCH_ID
START WITH 6000
MAXVALUE 9999999999999999999999999999
MINVALUE 6000
NOCYCLE
CACHE 20
ORDER;
select * from dba_tables where table_name=PS_LOCATION_TBL@;
select * from PS_LOCATION_TBL@HR8_SOURCE.NAT.BT.COM;
select * from dba_db_links;
Specify
PUBLIC
to create a public database link visible to all users. If you omit this clause, then the database link is private and is available only to you.
The data accessible on the remote database depends on the identity the database link uses when connecting to the remote database:
- If you specify
CONNECT
TO
user
IDENTIFIED
BY
password
, then the database link connects with the specified user and password. - If you specify
CONNECT
TO
CURRENT_USER
, then the database link connects with the user in effect based on the scope in which the link is used. - If you omit both of those clauses, then the database link connects to the remote database as the locally connected user.
SELECT name, value
FROM gv$parameter
WHERE (name LIKE '%link%')
OR (name IN ('global_names', 'dblink_encrypt_login'));
PS interface ?
How do you reset essentials in workspace ?
windows->workspace->reset essentials
what is that 2 square brackets that is present at the bottom?
one is foreground color and other is background colour
what is color picker dialogue box ?
if you want exact colour of a things present in photo . how do u get that ?
eye dropper tool.
sometime you wanna to fill enter foreground or background with one colour then how do you achive that?
edit->fill->there u have options
what is the use of gradient tool?
how do make use rectangular marquee tool?
how to deselect selected area?
what is add to selection , subtract from selection, intersect with selection?
where the brightness menu appears?
image--> brightness
what is revert and wr is it?
select any image with rectangular maquee tool . go to select ---> modift --- feather .wht is the use of it?
wt is the use of load selection and save selection?
Peoplesoft
Components of a PeopleSoft System
PeopleSoft is a chain of linked technologies that stretch between the user and the database.
The database is fundamental to the entire structure, but the technology stack stretches out through the BEA Tuxedo Application Server and the Java servlet to the user's browser
How do you memorise Peoplesoft Diagram ?
1) Peoplesoft schema it contains peoplesoft tables and application tables
of course who will monitor application tables.
Peoplesoft tools Application server
there will be webserver it is java enabled web browser between the Internet browser and Peoplesoft tool application
How people soft applications connect webserver . it is through Jolt and how webserver will connect to internet browser it is through HTTP.
what ever I have explained above is Application execution part .
There are actually 2 parts
1) application Execution part.
2) application Development part.
Application development part also contains people soft application server that server host application development tools. it is through Tuxedo
Server Node requirement .
1) A minimum of 2 GB RAM is required for the complete Grid Infrastructure and RAC software installation
2) A minimum of 1 GB free space is required in the
/tmp
directory.3) A minimum of 10 GB free space is required for the entire Clusterware home , Grid home and RAC software home .
4) shared storage space to place Clusterware critical components like Oracle Cluster Registry (OCR) and Voting Disk.
5) shared storage disks for Automatic Storage Management, if you consider using ASM to host the datafiles
6) Configure the server swap size to be 1.5 time if the RAM on the server is <=2 GB. Otherwise, configure the sever swap size to be equal to the RAM size
7)Each server must have a minimum of two network adapters or network interface cards (NIC) configured to be able to support the public and private networks
Network Requirments
---------------------
every node that is going to be part of the cluster must be configured with a minimum of two NIC interfaces
one for the public communication and another for the private communication.
You also need to secure three IP addresses, Public, Private, and VIP respectively for each individual node.
The VIP subnet must be configured on the same subnet as the public address
Private network is also called as interconnect .
An optimal private network (interconnect) configuration is very important for the Clusterware to boost the interconnect performance, as well as to avoid node evictions syndrome from occurring
after confirguring this private network ... whatever interface we get will be used for the internode communication (heartbeat mechanism) by the Clusterware also Oracle RAC database instances to send and receive data blocks
Considering the pivotal role played by the internode communication in the Clusterware, Oracle highly advises to configure the private network on a separate dedicated network switch for this interface with high speed NICs
How to avoid Network Delays ?
For example, use a 1 GB Ethernet connection and a diversified subnet address from the public access to overcome the network delays.
For a better performance and high-speed network transmission, you could also use the InfiniBand technology instead of 1GB Ethernet.
What can be done from network end to avoid single point of Failure ?
To avoid Single Point of Failure occurrence for interconnect connectivity, you can also implement the interconnect aggregation method by bonding multiple network interfaces together into a single logical network interface or using the redundant switches method.
Where to IP address should be Configured and how it should be configured ?
Ip address can be configured in ethier /etc/host file or DNS server .
IP address should be configured with full quelified hostname and domain name
These IP addresses with their fully qualified hostname and domain name either need to be configured on the Domain Name Server (DNS) or added to the /etc/hosts file.
DOnt know what is meaning of this
" Beginning with Oracle 11g R2 a maximum of three additional IP addresses in a round-robin fashion are needed for a Single Client Access Name (SCAN)." and
"Unlike the other three IP (Public, Private, and VIP) addresses and hostnames, the SCAN must be assigned a unique name across all nodes and it must remain on the same subnet as a public and VIP address."
What protocol will be supported by public network and Private network ?
You will need to ensure that the public network interface supports TCP/IP and that the private network adapter supports UDP.
What are the mandatory groups are required for each node
Groups : Oinstall , dba ,oper , asmadmin .
What is the mandatory user is required for each node or server ?
User : Oracle
What is command to create group?
groupadd –g 500 oinstall
groupadd –g 501 dba
groupadd –g 502 oper
groupadd –g 503 asmadmin
As per oracle recommandations, What is the name that should be created as Primary group ? and how do you create that ?
Oinstall group should be created as primary group and other groups should be created as secondary.
Command to create is as below
useradd –u 1000 –g oinstall –G dba,oper,asmadmin oracle
passwd oracle
What is secure shell ? How to configure Secure Shell (SSH) passwordless connectivity between the nodes?
What is use of configuring Secure Shell (SSH) passwordless connectivity between the nodes ?
it is neccessary as Oracle universal installer uses ssh and scp commands internally during the installation phase to perform remote operations in which it copies the software from the local to other nodes.
Steps Need to be followed for installation.
===========================================
1) get to know about server (Node) requirements
2) Network requirements.
3) configure Kernel parameter /etc/sysctl.conf
4) Install RPM packages.
5) create Groups and users.
6) Set or configure limits for the user in order to improve the shell limits ie /etc/security/limits.conf
7) Add session user limits
/etc/pam.d/login
8) set the .bash_profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
9) configure the Secure Shell (SSH) passwordless connectivity between the nodes.
This can be configured in 2 ways.
a) manually it was untill 11.1 release
b) it's been automated in 11.2 release . It can be configured automatically by OUI during installation phase.
The preceding configuration prerequisites are best done with the coordination of storage, system, and network teams.
10)Verifying prerequisites with the CLUVFY utility
***************************************************************************************************************************************************
Although we managed to build each node of the cluster cautiously to meet all essential recommendations for a successful cluster configuration,
we can further ensure that everything is in the right place just before the installation process kicks off. With the CLUVFY utility . Cluster Verify utility
Where do you get this cluster verify utility(runcluvfy.sh) ?
Clusterware software location or grid software location.
How do you check node accessibility between nodes using Cluster verify utility.?
runcluvfy.sh : Run cluster verify utlity
./runcluvfy.sh comp nodereach –n raclinux1,raclinux2 –verbose
This command will work in all rac release.
How to check if node accessibility, user equivalence, network interface, and shared storage are configured properly or not?
./runcluvfy.sh stage -post hwos -n raclinux1,raclinux2 –verbose . This command is availabe from 11g r2
remember : every stage hengide(hwos) anta post madu
One more command is there to check
./runcluvfy.sh stage -pre crsinst -n raclinux1,raclinux2 –verbose
What is Fixup flag ?
when the –fixup flag is used with the CLUVFY utility, it creates the fixup shell script in the directory named with the fixupdir flag for those requirements that have failed to meet the prerequisites criteria on the servers
You can, as the root user, execute those scripts over the servers to fix the problems reported during the checks validation.
./runcluvfy.sh stage -pre crsinst -n raclinux1,raclinux2 –fixup –fixupdir /tmp/fixups.sh
Initiating Oracle Universal Installer for Oracle 11g R1 Clusterware
===================================================================
How many installation procedure in RAC
Unlike the standalone installation process, Oracle Real Application Clusters (RAC) comes in a two-phase installation procedure; an Oracle Clusterware is configured in the first phase, followed by the Oracle RAC (RDBMS) software installation process
2 Phase
=======
1) Oracle Clusterware installation
2) Oracle RAC database installation.
How do you start clustware configuration ?
To begin the Clusterware configuration proceedings,initiate the ./runInstaller command either from the Oracle 11g R1 Clusterware staged software area or from the installation DVD/CD source
Explain all steps of Clusterware configuration
1) Welcome Screen.
2) OUI(Oracle universal installer) will inform you to enter ORacle inventory directory and Operation system group name.
If Oracle_Base is already set then , then Oracle by default suggest appropriate location.
3) Enter Oracle Clusterware home name and specify oracle clusterware location for Oracle Clusterware software binaries.
4) (Product specific Prerequisite check)after this , OUI then performs mandatory prerequisite checks to ensure that all essential recommendations such as kernel parameters value, physical memory, OS packages, and settings are actually met on nodes.
5)Specify Cluster Configuration screen, in which the OUI detects and displays the local node's Public, Private, and VIP name details under the Cluster Name section, as configured in DNS or as mentioned in the /etc/hosts file.
In order to add more node details that are likely to be part of the Clusterware installation, click on the Add button and enter the Public, Private, and VIP names for each node.
The Cluster Name field suggests a default cluster name for this cluster environment. As a best practice, ensure you set a unique cluster name if you are going to hold multiple cluster environments in your network.
6)Specify Network Interface Usage , you are required to configure the network interface types for the public and the private communication.
By default, the public and private interfaces are configured to private interface type. However, do not worry; select the correct interface from the list for the public interface.
7)Specify Oracle Cluster Registry (OCR) Location : OCR is one of the critical components of an Oracle Clusterware, which maintains and manages essential details for the cluster sources s
Such as RAC databases, listeners, instances, and services. As of Oracle 11g R1, OCR can be placed either on a shared block on a raw device or on a shared filesystem to which all the participating nodes must have read and write permissions
Considering the criticality of the OCR contents to the cluster functionality,
Oracle provides an option to make (mirror) the OCR file redundant, with a Minimum of two copies, to avoid a Single Point of Failure situation.
To enable the Oracle redundancy option, choose the Normal Redundancy option and specify the mirror copy disk location accordingly
If you are depending on the system-provided (RAID) protection level, you can then choose the External Redundancy option.
However, Oracle strongly recommends you to multiplex the OCR file.
Next you need to provide path of the OCR.
8) Specify Voting Disk configuration : The voting disk is another critical constituent of an Oracle Clusterware, which maintains and consists of important details about the cluster nodes membership, such as which node is part of the cluster, who (node) is joining the cluster, and who (node) is leaving the cluster.
Given the importance of voting disk availability, Oracle provides Normal and External redundancy options to multiplex the voting disk to maintain high availability
You will need to ensure that all the nodes participating in the cluster have read/write permissions on disks.
Specify voting disk location and you can have upto max 32 voting disk in a cluster.
Not Understood : Note: A node in the cluster must be able to access more than half of the voting disks at any time in order to be able to tolerate a failure of n voting disks. Therefore, it is strongly recommended that you configure an odd number of voting disks such as 3, 5, and so on.
9) Install ,Once the installation begins on the local node, OUI displays the progress installation bar
10)Once installation is done , OUI then brings up a pop-up Execute Configuration scripts window
log in as root user, and you must run the scripts (orainstRoot.sh and root.sh) in sequence across all the nodes as instructed.
11).When the root.sh script is executed successfully across the nodes, click on OK to complete the Oracle Clusterware Installation process and proceed to the final stage.
12)Configuration Assistants, OUI then moves further to configure Oracle Notification, Private Interconnect, and Cluster Verifications Utility (CLUVFY) on the Configuration Assistants screen
How do you search for a file.. in liux.
There are 3 types
1) using find command.
2) Using locate command
3) which command
1)
$ find / -name uuencode 2>/dev/null
/usr/bin/uuencode
2) $ locate uuencode
/usr/bin/uuencode
/usr/share/man/man1/uuencode.1.gz
/usr/share/man/man1p/uuencode.1p.gz
/usr/share/man/man5/uuencode.5.gz
3)which uuencode
How to signal the end of stdin input in bash
How to get windows server uptime ?
Event : Cache buffer chains
===========
Hi ASG / Andy
I have been sending copies of all RFC’s to this group
mailbox as agreed with Andy some time ago.
Having chased Martin Waughray for updates he has come back
with the below, so it appears the requests are not being sent to Horizon Team
Can you please send the below urgently as they are this
week’s priority requests ?
Andy
Can you see what the problem is here as I am having to
provide copies to get requests actioned which isn’t ideal, if you need them
sent to both teams please advise ASAP
Many thanks
This email message cannot be
delivered to Srinivas.nadella@bt.com
because this email is no longer valid.
Dear
Sukanta / team,
ELX travel
requests for Rasha as being channeled to Ahmed Hamzawy which is incorrect.
Rasha
reports to Anubhav hence this should go to him to authorize on the system.
Please can
you help us resolve this ASAP or point me to someone who can?
Will wait
for your feedback.
Regards,
Claudia
Hi Claudia
Rasha’s(609305681) line manager
is reflecting wrong as Ahmed (606484303) in BTPS feed so as in ELX. So it need
to be corrected in BTPS feed first.
Hi BTPS team
Please correct Rasha’s
line manger as Anubhav (605878226) in BTPS feed .
Hi BTPS team
Can you action it urgently please?
Thx
Can you action it urgently please?
Thx
Hi
607681848
- It looks like HR “converted them from
“outsource” on the 7th December, so they will have had to terminate
their relationship to BTFS and transfer them to BT PLC.
605156980
= It looks like HR “converted them from
“outsource” on the 9th December, so they will have had to terminate
their relationship to BTFS and transfer them to BT PLC.
Pramod - can we find out why eOrg
processed the termination message but not the hire?
Sourav – in the meantime can we do
Joiner-Current-Starts for eOrg
Many
thanks
Jules
Jules
Pramod/Shyam/Julie/Sourav,
Can you please look into this
one urgently please. They are correct in
Directory but not appearing in eOrg at all.
Can you please investigate and take the appropriate action as they
cannot gain access to do their work and are becoming difficult to appease.
Regards
Chris Donovan
BT Group Finance Reporting and Analysis
BT Group Finance Reporting and Analysis
Pramod/Chris
Got
a strange one for you. The 2 people below transferred to us on the 1st
Dec. They appear on directory but do not exist on eOrg and I mean they are not
there at all. I saw the CPA’s coming in and accepted them but they now show as
left BT. They have not left BT, how do we resolve this.
You are currently viewing a secure
web page. To use browsealoud, the text being read must be transmitted to
Texthelp Ltd.
The text will be sent over a secure connection.
Do you wish to continue?
The text will be sent over a secure connection.
Do you wish to continue?
All,
Unfortunately, our hands are
tied – even for the simplest of changes (please see enclosed).
By when can we expect the
access to be in place for all?
RE: BW213233 - DB queries to be run
Thank you Rakesh for your
extended support in resolving the issue.
Thanks,
Shavi
From: Dibyendu2 R [mailto:dibyendu2.r@tcs.com]
Sent: 07 January 2016 06:16
Cc: Neha Mehra; Sushanta Sinha
Subject: Fw: Global Announcement : People Soft Training
Sent: 07 January 2016 06:16
Cc: Neha Mehra; Sushanta Sinha
Subject: Fw: Global Announcement : People Soft Training
Dear All,
FYI please.
Kindly cascade among your team / group and encourage participation. Also, if found relevant, please be present and leverage.
==========================================================================================================
FYI please.
Kindly cascade among your team / group and encourage participation. Also, if found relevant, please be present and leverage.
==========================================================================================================
Dear Vivian,
Thanks for
your enquiry.
We totally
understand the urgency of this request. And due to this situation, we will
contact technical team to solve this problem. While we suppose it will take a
few days to get solution, please wait for the solution and we will keep you all
updated once there is anything updated.
Much
appreciate for your understanding and we hope this will be solved soon~
Should you
have any enquiries, please feel free to let us know.
Thanks and
Best regards
Sherry Cui
BT Asia HR
Service Dalian Team (Dalian, China)
************************************************************************************************************************************************
If we can be
any further assistance please do not hesitate to contact us at:
Peopleline:
Country
Peopleline
Telephone Number
Peopleline Toll Free Number
AUS
+61 (0)2 8223 9719
1 800 101 546
HKG, CHN,
TWN, KOR
+852 307 14617
800 933 924 (Hong Kong only)
SGP, MYS,
PHL, IDN, THA & JPN
+65 6622
1040
800 448 1459
************************************************************************************************************************************************
From: vivian.li@bt.com [mailto:vivian.li@bt.com]
Sent: Wednesday, January 13, 2016 1:43 PM
To: apac.hro.bt <apac.hro.bt@accenture.com>; christy.shaw@bt.com; debbie.lee@bt.com
Cc: asg.ps8.ir@bt.com
Subject: RE: ELX problem
Sent: Wednesday, January 13, 2016 1:43 PM
To: apac.hro.bt <apac.hro.bt@accenture.com>; christy.shaw@bt.com; debbie.lee@bt.com
Cc: asg.ps8.ir@bt.com
Subject: RE: ELX problem
Hi,
Thanks for taking care of this.
How is the process going and any idea when it can be fixed?
As I have an urgent travel
request to raise in ELX, your prompt action is highly appreciated!
Thanks,
Vivian
From: apac.hro.bt@accenture.com [mailto:apac.hro.bt@accenture.com]
Sent: Wednesday, 13 January 2016 9:17 AM
To: Shaw,CYY,Christy,CHR63 R; Lee,YM,Debbie,JJV R
Cc: Li,VZ,Vivian,CFA R; ASG PS8 IR G
Subject: RE: ELX problem
Sent: Wednesday, 13 January 2016 9:17 AM
To: Shaw,CYY,Christy,CHR63 R; Lee,YM,Debbie,JJV R
Cc: Li,VZ,Vivian,CFA R; ASG PS8 IR G
Subject: RE: ELX problem
Dear Christy,
Thanks for your
enquiry.
Please kindly
understand that there may be some delay in interaction between Fusion and BTPS,
and eLX record should rely on BTPS’s interface. While we cannot find Vivian’s
record in BTPS.
We have raised
issue on this case with technical team.
Please kindly wait
for solution and we will keep you all updated once there is any feedback.
Much appreciate for
your understanding~
Should you
have any enquiries, please feel free to let us know.
Thanks and
Best regards
Sherry Cui
BT Asia HR
Service Dalian Team (Dalian, China)
************************************************************************************************************************************************
If we can be
any further assistance please do not hesitate to contact us at:
Peopleline:
Country
Peopleline
Telephone Number
Peopleline Toll Free Number
AUS
+61 (0)2 8223 9719
1 800 101 546
HKG, CHN,
TWN, KOR
+852 307 14617
800 933 924 (Hong Kong only)
SGP, MYS,
PHL, IDN, THA & JPN
+65 6622
1040
800 448 1459
************************************************************************************************************************************************
IM MSG
This person doesn’t want to be disturbed .
May not see your conversation. Do you want send him msg any way.
=------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------
From: Core IT Communications G
Sent: Friday, January 15, 2016 2:19:58 PM
Subject: Important: You've been sent a dangerous email
Auto forwarded by a Rule
-------------------------------------------
From: Core IT Communications G
Sent: Friday, January 15, 2016 2:19:58 PM
Subject: Important: You've been sent a dangerous email
Auto forwarded by a Rule
From: christy.shaw@bt.com [mailto:christy.shaw@bt.com]
Sent: Tuesday, January 12, 2016 4:52 PM
To: debbie.lee@bt.com; apac.hro.bt <apac.hro.bt@accenture.com>
Cc: vivian.li@bt.com; asg.ps8.ir@bt.com
Subject: RE: ELX problem
Sent: Tuesday, January 12, 2016 4:52 PM
To: debbie.lee@bt.com; apac.hro.bt <apac.hro.bt@accenture.com>
Cc: vivian.li@bt.com; asg.ps8.ir@bt.com
Subject: RE: ELX problem
Hi AHRs,
Please help.
Thanks,
Christy
Rob – are you saying this is the
first day this Agent has logged in please?
That is a separate issue from
the fact we are not being sent his details on Peoplesoft though..
Jules
Hi
Julie, many thanks for sorting out a couple of errors for me last month.
I
am left with one really odd one.
ouc
|
ein
|
firstname
|
lastname
|
TBS926
|
802074926
|
Adam
|
Pettit
|
Adam
left BT quite a while ago now ( October I think ), he has gone off directory,
he has gone off eOrg ( last month ) but he still appears on the peoplesoft
report. I have flagged it to Ian Hancock and Dave Austin many times and he is
on their issue list but he continues to appear.
Can
you point me in the right direction to get this resolved once and for all
please as we are rapidly running out of year and as things stand I can quite
easily imagine him appearing on the March exit list.
Many Thanks
Hi Team,
Could you please check the feeds being send from ELS end.
Could you please check the feeds being send from ELS end.
To be seen on the road --- wear bright clothes
Thanks for using WebEx.
WebEx helps you
meet online with anyone, anywhere, so you can get more done—faster and
cost-effectively.
Dear Rakesh,
The Service Request you submitted on 05/02/2016 17:37:35
Ref: BW531655 Need trace of session was CLOSED on 05/02/2016 19:09:30.
Many thanks,
This is an automated email, please do not reply to the
address as it will not be seen.
SUB : RE: SQL service pack upgrades and Security Patch
MS15-058 Apply Required - SQL 2008 R2 - BWP10460004
Alarm suppression process, please
instigate immediately.
AS&M|
BT Technology, Service & Operations|TelOff:
03366881483| Mob: +918792287671|E: rakesh.karam@bt.com
BW571967
Query execution time is more
***
Master DBAORATSO Dominique
Tellier +44 1277 326659 eadmt01
Apologies
but due to the current level of leave & sickness, Operational DBAs do not
have spare resources to analyse the above query.
In any case, this type of worl is really
in the realm of the Application DBA.
BW577401
The server was rebooted 5 days ago for a HW incident BW535975,
which is when backup connectivity started to fail.
Overview and KT on PeopleSoft test
environments 12:00 IST
We will
have call tomorrow - Overview of PeopleSoft test environments and possible KT
at 12:00 IST starting for about 2 to 3 hours.
The given Link is showing no resource availability in month of
March :(
only 1 hr slots available for 12 and 13th March
Johns,G,Gary,TAG37 R 19:38
nope due to the rochdale issue a change embargo is currently on
and all changes that were scheduled and have had to be cancelled will be
given a priority slot
we will explore about following topics.
explore :
travel through (an unfamiliar area) in order to learn about it.
Sometimes we like to follow up to find our more about people's answers. If you wouldn't mind being contacted for future Ī¼Torrent research, please enter your email address below. [Optional]
Before we investigate the nature of Oracle 11g RAC issues, we first need to provide an introduction to how the Oracle 11g Clusterware functions.
What is difference between Clusterware and RAC?
Oracle Clusterware is a different piece of software compared to other RAC components or the RAC database. One key point is not to confuse the Clusterware operations and architecture with 11g RAC! They are both crucial for a complete clustering solution and interact with each other, but are not the same thing. Clusterware consists of the Oracle clustering software as well as background processes that are unique and required for an Oracle RAC environment. In contrast, the Oracle RAC architecture contains Clusterware as well as additional hardware, network, storage, and database components required for Oracle 11g RAC. Many DBAs confuse Clusterware with RAC and think that they are same, which is indeed not the case.
What are services provided by ORacle Clusterware ?
Oracle Clusterware provides several key services essential to an Oracle 11g RAC configuration, including the following:
Group Services to manage cluster services within 11g RAC
Node Monitor or the "heartbeat" to monitor the status of nodes in 11g RAC cluster
Locking services performed by the LMS database process to manage concurrency activities for 11g RAC cluster
HA Resource management for failover or load-balancing activities in 11g RAC
What was old name of Oracle clusterware?
Oracle 11g Clusterware is Oracle's implementation of cluster management software, which was introduced in the 10g release of Oracle RAC software. It was originally called Cluster Ready Services (CRS) and is the complex software that exists under the hood of all Oracle 11g RAC environments.
In order to manage a large 11g RAC environment,
one must first understand the key processes that
make up the Oracle 11g Clusterware architecture.
so what are those key process that make up the oracle 11g
clusterware architecture ?
Oracle Clusterware consists of the following items:
Oracle Cluster Registry
Voting disk
Control files (SCLS_SRC) for Clusterware
Initialization and shutdown scripts for Clusterware
Oracle 11g Clusterware background processes
Additional background processes for Oracle 11g Clusterware
WHat is the purpose of Oracle cluster registry
The Oracle Cluster Registry's purpose is to hold cluster
and database configuration information for RAC
and Cluster Ready Services (CRS) such as
the cluster node list, cluster database instance to node mapping,
and CRS application resource profiles.
As such, the OCR contains all configuration
information for Oracle 11g Clusterware,
including network communication settings
where the Clusterware daemons or background processes listen, along with the cluster interconnect information for 11g RAC network configuration and the location of the 11g voting disk.
The OCR must be stored on shared raw devices, OCFS/OCFS2
(Oracle Cluster Filesystem or an approved NFS or supported
cluster filesystem) within an Oracle 11g RAC environment.
HOw to check the status of OCR configuration?
using OCRCHECK
what output you get by OCRCHECK when everthing is normal ?
[oracle@raclinux1 ~]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 297084
Used space (kbytes) : 3852
Available space (kbytes) : 293232
ID : 2007457116
Device/File Name : /dev/raw/raw5
Device/File integrity check succeeded
Device/File Name : /dev/raw/raw6
Device/File integrity check succeeded
Cluster registry integrity check succeeded
WHat is VOting disk ?
The Voting disk manages cluster node membership and must be stored on either a shared raw disk or OCFS/OCFS2 cluster filesystem. As such, the Voting disk is the key communication mechanism within the Oracle Clusterware where all nodes in the cluster read and write heartbeat information. In addition, the Voting disk is also used to shut down, fence, or reboot either single or multiple nodes whenever network communication is lost between any node within the cluster, in order to prevent the dreaded split-brain condition and thus protect the database information.
How do you check Voting disk configuration information or status of voiting disk?
[oracle@raclinux1 ~]$ crsctl query css votedisk
0. 0 /dev/raw/raw7
1. 0 /dev/raw/raw8
2. 0 /dev/raw/raw9
located 3 votedisk(s).
what is understood from above output ?
This output from crsctl tells us that we have three vote disks for the 11g Clusterware environment and that they are available and free of errors.
Oracle provides a suite of utilities and scripts that are to be used by the database administrator in charge of an Oracle 11g RAC environment. It is imperative to master these tools so that the 11g Clusterware can be monitored on a proactive basis to avoid any failures or downtimes in the clustered environment for Oracle 11g RAC. The key Clusterware administration utilities that we will discuss in this chapter include the following:
- CRSCTL (Clusterware Control utility)
- CRS_STAT (Cluster Ready Services Statistics)
- OCRCHECK (Oracle Cluster Registry Check Utility)
- OCRCONFIG (Oracle Cluster Registry Config Utility)
- CLSCFG (Clusterware Config Tool)
- CLUVFY (Clusterware Verification Utility)
which Utility is used to monitor the status of Clusterware resources in Oracle 11g RAC environments. ?
CRS_STAT -h
what is command to examine the general status for Clusterware resources and applications ?
crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.inst application ONLINE OFFLINE
ora....B2.inst application ONLINE OFFLINE
ora.RACDB.db application ONLINE OFFLINE
ora....SM1.asm application ONLINE OFFLINE
ora....X1.lsnr application ONLINE OFFLINE
ora....X1.lsnr application ONLINE OFFLINE
ora....ux1.gsd application ONLINE ONLINE raclinux1
ora....ux1.ons application ONLINE ONLINE raclinux1
ora....ux1.vip application ONLINE OFFLINE
ora.target.db application ONLINE OFFLINE
ora....t1.inst application ONLINE OFFLINE
ora.test.db application ONLINE OFFLINE
ora....t1.inst application ONLINE OFFLINE
What is command to get the clusterware parameter ?
$ crs_stat -p
NAME=ora.RACDB.RACDB1.inst
TYPE=application
ACTION_SCRIPT=/u01/app/oracle/product/11.1.0/db_1/bin/racgwrap
ACTIVE_PLACEMENT=0
AUTO_START=1 dictates whether resource will restart on crs restart
CHECK_INTERVAL=600 how often crs checks this resource
DESCRIPTION=CRS application for Instance
FAILOVER_DELAY=0
FAILURE_INTERVAL=0
FAILURE_THRESHOLD=0
HOSTING_MEMBERS=raclinux1
OPTIONAL_RESOURCES=
PLACEMENT=restricted
REQUIRED_RESOURCES=ora.raclinux1.vip ora.raclinux1.ASM1.asm
RESTART_ATTEMPTS=5
SCRIPT_TIMEOUT=600 ĆØ timeout for script which checks resource
START_TIMEOUT=0
STOP_TIMEOUT=0
UPTIME_THRESHOLD=7d
USR_ORA_ALERT_NAME=
USR_ORA_CHECK_TIMEOUT=0
USR_ORA_CONNECT_STR=/ as sysdba
USR_ORA_DEBUG=0
USR_ORA_DISCONNECT=false
Sometimes there will be a problem that causes the Oracle Clusterware to fail or resources to become unavailable due to permission and ownership settings for the Oracle Clusterware. If you wish to examine the Clusterware permissions and ownership, you can use the crs_stat –ls option as shown here: ]$ crs_stat -ls
Name Owner Primary PrivGrp Permission
-----------------------------------------------------------------
ora....B1.inst oracle oinstall rwxrwxr--
ora....B2.inst oracle oinstall rwxrwxr--
ora.RACDB.db oracle oinstall rwxrwxr--
ora....SM1.asm oracle oinstall rwxrwxr--
ora....X1.lsnr oracle oinstall rwxrwxr--
ora....X1.lsnr oracle oinstall rwxrwxr--
ora....ux1.gsd oracle oinstall rwxr-xr--
ora....ux1.ons oracle oinstall rwxr-xr--
Which utility is used to manage the Oracle cluster registery and what are functionalities provided by utility ?
The OCRCONFIG utility provides you with the ability to manage the Oracle 11g Cluster Registry. As such, it provides you with
the following functionalities to administer the OCR:
Exporting and importing OCR contents to a file
Restoring a corrupted OCR from a physical backup
Adding or replacing an OCR copy with another OCR file
Repairing a damaged OCR with a new OCR version
$ ocrconfig -help
Name:
ocrconfig - Configuration tool for Oracle Cluster Registry.
Synopsis:
ocrconfig [option]
option:
-export <filename> [-s online]
- Export cluster register contents to a file
-import <filename>
- Import cluster registry contents from a file
-upgrade [<user> [<group>]]
- Upgrade cluster registry from previous version
-downgrade [-version <version string>]
- Downgrade cluster registry to the specified version
-backuploc <dirname> - Configure periodic backup location
-showbackup - Show backup information
-restore <filename> - Restore from physical backup
-replace ocr|ocrmirror [<filename>]
- Add/replace/remove a OCR device/file
-overwrite - Overwrite OCR configuration on disk
-repair ocr|ocrmirror <filename> - Repair local OCR configuration
-help - Print out this help information
Note
Note: A log file will be created in
A log file will be created in $ORACLE_HOME/log/<hostname>/client/ocrconfig_<pid>.log. Please ensure you have file creation privileges in the above directory before running this tool.
Clusterware configuration tool or CLSCFG. This utility provides a host of features for managing and updating your Oracle 11g RAC Clusterware configurations, allowing you to perform the following administration tasks for the Oracle 11g Clusterware:
Creating a new 11g Clusterware configuration
Upgrading existing Clusterware
Adding or removing nodes from the current 11g Clusterware
In order to display all of the possible options and parameters when using this utility for clscfg, you can issue the –help parameter to the clscfg command utility. The help option to clscfg provides the general syntax as shown next:
$ clscfg -help
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 11G Release 1.
clscfg -- Oracle cluster configuration tool
This tool is typically invoked as part of the Oracle Cluster Ready
Services install process. It configures cluster topology and other
settings. Use -help for information on any of these modes.
Use one of the following modes of operation.
-install - creates a new configuration
-upgrade - upgrades an existing configuration
-downgrade - downgrades an existing configuration
-add - adds a node to the configuration
-delete - deletes a node from the configuration
-local - creates a special single-node configuration for ASM
-concepts - brief listing of terminology used in the other modes
-trace - may be used in conjunction with any mode above for tracing
WARNING: Using this tool may corrupt your cluster configuration. Do not
use unless you positively know what you are doing.
Last but not least in our tour of essential Oracle 11g RAC Clusterware tools is the Clusterware Verification Utility or CLUVFY. CLUVFY provides status checks for the before and after conditions of the 11g Clusterware installation. The syntax for the Cluster Verification Utility,
cluvfy
, is complex, so we will provide you with some
examples to understand how to use this tool in the best possible manner for
installation tasks related to Oracle 11g RAC Clusterware. If you want to see the
general syntax of the Cluster Verification Utility, type in cluvfy
at the command line as shown in this example: Best practices for cluster installation dictate that you should run the cluster verification utility from the installation media to ensure that all prerequisites are met. Furthermore, we advise you to also run these for each stage of the installation and also post-installation to ensure that the environment has been configured without errors. For instance, use the script
runcluvfy.sh
before installation: The help option for
cluvfy
will show further
details on how to use the tool:We will provide an example of using the Cluster Verification Utility to diagnose the status for post-installation of the Oracle 11g Clusterware as follows:
This tells us that we need to fix the issues with
ssh
equivalency setup before we perform the installation of
Oracle 11g Clusterware. In the following section, we will examine in more detail
these issues and other common problems with Oracle 11g Clusterware, including
resolution methods. Clusterware startup sequence for Oracle 11g R2
Understanding how the clusterware startup occurs is critical to the diagnosis and resolution of Oracle RAC problems.
In Unix and Linux operating systems, there is a master daemon process named INIT that functions to start up additional system background processes. The INIT process first spawns the init.ohasd process, which in turn starts up the Oracle High Availability Services Daemon (OHASD). In turn, the OHASD daemon then spawns additional Clusterware processes at each startup level as shown next:
Level 1—OHASD spawns:
Cssdagent: Agent responsible for spawning CSSD
Orarootagent: Agent responsible for managing all root-owned ohasd resources
Oraagent: Agent responsible for managing all Oracle-owned ohasd resources
cssdmonitor: Monitors CSSD and node health (along wth the cssdagent)
Level 2—OHASD rootagent spawns:
Cluster Ready Services Daemon (CRSD)—primary daemon responsible for managing cluster resources
Cluster Time Synchronization Services Daemon (CTSSD)
Diskmon—provides disk monitoring services
ASM Cluster File System (ACFS) Drivers
During the second level of startup for Clusterware, the oraagent spawns the following Clusterware processes for 11g R2:
MDNSD: Used for DNS lookup
GIPCD: Used for inter-process and inter-node communication
GPNPD: Grid Plug and Play Profile Daemon
EVMD: Event Monitor Daemon
ASM: Resource for monitoring ASM instances
Level 3—CRSD spawns:
orarootagent: Agent responsible for managing all root-owned CRSD resources
oraagent: Agent responsible for managing all Oracle-owned CRSD resources
Level 4—CRSD rootagent spawns:
Network resource: To monitor the public network
SCAN VIP(s): Single Client Access Name Virtual IPs
Node VIPs: One per node
ACFS Registery: For mounting ASM Cluster File system
GNS VIP (optional): VIP for GNS
During this phase for Clusterware startup with 11g R2, the oraagent spawns the following processes:
ASM Resouce: ASM Instance(s) resource
Diskgroup: Used for managing/monitoring ASM diskgroups
DB Resource: Used for monitoring and managing the DB and instances
SCAN Listener: Listener for single client access name, listening on SCAN VIP
Listener: Node listener listening on the Node VIP
Services: Used for monitoring and managing services
ONS: Oracle Notification Service
eONS: Enhanced Oracle Notification Service
GSD: For 9i backward compatibility
GNS (optional): It is a grid naming service that performs name resolution
Log file locations for Oracle 11g RAC and ASM
The important Clusterware daemon logs are located under the <GRID_HOME>/log/<nodename> directory. There are additional logfiles located under the <GRID_HOME>/log/<nodename>directory as listed next:
alert<NODENAME>.log - look here first for most clusterware issues
./admin:
./agent:
./agent/crsd:
./agent/crsd/oraagent_oracle:
./agent/crsd/ora_oc4j_type_oracle:
./agent/crsd/orarootagent_root:
./agent/ohasd:
./agent/ohasd/oraagent_oracle:
./agent/ohasd/oracssdagent_root:
./agent/ohasd/oracssdmonitor_root:
./agent/ohasd/orarootagent_root:
./client:
./crsd:
./cssd:
A daemon is a long-running background process that response for service requests. The term originated with Unix, but most operating systems use daemons in some form or another. In Unix, the names of daemons conventionally end in "d". Some examples include inetd , httpd , nfsd , sshd , named , and lpd .
How to check thecurrent state of the Oracle 11g Clusterware resources. ?
How to check the current state of the Oracle 11g Clusterware resources. ?
CRS_STAT -t .
What are frequently experienced problems as RAC DBA ?
failing, missing, or offline of Clusterware resources.
How do you ensure that all of the required Oracle 11g Clusterware processes for RAC are online and running for the Clusterware?
There are 3 commands
ps -ef|grep crsd
ps -ef|grep cssd
ps -ef|grep evmd
[oracle@sdrac01 11.1.0]$ ps -ef|grep crsd
root 2853 1 0 Apr04 ? 00:00:00
/u01/app/oracle/product/11.1.0/crs/bin/crsd.bin reboot
[oracle@sdrac01 11.1.0]$ ps -ef|grep cssd
root 2846 1 0 Apr04 ? 00:03:15 /bin/sh /etc/init.d/init.cssd fatal
root 3630 2846 0 Apr04 ? 00:00:00 /bin/sh /etc/init.d/init.cssd daemon
/u01/app/oracle/product/11.1.0/crs/bin/ocssd.bin
[oracle@sdrac01 11.1.0]$ ps -ef|grep evmd
oracle 3644 2845 0 Apr04 ? 00:00:00
/u01/app/oracle/product/11.1.0/crs/bin/evmd.bin
oracle 9595 29413 0 23:59 pts/3 00:00:00 grep evmd
Failed or corrupted vote disks will negatively impact your Oracle 11g RAC environment so what are best guideliness can be followed to avoid voting failed or corrupted ?
The following guidelines will ensure best practices for the vote disk component of the Oracle 11g Clusterware:
•Implement multiple copies of the vote disk on different disk volumes to eliminate Single Point of Failure.
•Make sure that you take regular backups for vote disks with the dd utility (Unix/Linux) or copy utility (Windows).
•If you are using the dd utility for backing up the vote disks,
there should be 4k block size on a Linux/Unix platform to ensure complete blocks are backed up for the voting disk.
For syntax on how to use the dd command to back up the vote disks, consult the Oracle Clusterware documentation and the Unix/Linux manual pages for dd.
=======================
When you may need to re-install CRS ?
Without a backup of the vote disk, you must reinstall CRS!
means if you dont have back of Vote disk then you may need to reinstall CRS.
====================
if OCR is damaged or lost due to either a disk failure or other problem, the Oracle 11g Clusterware will cease to function normally so what are the
guidelines can be followed to avoid OCR failure ?
Recommended guidelines for the OCR are :
•Maintain frequent backups of OCR on separate disk volumes to avoid Single Point of Failure whenever a change is made to the cluster resources
•Use the OCRCONFIG utility to perform recovery
•Find and maintain safe backups for the OCR
•Export the OCR whenever changes are made to cluster resources
==========
./ocrconfig -showbackup
Oracle 11g Clusterware log file analysis
Where do you get the logfiles for clusterware ?
$CRS_HOME contains logfiles for the Clusterware base directory
Where do you get the logfiles for VIP and ONS resources?
$CRS_HOME\log\nodename\racg
ASM logs are located under $ORACLE_BASE/diag/asm/+asm/<ASM Instance Name>/trace
Oracle provides a useful script named diagcollection.pl, which can be found under the <GRID_HOME>/bin directory. This script, when executed, will automatically collect important Oracle 11g Clusterware files that can be sent to Oracle support engineers for analysis. You must be logged into Linux as the root user in order to run this script.
Automatic Storage Management (ASM) simplifies the storage management for all Oracle database file types.
It renders the capabilities of a volume manager and filesystem together into the Oracle database kernel.
Although, it inherits the Stripe And Mirror Everything (SAME) functionality, it strips the data (extents)
evenly across the ASM disks of a disk group by default and provides the mirroring functionality as an option.
The management and administration of ASM is made easy through a well-known set of SQL statements, such as, CREATE, ALTER, DROP, and through GUI tools
While the ASM was initially intended for managing and maintaining only the Oracle database files and other related files,
its functionality has been significantly improved in 11g R1 and R2 versions to manage all types of data. The following are some of
the key features and benefits of ASM
It simplifies the storage configuration management for Oracle datafiles and other files.
It eliminates the need for third-party software, (for example, volume manager) to manage the storage for the databases.
When a datafile is created, it is divided into equally sized (1, 2, 4, 8, 16, 32, or 64 MB) extents that are scattered evenly across the disks of a disk group to provide balanced I/O to improve performance and prevent hot spot symptoms.
It is built on the Stripe and Mirror Everything (SAME) functionality.
It supports both non-RAC and RAC databases efficiently.
It has the ability to add and remove ASM disks online without actually disturbing the ongoing operations.
It can be managed and administrated using a set of known SQL statements.
It performs automatic online redistribution for the data whenever a disk is being added or dropped.
With ASM 11g R2, in addition to all database file types, it can also be used to store non-Oracle datafile types such as binaries, images, and so on. Beginning with ASM 11g R2, it provides the ability of a preferred read functionality, when ASM mirroring features are enabled.
It supports multiversioning of databases.
It supports a multipathing feature to prevent outages from disk path failures
Diagram A: In this diagram, an application is being connected to a database that is running on Node 1 and the database datafiles are configured on a typical filesystem storage. As summarized earlier, the filesystem is built from a Logical Volume Group (LVG) and the LVG is prepared on the shared storage. Therefore, to prepare the storage for the database, (filesystem and volume groups), you generally need a third-party tool, such as Volume Manager.
Diagram B: In this diagram, an application is being connected to a database that is running on Node 1 and the database datafiles are configured on ASM storage. ASM storage renders the capabilities of the filesystem and volume manager and manages the storage. In contrast to a filesystem, ASM storage does not require any third-party tools to manage the storage for the database and eliminates the need of building a volume group and filesystem creation. This would bypass the layers involved between the database and storage, thus improving the read performance.
ASM disk
ASM disk
A disk is a primary element of an ASM instance. A disk could be built or formed either from a Logical Unit Number (LUN) by a storage array, a disk partition or an entire disk, or a logical volume or Network Attached File (NFS). An ASM instance discovers the disks within the paths specified with the ASM_DISKSTRING initialization parameter. Whenever a new disk is discovered by the ASM instance, the header status of the disk is set to the CANDIDATE flag and makes the disk available in the instance
After the disks are successfully discovered by the local ASM instance, they will appear in the V$ASM_DISK dynamic view of the
local ASM instance and the disks are ready to use to build a new ASM disk group, or can be added to any pre-existing ASM disk groups.
However, when no particular paths for the disks are specified with the ASM_DISKSTRING initialization parameter,
ASM by default look in the following OS specific paths to discover the disks:
Operating System
Path
Linux
/dev/
HPUX
/dev/rdsk/*
AIX
/dev/*
Solaris
/dev/rdsk/*
Windows
\\.\orcldisk*
On a cluster environment, ensure that all ASM disks are visible across all nodes and each node must
have the exact set of permissions (660) and ownership (oracle:dba) to avoid running into any sorts of problems.
Oracle also strongly advises to have the same size of disks in a disk group to maintain the disk group balance.
On the other hand, you have the flexibility to define a different naming convention for a disk across the nodes in a cluster.
The following limits, as of 11g R2, have been imposed on ASM disks:
A maximum of 10,000 disks
Up to 2 TB maximum storage per ASM disk, with EXADATA 4PB per ASM disk
ASM disk group
A disk group is a logical container for one or more ASM disks and is the highest level of data structure in ASM.
When a database is configured to employ the disk group, the disk group then becomes the default location for its datafiles.
The disk group can be used to place various database file types, such as datafiles, online redo, archivelogs, RMAN backupsets,
OCR and Voting disks (in 11g R2), and more. ASM also provides the flexibility of utilizing a single disk group by multiple ASM instances
and databases across a cluster.
After a disk group is successfully created and mounted for the first time in the ASM instance, the name of the disk group is automatically affiliated with the ASM_DISKGROUPS initialization parameter to be able to mount the disk group at ASM instance restarts.
In general, when a datafile is created in a disk group, the datafile extents are striped/distributed
evenly across the available disks of the disk group. Optionally, you can also set the following specified mirroring level
at the disk group to protect the data integrity by storing redundant copies of data (extents) in a separate failure group
to cope with the disk outage symptom:
External redundancy: Relies on the STORAGE (RAID)-level mirroring redundancy option to protect the data
Normal redundancy: Provides a default two-way mirroring option
High redundancy: Provides a three-way mirroring redundancy option of ASM files
As of 11g R2, the following limits have been imposed on the ASM instance:
A maximum of 63 disk groups in a storage system
1 million files per disk group
The following diagram illustrates the structure of a disk group with three disks assigned to it:
The following diagram illustrates the hierarchal structure of a disk group when multiple databases are using it:
Staring with 10g R1 and onwards, Oracle supports two types of instances: RDBMS and ASM.
An ASM instance is a special kind of instance with only Shared Global Area (SGA) that typically consists of memory components such as Shared Pool,
Large Pool, Free Memory and ASM Cache, and a set of default background process, with some additional ASM-specific background processes.
The ASM instance doesn't hold any physical structure and the name of the instance typically starts with +ASM. The instance would be generally named as +ASMn (where n represents the instance number) in a cluster environment. The INSTANCE_TYPE initialization parameter controls the role played by these two instances.
The ASM instance configuration requires only a handful of initialization parameters. These parameters are discussed in the following section
ASM instances efficiently support both non-RAC and RAC databases.
Only one ASM instance is required per node, irrespective of the number of databases/instances running on the node.
In an RAC environment, you need to configure one ASM instance per node and these ASM instances across the cluster
communicate with each other using an interconnected network communication. The database instances interact with the ASM instance to manage the database datafiles. ASM instances typically listen on 1521 port by default.
instance_type
Defines the type of the instance, such as RDBMS and ASM. However, this has been made optional in an Oracle Grid Infrastructure ASM.
asm_diskstring :
Used by the ASM instance to identify and discover the disks mentioned in the paths. Once the disks are discovered,
they will appear in the V$ASM_DISK dynamic view. The disk discovery occurs when an ASM instance is initiated,
when you issue a query against the V$ASM_DISK/V$ASM_DISKGROUP dynamic views, or when you MOUNT, UNMOUNT, RESIZE, ADD a disk.
It is a dynamic parameter and you can specify multiple paths within this parameter.
asm_diskgroups
A dynamic parameter that holds the list of the disk group names that are created and mounted in an ASM instance.
These disk groups are set to mount automatically at ASM instance startup. Whenever you successfully create or drop a disk group,
the change will reflect to this parameter automatically and influence the subsequent instance start-up.
asm_power_limit
Manages the degree of parallelism to speed up the ASM disk rebalance operations, for example, whenever a disk is being dropped from
an existing disk group or when the disk group rebalance is initiated manually.
This is a dynamic parameter that can be set in the range from 0 to 11 (1024 in 11gR2 and above).
Considering the size of a disk group, you may increase the limit of the POWER to speed up the rebalancing operation.
Multiple ASM instances can hold the different values across a cluster. When no limit is specified,
it uses the default value for the rebalancing operation.
processes
Apart from the SGA initialization parameter value, the PROCESSES initialization parameter value has some influence over the ASM instance. Therefore, you may use the following formula to tune the PROCESSES initialization parameter when multiple database instances are accessing the instance:
Processes = 50+50*n (where n indicates the number of instances used to connect to the ASM instance)
ASMB
ASMB exists in both typical database instances and ASM instances and is responsible for receiving an extent map for the new file.
RBAL
Rebalance Master process exists in databases and ASM. In databases, RBAL manages ASM disk group. In an ASM instance, RBAL coordinates disk group rebalance activity. RBAL also assists in opening all device files as part of the discovery operation.
GMON
ASM Disk group Monitor Process monitors all the mounted disk groups and is responsible for maintaining consistent disk membership and status information.
PZ9n
Parallel Slave Processes are used to fetch data from GV$ dynamic view in a cluster
ASM dynamic views
To manage and supervise the ASM instance and its primary components (disk and disk group) effectively, you really need to know the ASM specific dynamic views, and how to map them to extract useful information about disks, disk groups, and so on. This section will help you to understand the use of the ASM specific dynamic views available in ASM.
There are about 19 dynamic views available, as of 11g R2, and each dynamic view provides different helpful information. All the ASM dynamic views are predefined with V$ASM_. In the following section, we are going to focus on a handful of ASM dynamic views.
V$ASM_DISK
When an ASM instance completes the disk discovery operation by reading the disk header information, all disks (used and usable) will then list in the V$ASM_DISK view. Each individual disk has a row in the V$ASM_DISK dynamic view and contains very useful information. The PATH column specifies the disk's name and location. The HEADER_STATUS column, in most cases, contains the following three possible values:
CANDIDATE: Indicates that the unused disks are ready for use.
FORMER: Indicates that the disk was formerly part of a disk group and is now ready for use.
MEMBER: Indicates that the disk is currently part of an active disk group.
Apart from the preceding values, the view also contains other useful information about the disks, such as total size, free size, physical reads, redundancy level, and so on. On the flipside, every time you run a query against this view, ASM initiates disk discovery operations for the new disks, where it reads all disk header information. Querying against this view could be an expensive operation at times, and could impact performance.
The following list of SQL statements demonstrates some of the useful queries against the view. However, prior to running these commands, ensure you are connected to an ASM instance through sqlplus with SYSASM privilege:
SELECT path,header_status,total_mb
FROM v$asm_disk WHERE header_status ORDER BY header_status;
The preceding command displays information about all the disks.
SELECT path,header_status,total_mb,
FROM v$asm_disk WHERE header_status in ('CANDIDATE','FORMER','PROVISIONED');
The preceding command displays information about the disks that are eligible to use.
V$ASM_DISKGROUP
After a disk group is successfully created in the local ASM instance, the disk group summary is visible in the V$ASM_DISKGROUP view. Each disk group maintains a row in the view along with the important information, such as disk group number and name, total disk group size, used space, free space, redundancy type, compatibility, mount state, and so on. Every time a query is run against the view, it is likely to have a similar impact to querying the V$ASM_DISK views. The following SQL command extracts the mounted disk group's name, total disk group size, and the free space left in the group:
SELECT name,state,total_mb,usable_file_mb FROM v$asm_diskgroup;
V$ASM_OPERATION
V$ASM_OPERATION is one of the useful views that displays a row for each long-running operation in the ASM instance. For example, when a disk is being dropped or attached to an existing disk group, an ASM should initiate and complete the rebalancing operations just before releasing the subject disk. Therefore, the view will present useful details, such as the amount of work that has been completed, and show the estimated time (in minutes) required to complete the operations. This should help you to understand how long the operation will take to complete. The following SQL command produces the ongoing long-running operations in the ASM instance:
SELECT * FROM v$asm_operation;
V$ASM_DISK_STAT
Although the V$ASM_DISK and V$ASM_DISK_STAT views display nearly identical information, querying the V$ASM_DISK_STAT view results is a less expensive operation in comparison to the V$ASM_DISK view. On the flip side, this view doesn't display the details about new disks on the system that the ASM instance has yet to discover. As querying the view is less expensive, it is strongly recommended that you use this view in order to display the information and statistics (read/write) about the existing disks.
V$ASM_DISKGROUP_STAT
The V$ASM_DISKGROUP_STAT view displays statistical information about the mounted disk groups in the ASM instance. Unlike the V$ASM_DISKGROUP view, a query against this view doesn't result in new disk discovery operations but is less expensive in terms of performance. Therefore, it is recommended to use this view to display existing disk group information and statistical information about the disk groups.
V$ASM_CLIENT
When the V$ASM_CLIENT view is queried in the ASM instance, it displays the information about the database instances that are using the disk groups mounted and managed by the ASM instance.
ASM instance startup/shutdown
Managing an ASM instance is no different from managing the typical RDBMS database instances. The ASM instance could be managed by either using a set of SQLPLUS commands or the cluster aware SRVCTL utility. Nevertheless, it is strongly recommended that you use the SRVCTL utility for managing the (start/stop) ASM instance in an RAC environment.
The ASM instance can be opened either in NOMOUNT, MOUNT, or RESTRICTED modes with the STARTUP command at the SQLPLUS prompt. When you have a planned maintenance on an ASM instance, you can open the ASM instance in a RESTRICT mode to avoid any possible connections from the database instances. When the ASM instance is opened gracefully, it first discovers the disks and then mounts all the existing disk groups on the local instance.
To shut down the local ASM instance, you can use the various options available with the SHUTDOWN command in the SQLPLUS prompt. The supported options are NORMAL, IMMEDIATE, TRANSACTIONAL, and ABORT. As mentioned previously, you can use the SRVCTL utility to bring down the ASM instance as well. The following list of examples demonstrates how to start up/shut down an ASM instance using SQLPLUS and SRVCTL utilities:
srvctl stop asm –n raclinux1 –o normal:immediate:transactional:abort
export ORACLE_SID=+ASM1
export ORACLE_HOME=$ASM_HOME (in 11gR1)
export ORACLE_HOME=$ORA_GRID_HOME (in 11gR2)
sqlplus / as sysasm
SQL> SHUTDOWN NORMAL:IMMEDIATE:TRANSACTIONAL:ABORT
This example stops the ASM instance on raclinux1 node. Alternatively, you can also use either of the shutdown options.
srvctl start asm –n raclinux1 –o nomount:mount:restrict
export ORACLE_SID=+ASM1
export ORACLE_HOME=$ASM_HOME (in 11gR1)
export ORACLE_HOME=$ORA_GRID_HOME (in 11gR2)
sqlplus / as sysasm
SQL> STARTUP NOMOUNT:MOUNT:RESTRICT
This startup command starts up the ASM instance on raclinux1 node. When you start the instance in NOMOUNT mode, an ASM instance will be started without mounting the existing disk groups. When the instance is started in RESTRICT mode, no database instance can attach to the ASM instance and all the disk groups are opened in restricted mode too.
Ensure that the database instances that are currently associated with the local ASM instance are stopped prior to shutting down the local ASM instance to avoid encountering an ASM instance shutdown error. In this case, the ASM instance will remain opened. Alternatively, you could use the ABORT option to forcefully shut down the currently connected database's instance before shutting down the ASM instance. It is also strongly recommended to dismount any existing Oracle Cluster File System (ACFS) to avoid any application I/O errors.
Note
Note: If the voting disk and OCR files are placed in a disk group, you will not be able to stop the ASM instance. In order to stop the ASM instance, you need to stop the cluster.
ASM disk group administration
In this section, we are going to focus on the available methods to create and manage an ASM disk group. In this context, we will explain how to create an ASM disk group using the various available mirroring options, such as ASM and external mirroring options. We will also summarize how to modify existing disk group parameters and how to drop a disk group with various options.
Creating a disk group
In general, once an ASM instance completes the ASM disk's discovery operation, you can then use the ASM disks to either build a disk group or add it to a pre-existing disk group. You need at least one eligible ASM disk (with HEADER_STATUS either CANDIDATE, FORMER, or PROVISIONED) to be able to build a disk group or to add to a pre-existing disk group. There are various methods to create a disk group, such as, DBCA (in pre 11g R2), ASMCA (with 11g R2), Grid Control, and CREATE DISKGROUP SQL statement in the SQLPLUS prompt. Although the easiest and most convenient way to build and manage a disk group is to use the GUI tools such as DBCA, ASMCA, or Grid Control, we are going to demonstrate how to create and manage a disk group using a set of SQL statements.
In order to create a disk group on the local ASM instance, you first need to identify the eligible ASM disks discovered by the instance. The following SQL statements are useful to list the eligible ASM disks:
export ORACLE_SID=+ASM1
export ORACLE_HOME=$ASM_HOME (in 11gR1)
export ORACLE_HOME=$ORA_GRID_HOME (in 11gR2)
SQL> SELECT path,header_status,mode_status,total_mb
FROM v$asm_disk
WHERE header_status IN ('CANDIDATE','FORMER','PROVISIONED');
The query lists each disk's information along with the path, the header status, and size of the disk. Once you list the disks, you can use the following set of SQL statements to create a new disk group with different levels of mirroring options.
The following SQL statement creates a new disk group named DATA with one ASM disk, sde1 located under the /dev/ location. The EXTERNAL REDUNDANCY clause in the SQL statement indicates that you are relying on the STORAGE-level mirroring (protection) option, not using the Oracle-provided mirroring level:
CREATE DISKGROUP data EXTERNAL REDUNDANCY DISK '/dev/sde1';
The following SQL statement creates a new disk group named DATA that consists of two failure groups with one disk to each failure group, using the Oracle-provided NORMAL redundancy (a two-way mirroring) level:
CREATE DISKGROUP data NORMAL REDUNDANCY
FAILGROUP fgp1 DISK '/dev/sde1',
FAILGROUP fgp2 DISK '/dev/sdf1';
The following SQL statement creates a new disk group named DATA with three failure groups with one disk to each failure group, using the Oracle-provided highest level of redundancy, a three-way mirroring-level option:
CREATE DISKGROUP data HIGH REDUNDANCY
FAILGROUP fgp1 DISK '/dev/sde1',
FAILGROUP fgp2 DISK '/dev/sdf1',
FAILGROUP fgp3 DISK '/dev/sdg1';
Note
Note: Failure groups are used to copy the redundant copies of every extent.
When the mirroring option is skipped, ASM applies the NORMAL REDUNDANCY (a two-way mirroring) level by default.
After a disk group is successfully built, it will then automatically mount in the local instance. If a server parameter file is being used (SPFILE), the name of the disk group is successfully added to the ASM_DISKGROUP initialization parameter in order to mount the disk group automatically on ASM instance restarts. In order to make the disk group available on other ASM instances in a cluster, you simply need to mount the disk group running the ALTER DISKGROUP data MOUNT statement (ensure the same set of disks are accessible on the other nodes).
Altering a disk group
One of the prime advantages of using ASM is the ability to manage pre-existing disk groups without actually interrupting the database's ongoing operations. In other words, you can manage the disk group tasks online, where you can dynamically add and drop a disk from a pre-existing disk group at any given time without requiring any database downtime.
The following list of SQL statements (valid only in the ASM instance) demonstrates how to add an ASM disk to a pre-existing disk group:
ALTER DISKGROUP data ADD DISK '/dev/sdf1';
ALTER DISKGROUP data ADD DISK '/dev/sdf1','/dev/sdg2'
REBALANCE POWER 3;
The first statement adds a disk to the DATA disk group and the second statement adds two disks to the DATA disk group with rebalancing power 3. The REBALANCE POWER clause helps to speed up the rebalancing operation with the degree of parallelism.
The following list of SQL statements (valid only in the ASM instance) demonstrates how to drop an ASM disk from an existing disk group.
You can get the name of the disks associated with the DATA disk group using the following SQL statement:
export ORACLE_SID=+ASM1 – assuming that we are logging in first ASM instance.
export ORACLE_HOME=$ASM_HOME (in 11gR1)
export ORACLE_HOME=$ORA_GRID_HOME (in 11gR2)
SQL> SELECT disk_number,name FROM v$asm_disk WHERE group_number = (SELECT group_number FROM v$asm_diskgroup WHERE NAME = 'DATA');
Once the disk names are identified, use the following SQL statements to drop a disk from an existing disk group DATA:
ALTER DISKGROUP data DROP DISK '/dev/sdf1';
ALTER DISKGROUP data DROP DISK 'DATA_0001'
REBALANCE POWER 3;
While the disk is being dropped from a disk group, you can measure the time left to finish the task using the V$ASM_OPERATION dynamic view. The EST_MINUTES column of the view will tell you the estimated amount of time (in minutes) left to finish the ongoing operation.
Additionally, while the disk drop operation for a disk group is running, at any given time you can cancel all the pending drop operations of the disk group using the following SQL statement:
ALTER DISKGROUP data UNDROP DISKS;
However, you cannot recover an already dropped disk, or the disks that are being dropped using the FORCE clause.
Dropping a disk group
In this section, we will explore a set of SQL statements that will help you to drop a pre-existing disk group and its associated files. Ensure the disk group is mounted on the local ASM instance, from where you are going to run the DROP DISKGROUP command. The disk group shouldn't be mounted on any other ASM instance. If it is, dismount the disk group on the other ASM instances first, or use the FORCE clause to bypass the verification of the disk group being used on other ASM instances.
The following SQL statement drops a disk group DATA:
DROP DISKGROUP data;
DROP DISKGROUP data FORCE;
The following SQL statement drops a disk group DATA and all its associated files:
DROP DISKGROUP data INCLUDING CONTENTS;
After dropping a disk group successfully, ASM then rewrites the header by removing the ASM formatting information of each of the disks associated with the disk group to make the disks available for reuse. The header status of the disks will be subsequently set to the FORMER state
You can create an ASM instance initially using various methods: manual, interactive GUI tools such as DBCA (in 11g R1), ASMCA (from 11g R2 onwards), and Grid Control. In the following section, we are going to exhibit the ASM instance configuration using the DBCA tool for Oracle 11g R1. Then we will cover how to configure the ASM instance using the ASMCA tool.
The following procedure explains the steps that are involved in creating an ASM instance using the DBCA tool in 11g R1:
the operating system will spawn logfiles called message files .
Message files are the operating system logfiles that are generated on a regular basis as part of the operating system functions.
These can be viewed with your favorite editor such as the vi or Emacs editor in Linux and/or Unix.
•Sun: /var/adm/messages
•HP-UX: /var/adm/syslog/syslog.log
•Tru64: /var/adm/messages
•Linux: /var/log/messages
•IBM: /bin/errpt -a > messages.out
WHere the clusterware log files exist for clusterware ?
•11.1 and 10.2: <CRS_HOME>/log/<node name>/cssd
•10.1: <CRS_HOME>/css/log
WHat is OPROCD ? where log files exist ?
/etc/oracle/oprocd or /var/opt/oracle/oprocd
Clusterware log and trace files are located
if 10.2 and above then it's
<CRS_HOME>/log.
if it's 10.1
<CRS_HOME>/crs/log
<CRS_HOME>/crs/init
<CRS_HOME>/css/log
<CRS_HOME>/css/init
<CRS_HOME>/evm/log
<CRS_HOME>/evm/init
<CRS_HOME>/srvm/log
what is server control utlity ?
The Server Control Utility (SRVCTL), srvctl, is a cluster command-line utility that is installed by default on all nodes and is used to administer and manage the RAC database and its associated instances for operations such as start and stop, enable and disable, moving a database and instances across nodes, and adding and removing instances/database. When srvctl is used for some of the operations such as add, remove, enable, disable, and move a database and its instances, the information is stored in the Oracle Cluster Registry.
However, the start and stop operations of a database and instances are done with the cooperation of the Cluster Ready Service Daemon process (CRSD) in the cluster environment.
how to check on which nodes the RAC database instances are configured on and where the instances are running:
[oracle@raclinux]srvctl status database -d racdb
instance racdb1 is running on node raclinux1
how to start and stop rac database?
srvctl stop database -d RACDB
srvctl start database -d RACDB
how to start and stop rac database instance?
srvctl start instance -d racdb i racdb1
srvctl stop instance -d racdb i racdb1
Use the server control utility (
srvctl
) to query the database configuration and status with the following example: As of Oracle 11g R2, the
srvctl config
command produces more useful information about the database such as database name, domain, spfile location, and Disk Group used in this database. Use the following sample command:srvctl config database -d RACDB
Database unique name: RACDB
Database name: RACDB
Oracle home: /u01/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile: +DATA/RACDB/spfileRACDB.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: RACDB
Database instances: RACDB1
Disk Groups: DATA
Services:
Database is administrator managed
What are the important initialization parameters that must have a unique value across all instances of an RAC database?
INSTANCE_NAME
INSTANCE_NUMBER
UNDO_TABLESPACE
THREAD
What are important initialization parameters that must have the same values across all the instances of an RAC database: ?
ACTIVE_INSTANCE_COUNT
CLUSTER_DATABASE
CLUSTER_DATABASE_INSTANCES
CONTROL_FILES
COMPATIBLE
DB_NAME
DB_UNIQUE_NAME
DB_BLOCK_SIZE
DB_RECOVERY_FILE_DEST
DB_RECOVERY_FILE_DEST_SIZE
INSTANCE_TYPE
RESULT_CACHE_MAX_SIZE
REMOTE_LOGIN_PASSWORDFILE
UNDO_MANAGEMENT
MEMORY_MAX_TARGET: Defines the maximum limit of SGA and PGA size for this Oracle instance. You cannot change the value to this parameter dynamically.
•MEMORY_TARGET: Specifies the amount of shared memory allocated at instance startup. Oracle dynamically manages the SGA plus PGA values. Unlike the MEMORY_MAX_TARGET parameter, it is a dynamic parameter and it can be increased or decreased provided that its value doesn't exceed the value of the MEMORY_MAX_TARGET parameter.
Use the following SQL command to find out the current values of AMM parameters on this instance:
SELECT name,value/1024/1024 size_in_mb FROM v$parameter where NAME in ('memory_max_target','memory_target');
NAME SIZE_IN_MB
---------------------------------------- ------------------------------
memory_max_target 404
memory_target 404
When the MEMORY_MAX_TARGET initialization parameter is unset, the database automatically sets its value equal to MEMORY_TARGET value. You can easily disable this feature by setting the MEMORY_TARGET initialization parameter value to 0.
You can use the following command to disable the AMM feature dynamically:
alter system set MEMORY_TARGET=0 scope=both sid='*';
Note
The value sid='*' indicates that the change should apply to all the instances of this database.
The following sample command is used to stop all the services that are part of RACDB database:
SRVCTL ADD SERVICE syntax and options
Using the following commands, a particular service can be started and stopped on a particular instance:
SRVCTL ADD SERVICE syntax and options
SRVCTL ADD SERVICE syntax and options
Transparent Application Failover
When a RAC database instance crashes due to a technical or non-technical reason and the Transparent Application Failover TAF policy is set,( the TAF policy will re-establish ) then lost user connections get re-established on anyone of the surviving RAC database instances.
(In the event of TAF being configured, active transactions are rolled back and the client connection re-establishes to another surviving node, allowing the user to continue their work with minimal interruption.)
As of now, the TAF policy supports two types of failover methods—
In The
PRECONNECT method supports two failover types
—SESSION and SELECT.
BASIC
and PRECONNECT
.In The
BASIC
method configuration method , lost use connections get established during failover time. With the PRECONNECT
method configuration, a shadow connection will be created on another available instance anticipating the failover.PRECONNECT method supports two failover types
—SESSION and SELECT.
In The SESSION method configuration , lost connection gets re-established on another suviving node , but all previously running queries will be cancelled.
In SELECT method configuration , in addition to re-establishing the lost user connection on a surviving instance, it also replays the queries that were in progress.
In any failover type configuration, the uncommitted transactions will be rolled back.
In SELECT method configuration , in addition to re-establishing the lost user connection on a surviving instance, it also replays the queries that were in progress.
In any failover type configuration, the uncommitted transactions will be rolled back.
anticipate
anĖtÉŖsÉŖpeÉŖt/
verb
gerund or present participle: anticipating
- 2.act as a forerunner or precursor of."he anticipated Bates's theories on mimicry and protective coloration"
synonyms: foreshadow, precede, antedate, come/go before, be earlier than
"she wrote plays for all-women casts, which anticipated her film work"
Parameter
Valuanticipate
anĖtÉŖsÉŖpeÉŖt/
verb
gerund or present participle: anticipating
- 2.act as a forerunner or precursor of."he anticipated Bates's theories on mimicry and protective coloration"
synonyms: foreshadow, precede, antedate, come/go before, be earlier than
"she wrote plays for all-women casts, which anticipated her film work"
Description
TYPE
Session
When a user connection is lost due to an instance crash, a new session is automatically established on a surviving instance. This type of failover does not support replay of the queries that were in progress.
Select
Re-establishes the lost user connection on a surviving instance, and replays the queries that were in progress.
None
Is the default mode without failover functionality.
METHOD
Basic
Re-establishes the lost user connections at failover time. Doesn't require much work on the backup server until failover time.
Preconnect
Pre-establishes the connection on another instance to provide rapid failover facility.
DELAY
Specifies the amount of time (in seconds) to wait between connect attempts.
RETRIES
Specifies the number of re-attempts to connect after a failover.
Once the TAF policies are set and connections are established in the instance using these policies, you can obtain the TAF policy details of the connections querying the v$session view in the database using the following SQL statement:
SELECT machine,failover_type,failover_method,failed_over
FROM v$session
The TAF can be used only with applications and interfaces that have OCI support.
The TAF policy doesn't go well with JDBC connections. To configure TAF with JDBC connections, you need to implement Fast Connection Fallover (FCF).
Establish :
set up, start, initiate, institute, form, found, create, inaugurate, build, construct, install
Surviving :
synonyms: remain alive, live, sustain oneself, pull through, get through, hold on/out, make it, keep
anticipate
expect, foresee, predict, be prepared for, bargain on, reckon on, figure on
How do we know which database instances are part of a RAC cluster?
You can query the V$ACTIVE_INSTANCES view to determine the member instances of the RAC cluster.
What is a VIP in RAC use for?
The VIP is an alternate Virtual IP address assigned to each node in a cluster. During a node failure the VIP of the failed node moves to the surviving node and
relays to the application that the node has gone down.
Without VIP, the application will wait for TCP timeout and then find out that the session is no longer live due to the failure.
What would be the possible performance impact in a cluster if a less powerful node (e.g. slower CPU’s) is added to the cluster?
All processing will show down to the CPU speed of the slowest server.
How do you backup ASM Metadata?
You can use md_backup to restore the ASM diskgroup configuration in-case of ASM diskgroup storage loss
What files can be stored in the ASM diskgroup?
In 11g the following files can be stored in ASM diskgroups.
•Datafiles
•Redo logfiles
•Spfiles
In 12c the files below can also new be stored in the ASM Diskgroup
•Password file
What components of the Grid should I back up?
The backups should include OLR, OCR and ASM Metadata.
Is there an easy way to verify the inventory for all remote nodes
You can run the opatch lsinventory -all_nodes command from a single node to look at the inventory details for all nodes in the cluster.
How do you find out what object has its blocks being shipped across the instance the most?
You can use the dba_hist_seg_stats.
How do you find out what OCR backups are available?
The ocrconfig -showbackup can be run to find out the automatic and manually run backups.
Where does the Clusterware write when there is a network or Storage missed heartbeat?
The network ping failure is written in $CRS_HOME/log
What is the interconnect used for?
What is the difference between Crash recovery and Instance recovery?
When an instance crashes in a single node database on startup a crash recovery takes place.
In a RAC enviornment the same recovery for an instance is performed by the surviving nodes called Instance recovery.
What are the important initialization parameters that must have a unique value across all instances of an RAC database?
INSTANCE_NAME
INSTANCE_NUMBER
UNDO_TABLESPACE
THREAD
What are important initialization parameters that must have the same values across all the instances of an RAC database: ?
ACTIVE_INSTANCE_COUNT
CLUSTER_DATABASE
CLUSTER_DATABASE_INSTANCES
CONTROL_FILES
COMPATIBLE
DB_NAME
DB_UNIQUE_NAME
DB_BLOCK_SIZE
DB_RECOVERY_FILE_DEST
DB_RECOVERY_FILE_DEST_SIZE
INSTANCE_TYPE
RESULT_CACHE_MAX_SIZE
REMOTE_LOGIN_PASSWORDFILE
UNDO_MANAGEMENT
MEMORY_MAX_TARGET: Defines the maximum limit of SGA and PGA size for this Oracle instance. You cannot change the value to this parameter dynamically.
•MEMORY_TARGET: Specifies the amount of shared memory allocated at instance startup. Oracle dynamically manages the SGA plus PGA values. Unlike the MEMORY_MAX_TARGET parameter, it is a dynamic parameter and it can be increased or decreased provided that its value doesn't exceed the value of the MEMORY_MAX_TARGET parameter.
Use the following SQL command to find out the current values of AMM parameters on this instance:
SELECT name,value/1024/1024 size_in_mb FROM v$parameter where NAME in ('memory_max_target','memory_target');
NAME SIZE_IN_MB
---------------------------------------- ------------------------------
memory_max_target 404
memory_target 404
When the MEMORY_MAX_TARGET initialization parameter is unset, the database automatically sets its value equal to MEMORY_TARGET value. You can easily disable this feature by setting the MEMORY_TARGET initialization parameter value to 0.
You can use the following command to disable the AMM feature dynamically:
alter system set MEMORY_TARGET=0 scope=both sid='*';
Note
The value sid='*' indicates that the change should apply to all the instances of this database.
========================
Backing Up Voting Disks
Because the node membership information does not usually change, you do not need to back up the voting disk every day. However, back up the voting disks at the following times:
•After installation
•After adding nodes to or deleting nodes from the cluster
•After performing voting disk add or delete operations
dd if=voting_disk_name of=backup_file_name
If your voting disk is stored on a raw device, use the device name in place of voting_disk_name. For example:
dd if=/dev/sdd1 of=/tmp/voting.dmp
When you use the dd command for making backups of the voting disk, the backup can be performed while the Cluster Ready Services (CRS) process is active;
you do not need to stop the crsd.bin process before taking a backup of the voting disk.
Recovering Voting Disks
If a voting disk is damaged, and no longer usable by Oracle Clusterware, you can recover the voting disk if you have a backup file. Run the following command to recover a voting disk where backup_file_name
is the name of the voting disk backup file and voting_disk_name is the name of the active voting disk:
dd if=backup_file_name of=voting_disk_name
Adding and Removing Voting Disks
To add or remove a voting disk, first shut down Oracle Clusterware on all nodes,
then use the following commands as the root user, where path is the fully qualified path for the additional voting disk.
If the new voting disk is stored on a network file server (NFS), then create an empty voting disk file location with the
correct owner and permissions before running this command.
To add a voting disk:
crsctl add css votedisk path
To remove a voting disk:
crsctl delete css votedisk path
Backing Up and Recovering the Oracle Cluster Registry
Oracle Clusterware automatically creates OCR backups every 4 hours.
At any one time, Oracle Clusterware always retains the latest 3 backup copies of the OCR that are 4 hours old, 1 day old, and 1 week old.
The default location for generating backups on Red Hat Linux systems is CRS_home/cdata/cluster_name where cluster_name is
the name of your cluster and CRS_home is the home directory of your Oracle Clusterware installation.
Viewing Available OCR Backups
ocrconfig -showbackup
Because of the importance of OCR information, Oracle recommends that you use the ocrconfig tool to make copies of the automatically created backup files at least once a day.
In addition to using the automatically created OCR backup files, you should also export the OCR contents to a file before and after making significant configuration changes, such as adding or deleting nodes from your environment, modifying Oracle Clusterware resources, or creating a database. Exporting the OCR contents to a file lets you restore the OCR if your configuration changes cause errors. For example, if you have unresolvable configuration problems, or if you are unable to restart your cluster database after such changes, then you can restore your configuration by importing the saved OCR content from the valid configuration.
To export the contents of the OCR to a file, use the following command, where backup_file_name is the name of the OCR backup file you want to create:
ocrconfig -export backup_file_name
What are daily activities ?
Ensuring that Primary and standby databases are in sync or not
checking tablespace utilization , if any tablespaces reach more than 80% then adding datafiles to it.
Checking RMAN backup status , OCR and VOTING DISK backups.
Exporting and importing tables .
I have done 9i database cloning.
I have applied patches on both standalone and standby databases.
Configured Netbackup client on database side to take backups to HYDRA storage.
I have worked on database SWITCH OVER activities when there is a OS maintaince activities.
Identifying Blocking session. taking neccessary actions .
Identifying HUng session taking neccesary actions .
Monitoring undo usage and temp usage , if any queries using maximum undo or temp then idenitifing those query and sending to APPLICATION team.
User creation and assigning privileges.
Refreshing Materialized views
if any huge data to be deleted , then if we use delete command then it takes long time and undo utilization run out of space so in that situation I was taking table backup using export and importing only data that is required.
Resloving User connectiviy issues.
I have configured connection from MS-ACCESS to oracle database via ODBC
Generating EXplain plan.
Generated AWR REPORT , ASH REPORT and ADDM report.
When batch process are taking very long time , then taking trace file of session.
performing gather statistics on table which are not upto to date.
Exporting and importing tables .
1)checking tablespace utilization , if any tablespaces reach more than 80% then adding datafiles to it.
2)Checking RMAN backup status , OCR and VOTING DISK backups.
3)I have done 9i database cloning.
cloning ge 2 db beke beku so nin standby and primary anta anko
4)I have applied patches on both standalone and standby databases.
5)Ensuring that Primary and standby databases are in sync or not
6)I have worked on database SWITCH OVER activities when there is a OS maintaince activities.
7)Resloving User connectiviy issues.
8)User creation and assigning privileges.
9)Identifying Blocking session. taking neccessary actions .
10)Identifying HUng session taking neccesary actions .
11)Monitoring undo usage and temp usage , if any queries using maximum undo or temp then idenitifing those query and sending to APPLICATION team.
12)if any huge data to be deleted , then if we use delete command then it takes long time and undo utilization run out of space so in that situation
I was taking table backup using export and importing only data that is required.
13)Refreshing Materialized views
14)When batch process are taking very long time , then taking trace file of session.
15)performing gather statistics on table which are not upto to date.
16)Generating EXplain plan.
17)Generated AWR REPORT , ASH REPORT and ADDM report.
18)Configured Netbackup client on database side to take backups to HYDRA storage.
19)I have configured connection from MS-ACCESS to oracle database via ODBC
20) Changing intialization parameter
21)Tuning memory components.
22) DB LINK creation.
8850
getting around should never be expensive.......
Types of Standby Databases.
Primary and standby databases intialization parameter.
if Password file changed between databases then how to resolve that issue.
==============
Standby database is block-by-block copy of the primary database . It uses redo apply services to sync standby database with primary database.
Logical Standby database : here redo data is first converted into SQL statements
and then applied to the standby database. This process is called SQL Apply.
and allows both read/write while redo is being applied. Thus, you can also create database objects on the standby database
that don't exist on the primary database.
Disadvantage is
Logical standby database doesn't support some datatypes to be replicated in a logical standby environment:
BFILE
Collections (including VARRAYS and nested tables)
Multimedia data types (including Spatial, Image, and Oracle Text)
ROWID and UROWID
User-defined types
Hence The logical standby database doesn't guarantee to contain all primary data because of the unsupported data types,
objects, and DDLs. Also, SQL Apply consumes more hardware resources. Therefore, it certainly brings more performance issues and
administrative complexities than Redo Apply.
Snapshot standby database :
When you want do some tests or change the data of the database then physical standby can be converted into snapshot
standby database so that write operation can be done the database but the disadvantage is redo will recevied and archived at standby database but doesnt get applied
When you're finished with the snapshot standby database, it's possible to reverse all the changes made to the database and
turn it back to a physical standby again then redo data received from the primary will be applied.
Apply services.
Redo Apply keeps a block-by-block copy of the primary database. By default, Redo Apply automatically runs a parallel apply processes,
which is equal to the number of CPUs of the standby database server minus one. These parallel recovery processes are controlled by the MRP process,
which is the background process responsible for the applying redo data.
Redo Apply has the following benefits for its users:
it supports all data types
Redo Apply has higher performance when compared with SQL Apply or any other replication solutions
It offers simple management by keeping the database structure exactly the same as the primary database with its fully automated architecture
It's possible to take advantages of Active Data Guard and snapshot standby for reporting and testing
Backups taken from physical standby databases are ready to be restored to primary. So we can offload the backup from primary
Redo Apply offers a strong corruption detection and prevention mechanism.
It's possible to use physical standby databases for the rolling upgrades of the database software, which is known as transient logical standby
The real-time apply feature applies the redo as it's received. This feature makes it possible to query real-time or near real-time data from
the standby database
By offering these features, Redo Apply (physical standby database) has become a very popular and widely used-technology for the high availability
and disaster recovery of Oracle databases.
How to get the information of redo data generated per second ?
in load profile of AWR report , there is a name like redo size per second and redo size per transaction. you have to consider redo size per transaction
and also you can get redo generated from per second using instance stats activity of AWR report.
Once you get this information you can use the information to get required bandwidth.
Required bandwidth (Mbps) = ((Redo rate bytes per sec. / 0.7) * 8) / 1,000,000
Preparing the primary database.
Primary database should be archivelog mode.
how to check whether database is in archive log mode or not
archive log list
if primary database is not in archive log mode then convert the database to archive log mode
shutdown the database
startup the database in mount mode
alter database archive log
open the database
then check if database is in mount stage or not.
Questions
1)what is oracle server ?
2)what is oracle instance ?
3)what is SGA ? and what is it consist of ?
4)what is redolog buffer ?
5)what happens when commit complete?
6)what is purpose of redolog buffer and database buffer cache ?
1)what are the types of standby databases ?
2)What is physical standby database ?
3)what is logical standby database ? what is advantage and disadvantage ?
4)what is snapshot standby database ? what is advantage and disadvantage ?
5)what are types of apply services ?
6)what is redo apply services ?
7)what is sql apply services ?
How to get the information of redo data generated per second ?
crsctl query css votedisk
which whether votedisk is online or not , file id of vote disk , diskgroup which belongs to and file name
if you press asmca in cmd prompt , a graphical tool get opened.
8850
getting around should never be expensive.......
Types of Standby Databases.
Primary and standby databases intialization parameter.
if Password file changed between databases then how to resolve that issue.
==============
Standby database is block-by-block copy of the primary database . It uses redo apply services to sync standby database with primary database.
Logical Standby database : here redo data is first converted into SQL statements
and then applied to the standby database. This process is called SQL Apply.
and allows both read/write while redo is being applied. Thus, you can also create database objects on the standby database
that don't exist on the primary database.
Disadvantage is
Logical standby database doesn't support some datatypes to be replicated in a logical standby environment:
BFILE
Collections (including VARRAYS and nested tables)
Multimedia data types (including Spatial, Image, and Oracle Text)
ROWID and UROWID
User-defined types
Hence The logical standby database doesn't guarantee to contain all primary data because of the unsupported data types,
objects, and DDLs. Also, SQL Apply consumes more hardware resources. Therefore, it certainly brings more performance issues and
administrative complexities than Redo Apply.
Snapshot standby database :
When you want do some tests or change the data of the database then physical standby can be converted into snapshot
standby database so that write operation can be done the database but the disadvantage is redo will recevied and archived at standby database but doesnt get applied
When you're finished with the snapshot standby database, it's possible to reverse all the changes made to the database and
turn it back to a physical standby again then redo data received from the primary will be applied.
Apply services.
Redo Apply keeps a block-by-block copy of the primary database. By default, Redo Apply automatically runs a parallel apply processes,
which is equal to the number of CPUs of the standby database server minus one. These parallel recovery processes are controlled by the MRP process,
which is the background process responsible for the applying redo data.
Redo Apply has the following benefits for its users:
it supports all data types
Redo Apply has higher performance when compared with SQL Apply or any other replication solutions
It offers simple management by keeping the database structure exactly the same as the primary database with its fully automated architecture
It's possible to take advantages of Active Data Guard and snapshot standby for reporting and testing
Backups taken from physical standby databases are ready to be restored to primary. So we can offload the backup from primary
Redo Apply offers a strong corruption detection and prevention mechanism.
It's possible to use physical standby databases for the rolling upgrades of the database software, which is known as transient logical standby
The real-time apply feature applies the redo as it's received. This feature makes it possible to query real-time or near real-time data from
the standby database
By offering these features, Redo Apply (physical standby database) has become a very popular and widely used-technology for the high availability
and disaster recovery of Oracle databases.
How to get the information of redo data generated per second ?
in load profile of AWR report , there is a name like redo size per second and redo size per transaction. you have to consider redo size per transaction
and also you can get redo generated from per second using instance stats activity of AWR report.
Once you get this information you can use the information to get required bandwidth.
Required bandwidth (Mbps) = ((Redo rate bytes per sec. / 0.7) * 8) / 1,000,000
Preparing the primary database.
Primary database should be archivelog mode.
how to check whether database is in archive log mode or not
archive log list
if primary database is not in archive log mode then convert the database to archive log mode
shutdown the database
startup the database in mount mode
alter database archive log
open the database
then check if database is in mount stage or not.
Questions
1)what is oracle server ?
2)what is oracle instance ?
3)what is SGA ? and what is it consist of ?
4)what is redolog buffer ?
5)what happens when commit complete?
6)what is purpose of redolog buffer and database buffer cache ?
1)what are the types of standby databases ?
2)What is physical standby database ?
3)what is logical standby database ? what is advantage and disadvantage ?
4)what is snapshot standby database ? what is advantage and disadvantage ?
5)what are types of apply services ?
6)what is redo apply services ?
7)what is sql apply services ?
How to get the information of redo data generated per second ?
crsctl query css votedisk
which whether votedisk is online or not , file id of vote disk , diskgroup which belongs to and file name
if you press asmca in cmd prompt , a graphical tool get opened.
No comments:
Post a Comment