Among the files in the oracap directory are the following:
dbasetup
create.sql
check.sql
The executable dbasetup uses the two .sql files. These allow an Administrator to create the relevant ops$ user for any Oracle instance from which they want to capture, and then to check that the user exists and has the relevant permissions.
- Create an Oracle User for Data Capture
- Check the Oracle User (NB – Checks the ops$ user for the current login)
- Create and Check an Oracle User for Data Capture
Any other Entry – Exit
Creating and checking will prompt for the three items needed to access the database:
Oracle_SID
Oracle_HOME
Path to sqlplus
If you choose 1 – Create, you will be prompted for an Oracle username sufficiently privileged to create a user and grant that user access to the V$ objects.
If you choose 2 – Check, the script will run a simple select against the V$ objects after entering the database as the ops$<Current UNIX User> user. Any problems discovered will be reported by Oracle error messages, for example “Table or View does not exist”, where no permissions have been set.
The script is “blinkered” for simplicity, so once an option has been initiated you need to use Ctrl-C to interrupt the process. Also, creation will check create.sql and allow the username to be changed, but be careful if you do this. Note that the suggested name is taken from the id command, so any irregularities may be linked to unusual UNIX implementations.