建立空的DB2資料庫 for ClearQuest
建立資料庫之前,必須先登入安裝有DB2 Server的主機
建立空資料庫的步驟如下:
Step 1. 啟動"控制中心",並輸入管理者的帳號及密碼(如果有跳出要求帳號密碼的視窗)。
Step 2. 展開目錄,直到看到實例(instance),然後在實例上按滑鼠右鍵,選擇Create > Database using Wizard。
Step 3. 輸入資料庫的名稱,最多八個字元,不可全部為數字。
Step 4. 選擇跟ClearQuest可以相配的語系,然後選擇“完成”。完成後,DB2 會跳出Configuration Advisor,選擇“No”。
此時即完成空資料庫的建置,接下來要調整預設資料庫的參數值,以符合ClearQuest的需求。
Step 1. 新增儲存池:展開剛剛新建好的資料庫資料夾,在“儲存池”上按滑鼠右鍵選擇“建立”,輸入儲存池的名稱後,將“頁大小”改成32k,Set Size in 32 KB pages to 1024. Clear the Use extended storage and Use default bufferpool size check boxes, if selected. Click OK.
Step 2. You might be required to restart the DB2 instance that you just created. If this is necessary, you receive a warning message. To restart the DB2 instance, right-click the DB2 folder, and click Stop. Select the Disconnect all applications check box in the Confirm Stop window. From the DB2 folder, click Start to restart the database with buffer pool activated.
Step 3. 新增表格空間:
Step 4. Delete the default table space that is created when the database is created.
Step 5. Repeat the previous steps to create a temporary table space for sorting and merging operations. For step 3.2, set the type of table space to System Temporary.
設定資料庫參數
In the left pane of the Control Center, for each database created, right-click the database-name folder and click Configure Parameters to open the Database Configuration window.
建立空資料庫的步驟如下:
Step 1. 啟動"控制中心",並輸入管理者的帳號及密碼(如果有跳出要求帳號密碼的視窗)。
Step 2. 展開目錄,直到看到實例(instance),然後在實例上按滑鼠右鍵,選擇Create > Database using Wizard。
Step 3. 輸入資料庫的名稱,最多八個字元,不可全部為數字。
Step 4. 選擇跟ClearQuest可以相配的語系,然後選擇“完成”。完成後,DB2 會跳出Configuration Advisor,選擇“No”。
此時即完成空資料庫的建置,接下來要調整預設資料庫的參數值,以符合ClearQuest的需求。
Step 1. 新增儲存池:展開剛剛新建好的資料庫資料夾,在“儲存池”上按滑鼠右鍵選擇“建立”,輸入儲存池的名稱後,將“頁大小”改成32k,Set Size in 32 KB pages to 1024. Clear the Use extended storage and Use default bufferpool size check boxes, if selected. Click OK.
Step 2. You might be required to restart the DB2 instance that you just created. If this is necessary, you receive a warning message. To restart the DB2 instance, right-click the DB2 folder, and click Stop. Select the Disconnect all applications check box in the Confirm Stop window. From the DB2 folder, click Start to restart the database with buffer pool activated.
Step 3. 新增表格空間:
- Type a name in the Table space name field
- Set the type of table space to Regular and then click Next.
- Select the buffer pool that you created in Step 1 and then click Next.
- Set space management to System-managed space and then click Next.
- On the Define containers for this table space page, click Add. In the Define Container window, type a name in the Container field (for example, cntr1a_32K) and click OK. The container name is then displayed on the Define containers for this table space page. Select this container name and click Next.
- On the Specify the extent and prefetch sizes for this table space page, select the average size of a table in this table space. Click Next.
- On the Describe hard drive specification page, accept the defaults and click Next.
- On the Specify the dropped table recovery option for your new table space page, if you want to recover the table space, click the Enable dropped table recovery option. Click Next and then click Finish.
Step 4. Delete the default table space that is created when the database is created.
Step 5. Repeat the previous steps to create a temporary table space for sorting and merging operations. For step 3.2, set the type of table space to System Temporary.
設定權限
Before performing the following steps, you must create two user accounts on the server to use DB2 with Rational ClearQuest. One account is for the schema repository; the other is for the user database.
In the right pane of the Control Center, right-click the table space that you have created and select Privileges.
On the Group page, click Add Group, select Public, and click OK. Highlight the group you just created and set the Privileges: Use area to Yes and click OK.
設定資料庫參數
In the left pane of the Control Center, for each database created, right-click the database-name folder and click Configure Parameters to open the Database Configuration window.
- Under the Performance section, set the values for APP_CTL_HEAP_SZ, APPLHEAPSZ, and SORTHEAP to 1024.
- Under the Logs section, set the values for LOGFILSIZ to 1000, LOGPRIMARY to 15, and LOGSECOND to 10.
- Click OK.