Wednesday, August 17, 2011

Oracle 11g Release 2: ASM Intelligent Data Placement (IDP)

Intelligent Data Placement is a new concept that is introduced in Oracle 11g Release 2.

As we know that the data stored in disk (HDD) is mostly in circular manner on disk platter. There is 50% of the performance change between the inner side and outer side of the platter. Hot files area always provide a 50% better performance than cold files area given in the below figure.

IDP feature always provides its best performance when ASM disks are whole disks.

We can mark ASM files as HOT/COLD by using below statement.
  • ALTER DISKGROUP DG_NAME MODIFY FILE 'FILE_NAME' ATTRIBUTES HOT/COLD;

We can always rebalance the files by placing a single copy in HOT and other copy on COLD as shown in below figure.



We can assign files to disk region by using template as well by below statements.
  • ALTER DISKGROUP DG_NAME ADD TEMPLATE DATAFILE_HOT ATTRIBUTES (HOT MIRRORHOT);

  • ALTER DISKGROUP DG_NAME ADD TEMPLATE DATAFILE_COLD ATTRIBUTES (COLD MIRRORCOLD);

To view the performance of any candidate files we can use below views.
  • V$ASM_FILE

  • V$ASM_DISK

  • V$ASM_DISK_STAT

And to view the performance benefit we can use AWR report that was generated before the changes and the one that is generated now after making changes.

Oracle 11g Release 2: CTSS and NTP Service

CTSS daemon service is a new service introduced in Oracle 11g Release 2 for the time synchronization between the nodes. As I have mentioned earlier few of the details about it in Oracle 11g Rel 2 New Features it is a replacement of NTP service.

CTSS runs in 2 ways:
  • Observer mode: whenever NTP is installed on the system, CTSS only observes

  • Active mode: time in cluster is synchronized against the CTSS master (node)

CTSS daemon tags first node started in the cluster as the master time manager. In any case, if NTP service is not available then other CTSS daemons will communicate with this master CTSS and validate the time. During this process if a time difference between cluster nodes is detected then it will adjust the time, same way as it is done by NTP daemon. If there is any minor time differences it will be reported in the alert.log file but if the time difference between the nodes is greater than 1000 msec then Oracle Clusterware will not startup in the non-master node and alert will be written in the alert.log file located under Clusterware home.

In such a case we need to manually set the time and start Oracle Clusterware node.

You can use CLUVFY utility as given below to view the details and the links that is between CTSS and NTP.

cluvfy comp clocksync

Verifying Clock Synchronization across the cluster nodes
Checking if Clusterware is installed on all nodes...
Check of Clusterware install passed
Checking if CTSS Resource is running on all nodes...
CTSS resource check passed
Querying CTSS for time offset on all nodes...
Query of CTSS for time offset passed
Check CTSS state started...
CTSS is in Observer state. Switching over to clock synchronization checks using NTP
Starting Clock synchronization checks using Network Time Protocol(NTP)...
NTP Configuration file check started...
NTP Configuration file check passed
Checking daemon liveness...
Liveness check passed for "ntpd"
NTP daemon slewing option check passed
TP daemon's boot time configuration check for slewing option passed
NTP common Time Server Check started...
Check of common NTP Time Server passed
Clock time offset check from NTP Time Server started...
Clock time offset check passed
Clock synchronization check using Network Time Protocol(NTP) passed
Oracle Cluster Time Synchronization Services check passed
Verification of Clock Synchronization across the cluster nodes was successful.

 
Please share your comments.

Oracle 11g Release 2: Cluster Verify Components (CLUVFY)

CVU is used for component verfication and can be used at any stage. It is used for multiple verfication like basic, free disk space, check Oracle clusterware stake. It is used to see any specific behavior of a cluster component like availability, integrity, etc.

Below are the options that are provided in CLUVFY utility in 11g Release 2:

Usage: cluvfy comp "name of the component from the below list"
  • nodereach : checks reachability between nodes

  • nodecon : checks node connectivity

  • cfs : checks CFS integrity

  • ssa : checks shared storage accessibility

  • space : checks space availability

  • sys : checks minimum system requirements

  • clu : checks cluster integrity

  • clumgr : checks cluster manager integrity

  • ocr : checks OCR integrity

  • olr : checks OLR integrity

  • ha : checks HA integrity

  • crs : checks CRS integrity

  • nodeapp : checks node applications existence

  • admprv : checks administrative privileges

  • peer : compares properties with peers

  • software : checks software distribution

  • asm : checks ASM integrity

  • acfs : checks ACFS integrity

  • gpnp : checks GPnP integrity

  • gns : checks GNS integrity

  • scan : checks SCAN configuration

  • ohasd : checks OHASD integrity

  • clocksync : checks Clock Synchronization

  • vdisk : check Voting Disk Udev settings 

Friday, August 12, 2011

Oracle 11g Release 2: New Features

Here are some of the new features of Oracle 11g Release 2 that I have come across.
  • Oracle ASM & Oracle Clusterware Installation

    • With Oracle Grid Infrastructure 11g Release 2, Oracle ASM and Oracle clusterware can be installed into a single home directory which is always tagged as Grid Infrastructure home.

  • Oracle ASM and Oracle Clusterware Files

    • OCR and voting disks can be placed on Oracle ASM storage which enables a unified storage solution, storing all the data for the clusterware and the database without the need of any third party volume manager or cluster filesystems.

  • Cluster Time Synchronization Service

    • This service is newly introduced in Oracle 11g Rel 2 which ensures that there is a synchronization of the time in the cluster. If NTP daemon service is not found during cluster configuration then CTSS is configured to ensure time synchronization.

  • Fixup Scripts and Grid Infrastructure Checks

    • When Oracle Universal Installer detects that the minimum requirements for installation are not completed it creates a shell script programs and called it as fixup scripts. Once if OUI detects and incomplete task and is marked as fixable then we can easily fix the issue by generating a fixup script by a single click on "FIX & CHECK AGAIN"

    • Always this script is executed as root because there might be the system parameters that needs to be changed which cannot be changed with some different users.

    • Also with the help of cluster verify utility (CVU) we can generate a fixup scripts before moving ahead with the installation.

  • Improved Input/Output Fencing Processes

    • Oracle 11g Rel 2 had replaced oprocd and Hangcheck processes with the cluster synchronization service daemon agent and monitor to provide more accurate recognition of hangs and to avoid false termination.

  • Oracle Clusterware Out-Of-Place upgrade

  • SCAN for Simplified Client Access

  • Voting Disk Backup Procedure

    • Voting disk was backed up using dd command in prior release but from Oracle 11g Rel 2 and later it is not supported

    • Backing up your voting disk is not required any more as it is backed up automatically in the OCR as a part of any configuration changes. Voting disk data is automatically restored to any adding voting disks.

This article is published with help of OTN Document. Hope this will help you out in your career.




Monday, August 1, 2011

Oracle 11g Release 2: Viewing Logical Content of OCR (OCRDUMP Utility)

The ocrdump utility is used to view the logical conent of the OCR. This is used mostly for troubleshooting. The ocrdump utility enables to view the logical information by writing all/limited amount of content to a file. If ocrdump command is executed without any parameter the default file OCRDUMPFILE will be created to the current directory.

As I have stated above that it writes all/limited amount of content because the information contained within the OCR is organized by the keys that are associated with privileges. Below are the statement to get the content of OCR in a viewing format
  • [root]$ ocrdump filename_full_result.txt
  • [grid]$ ocrdump filename_limited_result.txt
So if ocrdump is excuted with root we get all the output and if it is executed with grid we get limited output.

To check the changes in the OCR you can use below method.
  1. Take the logical backup of OCR by ocrdump -backupfile week.ocr
  2. After a week see the difference by executing ocrdump -stdout - packupfile week.ocr | diff - OCRDUMPFILE
Please let me know if you have any issues or need any more help.

Oracle 11g: Process that cause Node Reboot / Avoiding False Reboot

There are few processes that can evict nodes from the cluster or cause a node rebooting issue.
  • hangcheck-timer: This process is used to monitor for machine hangs and pauses
  • oclskd: This process is used by CSS to reboot a node based on requests from the other node with in the cluster.
  • ocssd: This process is used to monitor the internode's health.
But from Oracle 11g Release 2 hangcheck-timer is no longer needed.

To identify that which of the above process is causing node reboot we need to go through some log files
  • hangcheck-timer
    • /var/log/messages

  • oclskd
    • GRID_HOME/log/hostname/client/oclskd.log
  • ocssd
    • /var/log/messages
    • GRID_HOME/log/hostname/cssd/ocssd.log 
Below are the few lines that are mentioned by these above processes at the time of reboot in the log.
  • hangcheck-timer
    • "Hangcheck: hangcheck is restarting the machine."
  • ocssd
    • "Oracle CSSD failure. Rebooting for cluster integrity"
    • There might some more information similar to "Begin Dump" and "End Dump" just before the rebooting.
    • If you dont find any identification about the node rebooting then you might need to enable tracing and additional debugging.
There might be the case that sometimes there is a false reboot due to low MARGIN settings and heavy CPU load or a scheduler bug.

There have been wide variations in scheduling latencies observed across operating systems and versions of operating systems that can result us with false rebooting.

Increase the value of diagwait if it is set to too low and false rebooting is occured by using the below command
  • crsctl set css diagwait -force
If hangcheck-timer is used and found as a cause then increase the value of hangcheck_margin parameter of the hangcheck-timer module. To validate the values of diagwait or hangcheck_margin you can use the below method.
  • CSS misscount > (TIMEOUT + MARGIN)
    • To get the current css misscount please use crsctl get css misscount
  • CSS misscount > diagwait
  • CSS misscount > hangcheck_tick + hangcheck_margin
Note: It is recommended not to change the value of misscount and disk timeout until and unless it is not recommended by Oracle Support.

Saturday, July 30, 2011

Printer mapping issue while using Terminal Server session


To resolve this problem on a computer that is not running Windows Server 2003, force all ports (including DOT4) on the client computer to be filtered for redirection. To do this, add a DWORD value named FilterQueueType to HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default\AddIns\RDPDR and set its value data to FFFFFFFF.

Follow these steps, and then quit Registry Editor:
1.
Click Start, click Run, type regedit, and then click OK.
2.
Locate and then click the following key in the registry:
HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default\AddIns\RDPDR
3.
On the Edit menu, point to New, and then click DWORD Value.
4.
Type FilterQueueType, and then press ENTER.
5.
On the Edit menu, click Modify.
6.
Type FFFFFFFF, and then click OK.
This enables all ports on the client machine to be redirected to Terminal Server session

Thursday, July 21, 2011

Oracle 11g Release 2: SRVCTL commands PART 5 [DISKGROUP]



SRVCTL command for Diskgroup:

To add the diskgroup
  • There is no command like srvctl add for Oracle ASM disk groups. Disk groups are automatically added to the Oracle Restart configuration when they are first mounted. 
  • But if in case you have removed a disk group from the Oracle Restart configuration and want to add it back you can connect to the Oracle ASM instance with SQL*Plus and use an ALTER DISKGROUP ... MOUNT command.
To remove the diskgroup
  • srvctl remove diskgroup -g diskgroup_name [-n node_list] [-f]
  • srvctl remove diskgroup -g DiskGroup1 -f
To start the diskgroup
  • srvctl start diskgroup -g diskgroup_name [-n node_list]
  • srvctl start diskgroup -g diskgroup1 -n linuxrac01, linuxrac02
To stop the diskgroup
  • srvctl stop diskgroup -g diskgroup_name [-n node_list] [-f]
  • srvctl stop diskgroup -g ASM_DG02
  • srvctl stop diskgroup -g diskgroup2 -n linuxrac01,linuxrac02 -f
To check the status of the diskgroup
  • srvctl status diskgroup -g diskgroup_name [-n node_list] [-a]
  • srvctl status diskgroup -g diskgroup2 -n linuxrac01,linuxrac02 -a
To enable the diskgroup
  • srvctl enable diskgroup -g diskgroup_name [-n node_list]
  • srvctl enable diskgroup -g diskgroup1 -n linuxrac01,linuxrac02
To disable the diskgroup
  • srvctl disable diskgroup -g diskgroup_name [-n node_list]
  • srvctl disable diskgroup -g diskgroup3 -n linuxrac01, linuxrac02

Keep watching.. Still other 3 to 4 parts of SRVCTL commands are yet to come. 

Tuesday, July 19, 2011

Oracle 11g Release 2: Add a Node in the Cluster with addNode.sh

Currently we have 2 node cluster in the below example and we will be adding 3rd node to it.

There are various methods to add a node to the cluster but here we will be using addNode.sh.

Adding node to existing cluster


Below is the pre-requisite check that I have prepared that is also suggested by Oracle.
  • Physical connectivity with Network of the existing cluster and storage including public network, private network, etc. as shown in the figure above.
  • Operating system image as it is available in the existing cluster nodes. If you are not able to make a image copy then please make sure to make the changes that was made while preparing existing nodes.
  • SSH needs to be configured to operate without asking the passwords with both fully qualified name and non-qualified name.
Execute the cluster verify utility to check the new node i.e. racn3 from the existing node i.e. racn1 or racn2
  • [grid@racn1]$ cluvfy stage -post hwos -n racn3 [This will perform the post-hardware and operating system check]
  • [grid@racn1]$ cluvfy comp peer -refnode racn1 \ -n racn3 -orainv oinstall -osdba asmdba -verbose [This will perform a in-depth comparison of one existing referencing to the new node]
Next step is to verify the integrity of the cluster and node that we are going to add i.e. racn3
  • [grid@racn1]$ cluvfy stage -pre nodeadd -n racn3
As in this example we are not using GNS (Grid Naming Service) so we will be executing the addNode.sh script located at $GRID_HOME/oui/bin folder as stated below.
  • [grid@racn1]$ ./addNode.sh -silent "CLUSTER_NEW_NODES={racn3}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={racn3-vip}"
Once the addNode.sh script is executed at the end of the script the instruction will be provided to execute the root.sh script located at /db/oracle/app/11.2.0/grid/root.sh on all the nodes of the cluster [racn1, racn2 and racn3].

After the executing of root.sh to make sure about the node addition we will be executing the cluster verify utility with the below option.
  • [grid@racn1]$ cluvfy stage -post nodeadd -n racn3 -verbose
We are done!!!

Hope this topic will help you out to add a node in the cluster at your workplace. Please leave your comments if you like it or need any further help.

Monday, July 18, 2011

Oracle 11g Release 2: Delete a Node from the Cluster

We have 3 node rac in the below example (racn1, racn2 and racn3), where we are removing racn3 from the cluster


  • Notify the location of the Oracle Clusterware home that is consistent on all the nodes.
  • Execute the crsctl statement given below as root user from the node that will remain in the clusterware to unpin the node.
    • [root@racn1]#crsctl unpin css -n racn3
  • Before removing the node from the cluster we need to stop and remove the VIP.
    • #srvctl stop vip -i vip_name -f
    • #srvctl remove vip -i vip_name -f
    • NOTE: vip_name is the Virtual IP (VIP) for the nodes that needs to be deleted
  • Execute the rootcrs.pl perl script that is provided by Oracle and stored at $Grid_home/crs/install directory on all the nodes that you want to be deleted from cluster.
    • [root@racn1]#./rootcrs.pl -delete -force
  • Execute the crsctl statement given below as root user from the node that will remain in the clusterware.
    • [root@racn1]#crsctl delete node -n racn3
  • Once the node is deleted execute the below statement on the same node that you have deleted by the owner user of Oracle Clusterware.
    • [grid@racn3]$cd $GRID_HOME/oui/bin
    • [grid@racn3]./runInstaller -updateNodeList \ ORACLE_HOME=Grid_Home "Cluster_Nodes={racn3}" CRS=TRUE - local
  • Execute the runInstaller with grid user as it was the owner of the Oracle Clusterware on the same node that we are deleting
    • [grid@racn3]./runInstaller -detachHome ORACLE_HOME=/db/oracle/app/11.2.0/grid [This will be working if we have shared home]
    • [grid@racn3]./deinstall -local [This if we have non-shared home]
  • To update the rest of the nodes of cluster select any active node and execute the below statements to update the node list
    • [grid@racn1] cd $GRID_HOME/oui/bin
    • [grid@racn1] ./runInstaller -updateNodeList ORACLE_HOME=/db/oracle/app/11.2.0/grid  "CLUSTER_NODES={racn1,racn2}" CRS=TRUE
Hope this post will help you out. Keep checking our blog as there are many other topics that is yet to come.

Oracle 11g Release 2: SRVCTL commands PART 4 [LISTENER]

SRVCTL command for Listener:

To add/remove listener
  • srvctl add listener -n node_name -o ORACLE_HOME [-l listener_name]
  • srvctl add listener –n linuxrac01 –o $ORACLE_HOME –l listeneringress_test01
  • srvctl remove listener -n node_name [-l listener_name]
  • srvctl remove listener –n linuxrac02 –l listeneringress_test02

To add/remove listener in 11g Rel 2
  • srvctl add listener -l LISTENERASM01 -p "TCP:1525" -o $ORACLE_HOME
  • srvctl add listener -l listeneringress01 -p 1341 -o /db/oracle/ora11201
  • srvctl remove listener [-l lsnr_name|-a] [-f]
  • srvctl remove listener -l listeneringress01

To start/stop listener
  • srvctl start listener -n node_name [-l listener_names]
  • srvctl start listener -n linuxrac01
  • srvctl stop listener -n node_name [-l listener_names]
  • srvctl stop listener -n linuxrac01

To check the status of the listener
  • srvctl status listener [-n node_name] [-l listener_names]
  • srvctl status listener -n linuxrac02

To configure listener
  • srvctl config listener -n node_name
  • srvctl config listener –n linuxrac01
  • srvctl config listener [-l lsnr_name] [-a]
  • srvctl config listener -l listeneringress01

To modify the listener
  • srvctl modify listener -n node_name [-l listener_names] -o ORACLE_HOME
  • srvctl modify listener -n linuxrac03 -o /db/oracle/app/oracle/product/11.2/asm -l "LISTENERingress_test04"

To enable/disable listener
  • srvctl enable listener [-l lsnr_name] [-n node_name]
  • srvctl enable listener -l listeneringress_test02 -n linuxrac02
  • srvctl disable listener [-l lsnr_name] [-n node_name]
  • srvctl disable listener -l listeneringress_test02 -n linuxrac02
<!--[if !supportLineBreakNewLine]-->
To get/set/unset environment parameter for listener
  • srvctl getenv listener [-l lsnr_name]
  • srvctl getenv listener -l listeneringress_test02
  • srvctl setenv listener [-l lsnr_name] [-t "name=val]
  • srvctl setenv listener -t LANG=en
  • srvctl unsetenv listener [-l lsnr_name] [-t name]
  • srvctl unsetenv listener -t "TNS_ADMIN"

Just keep watching more on its way to come in PART 5

Oracle 11g Release 2: SRVCTL commands PART 4 [LISTENER]

SRVCTL command for Listener:

To add/remove listener
  • srvctl add listener -n node_name -o ORACLE_HOME [-l listener_name]
  • srvctl add listener –n linuxrac01 –o $ORACLE_HOME –l listenerbhavik_test01
  • srvctl remove listener -n node_name [-l listener_name]
  • srvctl remove listener –n linuxrac02 –l listenerbhavik_test02

To add/remove listener in 11g Rel 2
  • srvctl add listener -l LISTENERASM01 -p "TCP:1525" -o $ORACLE_HOME
  • srvctl add listener -l listenerbhavik01 -p 1341 -o /db/oracle/ora11201
  • srvctl remove listener [-l lsnr_name|-a] [-f]
  • srvctl remove listener -l listenerbhavik01

To start/stop listener
  • srvctl start listener -n node_name [-l listener_names]
  • srvctl start listener -n linuxrac01
  • srvctl stop listener -n node_name [-l listener_names]
  • srvctl stop listener -n linuxrac01

To check the status of the listener
  • srvctl status listener [-n node_name] [-l listener_names]
  • srvctl status listener -n linuxrac02

To configure listener
  • srvctl config listener -n node_name
  • srvctl config listener –n linuxrac01
  • srvctl config listener [-l lsnr_name] [-a]
  • srvctl config listener -l listenerbhavik01

To modify the listener
  • srvctl modify listener -n node_name [-l listener_names] -o ORACLE_HOME
  • srvctl modify listener -n linuxrac03 -o /db/oracle/app/oracle/product/11.2/asm -l "LISTENERbhavik_test04"

To enable/disable listener
  • srvctl enable listener [-l lsnr_name] [-n node_name]
  • srvctl enable listener -l listenerbhavik_test02 -n linuxrac02
  • srvctl disable listener [-l lsnr_name] [-n node_name]
  • srvctl disable listener -l listenerbhavik_test02 -n linuxrac02
<!--[if !supportLineBreakNewLine]-->
To get/set/unset environment parameter for listener
  • srvctl getenv listener [-l lsnr_name]
  • srvctl getenv listener -l listenerbhavik_test02
  • srvctl setenv listener [-l lsnr_name] [-t "name=val]
  • srvctl setenv listener -t LANG=en
  • srvctl unsetenv listener [-l lsnr_name] [-t name]
  • srvctl unsetenv listener -t "TNS_ADMIN"

Just keep watching more on its way to come in PART 5

Oracle 11g Release 2: SRVCTL commands PART 3 [ASM]

SRVCTL command for ASM 

To add/remove the ASM
  • srvctl add asm [-l lsnr_name] [-p spfile] [-d asm_diskstring]
  • srvctl remove asm -l [-f]
  • srvctl add asm -l LISTENERASM01 -p +diskg_data/spfile.ora
  • srvctl remove asm -l LISTENERASM01 -f

To start/stop the ASM
  • srvctl start asm [-n node_name] [-o start_options]
  • srvctl start asm -n linuxrac01
  • srvctl stop asm [-n node_name] [-o stop_options] [-f]
  • srvctl stop asm -n linuxrac01 -f

To check the status of the ASM
  • srvctl status asm [-n node_name] [-a]
  • srvctl status asm -n linuxrac01 -a

To enable/disable ASM
  • srvctl enable asm [-n node_name]
  • srvctl enable asm -n linuxrac01
  • srvctl disable asm [-n node_name]
  • srvctl disable asm -n linuxrac01

To configure the ASM
  • srvctl config asm [-a]
  • srvctl config asm -a

To modify the ASM parameters
  • srvctl modify asm [-n node_name] [-l listener_name] [-d asm_diskstring] [-p spfile_path]
  • srvctl modify asm -l listener01
To get/set/unset the environment of ASM
  • srvctl getenv asm
  • srvctl setenv asm -t LANG=en
  • srvctl unsetenv asm -t CLASSPATH

 Just keep watching more on its way to come in PART 4

Sunday, July 17, 2011

Oracle 11g Release 2: SRVCTL commands PART 2 [Instance]

SRVCTL command for Instances 

To add the instance
  • srvctl add instance –d db_name –i inst_name -n node_name
  • srvctl add instance -d ingress_test -i ingress_test01 -n linuxrac01

To Remove the instance
  • srvctl remove instance –d db_name –i inst_name
  • srvctl remove instance -d ingress_test -i ingress_test01

To Start the instance
  • srvctl start instance -d db_name -i inst_names [-o start_options] [-c connect_str|-q]
  • srvctl start instance –d db_name –i inst_names [-o open]
  • srvctl start instance –d db_name –i inst_names -o nomount
  • srvctl start instance –d db_name –i inst_names -o mount
  • srvctl start instance –d ingress_test -i ingress_test02

To start the instance in Oracle 11g:
  • srvctl start instance -d db_unique_name {-n node_name -i "instance_name_list"} [-o start_options]
  • srvctl start instance -d ingress_test -n linuxrac02
  • srvctl start instance -d ingress_test -i "ingress_test02,ingress_test03"

To stop the instance
  • srvctl stop instance -d db_name -i inst_names [-o stop_options] [-c connect_str|-q]
  • srvctl stop instance –d db_name –i inst_names [-o normal]
  • srvctl stop instance –d db_name –i inst_names -o transactional
  • srvctl stop instance –d db_name –i inst_names -o immediate
  • srvctl stop instance –d db_name –i inst_names -o abort
  • srvctl stop instance –d ingress_test -i ingress_test03

To stop the instance in Oracle 11g:
  • srvctl stop instance -d db_unique_name {[-n node_name]|[-i "instance_name_list"]} [-o stop_options] [-f]
  • srvctl stop instance -d ingress_test -n linuxrac01
  • srvctl stop instance -d ingress_test -i ingress_test01

To check the status of the instance
  • srvctl status instance –d db_name –i inst_names [-f] [-v] [-S level]
  • srvctl status instance –d ingress_test -i ingress_test02

To check the status of the instance in Oracle 11g:
  • srvctl status instance -d db_unique_name {-n node_name | -i "instance_name_list"} [-f] [-v]
  • srvctl status instance -d ingress_test -i "ingress_test01,ingress_test02" -v
To enable/disable the instance
  • srvctl enable instance –d db_name –i inst_names
  • srvctl enable instance -d ingress_test -i "ingress_test01,ingress_test02"
  • srvctl disable instance –d db_name –i inst_names
  • srvctl disable inst -d ingress_test -i "ingress_test01,ingress_test03"

To set dependency of instance to ASM
  • srvctl modify instance -d db_name -i inst_name {-s asm_inst_name|-r} 
  • srvctl modify instance -d db_unique_name -i instance_name {-n node_name|-z}
  • srvctl modify instance -d ingress_test -i ingress_test01 -n linuxrac01
  • srvctl modify instance -d ingress_test -i ingress_test01 -z

To move the database instance
  • srvctl modify instance -d db_name -i inst_name -n node_name 
  • srvctl modify instance –d ingress_test –i ingress_test02 –n linuxrac01

To remove the database instance
  • srvctl modify instance -d db_name -i inst_name -r 
  • srvctl modify instance –d ingress_test –i ingress_test01 –r

To get/set/unset the environment configuration of the instance
  • srvctl getenv instance –d db_name –i inst_name [-t name_list]
  • srvctl getenv instance –d ingress_test –i ingress_test01
  • srvctl setenv instance –d db_name [–i inst_name] {-t "name=val[,name=val,...]" | -T "name=val"}
  • srvctl setenv instance –d ingress_test –i ingress_test01 [options]
  • srvctl unsetenv instance –d db_name [–i inst_name] [-t name_list]
  • srvctl unsetenv instance –d ingress_test –i ingress_test01 [-t options]

Hope my post will help you and just keep watching there is some more options that will be coming soon in part 3

Oracle 11g Release 2: SRVCTL commands PART 2 [Instance]

SRVCTL command for Instances 

To add the instance
  • srvctl add instance –d db_name –i inst_name -n node_name
  • srvctl add instance -d bhavik_test -i bhavik_test01 -n linuxrac01

To Remove the instance
  • srvctl remove instance –d db_name –i inst_name
  • srvctl remove instance -d bhavik_test -i bhavik_test01

To Start the instance
  • srvctl start instance -d db_name -i inst_names [-o start_options] [-c connect_str|-q]
  • srvctl start instance –d db_name –i inst_names [-o open]
  • srvctl start instance –d db_name –i inst_names -o nomount
  • srvctl start instance –d db_name –i inst_names -o mount
  • srvctl start instance –d bhavik_test -i bhavik_test02

To start the instance in Oracle 11g:
  • srvctl start instance -d db_unique_name {-n node_name -i "instance_name_list"} [-o start_options]
  • srvctl start instance -d bhavik_test -n linuxrac02
  • srvctl start instance -d bhavik_test -i "bhavik_test02,bhavik_test03"

To stop the instance
  • srvctl stop instance -d db_name -i inst_names [-o stop_options] [-c connect_str|-q]
  • srvctl stop instance –d db_name –i inst_names [-o normal]
  • srvctl stop instance –d db_name –i inst_names -o transactional
  • srvctl stop instance –d db_name –i inst_names -o immediate
  • srvctl stop instance –d db_name –i inst_names -o abort
  • srvctl stop instance –d bhavik_test -i bhavik_test03

To stop the instance in Oracle 11g:
  • srvctl stop instance -d db_unique_name {[-n node_name]|[-i "instance_name_list"]} [-o stop_options] [-f]
  • srvctl stop instance -d bhavik_test -n linuxrac01
  • srvctl stop instance -d bhavik_test -i bhavik_test01

To check the status of the instance
  • srvctl status instance –d db_name –i inst_names [-f] [-v] [-S level]
  • srvctl status instance –d bhavik_test -i bhavik_test02

To check the status of the instance in Oracle 11g:
  • srvctl status instance -d db_unique_name {-n node_name | -i "instance_name_list"} [-f] [-v]
  • srvctl status instance -d bhavik_test -i "bhavik_test01,bhavik_test02" -v
To enable/disable the instance
  • srvctl enable instance –d db_name –i inst_names
  • srvctl enable instance -d bhavik_test -i "bhavik_test01,bhavik_test02"
  • srvctl disable instance –d db_name –i inst_names
  • srvctl disable inst -d bhavik_test -i "bhavik_test01,bhavik_test03"

To set dependency of instance to ASM
  • srvctl modify instance -d db_name -i inst_name {-s asm_inst_name|-r} 
  • srvctl modify instance -d db_unique_name -i instance_name {-n node_name|-z}
  • srvctl modify instance -d bhavik_test -i bhavik_test01 -n linuxrac01
  • srvctl modify instance -d bhavik_test -i bhavik_test01 -z

To move the database instance
  • srvctl modify instance -d db_name -i inst_name -n node_name 
  • srvctl modify instance –d bhavik_test –i bhavik_test02 –n linuxrac01

To remove the database instance
  • srvctl modify instance -d db_name -i inst_name -r 
  • srvctl modify instance –d bhavik_test –i bhavik_test01 –r

To get/set/unset the environment configuration of the instance
  • srvctl getenv instance –d db_name –i inst_name [-t name_list]
  • srvctl getenv instance –d bhavik_test –i bhavik_test01
  • srvctl setenv instance –d db_name [–i inst_name] {-t "name=val[,name=val,...]" | -T "name=val"}
  • srvctl setenv instance –d bhavik_test –i bhavik_test01 [options]
  • srvctl unsetenv instance –d db_name [–i inst_name] [-t name_list]
  • srvctl unsetenv instance –d bhavik_test –i bhavik_test01 [-t options]

Hope my post will help you and just keep watching there is some more options that will be coming soon in part 3

Oracle 11g Release 2: Oracle Clusterware Upgrade - Out-of-Place

Oracle clusterware 11g release 2 only supports out-of-place upgrade. It means that the new software is installed in different Oracle Clusterware home directory. Till now, in-place upgrade was available. In-place upgrade is nothing but it is installed in the same home directory and used as an existing or active software. Now with the help of out-of-place upgrade, both the version i.e. the existing one and the new one are installed and available on the nodes at the same time but in different Grid home. Any one can be the active software.

The advantage of out-of-place upgrade is to decrease the planned outage time required for the cluster upgrades, which helps in meeting the availability of service level agreement (SLA). Once the software is installed we can upgrade the cluster by stopping the previous version of the software and starting the new version node by node which is also known as a rolling upgrade.

To check the software version that indicates the version of the Oracle clusterware that is active on the server we can use $crsctl query crs activeversion. The software version is stored in the OCR. We also have a clusterwide "active version" for the entire cluster that reflects the version of the communication protocols and shared disk data structure that is currently used on the cluster.

Hope this topic will help you out understand Out-of-Place upgrade.

Oracle 11g Release 2: SRVCTL commands PART 1 [Database]

SRVCTL commands


Check the Current Version of SRVCTL utility
  • srvctl -V 

For Database:

To Add Database
  • srvctl add database -d ingress_test -o /db/oracle/app/oracle/product/11.2/
To Remove Database
  • srvctl remove database -d ingress_test
To Start Database with different option
  • srvctl start database -d ingress_test -o nomount
  • srvctl start database -d ingress_test -o mount
  • srvctl start db -d ingress_test
  • srvctl start database -d ingress_test -o open
To Stop Database with different option
  • srvctl stop database -d ingress_test -o transactional
  • srvctl stop database -d ingress_test -o immediate
  • srvctl stop database -d ingress_test -o abort
  • srvctl stop db -d ingress_test -o immediate
To check the status of the database
  • srvctl status database -d ingress_test -v service_name
  • srvctl status database -d ingress_test
To enable and disable database 
  • srvctl enable database -d ingress_test
  • srvctl disable db -d ingress_test

To configure databasee option
  • srvctl config database -d ingress_test
To modify database settings
  • srvctl modify database -d ingress_test -r logical_standby
  • srvctl modify db -d ingress_test -p /db/oracle/oradata/ingress_test/spfileingress_test.ora -- moves p file
  • srvctl modify database –d ingress_test –o /db/oracle/app/oracle/product/11.2/ –s open
To get/set/unset the environment settings 
  • srvctl getenv database -d ingress_test
  • srvctl setenv database –d ingress_test –t “TNS_ADMIN=/db/oracle/app/oracle/product/11.2/asm/network/admin”
  • srvctl setenv db -d ingress_test -t LANG=en
  • srvctl unsetenv database -d ingress_test -t CLASSPATH
Hope my post will help you and just keep watching there is some more options related to instance, service, etc will be coming soon in part 2

Oracle 11g Release 2: SRVCTL commands PART 1 [Database]

SRVCTL commands


Check the Current Version of SRVCTL utility
  • srvctl -V 

For Database:

To Add Database
  • srvctl add database -d bhavik_test -o /db/oracle/app/oracle/product/11.2/
To Remove Database
  • srvctl remove database -d bhavik_test
To Start Database with different option
  • srvctl start database -d bhavik_test -o nomount
  • srvctl start database -d bhavik_test -o mount
  • srvctl start db -d bhavik_test
  • srvctl start database -d bhavik_test -o open
To Stop Database with different option
  • srvctl stop database -d bhavik_test -o transactional
  • srvctl stop database -d bhavik_test -o immediate
  • srvctl stop database -d bhavik_test -o abort
  • srvctl stop db -d bhavik_test -o immediate
To check the status of the database
  • srvctl status database -d bhavik_test -v service_name
  • srvctl status database -d bhavik_test
To enable and disable database 
  • srvctl enable database -d bhavik_test
  • srvctl disable db -d bhavik_test

To configure databasee option
  • srvctl config database -d bhavik_test
To modify database settings
  • srvctl modify database -d bhavik_test -r logical_standby
  • srvctl modify db -d bhavik_test -p /db/oracle/oradata/bhavik_test/spfilebhavik_test.ora -- moves p file
  • srvctl modify database –d bhavik_test –o /db/oracle/app/oracle/product/11.2/ –s open
To get/set/unset the environment settings 
  • srvctl getenv database -d bhavik_test
  • srvctl setenv database –d bhavik_test –t “TNS_ADMIN=/db/oracle/app/oracle/product/11.2/asm/network/admin”
  • srvctl setenv db -d bhavik_test -t LANG=en
  • srvctl unsetenv database -d bhavik_test -t CLASSPATH
Hope my post will help you and just keep watching there is some more options related to instance, service, etc will be coming soon in part 2

Saturday, July 16, 2011

Oracle 11g Release 2: SRVCONFIG commands

SRVCONFIG commands

To Export cluster registry
  • $srvconfig -exp file_name

To Import Cluster registry
  • $srvconfig -imp file_name

To Upgrade the database cluster registry and database configuration
  • $srvconfig -upgrade -dbname database_name -orahome oracle_homename

To Downgrade the database cluster registry and database configuration (This is rarely used in case of any upgrade failure)
  • $srvconfig -downgrade -dbname database_name -orahome oracle_homename -version version_dtl


Oracle 11g Release 2: CRSCTL commands

CRSCTL Commands


Check current Version of Clusterware
$crsctl query crs activeversion
$crsctl query crs softwareversion [node_name]
To Start & Stop Cluster ready service and cluster synchronization service
$crsctl start crs
$crsctl stop crs
#/etc/init.d/init.crs start
#/etc/init.d/init.crs stop
#/etc/init.d/init.cssd stop
#/etc/init.d/init.cssd start
To Enable & Disable Cluster ready service
$crsctl enable crs
$crsctl disable crs
#/etc/init.d/init.crs enable
#/etc/init.d/init.crs disable
To Check current status of Cluster ready service
$crsctl check crs
$crsctl check cluster [-node node_name] 
To check current status of cluster synchronization service, cluster ready service and event manager service daemon
$crsctl check cssd
$crsctl check crsd
$crsctl check evmd
To List the Voting disks those are currently used by CSS 
$crsctl check css votedisk
$crsctl query css votedisk 
To add and delete any voting disk
$crsctl add css votedisk PATH
$crsctl delete css votedisk PATH
To start clusterware resources
$crsctl start resources 
$crsctl stop resources  
Hope it will help you out.

Oracle 11g Rel 2: SCAN (Single Client Access Name)

Hi Friends,

Sometime back I have configured few Oracle 11g Rel 2 RAC database on Linux 5 operating system and here I would like to share some of the things I am aware of about SCAN.

Single Client Access Name
The single client access name (SCAN) is the address used by client connecting to the cluster. The SCAN is a fully qualified domain name (host name + domain) registered to n numbers of IP addresses.

I haven't used GNS so the SCAN needs to be defined in the DNS to resolve to all the addresses assigned to that name and it needs to be done before we start the installation of Oracle Grid Infrastructure. The SCAN and the associated IP addresses provide a stable name for clients to use for connections, independent of the nodes that make up the cluster.

SCAN is functioning like a cluster alias so application/end user never requires updated address of the server to connect either in the condition if some nodes are failed in the cluster.

During installation, listener are created on each node for the SCAN IP addresses and Oracle clusterware routes application/end user requests to the cluster SCAN to the least loaded instance providing the service.

Hope this topic will help you out,

Cheers!!!!

Oracle 11g Rel 2: Grid Plug & Play

Grid Plug and play reduces the cost of installing, configuring and managing server nodes by using Grid Naming Service within the cluster to allow each node to perform the below action.

  • Negotiate appropriate network identities for itself.
  • Acquiring additional information from a configuration profile.
  • Configuring and re-configuring itself using profile data, making host names and addresses resolvable on the network.
Grid Plug and Play Domain
Grid Plug and Play domain is a collection of nodes belonging to a single cluster served by the GPnP service.
  • Cluster name: cluster-node01
  • Network name: example.com
  • GPnP domain: cluster-node01.example.com
Each and every node participated in GPnP domain has some common characteristics:
  • Will have at least one routable interface with connectivity outside of the GPnP domain for the public interface. If there are multiple interface then it is required binding to be identified in the GPnP profile.
  • Will have a unique identifier that is unique within the GPnP domain, and it is established through OSD.
  • A personality affected by the GPnP profile, physical characteristics and software image of the node including application that may be running. Below are the characteristics of the node personality includes.
    • Cluster name
    • Network classification (public/private)
    • Storage to be used for ASM and CSS
    • Digital signatures
Usually GPnP profile is stored in XML file and can be found at $Grid_Home/gpnp/profiles/peer/profiles.xml

Hope this will help you out friends, Please feel free to put your comments.

Migrating User Data from One tablespace to another tablespace: Oracle 11g Rel 2

Hi Friends,

Recently I have come across a migration of Oracle User's data from one tablespace to another tablespace.

Following are the command that you can create with the help of dba_objects, dba_lobs, all_indexes and dba_users

Moving Table from One tablespace to another
Alter table owner.tablename move tablespace *new tablespace*
Moving Index from one tablespace to another
Alter index owner.indexname rebuild tablespace *new tablespace*
Moving Lob Objects from one tablespace to another
Alter table owner.tablename move lob (columnname) store as (tablespace *new tablespace*)
Please comment if it worked for you during your support.

Oracle 11g Release 2: Checking Network Status

Oracle has provided us some of the utility that can help DBA to know how to check the network settings that is currently used by Oracle RAC Database

To list the interface available to cluster
oifcfg iflist -p -n
To determine the public and private interface
oifcfg getif
To determine Virtual IP Address hostname, VIP Address, VIP Subnet and VIP Interface
srvctl config nodeapps -a

Hope this will help you out in your career and please feel free to leave your comments.


 

Oracle 11g Release 2: OCR Logical Backup/Restore

In Oracle 11g Release 2, we can take a logical backup of OCR and do the restoration as well if needed.

Below is the command that will help you out to take logical backup of OCR.
ocrconfig -export /filelocation/exp_ocr.bak
At any point of time if you are needed to restore the OCR below is the steps that you can use.

  1. crsctl stop cluster -all
  2. crsctl stop crs
  3. ocrconfig -import /filelocation/exp_ocr.bak
  4. crsctl start crs
  5. cluvfy comp ocr -n all
Please feel free to provide your comments if you need any more help

Oracle 11g Release 2: OCR Backup

Till Oracle 10g, we have a utility dd to backup OCR and voting disk but moving to 11g Release 2 it is done automatically.

Oracle software automatically backups up OCR file with the below schedule


  • 1st is at 4 hours old
  • 2nd is at 8 hours old
  • 3rd is at 12 hours old
  • 4th is at 24 hours old
  • 5th is at 48 hours old
  • 6th is 7 days old
  • 7th is at 14 days old.


The start is not as per the day or date. it calculates the start time as the clusterware start time.

Even still if you are looking to backup the OCR file manually you can use the below command.
ocrconfig -manualbackup /filelocation/phy_ocr.bak
To list the manual backup
ocrconfig -showbackup manual
To list the backup that was taken automatically by oracle execute
ocrconfig -showbackup auto

How can I remove a URL on my website from the Google Index?

To remove a specific URL (for example, the page http://www.example.com/page4.html) of your own website from Google’s index, there are two ...