成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

對DB2入門實驗的正確操作流程的描述

數據庫
我們今天主要向大家講述的是DB2入門實驗(Working with Instances and Databases )的正確操作流程,以下就是正文的主要內容講述。

http://database.51cto.com/art/200608/29669.htm以下的文章主要向大家講述的是DB2入門實驗(Working with Instances and Databases )的正確操作流程,相信如果你對DB2入門實驗(Working with Instances and Databases )的正確操作流程有興趣了解的話,會在以后的學習或是工作中帶來很大的幫助。

Working, Databases, Instances, 入門, 實驗Working, Databases, Instances, DB2入門, 實驗

 

按照以下步驟完成,使用了db 2 express 9

 

  1. DB2 Migration Workshop  
  2. LAB 1 – Working with Instances and Databases (Solution)  
  3. Expected duration: 45 mins  
  4. This lab will help you solidify concepts of instances and databases. It is to be completed BEFORE the presentation “DB2 Instances and Databases”.  
  5. The following commands are demonstrated:  
  6. DB2icrt ACTIVATE DB FORCE APPLICATION  
  7. DB2idrop DEACTIVATE DB GET CONNECTION STATE  
  8. DB2ilist CONNECT LIST APPLICATIONS  
  9. DB2start CONNECT RESET LIST DB DIRECTORY  
  10. DB2stop CREATE DATABASE LIST TABLES  
  11. DB2admin start DROP DATABASE   
  12. DB2admin stop DESCRIBE TABLE   
  13. Prerequisites:  
  14. · DB2 Version 8 Server has been installed  
  15. Highly Recommended: Before each step in this lab, locate the demonstrated command in the CLP quick reference and mark it with an asterix (*).   
  16. This will help you get familiar with the DB2 CLP cheat sheet.  
  17. Note: On Linux/UNIX, you can switch users (su) without logging out by using:  
  18. su – .. to switch to root user (dash is important!)  
  19. su – [userid] .. to switch to non-root user (dash is important!)  
  20. exit .. to exit switch back  

1. Windows: Launch the DB2 Command Window. (啟動DB2的命令行窗口)

 

(在本次實驗中,我使用的是DB2 express 9在安裝過程中自動創建的DB2admin帳戶登陸)

 

  1. Start > Programs > IBM DB2 > Command Line Tools > Command Window  
  2. (or simply, DB2cmd)  
  3. Linux: Login to the operating system as user DB2inst1(linux下需要使用DB2inst1登陸)  
  4.  

2. When DB2 is installed, no database exists. Create the SAMPLE database provided by DB2.

  1. DB2sampl 

(在DB2 express9該數據庫已經存在)

3. Verify that a database now exists. Show the contents of the database directory:

顯示所有的數據庫的命令

 

  1. DB2 list db directory  
  2. Fill in the following information from the database directory:  
  3. Database alias SAMPLE  
  4. Directory entry type Indirect(目錄條目類型:間接)  

4. DB2 does not have database users. Instead, DB2 uses userIDs and passwords defined at the operating system (or network authentication facilities) to authenticate users. Connect to the SAMPLE database using the userID logged into the operating system.

似乎DB2 9已經可以自動創建系統帳戶作為它自身的數據庫帳戶。

 

連接到數據庫simple:

  1. DB2 connect to sample 

5. See all connections that currently exist for the current instance

顯示所有的運行在當前數據庫實例上的DB2入門應用程序

  1. DB2 list applications  
  2. Fill in the following information:  
  3. Application name: DB2bp.exe  
  4. Application handle: 2 (your answer may vary)  
  5. Database name: SAMPLE  

6. Disconnect from the database:

斷開連接

 

  1. DB2 connect reset 

7. Connect to the SAMPLE database using a specific userID and password.

  1. DB2 connect to sample user <userid> using <password

8. View the tables that currently exist in the SAMPLE database

  1. DB2 list tables (顯示用戶創建的表)  
  2. or  
  3. DB2 list tables for all(顯示所有的tables包括用戶和系統的) 

9. From the output of list tables, you should see that a table called EMPLOYEE exists. Find out the structure of EMPLOYEE

  1. DB2 describe table employee (不存在)  
  2. What is the maximum length of JOB column? 8 characters  
  3. What is the data type for the Salary Column? DECIMAL(9,2)  
  4. The above two questions are indented to show how data type lengths from the output of 

     

    DESCRIBE TABLE are interpreted differently for numeric and character types.  

10. Attempt to stop the instance. You should get an error because connections still exist.

  1. DB2stop  
  2. What is the SQLCODE associated with the error message? SQL1025N  

11. To stop the instance, we have to get rid of the current connections. In this step, forcibly disconnect all applications.

  1. DB2 force applications all  
  2. DB2stop  
  3. note: you can also force applications by application handle using:  
  4. force application (<handle>)  

12. By using FORCE APPLICATION, you have terminated your own connection. Attempt to SELECT from the employee table.

  1. DB2 “select * from employee”  
  2. You should get the error code SQL1224N. Check your connection state.  

獲取連接狀態

 

  1. DB2 get connection state 

可連接并且已經被關閉,以上的相關內容就是對DB2入門實驗(Working with Instances and Databases )的介紹,望你能有所收獲。

【編輯推薦】

  1. 對DB2數據移動方法的正確解析
  2. 對DB2 增量備份的正確運用描述
  3. DB2 并行版本中的查詢優化登峰造極!
  4. DB2***SQL性能調節技術經典版
  5. DB2性能調優中易出現的問題有哪些?

 

責任編輯:佚名 來源: 互聯網
相關推薦

2010-08-18 17:15:23

DB2 實現split

2010-08-17 15:42:30

DB2 增量備份

2010-08-18 17:32:34

DB2數據庫

2010-08-11 12:34:59

DB2 Q 復制配置

2010-07-30 13:45:17

執行DB2

2010-08-02 17:30:30

DB2鎖等待

2010-08-11 15:16:02

DB2日志設置參數

2010-08-03 15:04:20

DB2服務器

2010-08-06 11:28:51

DB2取得當前時間

2010-08-06 14:52:13

DB2 9.7武器

2010-08-02 14:03:49

DB2驅動類型

2010-08-06 13:20:00

DB2鎖等待

2010-08-06 18:01:13

DB2數據備份

2010-08-04 10:03:37

DB2 9 分布式管理

2010-08-12 16:10:45

DB2 Online

2010-07-29 10:30:41

DB2隔離級

2010-08-13 14:46:08

DB2 -964

2010-07-29 13:34:35

DB2編目

2010-07-30 11:01:55

2010-08-04 13:10:02

點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 色吧久久 | 国产乱肥老妇国产一区二 | 国产精品一区二区三区在线 | 99久久精品免费看国产免费软件 | 婷婷国产一区二区三区 | 久久夜视频 | 亚洲 欧美 日韩 在线 | 亚洲欧美综合精品另类天天更新 | av天天看 | 国产精品国产三级国产aⅴ中文 | 亚洲欧美精品在线 | 黄色免费在线观看网址 | 国产成人精品一区二区三区网站观看 | 精品美女在线观看 | 国产二区视频 | 国产精品免费一区二区三区四区 | 欧美久久一区二区 | 久久91| 91亚洲国产 | 亚洲第一天堂无码专区 | 成人精品影院 | 成人做爰www免费看视频网站 | 欧美日韩在线免费 | 欧美视频精品 | 久久久久久久久淑女av国产精品 | 九九热在线视频 | 中文字幕在线欧美 | 99国产精品99久久久久久 | 免费一级片 | 欧美一区二区三区在线视频 | 成人免费视频观看视频 | 国产黄色在线 | 狠狠色狠狠色综合系列 | 日本在线黄色 | 午夜日韩视频 | 99精品欧美一区二区蜜桃免费 | 韩日一区二区三区 | 成人精品一区 | 国产有码 | 国产91丝袜在线播放 | 亚洲成人免费在线观看 |