ITEM: AV7938L

HOWTO: Netview/6000 using DB2/6000 Relational Database



Question:

Author:  Juann Chiang
Last Update Date:  02/27/96

Response:

**** Netview/6000 using DB2/6000 Relational Database Configuration Tips  *****

1. Configure Netivew/6000 database environment (login as root): 

    smit nv6000
     - Configure
          - List/Configure relational database
            - Configure relational database
                Choose db2/6000 for database and enter name of database server
                Enter database userid:   \<== Enter root and root's password

2. Create DB2/6000 database for Netview/6000 (login as DB2_instance): 

   db2 create database openview authentication server

       Note:  To remove NV database: "db2 drop database openview"

3. Make sure that database is connected and permissions are granted to root
   (login as DB2_instance):

   db2 connect to openview
   db2 grant bindadd, connect, createtab on database to root
   db2 grant select on sysibm.sysplan to root

4. Set up links to shared libraries (login as root):

   /usr/lpp/db2_01_01_0000/cfg/db2ln  

5. Set up a local DB2/6000 database server for Netview/6000 (login as root):

   export DB2INSTANCE=db2v1   
   export PATH=$PATH:/u/db2v1/sqllib/bin
   export DB2DBDFT=openview

   Note:  The name of DB2 instance in this configuration is "db2v1".

6. Create IP topology tables and other tables for trap and snmpCollect data
   (login as root):    

   db2_ovtoposql -c -U root -v
   trapsql -c -U root -v       
   nvColTable -c -U root -v  

   Note:  Do not run trapsql and nvColTable command if you intend to keep trap
          and snmpCollect data in original flat files. 

7. Installing DB2/6000 .bnd files (login as root):   

   The following command is not required unless the database tables are
   deleted(dropped) and recreated again, or when you install a new database
   code or new PTF.  Or, when the following error occurs:

          SQL0818 A timestamp conflict occured.

   This command will be executed automatically at previous configuration steps.

   nvdb2bind -B 7 -U root -v

   Note: This will install .bnd files for topology, trap and snmpCollect.
         Use another bind mask digit, instead of 7, if you do not intend to bind
         all of the tables created in step 6.

8. Configure ovtopmd to use DB2/6000 database (login as root):  

   ovstop

   /* Clear the database if needed */

      /usr/OV/bin/db2_ovtoposql -C -U root

   /* Convert topology flat files to relational database if there is
      data in the flat file. */ 
   
      ovtopoconv -E -v

   smit nv6000  
   - Configure
     - Set options for daemons
       - Set options for topology, discovery, and database daemons
         - Set options for ovtopmd daemon
           * Do you want to use an SQL relational database?  ==  "yes"

Note: If you change DB/2 instance password after the above
      configuration, you may get user authentication error.

Appendix:

A. To Start Up DB2/6000 And Netivew/6000 At System Restart

   Note:  It is suggested that you backup files first before you try
          any modification.

   1.  Modify /etc/rc.tcpip file as follows:

       . /u/\DB2_instance/sqllib/db2profile   \# Set up DB2 environment
       sleep 5                                 \# Wait for db2start to complete
       /etc/netnmrc                            \# Start Netview daemons

       Note:  A sample db2profile is appended in B.

   2. Add the following line to /etc/inittab file:
      (Use vi to put the line over the rctcpip entry)

     db2start:2:once:su - \DB2_instance -c /usr/lpp/db2_01_01_0000/adm/db2start
                      /dev/console 2&1

B. Sample /u/\DB2_instance/sqllib/db2profile

   export DB2INSTANCE=db2v1
   export PATH=${PATH}:/u/db2v1/sqllib/bin:/u/db2v1/sqllib/adm:
   export PATH=${PATH}:/u/db2v1/sqllib/misc
   export DB2BQTIME=1
   export DB2BQTRY=6
   export DB2IQTIME=5
   export DB2DBDFT=openview
   export DB2COMM=
   export DB2CHKPTR=OFF
   export DB2GROUPS=ON

C. Log DB2/6000 Error And Warning Messages To /etc/syslog

   1. Add the following entry to /etc/syslog.conf file (as root):

      user.warn         /var/msgs/syslog

      Note:  Uncomment this line to disable the error logging.

   2. If /var/msgs/syslog has not been created, then create the file:

      touch /var/msgs/syslog

      Note:  The log file can be located in any directory and have any name.

   3. Refresh syslogd daemon to re-read the /etc/syslog.conf file:

      refresh -s syslogd

D.  Some DB2/6000 commands you may need when no DB2 guru is available:
    (Login as DB2 instance user)

    $ db2start                          /* Start DB2 subsystems  */
    $ db2stop                           /* Stop DB2 subsystems   */
    $ db2 list database directory       /* List all DB2 databases */
    $ db2 create database openview authentication server
                                        /* Create openview database */
    $ db2 drop database openview        /* Delete openview database */
    $ db2 connect to openview           /* Connect to database openview */
    $ db2 list tables for all           /* List all DB2 tables          */

HR
CENTER
FONT size=2Support Line: HOWTO: Netview/6000 using DB2/6000 Relational Database ITEM: AV7938L
BRDated: February 1996 Category: N/A
BRThis HTML file was generated 99/06/24~13:30:24
BRComments or suggestions?
A href="../../../../feedback.htm"BContact us/B/ABR
/FONT
/CENTER
/BODY
/HTML