RENAME TRUSTED CONTEXT statement
Use the RENAME TRUSTED CONTEXT statement to change the name of a trusted-context object.
This statement is an extension to the ANSI/ISO standard for SQL. You must hold the database security administrator (DBSECADM) role to rename a trusted context.
Syntax
Element | Description | Restrictions | Syntax |
---|---|---|---|
old_name | Trusted context identifier that new_name replaces | Must be an existing trusted-context object of the database server | Identifier |
new_name | New name that you declare here for the trusted context | Must be a one-part name, without qualifiers.
It cannot begin with the characters "SYS " and must
not identify a trusted context that already exists on the database
server. |
Identifier |
Usage
The new_name and the old_name cannot include qualifiers, such as owner, database, or dbserver.
- systrustedcontext
- systcxattributes
- systcxusers.
In addition, applications that attempt to establish a connection to the database by referencing the old_name will fail, unless the old_name has been declared as the identifier of a new trusted-context object.
If you rename the trusted context while trusted connections for this context are active, those connections remain trusted until they terminate, or until the next reuse attempt. If an attempt is made to switch the user on these trusted connections, however, an error is returned.
RENAME TRUSTED CONTEXT cntx1 TO cntx2;
- if cntx1 is not the name of a trusted-context object of the current database server instance,
- or if cntx2 is already the name of an existing trusted-context object of the same database server.