偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

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

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

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在安裝過程中自動創(chuàng)建的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該數(shù)據(jù)庫已經(jīng)存在)

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

顯示所有的數(shù)據(jù)庫的命令

 

  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已經(jīng)可以自動創(chuàng)建系統(tǒng)帳戶作為它自身的數(shù)據(jù)庫帳戶。

 

連接到數(shù)據(jù)庫simple:

  1. DB2 connect to sample 

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

顯示所有的運行在當前數(shù)據(jù)庫實例上的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 (顯示用戶創(chuàng)建的表)  
  2. or  
  3. DB2 list tables for all(顯示所有的tables包括用戶和系統(tǒng)的) 

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.  

獲取連接狀態(tài)

 

  1. DB2 get connection state 

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

【編輯推薦】

  1. 對DB2數(shù)據(jù)移動方法的正確解析
  2. 對DB2 增量備份的正確運用描述
  3. DB2 并行版本中的查詢優(yōu)化登峰造極!
  4. DB2***SQL性能調(diào)節(jié)技術經(jīng)典版
  5. DB2性能調(diào)優(yōu)中易出現(xiàn)的問題有哪些?

 

責任編輯:佚名 來源: 互聯(lián)網(wǎng)
相關推薦

2010-08-18 17:15:23

DB2 實現(xiàn)split

2010-08-17 15:42:30

DB2 增量備份

2010-08-18 17:32:34

DB2數(shù)據(jù)庫

2010-07-30 13:45:17

執(zhí)行DB2

2010-08-11 12:34:59

DB2 Q 復制配置

2010-08-02 17:30:30

DB2鎖等待

2010-08-11 15:16:02

DB2日志設置參數(shù)

2010-08-03 15:04:20

DB2服務器

2010-08-06 11:28:51

DB2取得當前時間

2010-08-06 13:20:00

DB2鎖等待

2010-08-02 14:03:49

DB2驅(qū)動類型

2010-08-06 14:52:13

DB2 9.7武器

2010-08-06 18:01:13

DB2數(shù)據(jù)備份

2010-08-04 10:03:37

DB2 9 分布式管理

2010-07-29 13:34:35

DB2編目

2010-07-30 11:01:55

2010-08-04 13:10:02

2010-08-17 13:47:09

DB2還原

2010-07-29 10:30:41

DB2隔離級

2010-08-13 14:46:08

DB2 -964
點贊
收藏

51CTO技術棧公眾號