oracle vm manager


oracle vm server is great stuff,vm manager act as interface to manage the vm server, here comes the memo of installation of vm manager,just check it out

[root@oraclevm OracleVM-Manager-2.2.0]# sh ./runInstaller.sh
Welcome to Oracle VM Manager 2.2

Please enter the choice: [1|2|3]
1. Install Oracle VM Manager
2. Uninstall Oracle VM Manager
3. Upgrade Oracle VM Manager
1

Starting Oracle VM Manager 2.2 installation …

Do you want to install a new database or use an existing one? [1|2]
1. Install a new Oracle XE database on localhost
2. Use an existing Oracle database in my network
1

Prepare to install the Oracle XE database …
Checking the supported platforms … Done

Checking the prerequisite packages are installed … Done

Checking the available disk space … Done

Installing the oracle-xe-univ package (rpm) now …
Done

Oracle Database 10g Express Edition Configuration
————————————————-
This will configure on-boot properties of Oracle Database 10g Express
Edition. The following questions will determine whether the database should
be starting upon system boot, the ports it will use, and the passwords that
will be used for database accounts. Press to accept the defaults.
Ctrl-C will abort.

Specify the HTTP port that will be used for Oracle Application Express [8080]:

Specify a port that will be used for the database listener [1521]:

Specify a password to be used for database accounts. Note that the same
password will be used for SYS and SYSTEM. Oracle recommends the use of
different passwords for each database account. This can be done after
initial configuration:
Confirm the password:

Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:y

Starting Oracle Net Listener…Done
Configuring Database…

Starting Oracle Database 10g Express Edition Instance…Done
Installation Completed Successfully.
To access the Database Home Page go to “http://127.0.0.1:8080/apex”

Checking the availability of the database …

Set default database schema to ‘OVS’.
Please enter the password for account ‘OVS’:
Confirm the password:

Creating the Oracle VM Manager database schema …Done

Installing the ovs-manager package (rpm) …
Done

Installing the oc4j package (rpm) …

Please enter the password for account ‘oc4jadmin’:
Confirm the password:

Starting OC4J … Done.
To access the OC4J Home Page and change the password go to http://127.0.0.1:8888/em

Deploying Oracle VM Manager application to OC4J container.
Creating connection pool … Done
Creating data source … Done
Deploying application help … Done
Deploying application …

Please enter the keystore password for the Web Service:
Confirm the password:

Setting keystore password for Web Service … Done
Do you want to use HTTPS access for Oracle VM Manager (Y|n)?y

Configuring OC4J to use HTTPS … Done
Stopping OC4J …
Starting OC4J … Done

Please enter the password for the default account ‘admin’:
Confirm the password:

Configuring SMTP server …
Please enter the outgoing SMTP mail server(e.g. – mail.abc.com, mail.abc.com:25): 192.168.32.11
Mail server checking, may need some time, please wait …
Mail server ‘192.168.32.11’ check failed, enter Y to change the name and retry or N to keep hostname and continue(Y|n)?y
Please enter the outgoing SMTP mail server(e.g. – mail.abc.com, mail.abc.com:25): 192.168.32.11:25
Mail server checking, may need some time, please wait …
Mail server ‘192.168.32.11:25’ check failed, enter Y to change the name and retry or N to keep hostname and continue(Y|n)?n
Setting the SMTP server to 192.168.32.11:25 …
Done

Please enter an e-mail address for account ‘admin’: xxxxx@xxxxx.com
Confirm the e-mail address : xxxxx@xxxx.com
Unable to send an email to ‘xxxxx@xxxx.com’, would you like to change the email address(Y|n)?n
Updating e-mail address for account ‘admin’ to ‘xxxx@xxxx.com’ …
Done

The console feature is not enabled by default.
For detailed setup, refer to Oracle VM Manager User’s Guide

Installation of Oracle VM Manager completed successfully.

To access the Oracle VM Manager 2.2 home page go to:
https://127.0.0.1:4443/OVS

To access the Oracle VM Manager web services WSDL page go to:
https://127.0.0.1:4443/OVSWS/LifecycleService.wsdl
https://127.0.0.1:4443/OVSWS/ResourceService.wsdl
https://127.0.0.1:4443/OVSWS/PluginService.wsdl
https://127.0.0.1:4443/OVSWS/ServerPoolService.wsdl
https://127.0.0.1:4443/OVSWS/VirtualMachineService.wsdl
https://127.0.0.1:4443/OVSWS/AdminService.wsdl

To access the Oracle VM Manager help page go to:
https://127.0.0.1:4443/help/help

use srvctl to handle the listener


start|stop lisntener
//you can use srvctl to stop the listener of nodes
oracle@rac2 crs$ srvctl stop listener -n rac1
oracle@rac2 crs$ crs_stat -t
Name Type Target State Host
————————————————————
ora.rac.db application ONLINE ONLINE rac1
ora….c1.inst application ONLINE ONLINE rac1
ora….c2.inst application ONLINE ONLINE rac2
*ora….C1.lsnr application OFFLINE OFFLINE*
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora….C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2

//you can see the status of listener in rac1
oracle@rac1 admin$ lsnrctl status listener_rac1

LSNRCTL for Linux: Version 10.2.0.1.0 – Production on 15-MAR-2011 09:50:40

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1-vip.localdomain)(PORT=1521)(IP=FIRST)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.201.128)(PORT=1521)(IP=FIRST)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused

//you can try to start the listener as “lsnrctl start listener_rac1” and check the effect
//from the following ,you can see that the offlince status of “ora….C1.lsnr” goes online again
//so,it’s the same as u do by “lsnrctl start” and “srvctl start listener -n”

oracle@rac1 admin$ lsnrctl start listener_rac1

LSNRCTL for Linux: Version 10.2.0.1.0 – Production on 15-MAR-2011 09:52:16

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait…

TNSLSNR for Linux: Version 10.2.0.1.0 – Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener_rac1.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.201.149)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.201.128)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1-vip.localdomain)(PORT=1521)(IP=FIRST)))
STATUS of the LISTENER
————————
Alias listener_rac1
Version TNSLSNR for Linux: Version 10.2.0.1.0 – Production
Start Date 15-MAR-2011 09:52:18
Uptime 0 days 0 hr. 0 min. 1 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener_rac1.log
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.201.149)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.201.128)(PORT=1521)))
Services Summary…
Service “PLSExtProc” has 1 instance(s).
Instance “PLSExtProc”, status UNKNOWN, has 1 handler(s) for this service…
The command completed successfully
oracle@rac1 admin$ crs_stat -t
Name Type Target State Host
————————————————————
ora.rac.db application ONLINE ONLINE rac1
ora….c1.inst application ONLINE ONLINE rac1
ora….c2.inst application ONLINE ONLINE rac2
*ora….C1.lsnr application ONLINE ONLINE rac1*
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora….C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2

//so,it’s the same effect as you type “lsnrctl” or “srvctl start listener -n node1” to handle the listener

srvctl cmd introduce

srvctl cmd introduce
srvctl can control the listener,instance,and services of the rac
(1)you can check the status of nodes by following cmd
oracle@rac2 crs$ *srvctl status nodeapps -n rac2*
VIP is running on node: rac2
GSD is running on node: rac2
Listener is running on node: rac2
ONS daemon is running on node: rac2
//*vip,gsd,listener,ons were called “nodeapps”*

(2)check the status of instance of one of the nodes(rac1)
*srvctl start|stop|status database -d*
oracle@rac2 crs$ *srvctl status instance -d rac -i rac1*
Instance rac1 is running on node rac1

(3)stop whole rac
//to stop the entire database named “rac”
oracle@rac2 crs$ *srvctl stop database -d rac*
//three resource options were *offline*,”instance”,”db”
oracle@rac2 crs$ crs_stat -t
Name Type Target State Host
————————————————————
*ora.rac.db application OFFLINE OFFLINE*
*ora….c1.inst application OFFLINE OFFLINE*
*ora….c2.inst application OFFLINE OFFLINE*
ora….C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora….C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2

(4)check the configuration of whole rac env
oracle@rac2 crs$ *srvctl config database -d rac -a*
rac1 rac1 /u01/app/oracle/product/10.2.0/db_1
rac2 rac2 /u01/app/oracle/product/10.2.0/db_1
DB_NAME: rac
ORACLE_HOME: /u01/app/oracle/product/10.2.0/db_1
SPFILE: /u01/oradata/RAC/spfilerac.ora
DOMAIN: null
DB_ROLE: null
START_OPTIONS: null
POLICY: AUTOMATIC
ENABLE FLAG: DB ENABLED

ORA-12520: Listeners Running on VIP Address in 10g or Newer RAC [ID 342419.1]


In this Document
Symptoms
Cause
Solution
References
——————————————————————————–
Applies to:
Oracle Net Services – Version: 10.1.0.3.0 to 11.1.0.7.0 – Release: 10.1 to 11.1
Information in this document applies to any platform.
This issue is limited to 10g through 11.1.0.7. The issue described here is fixed in 11.2.
Symptoms
The REMOTE_LISTENER parameter is set to an alias which is defined in the Tnsnames.ora file on both the nodes.
In the Tnsnames.ora file , the hostname is defined with proper domain name.
The IP / VIP and hostname are properly defined in the /etc/hosts file on both nodes.
On the server when trying to log on to database using SQL*Plus, you see the following error:
ERROR:
ORA-12520: TNS:listener could not find available handler for requested type of server
Cause
This is due to Unpublished BUG: 4338578 RAC-CRITICAL: INSTANCE DOESN’T USE VIP ENDPOINT TO REGISTER WITH LISTENER.
In any 10g and newer RAC setup, a problem exists where the instances are not registering correctly with the virtual IP address. They’re attempting to register against the physical ip address instead.
Solution
To implement the solution, please execute the following steps:
1. Set LOCAL_LISTENER for each instance in the cluster. Log in as a privileged user and issue:
SQL>Alter system set LOCAL_LISTENER=”(address=(protocol=tcp)(host=your_node)(port=1521))” scope=both sid=”;
Where “your_node” is the VIP for the host where the instance is running and “instance_name” is the unique instance name for this SID.
Issue this statement for all instances in the cluster using the correct values for host and SID.

ORA-12520: TNS:listener could not find available handler for requested type of server


1.listener problem
when I try to connect rac from the client using sqlplus / @tnsname as sysdba, I got this error
*ORA-12520: TNS:listener could not find available handler for requested type of server*
it was caused by configuration of listener and tnsnames.

*refer:Subject: Ora-12520 When listeners on VIP in 10g RAC Setup Doc ID: Note:342419.1*
//following the notes, it seems that you need to set local_listener in each node in spfiles(other dba agree with me)
//set the parameter on node rac1 in local_listener and you need to config them on each nodes
//remote_listener control the function of load balance,
//local_listener helps a lot in TAF
SQL> show parameter listener;

NAME TYPE VALUE
———————————— ———– ——————————
local_listener string LISTENER_RAC2
remote_listener string LISTENERS_RAC

//section of tnsnames.ora on server side
RAC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.201.149)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.201.150)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rac)
)
)

LISTENERS_RAC =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.201.149)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.201.150)(PORT = 1521))
)

LISTENER_RAC1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip.localdomain)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.201.128)(PORT = 1521)(IP = FIRST))
)
)

LISTENER_RAC2 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip.localdomain)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.201.129)(PORT = 1521)(IP = FIRST))
)
)

RAC2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.201.150)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rac)
(INSTANCE_NAME = rac2)
)
)

RAC1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.201.149)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rac)
(INSTANCE_NAME = rac1)
)
)

//listener.ora on server side
LISTENER_RAC2 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip.localdomain)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.201.129)(PORT = 1521)(IP = FIRST))
)
)

LISTENER_RAC1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip.localdomain)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.201.128)(PORT = 1521)(IP = FIRST))
)
)

rac failover test

use sqlplus to connect the rac
sqlplus sys/passwod@rac as sysdba

SQL> select instance_name from v$instance;

INSTANCE_NAME
——————————–
rac2

connect rac2 and shutdown the instance
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> quit
//from the crs_stat -t, you can see the instance of rac2 was offline
oracle@rac2 admin$ crs_stat -t
Name Type Target State Host
————————————————————
ora.rac.db application ONLINE ONLINE rac1
ora….c1.inst application ONLINE ONLINE rac1
ora….c2.inst application OFFLINE OFFLINE
ora….C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora….C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2

//go to the session just created before,execute the select,you will get the instance rac1 which it fail over switch automatically from
//rac2 to rac1
SQL> select instance_name from v$instance;

INSTANCE_NAME
——————————–
rac1

//here are the configuration of tnsnames.ora,listener.ora on server side and the tnsnames.ora on client side
***************************************************************************
##listener.ora on shared NFS
LISTENER_RAC2 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip.localdomain)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.201.129)(PORT = 1521)(IP = FIRST))
)
)

LISTENER_RAC1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip.localdomain)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.201.128)(PORT = 1521)(IP = FIRST))
)
)

*********************************************************************************
#in tnsnames.ora,LISTENER_RAC1 and LISTENER_RAC2 were manul added, they are the entrance for local_listener=’LISTENER_RAC1′

RAC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.201.149)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.201.150)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rac)
)
)

LISTENERS_RAC =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.201.149)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.201.150)(PORT = 1521))
)

LISTENER_RAC1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip.localdomain)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.201.128)(PORT = 1521)(IP = FIRST))
)
)

LISTENER_RAC2 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip.localdomain)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.201.129)(PORT = 1521)(IP = FIRST))
)
)

RAC2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.201.150)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rac)
(INSTANCE_NAME = rac2)
)
)

RAC1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.201.149)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rac)
(INSTANCE_NAME = rac1)
)
)

*****************************************************
//following are the client side tnsnames.ora key section

*******************************************************
RAC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.201.149)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.201.150)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rac)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 5)
)
)
)
*******************************************************