Database Reference
In-Depth Information
reSOUrCe_NaMe
Interestingly, you can also identify the resource_name using the oradebug command. the ffollowing code uses
the oradebug command 3 to print the resource details to a trace file by accepting decimal representation.
after connecting to the database as sYs user:
REM Set my process for Oradebug
SQL>oradebug setmypid
REM Print the resource details for the object_id (three components)
REM Use the object_id of your table, in this case, object_id=11984883 for table T1.
SQL>oradebug lkdebug -O 11984883 0 TM
REM Print the trace file name
SQL>oradebug tracefile_name
/opt/app/product/11.2.0.2/admin/diag/rdbms/RACD/trace/RACD_ora_920.trc
review of the trace file shows the details about resource_name: [0xb6dff3][0x0],[tM] is printed in the trace file.
Note that column master_node indicates the master node of the resource. This resource is mastered by instance
with inst_id=1. Also, master_node column values start at 0; in contrast, inst_id column values start with 1. Hence,
master_node =0 indicates inst_id=1.
Next, I will query gv$ges_enqueue to review locking structures. Locks associated with the global resource
[0xb6dff3][0x0],[TM] are visible in the following code output. The grant_level of the lock is KJUSEREX, exclusive
mode. I will discuss locking modes in the next section.
REM Locks are acquired on that global resource in an exclusive mode.
Set serveroutput on size 100000
BEGIN
print_Table (q'#
select inst_id, resource_name1, grant_level, request_level,state, blocked, blocker from
gv$ges_enqueue where resource_name1 like '[0xb6dff3]%TM%'
#');
END;
/
INST_ID : 1
RESOURCE_NAME1 : [0xb6dff3][0x0],[TM][ext 0x0,0
GRANT_LEVEL : KJUSEREX
REQUEST_LEVEL : KJUSEREX
STATE : GRANTED
BLOCKED : 0
BLOCKER : 0
3 This section is mostly academic and merely provided to improve understanding of RAC internal structures. Use of oradebug
command in a production environment is not advised, and do not try these commands in a critical database.
 
Search WWH ::




Custom Search