Академический Документы
Профессиональный Документы
Культура Документы
Command Purpose
db2icrt [InstanceName] Creates a new instance
db2idrop [InstanceName] Deletes (drops) an existing instance
db2ilist Lists all instances that have been defined
db2start Starts the DB2 Database Manager background
processes for the current instance
A DB2 instance is a logical database server environment.
db2stop Stops the DB2 Database Manager background
There can be multiple DB2 instances on a server. Multiple
processes for the current instance
Databases can be created within a DB2 instance.
3 4
1
IBM DB2 9 IBM DB2 9
2
IBM DB2 9 IBM DB2 9
Database
The database contains following objects:
-Tables, views, indexes, schemas, Locks, triggers, stored
procedures, packages, Buffer pools, log files, table spaces
Tools, which can help you create DB2 9 database are First
Steps, Control Center [ Using GUI Wizard ] and Command
Line Processor (CLP).
Some database commands -
CREATE DATABASE To create a database. (Database name
<dbname> can not begin with "SYS", "DBM", or "IBM“)
CONNECT TO <dbname> To connect to a database
CONNECT RESET To terminate connection
DROP DATABASE <dbname> To drop database
9 10
3
IBM DB2 9 IBM DB2 9
Configuration Assistant - Search the Network (1) Configuration Assistant - Search the Network (2)
15 16
4
IBM DB2 9 IBM DB2 9
Configuration Assistant - Search the Network (3) Configuration Assistant - Search the Network (4)
Choose protocol
(e.g. TCP/IP)
Enter IP address or
Default port on Machine Name
Windows : 50000
19 20
Click Click
5
IBM DB2 9 IBM DB2 9
21 22
Click Click
23 24
Click Click
6
IBM DB2 9 IBM DB2 9
27 28
7
IBM DB2 9 IBM DB2 9
8
IBM DB2 9 IBM DB2 9
9
IBM DB2 9 IBM DB2 9
10
IBM DB2 9 IBM DB2 9
1) While attempting to connect to a database stored on an iSeries 2) A database named TEST_DB resides on a z/OS system and listens on
server from a Windows client, the following message was displayed: port 446. The TCP/IP address for this system is 192.168.10.20 and the
TCP/IP host name is MYHOST. Which of the following commands is
SQL1013N The database alias name or required to make this database accessible to a Linux client?
database name "TEST_DB" could not be found. A. CATALOG TCPIP NODE zos_srvr REMOTE myhost SERVER
Which of the following actions can be used to help determine why 192.168.10.20;CATALOG DATABASE zos_db AS test_db AT NODE
this message was displayed? zos_srvr;CATALOG DCS DATABASE zos_db AS test_db;
B. CATALOG TCPIP NODE zos_srvr REMOTE myhost SERVER
A. Execute the LIST REMOTE DATABASES command on the
192.168.10.20;CATALOG DCS DATABASE zos_db AS test_db AT
server; look for an entry for the TEST_DB database
NODE zos_srvr;
B. Execute the LIST DCS DIRECTORY command on the server;
C. CATALOG TCPIP NODE zos_srvr REMOTE myhost SERVER
look for an entry for the TEST_DB database
446;CATALOG DCS DATABASE zos_db AS test_db AT NODE
C. Execute the LIST REMOTE DATABASES command on the client; zos_srvr;
look for an entry for the TEST_DB database D. CATALOG TCPIP NODE zos_srvr REMOTE myhost SERVER
D. Execute the LIST DCS DIRECTORY command on the client; look 446;CATALOG DATABASE zos_db AS test_db AT NODE
for an entry for the TEST_DB database zos_srvr;CATALOG DCS DATABASE zos_db AS test_db;
41 42
3) In which of the following scenarios would a stored procedure 4) If the following SQL statements are executed in the order shown:
be beneficial? CREATE TABLE orders (order_num INTEGER NOT NULL,
Buyer_name VARCHAR(35), Amount NUMERIC(5,2));
A. An application running on a remote client needs to be able
to convert degrees Celsius to degrees Fahrenheit and vice CREATE UNIQUE INDEX idx_orderno ON orders(order_num);
versa Which of the following describes the resulting behavior?
A. Every ORDER_NUM value entered must be unique; whenever the
B. An application running on a remote client needs to collect
ORDERS table is queried rows should be displayed in order of
three input values, perform a calculation using the values increasing ORDER_NUM values
provided, and store the input data, along with the results of the B. Every ORDER_NUM value entered must be unique; whenever the
calculation in two different base tables ORDERS table is queried rows will be displayed in no particular order
C. An application running on a remote client needs to track C. Duplicate ORDER_NUM values are allowed; no other index can be
every modification made to a table that contains sensitive data created for the ORDERS table that reference the ORDER_NUM column
D. An application running on a remote client needs to ensure D. Every ORDER_NUM value entered must be unique; no other index
that every new employee that joins the company is assigned a can be created for the ORDERS table that reference the ORDER_NUM
column
unique, sequential employee number
43 44
11
IBM DB2 9 IBM DB2 9
5) An alias can be an alternate name for which 6) Which of the following DB2 objects can be
two of the following DB2 objects? referenced by an INSERT statement to
generate values for a column?
- A. Sequence
- B. Trigger A. Sequence
- C. View B. Identity column
- D. Schema C. Trigger
- E. Table D. Table function
45 46
7) Which of the following is NOT an attribute of 8) Which of the following is an accurate statement
Declared Global Temporary Tables (DGTTs)? about packages?
A. Each application that defines a DGTT has its own A. Packages provide a logical grouping of database
instance of the DGTT objects.
B. Two different applications cannot create DGTTs B. Packages contain control structures that are
that have the same name considered the bound form for SQL statements
C. DGTTs can only be used by the application that C. Packages describe the objects in a DB2 database
creates them, and only for the life of the application and their relationship to each other
D. Data stored in a DGTT can exist across transaction D. Packages may be used during query optimization
boundaries to improve the performance for a subset of SELECT
queries
47 48
12
IBM DB2 9 IBM DB2 9
9) Which of the following events will NOT cause 10) Which of the following DB2 objects is NOT
a trigger to be activated? considered executable using SQL?
49 50
11) Which of the following is NOT an accurate 12) Which of the following SQL statements can be
statement about views? used to create a DB2 object to store numerical data
as EURO data?
A. Views are publicly referenced names and no
special authority or privilege is needed to use them. A. CREATE NICKNAME euro FOR DECIMAL (9,3)
B. Views can be used to restrict access to columns in B. CREATE ALIAS euro FOR DECIMAL (9,3)
a base table that contain sensitive data C. CREATE DISTINCT TYPE euro AS DECIMAL
C. Views can be used to store queries that multiple (9,3)
applications execute on a regular basis in a database D. CREATE DATA TYPE euro AS DECIMAL (9,3)
D. Views support INSTEAD OF triggers
51 52
13
IBM DB2 9
Grazie Hebrew
Italian
Gracias
Spanish
Russian
Obrigado
Thank
Portuguese
Arabic
Merci
French
Traditional Chinese
You English
Danke
German
Thai
Simplified Chinese Tamil
Japanese Korean
53
14