Setup

This chapter contains Setup instructions for DidiSoft ORA_RSA 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’) which has the SYSDBA role, 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 to use loadjava
grant JAVA_ADMIN TO smithj;
grant JAVAUSERPRIV 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-rsa-1.2.1.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-rsa-1.2.1.jar

ORA_RSA

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

[extraction folder]/SetupFiles/Ora_RSA_Pack age.sql
[extraction folder]/SetupFiles/Ora_RSA_Pack age_Body.sql

Step 3.2) Permissions
Using your favorite PL/SQL execution environment (SQL*Plus, Oracle(c) SQLDeveloper(c), etc.) execute:

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 user/schema name that will
execute the code.

ORA_SMIME

Step 4.1) Registering the ORA_SMIME PL/SQL package

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

[extraction folder]/SetupFiles/Ora_SMIME_Package.sql
[extraction folder]/SetupFiles/Ora_SMIME_Package_Body.sql

Step 4.2) ORA_SMIME Email sending Permissions

In order to use ORA_SMIME with UTL_SMTP, proper SMTP permissions must be granted for UTL_SMTP to each schema (database user with login permissions) that will access UTL_SMTP.

Note: Please refer to the official Oracle documentation for UTL_SMTP for more details.

The example code below creates ACL (Access Control List) for a user called ‘SMITHJ’ to use the SMTP server at localhost, port 25:

BEGIN
  DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('acl_for_mail.xml', 'ACL for Mail Job','SMITHJ', TRUE, 'connect');
  DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('acl_for_mail.xml','localhost', 25);
COMMIT;
END;
/
grant EXECUTE ON UTL_SMTP TO SMITHJ

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-152.jar
dropjava.sh/.bat -r -v – u smithj/pass [extraction folder]\SetupFiles\ora-rsa-1.1.1.jar

Then continue to Setup

Note: Replace above user/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-152.jar
dropjava.sh/.bat -r -v – u smithj/pass [extraction folder]\SetupFiles\ora-rsa-1.1.1.jar

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

DROP package ORA_RSA;
DROP package body ORA_RSA;
 
DROP package ORA_SMIME;
DROP package body ORA_SMIME;

Note: Replace above user/pass with the database user/schema name and password
that were used in sub chapter 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