Setup

This chapter contains Setup instructions for DidiSoft ORA_PDF_PROTECT PL/SQL package.

Table of contents

1. Setup
2. Upgrade
3. Uninstall
4. Switch from trial to production version

Setup

Prerequisites

This product is a Java stored procedure package, and as such it resides in a database schema. You can use any schema (referred in the example calls below as ‘smithj’), but if you want to have a dedicated schema for this package, the minimum privileges needed are shown below:

CREATE USER smithj IDENTIFIED BY pass;
 
GRANT CREATE session TO smithj;
GRANT CREATE TABLE TO smithj;
GRANT CREATE ANY PROCEDURE TO smithj;
GRANT CREATE TYPE TO smithj;
 
-- this is needed in order to be able to store the JAR file contents
ALTER USER smithj quota unlimited ON USERS;

Setup steps

Step 1) Extract the distribution ZIP archive to a folder on your disk drive (referred below as “extraction
folder”)
Step 2) Load the JAR files
Load the JAR files using the loadjava.sh/.batutility located in the Oracle Database instance /BIN/ folder.
(For example on Windows C:\app\\product\\db_1\BIN\loadjava.bat)
Note: Replace below smithj/pass with a real database schema/user name and password applicable for your
Oracle Database.

[Windows environment]

loadjava.bat -r -v – u smithj/pass [extraction folder]\SetupFiles\jce-jdk13-161.jar
loadjava.bat -r -v – u smithj/pass [extraction folder]\SetupFiles\ora-pdf-protect-1.0.jar

[Unix environment]

loadjava.sh -r -v – u smithj/pass [extraction folder]/SetupFiles/jce-jdk13-161.jar
loadjava.sh -r -v – u smithj/pass [extraction folder]/SetupFiles/ora-pdf-protect-1.0.jar

Step 3) Register the ORA_PDF_PROTECT PL/SQL package
Using your favorite PL/SQL execution environment (SQL*Plus, Oracle(c) SQLDeveloper(c), etc.) execute the
scripts:

[extraction folder]/SetupFiles/OraPDFProtect_Package.sql
[extraction folder]/SetupFiles/OraPDFProtect_Package_Body.sql

Step 4) Permissions
Using your favorite PL/SQL execution environment (SQL*Plus, Oracle(c) SQLDeveloper(c), etc.) execute under a database login account that has the SYSDBA role:

CALL dbms_java.grant_permission( 'smithj',
'SYS:java.security.SecurityPermission', 'putProviderProperty.BC', '' );
CALL dbms_java.grant_permission( 'smithj',
'SYS:java.security.SecurityPermission', 'insertProvider.BC', '' );
commit;

Note: Replace above ‘smithj’ with the database schema name used in the previous steps.

Upgrade

Upgrading to a new version of ORA_RSA requires first to unload the old version JAR files from the
Oracle© database:

dropjava.sh/.bat -r -v – u smithj/pass [extraction folder]\SetupFiles\jce-jdk13-161.jar
dropjava.sh/.bat -r -v – u smithj/pass [extraction folder]\SetupFiles\ora-pdf-protect-1.0.jar

Then continue to Setup

Note: Replace above smithj/password with the database user/schema name and password used in the initial Setup.

Uninstall

The uninstall process requires first to unload the old version JAR files from the Oracle© database:

dropjava.sh/.bat -r -v – u smithj/pass [extraction folder]\SetupFiles\jce-jdk13-161.jar
dropjava.sh/.bat -r -v – u smithj/pass [extraction folder]\SetupFiles\ora-pdf-protect-1.0.jar

and afterwards to drop the ORA_PDF_PROTECT package using your favorite PL/SQL execution environment
(SQL*Plus, Oracle(c) SQLDeveloper(c), etc.

DROP package ORA_PDF_PROTECT;
DROP package body ORA_PDF_PROTECT;

Note: Replace above smithj/pass with the database schema name and password
that were used in paragraph Setup

From Trial to Production

To switch from an evaluation (trial) version of the software to a licensed production version, please execute
the steps as in the Upgrade process