Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
3 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
PACKAGE dbms_credential AUTHID CURRENT_USER AS
PRAGMA SUPPLEMENTAL_LOG_DATA(default, AUTO_WITH_COMMIT);
 
---Allowed credential logging levels
 
/*************************************************************
 * Credential Administration Procedures
 *************************************************************
 */
 
-- Create a new credential. The credential name can be optionally qualified
-- with a schema.
PROCEDURE create_credential(
  credential_name             IN VARCHAR2,
  username                    IN VARCHAR2,
  password                    IN VARCHAR2,
  database_role               IN VARCHAR2 DEFAULT NULL,
  windows_domain              IN VARCHAR2 DEFAULT NULL,
  comments                    IN VARCHAR2 DEFAULT NULL,
  enabled                     IN BOOLEAN  DEFAULT TRUE,
  key                         IN VARCHAR2 DEFAULT NULL,
  connect_identifier          IN VARCHAR2 DEFAULT NULL
);
PRAGMA SUPPLEMENTAL_LOG_DATA(create_credential, READ_ONLY);
 
-- Drops an existing credential (or a comma separated list of credentials).
-- When force is set to false the credential must not be
-- referred to by any job or extproc.  When force is set to true,
-- any jobs referring to this credential will be disabled (same behavior
-- as calling the disable routine on those jobs with the force option).
-- exproc alias libraries that reference the credential will become invalid
PROCEDURE drop_credential(
  credential_name             IN VARCHAR2,
  force                       IN BOOLEAN DEFAULT FALSE);
PRAGMA SUPPLEMENTAL_LOG_DATA(drop_credential, AUTO_WITH_COMMIT);
 
-- Update credential changes the value of an attribute for a given credential
-- credential attributes which can be updated with the following call:
--
-- username           - VARCHAR2
--                      user to execute the job as.
-- password           - VARCHAR2
--                      password to use to authenticate the user
-- comments           - VARCHAR2
--                      an optional comment. This can describe what the
--                      credential is intended to be used for.
-- windows_domain     - VARCHAR2
--                      Windows domain to use when logging in
-- NOTE-------------------------
-- The ENABLED attribute can not be updated with this call
PROCEDURE update_credential(
  credential_name             IN VARCHAR2,
  attribute                   IN VARCHAR2,
  value                       IN VARCHAR2);
PRAGMA SUPPLEMENTAL_LOG_DATA(update_credential, READ_ONLY);
 
-- Disables an existing Oracle credential
-- If force is set to FALSE, the credential must not be referenced by any
-- object or library. If the credential is referenced by an object, the call
-- returns error
-- If force is set to TRUE, the credential will be disabled either way
PROCEDURE disable_credential(
  credential_name             IN VARCHAR2,
  force                       IN BOOLEAN DEFAULT FALSE);
 
-- Enables an existing oracle credential
--This will NOT return an error if the credential was enabled already
PROCEDURE enable_credential(
  credential_name             IN VARCHAR2);
 
END dbms_credential;