DataPump Export Changes The Job Attribute ALLOW_RUNS_IN_RESTRICTED_MODE From TRUE To FALSE (Doc ID 1119454.1)

Last updated on NOVEMBER 28, 2016

Applies to:

Oracle Server - Enterprise Edition - Version: 11.2.0.1 to 11.2.0.2 - Release: 11.2 to 11.2
Information in this document applies to any platform.

Symptoms

You created a scheduler job and set the attribute ALLOW_RUNS_IN_RESTRICTED_MODE to TRUE. After DataPump export/import the parameter is set to FALSE.

The next example demonstrates this:

connect / as sysdba

-- create environment
create or replace directory a_dir as '/tmp';

create user a_usr identified by a_usr default tablespace users temporary tablespace temp;
grant connect, resource, dba to a_usr;
grant read, write on directory a_dir to a_usr;

connect a_usr/a_usr

declare
  l_job_name varchar2(50);
  l_cnt pls_integer;

begin
  l_job_name := user||'.INSTALL_JOB';

  dbms_scheduler.create_job (job_name   => l_job_name,
                             job_type   => 'PLSQL_BLOCK',
                             job_action => 'begin null; end;',
                             start_date => systimestamp,
                             enabled    => false,
                             auto_drop  => false);

  dbms_scheduler.set_attribute (name      => l_job_name,
                                attribute => 'allow_runs_in_restricted_mode',
                                value     => true);
end;
/

connect / as sysdba

select owner, job_name, allow_runs_in_restricted_mode
from   dba_scheduler_jobs
where  owner = 'A_USR';

OWNER                          JOB_NAME                       ALLOW
------------------------------ ------------------------------ -----
A_USR                          INSTALL_JOB                    TRUE

host expdp system/password directory=a_dir dumpfile=a_usr.dmp reuse_dumpfiles=y schemas=a_usr

Export: Release 11.2.0.1.0 - Production on Mon Apr 26 16:04:23 2010

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYSTEM"."SYS_EXPORT_SCHEMA_06": system/******** directory=a_dir
dumpfile=a_usr.dmp reuse_dumpfiles=y schemas=a_usr
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 0 KB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/POST_SCHEMA/PROCOBJ
Master table "SYSTEM"."SYS_EXPORT_SCHEMA_06" successfully loaded/unloaded
******************************************************************************
Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_06 is:
/tmp/a_usr.dmp
Job "SYSTEM"."SYS_EXPORT_SCHEMA_06" successfully completed at 16:04:44

drop user a_usr cascade;
purge dba_recyclebin;

host impdp system/manager directory=a_dir dumpfile=a_usr.dmp full=y

Import: Release 11.2.0.1.0 - Production on Mon Apr 26 16:06:08 2010

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYSTEM"."SYS_IMPORT_FULL_02" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_02": system/******** directory=a_dir
dumpfile=a_usr.dmp full=y
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/POST_SCHEMA/PROCOBJ
Job "SYSTEM"."SYS_IMPORT_FULL_02" successfully completed at 16:06:13

select owner, job_name, allow_runs_in_restricted_mode
from   dba_scheduler_jobs
where  owner = 'A_USR';

OWNER                          JOB_NAME                       ALLOW
------------------------------ ------------------------------ -----
A_USR                          INSTALL_JOB                    FALSE

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms