Академический Документы
Профессиональный Документы
Культура Документы
CLEAR SCREEN
PROMPT
PROMPT **********************************************************
PROMPT * Currently Logged In User is: &schema_user
PROMPT *
PROMPT * NOTE: You MUST be logged in as the ECM Schema user
PROMPT * If not, press CTRL-C and log in as the ECM Schema User
PROMPT * user and run this script again.
PROMPT *
PROMPT * NOTE: If this user is correct press ENTER to continue.
PROMPT * or press CTRL-C to break now.
PROMPT **********************************************************
PAUSE
CLEAR SCREEN
PROMPT
PROMPT **********************************************************
PROMPT * User Input Required
PROMPT **********************************************************
PROMPT From the list select the id of the computer for to move tasks from
ACCEPT SrcServerID PROMPT 'Server ID: '
PROMPT From the list select the id of the computer for to move tasks from
ACCEPT DestServerID PROMPT 'Server ID: '
--##############################################################################
--# Display the user choices for confirmation.
--##############################################################################
CLEAR SCREEN
PROMPT
PROMPT You are moving tasks between the following computers
Select name "SOURCE"
from schregcomps
where computerid = &SrcServerID;
PROMPT
PROMPT If this is not correct, you shouldbreak out of this script now.
PROMPT Press the <ENTER> key to continue, or press CTRL-C to break now.
PAUSE
PROMPT ***********************************************************
PROMPT * CURRENT TIMESTAMP INFORMATION
PROMPT ***********************************************************
select current_timestamp from dual;
--insert a row into the system log showing these schedulers moved.
accts_table table_accts;
account_cur a_refcur;
nSrcID NUMBER;
nDestID NUMBER;
dActivityDate DATE;
sSrcName VARCHAR2(255);
sDestName VARCHAR2(255);
sGUID CHAR(38);
sCurr_Table CHAR(15);
sUserInfo VARCHAR2(255);
sSchema_User CHAR(50);
sGlobal_name VARCHAR2(4000);
sDesciption VARCHAR2(4000);
sReason VARCHAR2(4000);
nActivityType NUMBER;
sApplication VARCHAR2(50);
sComputer VARCHAR2(50);
sAcctName VARCHAR2(50);
sql_stmt VARCHAR2(1000);
V_ID CHAR(38);
V_DOMAINID CHAR(38);
V_USERINFO VARCHAR2(255);
V_ACTIVITYDATE DATE;
V_DESCRIPTION VARCHAR2(4000);
V_REASON VARCHAR2(4000);
V_ACTIVITYTYPE NUMBER;
V_APPLICATION VARCHAR2(50);
V_COMPUTER VARCHAR2(50);
BEGIN
-- Create a GUID
select '{'||substr(sys_guid(),1,8)||'-'||substr(sys_guid(),9,4)||'-'||
substr(sys_guid(),13,4)||'-'||substr(sys_guid(),17,4)||'-'||
substr(sys_guid(),20,12)||'}' into sGUID from dual;
END;
/
ALTER SESSION SET time_zone = dbtimezone;
drop table tmpsysloginfo;
PROMPT ***********************************************************
PROMPT * SCRIPT COMPLETE
PROMPT ***********************************************************