Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to DB2 Pertemuan 1

Similar presentations


Presentation on theme: "Introduction to DB2 Pertemuan 1"— Presentation transcript:

1

2 Introduction to DB2 Pertemuan 1
Matakuliah : T0413 Tahun : 2009 Introduction to DB2 Pertemuan 1

3 The DB2 family system x (Intel), AMD, system p servers DB2 for Linux
UNIX and Windows DB2 for z/OS DB2 for i5/OS DB2 for VSE and VM Midrange servers (system i) Mainframe (system z) Bina Nusantara University

4 DB2 History Year Achievement 1970
IBM invents the relational model and the SQL Language 1983 DB2 on the mainframe is born – First relational database management system 1993 DB2 for AIX is released 1996 DB2 Universal Database (UDB) version 5 is released 2006 DB2 9, the first hybrid database is released 2007 DB2 9.5 is released Bina Nusantara University

5 DB2Installation Operating system user ID authority required: Windows:
Part of the local administrators group on Windows (recommended), or A Windows power user ID/Restricted User ID with elevated privileges feature Linux: Root user for full support. Non-root users can also install but with some restrictions (eg: Only one instance can be created) If problems during the installation, ensure operating system version and level requirements are met Bina Nusantara University

6 DB2 Express-C 9.5 is very easy to install
Use the GUI-based installation (same Wizard in all platforms): Windows: <DB2 Imaged unzipped Directory>\EXP\image> setup.exe Installs under: Program Files > IBM > SQLLIB Linux: <DB2 Image unzipped Directory>/disk1> ./db2setup Installs under: opt/ibm/db2/V9.5 Verify which version and fixpack level you have installed using: db2level Bina Nusantara University

7 Uninstalling DB2 Windows (as Admin) Add/remove Programs
Linux (as root) You may need to read more on the topics of “instances” later in this course to understand the following process: Optional: Drop all databases. Database files remain intact on your file systems when you drop an instance without dropping databases first. Stop the DB2 Administration Server. Remove the Administration Server. Stop DB2 instances. Remove DB2 instances. Remove DB2 products. /opt/ibm/db2/V9.5/install> ./db2_deinstall -a (Cannot use rpm) Bina Nusantara University

8 Massively Parallel Processor (MPP)
DB2 Server Editions DB2 Data Warehouse Enterprise Massively Parallel Processor (MPP) DB2 Enterprise DB2 Workgroup DB2 Cluster DB2 Express DB2 Express-C DB2 Enterprise with Database Partitioning Feature DB2 Data Warehouse Base DB2 Everyplace Bina Nusantara University

9 Database Workloads OLAP/DSS Mixed
The database workload can be one of the factors in determining which server edition you need. There are 3 type of workloads: OLTP OLTP stands for online transaction processing. The OLTP type of workload implies short transactions performing simple SELECT, INSERT, UPDATE, and DELETE operations affecting a small number of rows. Indexes are commonly used, and access of the data is random. OLAP/DSS OLAP stands for online analytical processing and DSS for decision support systems. OLAP and DSS have similar types of workload, and they imply complex SELECT statements, normally using several JOIN operations. These are normally used for reporting in Data Warehouse/Business Intelligence operations. Access of the data is mainly sequential. Mixed A mixture of OLTP and OLAP workloads. Bina Nusantara University

10 How DB2 Server Editions are built
Bina Nusantara University

11 DB2 Clients and drivers IBM Data Server Client
IBM Data Server Runtime Client DB2 Runtime Client Merge Modules for Windows IBM Data Server Driver for JDBC and SQLJ IBM Data Server Driver for ODBC, CLI and .Net DB2 for Linux, UNIX, Windows DB2 Connect for Linux, UNIX, Windows DB2 for z/OS DB2 for i5/OS IBM Data Server Driver for ODBC and CLI Bina Nusantara University

12 The DB2 Information Center
The DB2 Information Center contains the DB2 online manuals. It also includes the manuals of products related to DB2. It has a search field It can be installed locally, or accessed through the internet The internet version is the most up-to-date one. The URLs are: V9: V9.5: Most of the answers to your questions can be found from the DB2 Information Center! Bina Nusantara University

13 General Administration Tools
The DB2 Environment DB2 Environment SQL/XML, Xquery Statements create bufferpool create tablespace create table alter bufferpool alter tablespace alter table select insert update delete ... DB2 System Commands db2set db2start db2stop db2ilist db2icrt db2idrop DB2 CLP Commands db2 update dbm cfg catalog db list node directory create database list applications list tablespaces <sql statement> xquery < > Command Line Tools Command Editor Command Line Processor Command Window Development Tools DB2 Developer Workbench Project Deployment Tool General Administration Tools Control Center Journal License Center Replication Center Task Center Information Information Center Check for DB2 Updates Monitoring Tools Event Analyzer Health Center Indoubt Transaction Manager Memory Visualizer Activity Monitor Setup Tools Configuration Assistant Configure DB2 .Net Data Provider Default DB2 Selection Wizard First Steps Register Visual Studio Add-ins DB2 Tools DB2 Commands & SQL/XML, Xquery Statements Port Database Manager Configuration File (dbm cfg) Instance 'myinst' Database File (db cfg) Database MYDB1 Bina Nusantara University

14 DB2 Server (Linux/Windows)
The DB2 Environment DB2 Server (Linux/Windows) Instance DB2 CREATING AN INSTANCE Windows (as Admin) db2icrt myinst Linux (as root) /home/db2inst1/instance> ./db2icrt -u db2fenc2 db2inst2 db2fenc2 and db2inst2 must exist before hand. To create an instance using the GUI: /home/db2inst1/instance>./db2isetup In this case, the user IDs are created for you. Note if you run as non-root, you can only see the current configuration of existing instances. Note: Running from db2inst1 home directory, which has soft links to /opt/ibm/db2/V9.5 (from which the same commands could be run) Bina Nusantara University

15 DB2 Server (Linux/Windows)
Instance DB2 Instance myinst Bina Nusantara University

16 Creating and connecting to a Database
CREATE DATABASE mydb1 [AS dbalias] [ON drive (On Windows) / path (On Linux)] NOTE: If the database alias (dbalias) is not provided, it will use the same as the database name CONNECT TO dbalias [user userID using password] userId/password are required for remote connectio Bina Nusantara University

17 DB2 Server (Linux/Windows)
Instance DB2 Instance myinst Database MYDB1 Database MYDB1 Bina Nusantara University

18 DB2 Server (Linux/Windows)
Instance DB2 Instance myinst Database MYDB1 Database MYDB1 SYSCATSPACE SYSCATSPACE TEMPSPACE1 USERSPACE1 IBMDEFAULTBP LOGS TEMPSPACE1 USERSPACE1 IBMDEFAULTBP LOGS Bina Nusantara University

19 The DB2 Administration Server (DAS)
Daemon process In prior DB2 versions, it was a especial type of instance Syntax of DAS commands are similar to instance commands Must be running to allow for remote GUI administration of a DB2 server, other than that, not needed Only one DAS per server DAS created at installation. On Windows it’s called: DB2DAS00 On Linux it’s called: dasusr1 On Linux dasusr1 maps to a Linux user Bina Nusantara University

20 DAS commands Creating/dropping the DAS Windows (As admin)
db2admin create db2admin drop Linux (As root) /opt/ibm/db2/V9.5> ./dascrt –u <existing Linux user> /opt/ibm/db2/V9.5> ./dasdrop Starting/stopping the DAS (as the DAS user) db2admin start db2admin stop Bina Nusantara University

21 DB2 data server big picture
One physical machine has: One Admin Server One or multiple Instances Each Instance (Database Manager): Is a logical server context Can have one or more databases Bina Nusantara University


Download ppt "Introduction to DB2 Pertemuan 1"

Similar presentations


Ads by Google