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’), 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.
Oracle 19c and 21c:
[Windows environment]
loadjava.bat -r -v – u smithj/pass [extraction folder]\SetupFiles\bcprov-jdk15on-1.61.jar
loadjava.bat -r -v – u smithj/pass [extraction folder]\SetupFiles\ora-rsa-<version>.jar
[Unix environment]
loadjava.sh -r -v – u smithj/pass [extraction folder]/SetupFiles/bcprov-jdk15on-1.61.jar
loadjava.sh -r -v – u smithj/pass [extraction folder]/SetupFiles/ora-rsa-<version>.jar
Oracle 12 and 28:
[Windows environment]
loadjava.bat -r -v – u smithj/pass [extraction folder]\SetupFiles\Oracle12_18\jce-jdk13-161.jar
loadjava.bat -r -v – u smithj/pass [extraction folder]\SetupFiles\Oracle12_18\ora-rsa-<version>.jar
[Unix environment]
loadjava.sh -r -v – u smithj/pass [extraction folder]/SetupFiles/Oracle12_18/jce-jdk13-161.jar
loadjava.sh -r -v – u smithj/pass [extraction folder]/SetupFiles/Oracle12_18/ora-rsa-<version>.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.) login under an account that has the SYSDBA role and 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 schema name used in the previous steps.
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. It has to be executed under a database account that has the SYSDBA role. The same applies to each different SMTP server that will be used with UTL_SMTP and ORA_SMIME:
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 |
ORA_XML
Step 4.1) Registering the ORA_XML PL/SQL package
loadjava.sh/.bat -r -v – u smithj/pass [extraction folder]\SetupFiles\ORA_XML\ora-xml-<version>.jar
Using your favorite PL/SQL execution environment (SQL*Plus, Oracle(c) SQLDeveloper(c), etc.) execute the scripts:
[extraction folder]/SetupFiles/Ora_XML_Package.sql
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-rsa-<version>.jar
Then continue to Setup
ORA_XML
dropjava.sh/.bat -r -v – u smithj/pass [extraction folder]\SetupFiles\ORA_XML\ora-xml-<version>.jar
Note: Replace above ‘smithj/pass‘ with the database user/schema name 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-rsa-<version>.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; DROP package ORA_XML; |
Note: Replace above ‘smithj/pass‘ with the database user/schema name used in the 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