Presentation is loading. Please wait.

Presentation is loading. Please wait.

DB2 Tools Pertemuan 3 Matakuliah: T0413 Tahun: 2009.

Similar presentations

Presentation on theme: "DB2 Tools Pertemuan 3 Matakuliah: T0413 Tahun: 2009."— Presentation transcript:


2 DB2 Tools Pertemuan 3 Matakuliah: T0413 Tahun: 2009

3 Bina Nusantara University 3 DB2 Configuration

4 Bina Nusantara University 4 list all currently set variables db2set db2set –all db2set –lr db2set = Eg: db2set db2comm=tcpip  A place to specify environment or platform specific settings e.g. settings for RAID, optimizer paths not yet fully integrated, communication protocols, environment specific performance enhancements  Settings can be applied to various levels  environment  instance  global (all instances) list variables set for instance list all available variables for platform sets a variable The DB2 Registry

5 Bina Nusantara University 5 DB2: The big Picture

6 Bina Nusantara University 6 DB2 Tools Start  Programs  IBM DB2 ...

7 Bina Nusantara University 7 Information IBM DB2 Information Center (db2ic) Command Line Tools General Administration Tools Monitoring Tools Setup Tools Command Editor (db2ce) Command Window (db2cmd or db2cw) Command Line Processor (db2) Control Center (db2cc) Journal (db2journal) Replication Center (db2rc) Event Analyzer (db2eva) Health Center (db2hc) InDoubt Transaction Manager (db2indbt) Memory Visualizer (db2memvis) Configuration Assistant (db2ca) First Steps (db2fs) Register Visual Studio Add-ins (db2vsregister) Satellite Synchronizer Activity Monitor (db2am) Task Center (db2tc) License Center Roadmap to the GUI tools

8 Bina Nusantara University 8 The main DB2 administration tool The Control Center allows you to: –create, modify and manage databases –Manage database objects (tables, indexes, etc.) –Launch the other GUI tools Control Center

9 Bina Nusantara University 9 Control Center Panes Object Tree Pane Contents Pane Object Detail Pane

10 Bina Nusantara University 10 Note the Additional Database Objects Advanced Control Center View

11 Bina Nusantara University 11 Using Command Editor, you can execute DB2 commands and SQL, analyze the execution plan of an SQL statement, and view/update query result sets You can launch Command Editor several ways: –As a standalone application Navigate through the Windows Start Menu –START -> PROGRAMS -> IBM DB2 -> COMMAND LINE TOOLS -> COMMAND EDITOR From a command prompt, type db2ce From the Control Center, click the Command Editor icon on the Control Center Toolbar From the Tools menu in Control Center Command Editor

12 Bina Nusantara University 12 Embedded within the Control Center –Right click on the SAMPLE database icon in the Control Center’s Object Tree pane and select the Query menu item –Any time a queryable object is selected (database, table, etc.), you can launch the Command Editor by clicking the Query link in the Control Center’s Object Detail pane Input area Output area Database currently connected to Character used to delimit the end of a SQL statement or DB2 command Back to Control Center view Command Editor view selected Add a database connection

13 Bina Nusantara University 13 A database connection must exist in order to submit any SQL statements You can inherit the connection from Control Center (by launching Command Editor in embedded mode) or by clicking the Add button in Command Editor Valid OS user ID and password Select a database configured on the system Check this box to use the ID and password of user currently logged in to the operating system Command Editor Add (database connection) Dialog

14 Bina Nusantara University 14 Runs the command (Can also use the CTRL+Enter shortcut) Runs the command and generates an access plan (more on this later) Generates an access plan without running the command (more on this later) Command Editor – Commands Tab

15 Bina Nusantara University 15 SQL Assist Wizard can also be launched from the Selected menu item The SQL Assist Wizard

16 Bina Nusantara University 16 Sections of the SQL Query. The query constructed so far.

17 Bina Nusantara University 17 Most of the GUI tools/wizards allow you to see the actual command or SQL statement that is created as a result of using the tool/wizard to perform an action This is very handy for: –Learning SQL syntax –Saving the statement to a file (or the Windows clipboard) for later use can be later imported directly into Command Editor Show SQL Button

18 Bina Nusantara University 18 Command Window –Only on Windows. On Linux use the Linux shell –Can be started with “db2cmd” or “db2cw” from an MS-DOS prompt –The Command Window is also the same as the Command Line Processor in non-interactive mode (as we will see next)

19 Bina Nusantara University 19 Command Line Processor (CLP) –Available on all DB2 servers and clients –The prompt starts with “db2 =>”

20 Bina Nusantara University 20 db2=> connect to eddb db2=> select * from syscat.tables db2 non-interactive mode interactive mode | | (double quotes may be required) db2 connect to eddb db2 "select * from syscat.tables" more Starting a CLP session

21 Bina Nusantara University 21 Task Center

22 Bina Nusantara University 22 Task Center requires that a tools catalog be created –This catalog stores all the meta data and information about scheduled tasks If you did not create the tools catalog when the database was created, an error message dialog will be displayed like the one below when Task Center is launched –In order to schedule tasks, you must first create the tools catalog (you can do this when you schedule the first task) Task Center – No Tools Catalog Warning Dialog

23 Bina Nusantara University 23 A DBA’s activity journal in online form You can view: –Task History: All attempted scheduled tasks and their success status –Database History: A record of database activities performed (backup, restore, REORGs, etc.) –Message: History of messages returned by DB2 tools. This is useful if you want to recall and compare old error messages, or if you close a dialog box too quickly or by accident –Notification Log: contains system-level message. Critical errors are recorded here Journal

24 Bina Nusantara University 24 Select what events to view Select database and system View more details by double-clicking on an entry Journal

25 Bina Nusantara University 25 Select what types of alerts to use Choose screen refresh time Double click any alerts that appear for more details Customize health indicator settings Health Center

26 Bina Nusantara University 26 Health Center > Health Center menu > Configure > Alert Notification Configuring Health Alert Notification

Download ppt "DB2 Tools Pertemuan 3 Matakuliah: T0413 Tahun: 2009."

Similar presentations

Ads by Google