Oracle8i Migration Release 8.1.5 A67774-01 |
|
This chapter describes upgrading your current applications to take advantage of new release 8.1 features. You do not need to modify existing Oracle7 and release 8.0 applications that do not use new release 8.1 features. Existing applications should achieve the same, or enhanced, functionality on a release 8.1 database.
The following topics are covered in this chapter:
The following version 8 features aid in the process of upgrading applications to release 8.1:
If you are migrating your Oracle database from Oracle7 to Oracle8i, before you migrate the database, upgrade any precompiler and OCI applications that you plan to use with your Oracle8i databases. Then, you can test these applications on a sample Oracle8i database before migrating your production database.
The effort required to upgrade these applications depends on the degree to which you want to take advantage of the programmatic interfaces and Oracle8i. In order of increasing difficulty, you can choose to:
The following sections provide more information about upgrading OCI and precompiler applications.
Application developers have the following options if they want to incorporate release 8.1 functionality into existing OCI applications:
See Oracle Call Interface Programmer's Guide for more information about writing and upgrading OCI applications.
See Also:
Starting with release 8.1, OCI applications can use the batch error mode when executing array DMLs using OCIStmtExecute. To do this, both the OCI and server libraries must be release 8.1 or higher.
You can modify existing applications to use batch error mode by setting the mode parameter to OCI_BATCH_ERRORS and adding new code required for this functionality. Then, recompile and relink the application with the release 8.1 client libraries.
Starting with release 8.1, client notification is supported in OCI applications using the publish/subscribe interface. Client notification enables applications to take advantage of Database Event Publication and Advanced Queuing features. To use the client notification feature, client applications must link with release 8.1 or higher client libraries.
Starting with release 8.1, the LISTEN call is supported in OCI applications. The LISTEN call is available with the Advanced Queuing Option and can be used to monitor a set of queues for a message. To use the LISTEN call, client applications must link with release 8.1 or higher client libraries.
Complete the following steps to use your existing precompiler applications with a release 8.1 database:
If you decide not to take advantage of release 8.1 features with an existing application, skip this step and move on to Step 2.
Applications written to work with Oracle7 precompilers, such as Pro*C 2.2, have a very smooth upgrade path to Oracle8i precompilers, such as Pro*C 8.1. Oracle7 precompiler clients work with an Oracle8i server, and Oracle8i precompiler clients can work with an Oracle7 server.
Specifically, the following list outlines precompiler/server compatibility. The list uses Pro*C as an example, but the information also applies to Pro*COBOL:
The following three alternative upgrade paths are available for an existing Oracle7 application, without requiring recompilation or re-precompilation. Again, the list uses Pro*C as an example, but the information also applies to Pro*COBOL:
Pro*C/C++ Precompiler Programmer's Guide and Pro*COBOL Precompiler Programmer's Guide for more information about precompiler applications.
See Also:
To use SQL*Plus release 8.0 or higher, a release 8.0 or higher database, and PL/SQL release 8.0 and higher functionality, complete the following steps:
login.sql
file(s) and change any SET COMPATIBILITY VERSION 7 line found to SET COMPATIBILITY VERSION 8.
Forms applications run the same on Oracle7 and Oracle8i. However, review the new features described in Getting to Know Oracle8i to determine whether any of the new Oracle8i features would be beneficial to your applications or might otherwise affect them. Information about the ways in which the Oracle8i features interact with Forms applications is provided in the Oracle Forms 4.5 Reference Manual, Vol.1 and Vol. 2, the Oracle Forms 4.5 Developer's Guide and Forms 4.5 Advanced Techniques.
LOB datatypes (BFILE, BLOB, CLOB, and NCLOB) can provide many advantages over LONG datatypes. See Oracle8i Concepts for information about the differences between LOB and LONG datatypes.
In release 8.1, a new SQL operator, TO_LOB, copies data from a LONG column in a table to a LOB column. The datatype of the LONG and LOB must be the same for a successful copy. For example, LONG RAW data must be copied to BLOB data, and LONG data must be copied to CLOB data.
In the examples in the following procedure, the LONG column named LONG_COL in table LONG_TAB is copied to a LOB column named LOB_COL in table LOB_TAB. These tables include an ID column that contains identification numbers for each row in the table.
Complete the following steps to copy data from a LONG column to a LOB column:
For example, suppose you have a table with the following definition:
CREATE TABLE long_tab ( id NUMBER, long_col LONG);
Create a new table using the following SQL statement:
CREATE TABLE lob_tab ( id NUMBER, clob_col CLOB);
For example, issue the following SQL statement:
INSERT INTO lob_tab SELECT id, TO_LOB(long_col) FROM long_tab;
For example, issue the following SQL command to drop the LONG_TAB table:
DROP TABLE long_tab;
For example, issue the following SQL statement:
CREATE SYNONYM long_tab FOR lob_tab;
Once the copy is complete, any applications that use the table must be modified to use the LOB data.
See Also:
Oracle8i Application Developer's Guide - Large Objects (LOBs) for information about modifying applications to use LOB data. |