Consultor Eletrônico



Kbase P27234: How to export stored procedure definitions from a database
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   2/3/2009
Status: Verified

GOAL:

How to export stored procedure definitions from a database

GOAL:

What tables are Java stored procedures located in?

FACT(s) (Environment):

Progress 9.x
All Supported Operating Systems
OpenEdge 10.x

FIX:

In SQL-92, stored procedures (both the source and the compiled byte code) are stored in tables within the schema of the database. The tables that contain the stored procedure information are as follows:


- SYSPROCTEXT
- SYSPROCEDURES
- SYSPROCCOLUMNS
- SYSPROCBIN
To export Java stored procedures from these schema tables in a format from which they can be added into another database the SQLSCHEMA utility should be used. For example, the following statement causes a file called procs.dfsql to be created which contains everything needed to recreate all of the Java stored procedures which are defined in the database:


sqlschema -u user -s pwd -p %.% -o procs progress:T:localhost:8888:sports2000
The resulting text file can be loaded into the SQL Explorer and executed to recreate the Java stored procedures within the database.