Env: Oracle 11.2.0.3 RAC, OIM 11.1.2.0 (Yes, that is correct). We cannot upgrade where the following can be setup to run automatically via OIM console.
The archive/purge utility can take a long time to run. I want to be able to have it run in the background using nohup, so it will continue running should anything happen to my connection. Any other suggestions other than using nohup would also be great. Note, we do not have EM installed.
I'm eventually working towards setting up a cron job to run a manual archive/purge operation, but I wan't to get the nohup plus arguments working first.
For example, I'm trying to purge Task records from the OSH, OSI, and SCH tables by running the OIM_TasksArch.sh shell script. This script, when run, prompts for the following:
## Enter the ORACLE HOME directory or Press [Enter] to
accept the default /u01/app/oracle/product/11.2.0.3/dbhome_1 as ORACLE_HOME.
## Is your Oracle Identity Manager(OIM) database running on a remote machine [y/Y/n/N]?
## Current database <ORACLE_SID> is CHKPIAM12
Do you want to continue with this database [y,Y,n,N] ?
## Enter Oracle Identity Manager(OIM) database user name
## Enter password for Oracle Identity Manager (production_oim) database user
## OIM Task Archival Main Menu
----------------------------
1) Archive Provisioning Tasks which have been Completed/Cancelled
2) Archive Approval Tasks which have been Completed/Cancelled
3) Exit
Enter an option :
## Utility Running Mode Sub Menu
-------------------------------
1. Online Mode(OIM will be usable while Archival utility may run slower)
2. Offline Mode (Archival operation can be speeded up by running in offline mode
but OIM is not usable until utility completes archival operation.
Please make sure OIM is not running before choosing this option.)
Enter an option :
## Enter date in YYYYMMDD format (tasks created before this date value will be archived)
Calculating the number of records that would be archived,
this may take some time, please wait...
(NOTE: Then it displays how many records will be deleted from the tables, this process takes a long time to calculate the number... i.e.)
1021835 records from table OSH will be archived and deleted.
528474 records from table SCH will be archived and deleted.
528474 records from table OSI will be archived and deleted.
# Confirm the database can handle the date range/load. If not, enter another date with fewer records.
Here are the values I need to enter:
[Enter key]
n
y
dev_oim
password
1
1
20150113
y
This is my first foray into using nohup with arguments and shell script. Here's the command I tried:
nohup ./OIM_TasksArch.sh \n n y DEV_OIM password 1 1 20150113 y &
This created an ever increasing nohup.out file that seemed to be caught in a loop, doing the following over and over until I killed the process at the OS level:
^[[H^[[2J^[[H^[[2Jstty: standard input: Inappropriate ioctl for device
stty: standard input: Inappropriate ioctl for device
stty: standard input: Inappropriate ioctl for device
## Enter the ORACLE HOME directory or Press [Enter] to
accept the default /u01/app/oracle/product/11.2.0.3 as ORACLE_HOME.
./OIM_TasksArch.sh: line 73: read: read error: 0: Bad file descriptor
## Is your Oracle Identity Manager(OIM) database running on a remote machine [y/Y/n/N]?
./OIM_TasksArch.sh: line 109: read: read error: 0: Bad file descriptor
ERROR ==> Wrong Selection....Select [y,Y,n,N]
Any suggestions? ideas?
Thank you in advance!
Chris