Oracle9i Application Developer's Guide - Advanced Queuing
Release 1 (9.0.1)

Part Number A88890-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

Managing AQ, 10 of 10


Oracle 8.0-Style Queues

If you use 8.0-style queues and 8.1 or higher database compatibility, the following features are not available:

To use these features, you should migrate to 8.1-style or higher queues.


For more information, see:

 

Migrating To and From 8.0

To upgrade a 8.0-style queue table to an 8.1-style queue table or to downgrade a 8.1-style queue table to an 8.0-style queue table, use DBMS_AQADM.MIGRATE_QUEUE_TABLE. Table 4-3 lists the parameters for DBMS_AQADM.MIGRATE_QUEUE_TABLE.

Syntax

DBMS_AQADM.MIGRATE_QUEUE_TABLE( 

queue_table        IN       VARCHAR2,
compatible         IN       VARCHAR2) 

Table 4-3 DBMS_AQADM_MIGRATE_QUEUE_TABLE Parameters
Parameter  Description 

queue_table

(IN VARCHAR2) 

Specifies name of the queue table that is to be migrated. 

compatible 

Set to 8.1 to upgrade an 8.0 queue table to 8.1 compatibility. Set to 8.0 to downgrade an 8.1 queue table to 8.0 compatibility.  

Example: Upgrading an 8.0 Queue Table to an 8.1-Compatible Queue Table


Note:

You may need to set up the following data structures for certain examples to work:

EXECUTE DBMS_AQADM.CREATE_QUEUE_TABLE (
   queue_table            => 'qtable1', 
   multiple_consumers     => TRUE,   
   queue_payload_type     => 'aq.message_typ',
   compatible             =>'8.0');
 
EXECUTE DBMS_AQADM.MIGRATE_QUEUE_TABLE(
    queue_table  => 'qtable1',                                                                           
   compatible   => '8.1');

Importing and Exporting with 8.0-Style Queues

Because the metadata tables contain rowids of some rows in the queue table, the import and export processes will generate a note about the rowids being obsoleted when importing the metadata tables. This message can be ignored, since the queuing system will automatically correct the obsolete rowids as a part of the import operation. However, if another problem is encountered while doing the import or export (such as running out of rollback segment space), you should correct the problem and repeat the import or export.

Roles in 8.0

Access to AQ operations in Oracle 8.0 is granted to users through roles that provide execution privileges on the AQ procedures. The fact that there is no control at the database object level when using Oracle 8.0 means that, in Oracle 8.0, a user with the AQ_USER_ROLE can enqueue and dequeue to any queue in the system. For finer-grained access control, use 8.1-style queue tables in an 8.1- compatible or higher database.

AQ administrators of an Oracle9i or 8.1 database can create queues with 8.0 compatibility; 8.0-style queues are protected by the 8.0-compatible security features.

If you want to use 8.1 security features on a queue originally created in an 8.0 database, the queue table must be converted to 8.1 style by running DBMS_AQADM.MIGRATE_QUEUE_TABLE on the queue table.

See Also:

Oracle9i Supplied PL/SQL Packages and Types Reference for more information on DBMS_AQADM.MIGRATE_QUEUE_TABLE 

If a database downgrade is necessary, all 8.1-style queue tables have to be either converted back to 8.0 compatibility or dropped before the database downgrade can be carried out. During the conversion, all Oracle9i or 8.1 security features on the queues, like the object privileges, will be dropped. When a queue is converted to 8.0 compatibility, the 8.0 security model applies to the queue, and only 8.0 security features are supported.

Security with 8.0-Style Queues

Table 4-4 lists the AQ security features and privilege equivalences supported with 8.0-style queues.

Table 4-4 Security with 8.0.x-Style Queues
Privilege  8.0.x-Style Queues in an 8.0.x Database  8.0.x Compatible Queues in a 8.1.x Database 

AQ_USER_ROLE 

Supported. The grantee is given the execute right of DBMS_AQ through the role. 

Supported. The grantee is given the execute right of dbms_aq through the role. 

AQ_ADMINISTRATOR_ROLE 

Supported.  

Supported.  

Execute right on DBMS_AQ 

Execute right on DBMS_AQ should be granted to developers who write AQ applications in PL/SQL.  

Execute right on DBMS_AQ should be granted to developers who write AQ applications in PL/SQL. 

Access to AQ Object Types

The procedure grant_type_access was made obsolete in release 8.1.5 for 8.0-style queues.

OCI Application Access to 8.0-Style Queues

For an OCI application to access an 8.0-style queue, the session user has to be granted the EXECUTE rights of DBMS_AQ.

Pluggable Tablespaces and 8.0-Style Multiconsumer Queues

A tablespace that contains 8.0-style multiconsumer queue tables should not be transported using the pluggable tablespace mechanism. The mechanism will work, however, with tablespaces that contain only single-consumer queues as well as 8.1 compatible multiconsumer queues. Before you can export a tablespace in pluggable mode, you have to alter the tablespace to read-only mode. If you try to import a read-only tablespace that contains 8.0-style multiconsumer queues, you will get an Oracle error indicating that you cannot update the queue table index at import time.

Autocommit Features in the DBMS_AQADM Package

The autocommit parameters in the CREATE_QUEUE_TABLE, DROP_QUEUE_TABLE, CREATE_QUEUE, DROP_QUEUE, and ALTER_QUEUE calls of the DBMS_AQADM package are deprecated for 8.1.5 and subsequent releases. Oracle continues to support this parameter in the interface for backward compatibility purpose.


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