Presentation is loading. Please wait.

Presentation is loading. Please wait.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1 © Copyright IBM Corporation 2008 DB2 9 Fundamentals.

Similar presentations


Presentation on theme: "Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1 © Copyright IBM Corporation 2008 DB2 9 Fundamentals."— Presentation transcript:

1 Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1 © Copyright IBM Corporation 2008 DB2 9 Fundamentals (Exam 730) Classroom Resources Part 3: Accessing DB2 data

2 © Copyright IBM Corporation 2008 Unit objectives After completing this unit, you should understand how to: Create a DB2 database on your own Catalog it for use by other users Examine and manipulate the objects within that database

3 © Copyright IBM Corporation 2008 Certification Exam (730) objectives Ability to identify DB2 objects Knowledge of basic characteristics and properties of DB2 objects Given a DDL SQL statement, knowledge to identify results (ability to create objects)

4 © Copyright IBM Corporation 2008 What makes up a DB2 database? A DB2 database is made up of a collection of objects The database contains many of the following physical and logical objects: –Tables, views, indexes, schemas –Locks, triggers, stored procedures, packages –Buffer pools, log files, table spaces

5 © Copyright IBM Corporation 2008 DB2 object hierarchy

6 © Copyright IBM Corporation 2008 Default table space containers with Automatic Storage inst20 C0000000.CAT DSS dbauto NODEnnnn CREATE DATABASE DSS ON /dbauto DBPATH ON /database DB2INSTANCE=inst20 T0000000 T0000001 T0000002 C0000000.LRG C0000000.TMP USERSPACE1 SYSCATSPACE (Catalog Partition Only) TEMPSPACE1

7 © Copyright IBM Corporation 2008 Creating your first database

8 © Copyright IBM Corporation 2008 Control Center

9 © Copyright IBM Corporation 2008 Create Database Wizard

10 © Copyright IBM Corporation 2008 CREATE DATABASE syntax

11 © Copyright IBM Corporation 2008 CREATE DATABASE examples CREATE DATABASE sales1 ON /dbsales1 –Database Path: /dbsales1 –Automatic Storage Path: /dbsales1 CREATE DATABASE sales2 AUTOMATIC STORAGE no ON /dbsales2 –Database Path: /dbsales2 –Automatic Storage not enabled CREATE DATABASE sales3 ON /dbauto3 DBPATH ON /dbsales3 –Database Path: /dbsales3 –Automatic Storage Path: /dbauto3 CREATE DATABASE sales4 AUTOMATIC STORAGE yes ON /dbauto41,/dbauto42,/dbauto43 DBPATH ON /dbsales4 –Database Path: /dbsales4 –Automatic Storage Paths: /dbauto41, /dbauto42 and /dbauto43

12 © Copyright IBM Corporation 2008 Database Configuration

13 © Copyright IBM Corporation 2008 CREATE TABLESPACE syntax (1 of 2)

14 © Copyright IBM Corporation 2008 CREATE TABLESPACE syntax (2 of 2) on-db-partitions-clause: TO db-partition-number1 db-partition-number2 ( ), ON DBPARTITIONNUM DBPARTITIONNUMS system-containers:, USING | on-db-partitions-clause | 'container-string' ( ) database-containers: USING | on-db-partitions-clause | | container-clause | container-clause: FILE DEVICE 'container-string' num-pages integer ( ), K M G AUTORESIZE YES NO INITIALSIZE int K M G MAXSIZE int K M G NONE INCREASESIZE int K M G perc size-attributes:

15 © Copyright IBM Corporation 2008 Cataloging your DB2 database CATALOG DB database-name DATABASE AS -- alias AT NODE -- nodename ON path drive CLIENT SERVER_ENCRYPT KERBEROS TARGET PRINCIPAL--principalname DATA_ENCRYPT GSSPLUGIN SERVER AUTHENTICATION WITH -- "comment-string"

16 © Copyright IBM Corporation 2008 Configuration Assistant (1 of 2)

17 © Copyright IBM Corporation 2008 Configuration Assistant (2 of 2)

18 © Copyright IBM Corporation 2008 Manipulating DB2 objects with the Control Center Menu bar Control bar Objects pane Contents pane Contents pane Tool bar Details

19 © Copyright IBM Corporation 2008 Unit summary Having completed this unit, you should understand how to: Create a DB2 database on your own Catalog it for use by other users Examine and manipulate the objects within that database


Download ppt "Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1 © Copyright IBM Corporation 2008 DB2 9 Fundamentals."

Similar presentations


Ads by Google