Advertisement
lainiwakurafan

lab 4

Dec 4th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.60 KB | None | 0 0
  1. C:\Program Files\IBM\SQLLIB\BIN>db2 +c "select * from mytable"
  2.  
  3. KEY COL2 COL3 NEWCOLUMN
  4. ----------- ---------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------- -----------
  5. 1 first record -
  6. 2 second string -
  7. 3 third usefull text data -
  8.  
  9. 3 record(s) selected.
  10.  
  11. C:\Program Files\IBM\SQLLIB\BIN>db2 +c "insert into mytable(col2) values('.')"
  12. DB20000I The SQL command completed successfully.
  13.  
  14. C:\Program Files\IBM\SQLLIB\BIN>db2 +c "select * from mytable"
  15.  
  16. KEY COL2 COL3 NEWCOLUMN
  17. ----------- ---------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------- -----------
  18. 1 first record -
  19. 2 second string -
  20. 3 third usefull text data -
  21. 21 . - -
  22.  
  23. 4 record(s) selected.
  24.  
  25.  
  26. C:\Program Files\IBM\SQLLIB\BIN>db2 +c "rollback"
  27. DB20000I The SQL command completed successfully.
  28.  
  29. C:\Program Files\IBM\SQLLIB\BIN>db2 +c "select * from mytable"
  30.  
  31. KEY COL2 COL3 NEWCOLUMN
  32. ----------- ---------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------- -----------
  33. 1 first record -
  34. 2 second string -
  35. 3 third usefull text data -
  36.  
  37. 3 record(s) selected.
  38.  
  39.  
  40. C:\Program Files\IBM\SQLLIB\BIN>db2 get db cfg for newdb01
  41.  
  42. Currently Committed (CUR_COMMIT) = ON
  43.  
  44. C:\Program Files\IBM\SQLLIB\BIN>db2 change isolation to cs
  45. DB21027E Isolation level may not be changed while connected to a database.
  46.  
  47. C:\Program Files\IBM\SQLLIB\BIN>db2 terminate
  48. DB20000I The TERMINATE command completed successfully.
  49.  
  50. C:\Program Files\IBM\SQLLIB\BIN>db2 change isolation to cs
  51. DB21053W Automatic escalation will occur when you connect to a database that
  52. does not support CS.
  53. DB20000I The CHANGE ISOLATION command completed successfully.
  54.  
  55. C:\Program Files\IBM\SQLLIB\BIN>db2 connect to newdb01
  56.  
  57. C:\Program Files\IBM\SQLLIB\BIN>db2 +c "insert into mytable(col2) values('.')"
  58. DB20000I The SQL command completed successfully.
  59.  
  60. C:\Program Files\IBM\SQLLIB\BIN>db2 +c "select * from mytable"
  61.  
  62. KEY COL2 COL3 NEWCOLUMN
  63. ----------- ---------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------- -----------
  64. 1 first record -
  65. 2 second string -
  66. 3 third usefull text data -
  67. 41 . - -
  68.  
  69. 4 record(s) selected.
  70.  
  71. C:\Program Files\IBM\SQLLIB\BIN>db2 +c "commit"
  72. DB20000I The SQL command completed successfully.
  73.  
  74. C:\Program Files\IBM\SQLLIB\BIN>db2 terminate
  75. DB20000I The TERMINATE command completed successfully.
  76.  
  77. C:\Program Files\IBM\SQLLIB\BIN>db2 change isolation to UR
  78. DB21053W Automatic escalation will occur when you connect to a database that
  79. does not support UR.
  80. DB20000I The CHANGE ISOLATION command completed successfully.
  81.  
  82. C:\Program Files\IBM\SQLLIB\BIN>db2 connect to newdb01
  83.  
  84. C:\Program Files\IBM\SQLLIB\BIN>db2 +c "insert into mytable(col2) values('..')"
  85. DB20000I The SQL command completed successfully.
  86.  
  87. C:\Program Files\IBM\SQLLIB\BIN>db2 +c "select * from mytable"
  88.  
  89. KEY COL2 COL3 NEWCOLUMN
  90. ----------- ---------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------- -----------
  91. 1 first record -
  92. 2 second string -
  93. 3 third usefull text data -
  94. 41 . - -
  95. 42 .. - -
  96.  
  97. 5 record(s) selected.
  98.  
  99. C:\Program Files\IBM\SQLLIB\BIN>db2 +c "rollback"
  100. DB20000I The SQL command completed successfully.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement