Oracle 视图 DBA_SCHEDULER_JOB_ROLES 官方解释,作用,如何使用详细说明

本站中文解释

Oracle视图DBA_SCHEDULER_JOB_ROLES用于查看定义的作业角色及其成员的权限。

DBA_SCHEDULER_JO_ROLES是一个系统视图,用于查看已定义的作业角色及其权限。它可以帮助您对Oracle 数据库中的作业的各种行为和角色进行监视和管理,如角色的创建、修改以及删除,还有查找哪里有哪些角色成员,这些成员又拥有哪些权限,这一切可以通过该视图来快速完成。

使用该视图可以询问:哪些作业角色有被定义;这些角色的成员有哪些;角色的成员拥有的权限有哪些。

使用此视图的步骤是:

1. 使用SELECT语句查询作业角色:

SELECT JOB_ROLE FROM DBA_SCHEDULER_JOB_ROLES;

2. 使用JOIN来查询角色成员:

SELECT ROLE_NAME,USER_NAME,AUTHORIZATION FROM DBA_SCHEDULER_JOB_ROLE_MEMBERS LEFT JOIN DBA_SCHEDULER_JOB_ROLES ON (DBA_SCHEDULER_JOB_ROLE_MEMBERS.JOB_ROLE=DBA_SCHEDULER_JOB_ROLES.JOB_ROLE);

3. 使用查询语句查询作业角色成员拥有的权限:

SELECT ROLE_NAME,AUTHORIZATION,PRIVILEGE FROM DBA_SCHEDULER_JOB_ROLE_MEMBERS LEFT JOIN DBA_SCHEDULER_JOB_ROLES ON (DBA_SCHEDULER_JOB_ROLE_MEMBERS.JOB_ROLE=DBA_SCHEDULER_JOB_ROLES.JOB_ROLE_NAME);

可以使用以上几种查询语句来查询数据库中定义的作业角色及其成员的权限。

官方英文解释

DBA_SCHEDULER_JOB_ROLES displays information about all Scheduler jobs in the database by database role.

Column Datatype NULL Description

OWNER

VARCHAR2(128)

NOT NULL

Owner of the Scheduler job

JOB_NAME

VARCHAR2(128)

NOT NULL

Name of the Scheduler job

JOB_SUBNAME

VARCHAR2(128)

Subname of the Scheduler job (for a job running a chain step)

JOB_CREATOR

VARCHAR2(128)

Creator of the Scheduler job

DATABASE_ROLE

VARCHAR2(16)

Name of the database role

PROGRAM_OWNER

VARCHAR2(4000)

Owner of the program associated with the job

PROGRAM_NAME

VARCHAR2(4000)

Name of the program associated with the job

JOB_TYPE

VARCHAR2(16)

Inline job action type:

  • PLSQL_BLOCK

  • STORED_PROCEDURE

  • EXECUTABLE

  • CHAIN

JOB_ACTION

VARCHAR2(4000)

Inline job action

JOB_CLASS

VARCHAR2(128)

Name of the job class associated with the job

SCHEDULE_OWNER

VARCHAR2(4000)

Owner of the schedule that the job uses (can be a window or a window group)

SCHEDULE_NAME

VARCHAR2(4000)

Name of the schedule that the job uses (can be a window or a window group)

SCHEDULE_TYPE

VARCHAR2(12)

Type of the schedule that the job uses:

  • IMMEDIATE – Start date and repeat interval are NULL

  • ONCE – Repeat interval is NULL

  • PLSQL – PL/SQL expression used as schedule

  • CALENDAR – Oracle calendaring expression used as schedule

  • EVENT – Event schedule

  • NAMED – Named schedule

  • WINDOW – Window used as schedule

  • WINDOW_GROUP – Window group used as schedule

START_DATE

TIMESTAMP(6) WITH TIME ZONE

Original scheduled start date of the job (for an inline schedule)

REPEAT_INTERVAL

VARCHAR2(4000)

Inline schedule PL/SQL expression or calendar string

END_DATE

TIMESTAMP(6) WITH TIME ZONE

Date after which the job will no longer run (for an inline schedule)

LAST_START_DATE

TIMESTAMP(6) WITH TIME ZONE

Last date on which the job ran

ENABLED

VARCHAR2(5)

Indicates whether the job is enabled (TRUE) or disabled (FALSE)

STATE

VARCHAR2(15)

Current state of the job:

  • DISABLED

  • RETRY SCHEDULED

  • SCHEDULED

  • RUNNING

  • COMPLETED

  • BROKEN

  • FAILED

  • REMOTE

  • SUCCEEDED

  • CHAIN_STALLED

COMMENTS

VARCHAR2(4000)

Comments on the job


数据运维技术 » Oracle 视图 DBA_SCHEDULER_JOB_ROLES 官方解释,作用,如何使用详细说明