oracle scheduler是功能强大的定时调度程序,不但能调度job在本地数据库上运行,还能在远程主机上发起这些job,远程主机上不一定
oracle scheduler是功能强大的定时调度程序,不但能调度job在本地数据库上运行,还能在远程主机上发起这些job,远程主机上不一定要安装oracle数据库,但必须安装有scheduler agent,下面是完整的安装过程
安装过程中涉及到以下两部分操作:
1、对于存放remote job信息、负责发起调度的主数据库进行配置
2、在运行remote job的远程主机上安装scheduler agent,如果这台远程主机上不安装oracle database,那么仅可以运行remote external job,如果安装了oracle database那么还可以运行remote database job
完整的安装过程如下,在11.2.0.3版本下测试通过
============1、对存放remote job信息的主数据库进行配置============
///////////////////////////////////
/// 步骤1:安装xdb组件
///////////////////////////////////
###安装前检测库里是否已经安装过xdb,,如果安装过xdb,需要确认xdb的组件是否均处于有效状态;
---以下方法检查xdb组件,如果是valid那么xdb组件处于正常状态
col comp_name format a30
set linesize 130
select comp_name,status from dba_registry where comp_name='oracle xml database';
comp_name status
------------------------------ ----------------------
oracle xml database valid
---如果状态不是valid,那么需要运行以下脚本,根据脚本的输出来决定是否要重新安装
set serveroutput on
declare
v_xdb_installation_trigger number;
v_dropped_xdb_instll_trigger number;
v_dropped_xdb_instll_tab number;
begin
select count(*) into v_xdb_installation_trigger
from dba_triggers
where trigger_name = 'xdb_installation_trigger' and owner = 'sys';
select count(*) into v_dropped_xdb_instll_trigger
from dba_triggers
where trigger_name = 'dropped_xdb_trigger' and owner = 'sys';
select count(*) into v_dropped_xdb_instll_tab
from dba_tables
where table_name = 'dropped_xdb_instll_tab' and owner = 'sys';
if v_xdb_installation_trigger > 0 or v_dropped_xdb_instll_trigger > 0 or v_dropped_xdb_instll_tab > 0 then
if v_xdb_installation_trigger > 0 then
dbms_output.put_line('please proceed to run the command sql> drop trigger sys.xdb_installation_trigger');
-- drop trigger sys.xdb_installation_trigger;
end if;
if v_dropped_xdb_instll_trigger > 0 then
dbms_output.put_line('please proceed to run the command sql> drop trigger sys.dropped_xdb_instll_trigger');
-- drop trigger sys.dropped_xdb_instll_trigger;
end if;
if v_dropped_xdb_instll_tab > 0 then
dbms_output.put_line('please proceed to run the command sql> drop table sys.dropped_xdb_instll_tab');
-- drop table sys.dropped_xdb_instll_tab;
end if;
else
dbms_output.put_line('please proceed to run the xdb install or upgrade');
end if;
end;
/
###安装xdb的方法归纳如下
---创建xdb专用的表空间,如果要使用securefile lobs必须使用segment space management auto
create tablespace xdbts datafile '/oradata06/testaaaaa/xdbts1.dbf' size 500m extent management local segment space management auto;
---运行@?/rdbms/admin/catqm.sql
参数值含义如下:
:xdb user password
:xdb user default tablespace
:xdb user temporary tablespace
:yes or no(yes->使用securefile lobs;no->使用basicfile lobs)
---运行catqm.sql脚本
spool xdb_install.log
set echo on;
@?/rdbms/admin/catqm.sql asdf3_14 xdbts temp yes
@?/rdbms/admin/utlrp.sql
set echo off;
spool off;
---安装完成后再确认一下xdb组件的状态
col comp_name format a30
set linesize 130
select comp_name,status from dba_registry where comp_name='oracle xml database';
comp_name status
------------------------------ ----------------------
oracle xml database valid