Oracle9i Supplied PL/SQL Packages and Types Reference
Release 1 (9.0.1)

Part Number A89852-02
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

DBMS_LOCK , 4 of 6


CONVERT Function

This function converts a lock from one mode to another. CONVERT is an overloaded function that accepts either a user-defined lock identifier, or the lock handle returned by the ALLOCATE_UNIQUE procedure.

Syntax

DBMS_LOCK.CONVERT(
   id         IN INTEGER || 
   lockhandle IN VARCHAR2,
   lockmode   IN INTEGER,
   timeout    IN NUMBER DEFAULT MAXWAIT)
  RETURN INTEGER;

Parameters

Table 23-6 CONVERT Function Parameters
Parameter  Description 
id or lockhandle
 

User assigned lock identifier, from 0 to 1073741823, or the lock handle, returned by ALLOCATE_UNIQUE, of the lock mode you want to change. 

lockmode 
 

New mode that you want to assign to the given lock.

The available modes and their associated integer identifiers are listed below. The abbreviations for these locks, as they appear in the V$ views and Enterprise Manager monitors are in parentheses.

1 - null mode

2 - row share mode (ULRS)

3 - row exclusive mode (ULRX)

4 - share mode (ULS)

5 - share row exclusive mode (ULRSX)

6 - exclusive mode (ULX)

Each of these lock modes is explained in Oracle8 Concepts

timeout
 

Number of seconds to continue trying to change the lock mode.

If the lock cannot be converted within this time period, then the call returns a value of 1 (timeout). 

Return Values

Table 23-7 CONVERT Function Return Values
Return Value  Description 

Success 

Timeout 

Deadlock 

Parameter error 

Don't own lock specified by id or lockhandle 

Illegal lock handle 


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback