Tutorial Database

Pengunaan Database, Instance Dan Konfigurasi


1. Buka DB2 Command Window.
    Start -> Run -> db2cmd

2. Buatlah instance yang di beri nama newin
    db2icrt newin


3. Pada instance yang baru yaitu newin, buatlah database newdb dengan nilai default
   set db2instance=newin
   db2start
   db2 create database newdb
 

4. List semua instance yang ada di server
    db2ilist

5. Tukar DB2 instance dan pastikan benar2 terganti 
     set db2instance=db2
     db2 get instance


6. Change Ubah  dbm cfg parameter FEDERATED dengan nilai YES dari NO
   db2 update dbm cfg using FEDERATED YES
   db2 force applications all
   db2 terminate
   db2stop
   db2start
   db2 get dbm cfg

7. Connect ke database SAMPLE  with the userID/psw yang dimasukkan ketika login ke operating sistem
    db2 connect to sample user <userID> using <psw>
    db2 connect to sample user nova using novanova

8. Melihat berapa banyak aplaikasi yag dijalankan pada instance saat ini
    db2 list applications
 

9. Buka DB2 Command Window yang lain lalu connect ke sample tanpa menggunakan userID/psw lalu lihat berapa koneksi yang kita miliki
    db2 connect to sample
    db2 list applications

10. Menghapus instance newin 
      set db2instance=newinst
      db2stop
      db2idrop newinst
      set db2instance=db2
  
12. Drop and recreate the DAS,and start it.
      db2admin stop
      db2admin drop
      db2admin create
      db2admin start

13. Set the DB2 Registry variable DB2COMM to tcpip and npipe in your instance
      db2start
      db2set db2comm=tcpip,npipe
      db2stop
      db2start

15. Check the current value of the LOGSECOND db cfg parameter, and then change it to a value of 5 and verify the new value
      db2 connect to sample
      db2 get db cfg
      db2 update db cfg using LOGSECOND 5
      db2 get db cfg
14. Unset the DB2COMM registry variable
      db2set db2comm=
      db2stop

Comments

Post a Comment