8.3 SET_CONTEXT: Setting Context and Attribute ValuesThe DBMS_SESSION built-in package has been enhanced with the SET_CONTEXT procedure so that you can set the value for an attribute within a context. Here is the header for that procedure: PROCEDURE DBMS_SESSION.SET_CONTEXT ( namespace VARCHAR2, attribute VARCHAR2, value VARCHAR2); The parameters are listed in Table 8.2 .
This procedure can only be called inside the package specified for the namespace context in the CREATE CONTEXT statement. This relationship is shown in the following steps:
If you try to execute DBMS_SESSION.SET_CONTEXT "out of context," you will get an error, as shown here: SQL> BEGIN 2 DBMS_SESSION.SET_CONTEXT ( 3 'pollution_indicators', 'smog', 'dense'); 4 END; 5 / BEGIN * ERROR at line 1: ORA-01031: insufficient privileges
Copyright (c) 2000 O'Reilly & Associates. All rights reserved. |
|