Oracle8i Migration
Release 3 (8.1.7)

Part Number A86632-01

Library

Product

Contents

Index

Go to previous page Go to next page

10
Upgrading Your Applications

This chapter describes upgrading your current applications and covers the following topics:

Overview of Upgrading Applications to Oracle8i

You do not need to modify existing Oracle7 and Oracle release 8.0 applications that do not use new Oracle release 8.1 features. Existing applications running against a release 8.1 database function the same as they did on prior releases and achieve the same, or enhanced, performance.

Many new features and enhancements are available after migrating or upgrading to release 8.1. Some of these features provide added functionality, while others provide improved performance. Before you upgrade your applications, you should review these new features to decide which ones you want to use.

See Also:

Getting to Know Oracle8i for information new features available in release 8.1. 

Compatibility Issues for Applications

There may be compatibility issues between different releases of Oracle that could affect your application. These compatibility issues result from differences in the Oracle server in various releases. Also, in each new release of Oracle, new Oracle reserved words may be added, changes may be made to initialization parameters, and changes may be made to the data dictionary.

When you upgrade or migrate your Oracle server to a new release, make sure that your applications do not use any Oracle reserved words, that your applications are compatible with the initialization parameters of the server, and that your applications are compatible with the data dictionary of the server. Finally, a new release of Oracle software may require certain operating system versions or certain patch sets to be applied.

Both SQL*Net version 2 and Net8 work with various Oracle versions and releases. Thus, version 7 and version 8 databases can communicate by using both SQL*Net version 2 and Net8. SQL*Net version 1, however, used a different network addressing scheme and cannot be used with Oracle version 8.

See Also:

  • "Applications" for information about compatibility issues that relate to applications.

  • Appendix B for information about changes to initialization parameters.

  • Appendix C and Appendix D for information about changes to the data dictionary.

  • Oracle8i SQL Reference for a complete list of Oracle reserved words.

  • The Oracle documentation for your operating system for information about operating system requirements.

 

Upgrading Precompiler and OCI Applications

The upgrade path is very similar for precompiler and OCI applications. This section guides you through your upgrade options for these applications and notes differences between precompiler and OCI applications whenever necessary.

Create a test environment before you upgrade your production environment. Your test environment should include your upgraded application and the Oracle release 8.1 database. Also, your test environment should provide a realistic test of your application.

See Also:

Pro*C/C++ Precompiler Programmer's Guide, Pro*COBOL Precompiler Programmer's Guide, and Oracle Call Interface Programmer's Guide for more information about using these programming environments. 

Understanding Software Upgrades and Your Client/Server Configuration

To understand your options for upgrading precompiler and OCI application, you first need to understand the type of software upgrade you are performing and your client/server configuration.

Types of Software Upgrades

Three types of upgrades are possible for both client and server Oracle software.

Version Release Upgrade

The upgrade changes the first digit of the release number. For example, upgrading from any version 7 release to any version 8 release is a version release upgrade.

Feature Release Upgrade

The upgrade changes the second digit of the release number. For example, upgrading from any 8.0 release to any 8.1 release is a feature release upgrade.

Maintenance Release Upgrade

The upgrade changes the third digit of the release number. For example, upgrading from release 8.1.5 to release 8.1.7 is a maintenance release upgrade.

Possible Client/Server Configurations

Your precompiler and OCI applications run on the client in a client/server environment, where the Oracle database server is the server. You may use one or more of the following client/server configurations in your environment.

Different Computers

The client software and the server software are on different computers, and they are connected through a network. The client and server environments are separate.

Different Oracle Home Directories on the Same Computer

The client software and the server software are on the same computer, but they are installed in different Oracle home directories. Again, the client and server environments are separate.

Same Oracle Home

The client software and server software are installed in the same Oracle home on the same computer. In this case, any upgrade of the server software is also an upgrade of the client software.

See Also:

Oracle8i Concepts and Oracle8i Distributed Database Systems for more information about client/server environments. 

Compatibility Rules for Applications When Upgrading Oracle Software

This section covers compatibility rules that apply when you upgrade Oracle server software or Oracle client software. The rules are based on the type of software upgrade you are performing and on your client/server configuration.

The following sections contain compatibility rules for the following type of upgrades:

Upgrading the Oracle Server Software

The following rules apply when you upgrade the Oracle server software.

If You Do Not Change the Client Environment, Then You Do Not Need to Relink

If your client and server are on different computers or are in different Oracle home directories on the same computer, and you upgrade the Oracle server software without changing the client software, then you do not need to precompile, compile, or relink your applications. In these cases, the client software is separate from the server software and will continue to function against the server.

However, if your applications are using the same Oracle home as the Oracle server, then your server upgrade also upgrades your client software, and you must follow the rules in "Upgrading the Oracle Client Software".


Note:

It is possible to upgrade the Oracle server software but not install the new precompiler or OCI client software when you are using the same Oracle home for both. In this case, the client software is not upgraded. However, such a configuration is not recommended. 


Applications Can Run Against Newer or Older Oracle Server Releases

When you run a precompiler or OCI application against a database server, Oracle corporation recommends that the release of the database server software be the equal to or higher than the client software release, but this configuration is not strictly required. For example, if your Oracle client software is release 8.0.6, then your Oracle server software should be release 8.0.6 or higher to run a precompiler application on the client against the server.

However, the server and client software must be within one version of each other. Therefore, Pro*C and Pro*COBOL applications must be release 1.5 or higher to run against a version 8 database server. Applications using Pro*C 8.1 can work against an Oracle7 server if they do not use any new version 8 features, including the object capabilities, of the precompiler or server.

For OCI, version 7 client software can run against a version 8 Oracle server, and version 8 client software can run against a version 7 server. However, if the client software is version 6, then the server software must be version 7 or lower; in this case, the server software cannot be version 8. Similarly, if the client software is version 8, then the server software must be version 7 or higher; in this case, the server software cannot be version 6. Again, if a release 8.1 client is running against a version 7 server, then the application cannot use new version 8 features, including object capabilities.

Upgrading the Oracle Client Software

Oracle corporation recommends that you upgrade your client software to match the current server software. For example, if you upgrade your Oracle server to release 8.1.7, then Oracle corporation recommends upgrading the client software to release 8.1.7 as well. Keeping the server and client software at the same release number ensures the maximum stability for your applications. In addition, the latest Oracle client software may provide added functionality and performance enhancements that were not available with previous releases.

The following rules apply when you upgrade the Oracle client software.

Applications Can Be Linked with Newer Libraries

The code generated by precompiler applications can be linked with a release of the client library that is equal to or higher than the server release. However, the release of the precompiler libraries cannot be more than one versions newer than the precompiler client software. Therefore, Pro*C and Pro*COBOL applications must be release 1.5 or higher to link with Oracle version 8 libraries. In addition, Oracle version 7 and version 8 SQLLIB function calls can be mixed in the same application and the same transaction.

OCI applications can be linked with a version of the OCI run-time library that is equal to or higher than the version of the OCI library with which the application was developed.

Statically-Linked Applications Do Not Need to be Relinked

For statically-linked applications, when you perform any type of upgrade of the client software, you do not need to relink your precompiler and OCI applications. However, relinking is recommended because it may improve performance.

Applications Do Not Need To Be Relinked with Maintenance Release Upgrades

When you perform a maintenance release upgrade of the client software, you do not need to relink your applications. Your application continues to function normally without relinking. For example, if you upgrade the client software from release 8.1.5 to release 8.1.7, then you do not need to relink your applications.

Dynamically-Linked Precompiler Applications Must Be Relinked with Version or Feature Release Upgrades

When you perform a version or feature release upgrade of the client software, you must relink your precompiler applications. However, you do not need to precompile or compile the applications. For example, if you upgrade the client software from release 8.0.6 to release 8.1.7, then you must relink your precompiler applications. Or, if you upgrade the client software from version 7 to version 8, then you must relink your precompiler applications.


Note:

On some operating systems, relinking is not required for dynamically-linked precompiler applications when you perform a version or feature release upgrade of the client software. See the Oracle documentation for your operating system for more information. 


Dynamically-Linked OCI Applications Do Not Need To Be Relinked

When you perform a version or feature release upgrade of your client software, you do not need to relink your dynamically-linked OCI applications. However, relinking is recommended because it may improve performance.

Upgrading Options for Your Precompiler and OCI Applications

You have the following four options for upgrading your precompiler and OCI applications:

Option 1: 

Leave the application unchanged. Do not relink, precompile, or compile the application, and do not change the application code. The application will continue to work against an Oracle8i database. 

Option 2: 

Relink the application with the new Oracle8i libraries. Do not precompile or compile the application and do not change the application code. 

Option 3: 

Precompile and/or compile and then relink the application using the new Oracle8i software. Do not change the application code. 

Option 4: 

Change the application code to use new Oracle8i features. Then, precompile and/or compile and then relink the code. 

These options are listed in order of increasing difficulty and increasing potential benefits. That is, Option 1 is the least difficult option, but it offers the least potential benefits, while Option 4 is the most difficult option, but it offers the most potential benefits. These options are discussed in more detail below.

Option 1: Leave the Application Unchanged

You can leave the application unchanged, and it will continue to work with an Oracle8i database. The major advantage to this option is that it is simple and easy. In addition, this option requires the least amount of administration, because you do not need to upgrade all of your client computers. If you have a large number of client computers, then avoiding the administrative costs of upgrading all of them can become very important.

The major disadvantage to this option is that your application cannot use the new features that are available in Oracle8i. In addition, your application cannot leverage some of the possible performance benefits of Oracle8i.


Note:

When you perform certain types of upgrades, you are required to relink your application with the new libraries. For example, if you perform a version or feature release upgrade of the client environment, then you must relink. See "Compatibility Rules for Applications When Upgrading Oracle Software" for information about the rules to follow when you upgrade Oracle software. 


Option 2: Relink the Application with the New Oracle8i Libraries

You can relink the application with the new Oracle8i libraries, without making any code changes and without recompiling. By relinking, your application may benefit from performance improvements that are available only with the new libraries. Remember that you should always relink the application in a test environment before you relink in your production environment.


Note:

On operating systems that do not support shared libraries, you must relink your application if you want to include the new libraries in the executable. 


Option 3: Precompile and/or Compile the Application Using the New Software

You can precompile and/or compile the application with the new Oracle8i software, without making any code changes. This option requires that you install the new Oracle client software on each client computer. However, you only need to precompile and/or compile and relink your application once, regardless of the number of clients you have. The advantages, however, can be quite large.

By recompiling, you perform a syntax check of your application code. Some problems in the application code that were not detected by previous releases of the Oracle software may emerge when you precompile and/or compile with the new Oracle software. Therefore, precompiling and/or compiling with the new software often helps you detect and correct problems in the application code that may have gone unnoticed before.

Also, recompiling affords maximum stability for your application, because you are sure that it works with the new Oracle software. Further, your environment is ready for new development using the latest tools and features available. In addition, you may benefit from performance improvements that are available with the new Oracle software only after recompile and relink.

Option 4: Change the Application Code to Use New Oracle8i Features

You can make code changes to your application to take advantage of new Oracle8i features. This option is the most difficult, but it can provide the most potential benefits. You gain all of the advantages described in Option 3. In addition, you also benefit from change to your application that may leverage performance and scalability benefits available with Oracle8i. Further, you can add new features to your application that are available only with the new release of Oracle8i.

Become familiar with the new Oracle8i features by reading Getting to Know Oracle8i. Also, read the Oracle documentation for your development environment so that you understand how to implement the features you want to use. For the precompilers, see Pro*C/C++ Precompiler Programmer's Guide and Pro*COBOL Precompiler Programmer's Guide. For OCI, see Oracle Call Interface Programmer's Guide.

When you have decided on the new features you want to use, change the code of your application to use these features. Follow the appropriate instructions below based on your development environment:

Changing Precompiler Applications

Complete the following steps to change your precompiler application to use Oracle8i features:

  1. Perform one of the following actions based on whether the existing application is an Oracle version 7 application or an Oracle version 8 application:

    • If you have a version 7 application, then the existing version 7 application may need to be modified, or new applications written, to reflect the differences between version 7 and Oracle8i.

    • If you have a version 8 application and you want to take advantage of the new release 8.1 features, then incorporate code for the new release 8.1 functionality into the existing version 8 application.

  2. Precompile the application using the Oracle precompiler.

  3. Compile the application.

  4. Relink the application with the Oracle8i release 8.1 runtime library, SQLLIB, which is included with the precompiler.

Changing OCI Applications

Complete the following steps to change your OCI application to use Oracle8i features:

  1. Change your OCI calls in one of the following ways:

    • If your application uses Oracle version 7 OCI calls, then modify the applications to use only new Oracle8i release 8.1 OCI calls.

    • If your application uses Oracle version 7 OCI calls, then incorporate Oracle8i release 8.1 OCI calls into the existing application, while still using version 7 calls for some operations.

    • If your application uses only version 8 calls, then incorporate the new Oracle8i release 8.1 OCI calls into the existing application.

  2. Compile the application.

  3. Relink the application with the Oracle8i release 8.1 runtime library.

Upgrading SQL*Plus Scripts

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:

  1. Make the following changes to SQL*Plus release 3.x scripts to convert them into SQL*Plus release 8.0 or higher scripts:

    1. If a script contains the line SET COMPATIBILITY VERSION 7, then change it to SET COMPATIBILITY VERSION 8, or remove the line so that the default setting is used (VERSION 8).

    2. Check any login.sql and glogin.sql files and change any SET COMPATIBILITY VERSION 7 line found to SET COMPATIBILITY VERSION 8.

    3. Refer to the SQL*Plus User's Guide and Reference to learn about new functionality in SQL*Plus.

  2. To use new Oracle8i functionality, change existing SQL scripts to use the new Oracle8i syntax. Existing SQL scripts run unchanged on Oracle8i, and require no modification, if they do not use new Oracle8i functionality.

    See Also:

    Oracle8i SQL Reference for more information about upgrading SQL scripts.  


    Note:

    No changes to PL/SQL packages, procedures, or functions should be required. 


    .

Upgrading Oracle7 Forms or Oracle Developer Applications

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 and developer applications is provided in the Oracle Developer documentation set. Also, the Oracle Developer documentation for your operating system contains instructions for upgrading your forms or developer applications.


Note:

New releases of Oracle Developer may introduce new reserved words that are specific to Oracle Developer. Code changes may be required if your application uses any of these new reserved words. 



Go to previous page Go to next page
Oracle
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index