• Topic
  • Discussion
  • UdaWikiWeb.ConfigureDB2DBAliasonUnix(Last) -- Owiki? , 2016-08-19 14:59:46 Edit owiki 2016-08-19 14:59:46

    Configure a DB2 Database Alias (Unix)

    Use the following instructions to configure DB2 database aliases on Unix and Linux operating systems:

    1. Login to the machine that contains your DB2 native client software.

    2. su to your DB2 instance owner. For example:


    su - db2inst1


    3. Execute the .profile associated with the db2instance owner. For example:


    . ./.profile

    4. Use the echo command to ensure DB2DIR is set.


    echo $DB2DIR


    5. Use the echo command to ensure DB2INSTANCE is set.


    echo $DB2INSTANCE


    6. cd into the $DB2INSTANCE/sqllib/bin directory.


    cd $DB2INSTANCE/sqllib/bin


    7. Execute the db2 command.


    ./db2


    8. Execute the catalog node command using the following syntax.


    catalog tcpip node arbitrary_node_name remote database_server_name server db2_listening_port


    Here is an example:


    catalog tcpip node WIN64IA remote openwin64 server 50000

    9. Execute the terminate command.


    terminate


    10. Execute the catalog database command using the following syntax:


    catalog database database_name as remotedb at node arbitrary_node_name_from_above


    Here is an example:


    catalog database sample as remotedb at node WIN64IA


    11. Execute the terminate command.


    terminate


    11. Execute the connect to database command where database is the remotedb alias from step #10. For example:


    connect to remotedb


    12. Wait for a successful connection.

    Use the remotedb alias in the database alias field of your DB2 Lite Data Source Names.


    Referenced by...