1 / 26

DB2 Tools Pertemuan 3

DB2 Tools Pertemuan 3. Matakuliah : T0413 Tahun : 2009. DB2 Configuration. The DB2 Registry. list all currently set variables. list variables set for instance. db2set db2set –all db2set –lr db2set <parameter>=<value> Eg: db2set db2comm=tcpip. list all available

frye
Download Presentation

DB2 Tools Pertemuan 3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DB2 ToolsPertemuan 3 Matakuliah : T0413 Tahun : 2009

  2. DB2 Configuration

  3. The DB2 Registry list all currently set variables list variables set for instance db2set db2set –all db2set –lr db2set <parameter>=<value> Eg: db2set db2comm=tcpip list all available variables for platform sets a variable • 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)

  4. DB2: The bigPicture

  5. DB2 Tools Start  Programs  IBM DB2  ...

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

  7. Control Center • 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

  8. Control Center Panes Object Tree Pane Contents Pane Object Detail Pane

  9. Advanced Control Center View Note the Additional Database Objects

  10. Command Editor • 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

  11. 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 Back to Control Center view Command Editor view selected Add a database connection Input area Database currently connected to Output area Character used to delimit the end of a SQL statement or DB2 command

  12. Command Editor Add (database connection) Dialog • 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 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 Valid OS user ID and password

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

  14. The SQL Assist Wizard SQL Assist Wizard can also be launched from the Selected menu item

  15. Sections of the SQL Query. The query constructed so far.

  16. Show SQL Button • 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

  17. 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)

  18. Command Line Processor (CLP) • Available on all DB2 servers and clients • The prompt starts with “db2 =>”

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

  20. Task Center

  21. Task Center – No Tools Catalog Warning Dialog • 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)

  22. Journal • 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

  23. Journal Select what events to view Select database and system View more details by double-clicking on an entry

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

  25. Configuring Health Alert Notification Health Center > Health Center menu > Configure > Alert Notification

More Related