`
luzl
  • 浏览: 563870 次
  • 性别: Icon_minigender_1
  • 来自: 大连
社区版块
存档分类
最新评论

starting with db2

    博客分类:
  • DB2
阅读更多
Starting working with DB2 on unix:

You have to install dbd2 client software on your unix workstation and reboot it.
You have to source a db2profile file with all necessary environment
You have to catalog properly, for example:

  db2 catalog tcpip node xxx remote somer_server server some_port
  db2 catalog db some_db at node xxx
  db2 connect to some_db
  db2 list database directory

  db2 catalog db sample at node xxx
  db2 connect to sample
  db2 "select * from syscat.tables fetch first 5 rows only"
     (note the quotes around select - to hide from shell processing)

  db2 -tvf myfile.sql    - to run many commands from a file.  Don't forget to separate SQL statments with ";"

db2 "select char(reviewed_date, ISO) from oe.OE_contact fetch first 10 rows only"
-------------------------------------------------
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics