Using the Oracle Database Resource Manager with Smart Materials DBMS Scheduler Jobs - Intergraph Smart Materials - Version 2020 (10.0) - Installation & Upgrade - Hexagon

Intergraph Smart Materials Installation (2020)

Language
English
Product
Intergraph Smart Materials
Subproduct
Classic
Search by Category
Installation & Upgrade
Smart Materials/Smart Reference Data Version
2020 (10.0)

If you are using the DBMS resource manager functionality as described below by defining a value for the DBA setting BATCH_JOB_CLASS_SRD, you must re-create your definitions after doing an export/import of a database because the definitions will get lost.

Your batch jobs started by DBMS_SCHEDULER will in this case abort with a message indicating that the object <value of BATCH_JOB_CLASS_SRD> does not exist.

This section outlines the necessary steps to use the serialization functionality of the S5006 batch build ident. Please note that the Resource Manager feature must be available on your database (that is, you will need the Enterprise Edition of the Oracle RDBMS).

Execute the following steps as user SYS connected as SYSDBA. For more information, see the following Oracle Help:

Oracle® Database Administrator's Help 19c (19.20):

  • 27 Managing Resource Allocation with Oracle Database Resource Manager

    Oracle® Database PL/SQL Packages and Types Reference 19c (19.20):

  • 119 DBMS_RESOURCE_MANAGER

  • 120 DBMS_RESOURCE_MANAGER_PRIVS

  1. Create a resource plan containing at least one consumer group, and add plan directives for this group and the default groups DEFAULT_CONSUMER_GROUP and OTHER_GROUPS.

    Example to be executed in SQL-Plus:

    exec dbms_resource_manager.create_pending_area;

    exec dbms_resource_manager.create_plan(PLAN=>'SPMAT_PLAN', COMMENT=>'SPMAT_PLAN');

    exec dbms_resource_manager.create_consumer_group(CONSUMER_GROUP=>'SPMAT_BATCH', COMMENT=>'For Batch Jobs');

    exec dbms_resource_manager.create_plan_directive(PLAN=>'SPMAT_PLAN', GROUP_OR_SUBPLAN=>'SPMAT_BATCH', COMMENT=>'SPMAT', ACTIVE_SESS_POOL_P1=>1);

    This command restricts active sessions to 1 for this group.

    exec dbms_resource_manager.create_plan_directive(PLAN=>'SPMAT_PLAN', GROUP_OR_SUBPLAN=>'OTHER_GROUPS', COMMENT=>'OTHER');

    exec dbms_resource_manager.create_plan_directive(PLAN=>'SPMAT_PLAN', GROUP_OR_SUBPLAN=>'DEFAULT_CONSUMER_GROUP', COMMENT=>'DEFAULT');

    exec dbms_resource_manager.validate_pending_area;

    exec dbms_resource_manager.submit_pending_area;

  2. Enable the plan:

    alter system set resource_manager_plan = 'SPMAT_PLAN';

    This change will be reflected in the database parameter resource_manager_plan. You will need to store this parameter value in the initialization file to make this change permanent.

  3. Create a job class:

    exec dbms_scheduler.create_job_class(JOB_CLASS_NAME=>'SPMAT_BATCH',

    RESOURCE_CONSUMER_GROUP=>'SPMAT_BATCH', COMMENTS=>'SPMAT');

  4. Grant the consumer group to PUBLIC:

    exec DBMS_RESOURCE_MANAGER_PRIVS.GRANT_SWITCH_CONSUMER_GROUP(GRANTEE_NAME=>'PUBLIC', CONSUMER_GROUP=>'SPMAT_BATCH', GRANT_OPTION=>TRUE);

  5. In Smart Materials, on A.60.04 DBA Settings, set the value of BATCH_JOB_CLASS_SRD to the name of the job class created in step 3.