Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

DBE_SESSION

Updated on 2024-08-20 GMT+08:00

Interface Description

Table 1 provides all interfaces supported by the DBE_SESSION package. DBE_SESSION takes effect at the session level.

Table 1 DBE_SESSION

Interface

Description

DBE_SESSION.SET_CONTEXT

Sets the value of an attribute in a specified context.

DBE_SESSION.CLEAR_CONTEXT

Clears the value of an attribute in a specified context.

DBE_SESSION.SEARCH_CONTEXT

Queries the value of an attribute in a specified context.

DBE_SESSION.MODIFY_PACKAGE_STATE

Changes the PL/SQL status of the current session.

  • DBE_SESSION.SET_CONTEXT

    Sets the value of an attribute in a specified namespace (context). The prototype of the DBE_SESSION.SET_CONTEXT function is as follows:

    1
    2
    3
    4
    5
    DBE_SESSION.SET_CONTEXT(
        namespace text,
        attribute text,
        value text
    )returns void;
    
    Table 2 DBE_SESSION.SET_CONTEXT interface parameters

    Parameter

    Type

    Input/Output Parameter

    Can Be Empty

    Description

    namespace

    TEXT

    IN

    No

    Name of the context to be set. If the context does not exist, create a context. The value contains a maximum of 128 bytes. If the value exceeds 128 bytes, it will be truncated.

    attribute

    TEXT

    IN

    No

    Attribute name. The value contains a maximum of 1024 bytes. If the value exceeds 1024 bytes, it will be truncated.

    value

    TEXT

    IN

    No

    Name of the value to be set. The value contains a maximum of 1024 bytes. If the value exceeds 1024 bytes, it will be truncated.

  • DBE_SESSION.CLEAR_CONTEXT

    Clears the value of an attribute in a specified namespace (context). The prototype of the DBE_SESSION.CLEAR_CONTEXT function is as follows:

    1
    2
    3
    4
    5
    DBE_SESSION.CLEAR_CONTEXT (
        namespace text,
        client_identifier text default null,
        attribute text default null
    )returns void ;
    
    Table 3 DBE_SESSION.CLEAR_CONTEXT interface parameters

    Parameter

    Type

    Input/Output Parameter

    Can Be Empty

    Description

    namespace

    TEXT

    IN

    No

    Context specified by the user. The value contains a maximum of 128 bytes. If the value exceeds 128 bytes, it will be truncated.

    client_identifier

    TEXT

    IN

    Yes

    Client authentication. The default value is null. Generally, you do not need to manually set this parameter.

    attribute

    TEXT

    IN

    Yes

    Attribute to be cleared. The default value is null, indicating that all attributes of the specified context are cleared. The value contains a maximum of 1024 bytes. If the value exceeds 1024 bytes, it will be truncated.

    Note: To ensure forward compatibility, if the parameter value is 'null', all attributes of the specified context are cleared.

  • DBE_SESSION.SEARCH_CONTEXT

    Queries the value of an attribute in a specified namespace (context). The prototype of the DBE_SESSION.SEARCH_CONTEXT function is as follows:

    1
    2
    3
    4
    DBE_SESSION.SEARCH_CONTEXT (
        namespace text,
        attribute text
    )returns text;
    
    Table 4 DBE_SESSION.SEARCH_CONTEXT interface parameters

    Parameter

    Type

    Input/Output Parameter

    Can Be Empty

    Description

    namespace

    TEXT

    IN

    No

    Context specified by the user. The value contains a maximum of 128 bytes. If the value exceeds 128 bytes, it will be truncated.

    attribute

    TEXT

    IN

    No

    Attribute to be searched for. The value contains a maximum of 1024 bytes. If the value exceeds 1024 bytes, it will be truncated.

    Example:
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    DECLARE
        a text;
    BEGIN
        DBE_SESSION.set_context('test', 'gaussdb', 'one');   --Set the gaussdb attribute in the test context to one.
        a := DBE_SESSION.search_context('test', 'gaussdb');
        DBE_OUTPUT.PRINT_LINE(a);
        DBE_SESSION.clear_context('test', 'test','gaussdb');
    END;
    /
    -- Expected result:
    one
    ANONYMOUS BLOCK EXECUTE
    
  • DBE_SESSION.MODIFY_PACKAGE_STATE

    Changes the PL/SQL status of the current session. The prototype of the DBE_SESSION.MODIFY_PACKAGE_STATE function is:

    1
    2
    DBE_SESSION.MODIFY_PACKAGE_STATE (
          flags int);
    
    Table 5 DBE_SESSION.MODIFY_PACKAGE_STATE interface parameters

    Parameter

    Type

    Input/Output Parameter

    Can Be Empty

    Description

    flags

    INT

    IN

    No

    Bit flag of the operation performed on the PL/SQL.

    When flags is set to 1, the session cache of the PL/SQL that is currently running in the session is released after the top-level PL/SQL is executed. The current value of any package is cleared globally and the cached cursor is closed. On subsequent use, PL/SQL re-instantiates and re-initializes the package globally.

    Other bit flags are not supported.

    Example:
    1
    2
    3
    4
    5
    CALL dbe_session.modify_package_state(1);
     modify_package_state 
    ----------------------
    
    (1 row)
    

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback