Data Virtuality Server にはuser and role management用の特別なストアド プロシージャがあります。
User Management
SYSADMIN.addUser
SYSADMIN.addUser(
IN
name
string
NOT
NULL
,
IN
pwd string
NOT
NULL
,
IN
role_name string
NOT
NULL
,
IN
loginAllowed boolean,
IN
concurrentQueries
integer
,
IN
maxQueryTime
integer
,
IN
maxRows
integer
,
IN
timezone string,
OUT
id biginteger
NOT
NULL
RESULT)
Example
CALL
"SYSADMIN.addUser"
(
"name"
=>
'user1'
,
"pwd"
=>
'password'
,
"role_name"
=>
'connect-dv-role'
,
"loginAllowed"
=>
true
,
"concurrentQueries"
=> 10,
"maxQueryTime"
=> 5,
"maxRows"
=> 100,
"timezone"
=>
'UTC'
);;
Please note that any schedules without an explicitly specified timezone will run in the timezone of the user who owns them. If that user does not have a timezone set, the schedules will run in the server’s timezone.
クエリ制限の詳細については、Resource Governorを参照してください。
SYSADMIN.importUser
SYSADMIN.importUser(
IN
name
string
NOT
NULL
,
IN
encryptedPwd string
NOT
NULL
,
IN
role_name string
NOT
NULL
,
IN
loginAllowed boolean,
IN
concurrentQueries
integer
,
IN
maxQueryTime
integer
,
IN
maxRows
integer
,
IN
timezone string,
OUT
id biginteger
NOT
NULL
RESULT)
このプロシージャにご留意ください:
本物のパスワードではなく、 暗号化されたパスワードが必要です;
パスワードをADDし、既存のUserに指定されたRoleを追加します;
permanent」("Admin")ユーザをインポートしようとすると例外をスローします。
SYSADMIN.renameUser
SYSADMIN.renameUser(
IN
name
string
NOT
NULL
,
IN
newName string
NOT
NULL
)
SYSADMIN.deleteUser
SYSADMIN.deleteUser(
IN
name
string
NOT
NULL
)
SYSADMIN.changeUserPwd
SYSADMIN.changeUserPwd(
IN
name
string
NOT
NULL
,
IN
pwd,
IN
encryptedPwd)
SYSADMIN.getEncryptedUserPwd
SYSADMIN.getEncryptedUserPwd(
IN
name
string
NOT
NULL
,
OUT
encryptedPwd string
NOT
NULL
RESULT)
SYSADMIN.getCurrentUser
このプロシージャは、現在のユーザの名前を返します。
SYSADMIN.getCurrentUser(
OUT
username string
NOT
NULL
RESULT)
SYSADMIN.allowUserLogin
このプロシージャは、ユーザーのログインを許可または拒否します。
SYSADMIN.allowUserLogin(
IN
name
string
NOT
NULL
,
IN
loginAllowed boolean
NOT
NULL
)
SYSADMIN.setUserTimezone
このプロシージャは、デフォルトのユーザーのタイムゾーンを設定できます。
SYSADMIN.setUserTimezone(
IN
name
string
NOT
NULL
,
IN
timezone string)
Example
CALL
"SYSADMIN.setUserTimezone"
(
"name"
=>
'user1'
,
"timezone"
=>
'UTC'
);;
Please note that any schedules without an explicitly specified timezone will run in the timezone of the user who owns them. If that user does not have a timezone set, the schedules will run in the server’s timezone.
Role Management
SYSADMIN.addRole
SYSADMIN.addRole(
IN
name
string
NOT
NULL
,
IN
allowCreateTempTables boolean,
OUT
id biginteger
NOT
NULL
RESULT)
SYSADMIN.renameRole
SYSADMIN.renameRole(
IN
name
string
NOT
NULL
,
IN
newName string
NOT
NULL
)
SYSADMIN.deleteRole
SYSADMIN.deleteRole(
IN
name
string
NOT
NULL
)
SYSADMIN.addUserRole
SYSADMIN.addUserRole(
IN
user_name string
NOT
NULL
,
IN
role_name string
NOT
NULL
)
SYSADMIN.deleteUserRole
SYSADMIN.deleteUserRole(
IN
user_name string
NOT
NULL
,
IN
role_name string
NOT
NULL
)
Query Limits
SYSADMIN.setUserLimits(
IN
name
string
NOT
NULL
,
IN
concurrentQueries
integer
,
IN
maxQueryTime
integer
,
IN
maxRows
integer
)
Example
CALL
"SYSADMIN.setUserLimits"
(
"name"
=>
'user1'
,
"concurrentQueries"
=>
10
,
"maxQueryTime"
=>
5
,
"maxRows"
=>
100
);;
クエリ制限の詳細については、以下をご覧ください。 Resource Governor