Skip Headers
Oracle® Database Client Installation Guide
10g Release 2 (10.2) for Linux x86

Part Number B15662-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

4 Postinstallation Tasks

This chapter describes how to complete postinstallation tasks after you have installed the software. It includes information about the following topics:

You must perform the tasks listed in the "Required Postinstallation Tasks" section. Oracle recommends that you perform the tasks listed in the "Recommended Postinstallation Tasks" section after all installations.

If you installed and intend to use any of the products listed in the "Required Product-Specific Postinstallation Tasks" section, then you must perform the tasks listed in the product-specific subsections.


Note:

This chapter describes basic configuration only. Refer to Oracle Database Administrator's Reference for Linux and Solaris Operating Systems and product-specific administration and tuning guides for more detailed configuration and tuning information.

4.1 Required Postinstallation Tasks

You must perform the tasks described in the following sections after completing an installation:

4.1.1 Downloading and Installing Patches

Check the OracleMetaLink Web site for required patches for your installation.


Note:

You cannot update Instant Client by downloading a patch. Use the procedure under "Updating Instant Client" to update Instant Client.

To download required patches:

  1. Use a Web browser to view the OracleMetaLink Web site:

    http://metalink.oracle.com
    
    
  2. Log in to OracleMetaLink.


    Note:

    If you are not an OracleMetaLink registered user, click Register for MetaLink! and follow the registration instructions.

  3. On the main OracleMetaLink page, click Patches.

  4. Select Simple Search.

  5. Specify the following information, then click Go:

    • In the Search By field, choose Product or Family, then specify RDBMS Server.

    • In the Release field, specify the current release number.

    • In the Patch Type field, specify Patchset/Minipack.

    • In the Platform or Language field, select your platform.

4.1.2 Running Oracle Enterprise Manager Java Console

In addition to using Oracle Enterprise Manager Database Control or Grid Control to manage an Oracle Database 10g database, you can also use the Oracle Enterprise Manager Java Console to manage databases from this release or previous releases. The Java Console is installed by the Administrator installation type.


Note:

Oracle recommends that you use Grid Control or Database Control in preference to the Java Console when possible.

To start the Java Console, follow these steps:

  1. Set the ORACLE_HOME environment variable to specify the Oracle home directory where you installed Oracle Client.

  2. Set the LD_LIBRARY_PATH shared library path environment variable of the system to the following:

    $ORACLE_HOME/lib:$LD_LIBRARY_PATH

  3. Enter the following command to start the Java Console:

    $ $ORACLE_HOME/bin/oemapp console
    

See Also:

The "Logging In to Oracle Enterprise Manager Database Control" section in Chapter 5 of Oracle Database Installation Guide for Linux x86 for information about logging in to Oracle Enterprise Manager Database Control

4.1.3 Updating Instant Client

To update Instant Client:

  1. Download Instant Client from Oracle Technology Network (http://www.oracle.com/technology/index.html).

  2. If you want to place the files in the existing directory, then ensure that the directory is empty.

    If you want to place the files into a different directory (and remove the previous files), ensure that you update the PATH environment variable setting to reflect the new location.


Caution:

A restriction on using Instant Client or Instant Client Light is that you cannot perform patch upgrades on it using the opatch utility. The reason is that the Instant Client installation does not create an inventory, which the patch upgrade process needs in order to perform. The absence of an inventory also means that installed interm patch reporting and conflict detection before a patch attempt are not possible.

4.1.4 Connecting with Instant Client

If you installed the Instant Client installation type, you can configure users' environments to enable dynamically linked client applications to connect to a database as follows:

  1. Set the appropriate shared library path environment variable for your platform to specify the directory that contains the Instant Client libraries. For the Instant Client installation type, this directory is the Oracle home directory that you specified during the installation, for example:

    /u01/app/oracle/product/10.2.0/client_1
    
    

    The required environment variable is LD_LIBRARY_PATH :

  2. Use one of the following methods to specify database connection information for the client application:

    • Specify a SQL connect URL string using the following format:

      //host:port/service_name
      
      
    • Set the TNS_ADMIN environment variable to specify the location of the tnsnames.ora file and specify a service name from that file.

    • Set the TNS_ADMIN environment variable and set the TWO_TASK environment variable to specify a service name from the tnsnames.ora file.


Note:

You do not have to specify the ORACLE_HOME environment variable.

4.2 Recommended Postinstallation Tasks

Oracle recommends that you perform the tasks described in the following section after completing an installation:

4.2.1 Configuring Instant Client Light

When you install Instant Client, the Instant Client libraries are installed under the ORACLE_HOME directory and the Instant Client Light specific library is installed installed under the ORACLE_HOME/light directory. To configure Instant Client Light, you must replace the ORACLE_HOME/libociei.so file with the ORACLE_HOME/light/libociicus.so file.

After replacing the library file, you must set the LD_LIBRARY_PATH environment variable to point to the location of the Instant Client shared library files. For example:

$ORACLE_HOME

4.2.2 Creating a Backup of the root.sh Script

Oracle recommends that you back up the root.sh script after you complete an installation. If you install other products in the same Oracle home directory, then Oracle Universal Installer updates the contents of the existing root.sh script during the installation. If you require information contained in the original root.sh script, then you can recover it from the backed up root.sh file.

4.2.3 Connecting Instant Client or Instant Client Light to an Oracle Database

Before you can connect Instant Client (including Instant Client Light) to an Oracle database, make sure that the LD_LIBRARY_PATH environment variable specifies the directory that contains the Instant Client libraries. This directory is the ORACLE_HOME directory that you specified during installation.

For example, the shared libraries for Instant Client or Instant Client Light (if you have configured Instant Client Light), are in:

/u01/app/oracle/product/10.2.0/client_1

After you have checked the LD_LIBRARY_PATH environment variable, you can use any of the following methods to specify Oracle Database connection information for client applications:

4.2.3.1 Specifying a Connection by Using the Easy Connect Naming Method

You can specify a connection address to an Oracle Database directly from a client application, without having to configure a tnsnames setting for the Instant Client. This method is convenient in that you do not have to create and manage a tnsnames.ora file. However, your application users will need to specify the host name and port number when they want to log in to your application.

For example, suppose you are running SQL*Plus on the client machine and want to connect to the sales_us database, which is located on a server whose host name is shobeen and port number is 1521. If you launch SQL*Plus from the command line, then you can log in as follows:

Enter user-name: system@admin@//shobeen:1521/sales_us

Similarly, in your application code, you can use Oracle Call Interface net naming methods to create the Instant Client-to-Oracle Database connection. For example, the following formats in the OCIServerAttach() call specify the connection information:

  • Specify a SQL connect URL string using the following format:

    //host[:port][/service_name]
    
    

    For example:

    //shobeen:1521/sales_us
    
    
  • Alternatively, you can specify the SQL connect information as an Oracle Net keyword-value pair. For example:

    "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) (HOST=shobeen) (PORT=1521))(CONNECT_DATA=(SERVICE_NAME=sales_us)))"
    

    See Also:

    Oracle Call Interface Programmer's Guide for more information on using Oracle Call Interface Instant Client

4.2.3.2 Specifying a Connection by Configuring a tnsnames.ora File

By default, when you install Instant Client, Oracle Universal Installer does not include a sample tnsnames.ora file nor the Oracle Net Configuration Assistant utility normally used to create it. However, if you want to shield users from having to specify actual host names and port numbers, you may want to consider using a tnsnames.ora file to set the Client-to-Oracle Database connection.

You can create the tnsnames.ora file manually by copying and modifying a version of this file from another Oracle installation, or you can use Oracle Net Configuration Assistant to create and manage it for you.

To install Oracle Net Configuration Assistant:

  1. Run Oracle Universal Installer.

  2. Select the Custom installation type.

  3. In the Available Product Components list, select Oracle Network Utilities and click Next.

  4. In the Summary screen, click Install, then click Exit and Yes to exit Oracle Universal Installer.

After you have installed Oracle Net Configuration Assistant, follow the procedure in "Connecting Oracle Database Client to an Oracle Database" on page 4-3 for each client computer.

Then, on each client computer, configure either of the following settings:

  • Set the TNS_ADMIN environment variable to specify the location of the tnsnames.ora file and specify a service name from that file.

  • Place the tnsnames.ora file in the $ORACLE_HOME/network/admin directory, and make sure that the ORACLE_HOME environment has been set to this Oracle home.


    See Also:

    Oracle Call Interface Programmer's Guide for more information on Oracle Call Interface Instant Client connection strings

4.2.3.3 Specifying a Connection by Using an Empty Connect String and the LOCAL Environment Variable

You can set the connect string to an empty connect string (""), and then set the LOCAL environment variable to one of the following values:

  • A direct address, as described under "Specifying a Connection by Using the Easy Connect Naming Method"

  • Oracle Net keyword-value pair

  • A tnsnames.ora entry and TNS_ADMIN is set to the location of tnsnames.ora

  • A tnsnames.ora entry and the following:

    • tnsnames.ora file located in $ORACLE_HOME/network/admin

    • The ORACLE_HOME environment variable set to this Oracle home

This method allows your applications to specify internally a connection string if the application code itself uses an empty connection string. The benefit of an empty connect string is that the application itself does not need to specify the tnsnames.ora entry. Instead, when a user invokes the application, the location of the database is determined by a script or the environment, depending on where you have set the LOCAL environment variable. The disadvantage of using empty strings is that you need to configure this additional information in order for your application to connect to the database.

4.2.4 Setting Up User Accounts

For information about setting up additional user accounts, refer to Oracle Database Administrator's Reference for Linux and Solaris Operating Systems.

4.2.5 Setting the NLS_LANG Environment Variable

NLS_LANG is an environment variable that specifies the locale behavior for Oracle software. This variable sets the language and territory used by the client application and the database server. It also sets the character set for the client, which is the character set for data entered or displayed by an Oracle client program, such as SQL*PLUS.

4.2.6 Generating the Client Static Library

The client static library (libclntst10.a) is not generated during installation. If you want to link your applications to the client static library, you must first generate it as follows:

  1. Switch user to oracle.

  2. Set the ORACLE_HOME environment variable to specify the Oracle home directory used by the Oracle Client installation. For example:

    • Bourne, Bash, or Korn shell:

      $ ORACLE_HOME=/u01/app/oracle/product/10.2.0/client_1 
      $ export ORACLE_HOME
      
      
    • C shell:

      % setenv ORACLE_HOME /u01/app/oracle/product/10.2.0/client_1
      
      
  3. Enter the following command:

    $ $ORACLE_HOME/bin/genclntst
    

4.3 Required Product-Specific Postinstallation Tasks

The following sections describe platform-specific postinstallation tasks that you must perform if you installed and intend to use the products mentioned:

4.3.1 Configuring Oracle Net Services

If you have a previous release of Oracle software installed on this system, you might want to copy information from the Oracle Net tnsnames.ora configuration file from the previous release to the corresponding file for the new release.


Note:

The default location for the tnsnames.ora file is the $ORACLE_HOME/network/admin/ directory. However, you can also use a central location for this file, for example /etc.

If necessary, you can also add connection information for additional database instances to the new file.

4.3.2 Configuring Oracle Precompilers

This section describes postinstallation tasks for Oracle precompilers.


Note:

All precompiler configuration files are located in the $ORACLE_HOME/precomp/admin directory.

4.3.2.1 Configuring Pro*C/C++

Verify that the PATH environment variable setting includes the directory that contains the C compiler executable.

Table 4-1 shows the default directories and the appropriate command to verify the path setting of the compiler.

Table 4-1 C/C++ Compiler Directory

Path Command
/usr/bin $ which gcc
/opt/intel/compiler70/ia32/bin $ which icc

4.3.2.2 Configuring Pro*FORTRAN

Verify that the PATH environment variable setting includes the directory that contains the FORTRAN compiler executable. You can verify the path setting by using the which xlf command. The path for the FORTRAN executable is /usr/bin.

4.3.3 Configuring OCCI

Two sets of Oracle C++ Call Interface (OCCI) libraries are installed with this release on Red Hat Enterprise Linux 3. One set is for use with GNU C++ compiler version 2.96 and the other set is for use with GNU C++ version 3.2. The libraries are installed in the following locations:

  • Libraries for use with GNU C++ version 2.96 supported on Red Hat Enterprise Linux 3 only:

    $ORACLE_HOME/lib/libocci10_296.a
    $ORACLE_HOME/lib/libocci10_296.so.10.1
    
    
  • Libraries for use with GNU C++ version 3.2:

    $ORACLE_HOME/lib/libocci10.a
    $ORACLE_HOME/lib/libocci10.so.10.1
    
    
  • Libraries for use with GNU C++ version 3.3 supported on SUSE Linux Enterprise Server 9:

    $ORACLE_HOME/lib/libocci10.a
    $ORACLE_HOME/lib/libocci10.so.10.1
    
    

Although the libraries are installed on all Linux distributions, they are not supported on all distributions. The following table shows the supported GNU C++ version for each distribution.

Linux Distribution GNU C++ Versions Supported
Red Hat Enterprise Linux AS/ES 3 Both 2.96 and 3.2
SUSE Linux Enterprise Server 9 Only 3.3.3-43

To create the required symbolic links in the $ORACLE_HOME/lib directory to the appropriate libraries for a distribution, you must you must create symbolic links to the libraries or overwrite the libraries after taking their backup. For example, you can use the following commands to create symbolic links to the libraries after removing $ORACLE_HOME/lib/libocci10.a and $ORACLE_HOME/lib/libocci10.so.10.1:

$ ln -s  $ORACLE_HOME/lib/libocci10_296.a $ORACLE_HOME/lib/libocci10.a
$ ln -s  $ORACLE_HOME/lib/libocci10_296.so.10.1 $ORACLE_HOME/lib/libocci10.so.10.1

Note:

If you run $ORACLE_HOME/bin/genoccish, then the libocci.so.10.1 library is regenerated by default. To regenerate the gcc2.96 OCCI shared object when you have not renamed or created symbolic linked the gcc 2.96 OCCI libraries to the default names, you must set the BUILD_CCC296 environment variable to 1 before running $ORACLE_HOME/bin/genoccish. This will regenerate the libocci10_296.so.10.1 library.

4.3.4 Configuring ODBC

The current release of Oracle ODBC Driver for Linux complies with the ODBC 3.52 specification. Features of the Linux version of the ODBC driver are based on the features of the Microsoft Windows version of the same driver. To set up the Oracle ODBC Driver:

  1. Add DSN entries for the Oracle ODBC driver in the odbc.ini and odbcinst.ini files.

    The following are sample entries of the odbc.ini file:

    [Oracle10gODBCDriver]
    Application Attributes = T
    Attributes = W
    BatchAutocommitMode = IfAllSuccessful
    CloseCursor = F
    DisableDPM = F
    DisableMTS = T
    Driver = Oracle10gODBCDriver
    DSN = TestDSN
    EXECSchemaOpt =
    EXECSyntax = T
    Failover = T
    FailoverDelay = 10
    FailoverRetryCount = 10
    FetchBufferSize = 64000
    ForceWCHAR = F
    Lobs = T
    Longs = T
    MetadataIdDefault = F
    QueryTimeout = T
    ResultSets = T
    # ServerName is TNS_alias_from_tnsnames.ora
    ServerName = OraDB
    SQLGetData extensions = F
    Translation DLL =
    Translation Option = 0
    UserID = scott
    
    

    The following are sample entries of the odbcinst.ini file:

    [Oracle10gODBCDriver]
    Description     = Oracle 10g Linux ODBC driver
    Driver = $ORACLE_HOME/lib/libsqora.so.10.1
    Setup         =
    FileUsage     =
    CPTimeout     =
    CPReuse       =
    

    See Also:

    For more information about adding DSN entries, refer to

    http://www.unixodbc.org


  2. If required, set the ORACLE_HOME environment variable.

  3. Run the following commands to set the LD_LIBRARY_PATH environment variable:

    • Bourne, Bash, or Korn shell:

      LD_LIBRARY_PATH=driver_manager_install_directory/lib:$LD_LIBRARY_PATH
      LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
      export LD_LIBRARY_PATH 
      
      
    • C shell:

      setenv LD_LIBRARY_PATH driver_manager_install_directory/lib:$LD_LIBRARY_PATHsetenv LD_LIBRARY_PATH $ORACLE_HOME/lib:$LD_LIBRARY_PATH
      

See Also:

Appendix F, "Using Oracle ODBC Driver" of Oracle Database Administrator's Reference for UNIX-Based Operating Systems