| General Information |
| Library Note |
Morgan's Library Page Header
|
| Purpose |
Real Application Security |
| AUTHID |
CURRENT_USER |
| Dependencies |
|
| Documented |
Yes |
| First Available |
11.2 |
| Security Model |
Owned by SYS with EXECUTE granted to the DBA role |
| Source |
{ORACLE_HOME}/rdbms/admin/prvtkzrxu.plb |
| Subprograms |
|
| |
| SET_PASSWORD |
| Sets the schema password for a Principal |
dbms_xs_principals.set_password(
username IN VARCHAR2,
password IN VARCHAR2,
type IN BINARY_INTEGER,
opassword IN VARCHAR2); |
-- modified and simplified from the Oracle docs
BEGIN
sys.xs_principal.create_role(name => 'Americas_sales', enabled => TRUE);
sys.xs_principal.create_user(name =>' C##APPLIC', schema => 'SH');
sys.dbms_xs_principals.set_password('C##APPLIC', "N0wAy8$", xs_principal.xs_sha512);
sys.xs_principal.grant_roles('C##APPLIC', 'Americas_sales');
END;
/
PL/SQL procedure completed successfully. |
| |
| SET_VERIFIER |
| Creates a verifier for a Principal |
dbms_xs_principals.set_verifier(
username IN VARCHAR2,
verifier IN VARCHAR2,
type IN PLS_INTEGER := XS_SHA512); |
SELECT standard_hash('ZZYZX'');
STANDARD_HASH('ZZYZX')
----------------------------------------
04867015BE89A96E9FEE095F87B606595306D6AB
DECLARE
verStr dbms_id;
BEGIN
SELECT standard_hash('ZZYZX') INTO verStr;
dbms_xs_principals.set_verifier('C##APPLIC',
verStr);
END;
/
PL/SQL procedure completed successfully. |