SQL*Plus - Intergraph Smart Materials - Version 10.2 - Customization & Programming - Hexagon

Intergraph Smart Materials Customization (10.2)

Language
English
Product
Intergraph Smart Materials
Subproduct
Classic
Search by Category
Customization & Programming
Smart Materials/Smart Reference Data Version
10.2

By connecting to the database as M_SYS user, you can compile the modified package using SQL*Plus.

To spool out the package for editing, you must have two scripts: one for the package spec and one for the package body. The scripts start with the commands ‘CREATE OR REPLACE PACKAGE’ (for the spec) and ‘CREATE OR REPLACE PACKAGE BODY’.

With SQL*Plus, such a file can be created using the following statements (example from the M_PCK_VERIFY_CUSTOM package body):

set heading off

set feedback off

spool M_PCK_VERIFY_CUSTOM.PKB

select decode(line,1, 'CREATE OR REPLACE ' || text, text)

from user_source

where type = 'PACKAGE BODY'

and upper(name) = 'M_PCK_VERIFY_CUSTOM'

order by line;

select '/' from dual;

spool off

This command spools the entire package body into a text file.

Before editing the custom package, you should save the original package code in a separate file.

Use an editor to open the M_PCK_VERIFY_CUSTOM.PKB file, apply your customizations, and save the modified file. Now run this file in SQL*Plus, which replaces the existing package in the database.

Finally, run the following command:

exec recomp;

to compile all objects that might have been invalidated by the changes.

During a migration or service pack installation, all custom packages are saved to files before the new version is installed. You can find these files in the dbserver\scripts directory. The Smart Materials release notes provide information about which custom packages and which data objects have been changed.