Sei sulla pagina 1di 2

Oracle Real Application Cluster (Oracle RAC) Virtual IP (vip).

In Oracle RAC database if user process is trying to get connection with some listener and found listener is down or node is down then Oracle RAC automatically transfer this request to another listener on another node. Up to Oracle 9i we use physical IP address in listener configuration. Means if requested connection gets failed then it will be diverting to another node using physical IP address of another surviving node. But during this automatically transfer, connection should need to wait up to get error message of node down or listener down using TCP/IP connection timeout. Means session should need to wait up to getting TCP/IP timeout error dictation. Once error message is received oracle RAC automatically divert this new connection request to another surviving node. Using physical IP address there is biggest gap to get TCP/IP timeout for failover suggestion. Session should need to wait for same timeout. High availability of Oracle RAC depends on this time wasting error message. Characteristic of Virtual IP in Oracle RAC: Virtual IP (VIP) is for fast connection establishment in failover dictation. Still we can use physical IP address in Oracle 10g in listener if we have no worry for failover timing. We can change default TCP/IP timeout using operating system utilities or commands and kept smaller. But taking advantage of VIP (Virtual IP address) in Oracle 10g RAC database is advisable. There is utility also provided to configure virtual IP (vip) with RAC environment called VIPCA. Default path is $ORA_CRS_HOME/bin. During installation of Oracle RAC, it is executed. Advantage of Virtual IP deployment in Oracle RAC: Using VIP configuration, client can be able to get connection fast even fail over of connection request to node. Because vip automatically assign to another surviving node faster and it can't wait for TNS timeout old fashion. Disadvantage of Virtual IP deployment in Oracle RAC: Some more configurations is needed in system for assign virtual IP address to nodes like in /etc/hosts and others. Some misunderstanding or confusion may occur due to multiple IP assigns in same node. Important for VIP configuration: The VIPs should be registered in the DNS. The VIP addresses must be on the same subnet as the public host network addresses. Each Virtual IP (VIP) configured requires an unused and resolvable IP address.

How to kill session in Oracle RAC database: We use v$session for indetifying target session to kill in non-rac database. Here in Oracle RAC instance we should need to check and identify session using gv$session. Because only gv$session contains rac instance identifier column. After identifying target session from gv$session we need command "alter system kill session" with session identifier (sid), serial number (serial#) and instance number of Oracle RAC (instance_no). Here is example to kill or terminate active session from Oracle RAC database or instance. SQL>select sid,serial#,inst_id from gv$session where machine='GPTWORKGROUP'; SID SERIAL# INST_ID --------- --------------9 171 1 1 row selected SQL> alter system kill session '9,171,@1'; System altered. OR SQL>alter system kill session '9,171,@1' immediate; System altered.

And terminated user session will get message in sqlplus that "your session has been killed" in Oracle RAC instance. We can get output of status as "killed" from gv$session for terminated session.

Kill Oracle process using command line only: In Unix and Linux using kill command: We can check running processes in Unix and Linux using "ps" command. We are able to get process id from said command. $ps -ef|grep ora_|grep -v grep Now use "kill" command with "-9" syntax to kill process id as given below example.kill command with -9 for ensure not blocking command and surity if execution of "kill" command. $kill -9 1451 In Windows select a.username, b.spid from v$session a, v$process b where a.paddr = b.addr and a.username ='SCOTT';

USERNAME SPID. ----------------- -----SCOTT 1456 Now we can kill server process of 1456 of scott user using ORAKILL utility from command line of Windows as follows. C:\> orakill instance_name spid C:\> orakill orcl 1456 We will get following message in our command prompt of windows. "Kill of thread id 1456 in instance ORCL successfully signalled[sic]."
http://levipereira.wordpress.com/2010/11/19/rac-frequently-asked-questions/

Potrebbero piacerti anche