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 ...