星期日, 9月 05, 2010

Tablespaces in DB2 UDB databases

1. Suppose you want to create a very large temporary tablespace that will store the global temporary tables where the application data is stored for brief periods of time. Which type of tablespace should you create?

Large
Regular
System temporary
User temporary



2. During the execution of certain operations, internal application-specific data is generated, along with declared global temporary tables. You want to create a tablespace to store this data. Which tablespace should you choose?

Large
Regular
Temporary



3. Suppose you want to create a tablespace where the storage space needs to be set at a certain size, and where additional containers can be added as required. Which type of tablespace should you create?

DMS
SMS
Temporary




4. What allocates storage space in an SMS tablespace?

DB2 Database Manager
Domain Controller
File manager of the operating system
Group Policy




5. What does a tablespace hold?

Boot records
Data
Pointers to data
Registry settings





6. What can a regular tablespace contain?

Declared global temporary tables
Index data
Long field data
Regular data

星期六, 9月 04, 2010

Working with SMS and DMS tablespaces in DB2

1. Suppose you want to obtain basic information about the containers that are associated with the BRODB database, which has an internal ID of 1. Which command should you execute to obtain the results?

LIST TABLESPACE
LIST TABLESPACE CONTAINERS FOR 1
LIST TABLESPACE CONTAINERS FOR BRODB
LIST TABLESPACE SHOW DETAIL



2. Which of the following commands will add the file STG.TSF, located on the root of C, which is 1000 MB in size, as a storage file to the tablespace MYTABLESPACE?

ALTER TABLESPACE MYTABLESPACE ADD (FILE 'C:\STG.TSF', 1000)
ALTER TABLESPACE MYTABLESPACE ADD (FILE 'C:\STG.TSF', 1000 M)
ALTER TABLESPACE MYTABLESPACE DROP (FILE 'C:\STG.TSF')
ALTER TABLESPACE MYTABLESPACE EXTEND (FILE 'C:\STG.TSF' 1000 M)




3. What type of tablespace will be created by this statement?
CREATE REGULAR TABLESPACE TEMPSTAFF
PAGESIZE 8K
MANAGED BY DATABASE USING

A large SMS tablespace
A regular DMS tablespace
A system temporary tablespace
A user temporary tablespace



4. Which of the following parameters are common to both DMS and SMS tablespace commands?

The name of the buffer pool used by the tablespace
The name that will be assigned to the tablespace
The number of pages to be stored in the tablespace container
The size of each space used by the tablespace







5. What parameters of an SMS tablespace can you modify?

Buffer pool associated with a tablespace
Container size
Prefetch pages
Prefetch size





6. What type of information is returned by executing the LIST TABLESPACE command?

The current state of the tablespace
The internal ID of the tablespace
The name of the tablespace
The number of empty pages

星期五, 9月 03, 2010

Buffer pools in DB2 UDB

1. When you configure a buffer pool from the Control Center, what must you do to configure the Create Buffer Pool dialog box so that the buffer pool is only created when all connections to the database are closed?

Configure the dialog box to create the buffer pool immediately
Configure the dialog box to create the buffer pool when the database restarts
Configure the dialog box to store pages in extended memory



2. Suppose you want to change the page size of a buffer pool called CLIENT_BP to 550. Which command do you execute to change the page size of the buffer pool?

ALTER BUFFERPOOL CLIENT_BP 550;
ALTER BUFFERPOOL CLIENT_BP PAGESIZE 550;
ALTER BUFFERPOOL CLIENT_BP SIZE 550;




3. Suppose you want to create a buffer pool - SALES_BP - that contains 350 pages and services tablespaces that use a page size of 8192 bytes.
Which code do you need to execute to create this buffer pool?

CREATE BUFFERPOOL SALES_BP SIZE 8 PAGESIZE 350K;
CREATE BUFFERPOOL SALES_BP SIZE 350 PAGESIZE 8192K;
CREATE BUFFERPOOL SALES_BP SIZE 350 PAGESIZE 8K;
CREATE BUFFERPOOL SALES_BP SIZE 8192 PAGESIZE 350K;




4. What is the function of the buffer pool?

Cache data pages
Free up memory space
Improve database system performance
Write dirty pages to the hard drive

星期四, 9月 02, 2010

Tables in DB2 UDB

1. Suppose you want to create a table using the Create Table Wizard. Which DB2 tool do you need to use to access the wizard?

Command Center
Control Center
Development Center
Task Center



2. Suppose you want to create a table with the CREATE TABLE command and you want to include a column definition. Which parameter of the command do you need to replace with the column definition?

ColumnName
Element
TablespaceName
UniqueConstraint



3. Which DB2 table type temporarily stores data used by an application?

Base
Declared temporary
Result
Typed




4. Suppose you want to create the table - EMPLOYEES - with these columns: EMP_NAME with a character data type 50 characters long, EMP_ID with an integer data type, and EMP_SALARY with a decimal data type with a precision of 5 and a scale of 2. Data must be entered into each column. Which code do you need to execute to create this table?

CREATE TABLE EMPLOYEES (EMP_ID INTEGER, EMP_NAME CHAR(50), EMP_SALARY DECIMAL (5,2));
CREATE TABLE EMPLOYEES (EMP_ID INTEGER NOT NULL, EMP_NAME CHARACTER(5,2), EMP_SALARY DECIMAL (50) NOT NULL);
CREATE TABLE EMPLOYEES (EMP_ID INTEGER NOT NULL, EMP_NAME CHAR(50) NOT NULL, EMP_SALARY DECIMAL (5,2) NOT NULL);

星期三, 9月 01, 2010

Creating DB2 databases using wizard and command options

Q1. You want to create a database called NEWBRO using the CREATE DATABASE command.
Which command statement will create this database providing the minimum of information?

CREATE DATABASE ;
CREATE DATABASE NEWBRO;
CREATE DATABASE NEWBRO ON E:;
CREATE DATABASE NEWBRO CATALOG TABLESPACE MANAGED BY SYSTEM;




Q2. From where can you launch the Create Database Wizard?

Command Center
Control Center
Journal
Task Center




Q3. What does the following command do?
CREATE DATABASE STOCK CATALOG TABLESPACE MANAGED BY DATABASE EXTENTSIZE 16 PREFETCHSIZE 16

Creates a new table called STOCK
Creates a new DMS database called STOCK
Creates a new SMS database called STOCK






Q4. What can you do with the Create Database Wizard?

Adjust the performance of the database
Rename a database that already exists
Review the command that will be executed by the wizard
Specify where to store catalog tables

星期一, 8月 23, 2010

user profile問題,windows主題問題

question:

每個 user 擁有自己的 domain acc
在 server 建立 share folder UserProfile\user ,之後在 AD 中 profile 設為\\dc\UserProfile\user

在client機(windows XP)成功登入user,也成功在UserProfile建立了profile,
但問題的是其他 user 登入後,桌面未能使用已設定的windows主題,只有第一個登入的user沒有問題

即使用第二個account登入後,改windows主題做正常,再登出,再將dat 改man 都唔得..


answer:

多個user share 一個 man profile, 創建該 profile 的 user1 才可以用已預先設定好的桌面設定.

後來發現問題出現在註冊表的權限問題上,只要將hkey_users\登綠用戶的sid 的相關項目權限改為可寫或full control便沒問題了.

我的 user logon vbscript

Set oWshNetwork = CreateObject("WScript.Network")
Set oUserAccount = GetObject("winmgmts://./root/cimv2") _
.Get("Win32_UserAccount.Domain='" & oWshNetwork.UserDomain & "'" _
& ",Name='" & oWshNetwork.UserName & "'")
sUserSID = oUserAccount.SID
wscript.Echo sUserSID
'這一段會找出登錄者sid

Set WshShell = WScript.CreateObject("WScript.Shell")
wshShell.run "cmd /k \\server\netlogon\subinacl /subkeyreg HKEY_USERS\" & sUserSID & " /grant=domain\" & oWshNetwork.UserName & "=f"" /runpath:c:\ "
wscript.exit
'這一段會將HKEY_USERS\使用者sid 的註冊項目權限設定為完全控制

星期二, 8月 10, 2010

問:當把新買的硬盤插入電腦之後,開機時電腦顯示「Warning!! An Ultra ATA/66 (or faster) driver is connected with a 40-pin IDE cable on the secondary channel. Drive speed is downgraded to Ultra ATA/33」,這代表甚麼意思?

答:
這表示因為閣下的IDE線太舊款了,是 40-pin 的 IDE cable。
如果不希望因此而降速,建議換一條 80-pin 的 IDE cable。

推薦此文