Welcome to SQL Manager for DB2!

EMS SQL Manager for DB2 is a high performance tool for DB2 database server administration and development. SQL Manager for DB2 works with DB2 server versions up to 9.7 and supports most of DB2 objects and all DB2 data types. It offers plenty of powerful tools for experienced users to satisfy all their needs. SQL Manager has a new state-of-the-art graphical user interface with well-described wizard system, so clear in use that even a newbie will not be confused with it.

Visit our web-site for details: https://www.sqlmanager.net/

Key features:

  • Support of DB2 server versions 8.x and 9.x
  • Support of Unicode data
  • Rapid database management and navigation
  • Easy management of all DB2 objects
  • Advanced data manipulation tools
  • Effective security management
  • Excellent visual and text tools for query building
  • Impressive data export and import capabilities
  • Visual Database Designer to handle database structure in a few clicks
  • Support of Team Development
  • Easy-to-use wizards performing DB2 server administrative tasks
  • Powerful tools to make your work with DB2 as easy as it can be
  • Report designer with clear in use report construction wizard
  • New state-of-the-art graphical user interface

Product information:

Homepage: | https://www.sqlmanager.net/products/db2/manager
Support Ticket System: | https://www.sqlmanager.net/support
Register online at: | https://www.sqlmanager.net/products/db2/manager/buy


What's new

Version | Release date
SQL Manager for DB2 2.1.1 | November 14, 2016

What's new in SQL Manager for DB2?

1. Work with memory has been improved.

2. Function and Procedure editors have been updated.

3. Incorrect hot keys have been fixed.

4. Data was imported incorrectly into the tables in lower case. Fixed now.

5. Refresh of database objects have been optimized.

6. Some views were formatted incorrectly. Fixed now.

7. Incorrect sorting of database objects on using "Sort by Alias" with "Refresh objects on connection" off has been fixed.

8. Minor visual improvements.

See also:

Version history


System requirements

System requirements for SQL Manager for DB2

  • Microsoft Windows XP, Microsoft Windows 2003 Server, Microsoft Windows 2008 Server, Microsoft Windows Vista, Microsoft Windows 7, Microsoft Windows 8, Microsoft Windows 8.1, Microsoft Windows 10
  • 512 MB RAM; 1024 MB or more recommended
  • 200MB of available HD space for program installation
  • DB2 Run-Time/Administrative Client 8.0 or higher
  • Supported DB2 UDB server versions: from 8.1 up to 9.7


Feature Matrix

The FREE Lite version of SQL Manager for DB2 does not include all features of the Full version and has some limitations concerning the number of the databases that can be registered and the set of data manipulation and server maintenance tools. The detailed feature matrix is given below.

Note that when using the FREE Lite version of SQL Manager for DB2 you can activate a 30-day period of fully-functional usage. After the period expires, you will be able to continue using the Lite version.

For more information on activating the Full version features see Full Mode activation.

 | Full version | Lite version
New state-of-the-art graphical user interface
Office 11 and Windows XP visual schemes support | + | +
Well-described Wizard System | + | +
User-friendly Database Explorer for easy management of all DB2 objects | + | +
Windows Toolbar to switch between windows easily, like in Windows Task Bar | + | +
Navigation bars and hot keys in most of the windows | + | +
Ability to save all program settings | + | +
Customizable toolbars for all program windows | + | +
Fully customizable program interface | + | +
Powerful visual options module | + | +
Localizable program interface | + | +
Easy management of all DB2 objects (including create / edit / drop operations)
Managing database schemas | + | +
Managing tables and all their subobjects: fields, primary, unique and foreign keys, indexes, triggers, and check constraints | + | +
Managing views and all their subobjects: fields and triggers | + | +
Managing materialized query tables | + | +
Managing procedures, functions, sequences and packages | + | +
Managing user-defined types and structure types | + | +
Managing nicknames and aliases | + | +
Managing users, groups and user mappings | + | +
Managing tablespaces, buffer pools and partition groups | + | +
Managing packages | + | +
Managing global variables | + | +
Managing event monitors | + | +
Managing servers and wrappers | + | +
Duplicating database objects | + | +
Viewing dependencies between database objects | + | +
Rapid database management and navigation
Multiple database connections | + | +
Registering selected databases to work with | + | +
Projects to work with the selected database objects only | + | +
Multiple user-defined tabs for any tree object to access it in one-click | + | +
Working with multiple selected objects at a time | + | +
Grouping / Ungrouping registered databases by node name | + | +
Advanced data manipulation tools
Unicode support | + | +
Powerful BLOB viewer/editor with several types of viewing BLOB data: simple text, RTF text, sequence of hexadecimal values, image, HTML page, XML document | + | -
Exporting data to SQL script as INSERT statement | + | -
Plenty of useful tools such as data grouping, fast search and filtering | + | +
Multi-level master-detail view to work with several linked tables at the same time | + | -
Table and card views to see data the way you like | + | -
Ability to copy and paste selected records | + | -
Ability to continue working with SQL Manager while data are being fetched from the DB2 server | + | +
A fetching process taking too long to execute can be aborted | + | +
Effective security management
Grant manager displaying all database object grants in the form of a grid | + | +
Easy management of database users, groups and user mappings | + | +
Support of LBAC (Label Based Access Control) | + | +
Possibility to work with private contexts, security policies, audit policies and roles | + | +
Excellent visual and text tools for query building
Multiple SQL Editors of the Visual Studio 2005 kind with Code Folding, UNICODE support, code completion, syntax highlight and other useful features | + | +
Visual query builder allows you to build complicated queries without any knowledge of SQL syntax | + | -
Large script execution (SQL Script Editor) with UNICODE support | + | +
Ability to view query plan as diagram | + | -
SQL Formatter (available from SQL Editor context menu) | + | -
Favorite Queries (save and use your frequently used queries easily) | + | -
Ability to continue working with SQL Manager while a query is being executed in SQL Editor or Query Builder | + | +
A query taking too long to execute in SQL Editor or Query Builder can be aborted | + | +
Impressive data export and import capabilities
Exporting data to most popular formats: MS Excel, MS Word, MS Access, HTML, PDF, TXT, CSV, DBF, XML, ODF, etc. | + | -
Importing data from MS Excel, MS Access, DBF, XML, ODF, TXT and CSV | + | -
Background mode execution makes it possible to continue working with SQL Manager while an import or export process is being performed | + | -
Report designer with a clear in use report construction wizard
Managing reports the same way as if they were database objects: accessing reports directly through DB Explorer tree | + | -
Create Report Wizard allows you to create simple reports in a few clicks | + | -
Easy-to-use wizards for running DB2 services
Backing up and restoring database | + | +
Rollforward of database | + | +
Stopping, starting database manager | + | -
Quiescing and unquiescing database | + | -
Restarting database | + | -
Reorganizing database tables and indexes | + | -
Running database statistics | + | -
Support of DB2 server tools: IMPORT, EXPORT, MOVE, LOAD | + | -
Background mode execution makes it possible to continue working with SQL Manager while any of DB2 services is being performed | + | +
Ping database | + | -
Most of DB2 server versions support
Support of DB2 server versions from 8.1 to 9.5 | + | +
Support of DB2 LUW servers | + | +
Powerful Visual Database Designer
Two diagram notations (IDEF1x and IE) | + | -
Useful diagram navigation tool | + | -
Reverse engineering | + | -
Several pages in one diagram to divide the diagram into different subject areas | + | -
Ability to create/edit/drop database objects, visually set links between them | + | -
Virtual objects such as comments and virtual relationship | + | -
Saving as image or printing database diagram | + | -
A lot of visual personalization options | + | -
Other useful tools to make your work with DB2 server as easy as it can be
Extracting metadata into text files or SQL Script Editor | + | +
Powerful print metadata module to create customizable metadata reports | + | -
Report designer for building powerful reports visually | + | -
SQL Monitor | + | +
HTML Report wizard to create a detailed HTML report of your database quickly | + | -
Dependency tree tool allows to view dependencies between database objects | + | +
Active database connections Monitor | + | -
Support of Team Development | + | -
CLP console | + | +
Create Tag Wizard to remember the current database state | + | -
Check Repository Wizard reveals differences between a database and its description in the repository | + | -
Get Change Script Wizard allows you to get a script removing differences between two database states | + | -
History of changes made to a database or an object | + | -
...and other useful features
Keyboard templates | + | +
External Tools editor | + | +
To-do list | + | +


Installation

SQL Manager for DB2
  • Index
  • « Prev
  • Next »

Installation of SQL Manager for DB2

If you are installing SQL Manager for DB2 for the first time on your PC:

  • download the SQL Manager for DB2 distribution package from the download page available at our site;
  • unzip the downloaded file to any local directory, e.g. C:\unzipped;
  • run DB2ManagerFullSetup.exe from the local directory and follow the instructions of the installation wizard;
  • after the installation process is complete, find the SQL Manager shortcut in the corresponding group of Windows Start menu.

If you want to upgrade an installed copy of SQL Manager for DB2 you need to use SQL Direct.

Also you can use the full distribution package to upgrade your current version of SQL Manager for DB2. In this case, you should repeat the steps you have made for the first-time installation.

See also:

SQL Manager FAQ

SQL Manager Direct


Registration

All purchases are provided by PayPro Global registration service. The PayPro Global order process is protected via a secure connection and makes on-line ordering by credit/debit card quick and safe.

PayPro Global is a global e-commerce provider for software and shareware sales via the Internet. It accepts payments in US Dollars, Euros, Pounds Sterling, Japanese Yen, Australian Dollars, Canadian Dollars or Swiss Franks by Credit Card (Visa, MasterCard/EuroCard, American Express, Diners Club), Bank/Wire Transfer.

If you want to review your order information, or you have questions about ordering or payments please visit our PayPro Global Shopper Support, provided by PayPro Global.

Please note that all of our products are delivered via ESD (Electronic Software Delivery) only. After purchase you will be able to immediately download the registration keys. Also you will receive a copy of registration keys by email. Please make sure to enter a valid email address in your order. If you have not received the keys within 2 hours, please, contact us at sales@sqlmanager.net.

Product distribution | PayPro Global
EMS SQL Manager for DB2 (Business license) + 1-Year Maintenance* | Register Now!
EMS SQL Manager for DB2 (Business license) + 2-Year Maintenance*
EMS SQL Manager for DB2 (Business license) + 3-Year Maintenance*
EMS SQL Manager for DB2 (Non-commercial license) + 1-Year Maintenance*
EMS SQL Manager for DB2 (Non-commercial license) + 2-Year Maintenance*
EMS SQL Manager for DB2 (Non-commercial license) + 3-Year Maintenance*
EMS SQL Manager for DB2 (Trial version) | Download Now!
EMS SQL Manager for DB2 Freeware | Download Now!

*EMS Maintenance Program provides the following benefits:

  • Free software bug fixes, enhancements, updates and upgrades during the maintenance period
  • Free unlimited communications with technical staff for the purpose of reporting Software failures
  • Free reasonable number of communications for the purpose of consultation on operational aspects of the software

After your maintenance expires you will not be able to update your software or get technical support. To protect your investments and have your software up-to-date, you need to renew your maintenance.

You can easily reinitiate/renew your maintenance with our online, speed-through Maintenance Reinstatement/Renewal Interface. After reinitiating/renewal you will receive a confirmation e-mail with all the necessary information.

See also:

How to register SQL Manager


How to register SQL Manager

If you have not registered your copy of SQL Manager for DB2 yet, you can do it by pressing the Register Now button and entering your registration information in the Register SQL Manager for DB2 dialog.

Welcome to SQL Manager - About

To register your newly purchased copy of EMS SQL Manager for DB2, perform the following steps:

  • receive the notification letter from Share-it! with the registration info;
  • enter the Registration Name and the Registration Key from this letter;
  • make sure that the registration process has been completed successfully – check the registration information in the About SQL Manager for DB2 dialog (use the Help | About menu item to open this dialog).

Welcome to SQL Manager - Register product

See also:

Registration


Version history

Product name | Version | Release date
SQL Manager for DB2 | Version 2.1 | October 12, 2012
SQL Manager 2011 for DB2 | Version 2.0.0.1 | December 15, 2010
SQL Manager 2010 for DB2 | Version 1.4.0.1 | December 16, 2009
SQL Manager 2007 for DB2 | Version 1.3.0.1 | June 10, 2009
SQL Manager 2007 for DB2 | Version 1.2.0.1 | September 24, 2008
SQL Manager 2007 for DB2 | Version 1.1.0.1 | April 29, 2008
SQL Manager 2007 for DB2 | Version 1.0.0.1 | August 28, 2007
SQL Manager 2007 for DB2 | First public release | August 14, 2007

Version 2.1

1. Implemented the Project management - with virtual databases that do not require connection to the server:

  • Added the Project Interaction Wizard;
  • Added the Projects settings;
  • Added the Projects tab in the Object Inspector;
  • Now all Object editors work with both ordinary database objects and project objects;
  • Improved the Visual Database Designer (VDBD): now it creates a project, to which the objects from the connected databases or other projects, or objects created in the VDBD, can be added;
  • Added the Execute script as a result of the databases/ projects comparison Wizard;
  • Added the possibility to cancel the last actions on objects in the Projects;
  • Projects are now supported by the DB2 Manager Wizards, which work with Object metadata: i.e. HTML Report Wizard, Print Metadata Wizard, Duplicate Objects Wizard, etc.

2. Added the Database Comparer Wizard to synchronize database structures.

3. Now XML files of the objects are saved in VDBD diagram.

4. Added the possibility to move tabs along the Open windows panel using a mouse;

5. In the Grant Manager now it possible to select a cell range using the SHIFT key and to apply the privileges to the whole selected range at once;

6. Version control. In the history of the object changes now it is possible to view/compare the executed script or object metadata;

7. In all the wizards at the next opening the value of the "Close the Wizard after successful completion" checkbox is saved;

8. Changed the icons of some services;

Version 2.0.0.1

  • Added the Version control (VC) functionality to the Compile Form, SQL Editor, SQL Script, Query Builder and object editors.
  • Added VC facilities: Create tag wizard, Check repository wizard, Get change script wizard, Version History.
  • Database Registration. The database name can now contain up to 18 characters depending on the OS type.
  • When creating a query plan, EXPLAIN tables are now created or recreated in a database if they are absent or incomplete.
  • Data Frame, creation of tables. Such default field values as CURRENT DATE, CURRENT TIME, CURRENT TIMESTAMP are processed correctly now.
  • Data Frame.

Tick Fixed the errors occurred when counting the number of records returned by some queries.

Tick When closing a frame with a dataset opened for editing, the changes are now canceled.

  • DB2 Check Editor. The OK button did not become available after the correct filling of the check body. Fixed now.
  • Indices Editor. Sometimes an AV occurred on editing indices. Fixed now.
  • DB2 console. Added the possibility to clear the results of execution.
  • Package Editor. When creating a new package, optimization profile options were available even if the profile was disabled. Fixed now.
  • SQL Editor, SQL Script. The work with comments within the bodies of procedures, functions, views and outside of their bodies is improved.
  • Object Inspector. Added the possibility to create SUID procedures from tables and views; views from tables and functions that return tables.
  • The Report Designer is now opened in the MDI window.
  • The working of Help services in the report editors is fixed.
  • Visual Database Designer.

Tick The functioning of the Undo/Redo commands for working with several objects at once is improved.

Tick The shortcuts Ctrl+Z and Shift+Ctrl+Z are added for the Undo and Redo commands.

  • Other minor improvements and bugfixes.

Version 1.4.0.1

Changes for server version 9.7 only

  • Tables.

Tick The COMPRESS option is available for tables and indexes.

Tick The DISTRIBUTION tab is added for TABLE and MQTABLE editors.

Tick Table fields can now be renamed.

  • Event monitor. New activity types are added.
  • User and group privileges.

Tick New privileges can be granted: ACESSCTRL, DATAACCESS, EXPLAIN, SQLADM, WLMADM.

Tick DBADM and SECADM can now be granted to a role or a group.

  • Data Types.

Tick Field type selection is extended.

Tick Now it is possible to define the second precision type up to picoseconds for the Timestamp data.

Tick New user types are added: ROW and Cursor.

Tick The DISTINCT and ARRAY types are modified.

  • Packages.

Tick The Optimization profile option is added.

Tick The ACESS PLAN REUSE option can now be changed if necessary.

  • The RUNSTATS service. The Sampling Options section is added.
  • Database and node variables.

Tick New records are added to variables.

Tick The SSL group is added to node variables.

  • Aliases. The ALIAS can now refer to MODULE, GLOBAL TEMPORARY TABLE and SEQUENCE.
  • Procedures and functions.

Tick Procedure parameters can now contain default values.

Tick BOOLEAN and CURSOR data types can now be used in procedures.

  • New objects are added: GLOBAL TEMPORARY TABLE and MODULE

Tick New object are supported with DB Explorer, Dependency Tree, Extract Database, Print Metadata, HTML Report, and Search in metadata tools.

Changes for all versions

  • The Ping Database wizard is added.
  • The hint for a connected database now displays an average ping to DB.
  • The following new options are added to the procedure and function editors: Parameter CCSID, Savepoint level, Commit rule, Inherit special registers.
  • Event Monitor.

Tick Information can now be loaded to database tables.

Tick The Event Monitor editor is significantly modified.

Tick Inactive events are now highlighted in the DB Explorer.

Tick Event monitors can now be launched or stopped through the context menu.

Fixes
  • DDL of objects which names contained ‘_’ is now formed properly.
  • Fixed errors occurred when displaying data.
  • If an error occurred on getting global variable’s value, other variables were not displayed in SQL Editor. Fixed now.
  • Statement parsing is modified. Both ‘FOR --text-- END FOR’ and ‘FOR --text-- END’ statements are parsed correctly.
  • When executing an SQL command, only comments within function and procedure bodies are saved (for server versions older than 9.5).
  • When resetting all toolbars and menus, an empty toolbar “Plugins” used to appear. Fixed now.
  • Now SQL Manager works with the system registry via API functions.
  • Fixed errors occurred when working with GRAPHIC, VARGRAPHIC, LONG_VARGRAPHIC fields.

Version 1.3.0.1

  • Implemented the possibility to connect to nodes and databases using SSH tunneling - for working with data only (services cannot be run against such connection due to the fact that it is not allowed by the server architecture)
  • Added scanning for available hosts at the program startup
  • The method of refreshing objects has been modified to increase the performance when running a number of operations
  • Several bug-fixes concerning services:

Tick the behavior of services has been changed: they are now correctly stopped upon the forced interruption

Tick several corrections have been made regarding unavailability of certain operations on servers of previous series

Tick a number of services' interface corrections have been made

  • Data View:

Tick the number of records fetched from the server is displayed correctly now

Tick several corrections related to work with fields of DateTime, Time and Timestamp data types have been made

  • Grant Manager:

Tick now changes made in the tool are first accumulated in a script for further execution instead of being applied immediately upon each change request

Tick the sequence of commands is now executed within a separate thread to avoid the slow down of the application performance when dealing with a large number of changes

  • Object Explorer:

Tick added the possibility to close all editors only for the current database

Tick added the possibility to duplicate security objects

Tick editing names in the Windows List of object explorer is not allowed now

Tick the search of security objects in DB Explorer is fixed

  • Extract Database:

Tick several corrections are made in the algorithm of extracting database objects with dependencies

Tick now security objects can be extracted as well

  • Search in Metadata: the search form is improved; the search speed is increased
  • HTML Report: a number of corrections and improvements have been implemented in this tool
  • DB2 Console: added the console for executing server commands
  • Visual Database Designer:

Tick objects changes are now applied upon pressing 'Compile', like in object editors

Tick added the 'Undo' and 'Redo' operations

Tick now it is possible to save changed diagram objects and work with them without active database connection

Tick now it is possible to select schema(s) for reverse engineering

Tick added tools for formatting diagram objects: setting fonts, colors, etc.

  • SQL Script and SQL Editor:

Tick SQL scripts are now executed within a thread

Tick SQL parser has been modified for faster processing of large amounts of SQL text

Tick the Object Explorer tree now displays only objects being operated on

Tick missing labels and graphics have been added to the Object Explorer tree

Tick a number of changes and extensions have been added in syntax highlighter

Tick support of the following server commands has been added to SQL Script: CREATE DATABASE, DROP DATABASE, CONNECT, DISCONNECT, ATTACH, DETACH

Tick it is now possible to remove detached databases from the Object Explorer tree and register the newly created ones

Tick the Object Explorer tree is filled within a separate thread now

  • Table Editor: the LOGGED and COMPACT options are added for BLOB fields
  • User-Defined Type Editor: fixed an error with possibility to select a data type that is incorrect or unavailable in the current server version
  • Export Data, Export as SQL Script: changed the query-forming method - statements ending with 'FETCH FIRST', 'FOR UPDATE', 'FOR READ', 'FOR FETCH', 'OPTIMIZE FOR', 'WITH RR', 'WITH RS', 'WITH CS', 'WITH UR' are processed correctly now
  • Other minor improvements and bug-fixes

Version 1.2.0.1

  • Possibility to add/edit/delete wrapper options is implemented
  • The Print Metadata procedure is fixed for the following objects: Aliases, BufferPools, PartitionGroups, EventMonitors, MQTables, Nicknames, Sequences, Distinct Types, Structured Types, Wrappers, Groups, Schemas, Servers, UserMappings
  • Databases located at the nodes using a port different from 50000 used to be displayed improperly in the Database Explorer. Fixed now
  • Added a number of new CLP data manipulation services:

Tick Export

Tick Import

Tick Load

Tick Move

  • The default number of records to be loaded to DataFrame after registering a new database is changed from 1 to 1000
  • Added the possibility to restrict the time of user logging to the server
  • The Activity Monitor which displays the current connections to a database is added
  • New table space options are now available when creating a database (for server version 9.5):

Tick Maximum size

Tick Increase size

Tick Automatic resize

Tick File system caching

  • Database tables partitioning is supported now (the option is located at different tabs in 8.x and 9.x server versions)
  • Databases deleted in other applications were displayed incorrectly when starting SQL Manager. Fixed now
  • A number of new options for table indexes are implemented (for server version 8 and 9)
  • Automatic capitalization of object names is now available
  • Added the possibility to change field parameters for created databases. You can now change the field type (only for compatible types) and size (only increment) and set or reset the Not Null option. Units of measurement can be defined for any BLOB type when setting its field size
  • Fields of the GRAPHIC, VARGRAPHIC and LONG VARGRAPHIC types used to be displayed improperly in the data frame. Fixed
  • The new XML Editor tab is added to the BLOB editor
  • New objects are now available:

Tick Security label component

Tick Security policy

Tick Security label

  • Support of the above mentioned objects and the corresponding editors are also added to the Print data, HTML Report and Dependency Tree tools
  • Label based access control (LBAC) is implemented on the basis of new objects
  • Other minor improvements and bug-fixes

Scroll to top

Version 1.1.0.1

  • New objects such as Audit Policies, Trusted Contexts, Roles and SQL Variables are supported now and can be edited with corresponding editors
  • Grant manager: SECADM (Security Administrator) privilege has been added
  • Grant manager: Read and Write privileges for SQL Variables
  • Grant manager: The ability to select roles, groups and users for editing privileges from the drop-down list
  • Role Editor has been added
  • User Editor / Group Editor / Role Editor: SECADM (Security Administrator) privilege has been added
  • User Editor / Group Editor / Role Editor: the Ancestors tab is added which allows selecting a role to inherit the privileges for the object being edited
  • User Editor / Group Editor / Role Editor: privileges implicitly defined within the Grants tab are highlighted orange
  • User Editor / Group Editor / Role Editor: new tab for defining Read and Write privileges for SQL Variables added
  • SQL Script: commands for creating, modifying and dropping the new objects are now parsed and highlighted
  • SQL Editor: the Variable Value View panel is added
  • Extract Database: new objects support added
  • DB Explorer: the Search in metadata feature is implemented
  • DB Explorer: hints display Unicode now
  • Object Templates: incorrect application of templates on creating new objects has been fixed
  • New data types support (XML, DECFLOAT, VARBINARY, LONGVARBINARY) in Table Editor, UDS Type Editor and UD Editor
  • Arrays are currently supported in UD Editor
  • Data Grid: change in the method of work in asynchronous work mode
  • Data Grid: Support for XML data type similar to the one for BLOB is implemented
  • Data Grid: DECFLOAT type support
  • Editor Options: highlighting and Quick Code have been moved to the Display section
  • Editor Options: the Default Settings style has been added (only border settings are applied)
  • The Save Options wizard saves data in a separate thread now
  • Icons are added in the Service menu
  • Other minor improvements and bug-fixes

Scroll to top

Version 1.0.0.1

  • Node Properties dialog is added. The dialog allows one to view and edit a number of the DB2 Node variables and Node connection info configuration parameters for the current instance and current session which can be changed to optimize server performance
  • Database Properties dialog is added. The dialog allows one to view/edit a number of the DB2 database variables which can be changed to optimize server performance
  • Print Metadata: a report on the table now includes field descriptions
  • Visual Database Designer: optimized the method of diagram refreshing during reverse engineering
  • Creating and editing database reports is now available for limited access users
  • DB Explorer: the ability to rename database groups added

Scroll to top

First public release

Basic features:

  • Rapid database management and navigation
  • Easy management of all DB2 objects (including create/edit/drop operations)
  • Advanced data management and manipulation tools
  • Impressive data export and import capabilities
  • Effective security management
  • Excellent visual and text tools for query building
  • Report designer with clear in use report construction wizard
  • Powerful Visual Database Designer
  • New state-of-the-art graphical user interface

and more...

Scroll to top

See also:

What's new


EMS SQL Manager FAQ

Please read this page attentively if you have questions about EMS SQL Manager for DB2.

Table of contents

Product questions

  • What is EMS SQL Manager for DB2?
  • What is the difference between Full/Lite editions of EMS SQL Manager for DB2?
  • What do I need to start working with EMS SQL Manager for DB2?
  • What is the difference between the Export/Import functions in SQL Manager and the Data Export/Import utilities?
  • What is the difference between the Query Builder module in SQL Manager and the SQL Query for DB2 utility?
  • What is the difference between the Extract Database function in SQL Manager for DB2 and the DB Extract for DB2 standalone utility?

Common questions

  • I can't modify DDL. Why?
  • How can I customize data formats in a grid?
  • I need to perform some changes in database objects of my test database and then make the same changes on master database. Are there any tools for this purpose in SQL Manager for DB2?

Export/Import questions

  • I tried to export data from a table, but found that I can export only the first 1000 records. Can I export all the records from a table if it contains more than 1000 records?
  • What is the difference between the "Extract Database" and "Export as SQL Script" functions?
  • How can I change the default directory where exported data are saved?

Troubleshooting

  • I'm getting an error message indicating that there is no 'db2app.dll'. What is wrong here?

Question/answer list

Product questions

Q: What is EMS SQL Manager for DB2?

A: EMS SQL Manager for DB2 is a powerful tool for DB2 database server administration and development. SQL Manager for DB2 works with various DB2 server versions up to 8.2, and supports most of the latest DB2 features. It offers plenty of powerful tools for experienced users to satisfy all their needs. SQL Manager for DB2 has a new state-of-the-art graphical user interface with well-described wizard system, so clear in use that even a newbie will not be confused with it.

Q: What is the difference between Full/Lite editions of EMS SQL Manager for DB2?

A: These editions of SQL Manager for DB2 differ in price and features. To register SQL Manager for DB2 see the Purchase page, and to learn about the difference in features please go to our Feature Matrix Page.

Q: What do I need to start working with EMS SQL Manager for DB2?

A: First of all, you must have a possibility to connect to some local or remote DB2 server to work with SQL Manager. You can download DB2 database server from http://www-306.ibm.com/software/data/db2/. Besides, you need your workstation to satisfy the system requirements of SQL Manager for DB2.

Q: What is the difference between the Export/Import functions in SQL Manager and the Data Export/Import utilities?

A: The Data Export/Import for DB2 utilities include some additional features which are not available in SQL Manager, such as:

  • export/import data from/to several tables at once;
  • export/import data from/to tables selected from different databases on one node;
  • a command line utility to export/import data using the configuration file with all the export/import options.

Q: What is the difference between the Query Builder module in SQL Manager and the SQL Query for DB2 utility?

A: First of all, SQL Query for DB2 works faster as it is a much lighter product. Besides, it provides additional features for query building, e.g.:

  • keeping query history which allows you to rollback to any edited query;
  • various interface improvements for more productive and easier work.

Q: What is the difference between the Extract Database function in SQL Manager for DB2 and the DB Extract for DB2 standalone utility?

A: The DB Extract for DB2 utility includes some additional features which are not available in SQL Manager, such as:

  • extracting metadata and/or data from several databases on one node;
  • a console application for performing extract in one-touch;
  • faster extraction speed.

Scroll to top

Common questions

Q: I can't modify DDL. Why?

A: The DDL tab of the SQL Manager editors is read-only. It displays object structure as SQL text and reflects the operations you perform over the object under other editor tabs. To modify an object, you can copy the text to the clipboard and edit it using SQL Script Editor. For more details refer to Viewing object DDL structure.

Q: How can I customize data formats in a grid?

A: You can customize all display formats: integer, float, date, time and date/time using the Color & Formats page of the Environment Options dialog.

Q: I need to perform some changes in database objects of my test database and then make the same changes on master database. Are there any tools for this purpose in SQL Manager for DB2?

A: The Database Registration Info dialog provides the Logs tab where you can enable logging metadata changes performed over the database and/or SQL queries executed in SQL Editor.

Scroll to top

Export/Import questions

Q: I tried to export data from a table, but I found that I could export only the first 1000 records. Can I export all the records from a table if it contains more than 1000 records?

A: The Export Data function exports only those records which are currently selected in the grid view. The selection is limited to 1000 by default, so you should increase this value to select all the records to be able to export them all. Also you can set the default limit value using the Grid page of the Environment Options dialog.

Q: What is the difference between the "Extract Database" and "Export as SQL Script" functions?

A: Export as SQL Script is intended for exporting table data that will be inserted into a database system other than DB2 server. Use Extract Database Wizard to copy metadata and/or data to a database on DB2 server afterwards.

Q: How can I change the default directory where exported data are saved?

A: Follow the steps below to change the default directory.

1. Right-click the database alias in DB Explorer and select the 'Database Registration Info...' context menu item (you can also find this item in the 'Database' main menu) to open the Database Registration Info dialog.
2. Proceed to the Directories section within the dialog.
3. Set the 'Default directory for Export Data'.

Scroll to top

Troubleshooting

Q: I'm getting an error message indicating that there is no 'db2app.dll'. What is wrong here?

A: To work with DB2, you need to have DB2 Administration Client installed on your system. SQL Manager uses the following libraries: 'db2app.dll', 'db2cli.dll', 'db2abind.dll', 'db2util.dll', 'db2aprep.dll'. Please make sure that the DB2 Client software of correct version is properly installed on your workstation.

Scroll to top

If you still have any questions, contact us at our Support Center.


Other EMS Products

Quick navigation

MySQL

Microsoft SQL Server

PostgreSQL

InterBase / FireBird

Oracle

IBM DB2

Tools & components

MySQL

 | SQL Management Studio for MySQL EMS SQL Management Studio for MySQL is a complete solution for database administration and development. SQL Studio unites the must-have tools in one powerful and easy-to-use environment that will make you more productive than ever before!
 | SQL Manager for MySQL Simplify and automate your database development process, design, explore and maintain existing databases, build compound SQL query statements, manage database user rights and manipulate data in different ways.
dataexport | Data Export for MySQL Export your data to any of 20 most popular data formats, including MS Access, MS Excel, MS Word, PDF, HTML and more.
dataimport | Data Import for MySQL Import your data from MS Access, MS Excel and other popular formats to database tables via user-friendly wizard interface.
datapump | Data Pump for MySQL Migrate from most popular databases (MySQL, PostgreSQL, Oracle, DB2, InterBase/Firebird, etc.) to MySQL.
datagenerator | Data Generator for MySQL Generate test data for database testing purposes in a simple and direct way. Wide range of data generation parameters.
dbcomparer | DB Comparer for MySQL Compare and synchronize the structure of your databases. Move changes on your development database to production with ease.
extract | DB Extract for MySQL Create database backups in the form of SQL scripts, save your database structure and table data as a whole or partially.
query | SQL Query for MySQL Analyze and retrieve your data, build your queries visually, work with query plans, build charts based on retrieved data quickly and more.
datacomparer | Data Comparer for MySQL Compare and synchronize the contents of your databases. Automate your data migrations from development to production database.
 | Scroll to top

Microsoft SQL Server

 | SQL Management Studio for SQL Server EMS SQL Management Studio for SQL Server is a complete solution for database administration and development. SQL Studio unites the must-have tools in one powerful and easy-to-use environment that will make you more productive than ever before!
 | EMS SQL Backup for SQL Server Perform backup and restore, log shipping and many other regular maintenance tasks on the whole set of SQL Servers in your company.
sqladmin | SQL Administrator for SQL Server Perform administrative tasks in the fastest, easiest and most efficient way. Manage maintenance tasks, monitor their performance schedule, frequency and the last execution result.
 | SQL Manager for SQL Server Simplify and automate your database development process, design, explore and maintain existing databases, build compound SQL query statements, manage database user rights and manipulate data in different ways.
dataexport | Data Export for SQL Server Export your data to any of 20 most popular data formats, including MS Access, MS Excel, MS Word, PDF, HTML and more
dataimport | Data Import for SQL Server Import your data from MS Access, MS Excel and other popular formats to database tables via user-friendly wizard interface.
datapump | Data Pump for SQL Server Migrate from most popular databases (MySQL, PostgreSQL, Oracle, DB2, InterBase/Firebird, etc.) to Microsoft® SQL Server™.
datagenerator | Data Generator for SQL Server Generate test data for database testing purposes in a simple and direct way. Wide range of data generation parameters.
dbcomparer | DB Comparer for SQL Server Compare and synchronize the structure of your databases. Move changes on your development database to production with ease.
extract | DB Extract for SQL Server Create database backups in the form of SQL scripts, save your database structure and table data as a whole or partially.
query | SQL Query for SQL Server Analyze and retrieve your data, build your queries visually, work with query plans, build charts based on retrieved data quickly and more.
datacomparer | Data Comparer for SQL Server Compare and synchronize the contents of your databases. Automate your data migrations from development to production database.
 | Scroll to top

PostgreSQL

 | SQL Management Studio for PostgreSQL EMS SQL Management Studio for PostgreSQL is a complete solution for database administration and development. SQL Studio unites the must-have tools in one powerful and easy-to-use environment that will make you more productive than ever before!
 | EMS SQL Backup for PostgreSQL Creates backups for multiple PostgreSQL servers from a single console. You can use automatic backup tasks with advanced schedules and store them in local or remote folders or cloud storages
 | SQL Manager for PostgreSQL Simplify and automate your database development process, design, explore and maintain existing databases, build compound SQL query statements, manage database user rights and manipulate data in different ways.
dataexport | Data Export for PostgreSQL Export your data to any of 20 most popular data formats, including MS Access, MS Excel, MS Word, PDF, HTML and more
dataimport | Data Import for PostgreSQL Import your data from MS Access, MS Excel and other popular formats to database tables via user-friendly wizard interface.
datapump | Data Pump for PostgreSQL Migrate from most popular databases (MySQL, SQL Server, Oracle, DB2, InterBase/Firebird, etc.) to PostgreSQL.
datagenerator | Data Generator for PostgreSQL Generate test data for database testing purposes in a simple and direct way. Wide range of data generation parameters.
dbcomparer | DB Comparer for PostgreSQL Compare and synchronize the structure of your databases. Move changes on your development database to production with ease.
extract | DB Extract for PostgreSQL Create database backups in the form of SQL scripts, save your database structure and table data as a whole or partially.
query | SQL Query for PostgreSQL Analyze and retrieve your data, build your queries visually, work with query plans, build charts based on retrieved data quickly and more.
datacomparer | Data Comparer for PostgreSQL Compare and synchronize the contents of your databases. Automate your data migrations from development to production database.
 | Scroll to top

InterBase / Firebird

 | SQL Management Studio for InterBase/Firebird EMS SQL Management Studio for InterBase and Firebird is a complete solution for database administration and development. SQL Studio unites the must-have tools in one powerful and easy-to-use environment that will make you more productive than ever before!
 | SQL Manager for InterBase/Firebird Simplify and automate your database development process, design, explore and maintain existing databases, build compound SQL query statements, manage database user rights and manipulate data in different ways.
dataexport | Data Export for InterBase/Firebird Export your data to any of 20 most popular data formats, including MS Access, MS Excel, MS Word, PDF, HTML and more
dataimport | Data Import for InterBase/Firebird Import your data from MS Access, MS Excel and other popular formats to database tables via user-friendly wizard interface.
datapump | Data Pump for InterBase/Firebird Migrate from most popular databases (MySQL, SQL Server, Oracle, DB2, PostgreSQL, etc.) to InterBase/Firebird.
datagenerator | Data Generator for InterBase/Firebird Generate test data for database testing purposes in a simple and direct way. Wide range of data generation parameters.
dbcomparer | DB Comparer for InterBase/Firebird Compare and synchronize the structure of your databases. Move changes on your development database to production with ease.
extract | DB Extract for InterBase/Firebird Create database backups in the form of SQL scripts, save your database structure and table data as a whole or partially.
query | SQL Query for InterBase/Firebird Analyze and retrieve your data, build your queries visually, work with query plans, build charts based on retrieved data quickly and more.
datacomparer | Data Comparer for InterBase/Firebird Compare and synchronize the contents of your databases. Automate your data migrations from development to production database.
 | Scroll to top

Oracle

 | SQL Management Studio for Oracle EMS SQL Management Studio for Oracle is a complete solution for database administration and development. SQL Studio unites the must-have tools in one powerful and easy-to-use environment that will make you more productive than ever before!
 | SQL Manager for Oracle Simplify and automate your database development process, design, explore and maintain existing databases, build compound SQL query statements, manage database user rights and manipulate data in different ways.
dataexport | Data Export for Oracle Export your data to any of 20 most popular data formats, including MS Access, MS Excel, MS Word, PDF, HTML and more.
dataimport | Data Import for Oracle Import your data from MS Access, MS Excel and other popular formats to database tables via user-friendly wizard interface.
datapump | Data Pump for Oracle Migrate from most popular databases (MySQL, PostgreSQL, MySQL, DB2, InterBase/Firebird, etc.) to Oracle
datagenerator | Data Generator for Oracle Generate test data for database testing purposes in a simple and direct way. Wide range of data generation parameters.
dbcomparer | DB Comparer for Oracle Compare and synchronize the structure of your databases. Move changes on your development database to production with ease.
extract | DB Extract for Oracle Create database backups in the form of SQL scripts, save your database structure and table data as a whole or partially.
query | SQL Query for Oracle Analyze and retrieve your data, build your queries visually, work with query plans, build charts based on retrieved data quickly and more.
datacomparer | Data Comparer for Oracle Compare and synchronize the contents of your databases. Automate your data migrations from development to production database.
 | Scroll to top

IBM DB2

 | SQL Manager for DB2 Simplify and automate your database development process, design, explore and maintain existing databases, build compound SQL query statements, manage database user rights and manipulate data in different ways.
dataexport | Data Export for DB2 Export your data to any of 20 most popular data formats, including MS Access, MS Excel, MS Word, PDF, HTML and more.
dataimport | Data Import for DB2 Import your data from MS Access, MS Excel and other popular formats to database tables via user-friendly wizard interface.
datapump | Data Pump for DB2 Migrate from most popular databases (MySQL, PostgreSQL, Oracle, MySQL, InterBase/Firebird, etc.) to DB2
datagenerator | Data Generator for DB2 Generate test data for database testing purposes in a simple and direct way. Wide range of data generation parameters.
extract | DB Extract for DB2 Create database backups in the form of SQL scripts, save your database structure and table data as a whole or partially.
query | SQL Query for DB2 Analyze and retrieve your data, build your queries visually, work with query plans, build charts based on retrieved data quickly and more.
 | Scroll to top

Tools & components

advancedexport | Advanced Data Export for RAD Studio VCL Advanced Data Export for RAD Studio VCL allows you to save your data in the most popular office programs formats.
advancedexport | Advanced Data Export .NET Advanced Data Export .NET is a component for Microsoft Visual Studio .NET that will allow you to save your data in the most popular data formats for the future viewing, modification, printing or web publication. You can export data into MS Access, MS Excel, MS Word (RTF), PDF, TXT, DBF, CSV and more! There will be no need to waste your time on tiresome data conversion - Advanced Data Export will do the task quickly and will give the result in the desired format.
advancedimport | Advanced Data Import for RAD Studio VCL Advanced Data Import for RAD Studio VCL will allow you to import your data to the database from files in the most popular data formats.
pdfgenerator | Advanced PDF Generator for RAD Studio Advanced PDF Generator for RAD Studio gives you an opportunity to create PDF documents with your applications written on Delphi or C++ Builder.
querybuilder | Advanced Query Builder for RAD Studio VCL Advanced Query Builder for RAD Studio VCL is a powerful component for Delphi and C++ Builder intended for visual building SQL statements for the SELECT, INSERT, UPDATE and DELETE clauses.
excelreport | Advanced Excel Report for RAD Studio Advanced Excel Report for RAD Studio is a powerful band-oriented generator of template-based reports in MS Excel.
advancedlocalizer | Advanced Localizer for RAD Studio VCL Advanced Localizer for RAD Studio VCL is an indispensable component for Delphi for adding multilingual support to your applications.
 | Scroll to top


Getting Started

SQL Manager for DB2 provides you with an ability to contribute to efficient DB2 administration and development using a variety of available tools easily and quickly.

The succeeding chapters of this document are intended to inform you about the tools implemented in SQL Manager for DB2. Please see the instructions below to learn how to perform various operations in the easiest way.

  • Selecting style and language
  • How the application looks when you start it for the first time
  • Using Desktop Panel
  • Database navigation
  • Working with database objects
  • Using context menus
  • Working with child windows

See the How to... chapter to view brief instructions on how to perform some operations on databases, database objects, etc.

Enjoy your work with EMS SQL Manager for DB2!

See also:

Database Explorer

Database Management

Database Objects Management

Query Management Tools

Data Management

Import/Export Tools

Change management

Database Tools

Instance Services

Personalization

How To...


Selecting style and language

SQL Manager for DB2
  • Index
  • « Prev
  • Next »

Selecting environment style and program language

Before you start SQL Manager for the first time, you have to choose the environment style and the interface language. You can change these settings any time using the Environment Options dialog (Options | Environment Options...) to configure the environment style and the Select Language dialog (Options | Select Program Language...) to change the program language.

Getting started - Selecting style and language

Environment style

This switch allows you to define the main window behavior style - RadioButton MDI (like in MS Office applications) or RadioButton Floating windows (like Borland Delphi IDE).

Bar style for child forms

Here you can define the location of action buttons: RadioButton within the Navigation bar (on the left) and/or RadioButton on the Toolbar.

Program Language

Select the interface language from the list of available languages.

See also:

First time started

Using Desktop Panel

Database navigation

Working with database objects

Using context menus

Working with windows


First time started

This is how SQL Manager for DB2 looks when you start it for the first time. Use the Desktop panel to fulfill any of common tasks: Create a new database, Manage existing database(s), and several tasks that do not require database registration, i.e. Execute SQL script, accessing the reference system or using available Internet resources.

Getting started - First time started

The main menu allows you to perform various Database operations, open To-Do List and activate/deactivate Database Explorer, SQL Assistant and various toolbars within the View menu, manage your databases using items of the Tools and Services menus, customize the application using the Options menu, manage SQL Manager Windows using Window List and other tools, view the Tip of the Day and access Registration information and product documentation, update the product to the latest version using the corresponding items available within the Help menu.

See the How to... chapter to view brief instructions on how to perform some operations on databases, database objects, etc.

To start working with your DB2 database server, you should first register the node using Register Node wizard. After that you need to register one or several databases using Register Database Wizard or create a new database using Create Database wizard.

By default the corresponding btnRegisterHost Register Node, btnRegisterDB Register Database, btnCreateDB Create Database buttons are available on the toolbar, within the Database menu or you can use the Desktop Panel for the same purpose.

To view a SQL Manager for DB2 help documentation use the SQL Manager help system item on the Desktop Panel or select the Help | Contents main menu item.

When the database connection settings are specified, you can set connection to your database and proceed to Database navigation, Database Objects management, Working with SQL queries and other tools of SQL Manager.

See also:

Selecting style and language

Using Desktop Panel

Database navigation

Working with database objects

Using context menus

Switching windows


Using Desktop Panel

Desktop Panel is the area that is visible when no child windows are open in SQL Manager for DB2. The working area of Desktop Panel is divided into four sections: Getting Started, Database Tools, Help and Support, Internet Resources.

Getting started - Using Desktop Panel

Using the Desktop Panel items you can:

Getting Started section

create a new DB2 database

register existing database(s) to operate them afterwards in SQL Manager

create a new table within the current database using the New Table window (this item is available if there is at least one active database connection)

create a new database object within the current database (this item is available if there is at least one active database connection)

Database Tools section

execute a script using SQL Script Editor

execute a SQL query (this item is available if there is at least one active database connection)

grant permissions on database objects to DB2 users using Grant Manager (this item is available if there is at least one active database connection)

Help and Support section

show this help file

Internet Resources section

visit SQL Manager Home Page

browse SQL Manager online documentation

go to Technical Support Center

See also:

Selecting style and language

First time started

Database navigation

Working with database objects

Using context menus

Working with windows


Database navigation

After you have registered the required database(s), the corresponding alias(es) appear in the DB Explorer tree on the left. If the Show Hosts option is checked on the Environment Options | DB Explorer page, the host nodes are also displayed in the tree (alternatively, you can use the Show Hosts item of the Database context menu, or the drop-down menu of the View Mode btnViewMode toolbar button for the same purpose).

Getting started - Database navigation

DB Explorer displays all registered nodes and databases. Connected/disconnected databases can be easily distinguished in the tree: aliases of disconnected databases are grayed out.

Getting started - Database navigation - Disconnected DB

To connect to a database, simply double-click its alias (or select the database alias in DB Explorer and press Enter). If the connection is successful, the database node expands into a tree of objects.

Now you can navigate within the database objects. Use SQL Assistant to get extended information about the currently selected object.

For your convenience objects having different status (e.g. enabled/disabled) objects are displayed with different icons in Database Explorer. Database Explorer also allows you to distinguish invalid database objects by their icons which are marked with a red cross. On the screenshot below the View 'view1' is marked as invalid because of some errors in its SQL definition, or the referenced table has been dropped from the database.

Getting started - Database navigation - Object status

See also:

Selecting style and language

First time started

Using Desktop Panel

Working with database objects

Using context menus

Working with windows


Working with database objects

The nodes of the DB Explorer tree allow you to access objects of the selected database. If DB2 server you are connected to supports certain types of objects, their nodes will appear in the tree.

Double-click an object group to expand/collapse the corresponding tree node.

Double-click an object to open it in the corresponding editor.

Right-click an object to display its context menu which allows you to perform various operations over the selected object or database.

Getting started - Working with database objects

If you want to use the DB Explorer tree for working with table subobjects (fields, indexes, Foreign keys, etc.), check the Show table subobjects option which is available within the General options group of the Environment Options | DB Explorer page (you can also use the Show Table Subobjects menu item in the drop-down menu of the View Mode btnViewMode toolbar button for the same purpose.)

Getting started - Working with database objects - View Mode

See also:

Selecting style and language

First time started

Using Desktop Panel

Database navigation

Using context menus

Working with windows


Using context menus

The context menus are aimed at facilitating your work with SQL Manager for DB2: you can perform a variety of operations using context menu items.

Select an object in DB Explorer and right-click its alias to open the context menu.

  • Node context menu
  • Database context menu
  • Object context menu

See also:

Selecting style and language

First time started

Using Desktop Panel

Database navigation

Working with database objects

Working with windows


Node context menu

The context menu of a Node in the DB Explorer tree allows you to:

  • register a new database using Register Database Wizard;
  • store changes in metadata using Change management;
  • view/edit the Node properties within the Node Properties dialog;
  • create projects which allow you to work with virtual databases using the Project Interaction Wizard;
  • register a new Node using Register Node Wizard;
  • unregister the selected Node;
  • view/edit the selected host info within the Node Registration Info dialog;
  • configure representation of objects in Database Explorer;
  • create a new tab for the selected Node to access it through this tab quickly and/or manage the existing tab;
  • search for an object within the tree.

Using context menus - Node context menu

See also:

Database context menu

Object context menu


Database context menu

The context menu of a registered database in the DB Explorer tree allows you to:

  • connect to the selected database (if connection to the database is not active yet);
  • disconnect from the selected database (if connection to the database has been already activated);
  • view/edit the selected database registration information within the Database Registration Info dialog;
  • store changes in metadata using Change management;
  • view/edit the Database properties;
  • create projects which allow you to work with virtual databases using the Project Interaction Wizard;
  • access tools allowing you to perform common database maintanance and instance operations quickly;
  • register a new database using Register Database Wizard;
  • unregister the selected database;
  • register a new Node using Register Node Wizard;
  • unregister the Node where the selected database resides;
  • configure representation of objects in Database Explorer;
  • create a new tab for the selected database to access it through this tab quickly;
  • search for an object within the tree.

Using context menus - Database context menu

See also:

Node context menu

Object context menu


Object context menu

The context menu of an object (e.g. table or view) in the DB Explorer tree allows you to:

  • create a new database object of the same type;
  • edit the selected object in its editor;
  • rename the selected object;
  • drop the selected object from the database;
  • duplicate the selected object (create a new object with the same DDL structure and properties as the selected object has);
  • access common Tasks applied to this object;
  • perform data manipulation operations (for tables and views);
  • generate the object script and open it in SQL Editor;
  • generate the object script and copy its text to Windows clipboard;
  • refresh all objects of the selected object type;
  • view/edit the database registration information within the Database Registration Info dialog (for database objects);
  • create a new tab for the selected object to access it through this tab quickly and/or manage the existing tab;
  • search for an object within the tree.

Using context menus - Object context menu

See also:

Node context menu

Database context menu


Working with windows

The Windows Toolbar of SQL Manager allows you to switch between child windows easily, like in Windows Task Bar.

To activate the window you need, simply click one of the window buttons. To perform some additional actions with the window, right-click its tab and select the corresponding menu item from the popup menu.

Getting started - Switching windows

If you have multiple windows opened, you can also switch between them using the Ctrl+Tab shortcut.

You can move tabs along the Open Windows panel using a mouse: just drag and drop selected window tab.

The Number of open editors is restricted option available in the Windows section of the Environment Options options dialog allows you to set the maximum number of editors that may be opened simultaneously. When the number of editors exceeds the specified value, the previously opened editors will be closed automatically.

The Windows menu facilitates your work with SQL Manager windows.

The Windows menu allows you to:

  • view the Windows List within the corresponding tab of DB Explorer;
  • set all current windows cascade:

Getting started - Windows - Cascade

  • minimize all windows;
  • restore all windows;
  • tile all current windows horizontally:

Getting started - Windows - Tile Horizontal

  • tile all current windows vertically:

Getting started - Windows - Tile Vertical

  • set defaults to all windows;
  • reset all toolbars and menus;
  • close all windows;
  • close all editors of the specified object type (can be selected from the submenu);
  • switch to the previous window;
  • switch to the next window;
  • activate one of currently opened windows.

See also:

Selecting style and language

First time started

Using Desktop Panel

Database navigation

Working with database objects

Using context menus


Database Explorer

Database Explorer (or DB Explorer) is the basic window of SQL Manager for DB2 for navigation within databases and working with database objects. The tree-like structure of DB Explorer allows you to manage the databases, database objects and perform other everyday operations quickly and easily.

The following list contains the most frequently used features provided by Database Explorer.

  • Managing database registration info
  • Connecting to databases
  • Performing basic operations upon database objects
  • Selecting multiple objects
  • Navigating database objects using multiple tabs
  • Easy access to recently opened objects
  • Managing favorite objects
  • Searching within the tree
  • Viewing extended information about database objects
  • Configuring Database Explorer
  • Managing Favorite queries

All objects are structured by their types and are available within the corresponding nodes of the tree. The number of objects of each type is displayed in brackets after the node name denoting the object type. To expand/collapse a node, you can double-click it or use the +/- icons. Alternatively, yu can use "Right"/"Left" buttons: when pressing "Left", first the subnodes of the current node are collapsed, after pressing again the parent node is focused and so on; when pressing "Right" the current node expands.

To view/hide the Database Explorer window, use the View | DB Explorer main menu item or press the F11 key.

DB Explorer - View

Use the Ctrl+Shift+C shortcut to collapse current DB Explorer tree branch and switch to the parent node.

Note that you can change host and database aliases order by dragging them within the DB Explorer tree.

See also:

Getting Started

Database Management

Database Objects Management

Query Management Tools

Data Management

Import/Export Tools

Change management

Database Tools

Instance Services

Personalization

How To...


Managing database registration info

After you have created and/or registered your database in SQL Manager for DB2, you can perform a number of operations with the database using the context menu.

If you need to view/edit the registration information of a database, right-click the database alias in DB Explorer and select the Database Registration Info... context menu item to open the Database Registration Info dialog.

DB Explorer - Managing database registration info

See also:

Register Database

Database Registration Info


Connecting to databases

When the DB2 node is registered, and the database registration is complete, you can establish connection to your database.

The simplest way to connect to a database is to double-click its alias in the Database Explorer tree. The same operation can be performed by selecting the btnConnectToDB Connect to Database item of the database alias context menu, or by using the Database | btnConnectToDB Connect to Database main menu item.

Alternatively, you can use the Shift+Ctrl+C shortcut or the btnConnectToDB Connect to Database toolbar button.

DB Explorer - Connecting to databases - Toolbar

See also:

Register Database

Database Registration Info


Operations with database objects

Database Explorer allows you to perform various operations with database objects.

To open an object in its editor, you can double-click the object in the DB Explorer tree.

You can also right-click an object within the DB Explorer tree and use its context menu to perform a number of operations:

  • create a new object (the New <object>... item);
  • edit currently selected object (the Edit <object_name>... item);
  • rename currently selected object (for tables only) (the Rename <object_name>... item);
  • drop the selected object from the database (the Drop <object_name>... item);
  • duplicate the selected object (the Duplicate <object_name>... item);
  • define grants for the selected object (the Tasks -> Grants for <object_name>... item).

Note that the context menu contains object-specific items only when the object is currently selected in DB Explorer.

DB Explorer - Operations with database objects

Using drag-and-drop operations you can add objects to SQL Editor, Visual Query Builder or SQL Script Editor. For your convenience the Insert to editor dialog is implemented. The dialog allows you to specify the statement to be inserted into the editor: Name, SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, Fields list, Name and Type. If necessary, set the Alias and Prefix for variable.

If more convenient, you can edit the generated statement manually (see Working with SQL Editor area).

DB Explorer - Insert to Editor

See also:

Database Objects Management

SQL Editor

Selecting multiple objects


Selecting multiple objects

You can select more than one object in Database Explorer by pressing the Ctrl or the Shift key and selecting multiple objects one by one.

The context menu of several selected objects allows you to:

  • edit the selected objects;
  • drop the selected objects;
  • perform other operations with the first of the selected objects (see Operations with database objects).

DB Explorer - Selecting multiple objects

Hint: You can move several objects to your favorite objects: just drag and drop the selected objects to the previously created subfolder within the Favorite Objects node of DB Explorer.

See also:

Operations with database objects

Database Objects Management

Managing Favorite objects


Using tabs for database navigation

To make your work with SQL Manager for DB2 even more convenient, the capability of working with several tabs is implemented.

You can use tabs when you wish to work with a particular node of the DB Explorer tree only: with one specific schema, or with tables of some schema, or with a specific database Favorite objects. Creating such tabs will minimize scrolling within large trees, you only need to switch between them with a single click on the corresponding tab.

Standard tabs

iconDatabases Databases

This tab provides a quick access to the databases and database objects. The tree-like structure of DB Explorer allows you to manage the databases, database objects and perform other everyday operations quickly and easily. All objects are structured by their types and are available within the corresponding nodes of the tree. The number of objects of each type is displayed in brackets after the node name denoting the object type. To expand/collapse a node, you can double-click it or use the +/- icons.

iconWindowsList Windows list

This tab allows you to browse the list of windows that are currently opened within SQL Manager for DB2 IDE. If necessary, you can right-click within the list area to call the popup menu which allows you to bring a window to foreground, close windows one by one or in groups, and to arrange the windows according to your preferences.

iconProjects Projects

This tab allows you to view created projects. All objects of the project are structured by their types and are available within the corresponding nodes of the tree. If necessary, you can right-click within the list area to call the popup menu which allows you to launch Compare Databases Wizard or Project Interaction Wizard.

Creating tabs

In order to create a new tab:

  • right-click the node (e.g. the Tables node) for which you wish to create a tab and select the New Tab from Here... context menu item.

Note: A tab can be created only on the basis of a tree node. For example, if the Show Table Subobjects option is disabled in the View Mode menu, the New Tab from Here... item is not be available for tables, since none of them will be a tree node anymore.

DB Explorer - Using tabs - New tab

The specified tabs can be displayed in either of the two views:

  • as icons on the lower panel of DB Explorer:

DB Explorer - Using tabs - View as icons

  • as tabs with captions:

DB Explorer - Using tabs - View as tabs

Hint: You can reorder items in the tabs view by dragging their captions up and down.

To add/remove items to/from the tabs view, you can drag the horizontal splitter up/down:

DB Explorer - Splitter for tabs

or click the Configure buttons icon available in the bottom right corner of the DB Explorer window, and select Show More Buttons / Show Fewer Buttons / Add or Remove Buttons items from the popup menu.

DB Explorer - Using tabs - Add or remove buttons

Note: Navigation through the tabs is also possible with the help of the following shortcuts:

  • Ctrl+Shift+N - move to the next tab;
  • Ctrl+Shift+P - move to the previous tab.

Renaming tabs

In order to rename a tab:

  • switch to the tab by clicking its caption or icon (there can be only one active tab, and it is highlighted with a different color);
  • right-click within the DB Explorer area and select the Rename Current Tab... context menu item.

Removing tabs

In order to remove a tab:

  • switch to the tab by clicking its caption or icon (there can be only one active tab, and it is highlighted with a different color);
  • right-click within the DB Explorer area and select the Delete Current Tab context menu item.

See also:

Managing Favorite objects

Windows List

Database Objects Management


Recently opened objects

Use the Recent Objects btnRecentObjects button available on the DB Explorer toolbar to access the list of recently opened database objects (during the current session).

This list is common for all registered databases. Next to the object name the database name is displayed. Select an object from this list to open it using its editor.

DB Explorer - Recently opened objects

To change the number of objects that are considered 'recent', select the Options | Environment Options main menu item, proceed to the Tools | DB Explorer section within the Environment Options dialog, and set the Recent objects count option value (see Environment Options for details).

See also:

Database Objects Management

Environment Options


Managing Favorite objects

Use the Favorite objects node for each database to work with the selected objects of this database only. You can place any object link from the database tree here.

You can also create a separate tab for your favorite object. See Using tabs for database navigation section for details.

DB Explorer - Managing projects - NewTab

Creating project folders

In order to create a new folder:

  • create a folder (if necessary, you can create subfolders inside the favorite objects folder) by right-clicking the Favorite Objects node and selecting the New Sub Folder... context menu item;

DB Explorer - Managing projects - New Subfolder

  • enter the folder name within the New Folder dialog.

Adding objects

In order to add a new object to the favorite objects folder:

  • extent the Favorite Objects node in DB Explorer;
  • drag an object (or multiple objects) from the database tree to the favorite objects folder

or

  • right-click the favorite objects folder and select the Add Object... context menu item, or use the Ins key;
  • use the Select Object dialog to specify objects to be added to the favorite objects folder.

DB Explorer - Managing projects - Adding objects

Removing objects from the favorite objects

In order to remove an object from the favorite objects:

  • right-click the object and select the Remove <object_name> from Folder context menu item, or use the Shift+Ctrl+Del shortcut;
  • confirm removing in the dialog window.

Note: This operation does not drop the object from the database, but only removes its alias from the favorite objects tree.

See also:

Using tabs for database navigation

Select Object dialog

Database Objects Management


Searching within the tree

SQL Manager for DB2 provides an ability to search for items within the DB Explorer tree. Searching for items may be useful if you have a lot of database objects, and it may be sometimes hard to find the one you need.

There are two search facilities implemented in SQL Manager for your convenience. You can search for objects within the DB Explorer tree in either of the following ways:

  • using the Find Object dialog

To call the Find Object dialog, right-click the Database alias, any database object group nodes or objects in the DB Explorer tree and select the Find Object... context menu item, or use the Ctrl+F shortcut.

DB Explorer - Find Object

Available search options are similar to those provided by the Find Text dialog. For detailed description of the search options refer to the Find Text dialog page.

Note: You can specify whether the search will be performed within the entire tree or within the currently selected node only: toggle search mode using the [image] Search by categories button on the Search Panel, or use the corresponding option available in the Tools | DB Explorer section of the Environment Options dialog.

  • using the Search Panel

Type in the first letters in the edit-box, and the corresponding object will be highlighted in the tree, as displayed in the picture below. The [image] [image] buttons allow you to define the search direction. The [image] button toggles searching by category.

DB Explorer - Search Panel

By default, the Search Panel is activated in the upper area of DB Explorer. To disable the panel, right-click within the panel and deselect the checkbox at the corresponding popup menu item.

DB Explorer - Search Panel - Activate

Hint: The Search Panel is dockable, i.e. you can drag it to any location within the DB Explorer form.

See also:

Find Text dialog


SQL Assistant

SQL Assistant which is located at the bottom of the Database Explorer window helps you to work with your database objects. Depending on the current selection in DB Explorer, the SQL Assistant area displays additional information pertaining to the selected object.

DB Explorer - SQL Assistant

If you select a database in DB Explorer, SQL Assistant displays the list of the database schemas, object groups and the number of objects in each group.

Note: If you want the number of objects to be displayed automatically check the CheckBox Refresh objects on connection option in the Database Registration Info dialog.

If you select a schema in DB Explorer, SQL Assistant displays the list of the schema object groups and the number of objects in each group.

Selecting an object group in the DB Explorer displays the list of the objects in SQL Assistant. Double-clicking the object name in SQL Assistant makes the object available for editing in the appropriate editor. The context menu of the object or group of objects (selected with the Ctrl or Shift keys pressed) allows you to edit or drop the selected objects.

If you select a table or a view in DB Explorer, SQL Assistant displays the list of the table subobjects (e.g. fields and their types) by default. What is displayed in SQL Assistant when a table or a view is selected in DB Explorer depends on the Table Details selection. Click the View Mode btnViewMode toolbar button and select the Table Details | Show... (or View Details | Show...) drop-down menu item, or use the context menu of SQL Assistant. Possible values are: Show Fields, Show Primary/Unique Keys, Show Foreign Keys, Show Checks, Show Indexes, Show Triggers, Show Table Status, Show Definition, Show Description (for tables); Show Fields, Show Triggers, Show Definition (for views).

If you select a procedure or a function in DB Explorer, SQL Assistant lists its parameters by default. Use the Procedure Details | Show... (or Function Details | Show...) context menu item within the SQL Assistant area to define the content of SQL Assistant when a procedure or a function is selected in DB Explorer. Possible values are: Show Parameters, Show Definition, Show Description.

Selecting other objects in DB Explorer displays the DDL definition in SQL Assistant by default. Use the Other Objects' Details | Show... context menu item within the SQL Assistant area to define the content of SQL Assistant when an object is selected in DB Explorer. Possible values are: Show Definition, Show Description.

DB Explorer - SQL Assistant - Object details

You can also use SQL Assistant to work with your queries quickly. You can drag-and-drop object aliases to the SQL Editor, Visual Query Builder or SQL Script Editor working area, in the same way as this operation is performed in Database Explorer.

See also:

Database Objects Management


Configuring Database Explorer

Configuring DB Explorer toolbar

The toolbar of Database Explorer contains most frequently used tools for working with databases and database objects, and a tool for configuring DB Explorer. The following actions are available in the toolbar by default:

  • create a new object;
  • refresh the current tree branch;
  • connect to/disconnect from a database;
  • view the selected object properties (for nodes and databases);
  • configure Database Explorer using the View Mode menu;
  • view the list of recently opened objects;
  • jump to any of registered databases quickly.

Click More buttons... btnMoreButtons on the right side of the toolbar and use the Add or Remove Buttons popup menu items to define the set of actions available in the toolbar. To customize the toolbar, select the Add or Remove Buttons | Customize... item from the popup menu.

DB Explorer - Configuring DB Explorer - Toolbar

Configuring the Search Panel

Click More buttons... btnMoreButtons on the right side of the Search Panel and use the Add or Remove Buttons popup menu items to define the set of the panel elements. To customize the panel, select the Add or Remove Buttons | Customize... item from the popup menu.

DB Explorer - Search Panel - Customize

Using View Mode menu

Use the View Mode btnViewMode toolbar button to configure Database Explorer according to your needs.

The drop-down menu called upon clicking this button allows you to:

  • show/hide table subobjects as child nodes of tables;
  • show/hide view subobjects as child nodes of views;
  • show/hide procedure subobjects as child nodes of procedures;
  • show/hide function subobjects as child nodes of functions;
  • show/hide host nodes for registered databases;
  • sort the list of databases by their aliases in the DB Explorer tree;
  • show/hide disconnected databases;
  • configure table details for the SQL Assistant area.

DB Explorer - Configuring DB Explorer - View Mode

Use the DB Explorer section of the Environment Options dialog (Options | Environment Options...) to see more options to configure Database Explorer.

See also:

Database Objects Management


Managing Favorite queries

Favorite Queries is a new feature of SQL Manager. Now you are provided with an opportunity to save the most frequently used SQL queries as Favorite Queries.

Use the Favorite Queries node of DB Explorer to access the list of your Favorite queries quickly. Queries stored in the database and those stored in Windows registry can be easily distinguished by their icons.

Using the context menu you can create a new Favorite query or edit an existing one using Favorites editor, open any of the existing queries in SQL Editor or remove a query if you don't need it any longer.

DB Explorer - Managing Favorite queries

You can also create a separate tab for your Favorite queries. See Using tabs for database navigation section for details.

See also:

Using tabs for database navigation

Favorites editor


Database Management

SQL Manager for DB2 provides a number of tools you may need to manage your DB2 databases.

Find the list of common database management operations for working in SQL Manager below.

btnRegisterHost Registering Nodes

In order to register a node in SQL Manager for DB2:

  • select the Database | Register Node... main menu item, or use the corresponding Register Node toolbar button;
  • right-click any node alias and select the Register Node... context menu item in the DB Explorer tree;
  • set all the necessary options using Register Node wizard which guides you through the entire process of node registration.

btnUnregisterHost Unregistering Nodes

In order to unregister a node in SQL Manager for DB2:

  • select the node to unregister in the DB Explorer tree;
  • select the Database | Unregister Node main menu item, or use the corresponding Unregister Node toolbar button;
  • right-click the node alias and select the Unregister Node context menu item in the DB Explorer tree;
  • confirm unregistering in the corresponding dialog window.

btnDBProperties Viewing and Editing Node Properties

In order to view/edit node properties in SQL Manager for DB2:

  • select the node in the DB Explorer tree;
  • use the corresponding Properties toolbar button;
  • right-click the node alias and select the Node Properties context menu item in the DB Explorer tree.

btnCreateDB Creating Databases

In order to create a database in SQL Manager for DB2:

  • select the Database | Create Database main menu item, or use the corresponding Create Database toolbar button;
  • set all the necessary options using Create Database wizard which guides you through the entire process of creating a new database.

iconDropDB Dropping Databases

In order to drop a database in SQL Manager for DB2:

  • select the database to drop in the DB Explorer tree;
  • select the Database | Drop Database main menu item;
  • confirm dropping in the corresponding dialog window.

btnRegisterDB Registering Databases

In order to register a single database in SQL Manager for DB2:

  • select the Database | Register Database... main menu item, or use the corresponding Register Database toolbar button;
  • right-click any database alias and select the Register Database... context menu item in the DB Explorer tree;
  • set all the necessary options using Register Database wizard which guides you through the entire process of database registration.

btnUnregisterDB Unregistering Databases

In order to unregister a database in SQL Manager for DB2:

  • select the database to unregister in the DB Explorer tree;
  • select the Database | Unregister Database main menu item, or use the corresponding Unregister Database toolbar button;
  • right-click the database alias and select the Unregister Database context menu item in the DB Explorer tree;
  • confirm unregistering in the corresponding dialog window.

btnConnectToDB Connecting to Databases

In order to connect to a database in SQL Manager for DB2:

  • select the database to connect to in the DB Explorer tree;
  • select the Database | Connect to Database main menu item, or use the corresponding Connect to Database toolbar button;
  • right-click the database alias and select the Connect to Database context menu item in the DB Explorer tree.

btnDisconnectFromDB Disconnecting from Databases

In order to disconnect from a database in SQL Manager for DB2:

  • select the database to disconnect from in the DB Explorer tree;
  • select the Database | Disconnect from Database main menu item, or use the corresponding Disconnect from Database toolbar button;
  • right-click the database alias and select the Disconnect from Database context menu item in the DB Explorer tree.

btnDBRegInfo Viewing and Editing Database Registration Info

In order to view/edit database registration info in SQL Manager for DB2:

  • select the database or any of its objects in the DB Explorer tree;
  • select the Database | Database Registration Info... main menu item;
  • right-click the database alias or any of its objects and select the Database Registration Info... context menu item in the DB Explorer tree.

btnDBProperties Viewing and Editing Database Properties

In order to view/edit database properties in SQL Manager for DB2:

  • select the database in the DB Explorer tree;
  • select the Database | Database Properties main menu item, or use the corresponding Properties toolbar button;
  • right-click the database alias and select the Database Properties... context menu item in the DB Explorer tree.

btnHost Viewing and Editing Node Registration Info

In order to view/edit node registration info in SQL Manager for DB2:

  • select the node in the DB Explorer tree;
  • right-click the node alias and select the Node Registration Info... context menu item in the DB Explorer tree.

See also:

Getting Started

Database Explorer

Database Objects Management

Query Management Tools

Data Management

Import/Export Tools

Change management

Database Tools

Instance Services

Personalization

How To...


Register Node wizard

Register Node wizard allows you to register a node on your DB2 system.

To start the wizard, select the Database | btnRegisterHost Register Node... main menu item, or use the Register Node button on the main toolbar. You can also use the Shift+Ctrl+R shortcut for the same purpose.

  • Selecting registration type

Using an existing entry:

  • Selecting Node
  • Specifying tunneling parameters
  • Setting specific options

Adding a new catalog entry:

  • Specifying connection parameters
  • Specifying tunneling parameters
  • Setting specific options

See also:

Node Properties

Node Registration Info


Selecting registration type

This step of the wizard allows you to choose whether the node should be registered with an existing entry used, or a new node should be cataloged and registered in the application.

Register Node wizard - Selecting registration type

Click the Next button to proceed to the Selecting Node step or to the Specifying connection parameters step of the wizard, depending on whether the RadioButton Use existing entry or the RadioButton Add new catalog entry option has been selected.


Selecting node

This step of the wizard allows you to select the node(s) to be registered in SQL Manager.

Register Node wizard - Existing entry - Selecting Node

To select a node, you need to move it from the Available nodes list to the Selected nodes list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the nodes from one list to another.

When you are done, click the Next button to proceed to the Specifying tunneling parameters step of the wizard.


Specifying tunneling parameters

This step of the wizard allows you to specify the necessary parameters for connection with SSH tunneling used.

SSH Tunneling parameters

Specify SSH host name, SSH port, SSH user name, SSH password, the path to the SSH key file (if necessary) in the corresponding boxes.

See SSH connection properties for details.

Register Node wizard - Specifying tunneling parameters

Click the Next button to proceed to the Setting specific options step of the wizard.


Setting specific options

This step of the wizard allows you to set registration options pertaining to selected node(s) using the corresponding boxes: User name, Password.

Register Node wizard - Existing entry - Specific options

The Node tab allows you to set authorization parameters that will be used to access the selected node: User name and Password.

When you are done, click the Finish button to complete the operation.


Specifying connection parameters

Use this step of the wizard to set the necessary connection parameters for a new Node in the corresponding boxes: Node type, Node name, Node comment, Comments charset and protocol-specific connection properties.

Register Node wizard - New entry - Connection - TCPIP

Node type

Select the communication protocol to be used to connect to databases on the specified Node: TCP/IP, LOCAL, APPN, Named Pipe or IPX/SPX.

  • TCP/IP

If this value is selected, a Transmission Control Protocol / Internet Protocol (TCP/IP) node entry is added to the Node directory, and the TCP/IP communication protocol will be used to access the remote DB2 Node.

  • LOCAL

If this value is selected, a local alias for an instance that resides on the same machine is created. A local node should be cataloged when there is more than one instance on the same workstation to be accessed from the user’s client. Interprocess Communications (IPC) will be used to access the local DB2 Node.

  • APPN

If this value is selected, an APPN node entry is added to the Node directory, and the Advanced Peer-to-Peer Networking protocol will be used to access the remote DB2 Node.

  • Named Pipe

If this value is selected, a named pipe node entry is added to the Node directory, and the named pipe protocol will be used to access the remote DB2 Node.

  • IPX/SPX

If this value is selected, an IPX/SPX node entry is added to the Node directory, and the specific Internetwork Packet Exchange/Sequenced Packet Exchange networking protocol will be used to access the remote DB2 Node.

Set the Node name in the corresponding box, and supply a Node comment, if necessary.

Comments charset

Specify the character set that should be used for node and database comments.

Afterwards you should specify protocol-specific connection properties.

Depending on the selected communication protocol, you are supposed to define protocol-specific properties: Host name/Port (for TCP/IP protocol), Local/Remote partner LU, Mode (for APPN protocol), Computer name, Instance name (for Named Pipe protocol), or File server, Object name (for IPX/SPX protocol).

TCP/IP connection properties:

Host name

Specify the host name or the IP address of the node where the database resides. The host name is the name of the node that is known to the TCP/IP network.

Port

Specify the port number of the server database manager instance.

A port number can be specified in the database manager configuration file on the server. If a port number is specified, no service name needs to be specified in the local TCP/IP services file.

CheckBox Enable SOCKS security

Check this option if you need to activate the SOCKS protocol which is used for handling TCP traffic through the server and provides a simple firewall be checking incoming and outgoing packets and hiding the IP addresses of the client application.

LOCAL connection properties:

Register Node wizard - New entry - Connection - Local

Instance name

If more than one DB2 instance is located on the local workstation, use the drop-down list to select the instance to be accessed from the user's client.

APPN connection properties:

Register Node wizard - New entry - Connection - APPN

Local LU

Specify the SNA (IBM Systems Network Architecture) local logical unit used for the connection. Note that you should enter the alias of the SNA in exactly the same way as it appears (using mixed case characters).

Partner LU

Specify the SNA (IBM Systems Network Architecture) partner logical unit used for the connection. Here you should enter the logical unit name of the remote node. The name must be entered exactly as it appears (using mixed case characters). Note that the name must follow SNA naming conventions.

Mode

Specify the SNA (IBM Systems Network Architecture) transmission mode to be used for the connection. Note that the name must conform to SNA naming conventions. If no value is entered in this box, a character string of eight blanks will be stored as the mode type.

Named Pipe connection properties:

Register Node wizard - New entry - Connection - Named Pipe

Computer name

Enter the computer name of the node on which the target database resides.

Instance name

Enter the instance name of the node on which the target database resides.

IPX/SPX connection properties:

Register Node wizard - New entry - Connection - IPX_SPX

File server

This connection parameter is applied for the IPX/SPX connection. Enter the name of the NetWare file server where the database server instance is registered (in case of File Server Addressing method usage), or * to indicate that the Direct Addressing method is being used. Note that this parameter must be entered in uppercase. You can locate this parameter in the database manager configuration file on the server.

Object name

Set the database manager server instance, represented as the object OBJECTNAME on the NetWare file server. The server's IPX/SPX internetwork address is stored and retrieved from this object. Note that this parameter must be entered in uppercase and be unique on the NetWare file server system. You can locate this parameter in the database manager configuration file on the server.

When you are done, click the Next button to proceed to the Specifying tunneling parameters step of the wizard.


Setting specific options

This step of the wizard allows you to set registration options pertaining to the node using the corresponding boxes: User name, Password.

Register Node wizard - New entry - Specific options

The Node tab allows you to set authorization parameters that will be used to access the newly cataloged node: User name and Password.

When you are done, click the Finish button to complete the operation.


Create Database wizard

Create Database wizard allows you to create a new database on your DB2 system.

To start the wizard, select the Database | btnCreateDB Create Database... main menu item, or use the Create Database button on the main toolbar.

  • Setting DB name and Node info
  • Setting connection properties
  • Defining database files

See also:

Register Database wizard

Database Registration Info

Database Properties


Setting DB name and node info

Use this step of the wizard to provide the necessary Database and Node information for the new database in the corresponding boxes: Database name, Database alias, Path/Drive, Database comment, Node name, User name, Password.

Create Database wizard - Setting DB name and Node info

Database name

Enter the database name in this box. This value must be unique to differentiate the database from any other database the local database directory or the system database directory.

Database alias

Any database alias that is convenient for you (by default NEW_DB). If no alias is provided, the specified database name is used. This alias will be displayed in the DB Explorer window.

Path/Drive

Use the ellipsis EllipsisButton button to specify the location where the new database will reside. If a path is not specified, the database will be created on the default database path specified in the database manager configuration file (dftdbpath parameter).

Supply a Database comment, if necessary.

Node info

Select the node for the new database using the Node name drop-down list, and supply the User name and Password.

CheckBox Restrict access

If this option is selected, the RESTRICT_ACCESS database configuration parameter is set to YES and no privileges are automatically granted to PUBLIC.

CheckBox Automatic storage

Specifies that automatic storage is being explicitly disabled or enabled for the database.

Click the Next button to proceed to the Setting connection properties step of the wizard.


Setting connection properties

Use this step of the wizard to provide the necessary Tablespace and Code page information for the new database in the corresponding boxes: Number of segments, Default extent size, Territory, Codeset, Collation, Comments codepage.

Create Database wizard - Setting connection properties

Tablespace info

Number of segments

Set the number of segment directories that will be created and used to store the AT, IDX and LF files.

Default extent size

If necessary, specify the default extent size (in pages) for table spaces in the database.

Page size

Defines the size of pages used for the table space. Supported sizes include 4K, 8K, 16K, and 32K.

Code page info

Territory

Specify the territory to be used for data entered into the database being created. After you create the database, you will not be able to change the specified territory.

Codeset

Specify the code set to be used for data entered into the database being created. After you create the database, you will not be able to change the specified code set.

Collate using

Identify the type of collating sequence to be used for the database being created. You may leave this field blank to apply the default collating sequence of the operating system based on the current territory code.

Comments codepage

Specify the codepage that should be used for database comments.

Click the Next button to proceed to the Defining database files step of the wizard.


Defining database files

Use this step of the wizard to define the location of the new database files and a number of tablespace parameters using the corresponding controls.

Catalog tablespace

Contains parameters of the table space which will hold the catalog tables (SYSCATSPACE).

User tablespace

Contains parameters of the initial user table space (USERSPACE1).

Temp tablespace

Contains parameters of the initial system temporary table space (TEMPSPACE1).

Create Database wizard - Defining database files

Managed by...

RadioButton System: specifies that the table space is to be a system managed space (SMS) table space.

RadioButton Database: specifies that the table space is to be a database managed space (DMS) table space.

CheckBox Automatic resize

Specifies whether or not the auto-resize capability of a DMS table space or an automatic storage table space is to be enabled. Auto-resizable table spaces automatically increase in size when they become full. The option can be modified only if Managed by Database option is selected. Check the Automatic resize option to enable auto-resize capability.

CheckBox File system caching

The option specifies whether or not Input/Output operations are to be cached at the file system level.

Extent size (pages)

Specify the number of 4KB pages that will be written to a container before skipping to the next container.

Prefetch size (pages)

Specify the number of 4KB pages that will be read from the table space when data prefetching is being performed.

Max size (MB)

Specifies the maximum size to which a table space that is enabled for auto-resize can automatically be increased.

Overhead

Set the number that specifies the I/O controller overhead, disk seek, and latency time (in milliseconds).

Transfer rate

Set the number that specifies the time in milliseconds to read one 4KB page into memory.

Increase size (MB)

Specifies the amount, per database partition, by which a table space will automatically be increased when the table space is full, and a request for space has been made.

Directory

Use the Add item btnAddItem / Remove item btnRemoveItem buttons to add or remove a directory for the table space, and the ellipsis EllipsisButton button to specify the path to the directory within the Browse for Folder dialog.

When you are done, click the Finish button to complete the operation.


Register Database wizard

Register Database Wizard allows you to register a single database.

To start the wizard, select the Database | btnRegisterDB Register Database... main menu item, or use the Register Database button on the main toolbar. You can also use the Shift+Alt+R shortcut for the same purpose.

  • Selecting registration type

Using an existing entry:

  • Selecting database
  • Setting specific options

Adding a new catalog entry:

  • Specifying connection parameters
  • Setting specific options

See also:

Create Database wizard

Database Registration Info

Database Properties


Selecting registration type

This step of the wizard allows you to choose whether the database should be registered with an existing entry used, or a new entry should be cataloged for the database and registered in the application.

Register Database wizard - Selecting registration type

Click the Next button to proceed to the Selecting database step or to the Specifying connection parameters step of the wizard, depending on whether the RadioButton Use existing entry or the RadioButton Add new catalog entry option has been selected.


Selecting database

This step of the wizard allows you to select the database(s) to be registered in SQL Manager.

To select a database, you need to move it from the Available databases list to the Selected databases list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the databases from one list to another.

Register Database wizard - Existing entry - Selecting Database

When you are done, click the Next button to proceed to the Setting specific options step of the wizard.


Setting specific options

This step of the wizard allows you to set the user name, password, and registration options pertaining to selected database(s) (using the Database and Logs tabs).

Register Database wizard - Existing entry - Specific options - General

The Database tab allows you to set common database registration options:

Set authorization parameters that will be used to access the selected database: User name and Password.

CheckBox Login prompt before connection

Enables SQL Manager for DB2 to prompt for user name and password each time you connect to the database.

CheckBox Refresh objects on connection

This option allows you to enable/disable refreshing objects on connection to the database. It is highly recommended to uncheck this option if your database contains many objects or if connection to the database is slow.

CheckBox Autoconnect at startup

With this option set, connection to the registered database is established automatically at application startup.

CheckBox Show system objects

If this option is checked, DB2 system objects will be displayed in DB Explorer.

The Logs tab allows you to set log options for the database:

Register Database wizard - Existing entry - Specific options - Logs

CheckBox Enable log of metadata changes

Check this option if you wish to log metadata changes of your database in a file.

Log file

This field is enabled if the Enable log of metadata changes option is selected. Type in or use the Save as btnSaveAs button to specify the path to the *.sql file to store the metadata logs.

CheckBox Enable log of SQL Editor queries

Check this option if you wish to log your SQL Editor queries in a file.

Log file

This field is enabled if the Enable log of SQL Editor queries option is selected. Type in or use the Save as btnSaveAs button to specify the path to the *.sql file to store the logs of SQL queries.

CheckBox Is Unicode

Enable this option to save logs in Unicode. If the option is disabled, ANSI will be used.

Click the Finish button when done to start working with the newly registered database in SQL Manager for DB2.


Specifying connection parameters

Use this step of the wizard to set the necessary connection parameters for the new Node in the corresponding boxes: Node type, Node name, Node comment, Database name, Database alias, Authentication, Database comment, Comments charset and connection properties.

Register Database wizard - New entry - Connection

Node type

Select the communication protocol to be used to connect to databases on the specified Node: TCP/IP, LOCAL, APPN, Named Pipe or IPX/SPX.

  • TCP/IP

If this value is selected, a Transmission Control Protocol / Internet Protocol (TCP/IP) node entry is added to the Node directory, and the TCP/IP communication protocol will be used to access the remote DB2 Node.

  • LOCAL

If this value is selected, a local alias for an instance that resides on the same machine is created. A local node should be cataloged when there is more than one instance on the same workstation to be accessed from the user’s client. Interprocess Communications (IPC) will be used to access the local DB2 Node.

  • APPN

If this value is selected, an APPN node entry is added to the Node directory, and the Advanced Peer-to-Peer Networking protocol will be used to access the remote DB2 Node.

  • Named Pipe

If this value is selected, a named pipe node entry is added to the Node directory, and the named pipe protocol will be used to access the remote DB2 Node.

  • IPX/SPX

If this value is selected, an IPX/SPX node entry is added to the Node directory, and the specific Internetwork Packet Exchange/Sequenced Packet Exchange networking protocol will be used to access the remote DB2 Node.

Set the Node name in the corresponding box, and supply a Node comment, if necessary.

Database name

Enter the database name in this box.

Database alias

Any database alias that is convenient for you (e.g. MYDEMODB). This alias will be displayed in the DB Explorer window.

Authentication

Here you are supposed to select the type of authentication to be used to access the database: By manager, Server, Client, Kerberos, Server Encrypt, DCS, DCE, DCS Encrypt or DCE Server Encrypt. Specifying an appropriate authentication type may result in a performance benefit.

  • By manager

Specifies that authentication is performed by SQL Manager for DB2. Passwords are encrypted in Windows Registry.

  • Server

Specifies that authentication takes place on the node containing the target database.

  • Client

Specifies that authentication takes place on the node where the SQL Manager for DB2 application is invoked.

  • Kerberos

Specifies that authentication takes place using Kerberos Security Mechanism.

Target principal

Enter the fully qualified Kerberos principal name for the target server; that is, the fully qualified Kerberos principal of the DB2 instance owner in the form of name/instance@REALM. For Windows 2000, Windows XP, and Windows Server 2003, this is the logon account of the DB2 server service in the form of userid@DOMAIN, userid@xxx.xxx.xxx.com or domain\userid.

  • Server Encrypt

Specifies that authentication takes place on the node containing the target database, and that passwords are encrypted at the source. Passwords are decrypted at the target, as specified by the authentication type cataloged at the source.

  • DCS

This value indicates that information about the remote database is stored in the Database Connection Services (DCS) directory. Access to this databases is performed with an Application Requester (AR), such as DB2 Connect, used. Having a DCS directory entry with a database name matching a database name in the system database directory invokes the specified AR to forward SQL requests to the remote server where the database resides.

  • DCE

Specify this value if you wish to use DCE (IBM® Distributed Computing Environment) which provides security support for access to your DB2 database.

  • DCS Encrypt

Specifies that authentication takes place on the node containing the target database, except when using DB2 Connect; in that case, authentication takes place at the DRDA application server (AS). Passwords are encrypted at the source, and decrypted at the target, as specified by the authentication type cataloged at the source.

  • DCE Server Encrypt

Specify this value if you wish to use DCE (IBM® Distributed Computing Environment) which provides security support for access to your DB2 database to ensure data integrity and confidentiality on the server-side.

Supply a Database comment, if necessary.

Comments charset

Specify the character set that should be used for node and database comments.

Afterwards you should specify protocol-specific connection properties.

Depending on the selected communication protocol, you are supposed to define protocol-specific properties: Host name/Port (for TCP/IP protocol), Local/Remote partner LU, Mode (for APPN protocol), Computer name, Instance name (for Named Pipe protocol), or File server, Object name (for IPX/SPX protocol). For details see Specifying connection parameters (defined when adding a new catalog entry for node).

When you are done, click the Next button to proceed to the Setting specific options step of the wizard.


Setting specific options

This step of the wizard allows you to set the user name, password, and registration options pertaining to selected database(s) (using the General and Logs tabs).

Register Database wizard - New entry - Specific options - General

Set authorization parameters that will be used to access the database: User name and Password.

The General tab allows you to set common database registration options:

Font charset

Specify the character set to be used to display data in the grid.

CheckBox Login prompt before connection

Enables SQL Manager for DB2 to prompt for user name and password each time you connect to the database.

CheckBox Refresh objects on connection

This option allows you to enable/disable refreshing objects on connection to the database. It is highly recommended to uncheck this option if your database contains many objects or if connection to the database is slow.

CheckBox Autoconnect at startup

With this option set, connection to the registered database is established automatically at application startup.

CheckBox Create new tab for this database

If this option is checked, the database will be displayed within a separate tab in DB Explorer.

The Logs tab allows you to set log options for the database. For details see Setting specific options (defined for an existing entry).

Click the Finish button when done to start working with the newly registered database in SQL Manager for DB2.


Database Registration Info

Use the Database Registration Info dialog to view and edit the registration properties of the database.

To open the dialog, select the database or any of its objects in the DB Explorer tree, then select the Database | btnDBRegistrationInfo Database Registration Info... main menu item, or right-click the database alias in DB Explorer and use the Database Registration Info... context menu item. You can also use the Database Registration Info... button on the main toolbar.

  • Editing connection properties
  • Setting common database options
  • Setting display options
  • Setting default directories
  • Setting log options
  • Setting data options
  • Configuring change management system
  • Find Option

See also:

Create Database wizard

Register Database wizard

Database Properties


Connection

The Connection section of the Database Registration Info dialog allows you to view and/or edit the connection properties in the corresponding boxes: Node name, User name, Password, Database name, Database Alias, Font charset.

Database Registration Info - Editing connection properties

Node name

Stores the name of the Node where the database resides (read-only).

User name

If necessary, edit the User name used to access the database.

Password

If necessary, edit the Password used to access the database.

Login timeout

Restricts the time of user for logging in to the server. Use the up and down arrows to change the value or simply type it in.

Database name

Stores the name of the database (read-only).

Database alias

Stores the database alias which is displayed in the DB Explorer tree (read-only).

Edit the Database comment, if necessary.

Once you have specified the connection properties, you can check whether it is possible to establish connection to the database: click the Test Connect button for this purpose. If connection is successful, you will get the 'Connected!' message; otherwise an error message will be returned.

See also:

Common options

Display options

Default directories

Logs

Data options

Find Option


Common options

The Options section of the Database Registration Info dialog allows you to set various options for the database.

Database Registration Info - Setting common database options

Customize common database options according to your needs. The detailed description is given below.

CheckBox Login prompt before connection

Enables SQL Manager for DB2 to prompt for user name and password each time you connect to the database.

CheckBox Autoconnect at startup

Check this option to specify that SQL Manager for DB2 automatically establishes connection to the registered database at application startup.

CheckBox Show system objects

This option determines whether DB2 system objects are displayed in the DB Explorer tree.

CheckBox Refresh objects on connection

This option allows you to enable/disable refreshing objects on connection to the database. It is highly recommended to uncheck this option if your database contains many objects or if connection to the database is slow.

CheckBox Always capitalize database object names

All new object names are capitalized if the option is enabled. New object names can't contain small letters until the option is disabled.

See also:

Connection

Display options

Default directories

Logs

Data options

Find Option


Display options

The Display Options section of the Database Registration Info dialog allows you to specify which objects will be displayed in the Database Explorer tree.

Database Registration Info - Setting display options

For your convenience the Select All and Deselect All functions are implemented in the context menu of the objects list area.

See also:

Connection

Common options

Default directories

Logs

Data options

Find Option


Default directories

The Directories section of the Database Registration Info dialog allows you to set the directories to be used by default for database extract, data export, data import, saving HTML reports, creating reports, saving scripts, backup operations.

Database Registration Info - Setting default directories

See also:

Connection

Сommon options

Display options

Logs

Data options

Find Option


Logs

The Logs section of the Database Registration Info dialog allows you to specify log file names for metadata changes logging and SQL query logging, if necessary.

Logging can be useful when you are going to move the changes made in the development database to the production database.

Database Registration Info - Setting log options

Metadata changes

CheckBox Enable log of metadata changes

Check this option if you wish to log metadata changes of your database in a file.

Metadata log file

This field is enabled if the Enable log of metadata changes option is selected. Type in or use the Save as btnSaveAs button to specify the path to the *.sql file to store the metadata logs.

SQL Editor

CheckBox Enable log of SQL Editor queries

Check this option if you wish to log your SQL Editor queries in a file.

SQL Editor log file

This field is enabled if the Enable log of SQL Editor queries option is selected. Type in or use the Save as btnSaveAs button to specify the path to the *.sql file to store the logs of SQL queries: date/time of query execution, SQL text, execution result or errors (if any).

CheckBox In Unicode

Enable this option to save logs in Unicode. If the option is disabled, ANSI will be used.

See also:

Connection

Сommon options

Display options

Default directories

Data options

Find Option


Data options

The Data Options section of the Database Registration Info dialog allows you to define options for data view. These options will be applied only to this database. Default settings for newly registered databases can be defined on the Grid | Data Options page of the Environment Options dialog.

Database Registration Info - Setting data options

Default limit options in table and view editors

Define the number of records to be selected on opening the Data tab of Table Editor and View Editor:

RadioButton Select all records from a table

RadioButton Select only ... records (you should set the number of records using the corresponding spinner control)

Advanced

CheckBox Use separate connections for each data view within a database

Select this option to use a separate connection for each data view within a database. Disabling this option is recommended if maximum allowed number of connections is too low.

CheckBox Asynchronous query execution

Check this option to allow executing queries in background mode (asynchronously). Note that this option is only available when the Use separate connections for each data view within a database option is enabled.

CheckBox Perform data sorting on client in data view

If enabled, the data are sorted by SQL Manager for DB2 (on the client side). If this option is disabled, the data are sorted on DB2 server with the help of the ORDER BY clause used in SQL query.

CheckBox Perform data filtration on client in data view

If enabled, the data are filtered by SQL Manager for DB2 (on the client side).

If disabled, SQL filter is used in data view. In this case filtering is performed on the DB2 server with the help of the WHERE clause used in SQL query.

With the Perform data sorting on client in data view option enabled, sorting is performed by means of the grid. Otherwise a click on the column header for sorting causes reloading all table data with the selected field in the ORDER BY expression of the SELECT statement.

If the table contains a huge amount of records and the Select only N records mode (see the Default limit options in table and view editors group) is used, this mode is more preferable (e.g. all the records having values starting with "A" will be displayed, and not those which were in originally opened N records).

All above-mentioned is related to the Perform data filtration on client in data view option as well. If the filter is applied to a table containing a great number of records, it is strongly recommended to enable this option - in this case the filter will be applied to all table/view records, not only to those which are displayed at the present moment.

The Default Grid Mode options allow you to define the grid mode which will be used by default.

RadioButton Load visible records

The grid loads only a fixed number of dataset records into memory. This option minimizes dataset loading time. The automatic sorting, filtering, summary calculations are not supported in this mode.

RadioButton Load all records

The grid loads all records from a dataset. This option increases the grid performance by reloading only changed dataset records when updating. In this mode all features (automatic sorting, filtering and summary calculations) are available.

With the Load all records option enabled, when loading data, all the records are loaded into grid buffers. In this mode opening the tables with many records may take a considerable amount of time. But in this case you can make use of some advantages: in the filter drop-down list the column headers are displayed with the values for quick filtering; it is possible to open several sub-levels at the same time when viewing data in master-detail view, etc.

In case opening and other operations with an object consisting of many records takes sufficient time, the Load visible rows mode should be used instead. It can be set individually for each table and saved between sessions (can be set through the context menu of the grid).

Load visible rows mode if records more than...

Set this option to switch to the Load visible rows mode when the number of records in the dataset exceeds the specified value.

Default records count retrieving mode

RadioButton Always retrieve

Check this option to enable retrieving record count for tables (with this feature enabled, opening large tables may take much time).

RadioButton Never retrieve

Check this option to disable retrieving record count for tables.

See also:

Connection

Common options

Display options

Default directories

Logs

Find Option


Change management

The Change Management section of the Database Registration Info dialog allows you to define settings required for working with version control systems.

Version control system (VCS) enables teamwork under a project.

This system can be useful for single developers, whose databases have complex business logic in procedures, triggers etc. VCS provides change management means to control changes of objects.

What can you get from VCS in SQL Manager for DB2:

For database developers:

  • Control of changes in database;
  • Getting (storing, testing) change scripts that reveal differences between two database states;
  • Possibility to rollback database to definite state;

For database administrators:

  • Control of changes in database

CheckBox Enabled

Use this option to enable/disable change management feature for the database.

Database Registration Info - Setting change management parameters

Click the corresponding button to launch the Repository management wizard. It allows you to create/check out repository.

Version control provider

Source provider

Use the drop-down list to select version control provider.

The following versions of VCS providers are supported:

  • CVS (version 1.9 or higher)
  • Visual SourceSafe (version 8.0)
  • Team Foundation Server (2005)

Each version control system requires client program be installed.

Specify User Name and Password to be used to authorize to version control repository.

Press the Properties... button to view/edit or test VCS provider settings:

Change Management - VCS Properties

Settings description you can find in the following topics:

  • Configuring CVS settings
  • Configuring VSS settings
  • Configuring TFS settings

Location

Version control project

Defines version control project location.

Working folder

Use this field to define location of version control system project. Make sure that path format conforms the selected VCS standard.

Branch name

Indicates current branch name. The branch name is always trunk and can't be modified.

Press the OK button to check connect to the Version Control server and to apply settings.

See also:

Change Management Tools

Shared Scripts


Repository management wizard

This wizard allows you to create version control repository for the current database or checkout the existing repository. See the instructions below to get sufficient information to perform the operation.

Selecting operation

Selecting version control provider

Configuring provider settings

Specifying repository settings

Performing operation


Selecting operation

This step of the wizard allows you to select the operation to be performed.

Repository management wizard - Selecting operation

It is possible either to RadioButton Create new repository or RadioButton Checkout an existing one for the existing database.

Click the Next button to proceed to the Selecting version control provider step of the wizard.


Selecting version control provider

Use this step to select version control provider: Concurrent Version System, Visual SourceSafe or Team Foundation System.

Repository management wizard - Selecting provider

Click the Next button to proceed to the Configuring version control provider step of the wizard.


Configuring provider settings

This step contains the set of options necessary to define the version control repository.

Set of options available at this step depends on the provider selection made on the Selecting version control provider step of the wizard. Proceed to the needed topic:

Configuring CVS settings

Configuring VSS settings

Configuring TFS settings


Configuring CVS settings

Use this step to define Concurrent Version System version control provider settings.

Repository management wizard - Configuring provider settings - CSV

Provider settings

Specify Username and Password to authorize to the repository.

CVS executable

Use this field to locate the 'cvs.exe' file. Type the path to the file or use the ExplorerButton Explorer button to locate it within the Open dialog.

CVSROOT

This section allows you to define CVSROOT variable's value - set protocol, repositpory location, default user name and so on. At least the CVS repository location must be specified. You can RadioButton Use environment variable or specify RadioButton custom value.

To check the defined repository settings click the Test button.

Click the Next button to proceed to the Specifying repository settings step of the wizard.


Configuring VSS settings

Use this step to define Visual SourceSafe version control provider settings.

Repository management wizard - Configuring provider settings - VSS

Provider settings

Specify Username and Password to authorize to the repository.

Locate the SourceSafe database configuration file using corresponded field. You can click the ExplorerButton Explorer button to define file location.

To check the defined repository settings click the Test button.

Click the Next button to proceed to the Specifying repository settings step of the wizard.


Configuring TFS settings

Use this step to define settings for Team foundation server version control provider.

Repository management wizard - Configuring provider settings - TFS

Provider settings

Specify Username and Password to authorize to team foundation server.

Server

Define HTTP-address of the TFS server. For example: 'http://server:8080' or 'http://localhost:8080'.

Workspace

Select the workspace on the TFS server to be used on working with repository.

Select the workspace on the TFS server to be used by repository. If needed you can btnRefresh refresh the list of workspaces.

Click the Test client button to check TFS client availability.

Click the Test connection button to check connection to the TFS server with settings defined above.

Click the Next button to proceed to the Specifying repository settings step of the wizard.


Specifying repository settings

Use this step of the wizard to define repository location.

Repository management wizard - Specify repository settings

Repository location

Server path

Path to the repository on the VCS server. Specify the repository name in this field only when checking out the repository. You need to specify the server path under convention of version control system used.

Local path

Location of repository working folder on client computer without repository directory. Directory named as repository must be absent or empty.

Repository name

Name of the created repository. This field is disabled when checking out the repository.

Click the Next button to proceed to the final step of the wizard.


Performing operation

This step informs you that all necessary settings are defined and version control repository can be created/checked out.

Repository management wizard - Performing operation

To close the wizard after successful completion of the operation use the corresponding option.

Click the Finish button to perform the operation.

On clicking the Close button you will be asked whether to apply changes.


CVS

CVS executable

Use this field to locate the 'cvs.exe' file. Type or use the ExplorerButton Explorer button to locate the file within the Open dialog.

Provider settings - CVS

CVSROOT

This section allows you to set CVSROOT repository settings. At least the CVS repository location must be specified. You can RadioButton Use environment variable or specify RadioButton custom value for the purpose.

To check the defined repository settings click the Test button.


VSS

Locate the SourceSafe database file, using the corresponding field. You can click the ExplorerButton Explorer button to define file location using the Open dialog.

Provider settings - SourceSafe

To check the defined repository settings click the Test button.


TFS

Server

Define HTTP-address of the TFS server. For example: 'http://server:8080' or 'http://localhost:8080'.

Workspace

Select the workspace on the TFS server to be used on working with repository.

Provider settings - Team Foundation Server

Click the Test client button to check TFS client availability.

Click the Test connection button to check connection to the TFS server with settings defined above.


Find option

The Find Option section allows you to search for options available within the Database Registration Info dialog easily and quickly.

Option

In this field you can enter the name of the option to search for within the database registration options.

Database Registration Info - Find Option

The Available options area lists all options of the Database Registration category according to the specified name. The Option Kind, Category and Group columns specify option type and location.

Select the required option in the list and click iconFindText Show Option to open the corresponding section where you can view/edit the value of this option. For your convenience the required option is marked with an animated iconFindOption icon.

See also:

Connection

Сommon options

Display options

Default directories

Logs

Find Option


Database Properties

The Database Properties dialog allows you to view/edit a number of the DB2 database variables which can be changed to optimize database performance.

To open the dialog, right-click the Database in DB Explorer and select the btnDBProperties Database Properties... context menu item, or use the Properties button on the DB Explorer toolbar.

Database variables

Recovery

Logs

Maintenance

Applications

Performance

Status

Environment

Monitor

See also:

Create Database wizard

Register Database wizard

Database Registration Info


Database variables

The Database variables section of the Database Properties dialog allows you to view/edit all essential variables of the DB2 database.

  • Recovery
  • Logs
  • Maintenance
  • Applications
  • Performance
  • Status
  • Environment
  • Monitor

Database Properties - Database variables

The Database variables area of the window contains a list of Variables, their Values and corresponding Descriptions. Select a value in the list to view its default value and description in the lower area of the window. If necessary, edit the variable using the Value box. Note that some of the variables are read-only, hence their values cannot be edited.

Please refer to DB2 server documentation to obtain detailed information concerning the database variables.


Recovery

The Recovery branch of the Database variables section of the Database Properties dialog allows you to view/edit the following DB2 database recovery-related variables:

AUTO_RESTART, DFT_LOADREC_SES, INDEXREC, NUM_DB_BACKUPS, REC_HIS_RETENTN, TRACKMOD, TSM_MGMTCLASS, TSM_NODENAME, TSM_OWNER, TSM_PASSWORD.

Database Properties - Database variables - Recovery

See also:

Logs

Maintenance

Applications

Performance

Status

Environment

Monitor


Logs

The Logs branch of the Database variables section of the Database Properties dialog allows you to view/edit the following DB2 database log-related variables:

BLK_LOG_DSK_FUL, LOGFIL_SIZ, LOGHEAD, LOGPATH, LOGPRIMARY, LOG_RETAIN, LOGSECOND, MAX_LOG, MINCOMMIT, MIRRORLOGPATH, NEWLOGPATH, OVERFLOWLOGPATH, SOFTMAX, USER_EXIT.

Database Properties - Database variables - Logs

See also:

Recovery

Maintenance

Applications

Performance

Status

Environment

Monitor


Maintenance

The Maintenance branch of the Database variables section of the Database variables section of the Database Properties dialog allows you to view/edit the following DB2 database maintenance-related variables:

AUTO_MAINT, AUTO_DB_BACKUP, AUTO_TBL_MAINT, AUTO_RUNSTATS, AUTO_STATS_PROF, AUTO_REORG, AUTO_PROF_UPD, AUTO_STMT_STATS.

Database Properties - Database variables - Maintenance

See also:

Recovery

Logs

Applications

Performance

Status

Environment

Monitor


Applications

The Applications branch of the Database variables section of the Database Properties dialog allows you to view/edit the following DB2 application variables:

AVG_APPLS, DLCHKTIME, LOCKTIMEOUT, MAXAPPLS, MAXFILOP, MAXLOCKS, ENABLE_XMLCHAR, WLM_COLLECT_INT, DECFLT_ROUNDING, CUR_COMMIT, DEC_TO_CHAR_FMT, BLOCKNONLOGGED.

Database Properties - Database variables - Applications

See also:

Recovery

Logs

Maintenance

Performance

Status

Environment

Monitor


Performance

The Performance branch of the Database variables section of the Database Properties dialog allows you to view/edit the following DB2 database performance-related variables:

STMTHEAP, APP_CTL_HEAP_SZ, APPGROUP_MEM_SZ, APPLHEAPSZ, CATALOGCACHE_SZ, CHNGPGS_THRESH, MULTIPAGE_ALLOC, DATABASE_MEMORY, DB_HEAP, DFT_EXTENT_SZ, DFT_PREFETCH_SZ, GROUPHEAP_RATIO, LOCK_LIST, LOGBUFSZ, NUM_ESTORE_SEGS, NUM_IOCLEANERS, NUM_IOSERVERS, NUMSEGS, PCKCACHESZ, SEQDETECT, SHEAPTHRES_SHR, SORT_HEAP, STAT_HEAP_SZ, UTIL_HEAP_SZ.

Database Properties - Database variables - Performance

See also:

Recovery

Logs

Maintenance

Applications

Status

Environment

Monitor


Status

The Status branch of the Database variables section of the Database Properties dialog allows you to view/edit the following DB2 database status variables:

BACKUP_PENDING, CONSISTENT, LOG_RETAIN_STATUS, NUM_FREQVALUES, NUM_QUANTILES, RESTORE_PENDING, ROLLFWD_PENDING, USER_EXIT_STATUS.

Database Properties - Database variables - Status

See also:

Recovery

Logs

Maintenance

Applications

Performance

Environment

Monitor


Environment

The Environment branch of the Database variables section of the Database Properties dialog allows you to view/edit the following DB2 database environment variables:

CODEPAGE, CODESET, COUNTRY, DATABASE_LEVEL, DFT_DEGREE, DFT_QUERYOPT, DFT_REFRESH_AGE, DFT_SQLMATHWARN, DISCOVER_DB, DL_EXPINT, DL_NUM_COPIES, DL_TIME_DROP, DL_TOKEN, DL_UPPER, DL_WT_IEXPINT, DYN_QUERY_MGMT, MIN_DEC_DIV_3, RELEASE, TERRITORY, COLLATE_INFO.

Database Properties - Database variables - Environment

See also:

Recovery

Logs

Maintenance

Applications

Performance

Status

Monitor


Monitor

The Monitor branch of the Database variables section of the Database Properties dialog allows you to view/edit the following DB2 database environment variables:

MON_REQ_METRICS, MON_ACT_METRICS, MON_OBJ_METRICS, MON_UOW_DATA, MON_LOCKTIMEOUT, MON_DEADLOCK, MON_LOCKWAIT, MON_LW_THRESH.

Database Properties - Database variables - Monitor

See also:

Recovery

Logs

Maintenance

Applications

Performance

Status

Environment


Node Properties

The Node properties dialog allows you to view/edit a number of the DB2 Node variables for the current instance and current session which can be changed to optimize server performance.

To open the dialog, right-click the node in DB Explorer and select the btnDBProperties Node Properties context menu item, or use the Properties button on the DB Explorer toolbar.

Node variables

Applications

Monitor

Diagnostic

Parallelism

Miscellaneous

Connection

Environment

Management

SSL

See also:

Register Node wizard

Node Registration Info


Node variables

The Node variables section of the Node Properties dialog allows you to view/edit all essential variables of the DB2 node in groups: Applications, Monitor, Diagnostic, Parallelism, Miscellaneous, Connection, Environment, Management.

  • Applications
  • Monitor
  • Diagnostic
  • Parallelism
  • Miscellaneous
  • Connection
  • Environment
  • Management
  • SSL

Node Properties - Node variables

The Node variables area of the window contains a list of Variables, their Values and corresponding Descriptions. Select a value in the list to view its default value and description in the lower area of the window. If necessary, edit the variable using the Value box.

Please refer to DB2 server documentation to obtain detailed information concerning the server variables.


Applications

The Applications branch of the Node variables section lists the following DB2 application variables:

AGENTPRI, FENCED_POOL, KEEPFENCED, MAX_CONNECTIONS, MAX_COORDAGENTS, MAXAGENTS, MAXCAGENTS, NUM_INITAGENTS, NUM_INITFENCED, NUM_POOLAGENTS.

Node Properties - Node variables - Applications

See also:

Monitor

Diagnostic

Parallelism

Miscellaneous

Connection

Environment

Management

SSL


Monitor

The Monitor branch of the Node variables section dialog lists the following DB2 monitoring variables:

DFT_MON_BUFPOOL, DFT_MON_LOCK, DFT_MON_SORT, DFT_MON_STMT, DFT_MON_TABLE, DFT_MON_TIMESTAMP, DFT_MON_UOW, HEALTH_MON.

Node Properties - Node variables - Monitor

See also:

Applications

Diagnostic

Parallelism

Miscellaneous

Connection

Environment

Management

SSL


Diagnostic

The Diagnostic branch of the Node variables dialog lists the following DB2 diagnostic variables:

DIAGLEVEL, DIAGPATH, INDEXREC, NOTIFYLEVEL.

Node Properties - Node variables - Diagnostic

See also:

Applications

Monitor

Parallelism

Miscellaneous

Connection

Environment

Management

SSL


Parallelism

The Parallelism branch of the Node variables dialog lists the following DB2 variables:

FCM_NUM_BUFFERS, INTRA_PARALLEL, MAX_QUERYDEGREE.

Node Properties - Node variables - Parallelism

See also:

Applications

Monitor

Diagnostic

Miscellaneous

Connection

Environment

Management

SSL


Miscellaneous

The Miscellaneous branch of the Node variables section lists the following DB2 variables:

CONN_ELAPSE, MAX_CONNRETRIES, MAX_TIME_DIFF, START_STOP_TIME.

Node Properties - Node variables - Miscellaneous

See also:

Applications

Monitor

Diagnostic

Parallelism

Connection

Environment

Management

SSL


Connection

The Connection branch of the Node variables section lists the following DB2 connection variables:

DISCOVER, NNAME, SVCENAME.

Node Properties - Node variables - Connection

See also:

Applications

Monitor

Diagnostic

Parallelism

Miscellaneous

Environment

Management

SSL


Environment

The Environment branch of the Node variables section lists the following DB2 environment variables:

COMM_BANDWIDTH, CPUSPEED, DATALINKS, DFT_ACCOUNT_STR, DISCOVER_INST, DISCOVER_COMM, FEDERATED, JDK_PATH, MAXTOTFILOP, NODETYPE, RELEASE, TM_DATABASE, TP_MON_NAME, TPNAME, NUMDB, USE_SNA_AUTH.

Node Properties - Node variables - Environment

See also:

Applications

Monitor

Diagnostic

Parallelism

Miscellaneous

Connection

Management

SSL


Management

The Management branch of the Node variables section lists the following DB2 management variables:

AUTHENTICATION, CATALOG_NOAUTH, DFTDBPATH, FED_NOAUTH, SYSADM_GROUP, SYSCTRL_GROUP, SYSMAINT_GROUP, TRUST_ALLCLNTS, TRUST_CLNTAUTH, SRV_PLUGIN_MODE, GROUP_PLUGIN, CLNT_PW_PLUGIN, CLNT_KRB_PLUGIN, SRVCON_PW_PLUGIN, SRVCON_GSSPLUGIN_LIST, SRVCON_AUTH, LOCAL_GSSPLUGIN, SYSMON_GROUP, CLUSTER_MRG, ALTERNATE_AUTH_ENC.

Node Properties - Node variables - Management

See also:

Applications

Monitor

Diagnostic

Parallelism

Miscellaneous

Connection

Environment

SSL


SSL

The Management branch of the Node variables section lists the following DB2 SSL variables:

SSL_SVR_KEYDB, SSL_SVR_STASH, SSL_SVR_LABEL, SSL_SVCENAME, SSL_CIPHERSPECS, SSL_VERSIONS, SLL_CLNT_KEYDB, SSL_CLNT_STASH.

Node properties - Node variables - SSL

See also:

Applications

Monitor

Diagnostic

Parallelism

Miscellaneous

Connection

Environment

Management


Node Registration Info

Use the Node Registration Info dialog to view and edit the registration properties of the node.

To open the dialog, right-click the node in the DB Explorer tree, and select the btnHost Node Registration Info... context menu item.

  • Connection Info
  • Find Option

See also:

Register Node wizard

Node Properties


Connection info

The Connection Info section of the Node Registration Info dialog allows you to view/edit the essential parameters used to access the DB2 node: User name, Password.

Node Registration Info - Connection Info

User name

If necessary, you can modify the user name under which the node is accessed.

Password

If necessary, change the password used to authenticate the user name.

CheckBox Connect through the Secure Shell (SSH) tunnel

Select this option to establish connection to an intermediate SSH server and forward commands through the secure tunnel.

Specify SSH host name, SSH port, SSH user name, SSH password, the path to the SSH key file (if necessary) in the corresponding boxes.

See SSH connection properties for details.

See also:

Find Option


Find option

The Find Option section allows you to search for options available within the Node Registration Info dialog easily and quickly.

Option

In this field you can enter the name of the option to search for within the node registration options.

Node Registration Info - Find Option

The Available options area lists all options of the Node Registration category according to the specified name. The Option Kind, Category and Group columns specify option type and location.

Select the required option in the list and click iconFindText Show Option to open the corresponding section where you can view/edit the value of this option. For your convenience the required option is marked with an animated iconFindOption icon.

See also:

Connection Info


Offline work with database

SQL Manager for DB2 allows you to perform actions on your database offline. This can be done by means of Projects which may be considered as virtual databases that do not require connection to the server.

You can create an empty project as well as a project based on the existing database. The latter means that you can copy all objects from the database or you can choose only objects you need.

After the project is created you can work with it as if it was a real database: create, edit or drop schemas, create and drop tables, views, functions etc, undo and redo actions.

Offline work with database - Edit project objects

All your projects are situated in the Projects tab in the Object Inspector.

Existing projects can be updated with a database. In this case new or modified objects from a database are copied to the project. Vice versa you can create database from a saved project or alter a database with a project.

The process of creating and updating a project is executed by means of the Project Interaction Wizard. As a result of updating a database you get a SQL script showing differences between database and projects. This script can be executed, loaded to the SQL Script Editor or saved to an *.sql file.

Like databases projects can be compared with each other or with databases by means of Compare Databases Wizard. After comparing is completed one project can be transformed into another project or database.

Offline work with database - Compare projects

You can use Visual Database Designer to work with a project.

Offline work with database - Project in VDBD

Creating reports tool is also available for projects. You can generate and print metadata reports of any project object(s). HTML Report Wizard that generates a detailed HTML report of the selected project objects is also accessible. Just select existing project from the drop-down list in the Source database field.

Offline work with database - Create HTML report for a project


Database Objects Management

SQL Manager for DB2 provides powerful tools to manage database objects. All database objects are divided into schema objects and non-schema objects.

To obtain detailed information concerning DB2 database objects, refer to the official DB2 server documentation.

Note: Before working with database objects in SQL Manager for DB2 you should connect to the database first.

Creating Database Objects

To create a database object:

  • select the Database | New Object... main menu item;
  • select the type of object within the New Object dialog;
  • follow the steps of the wizard which guides you through the entire process of creating the object, or set the object properties using its editor - depending on the selected object type.

Note that you can also create a database object by selecting the appropriate context menu item of the DB Explorer tree or using the Ctrl+N shortcut.

Editing Database Objects

To edit a database object:

  • select the database object in the DB Explorer tree;
  • right-click the object to call its context menu and select the Edit <object type> <object name> context menu item, or double-click the object to open it in its editor.

Renaming Database Objects

To rename a database object:

  • select the object to rename in the DB Explorer tree;
  • right-click the object and select the Rename <object type> <object name>... item from the context menu;
  • edit the object name using the Rename Object... dialog.

Note: This operation is available only for tables.

Dropping Database Objects

To drop a database object:

  • select the database object in the DB Explorer tree;
  • right-click the object to call its context menu and select the Drop <object type> <object name> context menu item;
  • confirm dropping in the dialog window.

When using an object editor, you can benefit from tabs. To switch between tab views, click on their respective tabs at the top of the main editor window. You can do it at any time, since the tab views are absolutely independent.

To compile a newly created or edited object, you can use the iconCompile Compile item available within the Navigation bar or Toolbar of the object editor.

See also:

Getting Started

Database Explorer

Database Management

Query Management Tools

Data Management

Import/Export Tools

Change management

Database Tools

Instance Services

Personalization

How To...


New object

The Create New Object dialog allows you to select the type of the object to be created and run the appropriate wizard or editor.

To open the dialog, select the Database | New Object... main menu item.

Use the Database drop-down list to select the alias of the database where the new object should be created. Pick an object type icon and click OK to invoke the corresponding wizard or dialog.

Database Objects management - Create New Object

See also:

Operations with database objects

Duplicate Object Wizard

Schemas

Schema Objects

Non-schema Objects


Duplicate Object Wizard

Use the Duplicate Object Wizard to create a new database object of the same type and having the same properties the existing one.

To run the wizard, select the Database | Duplicate Object... main menu item, or right-click an object of the desired type in the DB Explorer tree and use the Duplicate <object type> <object name>... context menu item.

  • Selecting the source database
  • Selecting object to duplicate
  • Selecting destination database
  • Modifying the new object's definition

See also:

Operations with database objects

New Object

Schemas

Schema Objects

Non-schema Objects


Selecting the source database

This step of the wizard allows you to select the source database containing the source object to be duplicated.

Duplicate Object Wizard - Selecting the source database

Click the Next button to proceed to the Selecting object to duplicate step of the wizard.


Selecting object to duplicate

Use the Objects drop-down menu to select the type of object you intend to duplicate.

Select a database object to copy its properties to the new object.

Hint: The context menu of the objects list area allows you to specify whether objects of the specified type should be displayed as icons or as list.

Duplicate Object Wizard - Selecting object to duplicate

Click the Next button to proceed to the Selecting destination database step of the wizard.


Selecting destination database

Select the target database and schema to create the new object in, set the name of the new database object.

Check the CheckBox Copy data option to copy data from the source table to the new one.

Duplicate Object Wizard - Selecting destination database

CheckBox Duplicate 'depend on' objects

This option determines objects' dependencies usage in the process. Check the option to extract all objects that depend on the selected object.

Click the Next button to proceed to the Modifying the new object's definition step of the wizard.


Modifying the new object's definition

This step of the wizard allows you to browse the result SQL statement.

If necessary, you can edit the definition of the new object.

Duplicate Object Wizard - Modifying the new object's definition

Click the Finish button to create the object.


Schemas

A Schema is essentially a namespace: it can be defined as a collection of database objects that form a single namespace. A namespace is a set in which each element has a unique name.

Creating Schemas

To create a new schema:

  • select the Database | New Object... main menu item;
  • select Schema in the Create New Object dialog;
  • define schema properties using the appropriate tabs of Schema Editor.

Hint: To create a new schema, you can also right-click the Schemas node or any object within this node in the DB Explorer tree and select the New Schema item from the context menu.

To create a new schema with the same properties as one of existing schemas has:

  • select the Database | Duplicate Object... main menu item;
  • follow the instructions of Duplicate Object Wizard.

Alternatively, you can right-click a schema in the DB Explorer tree and select the Duplicate Schema <schema_name>... context menu item.

Duplicate Object Wizard allows you to select the database to create a new schema in, and to edit the result SQL statement for creating the schema.

Editing Schemas

To edit an existing schema:

  • select the schema for editing in the DB Explorer tree (type the first letters of the schema name for quick search);
  • right-click the object and select the Edit Schema <schema_name>... context menu item, or simply double-click the schema;
  • edit schema properties using the appropriate tabs of Schema Editor.

Dropping Schemas

To drop a schema:

  • select the schema to drop in the DB Explorer tree;
  • right-click the object and select the Drop Schema <schema_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new schema;

Ctrl+O to edit the selected schema;

Shift+Del to drop the object from the database.

See also:

Operations with database objects

New Object dialog

Duplicate Object Wizard

Schema Objects

Non-schema Objects


Schema Editor

Schema Editor allows you to manage DB2 schemas efficiently. It opens automatically when you create a new schema and is available on editing an existing one (see Create Schema and Edit Schema for details).

To open a schema in Schema Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing schema
  • Browsing object dependencies
  • Editing schema description
  • Viewing DDL definition


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Schema Editor.

Schema Editor - Using Navigation bar

The Navigation bar of Schema Editor allows you to:

Object group

iconDB select a database

select a schema for editing

General group

iconCompile compile the schema (if it is being created/modified)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the schema

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the schema:

Description group

iconSaveToFile save object description to file

iconLoadFromFile load description text from an external *.txt file

iconCopyToClipboard copy description to clipboard

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of Schema Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing schema

Use the Schema tab of Schema Editor to create/edit a schema and specify its properties.

Schema Editor - Editing schema definition

Name

Specify the name by which the schema is identified within the database.

Authorization name

This field identifies the user who is the owner of the schema. An authorization name is used in the GRANT and REVOKE statements to designate a target of the grant or revoke operation.


Schema Objects

A schema is a collection of logical structures of data, or schema objects. A schema is owned by a database user. Each user can own a single schema. Schema objects can be created and manipulated with SQL and include the following types of objects:

  • Tables
  • Views
  • Procedures
  • Aliases
  • Functions
  • Materialized Query Tables
  • Nicknames
  • Sequences
  • User-Defined (Structured) Types
  • User-Defined Types
  • Packages
  • Triggers
  • Indices
  • SQL Variables
  • Global Temporary Tables
  • Modules

Use the DB Explorer tree to navigate within the existing schemas and their objects.

See also:

Operations with database objects

New Object dialog

Duplicate Object Wizard

Schemas

Non-schema Objects


Tables

Relational databases store all their data in Tables. A table is a data structure consisting of an unordered set of horizontal rows, each containing the same number of vertical columns. The intersection of an individual row and column is a field that contains a specific piece of information. Much of the power of relational databases comes from defining the relations among the tables.

Creating Tables

To create a new table:

  • select the Database | New Object... main menu item;
  • select Table in the Create New Object dialog;
  • define table properties and fields using the appropriate tabs of Table Editor.

Hint: To create a new table, you can also right-click the Tables node or any object within this node in the DB Explorer tree and select the New Table... item from the context menu.

To create a new table with the same properties as one of existing tables has:

  • select the Database | Duplicate Object... main menu item;
  • follow the instructions of Duplicate Object Wizard.

Alternatively, you can right-click a table in the DB Explorer tree and select the Duplicate Table <table_name>... context menu item.

Duplicate Object Wizard allows you to select the database to create a new table in, and to edit the result SQL statement for creating the table.

Editing Tables

To edit an existing table (manage its fields, indexes, data, etc.):

  • select the table for editing in the DB Explorer tree (type the first letters of the table name for quick search);
  • right-click the object and select the Edit Table <table_name>... context menu item, or simply double-click the table;
  • edit table subobjects and data using the appropriate tabs of Table Editor.

To change the name of a table:

  • select the table to rename in the DB Explorer tree;
  • right-click the table alias and select the Rename Table <table_name>... item from the context menu;
  • edit the table name using the Rename Object... dialog.

Dropping Tables

To drop a table:

  • select the table to drop in the DB Explorer tree;
  • right-click the object and select the Drop Table <table_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new table;

Ctrl+O to edit the selected table;

Ctrl+R to rename the table;

Shift+Del to drop the object from the database.


New table

The New Table window is a mode of Table Editor that opens automatically when you create a new table (see Create table for details) and allows you to create a new table, set table properties, specify table fields and edit table description.

To call Table Editor for creating a new table, you can right-click the Tables node or any object within this node in the DB Explorer tree and use the Ctrl+N shortcut.

  • Using Navigation bar and Toolbar
  • Setting table properties
  • Specifying table fields
  • Managing dimensions
  • Managing partitions
  • Managing distribution


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Table Editor.

New table - Using Navigation bar

The Navigation bar of Table Editor (in the New table mode) allows you to:

Database group

iconDB select a database to create a new table in

General group

iconCompile compile the newly created table

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the table:

Fields group

add a new field

edit selected field

drop selected field(s)

Dimensions group

add a new dimension

edit selected dimension

drop selected dimension

Partitions group

add a new partition

edit selected partition

drop selected partition

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of Table Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Setting table properties

Use the Properties tab of Table Editor to specify new table properties.

The Properties tab allows you to view/edit common properties of the table: schema name, table name, Storage attributes, common options (Data capture, Table Lock, etc.)

Schema

Use the drop-down list to select a schema for the new table.

Name

Enter a name for the new table. Note that the name must not identify a table, view or alias described in the catalog.

New table - Setting table properties

Storage

Tablespace

Use the drop-down list to identify the table space where the table will be created.

Index

Use the drop-down list to identify the table space where the table indexes will be stored.

Long data

Use the drop-down list to identify the table space where the long data of the table will be stored.

Data capture

This option indicates whether extra information regarding SQL changes to this table will be written to the log or not:

RadioButton None

RadioButton Table SQL changes

RadioButton Table SQL changes include LONGVAR columns

Lock

Specify whether lock is to be applied to a Row or to the entire Table while the table data is being modified.

CheckBox Not logged

This option specifies that changes made to the column are not to be logged.

CheckBox Append

This option specifies that new rows are appended at the end of table data.

CheckBox Value compression

This option specifies whether the table values are compressed or not.

CheckBox Volatile

This option specifies that cardinality of the table is volatile.

CheckBox Restrict the drop

Check this option to restrict dropping the table.

CheckBox Compress

This option specifies whether data compression applies to the rows of the table. It is available for server version 9.7.

If necessary, specify the PCTFree value for the table specifying what percentage of each index page is left as free space when building the index.

Security policy name

Select the security policy that will be used to protect the table. The option is available only for DB2 version 9 and higher.

The lower editable area allows you to provide an optional comment for the table.

To compile the table, use the iconCompile Compile item available within the Navigation bar.


Specifying fields

The Fields tab is intended for setting up table fields. Double-click a field to open Field Editor for editing the field.

Right-click within the Table Fields area to display the context menu allowing you to insert, edit or delete fields.

Fields management tools are also available through the Navigation bar of Table Editor.

New table - Specifying fields

The Table Fields list provides the following attributes of each field of the new table:

Field name

Field type

Size

Precision

Not null

Security Label

Default

Comment

For details see Fields.

To compile the table, use the iconCompile Compile item available within the Navigation bar.


Managing dimensions

The Dimensions tab of Table Editor allows you to define dimensions for the table, if necessary.

Dimensions for columns or groups of columns are used to cluster table data.

New table - Managing dimensions

Right-click within the Dimensions area to display the context menu allowing you to add a new dimension, edit or drop dimensions.

Dimension management tools are also available through the Navigation bar of Table Editor.

The Dimension Editor dialog allows you to select a field or a group of fields that will be treated as one dimension.

To select a field, you need to move it from the Available Fields list to the Selected Fields list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the fields from one list to another.

New table - Managing dimensions - Dimension editor


Managing partitions

The Partitioning tab of Table Editor allows you to create, edit or drop table partitions (for DB2 version 9 and higher; if you use DB2 version 8, you will be allowed only to select columns for automatic partition creation).

Partitioning columns

To select a column, you need to move it from the Available columns list to the Selected columns list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the columns from one list to another.

CheckBox Nulls first

Check the option, if you want null values compare high. If the option disabled, null values compare low.

New table - Managing partitions

Note: When a table is created, you will never be allowed to change partitioning columns for this table (in DB2 version 9 and higher).

Right-click within the Data partitions area to display the context menu allowing you to add a new partition, edit or drop partitions.

Partition management tools are also available through the Navigation bar of Table Editor.

The Partition Editor dialog allows you to set partition properties.

New table - Managing partitions - Partition editor

Data partition name

Specify a name for the data partition. The name must not be the same as any other data partition defined for the table. If the name is not specified, the 'PART' string followed by an integer value will be automatically assigned to the partition by the server to make the name unique for the table.

Tablespace

Use the drop-down list to specify the table space where the data partition is to be stored.

Limit specification

Use the CheckBox Low value inclusive, CheckBox High value inclusive options to include/exclude the threshold values to/from the partitioning range.

Specify Low type and High type values and the values in the column list to set the boundaries of the partition.


Managing distribution

This tab is available only for database server version 9.7.

Use this tab to define parameters for data distribution across database partitions.

Move the needed fields from Available fields to the Distribute by fields list to form distribution key.

Note that no BLOB, CLOB, DBCLOB, XML and ROW CHANGE TIMESTAMP containing fields can be used as a distribution key.

New table - Managing distribution


Table Editor

Table Editor is the basic SQL Manager tool for working with tables. It opens automatically in the New table mode when you create a new table and is available on editing an existing one (see Create table and Edit table for details).

Table Editor allows you to create, edit and drop table's fields, indices, foreign keys and other table subobjects, manage table data, properties and much more.

To open a table in Table Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Managing fields
  • Managing indices
  • Managing constraints
  • Managing triggers
  • Working with table data
  • Table Properties
  • Browsing object dependencies
  • Viewing DDL definition


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Table Editor.

Table Editor - Using Navigation bar

The Navigation bar of Table Editor (in the Edit table mode) allows you to:

Object group

iconDB select a database

select a table for editing

General group

iconCompile compile the table (if it is being modified)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the table

iconRestoreDefaultSize restore the default size and position of the editor window

Explorer group

iconDBExplorer browse the table subobjects using the Explorer tree

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the table:

Fields group

add a new field

edit selected field

drop selected field(s)

Foreign keys group

add a new foreign key

view selected foreign key

drop selected foreign key(s)

Checks group

add a new check

view selected check

drop selected check(s)

Indexes group

add a new index

edit selected index

drop selected index(-es)

Triggers group

add a new trigger

edit selected trigger

drop selected trigger(s)

Data Management group

iconCommit commit transaction

iconRollback rollback transaction

export data from the table using Export Data Wizard

export data from the table as SQL script using Export as SQL Script Wizard

import data into the table using Import Data Wizard

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of Table Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Table properties

The Properties tab allows you to view/edit common properties of the table: schema name, table name, Storage attributes, common options (Data capture, Table Lock, etc.)

Schema

View the schema of the table being edited.

Name

Specify a name for the table. Note that the name must not identify a table, view or alias described in the catalog.

Table Editor - Table Properties

Storage

Tablespace

Specifies the table space where the table are created.

Index

Specifies the table space where the table indexes are stored.

Long data

Specifies the table space where the long data of the table are stored.

Options

Data capture

This option indicates whether extra information regarding SQL changes to this table will be written to the log or not:

RadioButton None

RadioButton Table SQL changes

RadioButton Table SQL changes include LONGVAR columns

Lock

Specify whether lock is to be applied to a Row or to the entire Table while the table data is being modified.

CheckBox Not logged

This option specifies that changes made to the column are not to be logged.

CheckBox Append

This option specifies that new rows are appended at the end of table data.

CheckBox Value compression

This option specifies whether the table values are compressed or not.

CheckBox Volatile

This option specifies that cardinality of the table is volatile.

CheckBox Restrict the drop

Check this option to restrict dropping the table.

If necessary, specify the PCTFree value for the table specifying what percentage of each index page is left as free space when building the index.

Security policy name

Select the security policy that will be used to protect the table. The option is available only for DB2 version 9 and higher.

The lower editable area allows you to provide an optional comment for the table.


Managing fields

The Fields tab is intended for managing table fields. Double-click a field to open Field Editor for editing the field.

Right-click a field to display the context menu allowing you to create new, edit, drop, or duplicate the selected field. Using the menu you can also copy the list of the table fields to clipboard and export it to any of supported formats.

Fields management tools are also available through the Navigation bar of Table Editor.

Table Editor - Managing fields

The Fields list provides the following attributes of each field of the table:

Field Name

Field Type

Size

Precision

Not Null

Security Label

Default

Comment

For details see Fields.


Managing indices

The indices tab is provided for managing table indices. Double-click an index to open Index Editor for editing the index.

Right-click an index to display the context menu allowing you to create new, edit, or drop the selected index. Using the menu you can also export the list of the table indexes to any of supported formats.

Indices management tools are also available through the Navigation bar of Table Editor.

Table Editor - Managing indexes

The Indices list provides the following attributes of each index of the table:

Index name

On fields

Unique

Collation

Comment

For details see Indices.


Managing constraints

Constraints let you define the way the server automatically enforces the integrity of a database. Constraints define rules regarding the values allowed in columns and are the standard mechanism for enforcing integrity.

The Constraints tab of Table Editor allows you to manage table constraints:

  • Primary and Unique keys
  • Foreign keys
  • Checks


Primary and unique keys

The Primary/Unique Key tab is provided for managing table keys. Double-click a key to open Primary/Unique Key Editor for editing the key.

Right-click a key to display the context menu allowing you to create new, view, or drop the selected primary/unique key. Using the menu you can also export the list of the table keys to any of supported formats.

Keys management tools are also available through the Navigation bar of Table Editor.

Table Editor - Constraints - Primary and Unique keys

The Keys list provides the following attributes of each key of the table:

Field Name

Primary

Constraint Name

For details see Primary/Unique keys.


Foreign keys

The Foreign Key tab is provided for managing table Foreign keys. Double-click a key to open Foreign Key Editor for editing the Foreign key.

Right-click a Foreign key to display the context menu allowing you to create new, view, or drop the selected Foreign key. Using the menu you can also export the list of the table Foreign keys to any of supported formats.

Foreign keys management tools are also available through the Navigation bar of Table Editor.

Table Editor - Constraints - Foreign keys

The Foreign Keys list provides the following attributes of each Foreign key of the table:

Key Name

Field Names

Foreign Table Names

Foreign Field Names

Delete Rule

Update Rule

Comment

For details see Foreign keys.


Checks

The Checks tab is provided for managing table check constraints. Double-click a check to open Check Editor for editing the check.

Right-click a check to display the context menu allowing you to create new, view, or drop the selected check. Using the menu you can also export the list of the table checks to any of supported formats.

Checks management tools are also available through the Navigation bar of Table Editor.

Table Editor - Constraints - Checks

The Checks list provides the following attributes of each check constraint of the table:

Name

Condition

Comment

For details see Checks.


Managing triggers

The Triggers tab is provided for managing table triggers. Double-click a trigger to open Trigger Editor for editing the trigger.

Right-click the area to display the context menu allowing you to create new, edit, or drop the selected trigger. Using the menu you can also export the list of the table triggers to any of supported formats.

Triggers management tools are also available through the Navigation bar of Table Editor.

Table Editor - Managing triggers

The Triggers list provides the following attributes of each trigger of the table:

Name

Type

Event

Comment

For details see Triggers.


Working with table data

The Data tab displays the table data as a grid by default (see Data View for details). The context menu of this tab allows you to Export Data, Import Data, Export as SQL Script.

Data management tools are also available through the Navigation bar of Table Editor.

While working with data, you are provided with a number of filtering and grouping facilities.

If necessary, you can group the data in grid by any of the columns. This operation is performed by dragging the column header to the gray "Group by" box area at the top. When grouping by a column is applied to the grid, all the rows are displayed as subnodes to the grouping row value. To reverse grouping, just drag the column header back.

Table Editor - Working with table data

See also:

Working with view data

Data View


Fields

Table fields are managed within the Fields tab of Table Editor.

Creating Fields

To create a new table field:

  • open the table in Table Editor ;
  • proceed to the Fields tab there;
  • right-click the tab area and select the New Field context menu item;
  • define the field properties using the Field Editor dialog.

Editing Fields

To edit an existing table field:

  • open the table in Table Editor ;
  • proceed to the Fields tab there;
  • right-click the field and select the Edit Field context menu item, or simply double-click the field;
  • edit the field properties using the Field Editor dialog.

Dropping Fields

To drop a table field:

  • open the table in Table Editor ;
  • proceed to the Fields tab there;
  • right-click the field and select the Drop Field context menu item;
  • confirm dropping in the dialog window.

Note: Dropping field operation is available starting from DB2 version.


Field Editor

The Field Editor dialog allows you to view/edit field properties.

Note: Starting from DB2 version 9, you can change a number of field parameters when editing an existing field (e.g. you can change field type with a compatible one, increase field size, enable or disable the Not null option, and more). Server version 9.7 makes renaming the existing fields possible.

Tables - Field Editor

Use the Name edit box to set the new field name, or view the name of the field being edited. Note that the name of the field must be unique among all the field names in the table.

Use the Data Type drop-down list to define the data type to be applied to the field.

CheckBox System only

If this option is checked, the Data type list contains only native DB2 types.

Security Label

Select a security label that exists for the security policy that is associated with the table.

Size

Defines the length of the field value (for string types).

For LOB types, you should define the size in bytes (B), kilobytes (KB), megabytes (MB), or gigabytes (GB).

CheckBox Logged

This option is only available for LOB types. Specifies whether the changes are logged or not.

CheckBox Compact

This option is only available for LOB types. Specifies whether data of the column are stored in compact or non-compact format.

CheckBox For bit data

Specifies that the contents of the column are to be treated as bit (binary) data. During data exchange with other systems, code page

conversions are not performed.

Column Properties

CheckBox Not NULL

Check this option to prevent the entry of NULL or unknown values in column. NOT NULL affects all INSERT and UPDATE operations on a column.

CheckBox Primary

Check this option to define the field as a primary key for the table.

CheckBox Unique

Enable the option if records in this column are to be unique.

Data generation

RadioButton None

Select this option if you don't want the data to be generated automatically.

RadioButton Default value

Select this option if you need inserted records to get the specified value.

CheckBox Compress

Specifies whether or not default values for this column are to be stored using minimal space.

RadioButton Identity

Select this option if you need the database manager to generate values for the column.

Generate - specifies the way the database manager will generate values for the column:

RadioButton always - specifies that the database manager will always generate a value for the column;

RadioButton by default - specifies that a value is only to be generated when a value is not provided or the DEFAULT keyword is used in an assignment to the column.

CheckBox Generate in order

Checking this option specifies that the identity column values must be generated in the order of request.

CheckBox Cycle values

Specifies that values continue to be generated for the column after the maximum or minimum value has been reached.

Start with - specifies the first value for the identity column.

Increment by - specifies the interval between consecutive values of the identity column.

Set the Minimum value and the Maximum value to define the range for the generated values, and/or the Next value.

CheckBox Restart

Check this option to enable restart of data generation. You can also specify the value for restart to begin with.

CheckBox Cache

Enables caching of identity sequence values. Use the spinner control to specify how many values of the identity sequence are pre-allocated and kept in memory for faster access.

The Description area allows you to enter optional text as a description for the column.


Indexes

SQL Manager for DB2
  • Index
  • « Prev
  • Next »

Indices

Table indices are managed within the Indices tab of Table Editor.

Creating Indices

To create a new table index:

  • open the table in Table Editor ;
  • proceed to the Indexes tab there;
  • right-click the tab area and select the New Index context menu item;
  • define the index properties using the Index Editor dialog.

Editing Indices

To edit an existing table index:

  • open the table in Table Editor ;
  • proceed to the Indices tab there;
  • right-click the index and select the Edit Index context menu item, or simply double-click the index;
  • edit the index properties using the Index Editor dialog.

Dropping Indices

To drop a table index:

  • open the table in Table Editor ;
  • proceed to the Indices tab there;
  • right-click the index and select the Drop Index context menu item;
  • confirm dropping in the dialog window.


Index Editor

The Index Editor dialog allows you to view/edit table index properties.

Tables - Index Editor l

Use the Schema drop-down list to select the database schema for the index.

Use the Name edit box to set the index name. Note that the name of the index must be unique among all names of the index or index specifications described in the catalog.

The Fields for index area allows you to select indexed fields.

To select a field, you need to move it from the Available fields list to the Selected fields list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the fields from one list to another.

Index properties

This area allows you to specify a number of properties for the index.

For details see Index Editor.


Primary/Unique keys

A Primary key constraint designates a column as the Primary key of a table. A composite primary key designates a combination of columns as the primary key.

Table keys are managed within the Constraints tab of Table Editor.

Creating Keys

To create a new key:

  • open the table in Table Editor ;
  • proceed to the Constraints tab, and then to the Primary/Unique Key tab there;
  • right-click the tab area and select the New Primary/Unique context menu item;
  • define the key properties using the Primary/Unique Key Editor dialog.

Viewing Keys

To view an existing key:

  • open the table in Table Editor ;
  • proceed to the Constraints tab, and then to the Primary/Unique Key tab there;
  • right-click the key and select the View Primary/Unique Key context menu item, or simply double-click the key;
  • view the key properties using the Primary/Unique Key Editor dialog.

Dropping Keys

To drop a key:

  • open the table in Table Editor ;
  • proceed to the Constraints tab, and then to the Primary/Unique Key tab there;
  • right-click the key and select the Drop Primary/Unique Key context menu item;
  • confirm dropping in the dialog window.


Primary/Unique Key Editor

The Key Editor dialog allows you to view/edit the properties of the Primary/Unique key. It opens when you create a new key or view an existing one (see Create Key and View Key for details).

Tables - Key Editor

Use the Table Name drop-down list to select the table to create the key for.

The Table Fields area allows you to select key field(s).

To select a field, you need to move it from the Available fields list to the Selected fields list. Use the Move to Selected Move to Available buttons or drag-and-drop operations to move the fields from one list to another.

Key type

RadioButton Unique

This option determines uniqueness of the key.

RadioButton Primary key

This option determines whether the selected key field is a Primary key of the table.

Constraints Name

Use the edit box to specify the underlying Unique / Primary key constraint name.


Foreign keys

A Foreign key constraint (also called a referential integrity constraint) designates a column as the Foreign key and establishes a relationship between that foreign key and a specified Primary or Unique key called the referenced key. A composite Foreign key designates a combination of columns as the foreign key.

Table Foreign keys are managed within the Constraints tab of Table Editor.

Creating Foreign Keys

To create a new Foreign key:

  • open the table in Table Editor ;
  • proceed to the Constraints tab, and then to the Foreign Key tab there;
  • right-click the tab area and select the New Foreign Key context menu item;
  • define the Foreign key properties using the Foreign Key Editor dialog.

Viewing Foreign Keys

To view an existing Foreign key:

  • open the table in Table Editor ;
  • proceed to the Constraints tab, and then to the Foreign Key tab there;
  • right-click the Foreign key and select the View Foreign Key context menu item, or simply double-click the Foreign key;
  • view the Foreign key properties using the Foreign Key Editor dialog.

Dropping Foreign Keys

To drop a Foreign key:

  • open the table in Table Editor ;
  • proceed to the Constraints tab, and then to the Foreign Key tab there;
  • right-click the Foreign key and select the Drop Foreign Key context menu item;
  • confirm dropping in the dialog window.


Foreign Key Editor

The Foreign Key Editor dialog allows you to view/edit the Foreign key fields. It opens when you create a new Foreign key or view an existing one (see Create Foreign key and View Foreign key for details).

Tables - Foreign Key Editor

Enter the Foreign key name in the corresponding box. Note that the name of the Foreign key must be unique among all the Foreign key names in the schema.

Use the Table Name box to set the table in which the Foreign key is created.

The Table Fields area allows you to select Foreign key field(s).

To select a field, you need to move it from the Available fields list to the Selected fields list. Use the Move to Selected Move to Available buttons or drag-and-drop operations to move the fields from one list to another.

Foreign table name

Use the drop-down list to select the foreign table.

The Foreign Table Fields area allows you to select the field(s) of the Foreign table.

To select a field, you need to move it from the Available fields list to the Selected fields list. Use the Move to Selected Move to Available buttons or drag-and-drop operations to move the fields from one list to another.

On Delete rule / On Update rule

  • NO ACTION

Produce an error indicating that the deletion or update would create a foreign key constraint violation. If the constraint is deferred, this error will be produced at constraint check time if there still exist any referencing rows. This is the default action.

  • RESTRICT

If specified, an error occurs and no rows are deleted/updated.

  • Set NULL

Set the referencing column(s) to null.

  • CASCADE

Delete any rows referencing the deleted row, or update the value of the referencing column to the new value of the referenced column, respectively.


Checks

A Check specifies an expression producing a Boolean result which new or updated rows must satisfy for an insert or update operation to succeed. Expressions evaluating to TRUE or UNKNOWN succeed. Should any row of an insert or update operation produce a FALSE result an error exception is raised and the insert or update does not alter the database. A check constraint specified as a column constraint should reference that column's value only, while an expression appearing in a table constraint may reference multiple columns.

Table checks are managed within the Constraints tab of Table Editor.

Creating Checks

To create a new check:

  • open the table in Table Editor ;
  • proceed to the Constraints tab, and then to the Check tab there;
  • right-click the tab area and select the New Check context menu item;
  • define the check properties using the Check Editor dialog.

Viewing Checks

To view an existing check:

  • open the table in Table Editor ;
  • proceed to the Constraints tab, and then to the Check tab there;
  • right-click the check and select the View Check context menu item, or simply double-click the check;
  • view the check properties using the Check Editor dialog.

Dropping Checks

To drop a check:

  • open the table in Table Editor ;
  • proceed to the Constraints tab, and then to the Check tab there;
  • right-click the check and select the Drop Check context menu item;
  • confirm dropping in the dialog window.


Check Editor

The Check Editor allows you to edit check properties. It opens when you create a new check or edit the existing one (see Create check and View check for details).

Tables - Check Editor

Use the Check Name edit box to set the check name. Note that the name of the check must be unique among all the check names in the table.

The Condition area allows you to enter condition for the check.

CheckBox Enforced

Specifies whether the check is enforced by the database manager or not.

CheckBox Enable Query Optimization

Specifies whether the constraint or functional dependency can be used for query optimization under appropriate circumstances.


Triggers

Table triggers are managed within the Triggers tab of Table Editor.

Creating Triggers

To create a new trigger:

  • open the table in Table Editor ;
  • proceed to the Triggers tab there;
  • right-click the tab area and select the New Trigger context menu item;
  • define the trigger properties using the Trigger Editor dialog.

Editing Triggers

To edit an existing trigger:

  • open the table in Table Editor ;
  • proceed to the Triggers tab there;
  • right-click the trigger and select the Edit Trigger context menu item, or simply double-click the trigger;
  • edit the trigger properties using the Trigger Editor dialog.

Dropping Triggers

To drop a trigger:

  • open the table in Table Editor ;
  • proceed to the Triggers tab there;
  • right-click the trigger and select the Drop Trigger context menu item;
  • confirm dropping in the dialog window.


Trigger Editor

Trigger Editor allows you to set properties for a new trigger or edit an existing trigger.

Tables - Trigger Editor

For details see Trigger Editor | Creating/editing trigger.


View from Table

SQL Manager for DB2 provides you with an ability to create an updatable view from a table and set its properties using the Create View from Table dialog.

To open the dialog, right-click the table in DB Explorer and select the Tasks | Create View... context menu item, or open the table in Table Editor and use the Create View item of the Navigation bar.

  • Options
  • View info
  • View triggers

See also:

SIUD Procedures from Table


Options

The Options section of the Create View from Table dialog allows you to specify common options for the view being created.

Tables - Create View from Table - Options

Triggers

Select trigger type(s) to be created for the view with the help of the corresponding flags:

CheckBox Before Insert

CheckBox Before Update

CheckBox Before Delete

CheckBox Grant privileges on view according to the privileges on the table

If you check this option then all privileges that were granted to the table will be granted on the view created.


View info

The View info section of the Create View from Table dialog provides the definition of the view generated from the table.

Tables - Create View from Table - View info

Name

Specifies view name (if necessary, you can edit the one assigned by default).

The Fields list displays view fields as specified in the fields clause and the AS clause of the view definition.

The list provides the following attributes of each field:

Name

Type

To add/remove fields to/from the construction, check/uncheck flags available in the first column of the Fields list.

For your convenience the Select All, Deselect All and Invert Selection functions are implemented in the context menu of the fields list area.

The lower area represents the view definition as SQL statement. It is possible to edit the definition directly using the editor area to make appropriate changes.

For your convenience the syntax highlight, code completion and a number of other features for efficient SQL editing are implemented. For details see Working with SQL Editor area and Using the context menu.


View triggers

The Before insert / Before update / Before delete pages allow you to specify definitions for corresponding triggers generated for the view. The set of available sections is determined by selection in the Triggers group of the Options page.

Tables - Create View from Table - View triggers

Edit the block of statements within the BEGIN / END pair according to your needs.

For your convenience the syntax highlight, code folding and a number of other features for efficient SQL editing are implemented. For details see Working with SQL Editor area and Using the context menu.


Procedures from Table

SQL Manager for DB2 provides you with an ability to create SELECT/INSERT/UPDATE/DELETE procedures from a table and set their properties using the Create Procedures from Table dialog.

To open the dialog, right-click the table in DB Explorer and select the Tasks | Create SIUD Routines... context menu item, or open the table in Table Editor and use the Create Procedure item of the Navigation bar.

  • Options
  • SELECT procedure
  • INSERT procedure
  • UPDATE procedure
  • DELETE procedure

See also:

View from Table


Options

The Options section of the Create Procedures from Table dialog allows you to specify common options for the procedures being created.

Tables - Create Procedure from Table - Options

Procedure type

Select procedure type(s) to be created with the help of the corresponding flags:

CheckBox Create SELECT procedure

CheckBox Create INSERT procedure

CheckBox Create UPDATE procedure

CheckBox Create DELETE procedure


SELECT procedure

The Select section of the Create Procedures from Table dialog provides the definition of the SELECT procedure generated from the table.

Tables - Create Procedure from Table - SELECT

Schema

Select schema for the procedure using the drop-down list.

Name

Specifies procedure name (if necessary, you can edit the one assigned by default).

The Fields list displays fields as specified in the fields clause of the procedure definition.

The list provides the following attributes of each field:

Name

Type

To add/remove fields to/from the construction, check/uncheck flags available in the first column of the Fields list.

For your convenience the Select All, Deselect All and Invert Selection functions are implemented in the context menu of the fields list area.

The lower area represents the SELECT procedure definition as SQL statement. It is possible to edit the definition directly using the editor area to make appropriate changes.

Edit the block of statements within the BEGIN / END pair according to your needs.

For your convenience the syntax highlight, code completion and a number of other features for efficient SQL editing are implemented. For details see Working with SQL Editor area and Using the context menu.


INSERT procedure

The Insert section of the Create Procedures from Table dialog provides the definition of the INSERT procedure generated from the table.

Tables - Create Procedure from Table - INSERT

View schema

Select schema for the procedure using the drop-down list.

Name

Specifies procedure name (if necessary, you can edit the one assigned by default).

The Fields list displays fields as specified in the fields clause of the procedure definition.

The list provides the following attributes of each field:

Name

Type

To add/remove fields to/from the construction, check/uncheck flags available in the first column of the Fields list.

For your convenience the Select All, Deselect All and Invert Selection functions are implemented in the context menu of the fields list area.

The lower area represents the INSERT procedure definition as SQL statement. It is possible to edit the definition directly using the editor area to make appropriate changes.

Edit the block of statements within the BEGIN / END pair according to your needs.

For your convenience the syntax highlight, code completion and a number of other features for efficient SQL editing are implemented. For details see Working with SQL Editor area and Using the context menu.


UPDATE procedure

The Update section of the Create Procedures from Table dialog provides the definition of the UPDATE procedure generated from the table.

Tables - Create Procedure from Table - UPDATE

View schema

Select schema for the procedure using the drop-down list.

Name

Specifies procedure name (if necessary, you can edit the one assigned by default).

The Fields list displays fields as specified in the fields clause of the procedure definition.

The list provides the following attributes of each field:

Name

Type

To add/remove fields to/from the construction, check/uncheck flags available in the first column of the Fields list.

For your convenience the Select All, Deselect All and Invert Selection functions are implemented in the context menu of the fields list area.

The lower area represents the UPDATE procedure definition as SQL statement. It is possible to edit the definition directly using the editor area to make appropriate changes.

Edit the block of statements within the BEGIN / END pair according to your needs.

For your convenience the syntax highlight, code completion and a number of other features for efficient SQL editing are implemented. For details see Working with SQL Editor area and Using the context menu.


DELETE procedure

The Delete section of the Create Procedures from Table dialog provides the definition of the DELETE procedure generated from the table.

Tables - Create Procedure from Table - DELETE

View schema

Select schema for the procedure using the drop-down list.

Name

Specifies procedure name (if necessary, you can edit the one assigned by default).

The Fields list displays fields as specified in the fields clause of the procedure definition.

The list provides the following attributes of each field:

Name

Type

To add/remove fields to/from the construction, check/uncheck flags available in the first column of the Fields list.

For your convenience the Select All, Deselect All and Invert Selection functions are implemented in the context menu of the fields list area.

The lower area represents the DELETE procedure definition as SQL statement. It is possible to edit the definition directly using the editor area to make appropriate changes.

Edit the block of statements within the BEGIN / END pair according to your needs.

For your convenience the syntax highlight, code completion and a number of other features for efficient SQL editing are implemented. For details see Working with SQL Editor area and Using the context menu.


Views

A View is a logical table based on one or more tables or views. A view contains no data itself. The tables upon which a view is based are called base tables.

Views are useful for allowing users to access a set of relations (tables) as if it were a single table, and limiting their access to just that. Views can also be used to restrict access to rows (a subset of a particular table).

Creating Views

To create a new view:

  • select the Database | New Object... main menu item;
  • select View in the Create New Object dialog;
  • define view properties using the appropriate tabs of View Editor.

Hint: To create a new view, you can also right-click the Views node or any object within this node in the DB Explorer tree and select the New View item from the context menu.

Another way to create a view is to build a query in Visual Query Builder (click the Create view Navigation bar item after building).

To create a new view with the same properties as one of existing views has:

  • select the Database | Duplicate Object... main menu item;
  • follow the instructions of Duplicate Object Wizard.

Alternatively, you can right-click a view in the DB Explorer tree and select the Duplicate View <view_name>... context menu item.

Duplicate Object Wizard allows you to select the database to create a new view in, and to edit the result SQL statement for creating the view.

Editing Views

To edit an existing view:

  • select the view for editing in the DB Explorer tree (type the first letters of the view name for quick search);
  • right-click the object and select the Edit View <view_name> context menu item, or simply double-click the view;
  • edit view definition and data using the appropriate tabs of View Editor.

Dropping Views

To drop a view:

  • select the view to drop in the DB Explorer tree;
  • right-click the object and select the Drop View <view_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new view;

Ctrl+O to edit the selected view;

Shift+Del to drop the object from the database.


View Editor

View Editor allows you to create new views and define their properties (view name and the SELECT statement it implements). It opens automatically when you create a new view and is available on editing an existing one (see Create view and Edit view for details).

To open a view in View Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing view
  • Managing fields
  • Managing triggers
  • View plan
  • Working with data
  • Editing object description
  • Browsing object dependencies
  • Viewing DDL definition


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in View Editor.

View Editor - Using Navigation bar

The Navigation bar of View Editor allows you to:

Object group

iconDB select a database

select a view for editing

General group

iconCompile compile the view (if it is being created/modified)

edit the view query using Query Builder

iconRefresh refresh the content of the active tab

iconPrint print metadata of the view

iconRestoreDefaultSize restore the default size and position of the editor window

Explorer group

iconDBExplorer browse the view subobjects using the Explorer tree

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the view:

Triggers group

add a new trigger

edit selected trigger

drop selected trigger(s)

Data Management group

iconCommit commit transaction

iconRollback rollback transaction

export data from the view using Export Data Wizard

export data from the view as SQL script using Export as SQL Script Wizard

import data

Description group

iconSaveToFile save object description to file

iconLoadFromFile load description text from an external *.txt file

iconCopyToClipboard copy description to clipboard

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of View Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing view

Use the Edit tab of View Editor to create/edit a view and specify its definition.

View Editor - Editing view definition

Schema

Specify the schema to contain the view.

View Name

Specify the name of the view.

Set the check options (None, Cascaded, Local), then specify the Fields clause and the AS clause for the view.

Check options

RadioButton None

If this option is selected, the definition of the view is not used in the checking of any insert or update operations that use the view. Some checking might still occur during insert or update operations if the view is directly or indirectly dependent on another view that has a check option enabled.

RadioButton Cascaded

The Cascaded check option constraint on a view V means that V inherits the search conditions as constraints from any updatable view on which V is dependent. Furthermore, every updatable view that is dependent on V is also subject to these constraints. Thus, the search conditions of V and each view on which V is dependent are ANDed together to form a constraint that is applied for an insert or update of V or of any view dependent on V.

RadioButton Local

The Local check option constraint on a view V means that the search condition of V is applied as a constraint for an insert or update of V or of any view that is dependent on V.


Managing fields

The Fields tab is provided for viewing fields represented in the view.

Right-click a field to display the context menu allowing you to export field name list or copy it to clipboard.

View Editor - Viewing fields

The Fields list provides the following attributes of each field of the view:

Field Name

Field Type

Size

Precision

Not Null

Default

Comment

For details see Fields.


Managing triggers

The Triggers tab is provided for managing triggers represented in the view. Double-click a trigger to open Trigger Editor for editing the trigger.

Right-click the area to display the context menu allowing you to create new, edit, drop the selected trigger, or export the list of the view triggers to any of supported formats.

View Editor - Managing triggers

The Triggers list provides the following attributes of each trigger of the view:

Name

Type

Event

Comment

For details see Triggers.


View plan

The Plan tab is provided for your convenience to see the plan of the query implied by the view.

View Editor - View plan

See Query plan for details.


Working with data

The Data tab displays the view data as a grid by default (see Data View for details). The context menu of this tab and the Navigation bar allow you to Export Data, Import Data, Export as SQL Script.

While working with view data, you are provided with a number of filtering and grouping facilities.

If necessary, you can group the data in grid by any of the columns. This operation is performed by dragging the column header to the gray "Group by" box area at the top. When grouping by a column is applied to the grid, all the rows are displayed as subnodes to the grouping row value. To reverse grouping, just drag the column header back.

Data management tools are also available through the Navigation bar and toolbar of View Editor.

View Editor - Working with data

See also:

Working with table data


Procedures

A Procedure is a set of procedural constructs and embedded SQL statements that is stored in the database and can be called by name. Stored procedures allow an application program to be run in two parts. One part runs on the client and the other on the server. This allows one call to produce several accesses to the database.

Creating Procedures

To create a new procedure:

  • select the Database | New Object... main menu item;
  • select Procedure in the Create New Object dialog;
  • edit procedure properties using the appropriate tabs of Procedure Editor.

Hint: To create a new procedure, you can also right-click the Procedures node of the DB Explorer tree and select the New Procedure... context menu item.

To create a new procedure with the same properties as one of existing procedures has:

  • select the Database | Duplicate Object... main menu item;
  • follow the instructions of Duplicate Object Wizard.

Alternatively, you can right-click a procedure in the DB Explorer tree and select the Duplicate Procedure <procedure_name>... context menu item.

Duplicate Object Wizard allows you to select the database to create a new procedure in, and to edit the result SQL statement for creating the procedure.

Editing Procedures

To edit an existing procedure:

  • select the procedure for editing in the DB Explorer tree (type the first letters of the procedure name for quick search);
  • right-click the object and select the Edit Procedure <procedure_name>... context menu item, or simply double-click the procedure;
  • edit procedure definition using the appropriate tabs of Procedure Editor.

Executing Procedures

To execute a procedure:

  • select the procedure to execute in the DB Explorer tree (type the first letters of the procedure name for quick search);
  • right-click the object and select the Edit Procedure <procedure_name>... context menu item, or simply double-click the procedure;
  • execute the procedure using the Execute Procedure Navigation bar item of Procedure Editor.

Dropping Procedures

To drop a procedure:

  • select the procedure to drop in the DB Explorer tree;
  • right-click the object and select the Drop Procedure <procedure_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new procedure;

Ctrl+O to edit the selected procedure;

Shift+Del to drop the object from the database.


Procedure Editor

Procedure Editor allows you to define procedure properties. It opens automatically when you create a new procedure and is available on editing an existing one (see Create Procedure and Edit Procedure for details).

To open a procedure in Procedure Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing procedure
  • Editing object description
  • Editing SQL
  • Managing parameters
  • Viewing DDL definition
  • Browsing object dependencies


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Procedure Editor.

Procedure Editor - Using Navigation bar

The Navigation bar of Procedure Editor allows you to:

Object group

iconDB select a database

select a procedure for editing

General group

iconCompile compile the procedure (if it is being created/modified)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the procedure

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the procedure:

Parameters group

iconPlus add a parameter

iconMinus remove a parameter

Description group

iconSaveToFile save object description to file

iconLoadFromFile load description text from an external *.txt file

iconCopyToClipboard copy description to clipboard

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of Procedure Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing procedure

Use the Edit tab of Procedure Editor to create/edit a procedure and specify its definition.

Procedure Editor - Editing procedure definition

Procedure type

Select the type of the procedure being defined: EXTERNAL, SQL.

Procedure schema

Use this drop-down list to select the schema for the procedure.

Name

Enter a name for the stored procedure being defined. It should be an unqualified name that designates the procedure.

Specific name

Provide a unique name for the instance of the procedure that is being defined. This specific name can be used when dropping the procedure or commenting on the procedure, but it cannot be used to invoke the procedure.

External name (for external procedures)

Use this field to identify the name of the written code that implements the function.

Environment options

Language

Use this drop-down list to specify the language interface convention to which the procedure body is written. Possible values are: C, COBOL, JAVA, OLE.

Program type

Specifies whether the procedure expects parameters in the style of a main routine or a subroutine.

SQL data

Use the drop-down list to indicate what type of SQL statements can be executed. Possible values are: READS SQL DATA, CONTAINS SQL, MODIFIES SQL, NO SQL.

Parameter style

Use the drop-down list to specify the conventions used for passing parameters to and returning the value from procedures. Possible values are: DB2SQL, SQL, DB2GENERAL, GENERAL, JAVA, DB2DARI, GENERAL WITH NULLS.

Result sets

Define the estimated upper bound of returned result sets for the procedure.

Parameter CCSID

Specifies the encoding scheme to use for all string data passed into and out of the procedure. If the Parameter CCSID clause is not specified, the default is Unicode.

Savepoint level

Specify whether or not this procedure should establish a new savepoint level for savepoint names and effects.

Commit rule

Use this option to define whether a commit is to be issued on return from the procedure. You can also select the Autonomous to indicate that the procedure should execute in its own autonomous transaction scope.

CheckBox Deterministic

This option specifies whether the procedure always returns the same results for given argument values (DETERMINISTIC) or whether the procedure depends on some state values that affect the results (NOT DETERMINISTIC).

CheckBox Fenced

This option specifies whether the procedure is considered "safe" to run in the database manager operating environment's process or address

space (NOT FENCED), or not (FENCED).

CheckBox Threadsafe

Check this option to specify that the thread-safe mode is enabled for this procedure.

CheckBox DB information

This option specifies whether certain specific information known by DB2 will be passed to the procedure as an additional invocation-time argument (DBINFO), or not (NO DBINFO).

CheckBox External action

This option specifies whether or not the procedure takes some action that changes the state of an object not managed by the database manager.

If necessary, specify the Result sets value for the procedure.


Editing SQL

The SQL tab allows you to input the SQL definition of the stored procedure.

The working area provides all features for efficient SQL editing. See Working with SQL Editor area for details.

Procedure Editor - Editing SQL

If necessary, you can use the btnShowQueryBuilder Run Query Builder item of the Navigation bar to build SQL visually using the Query Builder tool.


Managing parameters

The Parameters tab is provided for managing the list of parameters for the function.

Use the iconPlus Add parameter and the iconMinus Remove parameter items of the Navigation bar to manage parameters of the procedure, or right-click within the Parameters area to display the popup menu allowing you to add and remove parameters.

Procedure Editor - Managing parameters

Select the parameter type: IN, OUT, INOUT and specify the parameter Name and Data type using the corresponding controls.


Aliases

An Alias is an alternative name used to identify a table, a view, a database, or a nickname. An alias can be used in SQL statements to refer to a table or view in the same DB2 subsystem or a remote DB2 subsystem.

Creating Aliases

To create a new alias:

  • select the Database | New Object... main menu item;
  • select Alias in the Create New Object dialog;
  • edit alias properties using the appropriate tabs of Alias Editor.

Hint: To create a new alias, you can also right-click the Aliases node of the DB Explorer tree and select the New Alias... context menu item.

To create a new alias with the same properties as one of existing aliases has:

  • select the Database | Duplicate Object... main menu item;
  • follow the instructions of Duplicate Object Wizard.

Alternatively, you can right-click an alias in the DB Explorer tree and select the Duplicate Alias <alias_name>... context menu item.

Duplicate Object Wizard allows you to select the database to create a new alias in, and to edit the result SQL statement for creating the alias.

Editing Aliases

To edit an existing alias:

  • select the alias for editing in the DB Explorer tree (type the first letters of the alias name for quick search);
  • right-click the object and select the Edit Alias <alias_name>... context menu item, or simply double-click the alias;
  • edit alias definition using the appropriate tabs of Alias Editor.

Dropping Aliases

To drop an alias:

  • select the alias to drop in the DB Explorer tree;
  • right-click the object and select the Drop Alias <alias_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new alias;

Ctrl+O to edit the selected alias;

Shift+Del to drop the object from the database.


Alias Editor

Alias Editor allows you to define alias properties. It opens automatically when you create a new alias and is available on editing an existing one (see Create Alias and Edit Alias for details).

To open an alias in Alias Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing alias
  • Viewing data
  • Editing object description
  • Viewing DDL definition
  • Browsing object dependencies


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Alias Editor.

Alias Editor - Using Navigation bar

The Navigation bar of Alias Editor allows you to:

Object group

iconDB select a database

select an alias for editing

General group

iconCompile compile the alias (if it is being created/modified)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the alias

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the alias:

Data Management group

iconCommit commit transaction

iconRollback rollback transaction

export data using Export Data Wizard

export data as SQL script using Export as SQL Script Wizard

import data

Description group

iconSaveToFile save object description to file

iconLoadFromFile load description text from an external *.txt file

iconCopyToClipboard copy description to clipboard

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of Alias Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing alias

Use the Alias tab of Alias Editor to create/edit an alias and specify its definition.

Alias Editor - Editing alias definition

Alias schema

Use the drop-down list to select the schema for the new alias.

Alias name

Enter a name for the new alias. The name must not identify a table, view, nickname, or alias that exists in the current database.

Object type

Select the object type to define the alias for: Table, View, Nickname, Alias for all server versions and MQTable, Module, Global temporary table, Sequence for server version 9.7.

Object properties

Object schema

Use the drop-down list to select the schema where the object is located.

Object name

Use the drop-down list to select the object to define the alias for.


Viewing data

The Data tab of Alias Editor allows you to view the alias data.

Alias Editor - Viewing data

By default the data are displayed as a grid (see Data View for details). If necessary, you can switch the date representation mode to Form View or Print Data.


Functions

A Function is a mapping embodied as a program (the function body) that can be invoked by using zero or more input values (arguments) to a single value (the result).

Creating Functions

To create a new function:

  • select the Database | New Object... main menu item;
  • select Function in the Create New Object dialog;
  • edit function properties using the appropriate tabs of Function Editor.

Hint: To create a new function, you can also right-click the Functions node of the DB Explorer tree and select the New Function... context menu item.

To create a new function with the same properties as one of existing functions has:

  • select the Database | Duplicate Object... main menu item;
  • follow the instructions of Duplicate Object Wizard.

Alternatively, you can right-click a function in the DB Explorer tree and select the Duplicate Function <function_name>... context menu item.

Duplicate Object Wizard allows you to select the database to create a new function in, and to edit the result SQL statement for creating the function.

Editing Functions

To edit an existing function:

  • select the function for editing in the DB Explorer tree (type the first letters of the function name for quick search);
  • right-click the object and select the Edit Function <function_name>... context menu item, or simply double-click the function;
  • edit function definition using the appropriate tabs of Function Editor.

Dropping Functions

To drop a function:

  • select the function to drop in the DB Explorer tree;
  • right-click the object and select the Drop Function <function_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new function;

Ctrl+O to edit the selected function;

Shift+Del to drop the object from the database.


Function Editor

Function Editor allows you to define function properties. It opens automatically when you create a new function and is available on editing an existing one (see Create function and Edit function for details).

To open a function in Function Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing function
  • Editing object description
  • Editing SQL
  • Managing parameters
  • Viewing DDL definition
  • Browsing object dependencies


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Function Editor.

Function Editor - Using Navigation bar

The Navigation bar of Function Editor allows you to:

Object group

iconDB select a database

select a function for editing

General group

iconCompile compile the function (if it is being created/modified)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the function

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the function:

Parameters group

iconPlus add a parameter

iconMinus remove a parameter

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of Function Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing function

Use the Edit tab of Function Editor to create/edit a function and specify its definition.

Function Editor - Editing function definition

Function type

Select the type of the function being defined: EXTERNAL, SQL, OLEDB or SOURCE:

  • An EXTERNAL function is defined to the database with a reference to a load module that is executed when the function is invoked.
  • The definition of an SQL function includes a RETURN statement.
  • The OLEDB type is used to register a user-defined OLE DB external table function to access data from an OLE DB provider.
  • A SOURCED function is defined to the database with a reference to a built-in function or another user-defined function.

Returns

This option identifies the output of the function. Possible values are: SCALAR, TABLE.

Function schema

Use this drop-down list to select the schema for the function.

Name

Enter a name for the function being defined. It should be an unqualified name that designates the function.

Specific name

Provide a unique name for the instance of the function that is being defined. This specific name can be used when sourcing on this

function, dropping the function, or commenting on the function, but it cannot be used to invoke the function.

External name (for external functions)

Use this field to identify the name of the written code that implements the function.

Source function (for source functions)

Define the implemented function for the source function.

Environment options

Language

Use this drop-down list to specify the language interface convention to which the function body is written.

SQL data

Use the drop-down list to indicate what type of SQL statements can be executed. Possible values are: READS SQL DATA, CONTAINS SQL.

Parameter style

Use the drop-down list to specify the conventions used for passing parameters to and returning the value from functions. Possible values are: SQL, DB2GENERAL, JAVA.

Cardinality

This option provides an estimate of the expected number of rows to be returned by the function for optimization purposes. Valid values for integer range from 0 to 2 147 483 647 inclusive.

Parameter CCSID

Specifies the encoding scheme to use for all string data passed into and out of the procedure. If the Parameter CCSID clause is not specified, the default is Unicode.

CheckBox Deterministic

This option specifies whether the function always returns the same results for given argument values (DETERMINISTIC) or whether the function depends on some state values that affect the results (NOT DETERMINISTIC).

CheckBox Fenced

This option specifies whether the function is considered "safe" to run in the database manager operating environment's process or address

space (NOT FENCED), or not (FENCED).

CheckBox Threadsafe

Check this option to specify that the thread-safe mode is enabled for this function.

CheckBox DB information

This option specifies whether certain specific information known by DB2 will be passed to the function as an additional invocation-time argument (DBINFO), or not (NO DBINFO).

CheckBox Scratchpad

This option may be used to specify whether a scratchpad is to be provided for an external function. A scratchpad enables a user-defined function save its state from one invocation to the next. The Scratchpad option tells DB2 to allocate and maintain a scratchpad for a routine. The default size for a scratchpad is 100 bytes, but you can determine the size (in bytes) for a scratchpad using the spinner controls.

CheckBox Returns NULL

This option may be used to avoid a call to the external function if any of the non-subject arguments is NULL.

CheckBox Final call

This option specifies whether a final call is to be made to an external function. The purpose of such a final call is to enable the function to free any system resources it has acquired.

CheckBox Allow parallel

This option specifies whether, for a single reference to the function, the invocation of the function can be parallelized.

CheckBox External action

This option specifies whether or not the function takes some action that changes the state of an object not managed by the database manager.

CheckBox Inherit special registers

This option specifies that updatable special registers in the function will inherit their initial values from the environment of the invoking statement.

External part name (for OLEDB functions, External functions)

For external functions this group of options depends on the Language chosen:

  • C

Function Editor - Editing function definition - C External name parts

Define the library name containing the function. On Windows operating systems, the database manager will look for the function in a directory path that is specified by the LIBPATH or PATH environment variable.

Or you can define the full path name of the file containing the function. On Windows operating systems, for example, 'd:\mylib\myfunc.dll' would cause the database manager to load the dynamic link library, myfunc.dll, from the d:\mylib directory. If an absolute path ID is being used to identify the routine body, be sure to append the *.dll extension.

Function ID (for External functions)

Define the entry point name of the function to be invoked.

  • Java

Function Editor - Editing function definition - Java External name parts

Jar ID

Define the jar identifier given to the jar collection when it was installed in the database. It can be either a simple identifier, or a schema qualified identifier. For example, 'myJar' and 'mySchema.myJar'.

Class ID

Specify the class identifier of the Java object. If the class is part of a package, the class identifier part must include the complete package prefix, for example, 'myPacks.UserFuncs'. On Windows operating systems, the Java virtual machine will look in directory '...\myPacks\UserFuncs\'.

Method ID

Specify the method name of the Java object to be invoked.

  • OLE

Function Editor - Editing function definition - Ole External name parts

Programmatic ID or CLSID

Define the programmatic identifier of the OLE object. It is not interpreted by the database manager but only forwarded to the OLE APIs at run time. The specified OLE object must be creatable and support late binding.

Or define the CLSID - the class identifier of the OLE object to create. It can be used as an alternative for specifying a Programmatic ID in the case that an OLE object is not registered with a Programmatic ID. The CLSID has the form: {nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn} where 'n' is an alphanumeric character. CLSID is not interpreted by the database manager but only forwarded to the OLE APIs at run time.

Method ID

Specify the method name of the OLE object to be invoked.

Server (for OLEDB functions)

Define the local name of a data source.

Rowset (for OLEDB functions)

Enter the rowset (table) exposed by the OLE DB provider. Fully qualified table names must be provided for OLE DB providers that support catalog or schema names.

Connect string (for OLEDB functions)

String version of the initialization properties needed to connect to a data source. The basic format of a connection string is based on the ODBC connection string. The string contains a series of keyword/value pairs separated by semicolons. The equal sign (=) separates each keyword and its value. Keywords are the descriptions of the OLE DB initialization properties (property set DBPROPSET_DBINIT) or provider-specific keywords.


Editing SQL

The SQL tab allows you to input the SQL definition of the function.

The working area provides all features for efficient SQL editing. See Working with SQL Editor area for details.

Function Editor - Editing SQL

If necessary, you can use the btnShowQueryBuilder Run Query Builder items of the Navigation bar to build SQL visually.


Managing parameters

The Parameters tab is provided for managing the list of parameters for the function.

Use the iconPlus Add parameter and the iconMinus Remove parameter items of the Navigation bar to manage parameters of the function, or right-click within the Parameters area to display the popup menu allowing you to add and remove parameters.

Function Editor - Managing parameters

Specify parameter Name and Data type.

If necessary, you can apply filtering for the available data types list by checking the CheckBox Use only SYSTEM datatypes option.

Use the CheckBox Cast from option to return a different data type to the invoking statement from the data type that was returned by the function code.

Use the Data type drop-down list below to select the data type to be returned by the function.


MQ Tables

A Materialized query table (MQ table, or MQT) is a table based on a query that is used for the definition of the table and that determines the data included in the table.

Creating MQ Tables

To create a new materialized query table:

  • select the Database | New Object... main menu item;
  • select MQ Table in the Create New Object dialog;
  • edit materialized query table properties using the appropriate tabs of MQ Table Editor.

Hint: To create a new materialized query table, you can also right-click the MQ Tables node of the DB Explorer tree and select the New MQ Table... context menu item.

To create a new materialized query table with the same properties as one of existing materialized query tables has:

  • select the Database | Duplicate Object... main menu item;
  • follow the instructions of Duplicate Object Wizard.

Alternatively, you can right-click a materialized query table in the DB Explorer tree and select the Duplicate MQ Table <mq_table_name>... context menu item.

Duplicate Object Wizard allows you to select the database to create a new materialized query table in, and to edit the result SQL statement for creating the materialized query table.

Editing MQ Tables

To edit an existing materialized query table:

  • select the materialized query table for editing in the DB Explorer tree (type the first letters of the materialized query table name for quick search);
  • right-click the object and select the Edit MQ Table <mq_table_name>... context menu item, or simply double-click the materialized query table;
  • edit materialized query table definition using the appropriate tabs of MQ Table Editor.

Dropping MQ Tables

To drop a materialized query table:

  • select the materialized query table to drop in the DB Explorer tree;
  • right-click the object and select the Drop MQ Table <mq_table_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new MQ table;

Ctrl+O to edit the selected MQ table;

Shift+Del to drop the object from the database.


MQ Table Editor

MQ Table Editor allows you to define materialized query table properties. It opens automatically when you create a new materialized query table and is available on editing an existing one (see Create MQ table and Edit MQ table for details).

To open a materialized query table in MQ Table Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing MQ Table
  • Editing object description
  • Viewing DDL definition
  • Browsing object dependencies


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in MQ Table Editor.

MQ Table Editor - Using Navigation bar

The Navigation bar of MQ Table Editor allows you to:

Object group

iconDB select a database

select a materialized query table for editing

General group

iconCompile compile the materialized query table (if it is being created/modified)

add a new field to the materialized query table (if it is being created)

delete the selected field from the materialized query table (if it is being created)

run Query Builder for visual SQL building (if the materialized query table is being created)

iconRefresh refresh the content of the active tab

make a snapshot of the materialized query table (if it is being edited)

iconPrint print metadata of the materialized query table

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the materialized query table:

Data Management group

iconCommit commit transaction

iconRollback rollback transaction

export data using Export Data Wizard

export data as SQL script using Export as SQL Script Wizard

import data

Description group

iconSaveToFile save object description to file

iconLoadFromFile load description text from an external *.txt file

iconCopyToClipboard copy description to clipboard

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of MQ Table Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing MQ Table

Use the Edit tab of MQ Table Editor to create/edit a materialized query table and specify its definition.

MQ Table Editor - Editing MQ Table definition

Schema

Use the drop-down list to select the schema for the new materialized query table.

Name

Enter a name for the new MQ table. Note that the name must not identify a table, view or alias described in the catalog.

Storage

Tablespace

Use the drop-down list to identify the table space where the MQ table will be created.

Index

Define the table space in which any indexes on the table will be created.

Long data

Specify the table space in which the values of any long columns (LONG VARCHAR, LONG VARGRAPHIC, LOB data types, distinct types with any of these as source types, or any columns defined with user-defined structured types with values that cannot be stored inline) will be stored.

Data capture

This option indicates whether extra information regarding SQL changes to this MQ table will be written to the log or not.

Lock

Specify whether lock is to be applied to a Row or to the entire Table while the MQ table data is being modified.

Managed By...

RadioButton System

If this option is selected, the MQ table will be a system managed table.

RadioButton Database

If this option is selected, the MQ table will be a database managed table.

Optimization

The summary table can be used for query optimization under appropriate circumstances. Select the appropriate option to enable or disable optimization for the MQ table.

Refresh Mode

Select the way how the data in the MQ table is maintained.

RadioButton Deferred

The data in the table can be refreshed at any time with the REFRESH TABLE statement used. The data only reflects the result of the query as a snapshot at the time the REFRESH TABLE statement is processed.

RadioButton Immediate

Changes made to the underlying tables as part of a DELETE, INSERT or UPDATE are cascaded to the summary MQ table.

CheckBox Volatile

This option specifies that cardinality of the MQ table is volatile.

CheckBox Not logged

This option specifies that changes made to the column are not to be logged.

CheckBox Restrict on drop

Check this option to restrict dropping the MQ table.

CheckBox Append

This option specifies that new rows are appended at the end of table data.

If necessary, specify the PCTFree value for the MQ table. PCTFree is the percentage of each page that is to be left as free space.

The Body area introduces the query that is used for the definition of the MQ table and to determine the data included in the table. If necessary, you can use the SQL Builder button to run Query Builder for visual SQL building.


Managing distribution

This tab is available only for database server version 9.7.

It can be used to define partitioning or the way the data is distributed across multiple database partitions.

CheckBox Replicated across database partitions

If the option is enabled, the data stored in the table is physically replicated on each database partition of the database partition group for the table spaces in which the table is defined. This means that a copy of all of the data in the table exists on each database partition.

Disable the option to distribute data by fields (distribute by hash method will be used). Move the needed fields from Available fields to the Distribute by fields list to form distribution key.

Note that no BLOB, CLOB, DBCLOB, XML and ROW CHANGE TIMESTAMP containing fields can be used as a distribution key.

New MQ table - Managing distribution


Nicknames

A Nickname is an identifier that a federated server uses to refer to a data source table or view.

Creating Nicknames

To create a new nickname:

  • select the Database | New Object... main menu item;
  • select Nickname in the Create New Object dialog;
  • edit nickname properties using the appropriate tabs of Nickname Editor.

Hint: To create a new nickname, you can also right-click the Nicknames node of the DB Explorer tree and select the New Nickname... context menu item.

To create a new nickname with the same properties as one of existing nicknames has:

  • select the Database | Duplicate Object... main menu item;
  • follow the instructions of Duplicate Object Wizard.

Alternatively, you can right-click a nickname in the DB Explorer tree and select the Duplicate Nickname <nickname_name>... context menu item.

Duplicate Object Wizard allows you to select the database to create a new nickname in, and to edit the result SQL statement for creating the nickname.

Editing Nicknames

To edit an existing nickname:

  • select the nickname for editing in the DB Explorer tree (type the first letters of the nickname name for quick search);
  • right-click the object and select the Edit Nickname <nickname_name>... context menu item, or simply double-click the nickname;
  • edit nickname definition using the appropriate tabs of Nickname Editor.

Dropping Nicknames

To drop a nickname:

  • select the nickname to drop in the DB Explorer tree;
  • right-click the object and select the Drop Nickname <nickname_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new nickname;

Ctrl+O to edit the selected nickname;

Shift+Del to drop the object from the database.


Nickname Editor

Nickname Editor allows you to define nickname properties. It opens automatically when you create a new nickname and is available on editing an existing one (see Create Nickname and Edit Nickname for details).

To open a nickname in Nickname Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing nickname
  • Editing object description
  • Viewing DDL definition
  • Browsing object dependencies


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Nickname Editor.

Nickname Editor - Using Navigation bar

The Navigation bar of Nickname Editor allows you to:

Object group

iconDB select a database

select a nickname for editing

General group

iconCompile compile the nickname (if it is being created/modified)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the nickname

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the nickname:

Description group

iconSaveToFile save object description to file

iconLoadFromFile load description text from an external *.txt file

iconCopyToClipboard copy description to clipboard

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of Nickname Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing nickname

Use the Nickname tab of Nickname Editor to create/edit a nickname and specify its definition.

Nickname Editor - Editing nickname definition

Nickname schema

Use the drop-down list to select the schema for the new nickname.

Nickname name

Enter a name for the new nickname. The nickname specifies the federated server's identifier for the object at the data source.

Server properties

Name

Use the drop-down list to select a server that was registered when creating server. This server will be used to access the data for the nickname.

Type

Use the drop-down list to specify the type of the server denoted by Name.

Version

Specifies the version of the server that will be used to access the data for the nickname.

Object properties

Schema

Set the name of the schema for the object used by the nickname.

Name

Specify an identifier to define the remote object name.


Sequences

A Sequence is a database object from which multiple users can generate unique integers. You can use sequences to automatically generate primary key values. When a sequence number is generated, the sequence is incremented, independent of the transaction being committed or rolled back.

If two users concurrently increment the same sequence, then the sequence numbers each user acquires may have gaps, because sequence numbers are being generated by the other user. One user can never acquire the sequence number generated by another user. After a sequence value is generated by one user, that user can continue to access that value regardless of whether the sequence is incremented by another user.

Creating Sequences

To create a new sequence:

  • select the Database | New Object... main menu item;
  • select Sequence in the Create New Object dialog;
  • edit sequence properties using the appropriate tabs of Sequence Editor.

Hint: To create a new sequence, you can also right-click the Sequences node of the DB Explorer tree and select the New Sequence... context menu item.

To create a new sequence with the same properties as one of existing sequences has:

  • select the Database | Duplicate Object... main menu item;
  • follow the instructions of Duplicate Object Wizard.

Alternatively, you can right-click a sequence in the DB Explorer tree and select the Duplicate Sequence <sequence_name>... context menu item.

Duplicate Object Wizard allows you to select the database to create a new sequence in, and to edit the result SQL statement for creating the sequence.

Editing Sequences

To edit an existing sequence:

  • select the sequence for editing in the DB Explorer tree (type the first letters of the sequence name for quick search);
  • right-click the object and select the Edit Sequence <sequence_name>... context menu item, or simply double-click the sequence;
  • edit sequence definition using the appropriate tabs of Sequence Editor.

Dropping Sequences

To drop a sequence:

  • select the sequence to drop in the DB Explorer tree;
  • right-click the object and select the Drop Sequence <sequence_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new sequence;

Ctrl+O to edit the selected sequence;

Shift+Del to drop the object from the database.


Sequence Editor

Sequence Editor allows you to define sequence properties. It opens automatically when you create a new sequence and is available on editing an existing one (see Create Sequence and Edit Sequence for details).

To open a sequence in Sequence Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing sequence
  • Viewing DDL definition


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Sequence Editor.

Sequence Editor - Using Navigation bar

The Navigation bar of Sequence Editor allows you to:

Object group

iconDB select a database

select a sequence for editing

General group

iconCompile compile the sequence (if it is being created)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the sequence

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the sequence:

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of Sequence Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing sequence

Use the Sequence tab of Sequence Editor to create/edit a sequence and specify its definition.

Sequence Editor - Editing sequence definition

Sequence schema

Use the drop-down list to select the schema for the new sequence.

Sequence name

Enter a name for the new sequence.

Start with

Specifies the first value for the sequence. The DEFAULT value is 1.

CheckBox Cycle

Specifies that the Start with sequence values are generated cyclically.

Increment

Specifies the interval between consecutive values of the sequence. The DEFAULT value is 1.

CheckBox Order

Specifies that the sequence numbers are generated in order of request.

Min value

Type in the numeric constant that is the minimum value or select DEFAULT from the drop-down list. The DEFAULT value for an ascending sequence is the Start with value, or 1 if Start with is not specified. For a descending sequence, the DEFAULT value is the minimum value of the data type associated with the sequence.

Max value

Type in the numeric constant that is the maximum value or select DEFAULT from the drop-down list. The DEFAULT value for an ascending sequence is the maximum value of the data type associated with the sequence. For a descending sequence, the value is the START WITH value, or -1 if START WITH is not specified.

Cache

Specify the maximum number of sequence values that are preallocated and kept in memory or select NO CACHE from the drop-down list. The DEFAULT value is 20.

Data type

Use the drop-down list to select the data type to be used for the sequence value.

Restart options

This group of options is available on editing an existing sequence.

Sequence Editor - Editing sequence definition - Restart options

CheckBox Restart sequence

Check this option to modify the next value that will be returned by the sequence object. If the CheckBox Restart with option is unchecked then the sequence is restarted at the value specified as the Start value of the edited sequence. Otherwise, the sequence will be restarted the value specified in the corresponding field. specified value. This value can be any positive or negative value that could be assigned to a column of the data type associated with the sequence, without non-zero digits existing to the right of the decimal point.


UDS Types

A UDS Type is a user-defined (structured) data type that is internally represented as an existing type (its source type), but is considered to be a separate and incompatible type for semantic purposes. A structured type may be a subtype allowing attributes to be inherited from a supertype. A structured type is a user-defined data type containing one or more named attributes, each of which has a data type.

Creating UDS Types

To create a new UDS Type:

  • select the Database | New Object... main menu item;
  • select UDS Type in the Create New Object dialog;
  • edit UDS Type properties using the appropriate tabs of UDS Type Editor.

Hint: To create a new UDS Type, you can also right-click the UDS Types node of the DB Explorer tree and select the New UDS Type... context menu item.

To create a new UDS Type with the same properties as one of existing UDS Types has:

  • select the Database | Duplicate Object... main menu item;
  • follow the instructions of Duplicate Object Wizard.

Alternatively, you can right-click a UDS Type in the DB Explorer tree and select the Duplicate UDS Type <uds_type_name>... context menu item.

Duplicate Object Wizard allows you to select the database to create a new UDS Type in, and to edit the result SQL statement for creating the UDS Type.

Editing UDS Types

To edit an existing UDS Type:

  • select the UDS Type for editing in the DB Explorer tree (type the first letters of the UDS Type name for quick search);
  • right-click the object and select the Edit UDS Type <uds_type_name>... context menu item, or simply double-click the UDS Type;
  • edit UDS Type definition using the appropriate tabs of UDS Type Editor.

Dropping UDS Types

To drop a UDS Type:

  • select the UDS Type to drop in the DB Explorer tree;
  • right-click the object and select the Drop UDS Type <uds_type_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new UDS type;

Ctrl+O to edit the selected UDS type;

Shift+Del to drop the object from the database.


UDS Type Editor

UDS Type Editor allows you to define user-defined (structured) type properties. It opens automatically when you create a new user-defined (structured) type and is available on editing an existing one (see Create UDS type and Edit UDS type for details).

To open a user-defined (structured) type in UDS Type Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing UDS Type
  • Editing object description
  • Attributes
  • Methods
  • Viewing DDL definition
  • Browsing object dependencies


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in UDS Type Editor.

UDS Type Editor - Using Navigation bar

The Navigation bar of UDS Type Editor allows you to:

Object group

iconDB select a database

select a user-defined structured type for editing

General group

iconCompile compile the user-defined structured type (if it is being created/modified)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the user-defined structured type

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the user-defined structured type:

Attributes group

add a new attribute

edit the selected attribute

drop the selected attribute

Methods group

add a new method

edit the selected method

delete the selected method

Description group

iconSaveToFile save object description to file

iconLoadFromFile load description text from an external *.txt file

iconCopyToClipboard copy description to clipboard

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of UDS Type Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing UDS type

Use the Edit tab of UDS Type Editor to create/edit a user-defined structured type and specify its definition.

UDS Type Editor - Editing UDS Type definition

Structured type schema

Use the drop-down list to select the schema for the user-defined structured type.

Name

Enter a name for the new user-defined structured type. Note that the name must not identify any other type (built-in, structured or distinct) already described in the catalog.

Inherits from

Select the source for the new UDS type.

RadioButton Supertype

Supertype schema

Use the drop-down list to select the schema where the source supertype is located.

Supertype name

Use the drop-down list to select the source supertype name.

RadioButton Ref using

Data type

Use the drop-down list to select the built-in data type used as the representation (underlying data type) for the reference type of this structured type and all its subtypes.

Inline length

Use the spinner control to indicate the maximum size (in bytes) of a structured type column instance to store inline with the rest of the values in the row of a table.

Options

CheckBox Instantiable

Determines whether an instance of the structured type can be created.

CheckBox Not final

Indicates that the structured type may be used as a supertype.

CheckBox With function access

Indicates that all methods of this type and its subtypes, including methods created in the future, can be accessed using functional notation.


Attributes

The Attributes tab of UDS Type Editor lists the attributes defined for the structured type.

Use items of the Navigation bar to manage attributes of the UDS Type.

UDS Type Editor - Attributes

The Attribute dialog allows you to add a new or edit an existing attribute of the UDS type.

UDS Type Editor - Attributes - Attribute Editor

Enter the attribute Name and specify the Attribute type: Built-in, User-defined distinct or User-defined structured.


Methods

The Methods tab of UDS Type Editor lists the methods defined for the structured type. Methods enable you to define behaviors for structured types. Methods are routines that extend SQL. In the case of methods, however, the behavior is integrated solely with a particular structured type.

Use items of the Navigation bar to manage methods of the UDS Type.

UDS Type Editor - Methods

The Method Editor dialog allows you to add a new or edit an existing method of the UDS type.

  • Creating/editing method
  • Editing object description
  • Managing parameters
  • Viewing DDL definition

Use the Edit tab of the Method Editor dialog to create/edit a method and specify its definition.

UDS Type Editor - Methods - Method Editor

Method type

Use the drop-down list to select the preferable method type. Possible values are: EXTERNAL, SQL.

Name

Enter a name for the method being defined. Note that the name must be an unqualified SQL identifier.

Specific Name

Provide a unique name for the instance of the method that is being defined. This specific name can be used when creating the method body or dropping the method, but it cannot be used to invoke the method.

External name (for external methods)

Use this field to identify the name of the written code that implements the function.

Environment options

Language

Use this drop-down list to specify the language interface convention to which the user-defined method body is written. This option is available for EXTERNAL methods only. Possible values are: C, JAVA, OLE.

SQL data

Use the drop-down list to indicate what type of SQL statements can be executed. Possible values are: READS SQL DATA, CONTAINS SQL, NO SQL.

Parameter style

Use the drop-down list to specify the conventions used for passing parameters to and returning the value from methods. This option is available for EXTERNAL methods only. Possible values are: SQL, DB2GENERAL.

CheckBox Deterministic

This option specifies whether the method always returns the same results for given argument values (DETERMINISTIC) or whether the method depends on some state values that affect the results (NOT DETERMINISTIC).

CheckBox Fenced

This option specifies whether the method is considered "safe" to run in the database manager operating environment's process or address

space (NOT FENCED), or not (FENCED).

CheckBox Threadsafe

Check this option to specify that the thread-safe mode is enabled for this method.

CheckBox DB information

This option specifies whether certain specific information known by DB2 will be passed to the method as an additional invocation-time argument (DBINFO), or not (NO DBINFO).

CheckBox Scratchpad

This option may be used to specify whether a scratchpad is to be provided for an external method. A scratchpad enables method to save its state from one invocation to the next. The Scratchpad option tells DB2 to allocate and maintain a scratchpad for a routine. The default size for a scratchpad is 100 bytes, but you can determine the size (in bytes) for a scratchpad using the spinner controls.

CheckBox Returns null

This option may be used to avoid a call to the external method if any of the non-subject arguments is NULL.

CheckBox Final call

This option specifies whether a final call is to be made to an external method. The purpose of such a final call is to enable the external method to free any system resources it has acquired.

CheckBox Allow parallel

This option specifies whether, for a single reference to the method, the invocation of the method can be parallelized.

CheckBox External action

This option specifies whether or not the method takes some action that changes the state of an object not managed by the database manager.

External name parts (for external methods only)

This group of options depends on the Language chosen:

  • C

Function Editor - Editing function definition - C External name parts

Library ID or Path ID (for External functions)

Define the library name containing the function. On Windows operating systems, the database manager will look for the function in a directory path that is specified by the LIBPATH or PATH environment variable.

Or you can define the full path name of the file containing the function. On Windows operating systems, for example, 'd:\mylib\myfunc.dll' would cause the database manager to load the dynamic link library, myfunc.dll, from the d:\mylib directory. If an absolute path ID is being used to identify the routine body, be sure to append the *.dll extension.

Function ID (for External functions)

Define the entry point name of the function to be invoked.

  • Java

Function Editor - Editing function definition - Java External name parts

Jar ID

Define the jar identifier given to the jar collection when it was installed in the database. It can be either a simple identifier, or a schema qualified identifier. For example, 'myJar' and 'mySchema.myJar'.

Class ID

Specify the class identifier of the Java object. If the class is part of a package, the class identifier part must include the complete package prefix, for example, 'myPacks.UserFuncs'. On Windows operating systems, the Java virtual machine will look in directory '...\myPacks\UserFuncs\'.

Method ID

Specify the method name of the Java object to be invoked.

  • OLE

Function Editor - Editing function definition - Ole External name parts

Programmatic ID or CLSID

Define the programmatic identifier of the OLE object. It is not interpreted by the database manager but only forwarded to the OLE APIs at run time. The specified OLE object must be creatable and support late binding.

Or define the CLSID - the class identifier of the OLE object to create. It can be used as an alternative for specifying a Programmatic ID in the case that an OLE object is not registered with a Programmatic ID. The CLSID has the form: {nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn} where 'n' is an alphanumeric character. CLSID is not interpreted by the database manager but only forwarded to the OLE APIs at run time.

Method ID

Specify the method name of the OLE object to be invoked.

If SQL is specified as the method type, you can proceed to the SQL tab of the dialog to input SQL statement for the method being defined.

The Parameters tab of the New Method dialog allows you to manage parameters of the method.

UDS Type Editor - Methods - Method Editor - Parameters

Use the iconPlus Add parameter and the iconMinus Remove parameter buttons to manage parameters of the method.

Specify parameter Name and Data type.

If necessary, you can apply filtering for the available data types list by checking the CheckBox Use only SYSTEM datatypes option.

Use the Data type drop-down list below to select the data type to be returned by the function.


UD Types

A User-defined Type is a data type that is not native to the database manager and was created by a user.

Creating UD Types

To create a new UD Type:

  • select the Database | New Object... main menu item;
  • select UD Type in the Create New Object dialog;
  • edit UD Type properties using the appropriate tabs of UD Type Editor.

Hint: To create a new UD Type, you can also right-click the UD Types node of the DB Explorer tree and select the New UD Type... context menu item.

To create a new UD Type with the same properties as one of existing UD Types has:

  • select the Database | Duplicate Object... main menu item;
  • follow the instructions of Duplicate Object Wizard.

Alternatively, you can right-click a UD Type in the DB Explorer tree and select the Duplicate UD Type <ud_type_name>... context menu item.

Duplicate Object Wizard allows you to select the database to create a new UD Type in, and to edit the result SQL statement for creating the UD Type.

Editing UD Types

To edit an existing UD Type:

  • select the UD Type for editing in the DB Explorer tree (type the first letters of the UD Type name for quick search);
  • right-click the object and select the Edit UD Type <ud_type_name>... context menu item, or simply double-click the UD Type;
  • edit UD Type definition using the appropriate tabs of UD Type Editor.

Dropping UD Types

To drop a UD Type:

  • select the UD Type to drop in the DB Explorer tree;
  • right-click the object and select the Drop UD Type <ud_type_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new UD type;

Ctrl+O to edit the selected UD type;

Shift+Del to drop the object from the database.


UD Type Editor

UD Type Editor allows you to define user-defined type properties. It opens automatically when you create a new user-defined type and is available on editing an existing one (see Create UD type and Edit UD type for details).

To open a user-defined type in UD Type Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing UD Type
  • Editing object description
  • Viewing DDL definition
  • Browsing object dependencies


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in UD Type Editor.

UD Type Editor - Using Navigation bar

The Navigation bar of UD Type Editor allows you to:

Object group

iconDB select a database

select a user-defined type for editing

General group

iconCompile compile the user-defined type (if it is being created/modified)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the user-defined type

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the user-defined type:

Description group

iconSaveToFile save object description to file

iconLoadFromFile load description text from an external *.txt file

iconCopyToClipboard copy description to clipboard

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of UD Type Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing UD type

Use the Edit tab of UD Type Editor to create/edit a user-defined type and specify its definition.

UD Type Editor - Editing UD Type definition

Name

Enter a name for the new user-defined type.

Schema

Use the drop-down list to select the schema for the UD type.

Subtype

This drop-down list allows you to select the object subtype.

Depending on the Subtype list selection the different set of options will be available below.

Distinct

A distinct type is a user-defined data type that shares its internal representation with an existing type (its "source" type), but is considered to be a separate and incompatible type for most operations. For example, one might want to define a picture type, a text type, and an audio type, all of which have quite different semantics, but which use the built-in data type BLOB for their internal representation.

Use built-in type

Select this mode to create UD type based on a built-in type.

Use the drop-down list to select the built-in data type to be used as the basis for the new user-defined type.

If necessary, specify the Size and Scale for the user-defined type.

Use anchored type

Select this mode to create UD type based on a type of the selected column.

Use the Schema, Object type, Source object and Column drop-down lists to define anchored type.

Cursor

A user-defined cursor type with an associated row type is a strongly-typed cursor type; otherwise, it is a weakly-typed cursor type. A value of a user-defined cursor type represents a reference to an underlying cursor.

UD Type Editor - Editing Cursor UD Type definition

Use anchored type

Use the Schema, Object type, Source object and Column drop-down lists to define anchored type.

Array

A user-defined array type is a data type that is defined as an array with elements of another data type. Every ordinary array type has an index with the data type of INTEGER and has a defined maximum cardinality. Every associative array has an index with the data type of INTEGER or VARCHAR and does not have a defined maximum cardinality.

UD Type Editor - Editing Array UD Type definition

Use built-in type

Select this mode to create UD type based on a built-in type.

Use the drop-down list to select the built-in data type to be used as the basis for the new user-defined type.

If necessary, specify the Size and Scale for the user-defined type.

Use anchored type

Use the Schema, Object type, Source object and Column drop-down lists to define anchored type.

CheckBox Row of object

Enable the option to create a row type based on the table or view column names and column data types.

Array size

This section allows you to define the array type size.

Array size can be defined using Integer constant, Data type or Anchored type. Select the needed option within the Get size from drop-down list.

Integer constant

If this option is selected, then you need to define array size at the corresponding field.

Data type

This option specifies that the type is an associative array that is indexed with values of the selected data type ( RadioButton Integer or RadioButton Varchar).

Anchored type

Use this option to define the UD array type size within the anchored data type selected below.

Row

A row type is a data type that is defined as an ordered sequence of named fields, each with an associated data type, which effectively represents a row. A row type can be used as the data type for variables and parameters in PL/SQL to provide simple manipulation of a row of data.

UD Type Editor - Editing Row UD Type definition

Row user-defined type can be based on a set of manually defined fields or an anchored type.

RadioButton Define fields

Use the context menu to manage fields. You can btnAddField Insert, btnEditField Edit or btnDeleteField Drop a field.

UD Type Editor - Editing Row UD Type definition - Field Editor

Field type can be defined using a RadioButton built-in type or an RadioButton anchored type.

RadioButton Use anchored type

Use the Schema, Object type, Source object and Column drop-down lists to define anchored type on which the row UD type will be based.


Packages

The Package is an encapsulated collection of related routines stored together in the database as a control structure that is used to execute SQL statements.

Creating Packages

To create a new package:

  • select the Database | New Object... main menu item;
  • select Package in the Create New Object dialog;
  • edit package properties using the appropriate tabs of Package Editor.

Hint: To create a new package, you can also right-click the Packages node of the DB Explorer tree and select the New Package... context menu item.

To create a new package with the same properties as one of existing packages has:

  • select the Database | Duplicate Object... main menu item;
  • follow the instructions of Duplicate Object Wizard.

Alternatively, you can right-click a package in the DB Explorer tree and select the Duplicate Package <package_name>... context menu item.

Duplicate Object Wizard allows you to select the database to create a new package in, and to edit the result SQL statement for creating the package.

Editing Packages

To edit an existing package:

  • select the package for editing in the DB Explorer tree (type the first letters of the package name for quick search);
  • right-click the object and select the Edit Package <package_name>... context menu item, or simply double-click the package;
  • edit package definition using the appropriate tabs of Package Editor.

Dropping Packages

To drop a package:

  • select the package to drop in the DB Explorer tree;
  • right-click the object and select the Drop Package <package_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new package;

Ctrl+O to edit the selected package;

Shift+Del to drop the object from the database.


Package Editor

Package Editor allows you to define package properties. It opens when you create a new package or edit an existing one (see Create Package and Edit Package for details).

To open a package in Package Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing package
  • Editing object description


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Package Editor.

Package Editor - Using Navigation bar

The Navigation bar of Package Editor allows you to:

Object group

iconDB select a database

select a package for editing

General group

iconCompile compile the package (if it is being created/modified)

iconRefresh refresh the content of the active tab

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the package:

Description group

iconSaveToFile save object description to file

iconLoadFromFile load description text from an external *.txt file

iconCopyToClipboard copy description to clipboard

Items of the Navigation bar are also available on the ToolBar of Package Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing package

Use the Package tab of Package Editor to create/edit a package and specify its definition.

Package Editor - Editing package definition

Package schema

Use the drop-down list to select the schema for the new package.

Package name

Indicates the package name (if applied). This field is read-only as the package name is set by the server.

Specify whether you need to RadioButton Bind (rebind) or RadioButton Compile the package.

Version

If necessary, specify the package version or select CheckBox Generate version number automatically.

Qualifier

Use the drop-down list of users to select an implicit qualifier for unqualified objects contained in the package. The default is the owner's authorization ID, whether or not owner is explicitly specified.

Owner

Select the authorization identifier for the package owner from the list of users. The owner must have the privileges required to execute the SQL statements contained in the package.

Action

Add

Indicates that the named package does not exist, and that a new package is to be created.

Replace

Indicates that the existing package is to be replaced by a new one with the same package name and creator.

If no action is specified then the new package will be created.

Options

Date/time format

Specify the date and time format to be used. Possible values are: Default, USA, EUR, ISO, JIS, Local.

Degree

Specify the degree of parallelism for the execution of static SQL statements. Possible values are: 1 (no parallelism), Any.

Blocking

Specifies the type of row blocking for cursors. Possible values are: No, Unambiguous, All.

Perform on error

Select the action to be performed on error: No package, Continue, Check.

Return warnings

Use this option to enable/disable warnings.

Buffered Inserts

Use this option to enable/disable buffered inserts for the package.

Explain snapshot

Specify whether Explain Snapshot information are to be stored in the Explain tables.

Dynamic rules

Specify the dynamic rules to be applied to the package: Bind, Define bind, Define run, Invoke bind, Invoke run, Run.

Validation

Determines when the database manager checks for authorization errors and object not found errors. The package owner authorization ID is used for validity checking.

Bind

Validation is performed at precompile/bind time.

Run

Validation is performed at runtime.

Isolation level

Determines how far a program bound to this package can be isolated from the effect of other executing programs.

Explain plan

Specify whether information about the access plans chosen for each SQL statement in the package is to be stored in the Explain tables.

Optimize level

Define optimization level for the package. Possible values are 0-9.

Access plan reuse

The option indicates whether the query compiler should attempt to reuse the access plans for static statements in the package during future implicit and explicit rebinds. The option is available from version 9.7.

Function path

Specify the function path to be used in resolving user-defined distinct types and functions in static SQL.

Message file

Type in or use the ExplorerButton button to specify the destination for warning, error, and completion status messages. A message file is created whether the bind is successful or not.

File name

Type in or use the ExplorerButton button to specify the name of the bind file that was generated when the application program was precompiled, or a list file containing the names of several bind *.bnd files. The full path name can be specified.

CheckBox Use optimization profile

Use this section to associate the optimization profile with the package.

The option is available from version 9.7.

If necessary, you can Rebind package using the corresponding button below. This command allows the user to recreate a package stored in the database without the need for a bind file.


Triggers

A Trigger is an object in the database that is invoked indirectly by the database manager when a particular SQL statement is run.

Creating Triggers

To create a new trigger:

  • select the Database | New Object... main menu item;
  • select Trigger in the Create New Object dialog;
  • edit trigger properties using the appropriate tabs of Trigger Editor.

Hint: To create a new trigger, you can also right-click the Triggers node of the DB Explorer tree and select the New Trigger... context menu item.

To create a new trigger with the same properties as one of existing triggers has:

  • select the Database | Duplicate Object... main menu item;
  • follow the instructions of Duplicate Object Wizard.

Alternatively, you can right-click a trigger in the DB Explorer tree and select the Duplicate Trigger <trigger_name>... context menu item.

Duplicate Object Wizard allows you to select the database to create a new trigger in, and to edit the result SQL statement for creating the trigger.

Editing Triggers

To edit an existing trigger:

  • select the trigger for editing in the DB Explorer tree (type the first letters of the trigger name for quick search);
  • right-click the object and select the Edit Trigger <trigger_name>... context menu item, or simply double-click the trigger;
  • edit trigger definition using the appropriate tabs of Trigger Editor.

Dropping Triggers

To drop a trigger:

  • select the trigger to drop in the DB Explorer tree;
  • right-click the object and select the Drop Trigger <trigger_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new trigger;

Ctrl+O to edit the selected trigger;

Shift+Del to drop the object from the database.


Trigger Editor

Trigger Editor allows you to define trigger properties. It opens when you create a new trigger or edit an existing one (see Create trigger and Edit trigger for details).

To open a trigger in Trigger Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing trigger
  • Editing object description
  • Viewing DDL definition


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Trigger Editor.

Trigger Editor - Using Navigation bar

The Navigation bar of Trigger Editor allows you to:

Object group

iconDB select a database

select a trigger for editing

General group

iconCompile compile the trigger (if it is being created/modified)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the trigger

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the trigger:

Description group

iconSaveToFile save object description to file

iconLoadFromFile load description text from an external *.txt file

iconCopyToClipboard copy description to clipboard

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of Trigger Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing trigger

Trigger Editor allows you to set properties for a new trigger or edit an existing trigger.

Trigger Editor - Editing trigger definition - Properties

Use the Schema name drop-down list to select the database schema for the trigger.

Use the Trigger name edit box to set the trigger name. Note that the name of the trigger must be unique among all the trigger names in the schema.

Select the trigger type (Before, After, Instead of), the schema name and the object of the schema to apply to trigger to, set apply and event modes, and select fields for update.

Update fields

To select a field for updating, you need to move it from the Available fields list to the Included fields list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the fields from one list to another.

Trigger Editor - Editing trigger definition - WHEN clause

Specify the WHEN clause and the referencing transitional items using the corresponding tabs of Trigger Editor.

Trigger Editor - Editing trigger definition - Referencing

Transition variables (rows) are used to refer to the values of columns in each updated row of the subject table.

The are two types of transition variables are:

  • Old transition variables capture the values of columns before the triggering SQL statement updates them. You can define old transition variables for update and delete triggers.
  • New transition variables capture the values of columns after the triggering SQL statement updates them. You can define new transition variables for update and insert triggers.

If you want to refer to the entire set of rows that a triggering SQL statement modifies, rather than to individual rows, use a transition table. The two types of transition tables are:

  • Old transition tables capture the values of columns before the triggering SQL statement updates them. You can define old transition tables for update and delete triggers.
  • New transition tables capture the values of columns after the triggering SQL statement updates them. You can define new transition variables for update and insert triggers.

Triggered SQL statement

This area allows you to set the trigger actions. The trigger actions take effect when the DML operation is performed.


Indexes

An Index is a schema object that contains an entry for each value that appears in the indexed column(s) of the table, provides quick access to data and can enforce uniqueness on the rows in the table.

Creating Indexes

To create a new index:

  • select the Database | New Object... main menu item;
  • select Index in the Create New Object dialog;
  • edit index properties using the appropriate tabs of Index Editor.

Hint: To create a new index, you can also right-click the Indexes node of the DB Explorer tree and select the New Index... context menu item.

To create a new index with the same properties as one of existing indices has:

  • select the Database | Duplicate Object... main menu item;
  • follow the instructions of Duplicate Object Wizard.

Alternatively, you can right-click an index in the DB Explorer tree and select the Duplicate Index <index_name>... context menu item.

Duplicate Object Wizard allows you to select the database to create a new index in, and to edit the result SQL statement for creating the index.

Editing Indexes

To edit an existing index:

  • select the index for editing in the DB Explorer tree (type the first letters of the index name for quick search);
  • right-click the object and select the Edit Index <index_name>... context menu item, or simply double-click the index;
  • edit index definition using the appropriate tabs of Index Editor.

Dropping Indexes

To drop an index:

  • select the index to drop in the DB Explorer tree;
  • right-click the object and select the Drop Index <index_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new index;

Ctrl+O to edit the selected index;

Shift+Del to drop the object from the database.


Index Editor

The Index Editor dialog allows you to add/edit index properties.

To open the dialog, select the Database | New object... main menu item to open the New Object dialog, or open Table Editor, proceed to the indexes tab there and double-click an index to edit.

Use the Schema drop-down list to select the database schema for the index.

Use the Index Name edit box to set the index name. Note that the name of the index must be unique among all names of the index or index specifications described in the catalog.

Use the Table Name drop-down list to select the database table for which the index is created.

The Fields for index area allows you to select indexed fields.

To select a field, you need to move it from the Available fields list to the Selected fields list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the fields from one list to another.

Index properties

CheckBox Unique

This option determines uniqueness of the index, causes the system to check for duplicate values in the table when the index is created (if data already exist) and each time data is added.

CheckBox Collect statistics

Use this option to define if basic index statistics are to be collected during index creation.

CheckBox Detailed

Specifies that extended index statistics are also to be collected during index creation.

CheckBox Sampled

Specifies that sampling can be used when compiling extended index statistics.

CheckBox Cluster

Specifies that the index is the clustering index of the table.

CheckBox Allow reverse scan

Specifies that an index can support both forward and reverse scans; that is, scanning of the index in the order that was defined at index creation time, and scanning in the opposite order.

PCT Free

Specifies what percentage of each index page to leave as free space when building the index.

Min PCT used

Indicates whether index leaf pages are merged online, and the threshold for the minimum percentage of space used on an index leaf page.

Level 2 PCT

Specifies what percentage of each index level 2 page to leave as free space when building the index.

CheckBox Compress

The option specifies whether index compression is enabled.

Page split

Specifies an index split behavior:

SYMMETRIC

Specifies that pages are to be split roughly in the middle.

HIGH | LOW

Specifies an index page split behavior that uses the space on index pages efficiently when the values of the index keys being inserted follow a particular pattern. For a subset of index key values, the leftmost column or columns of the index must contain the same value, and the rightmost column or columns of the index must contain values that increase (if HIGH) or decrease (if LOW) with each insertion.

In tablespace

Specifies the table space in which the index is to be created.


SQL Variables

The SQL Variable is a global variable used to store the results of intermediate calculations or queries. Global variables have a session scope. This means that, although they are available to all sessions that are active on the database, their value is private for each session.

Creating SQL Variables

To create a new SQL variable:

  • select the Database | New Object... main menu item;
  • select SQL Variable in the Create New Object dialog;
  • edit SQL variable properties using the appropriate tabs of SQL Variable Editor.

Hint: To create a new SQL variable, you can also right-click the SQL Variables node of the DB Explorer tree and select the New SQL Variable... context menu item.

To create a new SQL variable with the same properties as one of existing SQL variables has:

  • select the Database | Duplicate Object... main menu item;
  • follow the instructions of Duplicate Object Wizard.

Alternatively, you can right-click a SQL variable in the DB Explorer tree and select the Duplicate SQL Variable<SQL_variable_name>... context menu item.

Duplicate Object Wizard allows you to select the database to create a new SQL variable in, and to edit the result SQL statement for creating the SQL variable.

Editing SQL Variables

To edit an existing SQL variable:

  • select the SQL variable for editing in the DB Explorer tree (type the first letters of the SQL variable name for quick search);
  • right-click the object and select the Edit SQL Variable <SQL_variable_name>... context menu item, or simply double-click the SQL variable;
  • edit SQL variable definition using the appropriate tabs of SQL Variable Editor.

Dropping SQL Variables

To drop a SQL variable:

  • select the SQL variable to drop in the DB Explorer tree;
  • right-click the object and select the Drop SQL Variable <SQL_variable_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new SQL variable;

Ctrl+O to edit the selected SQL variable;

Shift+Del to drop the object from the database.


SQL Variable Editor

SQL Variable Editor allows you to define SQL variable properties. It opens when you create a new SQL variable or edit an existing one (see Create SQL variable and Edit SQL variable for details).

To open a SQL variable in SQL Variable Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing SQL Variable
  • Editing object description
  • Viewing DDL definition


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in SQL Variable Editor.

SQL Variable Editor - Using Navigation bar

The Navigation bar of SQL Variable Editor allows you to:

Object group

iconDB select a database

select a SQL variable for editing

General group

iconCompile compile the SQL variable (if it is being created/modified)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the SQL variable

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the SQL variable:

Description group

iconSaveToFile save object description to file

iconLoadFromFile load description text from an external *.txt file

iconCopyToClipboard copy description to clipboard

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of SQL Variable Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing SQL variable

Use the Edit tab of SQL Variable Editor to create/edit a SQL variable and specify its definition.

SQL Variable Editor - Editing SQL Variable definition

Schema

Use the drop-down list to select the schema for the new SQL variable.

Name

Indicates the SQL variable name.

RadioButton Built-in type

Specifies a built-in data type (note that CLOB, DBCLOB, BLOB, LONG VARCHAR, LONG VARGRAPHIC, XML, ARRAY, or structured types cannot be specified for global variables).

Data type

Specify the data type of the global variable.

CheckBox For bit data

Can be specified as part of character string data types.

RadioButton Distinct type

Specifies a distinct type. The length, precision, and scale of the global variable are, respectively, the length, precision, and scale of the source of the distinct type. Then select the Distinct type schema and Distinct type name.

RadioButton Ref using

Specifies a reference type. The length, precision, and scale of the global variable are, respectively, the length, precision, and scale of the source of the reference type. Then select the Reference type schema and Reference type name.

Default value

Specifies a default value for the global variable. The value can be:

RadioButton NULL

RadioButton global variable (select one from the drop-down list)

RadioButton expression (specify one in the editable area)


Global Temporary Tables

A Global Temporary Table is a schema object that is useful for intermediate or temporary data processing. This object is available only for database server version 9.7 and higher.

Creating Global Temporary Tables

To create a new global temporary table:

  • select the Database | New Object... main menu item;
  • select Global Temporary Table in the Create New Object dialog;
  • edit global temporary table properties using the appropriate tabs of Global Temporary Table Editor.

Hint: To create a new global temporary table, you can also right-click the Global Temporary Tables node of the DB Explorer tree and select the New Global Temporary Table... context menu item.

To create a new global temporary table with the same properties as one of existing Global Temporary Tables has:

  • select the Database | Duplicate Object... main menu item;
  • follow the instructions of Duplicate Object Wizard.

Alternatively, you can right-click an global temporary table in the DB Explorer tree and select the Duplicate Global Temporary Table <global temporary table_name>... context menu item.

Duplicate Object Wizard allows you to select the database to create a new global temporary table in, and to edit the result SQL statement for creating the global temporary table.

Editing Global Temporary Tables

To edit an existing global temporary table:

  • select the global temporary table for editing in the DB Explorer tree (type the first letters of the global temporary table name for quick search);
  • right-click the object and select the Edit Global Temporary Table <global temporary table_name>... context menu item, or simply double-click the global temporary table;
  • edit global temporary table definition using the appropriate tabs of Global Temporary Table Editor.

Dropping Global Temporary Tables

To drop an global temporary table:

  • select the global temporary table to drop in the DB Explorer tree;
  • right-click the object and select the Drop Global Temporary Table <global temporary table_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new global temporary table;

Ctrl+O to edit the selected global temporary table;

Shift+Del to drop the object from the database.


Global Temporary Table Editor

Global Temporary Table editor allows you to define Global Temporary Table properties. It opens when you create a new global temporary table or edit an existing one (see Create Global Temporary Table and Edit Global Temporary Table for details).

To open a global temporary table in Global Temporary Table Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing global temporary table
  • Managing Fields
  • Managing Distribution
  • Viewing DDL definition


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Global Temporary Table Editor.

Global Temporary Table Editor - Using Navigation bar

The Navigation bar of Global Temporary Table Editor allows you to:

Object group

iconDB select a database

select a global temporary table for editing

General group

iconCompile compile the newly created global temporary table

iconPrint print metadata of the Global Temporary Table

run Query Builder for visual SQL building

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the table:

Fields group

add a new field

edit selected field

drop selected field(s)

Indexes group

add a new index

edit selected index

drop selected index(-es)

Triggers group

add a new trigger

edit selected trigger

drop selected trigger(s)

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of Table Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing global temporary table

Use the Edit tab of Global Temporary Table Editor to create/edit a Global Temporary Table and specify its definition.

Global Temporary Table Editor - Editing Global Temporary Table Definition

Schema

Use the drop-down list to select a schema for the new Global Temporary Table.

Name

Enter a name for the new table. Note that the name must not identify a table, view or alias described in the catalog.

Tablespace

Use the drop-down list to identify the table space where the global temporary table will be created.

CheckBox Not logged

Enable this option to specify that insert, update, or delete operations against the table are not to be logged, but that the creation or dropping of the table is to be logged.

If the option is disabled, then insert, update, or delete operations against the table as well

as the creation or dropping of the table are to be logged. In this case the On rollback section is disabled.

On rollback

This section specifies the action that is to be taken on the not logged created temporary table when a ROLLBACK (or ROLLBACK TO SAVEPOINT) operation is performed.

RadioButton Delete rows

If the table data has been changed, all the rows will be deleted.

RadioButton Preserve rows

Rows of the table will be preserved.

On commit

Use this section to specify the action taken on the created temporary table when a COMMIT operation is performed. The default is DELETE ROWS.

RadioButton Delete rows

All rows of the table will be deleted if no WITH HOLD cursor is open on the table.

RadioButton Preserve rows

Rows of the table will be preserved.

Fields definition

Within this section you need to specify the way fields should be defined.

RadioButton Define manually

Fields will be defined manually within the Fields tab.

RadioButton From another table or view

Fields definition will be taken from the selected table or view.

Source schema

Select source object schema from the drop-down list.

Source object

Use this drop-down list to select a table or view whose field definition will be used in this global temporary table.

RadioButton From full select

Fields will be defined with a custom SQL query. Use the [image] Build SQL button situated on the navigation bar to create a query within Visual Query Builder or just define the query in the text area at the bottom of the window.

Column defaults

RadioButton Include

Column defaults for each updatable column of the source result table definition are copied. Columns that are not updatable will not have a default defined in the corresponding column of the created table.

RadioButton Exclude

Column defaults are not copied from the source result table definition.

Column attributes

RadioButton Include

If available, identity column attributes are copied from the source’s result table definition.

RadioButton Exclude

Identity column attributes are not copied from the source result table definition.

When you edit a global temporary table, the indexes, Triggers, Data and Dependencies tabs become available. You can see the description of this tabs in the following topics:

Index Editor

Trigger Editor

Working with table data

Browsing object dependencies


Managing fields

This tab allows you to view/edit global temporary table fields definition. It contains the list of defined fields.

Editing fields is allowed when Define manually option is selected at the Field definition section of the editor.

Use the context menu to add/edit or drop field.

Global Temporary Table Editor - Fields

You can find more information about editing fields in the Field editor topic.


Managing distribution

Use this tab to define parameters for data distribution across database partitions.

Move the needed fields from Available fields to the Distribute by fields list to form distribution key.

Note that no BLOB, CLOB, DBCLOB, XML and ROW CHANGE TIMESTAMP containing fields can be used as a distribution key.

Global Temporary Table - Managing distribution


Modules

The Module is a schema object that is intended to be a collection of other database objects. This object is available only for database server version 9.7 and higher.

Creating Modules

To create a new SQL variable:

  • select the Database | New Object... main menu item;
  • select Module in the Create New Object dialog;
  • edit SQL variable properties using the appropriate tabs of Module Editor.

Hint: To create a new SQL variable, you can also right-click the Modules node of the DB Explorer tree and select the New Module... context menu item.

To create a new SQL variable with the same properties as one of existing SQL variables has:

  • select the Database | Duplicate Object... main menu item;
  • follow the instructions of Duplicate Object Wizard.

Alternatively, you can right-click a SQL variable in the DB Explorer tree and select the Duplicate Module<module_name>... context menu item.

Duplicate Object Wizard allows you to select the database to create a new SQL variable in, and to edit the result SQL statement for creating the SQL variable.

Editing Modules

To edit an existing SQL variable:

  • select the SQL variable for editing in the DB Explorer tree (type the first letters of the SQL variable name for quick search);
  • right-click the object and select the Edit Module <module_name>... context menu item, or simply double-click the SQL variable;
  • edit SQL variable definition using the appropriate tabs of Module Editor.

Dropping Modules

To drop a SQL variable:

  • select the SQL variable to drop in the DB Explorer tree;
  • right-click the object and select the Drop Module <module_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new module;

Ctrl+O to edit the selected module;

Shift+Del to drop the object from the database.


Module Editor

Module editor allows you to define module properties. It opens when you create a module or edit an existing one (see Create Module and Edit Module for details).

To open a module in Module Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • New Module
  • Editing Module
  • Editing object description
  • Viewing DDL definition


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Module Editor.

Module Editor - Using Navigation bar

The Navigation bar of Module Editor allows you to:

Object group

iconDB select a database

select a module for editing

General group

iconCompile compile the module (if it is being created)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the user-defined type

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the module type:

Description group

iconSaveToFile save object description to file

iconLoadFromFile load description text from an external *.txt file

iconCopyToClipboard copy description to clipboard

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Conditions/SQL Variables/Procedures/Functions/Types group

iconPlus add object to the module

iconPublish publish object

iconMinus remove selected object

Items of the Navigation bar are also available on the ToolBar of Module. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


New module

Use the Edit tab of Module Editor to create a Module and specify its definition.

Module - New Module

Module schema

Select a parent schema for the created module.

Module name

Specify the module name.


Editing module

This how Module Editor looks when an existing module is opened.

Module - Editing Module

Module name and Module schema fields contain module name and its parent schema correspondingly and can't be modified.

The Edit tab of the wizard consists of five tabs: Conditions, Variables, Procedures, Functions, Types.

Select a tab to manage corresponding module object.

Context menu allows you to iconPlus Add, iconPublish Publish or iconMinus Delete an object.

Use the iconPlus Add item to add an object to the module.

Use the iconPublish Publish item to add a new object to the module and make it available for use outside the module.

Use the iconMinus Delete item to remove selected object from the module.

When you add or publish an object, the corresponding editor appears. Topics listed below provide you with necessary information about these editors:

Creating/editing SQL Variable

Creating/editing procedure

Creating/editing function

Creating/editing UD Type

Condition

You can define conditions, that can be used by module functions.

Module - Conditions

Condition name

Define the name of the condition. The name must not identify an existing condition in the module.

SQL state

Specify the SQLSTATE that is associated with the condition. The string-constant must be specified as five characters and must not be '00'.


Non-schema Objects

Other types of objects are also stored in the database and can be created and manipulated with SQL but are not contained in a schema:

  • Table spaces
  • Buffer Pools
  • Partition Groups
  • Event Monitors
  • Wrappers
  • Users
  • Groups
  • User Mappings
  • Servers
  • Roles
  • Trusted Contexts
  • Audit Policies
  • Security Label Components
  • Security Policies
  • Security Labels
  • Local scripts
  • Shared scripts

Use the DB Explorer tree to navigate within the database(s) and the objects.

See also:

Operations with database objects

New Object dialog

Duplicate Object Wizard

Schemas

Schema Objects


Table spaces

A Table space is an abstraction of a collection of containers into which database objects are stored. A table space provides a level of indirection between a database and the tables stored within the database.

Creating Table spaces

To create a new table space:

  • select the Database | New Object... main menu item;
  • select Tablespace in the Create New Object dialog;
  • edit table space properties using the appropriate tabs of Tablespace Editor.

Hint: To create a new table space, you can also right-click the Tablespaces node of the DB Explorer tree and select the New Tablespace... context menu item.

Editing Table spaces

To edit an existing table space:

  • select the table space for editing in the DB Explorer tree (type the first letters of the table space name for quick search);
  • right-click the object and select the Edit Tablespace <tablespace_name>... context menu item, or simply double-click the table space;
  • edit table space definition using the appropriate tabs of Tablespace Editor.

Dropping Table spaces

To drop a table space:

  • select the table space to drop in the DB Explorer tree;
  • right-click the object and select the Drop Tablespace <tablespace_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new table space;

Ctrl+O to edit the selected table space;

Shift+Del to drop the object from the database.


Tablespace Editor

Tablespace Editor allows you to define table space properties. It opens automatically when you create a new table space and is available on editing an existing one (see Create table space and Edit table space for details).

To open a table space in Tablespace Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing table space
  • Managing containers
  • Editing object description
  • Viewing DDL definition


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Tablespace Editor.

Tablespace Editor - Using Navigation bar

The Navigation bar of Tablespace Editor allows you to:

Object group

iconDB select a database

select a table space for editing

General group

iconCompile compile the table space (if it is being created/modified)

iconRefresh refresh the content of the active tab

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the table space:

Containers group

add a container

edit the selected container

delete the selected container

Description group

iconSaveToFile save object description to file

iconLoadFromFile load description text from an external *.txt file

iconCopyToClipboard copy description to clipboard

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of Tablespace Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing table space

Use the Property tab of Tablespace Editor to create/edit a table space and specify its definition.

Tablespace Editor - Editing tablespace definition

Tablespace name

Enter a name for the new table space (this is a one-part name).

CheckBox Dropped table recovery

Use this option if you wish to recover dropped tables in the specified table space (with the RECOVER TABLE ON option of the ROLLFORWARD command used). This option is only available for a REGULAR table space.

Type of data in tablespaces

RadioButton Regular

If this type is selected, all data except for temporary tables are stored in the table space.

RadioButton Large

If this type is selected, long or LOB table columns and structured type columns or index data are stored in the table space.

RadioButton System temporary

If this type is selected, temporary tables (work areas used by the database manager to perform operations such as sorts or joins) are stored in the table space.

RadioButton User temporary

If this type is selected, declared global temporary tables are stored in the table space.

Managed by...

RadioButton System

If this option is selected, the table space will be a system managed space (SMS) table space.

RadioButton Database

If this option is selected, the table space will be a database managed space (DMS) table space.

Page size dependent options

Define the Page size and the Buffer pool values for the table space.

Page size

Define the size of pages used for the table space. The valid values are 4, 8, 16, 9 or 32.

Bufferpool

The name of the buffer pool used for tables in this table space. If the buffer pool is not specified, the default buffer pool (IBMDEFAULTBP) is used. The page size of the buffer pool must match the page size specified (or defaulted) for the table space.

Extent size dependent options

Define the Extent size and the Prefetch size values (in pages, kilobytes, megabytes or gigabytes) for the table space.

Extent size

Specify the number of PAGESIZE pages that will be written to a container before skipping to the next container.

Prefetch size

Specifies the number of PAGESIZE pages that will be read from the table space when data prefetching is being performed.

I/O cost estimate

Define the Transfer rate and the Overhead values (in milliseconds) for the table space.

Transfer rate

Enter any numeric literal (integer, decimal, or floating point) that specifies the time to read one page into memory, in milliseconds. The number should be an average for all containers that belong to the table space, if not the same for all containers.

Overhead

Enter any numeric literal (integer, decimal, or floating point) that specifies the I/O controller overhead and disk seek and latency time, in milliseconds. The number should be an average for all containers that belong to the table space, if not the same for all containers.


Managing containers

Use the Containers tab to manage containers of the table space.

Database partition group

Use the drop-down list to specify the database partition group for the table space.

Use the iconPlus Add, Edit and iconMinus Del buttons to manage the list of containers of the table space.

Tablespace Editor - Managing containers

The New Container dialog allows you to identify one or more containers that will belong to the table space and in which the data of the table space will be stored.

Tablespace Editor - Managing containers - New container

Container string

Type in or use the ExplorerButton button to set an absolute or relative directory name as the container string. The directory name, if not absolute, is relative to the database directory.

Specify the type and size (in pages) for the container.


Buffer Pools

A Buffer pool is the main storage that is reserved to satisfy the buffering requirements for one or more table spaces or indexes.

Creating Buffer Pools

To create a new buffer pool:

  • select the Database | New Object... main menu item;
  • select Buffer pool in the Create New Object dialog;
  • edit buffer pool properties using the appropriate tabs of Buffer Pool Editor.

Hint: To create a new buffer pool, you can also right-click the Buffer pools node of the DB Explorer tree and select the New Buffer pool... context menu item.

To create a new buffer pool with the same properties as one of existing buffer pools has:

  • select the Database | Duplicate Object... main menu item;
  • follow the instructions of Duplicate Object Wizard.

Alternatively, you can right-click a buffer pool in the DB Explorer tree and select the Duplicate Buffer pool <buffer_pool_name>... context menu item.

Duplicate Object Wizard allows you to select the database to create a new buffer pool in, and to edit the result SQL statement for creating the buffer pool.

Editing Buffer Pools

To edit an existing buffer pool:

  • select the buffer pool for editing in the DB Explorer tree (type the first letters of the buffer pool name for quick search);
  • right-click the object and select the Edit Buffer pool <buffer_pool_name>... context menu item, or simply double-click the buffer pool;
  • edit buffer pool definition using the appropriate tabs of Buffer Pool Editor.

Dropping Buffer Pools

To drop a buffer pool:

  • select the buffer pool to drop in the DB Explorer tree;
  • right-click the object and select the Drop Buffer pool <buffer_pool_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new buffer pool;

Ctrl+O to edit the selected buffer pool;

Shift+Del to drop the object from the database.


Buffer Pool Editor

Buffer Pool Editor allows you to define buffer pool properties. It opens automatically when you create a new buffer pool and is available on editing an existing one (see Create buffer pool and Edit buffer pool for details).

To open a buffer pool in Buffer Pool Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing buffer pool
  • Browsing object dependencies
  • Viewing DDL definition


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Buffer Pool Editor.

Buffer Pool Editor - Using Navigation bar

The Navigation bar of Buffer Pool Editor allows you to:

Object group

iconDB select a database

select a buffer pool for editing

General group

iconCompile compile the buffer pool (if it is being created/modified)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the buffer pool

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the buffer pool:

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of Buffer Pool Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing buffer pool

Use the Buffer Pool tab of Buffer Pool Editor to create/edit a buffer pool and specify its definition.

Buffer Pool Editor - Editing buffer pool definition

Buffer pool name

Enter a name for the new buffer pool (this is a one-part name).

Page size

Use the drop-down list to define the size of pages used for the buffer pool. Possible values are: 4096, 8192, 16384 or 32768.

Buffer pool size

Number of pages

Specify the size of the buffer pool as the number of pages. In a partitioned database, this will be the default size for all partitions where the buffer pool exists.

Number of blocked pages

Specify the number of pages that should exist in the block-based area. Note that the number of pages must not be greater than 98 per cent of the number of pages for the buffer pool.

Pages per block

Specify the number of pages in each block. The block size value must be between 2 and 256.

Exceptions

This area lists the partition(s) for which the size of the buffer pool will be different than the default.

CheckBox All database partitions

Check this option to assign all available database partitions to the buffer pool.

CheckBox Create/Alter buffer pool immediately

If this option is checked, the buffer pool will be created/altered immediately (depending on whether the object is being created or edited).

CheckBox Use extended storage

If this option is enabled, pages that are being excluded from this buffer pool will be cached in extended storage.

Partition groups

This area allows you to specify partition group(s) for the buffer pool.

To select a partition group, you need to move it from the Available database partition groups list to the Database partition groups in buffer pool list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the partition groups from one list to another.


Partition Groups

A Partition group is a set of database partitions that can be created within the database.

Creating Partition Groups

To create a new partition group:

  • select the Database | New Object... main menu item;
  • select Partition Group in the Create New Object dialog;
  • edit partition group properties using the appropriate tabs of Partition Group Editor.

Hint: To create a new partition group, you can also right-click the Partition Groups node of the DB Explorer tree and select the New Partition Group... context menu item.

To create a new partition group with the same properties as one of existing partition groups has:

  • select the Database | Duplicate Object... main menu item;
  • follow the instructions of Duplicate Object Wizard.

Alternatively, you can right-click a partition group in the DB Explorer tree and select the Duplicate Partition Group <partition_group_name>... context menu item.

Duplicate Object Wizard allows you to select the database to create a new partition group in, and to edit the result SQL statement for creating the partition group.

Editing Partition Groups

To edit an existing partition group:

  • select the partition group for editing in the DB Explorer tree (type the first letters of the partition group name for quick search);
  • right-click the object and select the Edit Partition Group <partition_group_name>... context menu item, or simply double-click the partition group;
  • edit partition group definition using the appropriate tabs of Partition Group Editor.

Dropping Partition Groups

To drop a partition group:

  • select the partition group to drop in the DB Explorer tree;
  • right-click the object and select the Drop Partition Group <partition_group_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new partition group;

Ctrl+O to edit the selected partition group;

Shift+Del to drop the object from the database.


Partition Group Editor

Partition Group Editor allows you to define partition group properties. It opens automatically when you create a new partition group and is available on editing an existing one (see Create partition group and Edit partition group for details).

To open a partition group in Partition Group Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing partition group
  • Editing object description
  • Viewing DDL definition


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Partition Group Editor.

Partition Group Editor - Using Navigation bar

The Navigation bar of Partition Group Editor allows you to:

Object group

iconDB select a database

select a partition group for editing

General group

iconCompile compile the partition group (if it is being created/modified)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the partition group

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the partition group:

Description group

iconSaveToFile save object description to file

iconLoadFromFile load description text from an external *.txt file

iconCopyToClipboard copy description to clipboard

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of Partition Group Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing partition group

Use the Partition Group tab of Partition Group Editor to create/edit a partition group and specify its definition, assign partitions to the database partition group, and record the database partition group definition in the catalog.

Partition Group Editor - Editing partition group definition

Partition group name

Enter a name for the new partition group. The name is an SQL identifier (either ordinary or delimited).

Specify whether all available partitions will be included into the partition group or select the partition(s).

To select a partition, you need to move it from the Database partitions list to the Selected partitions list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the partitions from one list to another.


Event Monitors

An Event Monitor is a database object for monitoring and collecting data on database activities over a period of time.

Creating Event Monitors

To create a new event monitor:

  • select the Database | New Object... main menu item;
  • select Event Monitor in the Create New Object dialog;
  • edit event monitor properties using the appropriate tabs of Event Monitor Editor.

Hint: To create a new event monitor, you can also right-click the Event Monitors node of the DB Explorer tree and select the Event Monitor... context menu item.

To create a new event monitor with the same properties as one of existing event monitors has:

  • select the Database | Duplicate Object... main menu item;
  • follow the instructions of Duplicate Object Wizard.

Alternatively, you can right-click an event monitor in the DB Explorer tree and select the Duplicate Event Monitor <event_monitor_name>... context menu item.

Duplicate Object Wizard allows you to select the database to create a new event monitor in, and to edit the result SQL statement for creating the event monitor.

Editing Event Monitors

To edit an existing event monitor:

  • select the event monitor for editing in the DB Explorer tree (type the first letters of the event monitor name for quick search);
  • right-click the object and select the Edit Event Monitor <event_monitor_name>... context menu item, or simply double-click the event monitor;
  • edit event monitor definition using the appropriate tabs of Event Monitor Editor.

Dropping Event Monitors

To drop an event monitor:

  • select the event monitor to drop in the DB Explorer tree;
  • right-click the object and select the Drop Event Monitor <event_monitor_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new event monitor;

Ctrl+O to edit the selected event monitor;

Shift+Del to drop the object from the database.


Event Monitor Editor

Event Monitor Editor allows you to define event monitor properties. It opens automatically when you create a new event monitor and is available on editing an existing one (see Create event monitor and Edit event monitor for details).

To open an event monitor in Event Monitor Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing event monitor
  • Setting Output
  • Using event filter
  • Viewing DDL definition


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Event Monitor Editor.

Event Monitor Editor - Using Navigation bar

The Navigation bar of Event Monitor Editor allows you to:

Object group

iconDB select a database

select an event monitor for editing

General group

iconCompile compile the event monitor (if it is being created)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the event monitor

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the event monitor:

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of Event Monitor Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing event monitor

Use the Edit tab of Event Monitor Editor to create/edit an event monitor and specify its definition.

Event Monitor Editor - Editing event monitor definition

Name

Enter a name for the new event monitor (this is a one-part name). The name is an SQL identifier (either ordinary or delimited). Note that the event-monitor-name must not identify an event monitor that already exists in the catalog.

Database partition number

Specify the database partition on which a file or pipe event monitor is to run.

Write to

RadioButton Table

Specifies that the target for the event monitor data is a table.

RadioButton Pipe

Specifies that the target for the event monitor data is a named pipe.

RadioButton Files

Specifies that the target for the event monitor data is a file (or set of files).

Depending on the Write to selection the Output tab contains different set of options.

Event Types

Select the types of events to be recorded (FOR clause).

CheckBox Activities

This option indicates that monitor will record activity events that occur when using the database.

CheckBox Locking

Enable this option to create an event monitor that will record lock-related events that occur when using the database.

CheckBox Threshold violations

This option is used to indicate that monitor will record threshold violation events that occur when using the database.

CheckBox Tables

This option specifies that the event monitor records table events for each active table when the last application disconnects from the database. An active table is a table that has changed since the first connection to the database.

CheckBox DeadLocks

This option specifies that the event monitor records deadlock events whenever a deadlock occurs. Check the CheckBox with Details option to enable extended recording of deadlocks. The CheckBox History option indicates that the event monitor data will also include the history of all statements in the current unit of work at the participating node and the statement compilation environment for each SQL statement

in binary format (if available). Use the CheckBox Values option to store data values used as input variables for each SQL statement.

CheckBox Connections

This option specifies that the event monitor records connection events when an application disconnects from the database. Use the Filter button to specify the WHERE event condition using the Filter for... dialog.

CheckBox Transactions

This option specifies that the event monitor records transaction events whenever a transaction completes (that is, whenever there is a commit or rollback operation). Use the Filter button to specify the WHERE event condition using the Filter for... dialog.

CheckBox Statements

This option specifies that the event monitor records statement events whenever execution of an SQL statement is finished. Use the Filter button to specify the WHERE event condition using the Filter for... dialog.

CheckBox Statistics

This option indicates that the event monitor will record statistics events that occur when using the database.

CheckBox Unit of work

Enable this option to create an event monitor that will record events when a unit of work completes.

CheckBox Database

This option specifies that the event monitor records database events when the last application disconnects from the database.

CheckBox Tablespaces

This option specifies that the event monitor records table space events for each table space when the last application disconnects from the database.

CheckBox BufferPools

This option specifies that the event monitor records buffer pool events when the last application disconnects from the database.

Start type

RadioButton Manual

Select this option to specify that the event monitor will not be started automatically each time the database is started (MANUALSTART option). Event monitors with this option must be activated manually.

RadioButton Autostart

Select this option to specify that the event monitor will be started automatically each time the database is started.

Note: You can easily start/stop an event monitor using the corresponding context menu item of the DB Explorer.

Other options

RadioButton Local

If this option is selected, the event monitor reports only on the partition that is running.

RadioButton Global

If this option is selected, the event monitor reports from all partitions.


Setting output

The Output tab of Event Monitor Editor allows you to define the target for the data. Depending on the Write to selection this tab contain different set of options.

Tables

Event Monitor Editor - Setting Output - Table

If table was selected as an event monitor output, the following options can be defined:

Global Options

Buffer size

Specifies the size of the event monitor buffers (in units of 4Kpages).

Event buffer write mode

Within this section you can specify whether agent that generates an event should wait for an event buffer to be written out to disk if the agent determines that both event buffers are full. BLOCKED should be selected to guarantee no event data loss.

Table options

Schema

Use the drop-down list to select a schema for the target table.

Name

Enter a name for the target table. Note that the name must not identify a table, view or alias described in the catalog.

Tablespace

Use the drop-down list to identify the table space where the table should be created.

PCDEACTIVATE

This parameter specifies how full the table space must be before the event monitor automatically deactivates. The specified value, which represents a percentage, can range from 0 to 100.

CheckBox Truncate

The option specifies that the STMT_TEXT and STMT_VALUE_DATA columns are defined as VARCHAR(n), where n is the largest size that can fit into the table row.

Within the Group Name section you can select the logical data group(s) for which a target table is being

defined. Section values depend upon the type of event monitor currently selected.

Use the Move to Available Move all to Available Move all to Selected Move to Selected buttons to define which elements will be Included into or Excluded from the target table.

Pipe

Event Monitor Editor - Setting Output - Pipe

If pipe was selected as an event monitor output then you need to set pipe name only.

Files

If Files selected in the Write to section of the Edit tab, then the following options will be available:

Event Monitor Editor - Setting Output - Files

File options

Directory

File location should be specified at this field.

Max files

You can restrict maximum number of output files or enable the CheckBox None option if no restriction needed.

Max file size

You can set maximum file size (in pages) or enable the CheckBox None option if no limit needed.

Buffer size

Specifies the size of the event monitor buffers (in units of 4Kpages).

Event buffer write mode

Within this section you can specify whether agent that generates an event should wait for an event buffer to be written out to disk if the agent determines that both event buffers are full. BLOCKED should be selected to guarantee no event data loss.

Append mode

Specifies that if event data files already exist when the event monitor is turned on, then the event monitor will replace or append the new event data to the existing stream of data files.


Using event filter

The Filter for... dialog is used to define a filter that determines which connections cause a CONNECTION, STATEMENT or TRANSACTION event to occur. If the result of the event condition is TRUE for a particular connection, then that connection will generate the requested events.

To open this dialog, click the Filter button within the Edit tab of the editor.

Event Monitor Editor - Filter

Condition of events

Specify one or more conditions for AUTH_ID, APPL_ID, and/or APPL_NAME using the Condition drop-down list and Value edit box.

Use the Add, Edit buttons to set new conditions in the Condition of events area, and the Del, Clear buttons to manage existing conditions in the Condition List.


Wrappers

In a federated database system, a Wrapper is the mechanism by which the federated server invokes routines to communicate with, and retrieve data from a data source. The routines are contained in a library called a wrapper module.

Creating Wrappers

To create a new wrapper:

  • select the Database | New Object... main menu item;
  • select Wrapper in the Create New Object dialog;
  • edit wrapper properties using the appropriate tabs of Wrapper Editor.

Hint: To create a new wrapper, you can also right-click the Wrappers node of the DB Explorer tree and select the New Wrapper... context menu item.

To create a new wrapper with the same properties as one of existing wrappers has:

  • select the Database | Duplicate Object... main menu item;
  • follow the instructions of Duplicate Object Wizard.

Alternatively, you can right-click a wrapper in the DB Explorer tree and select the Duplicate Wrapper <wrapper_name>... context menu item.

Duplicate Object Wizard allows you to select the database to create a new wrapper in, and to edit the result SQL statement for creating the wrapper.

Editing Wrappers

To edit an existing wrapper:

  • select the wrapper for editing in the DB Explorer tree (type the first letters of the wrapper name for quick search);
  • right-click the object and select the Edit Wrapper <wrapper_name>... context menu item, or simply double-click the wrapper;
  • edit wrapper definition using the appropriate tabs of Wrapper Editor.

Dropping Wrappers

To drop a wrapper:

  • select the wrapper to drop in the DB Explorer tree;
  • right-click the object and select the Drop Wrapper <wrapper_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new wrapper;

Ctrl+O to edit the selected wrapper;

Shift+Del to drop the object from the database.


Wrapper Editor

Wrapper Editor allows you to define wrapper properties. It opens automatically when you create a new wrapper and is available on editing an existing one (see Create wrapper and Edit wrapper for details).

To open a wrapper in Wrapper Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing wrapper
  • Editing Options
  • Editing object description
  • Viewing DDL definition


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Wrapper Editor.

Wrapper Editor - Using Navigation bar

The Navigation bar of Wrapper Editor allows you to:

Object group

iconDB select a database

select a wrapper for editing

General group

iconCompile compile the wrapper (if it is being created)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the wrapper

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the wrapper:

Description group

iconSaveToFile save object description to file

iconLoadFromFile load description text from an external *.txt file

iconCopyToClipboard copy description to clipboard

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of Wrapper Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing wrapper

Use the Edit tab of Wrapper Editor to create/edit a wrapper and specify its definition.

Wrapper Editor - Editing wrapper definition

Name

Enter the new wrapper name.

If a predefined name is specified, the federated server automatically assigns a default to Library.

If a user-supplied name is provided, it is also necessary to specify the Library.

Server type

Use the drop-down list to identify the type of data source for the wrapper. Possible values are: User defined, DB2, Informix, MS SQL (Win), MS SQL (*nix), Net8, OLEDB, SQL *Net, Sybase CTLIB, Sybase DBLIB.

Library

Set the name of the file that contains the wrapper module. This option is only necessary when a user-supplied wrapper name is used. This option should not be used when a predefined wrapper name is given.

Options

This area lists options of the wrapper definition. Use the Edit button to edit the wrapper options.


Editing options

The Add Option / Edit Option dialog allows you to add/edit wrapper options.

Wrapper options are used to configure the wrapper or to define how DB2 uses the wrapper.

To open the dialog, click the Add/Edit buttons within the Edit tab of the editor.

Wrapper Editor - Editing wrapper definition - Option editor

Type in the option Name and the Value for the option in the corresponding fields, and click OK to apply changes.

The Value specifies the setting for the wrapper option. Some wrapper options can be used by all wrappers and some options are specific to a particular wrapper.


Users

A User is the authorization ID that is used to access DB2 database and its objects.

Creating Users

To create a new user:

  • select the Database | New Object... main menu item;
  • select User in the Create New Object dialog;
  • edit user properties using the appropriate tabs of User Editor.

Hint: To create a new user, you can also right-click the Users node of the DB Explorer tree and select the New User... context menu item.

Editing Users

To edit an existing user:

  • select the user for editing in the DB Explorer tree (type the first letters of the user name for quick search);
  • right-click the object and select the Edit User <user_name>... context menu item, or simply double-click the user;
  • edit user definition using the appropriate tabs of User Editor.

Dropping Users

To drop a user:

  • select the user to drop in the DB Explorer tree;
  • right-click the object and select the Drop User <user_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new user;

Ctrl+O to edit the selected user;

Shift+Del to drop the object from the database.


User Editor

User Editor allows you to define user properties and grants. It opens automatically when you create a new user and is available on editing an existing one (see Create user and Edit user for details).

To open a user in User Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing user
  • Managing grants
  • Defining ancestors
  • Viewing DDL definition


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in User Editor.

User Editor - Using Navigation bar

The Navigation bar of User Editor allows you to:

Object group

iconDB select a database

select a user for editing

General group

iconCompile compile the user (if it is being created/modified)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the user

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the user:

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of User Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing user

Use the Property tab of User Editor to create/edit a user and specify its definition.

User Editor - Editing user definition

These options allow you to define common database privileges that can be granted to the user. Select/deselect the options to grant/revoke the corresponding privileges.

Grant...

CheckBox Database administrator authority

Grants database administrator authority and all other database authorities except for security administrator authority to the user.

CheckBox Authority to access the database

Enable this option to allow the user to connect to the database.

CheckBox Authority to create database tables

Enable this option to allow the user to create tables in the database. The user also gains the CONTROL privilege on the tables he creates.

CheckBox Authority to implicitly create schemas

Enable this option to automatically create a schema when the user creates a table specifying a non-existing schema.

CheckBox Authority to create packages

Enable this option to allow the user to create packages in the database. The user also gains the CONTROL privilege on the packages he creates.

CheckBox Authority to register routines which are executed in the database manager

Enable this option to allow the user to register routines that execute in the database manager's process. Care must be taken that routines so registered will not have adverse side effects.

CheckBox Authority to use the LOAD utility

Enable this option to allow the user to use LOAD utility.

CheckBox Authority to register external routines

Enable the option to allow the user to register external routines. Care must be taken that routines so registered will not have adverse side effects.

CheckBox Authority to access the database while it is quiesced

Enable this option to allow the user to access the database while it is in quiesced mode.

CheckBox Authority to grant and revoke all object level privileges and some of DB level privileges

Enable the option to grant the user access control authority. This authority can't be granted to PUBLIC. Server version 9.7 required.

CheckBox Authority to access data

Enable this option to allow the user to select, insert, update, delete, and load data, to execute any package or routine (except audit routines). This authority can't be granted to PUBLIC. Server version 9.7 required.

CheckBox Authority to explain statements

This authority allows the user to explain, prepare, and describe dynamic and static SQL statements without requiring access to data. Server version 9.7 required.

CheckBox Authority to manage SQL statement execution

Enable the option to allow the user to create, drop, flush, and set event monitors; to explain, prepare, and describe dynamic and static SQL statements without requiring access to data; to flush optimization profile and package cache; to execute the runstats utility.

CheckBox Security administrator authority

Enable the option to grant the user the security administrator authority. Server version 9.5 required.

CheckBox Authority to manage workloads

Enable this option to allow the user to manage workloads. Server version 9.7 required.


Managing grants

The Grants tab of User Editor allows you to manage grants for the user.

User Editor - Managing grants

The column(s) following the Object Name column indicate(s) the permission(s) that can be granted to the user on the selected database object: table space, schema, table, materialized query table, index, view, package, function, procedure, nickname, SQL variable, security label, module.

Right-click a cell to grant a permission to the user. The context menu of a cell allows you to:

  • grant a permission to the user;
  • grant a permission (with Grant Option) to the user;
  • revoke a previously granted permission.

For details see Grant Manager.


Groups

A Group is a logical organization of users that have IDs according to activity or resource access authority.

Creating Groups

To create a new group:

  • select the Database | New Object... main menu item;
  • select Group in the Create New Object dialog;
  • edit group properties using the appropriate tabs of Group Editor.

Hint: To create a new group, you can also right-click the Groups node of the DB Explorer tree and select the New Group... context menu item.

Editing Groups

To edit an existing group:

  • select the group for editing in the DB Explorer tree (type the first letters of the group name for quick search);
  • right-click the object and select the Edit Group <group_name>... context menu item, or simply double-click the group;
  • edit group definition using the appropriate tabs of Group Editor.

Dropping Groups

To drop a group:

  • select the group to drop in the DB Explorer tree;
  • right-click the object and select the Drop Group <group_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new group;

Ctrl+O to edit the selected group;

Shift+Del to drop the object from the database.


Group Editor

Group Editor allows you to define group properties and grants. It opens automatically when you create a new group and is available on editing an existing one (see Create group and Edit group for details).

To open a group in Group Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing group
  • Managing grants
  • Defining ancestors
  • Viewing DDL definition


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Group Editor.

Group Editor - Using Navigation bar

The Navigation bar of Group Editor allows you to:

Object group

iconDB select a database

select a group for editing

General group

iconCompile compile the group (if it is being created/modified)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the group

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the group:

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of Group Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing group

Use the Property tab of Group Editor to create/edit a group and specify its definition.

Group Editor - Editing group definition

These options allow you to define common database privileges that can be granted to any user from the group. Select/deselect the options to grant/revoke the corresponding privileges.

Grant...

CheckBox Database administrator authority

Grants database administrator authority and all other database authorities except for security administrator authority to the group.

CheckBox Authority to access the database

Enable this option to allow the group to connect to the database.

CheckBox Authority to create database tables

Enable this option to allow the group to create tables in the database. The group also gains the CONTROL privilege on the tables he creates.

CheckBox Authority to implicitly create schemas

Enable this option to automatically create a schema when a user from the group creates a table specifying a not existing schema.

CheckBox Authority to create packages

Enable this option to allow the group user to create packages in the database. The group also gains the CONTROL privilege on the packages he creates.

CheckBox Authority to register routines which are executed in the database manager

Enable this option to allow the group to register routines that execute in the database manager's process. Care must be taken that routines so registered will not have adverse side effects.

CheckBox Authority to use the LOAD utility

Enable this option to allow the group to use LOAD utility.

CheckBox Authority to register external routines

Enable the option to allow the group to register external routines. Care must be taken that routines so registered will not have adverse side effects.

CheckBox Authority to access the database while it is quiesced

Enable this option to allow the group to access the database while it is in quiesced mode.

CheckBox Authority to grant and revoke all object level privileges and some of DB level privileges

Enable the option to grant the group access control authority. This authority can't be granted to PUBLIC. Server version 9.7 required.

CheckBox Authority to access data

Enable this option to allow the group to select, insert, update, delete, and load data, to execute any package or routine (except audit routines). This authority can't be granted to PUBLIC. Server version 9.7 required.

CheckBox Authority to explain statements

This authority allows the group to explain, prepare, and describe dynamic and static SQL statements without requiring access to data. Server version 9.7 required.

CheckBox Authority to manage SQL statement execution

Enable the option to allow the group to create, drop, flush, and set event monitors; to explain, prepare, and describe dynamic and static SQL statements without requiring access to data; to flush optimization profile and package cache; to execute the runstats utility.

CheckBox Security administrator authority

Enable the option to grant the group the security administrator authority. Server version 9.5 required.

CheckBox Authority to manage workloads

Enable this option to allow the group to manage workloads. Server version 9.7 required.


Managing grants

The Grants tab of Group Editor allows you to manage grants for the group.

Group Editor - Managing grants

The column(s) following the Object Name column indicate(s) the permission(s) that can be granted to the group on the selected database object: table space, schema, table, materialized query table, index, view, package, function, procedure, nickname, SQL variable, security label, module.

Right-click a cell to grant a permission to the group. The context menu of a cell allows you to:

  • grant a permission to the group;
  • grant a permission (with Grant Option) to the group;
  • revoke a previously granted permission.

For details see Grant Manager.


User Mappings

A User Mapping is an association between the authorization under which a user connects to a federated server and the authorization under which the user connects to a data source.

Creating User Mappings

To create a new user mapping:

  • select the Database | New Object... main menu item;
  • select User Mapping in the Create New Object dialog;
  • edit user mapping properties using the appropriate tabs of User Mapping Editor.

Hint: To create a new user mapping, you can also right-click the User Mappings node of the DB Explorer tree and select the New User Mapping... context menu item.

Editing User Mappings

To edit an existing user mapping:

  • select the user mapping for editing in the DB Explorer tree (type the first letters of the user mapping name for quick search);
  • right-click the object and select the Edit User Mapping <user_mapping_name>... context menu item, or simply double-click the user mapping;
  • edit user mapping definition using the appropriate tabs of User Mapping Editor.

Dropping User Mappings

To drop a user mapping:

  • select the user mapping to drop in the DB Explorer tree;
  • right-click the object and select the Drop User Mapping <user_mapping_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new user mapping;

Ctrl+O to edit the selected user mapping;

Shift+Del to drop the object from the database.


User Mapping Editor

User Mapping Editor allows you to define user mapping properties. It opens automatically when you create a new user mapping and is available on editing an existing one (see Create user mapping and Edit user mapping for details).

To open a user mapping in User Mapping Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing user mapping
  • Adding/editing options
  • Viewing DDL definition


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in User Mapping Editor.

User Mapping Editor - Using Navigation bar

The Navigation bar of User Mapping Editor allows you to:

Object group

iconDB select a database

select a user mapping for editing

General group

iconCompile compile the user mapping (if it is being created)

add an option

edit an option

delete an option

iconRefresh refresh the content of the active tab

iconPrint print metadata of the user mapping

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the user mapping:

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of User Mapping Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing user mapping

Use the Property tab of User Mapping Editor to create/edit a user mapping and specify its definition.

User Mapping Editor - Editing user mapping definition

Authorization name

Use the drop-down list to specify the authorization name under which the user or application will connect to a federated database. This name is to be mapped to an identifier under which the data source denoted by Server name can be accessed.

Server name

Use the drop-down list to identify the data source that is accessible under the mapping Authorization name.

Options

This area allows you to manage options of the user mapping definition (add options, edit options, delete options) and assign values for options where necessary.

Use the Add, Edit and Del buttons to manage user mapping options.


Adding/editing options

The New option dialog allows you to add options for the user mapping.

To open the dialog, click the Add button in User Mapping Editor.

User Mapping Editor - Editing user mapping definition - Option editor

Name

Use the drop-down list to select the name of the user option that will be used to complete the user mapping that is being created. Possible values are:

  • ACCOUNTING

Used to specify a DRDA accounting string. Valid settings include any string of length 255 or less. This option is required only if accounting information needs to be passed.

  • REMOTE_AUTHID

Indicates the authorization ID used at the data source. Valid settings include any string of length 255 or less.

  • REMOTE_DOMAIN

Indicates the Windows NT domain used to authenticate users connecting to a Documentum data source. Valid settings include any valid Windows NT domain name.

  • REMOTE_PASSWORD

Indicates the authorization password used at the data source. Valid settings include any string of length 32 or less.

Setting

Specify the setting for user option name as a character string constant.


Servers

A Server is a unit of information that identifies a data source to a federated server. This information can include the server's name, its type, its version, and the name of the wrapper that the federated server uses to communicate with and retrieve data from the data source.

A server can be the target for a request from a remote RDBMS and the RDBMS that provides the data.

Creating Servers

To create a new server:

  • select the Database | New Object... main menu item;
  • select Server in the Create New Object dialog;
  • edit server properties using the appropriate tabs of Server Editor.

Hint: To create a new server, you can also right-click the Server node of the DB Explorer tree and select the New Server... context menu item.

Editing Servers

To edit an existing server:

  • select the server for editing in the DB Explorer tree (type the first letters of the server name for quick search);
  • right-click the object and select the Edit Server <server_name>... context menu item, or simply double-click the server;
  • edit server definition using the appropriate tabs of Server Editor.

Dropping Servers

To drop a server:

  • select the server to drop in the DB Explorer tree;
  • right-click the object and select the Drop Server <server_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new server;

Ctrl+O to edit the selected server;

Shift+Del to drop the object from the database.


Server Editor

Server Editor allows you to define server properties. It opens automatically when you create a new server and is available on editing an existing one (see Create server and Edit server for details).

To open a server in Server Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing server
  • Editing object description


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Server Editor.

Server Editor - Using Navigation bar

The Navigation bar of Server Editor allows you to:

Object group

iconDB select a database

select a server for editing

General group

iconCompile compile the server (if it is being created)

iconRefresh refresh the content of the active tab

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the server:

Description group

iconSaveToFile save object description to file

iconLoadFromFile load description text from an external *.txt file

iconCopyToClipboard copy description to clipboard

Items of the Navigation bar are also available on the ToolBar of Server Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing server

Use the Edit tab of Server Editor to create/edit a server and specify its definition.

Server Editor - Editing server definition

Name

Enter the name of the data source that is being defined to the federated database.

Wrapper

Use the drop-down list to select the wrapper that the federated server uses to interact with data sources of the type and version denoted by Server type and Server version.

Server type information

Server type

Use the drop-down list to specify the type of data source denoted by Server name. Possible values are: DB2, INFORMIX, MS SQL, ODBC, ORACLE, SYBASE.

Server subtype (for DB2 and Oracle types only)

Use the drop-down list to specify the subtype of data source denoted by Server name.

Server version

Use the drop-down list to specify the version of the data source denoted by Server name.

Authorization

Remote login

Specifies the authorization ID under which any necessary actions are performed at the data source.

Password

Specifies the password associated with the authorization ID represented by Remote login. If password is not specified, it will default to the password for the ID under which the user is connected to the federated database.

Options

This area lists available server options which can be added to the server definition. Assign values for options where necessary.

DBNAME

Name of the data source database that you want the federated server to access. For DB2 database, this value corresponds to a specific database for the initial remote DB2 database connection.

PASSWORD

Specify whether passwords are sent to a data source. If you want passwords to be sent to the data source and validated then choose the 'Y' item of the drop-down list. Otherwise, select the 'N' item.

CPU_RATIO

Indicates how much faster or slower a data source CPU runs than the federated server CPU. Valid values are greater than 0 and less than 1x1023.

COLLATING_SEQUENCE

Specifies whether the data source uses the same default collating sequence as the federated database, based on the NLS code set and the country/region information.

'Y'

The data source has the same collating sequence as the DB2 federated database.

'N'

The data source has a different collating sequence than the DB2 federated database collating sequence.

'I'

The data source has a different collating sequence than the DB2 federated database collating sequence, and the data source collating sequence is insensitive to case (for example, 'STEWART' and 'StewART' are considered equal).

IUD_APP_SVPT_ENFORCE

Specifies whether the DB2 federated system should enforce detecting or building of application savepoint statements.

'Y'

The federated server rolls back insert, update, or delete transactions if an error occurs in an insert, update, or delete operation and the data source does not enforce application savepoint statements.

'N'

The federated server will not roll back transactions when an error is encountered. Your application must handle the error recovery.

FOLD_ID

Applies to user IDs that the federated server sends to the data source server for authentication.

Valid values are:

'U'

The federated server folds the user ID to uppercase before sending it to the data source.

'N'

The federated server does nothing to the user ID before sending it to the data source.

'L'

The federated server folds the user ID to lowercase before sending it to the data source.

IO_RATIO

Denotes how much faster or slower a data source I/O system runs than the federated server I/O system. Valid values are greater than 0 and less than 1x1023.

COMM_RATE

Specifies the communication rate between the federated server and the data source server. Expressed in megabytes per second.

Valid values are greater than 0 and less than 1x1023.

PUSHDOWN

'Y'

DB2 UDB will consider letting the data source evaluate operations.

'N'

DB2 UDB will send the data source SQL statements that include only SELECT with column names. Predicates (such as WHERE=) column and scalar functions (such as MAX and MIN), sorts (such as ORDER BY or GROUP BY), and joins will not be included in any SQL sent to the data source.

DB2_MAXIMAL_PUSHDOWN

Specifies the primary criteria that the query optimizer uses when choosing an access plan. The query optimizer can choose access plans based on cost or based on the user requirement that as much query processing as possible be performed by the remote data sources.

'Y'

The query optimizer chooses an access plan that pushes down more query operations to the data source than other plans. When several access plans provide the same amount of pushdown, the query optimizer then chooses the plan with the lowest cost.

If a materialized query table (MQT) on the federated server can process part or all of the query, then an access plan that includes the materialized query table is might be used.

'N'

The query optimizer chooses an access plan based on cost.

FOLD_PW

Applies to passwords that the federated server sends to data sources for authentication. Valid values are:

'U'

The federated server folds the password to uppercase before sending it to the data source.

'N'

The federated server does nothing to the password before sending it to the data source.

'L'

The federated server folds the password to lowercase before sending it to the data source.


Roles

All users interact with a DB2 server within the context of a Role. A user can belong to multiple groups and have multiple roles, and the operations that are permitted by each role determine the actions that a user can perform.

Creating Roles

To create a new role:

  • select the Database | New Object... main menu item;
  • select Role in the Create New Object dialog;
  • edit role properties using the appropriate tabs of Role Editor.

Hint: To create a new role, you can also right-click the Roles node of the DB Explorer tree and select the New Role... context menu item.

Editing Roles

To edit an existing role:

  • select the role for editing in the DB Explorer tree (type the first letters of the role name for quick search);
  • right-click the object and select the Edit Role <role_name>... context menu item, or simply double-click the role;
  • edit role definition using the appropriate tabs of Role Editor.

Dropping Roles

To drop a role:

  • select the role to drop in the DB Explorer tree;
  • right-click the object and select the Drop Role <role_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new role;

Ctrl+O to edit the selected role;

Shift+Del to drop the object from the database.


Role Editor

Role Editor allows you to define role properties and grants. It opens automatically when you create a new role and is available on editing an existing one (see Create role and Edit role for details).

To open a role in Role Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing role
  • Managing grants
  • Defining ancestors
  • Editing object description
  • Viewing DDL definition


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Role Editor.

Role Editor - Using Navigation bar

The Navigation bar of Role Editor allows you to:

Object group

iconDB select a database

select a role for editing

General group

iconCompile compile the role (if it is being created/modified)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the role

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the role:

Description group

iconSaveToFile save object description to file

iconLoadFromFile load description text from an external *.txt file

iconCopyToClipboard copy description to clipboard

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of Role Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing role

Use the Property tab of Role Editor to create/edit a role and specify its definition.

Role Editor - Editing role definition

Name

Name of the role to be created.

These allow you to define common database privileges that can be granted to the role. Select/deselect the options to grant/revoke the corresponding privileges.

Grant...

CheckBox Database administrator authority

Grants the database administrator authority and all other database authorities except for security administrator authority to the role owner.

CheckBox Authority to access the database

Enable this option to allow the role owner to connect to the database.

CheckBox Authority to create database tables

Enable this option to allow the role owner to create tables in the database. The role owner also gains the CONTROL privilege on the tables he creates.

CheckBox Authority to implicitly create schemas

Enable this option to automatically create a schema when the role owner creates a table specifying not existing schema.

CheckBox Authority to create packages

Enable this option to allow the role owner to create packages in the database. The role owner also gains the CONTROL privilege on the packages he creates.

CheckBox Authority to register routines which are executed in the database manager

Enable this option to allow the role owner to register routines that execute in the database manager's process. Care must be taken that routines so registered will not have adverse side effects.

CheckBox Authority to use the LOAD utility

Enable this option to allow the role owner to use LOAD utility.

CheckBox Authority to register external routines

Enable the option to allow the role owner to register external routines. Care must be taken that routines so registered will not have adverse side effects.

CheckBox Authority to access the database while it is quiesced

Enable this option to allow the role owner to access the database while it is in quiesced mode.

CheckBox Authority to grant and revoke all object level privileges and some of DB level privileges

Enable the option to grant the role owner access control authority. This authority can't be granted to PUBLIC. Server version 9.7 required.

CheckBox Authority to access data

Enable this option to allow the role owner to select, insert, update, delete, and load data, to execute any package or routine (except audit routines). This authority can't be granted to PUBLIC. Server version 9.7 required.

CheckBox Authority to explain statements

This authority allows the role owner to explain, prepare, and describe dynamic and static SQL statements without requiring access to data. Server version 9.7 required.

CheckBox Authority to manage SQL statement execution

Enable the option to allow the role owner to create, drop, flush, and set event monitors; to explain, prepare, and describe dynamic and static SQL statements without requiring access to data; to flush optimization profile and package cache; to execute the runstats utility.

CheckBox Security administrator authority

Enable the option to grant the role owner the security administrator authority. Server version 9.5 required.

CheckBox Authority to manage workloads

Enable this option to allow the role owner to manage workloads. Server version 9.7 required.


Managing grants

The Grants tab of Role Editor allows you to manage grants for the role.

Role Editor - Managing grants

The column(s) following the Object Name column indicate(s) the permission(s) that can be granted to the role on the selected database object: table space, schema, table, materialized query table, index, view, package, function, procedure, nickname, SQL variable, security label.

Right-click a cell to grant a permission to the role. The context menu of a cell allows you to:

  • grant a permission to the role;
  • grant a permission (with Grant Option) to the role;
  • revoke a previously granted permission.

For details see Grant Manager.


Defining ancestors

The Ancestors tab of User Editor / Group Editor / Role Editor allows you to define the object ancestors, i.e. to select the role to inherit the privileges from.

Role Editor - Ancestors

To select an ancestor role, you need to move it from the Available roles list to the Selected roles list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the roles from one list to another.

CheckBox With admin options

Allows the specified authorization-name to grant or revoke the role-name to or from others, or to associate a comment with the role.


Trusted Contexts

Trusted Context is the object that allows one to define trusted connection at the current server. The user name associated with the trusted connection can then be switched without the database server having to fully authenticate the new name. Use trusted connections to preserve the identity records of clients that are connecting to a DB2 database through your applications; trusted connections can provide a more secure environment by granting access based on the identity of those users.

Creating Trusted Contexts

To create a new trusted context:

  • select the Database | New Object... main menu item;
  • select Trusted Context in the Create New Object dialog;
  • edit trusted context properties using the appropriate tabs of Trusted Context Editor.

Hint: To create a new trusted context, you can also right-click the Trusted Contexts node of the DB Explorer tree and select the New Trusted Context... context menu item.

Editing Trusted Contexts

To edit an existing trusted context:

  • select the trusted context for editing in the DB Explorer tree (type the first letters of the trusted context name for quick search);
  • right-click the object and select the Edit Trusted Context <trusted context_name>... context menu item, or simply double-click the trusted context;
  • edit trusted context definition using the appropriate tabs of Trusted Context Editor.

Dropping Trusted Contexts

To drop a trusted context:

  • select the trusted context to drop in the DB Explorer tree;
  • right-click the object and select the Drop Trusted Context <trusted context_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new trusted context;

Ctrl+O to edit the selected trusted context;

Shift+Del to drop the object from the database.


Trusted Context Editor

Trusted Context Editor allows you to define trusted context properties. It opens automatically when you create a new trusted context and is available on editing an existing one (see Create trusted context and Edit trusted context for details).

To open a trusted context in Trusted Context Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing trusted context
  • Editing object description
  • Viewing DDL definition


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Trusted Context Editor.

Trusted Context Editor - Using Navigation bar

The Navigation bar of Trusted Context Editor allows you to:

Object group

iconDB select a database

select a trusted context for editing

General group

iconCompile compile the trusted context (if it is being created/modified)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the trusted context

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the trusted context:

Attributes group

iconPlus add an attribute

iconMinus remove an attribute

Users group

iconPlus add a user

iconMinus remove a user

Description group

iconSaveToFile save object description to file

iconLoadFromFile load description text from an external *.txt file

iconCopyToClipboard copy description to clipboard

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of Trusted Context Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing trusted context

Use the Trusted Context tab of Trusted Context Editor to create/edit a trusted context and specify its definition.

Trusted Context Editor - Editing trusted context definition

Trusted context name

Name the trusted context to be created.

System authID

This field specifies that the context is a connection established by system authorization.

Default role

Specify the role which is the default role for the trusted context.

CheckBox Enabled

Check this option to specify that the trusted context is created in the enabled state.

Attributes

Specify a list of one or more connection trust attributes upon which the trusted context is defined.

Note: Attributes can be added and removed with the help of corresponding context menu or Navigation bar items.

Default encryption level

Specify the minimum level of encryption of the data stream or network encryption.

Host name (or IP address)

Specify the actual communication address used by the client to communicate with the database server.

Encryption level

Specify a the level of encryption for selected specific address:

NONE, no specific level of encryption is required.

LOW, a minimum of light encryption is required.

HIGH, Secure Socket Layer (SSL) encryption must be used for data communication between the client and the DB2 server if an incoming connection is to match the encryption setting for this specific address.

Users

At this tab you can specify who can use a trusted connection based on this trusted context.

Trusted Context Editor - Editing trusted context definition - Users

Authorization name

Define a user that can use this trusted connection.

Note: Users can be added and removed with the help of corresponding context menu or Navigation bar items.

Default role

Specifies that role-name is the role to be used for the user when a trusted connection is using the trusted context.

CheckBox With authentication

Specifies that switching the current user on a trusted connection to this user requires authentication.


Audit Policies

Audit policy is a non-schema object to define an auditing policy at the current server. The audit policy determines what categories are to be audited; it can then be applied to other database objects to determine how the use of those objects is to be audited. This object is available only for database server version 9.5 and higher.

Creating Audit Policies

To create a new audit policy:

  • select the Database | New Object... main menu item;
  • select Audit Policy in the Create New Object dialog;
  • edit audit policy properties using the appropriate tabs of Audit Policy Editor.

Hint: To create a new audit policy, you can also right-click the Audit Policies node of the DB Explorer tree and select the New Audit Policy... context menu item.

Editing Audit Policies

To edit an existing audit policy:

  • select the audit policy for editing in the DB Explorer tree (type the first letters of the audit policy name for quick search);
  • right-click the object and select the Edit Audit Policy <audit policy_name>... context menu item, or simply double-click the audit policy;
  • edit audit policy definition using the appropriate tabs of Audit Policy Editor.

Dropping Audit Policies

To drop a audit policy:

  • select the audit policy to drop in the DB Explorer tree;
  • right-click the object and select the Drop Audit Policy <audit policy_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new audit policy;

Ctrl+O to edit the selected audit policy;

Shift+Del to drop the object from the database.


Audit Policy Editor

Audit Policy Editor allows you to define audit policy properties. It opens automatically when you create a new audit policy and is available on editing an existing one (see Create audit policy and Edit audit policy for details).

To open an audit policy in Audit Policy Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing audit policy
  • Editing object description
  • Viewing DDL definition


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Audit Policy Editor.

Audit Policy Editor - Using Navigation bar

The Navigation bar of Audit Policy Editor allows you to:

Object group

iconDB select a database

select an audit policy for editing

General group

iconCompile compile the audit policy (if it is being created/modified)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the audit policy

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the audit policy:

Description group

iconSaveToFile save object description to file

iconLoadFromFile load description text from an external *.txt file

iconCopyToClipboard copy description to clipboard

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of Audit Policy Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing audit policy

Use the Audit Policy tab of Audit Policy Editor to create/edit an audit policy and specify its definition.

Audit Policy Editor - Editing audit policy definition

Audit policy name

Names the audit policy.

Categories

CheckBox Audit

Generates records when audit settings are changed or when the audit log is accessed.

CheckBox Checking

Generates records during authorization checking of attempts to access or manipulate database objects or functions.

CheckBox Context

Generates records to show the operation context when a database operation is performed.

CheckBox Execute

Generates records to show the execution of SQL statements.

CheckBox With data

Specifies whether or not input data values provided for any host variables and parameter markers should be logged as part of the EXECUTE category.

CheckBox Objmaint

Generates records when data objects are created or dropped.

CheckBox Secmaint

Generates records when object privileges, database privileges, or DBADM authority is granted or revoked.

CheckBox Sysadmin

Generates records when operations requiring SYSADM, SYSMAINT, or SYSCTRL authority are performed.

CheckBox Validate

Generates records when users are authenticated or when system security information related to a user is retrieved.

BOTH

Successful and failing events will be audited.

FAILURE

Only failing events will be audited.

SUCCESS

Only successful events will be audited.

Error type

Specifies whether audit errors are to be returned or ignored.

RadioButton Normal

Any errors generated by the audit are ignored and only the SQLCODEs for errors associated with the operation being performed are returned to the application.

RadioButton Audit

All errors, including errors occurring within the audit facility itself, are returned to the application.


Security Label Components

A Security label component is a database object that represents a criterion you want to use to determine if a user should access a piece of data. It is a part of label-based access control. This object is available only for database server version 9.7 and higher.

Creating Security Label Components

To create a new security label component:

  • select the Database | New Object... main menu item;
  • select Security label component in the Create New Object dialog;
  • edit Security label component properties using the appropriate tabs of Security label component.

Hint: To create a new security label component, you can also right-click the Security label component node of the DB Explorer tree and select the New security label component... context menu item.

Editing Security Label Components

To edit an existing security label component:

  • select the security label component for editing in the DB Explorer tree (type the first letters of the security label component name for quick search);
  • right-click the object and select the Edit Security label component <component_name>... context menu item, or simply double-click the security label component;
  • edit security label component definition using the appropriate tabs of security label component editor.

Dropping Security Label Components

To drop a security label component:

  • select the security label component to drop in the DB Explorer tree;
  • right-click the object and select the Drop Security label component <component_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new security label component;

Ctrl+O to edit the selected security label component;

Shift+Del to drop the object from the database.


Security Label Component Editor

Security Label Component Editor allows you to define security label component properties. It opens automatically when you create a new security label component and is available on editing an existing one (see Create security label component and Edit security label component for details).

To open a security label component in Security Label Component Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing security label component
  • Editing object description
  • Browsing object dependencies
  • Viewing DDL definition


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Security Label Component Editor.

Security Label Component Editor - Using Navigation bar

The Navigation bar of Security Label Component Editor allows you to:

Object group

iconDB select a database

select a security label component for editing

General group

iconCompile compile the security label component (if it is being created/modified)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the security label component

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the security label component:

Elements group

add an array/set/tree element before an existing one

iconPlus add an array/set/tree element

iconMinus delete an array/set/tree element

Description group

iconSaveToFile save object description to file

iconLoadFromFile load description text from an external *.txt file

iconCopyToClipboard copy description to clipboard

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of Security Label Component Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing security label component

Use the Edit tab of Security Label Component Editor to create/edit a security label component and specify its definition.

Security Label Component Editor - Editing security label component definition

Name

Type the security label component name in this field.

Component type

Use the drop-down list to select the type of the security label component:

Tick Tree: each element represents a node in a tree structure

Tick Array: each element represents a point on a linear scale

Tick Set: each element represents one member of a set

String constant

At this section you can create/delete/edit an element ("string-constant") of a security label component - one particular "setting" that is allowed for that component.

You can use btnAddItem btnRemoveItem buttons or the context menu to add or remove elements.


Security Policies

Security policy is used to define criteria that determine who has write access and who has read access to individual rows and individual columns of tables. It is also a part of label-based access control. This object is available only for database server version 9.7 and higher.

Creating Security Policies

To create a new security policy:

  • select the Database | New Object... main menu item;
  • select Security policy in the Create New Object dialog;
  • edit Security policy properties using the appropriate tabs of security policy.

Hint: To create a new security policy, you can also right-click the Security policy node of the DB Explorer tree and select the New Security Policy... context menu item.

Editing Security Policies

To edit an existing security policy:

  • select the security policy for editing in the DB Explorer tree (type the first letters of the Security policy name for quick search);
  • right-click the object and select the Edit Security policy <policy_name>... context menu item, or simply double-click a security policy;
  • edit security policy definition using the appropriate tabs of security policy editor.

Dropping Security Policies

To drop a security policy:

  • select the security policy to drop in the DB Explorer tree;
  • right-click the object and select the Drop Security policy <policy_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new security policy;

Ctrl+O to edit the selected security policy;

Shift+Del to drop the object from the database.


Security Policy Editor

Security Policy Editor allows you to define security policy properties. It opens automatically when you create a new security policy and is available on editing an existing one (see Create security policy and Edit security policy for details).

To open a security policy in Security Policy Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing security policy
  • Editing object description
  • Browsing object dependencies
  • Viewing DDL definition


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Security Policy Editor.

Security Policy Editor - Using Navigation bar

The Navigation bar of Security Policy Editor allows you to:

Object group

iconDB select a database

select a security policy for editing

General group

iconCompile compile the security policy (if it is being created/modified)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the security policy

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the security policy:

Description group

iconSaveToFile save object description to file

iconLoadFromFile load description text from an external *.txt file

iconCopyToClipboard copy description to clipboard

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of Security Policy Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing security policy

Use the Edit tab of Security Policy Editor to create/edit a security policy and specify its definition.

Security Policy Editor - Editing security policy definition

Name

Type the security policy name in this field.

CheckBox Override not authorized write the specified security label

Indicates that the insert or update operation will fail if the user is not authorized to write the explicitly specified security label that is provided in the INSERT or UPDATE statement.

CheckBox Use role auth

If the option is enabled, all security labels and exemptions granted to roles of which the user authorization ID is a direct or indirect member will be considered. Security labels and exemptions granted to roles for which membership is only accessible through the groups associated with the user authorization ID will not be considered.

CheckBox Use group auth

If the option is enabled, all security labels and exemptions granted to groups associated with the user authorization ID will be considered. Security labels and exemptions granted to roles for which membership is only accessible through the groups associated with the user authorization ID will not be considered.

Note: If both group and role authorizations are enabled, any security labels and exemptions granted to roles accessible to the user indirectly through groups associated with the user authorization ID will be considered.

The Components area allows you to select security label components.

To select a security label component, you need to move it from the Available components list to the Selected components list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the security label components from one list to another.


Security Labels

A Security label is a database object that describes a certain set of security criteria. Security labels are applied to data in order to protect it. They are granted to users to allow them to access protected data.

When a user tries to access protected data, their security label is compared to the security label that is protecting the data. The protecting security label will block some security labels and not block others. If a user’s security label is blocked then the user cannot access the data.

This object is available only for database server version 9.7 and higher.

Creating Security Labels

To create a new security label:

  • select the Database | New Object... main menu item;
  • select Security label in the Create New Object dialog;
  • edit security label properties using the appropriate tabs of Security label.

Hint: To create a new security label, you can also right-click the Security label node of the DB Explorer tree and select the New security label ... context menu item.

Editing Security Labels

To edit an existing security label:

  • select the security label for editing in the DB Explorer tree (type the first letters of the security label name for quick search);
  • right-click the object and select the Edit Security label <label_name>... context menu item, or simply double-click a security label;
  • edit Security label definition using the appropriate tabs of security label editor.

Dropping Security Labels

To drop a security label:

  • select the security label to drop in the DB Explorer tree;
  • right-click the object and select the Drop Security label <label_name>... context menu item;
  • confirm dropping in the dialog window.

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new security label;

Ctrl+O to edit the selected security label;

Shift+Del to drop the object from the database.


Security Label Editor

Security Label Editor allows you to define security label properties. It opens automatically when you create a new security label and is available on editing an existing one (see Create security label and Edit security label for details).

To open a security label in Security Label Editor, double-click it in the DB Explorer tree.

  • Using Navigation bar and Toolbar
  • Creating/editing security label
  • Editing object description
  • Browsing object dependencies
  • Viewing DDL definition


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Security Label Editor.

Security Label Editor - Using Navigation bar

The Navigation bar of Security Label Editor allows you to:

Object group

iconDB select a database

select a security label for editing

General group

iconCompile compile the security label (if it is being created/modified)

iconRefresh refresh the content of the active tab

iconPrint print metadata of the security label

iconRestoreDefaultSize restore the default size and position of the editor window

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with the security label:

Description group

iconSaveToFile save object description to file

iconLoadFromFile load description text from an external *.txt file

iconCopyToClipboard copy description to clipboard

DDL group

iconSaveToFile save DDL to file

open DDL in SQL Editor

Items of the Navigation bar are also available on the ToolBar of Security Label Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Creating/editing security label

Use the Edit tab of Security Label Editor to create/edit a security label and specify its definition.

Security Label Editor - Editing security label definition

Label name

Specify the Security label name at the corresponding field and select the Security policy name from the drop-down list. The security policy name is needed to define which policy the security label is related to.

The Components area allows you to select security label components.

To select a security label component, you need to move it from the Available components list to the Selected components list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the security label components from one list to another.


Local scripts

Local scripts are the scripts that are stored locally and can be easily accessed from the DB Explorer.

To create new local script right-click the appropriate branch in the DB Explorer tree and select the New Script item. You will be asked for the script name. When the name is assigned the script appears in the DB Explorer tree.

Local Script - Setting script name

It is also possible to create subfolders in the Local scripts branch. Folders created there are created physically as subfolders to the folder assigned as default for local scripts in the DB Registration info | Directories.

To change directory where local scripts to be stored use the Select Directory... item of the Local Scripts context menu.

Script opens in the SQL Script where it can be edited or executed. You can also save local script as the shared one.

See also:

SQL Script

DB Explorer

Shared script

Database registration info


Shared scripts

Shared scripts are the scripts stored in the VCS repository. That makes scripts available for all the users working with the database having version control enabled.

Any script opened in the Script Editor can be saved as a shared script.

Note: Shared scripts are stored in the '%LocalRepositoryPath%\Trunk\Script' folder or its subfolders (where '%LocalRepositoryPath%' is a directory defined in the Database registration info | Change management | Working folder field).

Shared script is opened in the SQL Script Editor where you can edit or execute it.

See the topics below to get information about specific actions for shared scripts:

  • TFS
  • CVS
  • VSS

See also:

SQL Script

DB Explorer

Local Script

Database registration info

Change Management Settings

Change Management Tools


TFS

Actions you can perform under shared scripts in Team Foundation Server version control system:

iconAddToVC Add to version control

iconGetLatestVersion Get latest version

iconCheckIn Check in

iconCheckOut Check out

Adding script to version control

Enables version control for the selected script, script folder or whole shared script branch.

Operation is available only for scripts or folders that are not included in version control.

Getting latest version

Gets the selected script from the server repository to either replace or to merge it with the local copy. You will be asked for operation confirmation. This should be used, if you need to discard all changes made to script locally and to start working with up-to-date script file. If the operation is applied to Shared Script branch of the DB Explorer (or any shared script folder) you will get information about all shared scripts added by other database users that work in the shared script folder.

Checking out

Enables edit mode for the script. This operation should be used when you need to add changes to script.

Checking in

Commits changes made to the script. You will be asked for transaction comments. After script is checked in, its latest version appears on server repository.

You can also browse shared script history. Use the Change management | History item of the context menu for this purpose.

You can identify current script state by its icon:

iconSharedScriptNotAdded Shared script is not added to version control;

iconSharedScriptUpdated Shared script is checked out and has been changed locally;

iconSharedScriptTFSAdded Shared script can't be edited until checked out;

iconSharedScriptCommitted Shared script is checked out and can be edited;

iconSharedScriptConflicted There is a conflict in this shared script.

Note: The most common situation for conflicts to occur is when you are trying to check in locally modified script, but there is a newer version of this script in server repository. Conflicts should be resolved manually by means of TFS. Shared scripts are stored in '%LocalRepositoryPath%\Trunk\Script' folder or its subfolders (where '%LocalRepositoryPath%' is a directory defined in the Database registration info | Change management | Working folder field).

See also:

Shared scripts in CVS

Shared scripts in VSS


CVS

Actions you can perform under shared scripts in Concurrent Versions System:

iconAddToVC Add to version control

iconUpdateFromVC Update from Version Control

iconCommitToVC Commit to Version Control

Adding script to version control

Enables version control for the selected script, script folder or whole shared script branch.

Operation is available only for scripts or folders that are not included in version control.

Updating script from Version Control

Merge two files: one from the server repository and another from the local repository. Use this function when you need to work with the latest version of a file.

Committing changes to Version Control

Add latest changes made to a shared script into server repository.

You can also browse shared script history. Use the Change management | History item of the context menu for this purpose.

You can identify current script state by its icon:

iconSharedScriptNotAdded Shared script is not added to version control;

iconSharedScriptUpdated Shared script is added to version control and contains uncommitted changes;

iconSharedScriptCommitted Shared script is added to version control and contains no local changes.

iconSharedScriptConflicted There is a conflict in this shared script.

Note: The most common situation for conflicts to occur is when you are trying to commit changes made to script, but there is a newer version of this script in server repository. Conflicts should be resolved manually by means of CVS. Shared scripts are stored in '%LocalRepositoryPath%\Trunk\Script' folder or its subfolders (where '%LocalRepositoryPath%' is a directory defined in the Database registration info | Change management | Working folder field).

See also:

Shared scripts in TFS

Shared scripts in VSS


VSS

Actions you can perform under shared scripts in Visual Source Safe version control system:

iconAddToVC Add to version control

iconGetLatestVersion Get latest version

iconCheckIn Check in

iconCheckOut Check out

Adding script to version control

Enables version control for the selected script, script folder or whole shared script branch.

Operation is available only for scripts or folders that are not included in version control.

Getting latest version

Gets the selected script from server repository to replace local copy. You will be asked for operation confirmation.

This should be used, if you need to discard all changes made to script locally and to start working with up-to-date script file. If the operation is applied to Shared Script branch of the DB Explorer (or any shared script folder) you will get information about shared scripts added by other database users that work in the shared script folder.

Checking out

Enables edit mode for the script. This operation should be used when you need to add changes to script.

Checking in

Commits changes made to the script. You will be asked for transaction comments. After script is checked in, its latest version appears on server repository.

You can also browse shared script history. Use the Change management | History item of the context menu for this purpose.

You can identify current script state by its icon:

iconSharedScriptNotAdded Shared script is not added to version control;

iconSharedScriptUpdated Shared script is checked out and has been changed locally;

iconSharedScriptTFSAdded Shared script can't be edited until checked out;

iconSharedScriptCommitted Shared script is checked out and can be edited.

iconSharedScriptConflicted There is a conflict in this shared script.

Note: The most common situation for conflicts to occur is when you are trying to check in locally modified script, but there is a newer version of this script in server repository. Conflicts should be resolved manually by means of VSS. Shared scripts are stored in '%LocalRepositoryPath%\Trunk\Script' folder or its subfolders (where '%LocalRepositoryPath%' is a directory defined in the Database registration info | Change management | Working folder field).

See also:

Shared scripts in TFS

Shared scripts in CVS


Query Management Tools

When using SQL Manager for DB2, you are provided with two basic tools you may need to manage your SQL queries: SQL Editor for editing SQL query text directly and Visual Query Builder for building queries visually. Find the list of common SQL query management operations below.

Creating New Queries

In order to create a new query in SQL Editor:

  • select the Tools | New SQL Editor main menu item or use the corresponding btnNewSQLEditor toolbar button;
  • click the Add new query item of the Navigation bar;
  • edit the query text within the Edit tab of SQL Editor.

In order to create a new query in Query Builder:

  • select the Tools | New Query Builder main menu item or use the corresponding btnNewQueryBuilder toolbar button;
  • build the query visually within the Builder tab of Visual Query Builder.

Editing Queries

In order to open a query in SQL Editor:

  • select the Tools | Show SQL Editor main menu item or use the corresponding btnShowSQLEditor toolbar button;
  • use the numbered tabs at the bottom of the editor window to switch between previously edited queries. The last edited query is displayed automatically on opening the editor;
  • edit the query text within the Edit tab of SQL Editor.

In order to open a query in Query Builder:

  • select the Tools | Show Query Builder main menu item or use the corresponding btnShowQueryBuilder toolbar button;
  • the last edited query is displayed automatically on opening Query Builder;
  • to load a previously saved diagram, click the Load diagram item of the Navigation bar;
  • to load a query from an *.sql file, open the Edit tab and click the Load SQL button of the Navigation bar;
  • edit the query visually within the Builder and/or the Edit tabs of Visual Query Builder.

In order to load a query from an *.sql file:

  • select the Tools | New SQL Editor main menu item or use the corresponding btnNewSQLEditor toolbar button;
  • click the Load from file item of the Navigation bar;
  • browse for the query file using the Open SQL File dialog;
  • edit the query text within the Edit tab of SQL Editor.

Executing Queries

In order to execute a query:

  • create a new query or open an existing one;
  • click the btnExecuteQuery Execute item of the Navigation bar or use the F9 hot-key to execute the query;
  • view/edit the returned data within the Results tab of SQL Editor.

Saving Queries

In order to save a query:

  • create a new query or open an existing one;
  • click the Save to file Navigation bar item (in SQL Editor) or the Save SQL Navigation bar item (in Query Builder), or use the Ctrl+S shortcut to save the query using the Save as... dialog;
  • click the Save diagram Navigation bar item in Visual Query Builder to save the designed diagram;

or

  • use the Save all Navigation bar item in SQL Editor if you need to save all the queries to one file.

See also:

Getting Started

Database Explorer

Database Management

Database Objects Management

Data Management

Import/Export Tools

Change management

Database Tools

Instance Services

Personalization

How To...


SQL Editor

SQL Editor is the basic tool of SQL Manager for DB2 for creating and executing queries. The tool allows you to create and edit the SQL text of a query, prepare and execute queries and view the results of execution.

To open SQL Editor, select the Tools | btnNewSQLEditor New SQL Editor / btnShowSQLEditor Tools | Show SQL Editor main menu items or use the corresponding toolbar buttons. You can also use the Shift+F12 / F12 shortcuts for the same purpose.

  • Using Navigation bar and Toolbar
  • Working with SQL Editor area
  • Using the context menu
  • Viewing query plan
  • Using object links
  • Executing queries and viewing results
  • Viewing query logs
  • Favorites editor
  • Merging queries

See also:

Visual Query Builder

Query parameters

SQL Script Editor

Editor Options


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in SQL Editor.

SQL Editor - Using Navigation bar

The Navigation bar of SQL Editor allows you to:

Database group

iconDB select a database for the query

General group

iconExecute execute the current query

view estimated query execution plan

run Visual Query Builder to design the query as a diagram

switch the results representation mode: on Edit tab or on separate tab

iconOptions configure SQL Editor within the Tools | SQL Editor page of the Environment Options dialog

iconRestoreDefaultSize restore the default size and position of the editor window

Queries group

add a new query (note that the current query text will not be lost)

rename the current query

remove the query

remove all queries from the editor

edit the query text using Favorites editor and add the query to the Favorite Queries list

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with queries:

Edit group

iconFindText activate the Find Text dialog

iconLoadFromFile load a query from an *.sql file using the Open SQL File dialog

iconSaveToFile save the query to an *.sql file

iconSaveToFileAs save the query to an *.sql file using the Save as... dialog

iconSaveAll save all queries to an *.sql file

Logs group

iconFindText activate the Find Text dialog

iconSaveToFile save the query log to a file

clear logs

Data Management group

iconCommit commit transaction

iconRollback rollback transaction

export the returned dataset using Export Data Wizard

export the returned dataset as SQL Script using the Export as SQL Script wizard

import data

Variables group

browse the list of available SQL variables

Items of the Navigation bar are also available on the ToolBar of SQL Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.

See also:

Working with SQL Editor area

Viewing query plan

Executing queries

Viewing query logs

Favorites editor


Working with SQL Editor area

The Editor area of SQL Editor is available within the Edit tab and is provided for working with SQL queries in text mode.

For your convenience the syntax highlight, code completion and a number of other features for efficient SQL editing are implemented:

  • using object links allowing you to open the object in the associated editor;
  • ability to display line numbers;
  • code folding for statements and clauses;
  • customizable margins and gutters;
  • formatting code for better representation

and more.

If necessary, you can enable/disable or customize most of SQL Editor features using the Editor Options dialog.

The example of code completion is illustrated in the picture below. You can set the delay within the Quick code section of the Editor Options dialog or activate the completion list manually by pressing the Ctrl+Space shortcut.

SQL Editor - Working with SQL Editor area

Hint: To use a keyboard template, type the template name and press the Ctrl+J shortcut: the text associated with the template will be inserted automatically.

If necessary, you can print the SQL text of your query using the corresponding item of the context menu.

See also:

Using Navigation bar and Toolbar

Using the context menu

Editor Options

Keyboard Templates

Favorites editor

Find Text dialog

Replace Text dialog


Using the context menu

The context menu of SQL Editor area contains execution commands, most of the standard text-processing functions (Cut, Copy, Paste, Select All) and functions for working with the query as a whole, e.g. you can move the cursor to a particular line, change the case of selected text, view the query properties or print the text of the query. Each of these operations can be also performed with the corresponding hot keys used.

Implementation of the Find Text / Replace Text dialogs and Incremental search bar contributes to more efficient work with the SQL code.

Find the complete list of SQL Editor context menu items below. The context menu allows you to:

  • add the selected text to dictionary or correct text (see Spell checking for details);
  • execute the query/selected text/text under cursor, and reset execution point (if necessary);
  • manage markers: Drop Marker, Collect Marker, Swap Marker;
  • toggle bookmarks allowing you to navigate through the query text and jump to a line with a particular number;
  • perform editing operations: Undo/Redo, Cut, Copy, Paste, Select all;
  • perform search and replace operations;
  • save/load a query to/from an external *.sql file;
  • perform preview/print operations;
  • use the Quick code group allowing you to format the selected code using SQL Formatter to make the code easier to read, toggle comments for code fragments, change case of the selected text, indent/unindent code lines;
  • add the query to the Favorite Queries list;
  • open the Editor Options dialog.

SQL Editor - Using the context menu

See also:

Working with SQL Editor area

Executing queries


Viewing query plan

Using SQL Manager for DB2, you can view the plan for each of the queries created and executed in the application. The query plan is available within the corresponding Plan tab.

To view the Plan of a query, open the query in SQL Editor and use the btnExplainQuery Show estimated execution plan item of the Navigation bar or toolbar.

The Plan tab allows you to view the sequence of actions performed by the database server in the process of the query execution, and the amount of system resources used for the query execution.

SQL Editor - Viewing query plan

The Operation panel below displays the operations as a tree list with the following columns: Operation, Logical Operation, Subtree Cost, IO Cost, CPU Cost, Estimated Executions, Estimated Rows, Actual Executions, Actual Rows, Row Size, Parallel, Statement, Argument, Defined Values, Output, Warnings.

Right-click within the panel to display the context menu allowing you to configure the set of visible columns or export the plan to any of supported formats.

If necessary, you can specify that the Plan tab appears automatically upon query execution in SQL Editor: select the CheckBox Show actual execution plan on query execution option available within the Tools | SQL Editor section of the Environment Options dialog.

See also:

SQL Editor options

Executing queries


Using object links

Objects that exist in the database are highlighted in the text as hyperlinks. You can open an object in the appropriate editor by clicking the object name in the text with the Ctrl key pressed.

SQL Editor - Using object links

Please note that you can change the way highlighted objects look in the editor: use the Display | Highlight section of the Editor Options dialog.

See also:

Working with SQL Editor area

Editor Options


Executing queries

When all the query parameters are set, you can immediately execute the query in SQL Editor.

To execute a query, click the btnExecuteQuery Execute item of the Navigation bar. You can also use the context menu or F9 hot key for the same purpose.

If the SQL syntax is correct, the query is executed and, in case the query statement is supposed to return data (e.g. as SELECT statement), the returned dataset appears within the Results tab. The position of the tab depends on the Results on Edit tab / Results on separate tab selection in the Navigation bar.

If SQL syntax of the query contains any errors, the query execution is stopped and the corresponding error message is displayed in the status bar area at the bottom of the editor window.

SQL Editor - Executing queries

By default, data returned by a query are displayed as a grid (see Data View for details). The context menu of the grid allows you to Export Data, Export as SQL Script.

SQL Editor - Viewing results

See also:

Data View

Export Data

Export as SQL Script


Viewing query logs

This tab allows you to view the query log. The log is available within the Logs tab of SQL Editor.

Using this tab you can view log entries containing the following details:

  • date and time of the query execution;
  • text of the query;
  • number of rows fetched and fetch time, or the text of the error (if any).

Date/time and the execution result information are embedded as code comments conforming with the rules of SQL.

With the help of the context menu the log can be printed, saved to file or cleared. You can also use a number of SQL Editor context menu generic functions.

SQL Editor - Viewing query logs

See also:

Executing queries

Using the context menu


Favorites editor

For your convenience the Favorite Queries list is implemented in SQL Manager for DB2. This list is available within the iconFavoriteQueries Favorite Queries node of Database Explorer and allows you to store the most frequently used SQL queries in one location.

To add a query to the Favorite Queries list, use the [image] Add to Favorite Queries Navigation bar item in SQL Editor. The corresponding item is also available in the context menu of SQL Editor working area.

You can edit any of your Favorite Queries using Favorites editor.

SQL Editor - Favorites editor

Name

Set the name for the Favorite query.

Storage

Specify where the Favorite query will be stored: in Windows Registry or in the Database.

Note: If you store Favorite queries in the Windows Registry then they can be lost after the Windows reinstall. To avoid this problem save the registry branch or store Favorite queries in a database.

See also:

Managing Favorite queries

Working with SQL Editor area


Merging queries

When editing the same query in several copies of SQL Editor, on attempt to close the SQL Editor window the Merging a Query dialog will appear like the one displayed below.

SQL Editor - Merging queries

The actions offered are the following:

RadioButton Save the both changed queries

The query opened in the first copy of SQL editor will be saved as its original name; the query in the current copy will be saved under the name with additional postfix (by default it is '_1').

RadioButton Use changes in the current copy of SQL Editor

The query will be saved as the original name; the modifications of SQL made within the current copy of SQL Editor will be applied.

RadioButton Ignore changes in the current copy of SQL Editor

The query will be saved as its original name; the modifications of SQL made within the current copy of SQL Editor will be ignored.


Visual Query Builder

Visual Query Builder is implemented in SQL Manager for DB2 for building queries visually. The tool allows you to create and edit queries without deep knowledge of SQL. You can also prepare and execute queries, and view the results of their execution.

To open Visual Query Builder, select the Tools | btnNewQueryBuilder New Query Builder / Tools | btnShowQueryBuilder Show Query Builder main menu items or use the corresponding toolbar buttons.

  • Using Navigation bar and Toolbar
  • Working with diagram area
  • Joining two database objects by fields
  • Setting the selection criteria
  • Setting output fields for selection
  • Setting the grouping criteria
  • Setting parameters of sorting
  • Working with editor area
  • Executing queries and viewing results

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

SQL Editor

Query parameters


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Query Builder.

Query Builder - Using Navigation bar

The Navigation bar of Query Builder allows you to:

Database group

iconDB select a database for the query

General group

iconExecute execute the current query

clear the query

create a view

iconOptions configure Query Builder using the Query Builder Options page of the Environment Options dialog

iconRestoreDefaultSize restore the default size and position of the builder window

Objects group

iconDBExplorer browse objects of the database; you can also add tables and views to the diagram using drag-and-drop operations

Depending on the current tab selection, the Navigation bar expands to one or more additional panes with tab-specific actions that can be useful for working with queries:

Visual Builder group

iconLoadFromFile load a diagram from a *.vqb file using the Open diagram dialog

iconSaveToFile save the diagram to a *.vqb file using the Save diagram as... dialog

Change management group

This group of options is available only if the Version Control system is enabled. Here you can define whether to log executed script to VC always or only in case the script changes objects. Also define whether to ask a comment before run or after run.

Edit group

iconLoadFromFile load a query from an *.sql file using the Open SQL File dialog

iconSaveToFile save the query to an *.sql file

Data Management group

iconCommit commit transaction

iconRollback rollback transaction

export the returned dataset using Export Data Wizard

export the returned dataset as SQL Script using the Export as SQL Script wizard

Items of the Navigation bar are also available on the ToolBar of Query Builder. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.

See also:

Working with diagram area

Query execution


Working with diagram area

The main working area of Visual Query Builder is the diagram area available within the Builder tab. Here you can create a query by placing the database tables and views onto the area, and edit it by selecting the required data fields and setting links between objects.

To add an object to the query, you can simply drag it from the DB Explorer tree to the diagram area.

To include a field in the query, check the corresponding box located to the left from the field name in the list, or just double-click it. To include all fields of the table/view, check the box located to the left of the table/view caption. If you do not check any fields, the SQL statement is generated as SELECT * FROM <table/view_name>, i.e. all the fields are included in the query.

To collapse/expand the list of table/view fields, click the minimize/maximize button at the object caption.

To exclude a field from the query, uncheck the respective box. In order to remove the entire table/view from the query, close it by clicking the corresponding cross-button at the object caption, or right-click the object and select Delete from the context menu. You can also select the object and press the Del key.

To edit the alias of a table/view, double-click the object caption and enter the new name, or right-click the object and select Rename from the context menu.

Query Builder - Working with diagram area

Visual Query Builder allows you to create complex queries consisting of two or more queries combined in one with the UNION operator, or add nested queries. The panel to the left of the diagram area displays the tree of subqueries.

To add a query, right-click within the tree of subqueries area and select Add union from the context menu. A tab for the new query will appear in the diagram area.

To remove a query from the tree, right-click the query and select Delete union from the context menu.

To add the UNION ALL operator to the query, right-click the newly added query and select the corresponding context menu item.

Visual Query Builder - Union

Note: Depending on which query type you need to execute, you can select one from the drop-down list above the tree of subqueries: Select, Insert, Update, or Delete.

Visual Query Builder - Selecting query type

See also:

Joining two objects

Working with the editor area

Query execution


Joining two objects

The diagram area allows you to associate two objects by their fields: this operation is performed by dragging a field from one object list to another. This will set a link between these objects by the selected fields. It is indicated by a bidirectional arrow between the linked fields.

Note: Once two or more tables related by a foreign key are added to the diagram area, the corresponding visual joining of these tables appears at the Builder tab and the JOIN statement appears under the Edit tab.

Query Builder - Joining two objects

You can view the link properties of objects association: set the mouse cursor over the linking arrow, and a hint containing the association condition will popup after a short delay.

To edit the link properties, double-click the linking arrow or right-click it and select the Property popup menu item. The Link properties dialog allows you to change the association condition by choosing it from the drop-down list (=, >, <, >=, <=, <>).

Query Builder - Link properties

For your convenience the CheckBox Include all option is available for each object of the association:

if the option is enabled for the left table, the LEFT JOIN operator will be used for the association;

if the option is enabled for the right table, the RIGHT JOIN operator is used for the association;

if the option is enabled for neither of the tables, the INNER JOIN operator is used for the association.

Click OK to apply the changes you have made.

To remove a link between objects, right-click the linking arrow and select the Delete link popup menu item.

To add a point to the link line, right-click the linking arrow and select the Insert point popup menu item. Using the point you can move the link line easily. The point does not cause any changes to the query, it is only used for the diagram representation and makes visual building handy and more comprehensible.

Visual Query Builder - Link menu

See also:

Working with diagram area

Setting criteria


Setting criteria

Use the Criteria tab to set the selection conditions.

The way the conditions are used is set in the upper string of the area (All, Any, None or Not all of the following are met). Click the green link to change it.

Visual Query Builder - Criteria menu

To add a condition, click the ellipsis EllipsisButton button on the left, and select the Add condition popup menu item.

Edit the condition by clicking the elements of the condition pattern and setting the necessary values. Clicking the numbered button to the left of the condition string activates the popup menu which allows you to add a new condition at the same enclosure level, make composite condition by adding a new enclosure level, delete the current condition, expand or collapse enclosure levels of the condition (if the condition is composite).

Visual Query Builder - Condition menu

A simple condition pattern contains three elements: an argument, a condition operator and a second argument (if required for the condition).

Clicking each element field allows you to set its value. When clicking an argument field, you can edit the argument as a text string: set an object name or a certain value in this field. Right-clicking the field in the edit mode activates the popup menu with the Insert field (also called by the Shift+Enter shortcut; this item allows you to select a field from the list of all the table fields) and Insert query (this item adds a nested query) items.

Query Builder - Setting criteria

Clicking the condition operator field activates the popup menu from which you can select the operator you need.

See also:

Setting output fields

Setting grouping criteria

Setting sorting parameters


Setting output fields

The Selection tab displays the output fields of the query as a grid.

The grid allows you to edit the names of the query output fields, specify their display order and set the aggregate functions for each field. To remove a field from the list, right-click the field row and select the Delete current row popup menu item.

Visual Query Builder - Selection field menu

The popup menu also allows you to insert a nested query and add a CASE clause. To edit the CASE clause, use the CASE END AS dialog.

Query Builder - Setting output fields - CASE

To change the input query field, click it and then type the field name or select it from the drop-down list.
To change the output query field name, set the cursor at the corresponding column and type the required field name.

To reorder fields in the list, use the [image] [image] buttons.

Query Builder - Setting output fields

To set an aggregate function for a field, click the field row within the Aggregate column, and then type in the function name or select one from the drop-down list (SUM, MIN, MAX, AVG, or COUNT).

The Grouping column displays the grouping state for each of the output fields.

CheckBox2 Select only unique records
If you check this option, the duplicate records (if any) are not included into the query result (i.e. the DISTINCT keyword is added to the SQL query text).

See also:

Setting criteria

Setting grouping criteria

Setting sorting parameters


Setting grouping criteria

The Grouping criteria tab allows you to set conditions for grouping query records.

The grouping condition pattern fields are set in the same way as those of the Criteria pattern.

Query Builder - Setting grouping criteria

These conditions will be included in the HAVING statement of the generated SQL query.

See also:

Setting criteria

Setting output fields

Setting sorting parameters


Setting sorting parameters

The Sorting tab allows you to set sorting parameters for the records returned by the query.

The working area contains the Output fields list (at the left) which represents all fields of the objects used in the query, and the Sorted fields list (at the right) which contains the fields to sort records by.

To move a field from one list to another, drag the selected field or use the Add and Remove buttons: Items - Move to Selected Items - Move all to Selected Items - Move to Available Items - Move all to Available .

To change the sorting order for a sorted field, select the field in the Sorted fields list and move it using the Up and Down buttons.

To change the sorting direction, select the field in the Sorted fields list and switch the direction (Ascending, Descending) using the corresponding A..Z/Z..A button.

Query Builder - Setting sorting parameters

See also:

Setting criteria

Setting output fields

Setting grouping criteria


Working with the editor area

The Editor area of Visual Query Builder is available within the Edit tab and is provided for working directly with the SQL query text which is generated automatically while you build the query visually.

You can edit this text according to the rules of SQL, and all the changes will be displayed within the Builder tab respectively.

To learn more about the SQL Editor features available within the Edit tab, see Working with SQL Editor area.

Query Builder - Working with the editor area

See also:

Working with diagram area

Query execution

SQL Editor


Query execution

When all the query parameters are set, you can immediately execute the query in Visual Query Builder.

To execute a query, click the btnExecuteQuery Execute query item of the Navigation bar. You can also use the F9 hot key for the same purpose.

If the query parameters are specified correctly, the query is executed and, in case the query statement is supposed to return data (e.g. as SELECT statement), the returned dataset appears within the Result tab.

If SQL syntax of the query contains any errors, the query execution is stopped and the corresponding error message is displayed in the status bar area at the bottom of the Query Builder window.

Query Builder - Query execution

By default, data returned by a query are displayed as a grid (see Data View for details). The context menu of the grid allows you to Export Data, Export As SQL Script.

Query Builder - Viewing results

See also:

Working with diagram area

Working with the editor area

Data View


Query parameters

Both SQL Editor and Visual Query Builder support parameters usage inside the query text. A parameter is a kind of variable for which a value can be specified just before the query execution. In the query text the parameter should appear as an identifier with a colon (':') at the beginning, e.g.

SELECT * FROM MYTABLE WHERE ID = :param1;

Note: The Allow using of parameters in query text option should be checked on the Tools page of the Environment Options dialog for this feature to be enabled.

See also:

SQL Editor

Visual Query Builder


Input parameters dialog

The Input Parameters dialog is used to specify the query parameters as well as values of the input parameters of the query before execution.

Query parameters - Input parameters dialog

Click OK button to apply the values and execute the query or click Cancel button to abort execution.


Data Management

Table data and query results are displayed on the Data or Results tab of Table Editor, SQL Editor, Visual Query Builder, etc.

Data can be displayed in one of the following modes: Grid View, Form View, Print Data, BLOB View. See Data View to learn more about these modes. You are also provided with a number of filtering tools when working with your data.

See also:

Getting Started

Database Explorer

Database Management

Database Objects Management

Query Management Tools

Import/Export Tools

Change management

Database Tools

Instance Services

Personalization

How To...


Data View

SQL Manager for DB2 provides you with powerful tools for viewing, editing and printing data from tables and queries:

  • table / materialized query table / view data are available within the Data tab of Table Editor / MQ Table Editor / View Editor correspondingly;
  • upon a query execution the returned dataset appears within the Result(s) tab of SQL Editor / Query Builder (in SQL Editor the position of the tab depends on the Results on Edit tab / Results on separate tab selection in the Navigation bar).

The data can be displayed in one of four available modes: Grid View, Form View, Print Data and BLOB View. The status bar at the bottom displays the number of records in the current dataset, the time the records were fetched by the application and the status of the records (whether the data are read-only or editable).

Please see the succeeding chapters to learn how to work with your data in the simplest and most efficient way.

  • Using Navigation bar and Toolbars
  • Grid View
  • Form View
  • Print Data
  • BLOB View
  • Applying changes

See also:

Custom Filter

Filter Builder dialog

Table Editor

View Editor


Using Navigation bar and Toolbars

When the Data tab (in Table Editor, View Editor) or the Result(s) tab (in SQL Editor, Query Builder) is selected, the Navigation bars of these tools contain the Data Management group which allows you to:

iconCommit commit transaction

iconRollback rollback transaction

export data

export data as SQL script

import data (in Table Editor only)

Data View - Using Navigation bar

Items of the Navigation bar are also available on the ToolBar. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.

The Navigation panel contains toolbars allowing you to:

  • go to the first record of the dataset;
  • go to the previous page;
  • go to the previous record;
  • go to the next record;
  • go to the next page;
  • go to the last record of the dataset;
  • insert a new record (in Table Editor only);
  • delete the selected record (in Table Editor only);
  • edit the selected record (in Table Editor only);
  • post edit (in Table Editor only);
  • cancel edit (in Table Editor only);
  • refresh data;
  • set bookmark;
  • go to saved bookmark;
  • call the Filter Builder dialog;
  • search for a string in the currently selected column data;
  • enable multi-level mode to display data of the table(s) related by a foreign key (in Table Editor only);
  • specify the maximum number of records (record limit) for displaying data (in Table Editor, View Editor only);
  • navigate within the dataset using the specified record limit (in Table Editor, View Editor only).

Data View - Navigation pane

The Toolbar of the Print Data mode allows you to:

  • customize the report using Report Formatter and the Report Options dialog;
  • load a report from an external *.rps file;
  • save the current report to an external *.rps file;
  • print the report using the default printer;
  • set printing options using the standard Print dialog;
  • call the Page Setup dialog;
  • show/hide report thumbnails;
  • customize the Report Title;
  • add Date and Time, Page Numbering, show/hide empty pages;
  • shrink the report to the page;
  • specify background color;
  • zoom in/out, setup zoom, zoom page width, whole page, two/four/multiple pages;
  • select the active page of the report;
  • go to first/previous/next/last page of the report.

Data View - Print Data - Toolbar

The Toolbar of the BLOB View mode allows you to:

  • select a BLOB column;
  • select encoding (ANSI, UTF-8, UNICODE-16);
  • load BLOB content from an external file;
  • save the BLOB column content to an external file;
  • cut/copy/paste selected text to/from clipboard (enabled for the Text and Rich Text tabs only);
  • undo changes;
  • print the text (enabled for the Text, Rich Text and HTML tabs only);
  • select font to be applied to the selected text (enabled for the Rich Text tab only);
  • select font size to be applied to the selected text (enabled for the Rich Text tab only);
  • make the selected text bold/italic/underlined (enabled for the Rich Text tab only);
  • align left/center/right (enabled for the Rich Text tab only);
  • add/remove list bullets (enabled for the Rich Text tab only).

Data View - BLOB View - Toolbar

See also:

Grid View

Form View

Print Data

BLOB View

Applying changes

Customize toolbars and menus


Grid View

By default, data returned by a query are displayed as a grid. It is indicated by the Grid View tab selected on the View mode panel at the bottom of the Results area of the window.

When in the Grid View mode, the columns correspond to the fields and the rows correspond to the records.

If more convenient, you can change the order of the columns by dragging their headers horizontally. Clicking the column caption sorts data by the values of this column in the ascending or the descending mode. The navigation panel at the top of the grid allows you to browse the data quickly, to insert, update and delete records, and to set a filter for the records using the Filter Builder dialog and other tools.

The Navigation bar of the parent window, toolbars and the context menu of the grid provide you with a number of data management functions: Export Data, Import Data, Export as SQL Script and more.

  • Customizing columns
  • Grouping data within the grid
  • Filtering records
  • Using the context menu
  • Working in multi-level mode
  • Browsing data in card view
  • Column Summary
  • Copying records

Data View - Grid View

Hint: To increase the speed of opening tables and views with extremely large number of records, you can use options of the Limit options in table and view editors group available in the Grid | Data Options section of the Environment Options dialog.

See also:

Using Navigation bar and Toolbars

Form View

Print Data

BLOB View

Applying changes


Customizing columns

Selecting visible columns

When working in the Grid View mode, you can specify which columns of the current dataset will be visible. Click the btnSelectVisibleColumns button available in the top left corner of the data grid and select/deselect columns in the drop-down list to specify their visibility/invisibility.

Data View - Grid View - Selecting visible columns

Changing columns order

For your convenience the possibility to change the order of the columns in the data grid is available. To reorder columns, drag a column header horizontally to a place in between two other column headers indicated with green arrows.

Data View - Grid View - Changing columns order

See also:

Grouping data

Filtering records

Working in multi-level mode

Working in card view mode

Column Summary


Grouping and sorting data

In order to sort data, do the following:

open data at the Data or Results tab, choose the column by which you need to sort data and click the column title.

If the column was not sorted, the first click will sort it in the ascending order and the second one - in the descending order.

Clear Sorting

To cancel the sorting, open the context menu by right-clicking the necessary column and choose the Clear Sorting item, or press the Ctrl button and click the column title.

If necessary, you can group the data in grid by any of the columns.

This operation is performed by dragging the column header to the gray "Group by" box area at the top. In order to display this area, select the CheckBox Show "Group by" box option available in the Grid section of the Environment Options dialog.

When grouping by a column is applied to the grid, all the records are displayed as subnodes to the grouping row value as displayed in the screenshot below. The grouping row can contain the column summary information specified in the Group header group of the Column Summary dialog.

To reverse grouping, just drag the column header back.

Hint: While dragging the column header back, you can also change the column position.

Data View - Grid View - Grouping data

If necessary, you can group data by two or more columns. In this case column headers are displayed hierarchically, and data are grouped by these columns in the order the column headers appear in the "Group by" area.

Data View - Grid View - Grouping data by two columns

See also:

Customizing columns

Filtering records

Working in multi-level mode

Working in card view mode

Column Summary


Filtering records

A number of filtering facilities are implemented in the grid for your convenience. You can filter records in the grid in either of the following ways:

  • right-click a row and select the Quick Filter context menu item to filter records by the current value of the selected column;

Data View - Grid View - Quick Filter

  • click the Arrow-Down button next to the column caption to display the drop-down list and select any of the column values to filter records by this value of the selected column;

Data View - Grid View - Filtering records

or

  • click the Arrow-Down button next to the column caption to display the drop-down list, then select the Custom item and build a simple filter using the Custom Filter dialog;
  • use the Set filter btnSetFilter button on the navigation panel to invoke the Filter Builder dialog and create a composite filter using the dialog.

After the filter is set, the gray filtering panel becomes visible at the bottom of the grid. This panel allows you to see the active filtering condition and easily enable or disable it using the checkbox on the left. The Arrow-down button opens the drop-down menu which allows you to browse the filter history for this dataset.

If necessary, you can click the Customize... button on the right to customize your filter and add more complicated filtering conditions within the Filter Builder dialog.

Data View - Grid View - Filtering records - Filtering panel

To remove the current filter, click the Close btnClose button.

See also:

Customizing columns

Grouping data

Custom Filter

Filter Builder dialog


Using the context menu

The context menu of the grid is aimed at facilitating your work with data: you can perform a variety of operations using the context menu items:

  • copy the selected cell value to Windows clipboard;
  • paste the clipboard content to the currently selected cell;
  • copy/paste multiple records;
  • data manipulation: Export Data from the table, Import Data to the table, Export Data as SQL Script;
  • set/disable Quick Filter;
  • clear sorting;
  • set a value for the selected cell: NULL, Empty string (for string fields), Now (for TIME fields), "Zero" (for DATE fields);
  • edit the BLOB value or save the BLOB to file using BLOB viewer/editor;
  • expand/collapse grid levels and navigate within the tabs;
  • manage grid levels: add a new grid level, delete the current grid level (this item is enabled only when the detail level exists and is currently focused);
  • switch to the Card View mode;
  • view Column Summary;
  • select visible/invisible columns of the dataset;
  • fit column width for better representation;
  • specify the grid mode: Load All Rows, Load Visible Rows, Default;
  • view/edit grid properties.

Data View - Grid View - Using the context menu

Note: If the CheckBox Show editor immediately and CheckBox Always show editor options on the Environment options | Grid tab are checked then the context menu of a grid can be evoked by selecting the necessary cell and right-clicking the table header. Otherwise, right-clicking the cell evokes the cell editing menu.


Working in multi-level mode

One of unique features of SQL Manager for DB2 is the ability to work with data in multi-level mode to view and modify data in several related tables simultaneously.

To manage grid levels, right-click the grid and select the Grid Levels context menu group. Items of this group allow you to:

  • add a new grid level using Create Grid Level Wizard;
  • delete the current grid level;
  • switch between the ordinary Table View and the Card View modes.

Data View - Grid View - Working in multi-level mode

See also:

Using the context menu

Create Grid Level wizard


Create Grid Level wizard

Create Grid Level Wizard allows you to add a new detail level to the grid in order to get master-detail representation of your data.

To start the wizard, right-click the grid, select the Grid Levels context menu group and proceed to the Add Grid Level... item within this group.

  • Specifying master level
  • Selecting source table
  • Binding master and detail levels
  • Query parameterization
  • Setting additional parameters

Create Grid Level - Add Grid Level


Specifying master level

Use the drop-down list to select the table of the master level to which a new level will be added.

Source of new level data

Select the source type of the new level data: RadioButton Table or RadioButton Query.

Create Grid Level - Specifying master level

Click the Next button to proceed to the Defining source for detail level step to select a table for the detail level or input a query, depending on whether the RadioButton Table or the RadioButton Query option has been selected.


Defining source for detail level

If the RadioButton Table option has been selected at the previous step, you should now specify a table for the detail view using the Table name drop-down list. Set the CheckBox Show tables related by foreign keys only option to narrow the list of tables by including only tables linked by Foreign keys.

Create Grid Level - Defining source for detail level - Table

If the RadioButton Query option has been selected at the previous step, you should now enter a query that will be used as the source of the new grid level. If necessary, you can use Query Builder to build the SQL query visually.

Create Grid Level - Defining source for detail level - Query

Click the Next button to proceed to the Binding master and detail levels step of the wizard.


Binding master and detail levels

Define pairs of fields to link the Master Level and the Detail Level data sources:

  • select a field in the Master Level Key Fields list;
  • select a corresponding field in the Detail Level Key Fields list;
  • click Add to set correspondence between the selected fields.

The newly created correspondences are listed in the Links Between Master and Detail Levels area. If necessary, you can delete any correspondence using the Remove button.

The From Foreign Key... menu is available if the CheckBox Show tables related by foreign keys only option has been selected at the previous step. This menu allows you to select the foreign key to be used for identifying master-detail levels (if the table has more than one foreign key relation).

Create Grid Level - Binding master and detail levels

Click the Next button to proceed to the Setting additional parameters step or to the Query parameterization step of the wizard if RadioButton Query was selected at the Specifying master level step of the wizard.


Query parameterization

If RadioButton Query was selected at the Specifying master level step of the wizard, you should now transform the query to a parameterized form that will be used in the 'Load visible rows' Grid Mode (see the Grid | Data Options section of the Environment Options dialog to get more information about grid modes offered by SQL Manager).

Create Grid Level - Query parameterization

Click the Next button to proceed to the Setting additional parameters step of the wizard.


Setting additional parameters

Level caption

Set the caption to be used for the new level in the grid.

Level type

Select the type of view you wish to be applied to the grid level: RadioButton Table view or RadioButton Card view.

Create Grid Level - Setting additional parameters

When you are done, click the Finish button to complete the operation.


Working in card view mode

Depending on your preferences, you can represent data in the Table View or in the Card View modes.

To switch to the Card View mode of data representation, right-click the grid, expand the Grid Levels context menu group and select the Card View item within this group.

Data View - Grid View - Working in card view mode

See also:

Using the context menu


Column summary

If necessary, you can select the Column Summary... context menu item to open the Column Summary dialog which allows you to set the summary for each particular column that will be displayed in the grid footer, group header and group footer areas.

Data View - Grid View - Column Summary

The Column list displays all columns of the dataset. Select a column and specify which information should be displayed in the grid as summary for this column:

RadioButton None

RadioButton Sum (for numeric types only)

RadioButton Minimum (for numeric and date/time types only)

RadioButton Maximum (for numeric and date/time types only)

RadioButton Count

RadioButton Average (for numeric types only)

Use the Number format edit boxes in each group to specify the preferable format for summary info representation.

See also:

Using the context menu


Copying records

When you copy several records to clipboard and paste them into the grid, you are offered to set correspondence between columns of the clipboard and fields of the target DB2 table using the Associate Columns dialog.

Data View - Grid View - Associate columns

The Clipboard Columns and Grid Columns lists display the source and target dataset columns respectively. Set correspondence between the source clipboard columns and the table columns:

  • select a source clipboard column in the Clipboard Columns list;
  • select the corresponding field the target table in the Grid Columns list;
  • click the Add button to set correspondence between the selected columns;
  • the pair of columns appears in the Links between... list below;
  • repeat the operation for all the columns you need copy.

Use the Add All button to add all columns to the Links between... list on the basis of their order.

To remove a correspondence, select the pair of columns in the Links between... list and click the Remove button.

To remove all correspondences, click the Remove All button.

CheckBox First row is a header

This option specifies that the first row of the associated columns will be taken as the column header.


Form View

The Form View tab allows you to view data as a form. To activate this type of data view, select the Form View tab on the View mode panel at the bottom of the window.

The form displays the current record: field names on the left and the corresponding values on the right. If the fields are available for editing, you can edit the record directly on this form. The navigation panel at the top of the form allows you to browse the data quickly, to insert, update and delete records, and to set a filter for the records using the Filter Builder dialog.

Data View - Form View

Each field has a CheckBox Null checkbox which allows you to clear the field value and set it to NULL (if the field is nullable).

See also:

Data View

Filter Builder dialog


Print Data

Using the Print Data tab you can view data in the way they are printed, in WYSIWYG mode.

When in Print Data mode, you are provided with a powerful context menu and toolbar allowing you to design a report, change the view scope, save reports and load previously saved ones, set report options, and specify a number of printing parameters using Report Formatter and the Page Setup dialog.

Data View - Print Data

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Using Navigation bar and Toolbars

Grid View

Form View

BLOB View

Applying changes


Page Setup

The Page Setup dialog allows you to specify a number of settings pertaining to the report page.

To open the dialog, use the Page Setup [image] button available on the toolbar.

Use the following tabs of the Page Setup dialog:

  • Page
  • Margins
  • Header/Footer
  • Scaling

When you are done, you can click the Print... button at the bottom to call the Print dialog.

See also:

Report Formatter

Setting report options

Print dialog


Page

The Page tab of the Page Setup dialog allows you to specify the paper, page orientation, print order and shading settings.

Data View - Print Data - Page Setup - Page

Paper

Select one of the standard paper types in the Type list, or specify custom width and height using the Dimension group (in inches or millimeters, depending on the unit of measure specified in the Options dialog).

Use the Paper source drop-down list to select the paper feed type.

Orientation

Select the preferable page orientation (your selection is illustrated in the chart on the left):

RadioButton Portrait

RadioButton Landscape

Print Order

Select the preferable order for printing report pages (your selection is illustrated in the chart on the left):

RadioButton Down, then over

RadioButton Over, then down

Shading

CheckBox Print using gray shading

If this option is selected, gray shading (along with black and white) will be used for printing the report.


Margins

The Margins tab of the Page Setup dialog allows you to specify the size of the margins and running titles.

Data View - Print Data - Page Setup - Margins

Use the spinner controls to specify the size of top / bottom / left / right margins and header / footer (in inches or millimeters, depending on the unit of measure specified in the Options dialog). The Preview area on the right illustrates the changes you have made.

If you have specified an improper value, you can click the Fix button to correct it.

To restore the default size values, click the Restore Original button.

Center on page

This group allows you to specify whether the text should be centered horizontally and/or vertically on the page.


Header/footer

The Header/Footer tab of the Page Setup dialog allows you to specify properties of the header and footer running titles.

Data View - Print Data - Page Setup - Header and Footer

Header / Footer

Click the Font... button to specify font properties using the standard Font dialog. The font name and size are displayed in the gray area next to the Font... button.

Use the Background drop-down list to select the background color that will be applied to the page header/footer, or to customize the color using the Color and Fill Effects dialogs.

For each of the running titles you are provided with three separate text editing fields. You can use any, all or none of the fields to enter the header and footer text.

The Vertical Alignment group allows you to specify vertical alignment for the header/footer text according to any of the three available patterns.

Predefined Functions

This group allows you to add the following standard functions to the header and footer:

[Machine Name]

[User Name]

[Time Printed]

[Date Printed]

[Date & Time Printed]

[Page # of Pages #]

[Total Pages]

[Page #]

CheckBox Reverse on even pages

If this option is selected, the header and footer text will be reversed on even pages of the printing report.


Scaling

The Scaling tab of the Page Setup dialog allows you to specify the page scaling options.

Data View - Print Data - Page Setup - Scaling

Select the preferable scaling mode:

RadioButton Adjust to ... % normal size

Use the spinner control to set the percentage of the regular page size to which the page size will be adjusted.

RadioButton Fit to ... page(s) wide by ... tall

Use the spinner controls to set the maximum number of pages (by width and by height) on one page to fit its size.


Report Formatter

Report Formatter allows you to specify a number of settings pertaining to the printing form of the report.

To open the tool, click the Design Report [image] button available on the toolbar, or use the Ctrl+D shortcut.

Use the following tabs of the Format Report dialog:

  • View
  • Behaviors
  • Formatting
  • Styles
  • Preview
  • Cards
  • Charts

The Title Properties... button allows you to customize the report title using the Report Title dialog.

See also:

Page Setup

Setting report options

Print dialog


View

The View tab of the Format Report dialog allows you to specify report elements to show in the report.

Data View - Print Data - Report Formatter - View

Tick off the elements to show in the report (caption, bands, headers, footers, group footers, expand buttons, filter bar) and on every page of the report (caption, bands, headers, footers, filter bar).

The Preview area on the right illustrates the changes you have made.


Behaviors

The Behaviors tab of the Format Report dialog allows you to specify the way (behavior) the report elements will appear on the printing form.

Data View - Print Data - Report Formatter - Behaviors

Selection

CheckBox Process selection / CheckBox Process exact selection

Specify whether the text selection should or should not be processed (precisely) for the printing form.

Expanding

Tick off the elements to expand in the report: groups, details, cards.

Size

CheckBox Auto Width

If this option is selected, the table will be resized automatically to fit the page by width.

The Preview area on the right illustrates the changes you have made.


Formatting

The Formatting tab of the Format Report dialog allows you to specify Look and Feel, Refinements and Pagination options.

Data View - Print Data - Report Formatter - Formatting

Look and Feel

This setting determines the manner in which the cells are painted. Use the drop-down list to select the painting style that will be applied to the cells on the printing form:

Flat

Standard

UltraFlat

Refinements

Options of this group allow you to reduce the report size.

CheckBox Transparent graphics

If this option is selected, the images will be drawn transparent in the report.

CheckBox Display graphic as text

If this option is selected, text will be displayed instead of the images.

CheckBox Flat CheckMarks

If this option is selected, the checkboxes will be drawn flat.

Pagination

Specify the way pagination will be performed for the report: By TopLevel groups or One group per page.

The Preview area on the right illustrates the changes you have made.


Styles

The Styles tab of the Format Report dialog allows you to specify styles to be applied to the report elements.

Data View - Print Data - Report Formatter - Styles

CheckBox Use native styles

This option determines whether the native Windows style will be applied to the report elements.

Note: The Native style option is currently supported for the Windows® XP operating system only.

The elements list displays the names of all report elements, with background color and font properties specified by default. You can Use native styles for them or customize them according to your preferences.

To edit an element, select it in the list and use the buttons to the right to edit the style for it.

Click the Font... button to specify font properties using the standard Font dialog.

Click the Color... button to customize the background color using the standard Color dialog.

Click the Texture... button to load an image that will be used as the texture for the element.

To rollback the changes, click the Clear button.

To restore the default stylesheet properties, click the Restore Defaults button.

If you need to save the current style sheet, you can click the Save as... button.

These items are also available through the context menu of the elements list.

Style Sheets

Use the drop-down menu to select the style sheet you need. To manage the style sheets, use the corresponding buttons below: New..., Copy..., Delete..., Rename...

The Preview area on the right illustrates the changes you have made.


Preview

The Preview tab of the Format Report dialog allows you to specify report preview options.

Data View - Print Data - Report Formatter - Preview

CheckBox Visible

This option specifies visibility of the grouping rows.

CheckBox Auto height

If this option is selected, the table will be resized automatically to fit the page by height.

Max line count

Use the spinner control to specify the maximum possible number of lines.

The Preview area on the right illustrates the changes you have made.


Cards

The Cards tab of the Format Report dialog allows you to specify properties for the card view.

Data View - Print Data - Report Formatter - Cards

Sizes

CheckBox Auto Width

If this option is selected, the cards will be resized automatically to fit the page by width.

CheckBox Keep same width

Select this option to keep the card width fixed.

CheckBox Keep same height

Select this option to keep the card height fixed.

Spacing

This group allows you to specify horizontal and vertical spacing between cards.

Framing

CheckBox Border

This option specifies visibility of the card borders.

CheckBox Horizontal lines

This option specifies visibility of the horizontal lines (row delimiters) within cards.

CheckBox Vertical lines

This option specifies visibility of the vertical lines (column delimiters) within cards.

Shadow

Use the Color drop-down list to select the color that will be applied to the card shadows. If necessary, specify the color depth using the corresponding spinner control.

The Preview area on the right illustrates the changes you have made.


Charts

The Charts tab of the Format Report dialog allows you to specify options for the charts used in the report.

Data View - Print Data - Report Formatter - Charts

CheckBox Transparent

If this option is selected, the charts will be drawn transparent in the report.

The Preview area on the right illustrates the changes you have made.


Setting report options

Options dialog

The Options dialog allows you to specify a number of settings pertaining to the printing report.

To open the dialog, open the Design Report [image] menu available on the toolbar and select the Preferences item.

Data View - Print Data - Report options

Show

Tick off the elements to show in the printing report (margins, margins hints, margins hints while dragging).

Use the Measurement Units drop-down list to select the unit of measure that will be used in report settings: default, inches, or millimeters.

Zoom Parameters

CheckBox Zoom on roll with IntelliMouse

If this option is selected, you can zoom in/out by scrolling up/down (with a Microsoft® mouse or a compatible mouse used).

Zoom Step

Use the spinner control to specify the percentage of the original page size to be considered as one zoom step.

Use the Margins Color drop-down list to select the color that will be applied to the report margins.

Report Title dialog

The Report Title dialog allows you to specify the report title text and properties.

To open the dialog, use the Title... button available on the toolbar.

Data View - Print Data - Report options - Title

Mode

Use the drop-down list to select where the report title should be displayed on the first page, on every top page, or not displayed at all.

Text

Use the edit box to enter the text of the report title.

Properties

CheckBox Transparent

If this option is selected, the report title will be drawn transparent.

Use the Color drop-down list to select the color that will be applied to the report title (enabled if the CheckBox Transparent option is not selected).

Click the Font... button to specify title font properties using the standard Font dialog. The font name and size are displayed in the gray area next to the Font... button.

CheckBox Adjust on scale

If this option is selected, the title can be adjusted on scale.

Alignment

Use the Horizontally drop-down list to select the type of horizontal alignment to be applied to the report title: Left, Center, or Right.

Use the Vertically drop-down list to select the type of vertical alignment to be applied to the report title: Top, Center, or Bottom.

To restore the default title properties, click the Restore Defaults button.

Date and Time dialog

The Date and Time dialog allows you to specify the date/time formats to be used in the report.

To open the dialog, open the Title... menu available on the toolbar and select the Date and Time... item.

Data View - Print Data - Report options - Date and Time

Select the preferable values from the Available Date Formats and the Available Time Formats lists. If necessary, you can specify that the date/time will be updated automatically.

To apply the default date/time format, click the Default... button.

Page Number Format dialog

The Page Number Format dialog allows you to specify the formats for page numbers to be used in the report.

To open the dialog, open the Title... menu available on the toolbar and select the Page Numbering... item.

Data View - Print Data - Report options - Page Number Format

Select the preferable number format from the Number Format drop-down list.

Use the Page Numbering section to specify whether page numbering should continue from the previous section (if any) or start at the specified number.

To set the default numbering values, click the Default... button.

Zoom dialog

The Zoom dialog allows you to zoom the report page more better representation.

To open the dialog, open the Zoom [image] menu available on the toolbar and select the Setup zoom... item.

Data View - Print Data - Report options - Zoom

Select the preferable percentage of zoom value (500%, 200%, 150%, 100%, 75%, 50%, 25%, 10%) or specify one of frequently used values:

RadioButton Page Width

RadioButton Whole Page

RadioButton Two Pages

RadioButton Four Pages

RadioButton Many Pages (click the chart below and select the item you need)

If necessary, you can set a custom percent value using the Percent spinner control below.

The Preview area on the right illustrates the changes you have made.

See also:

Page Setup

Report Formatter

Print dialog


Print dialog

The standard Print dialog allows you to specify printing settings for the report in groups: printer, page range, copies.

To open the dialog, click the Print dialog btnPrintSetup button available on the toolbar, or use the Ctrl+P shortcut.

Data View - Print Data - Print dialog

When you are done, click the Print button to start printing.

If you need to change any page settings before printing, you can click the Page Setup... button at the bottom to call the Page Setup dialog.

See also:

Page Setup

Report Formatter

Setting report options


BLOB View

SQL Manager for DB2 provides BLOB Viewer/Editor to view and edit BLOB (Binary Large Object) fields content. The BLOB Viewer/Editor can be invoked from the data grid within Table Editor, SQL Editor, Visual Query Builder, etc.

  • Navigation within the BLOB Viewer/Editor
  • Viewing/Editing BLOB field as Hexadecimal dump
  • Viewing/Editing BLOB field as plain Text
  • Viewing/Editing BLOB field as Rich Text (RTF)
  • Viewing/Editing BLOB field as Image
  • Viewing/Editing BLOB field as HTML
  • Viewing/Editing BLOB field as XML

Data View - BLOB View - Image

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Using Navigation bar and Toolbars

Grid View

Form View

Print Data

Applying changes


Navigation within BLOB Editor

The BLOB Viewer/Editor provides an ability to navigate within the records using DB Navigation buttons on the navigation panel at the top of the viewer window.

Using items of the navigation panel and the drop-down menu you can browse the data quickly, insert, update and delete records, set a filter for the records using the Filter Builder dialog, load new BLOB content and save the current content to files.

The toolbar allows you to switch the fields and perform a number of editing operations. The set of toolbar items depends on the current selection and view mode.

Data View - BLOB View - Navigation within BLOB Editor

See also:

Editing as Hexadecimal

Editing as Text

Editing as Rich Text

Editing as Image

Editing as HTML

Editing as XML


Editing as Hexadecimal

The Hexadecimal tab allows you to view/edit the BLOB data as hexadecimal.

The toolbar provides additional functionality for BLOB Viewer/Editor: use the Save to file btnSave and the Load from file iconLoadFromFile toolbar buttons to save the hexadecimal data to a file, or load data from a file.

Use the Ins key to switch between the Insert and Overwrite modes.

Data View - BLOB View - Hexadecimal

See also:

Navigation within BLOB Editor

Editing as Text

Editing as Rich Text

Editing as Image

Editing as HTML

Editing as XML


Editing as Text

The Text tab allows you to view/edit the BLOB data as plain text.

The toolbar provides additional functionality for BLOB Viewer/Editor: use the Save to file btnSave and the Load from file iconLoadFromFile toolbar buttons to save the text to a *.txt file, or load text from a file. Additionally, you can use the Cut, Copy, Paste, Select All, Undo, Word Wrap context menu items for editing the text efficiently, and the Print context menu item to print the content of the Text tab.

Data View - BLOB View - Text

See also:

Navigation within BLOB Editor

Editing as Hexadecimal

Editing as Rich Text

Editing as Image

Editing as HTML

Editing as XML


Editing as Rich Text

The Rich Text tab allows you to view/edit the BLOB data in Rich Text format (RTF).

The toolbar provides additional functionality for BLOB Viewer/Editor: use the Save to file btnSave and the Load from file iconLoadFromFile toolbar buttons to save the Rich Text to a *.rtf file, or load text from a file. Additionally, you can use the Cut, Copy, Paste, Select All, Undo context menu items for editing the text efficiently, and the Print context menu item to print the content of the Rich Text tab.

Data View - BLOB View - Rich Text

See also:

Navigation within BLOB Editor

Editing as Hexadecimal

Editing as Text

Editing as Image

Editing as HTML

Editing as XML


Editing as Image

The Image tab allows you to view the BLOB data as image.

The toolbar provides additional functionality for BLOB Viewer/Editor: use the Save to file btnSave and the Load from file iconLoadFromFile toolbar buttons to save the image to a *.png, *.wmf, *.ico or *.jpg file, or load an image from a file.

Data View - BLOB View - Image

See also:

Navigation within BLOB Editor

Editing as Hexadecimal

Editing as Text

Editing as Rich Text

Editing as HTML

Editing as XML


Editing as HTML

The HTML tab allows you to view the BLOB data as HTML (Hyper-Text Markup Language format) - in the way this data would be displayed by your Internet browser.

The toolbar provides additional functionality for BLOB Viewer/Editor: use the Save to file btnSave and the Load from file iconLoadFromFile toolbar buttons to save the content as a *.html, or *.htm file, or load content from a file.

Data View - BLOB View - HTML

See also:

Navigation within BLOB Editor

Editing as Hexadecimal

Editing as Text

Editing as Rich Text

Editing as Image

Editing as XML


Editing as XML

The XML tab allows you to view/edit the XML (eXtensible Markup Language) data.

The toolbar provides additional functionality for BLOB Viewer/Editor: use the Save to file btnSave and the Load from file iconLoadFromFile toolbar buttons to save the content as *.xml or load XML content from a file.

Data View - BLOB View - XML

The XML content is represented as a tree-like structure consisting four editable fields: Name, Unique, Attributes and Value. You can edit data and modify the structure using drag-n-drop operations and items of the context menu.

Hint: Hold the Shift key when you drag-and-drop a node to insert it as a child one.

The context menu allows you to:

  • add a node (a child node relatively to the selected one);
  • remove the selected node;
  • copy the selected node source to clipboard;
  • cut the selected node;
  • copy the selected node;
  • paste a node from clipboard.

Click the Item attributes [image] button in the editing mode of an Attribute item to add or edit attributes.

Data View - BLOB View - XML - Item attributes

Use the btnAddItem btnRemoveItem buttons to add or remove an attribute. Click the required attribute name or value to edit.

See also:

Navigation within BLOB Editor

Editing as Hexadecimal

Editing as Text

Editing as Rich Text

Editing as Image

Editing as HTML


Applying changes

After changes are done, click the Post Edit btnPostEdit button on the navigation panel to apply the changes or the Cancel Edit btnCancelEdit button to discard the changes.

Data View - Applying changes

See also:

Using Navigation bar and Toolbars

Grid View

Form View

Print Data

BLOB View


Custom Filter

The Custom Filter dialog is one of the filtering facilities implemented in Data View for your convenience.

To open the dialog, click the Arrow-Down button next to the column caption, and select the Custom item from the drop-down list.

Select a logical operator for checking the column values (like, is less than, is greater than, etc.) and set a value to be checked by this operator in the corresponding box on the right.

Data management - Custom Filter

If necessary, you can set the second condition and specify the relation between the two conditions: whether both of them should be satisfied (AND) or just any of them (OR). Use the '_' character to represent any single symbol, and use the '%' character to represent any series of symbols in the condition string.

See also:

Data View

Filter Builder dialog


Filter Builder dialog

The Filter Builder dialog is a powerful filtering tool implemented in Data View for your convenience.

The dialog is aimed at facilitating the procedure of creating and applying complex filter criteria for data. In addition, the tool allows you to save filter criteria to an external *.flt file for future use.

To open the Filter Builder dialog, use the Set filter btnSetFilter button on the navigation panel available within the Data tab of Table Editor and the Result(s) tabs of SQL Editor and Query Builder.

  • Invoking the Filter Builder dialog
  • Adding a new condition to the filter
  • Setting filter criteria
  • Setting filter operator
  • Setting filter criteria values
  • Adding a new group
  • Setting group operator
  • Applying filter conditions

See also:

Data View

Custom Filter


Invoking the Filter Builder dialog

The Filter Builder dialog can be invoked in either of the following ways:

  • if a simple filter or the Custom Filter is being used, click the Customize... button on the gray filtering panel;

Filter Builder dialog - Invoking the Filter Builder dialog

  • use the Set filter btnSetFilter button on the navigation panel and create a composite filter using the dialog.

Data View - Navigation pane

The succeeding pages of this chapter are intended to illustrate usage of the Filter Builder dialog. Please see the instructions below to learn how to perform various operations in the easiest way.

See also:

Adding a new condition

Setting filter criteria

Setting filter operator

Setting filter criteria values

Adding a new group

Setting group operator

Applying filter conditions


Adding a new condition

Suppose we need to select data from the sample table EMPLOYEE to view the list of IT specialists hired after 6/15/2009. These criteria are applied to the HIRE_DATE, the DEPT_ID and the POSITION fields.

Click press the button to add a new condition - this will add a new condition to the criteria. Alternatively, you can click the Filter button and select the Add Condition popup menu item.

Filter Builder dialog - Adding a new condition

See also:

Invoking the Filter Builder dialog

Setting filter criteria

Setting filter operator

Setting filter criteria values

Adding a new group

Setting group operator

Applying filter conditions


Setting filter criteria

As we need to apply the filter criteria to the HIRE_DATE field, we click the column box (next to the ellipsis EllipsisButton button) to open the drop-down list displaying the available column names and select the HIRE_DATE item.

Filter Builder dialog - Setting filter criteria

See also:

Invoking the Filter Builder dialog

Adding a new condition

Setting filter operator

Setting filter criteria values

Adding a new group

Setting group operator

Applying filter conditions


Setting filter operator

Since we need the list of employees hired after 6/15/2009, we need to select the IS GREATER THAN operator from the corresponding drop-down list.

Filter Builder dialog - Setting filter operator

See also:

Invoking the Filter Builder dialog

Adding a new condition

Setting filter criteria

Setting filter criteria values

Adding a new group

Setting group operator

Applying filter conditions


Setting filter criteria values

Next, we need to specify value '6/15/2009' for the IS GREATER THAN operator.

Similarly, if, for example, we need to get the list of employees hired during the 6/15/2008 - 6/15/2009 term, we set the BETWEEN filter operator (this will add two empty value boxes to specify the inclusive range for the BETWEEN condition) and specify the range for the operator, i.e. the '6/15/2008' and the '6/15/2009' values in the corresponding value boxes.

It is possible to set the date value manually by typing it in, or via the date editor which is activated when you click the value box.

Filter Builder dialog - Setting filter criteria values

Editors used in value boxes are determined by the data type assigned to the corresponding columns.

See also:

Invoking the Filter Builder dialog

Adding a new condition

Setting filter criteria

Setting filter operator

Adding a new group

Setting group operator

Applying filter conditions


Adding a new group

Since we also need to get the list of IT specialists (i.e. those registered in a department and having an IT-oriented job), we can add a complex filter condition combining simple conditions with the AND operator (however, in this particular case we can just add them on the same root level as for the existing condition).

If you need to add a group of conditions, click the ellipsis EllipsisButton button for the HIRE_DATE condition and select the Add Group popup menu item.

Filter Builder dialog - Adding a new group

See also:

Invoking the Filter Builder dialog

Adding a new condition

Setting filter criteria

Setting filter operator

Setting filter criteria values

Setting group operator

Applying filter conditions


Setting group operator

Conditions of complex criteria can be combined with any of the four logical operators used: AND, OR, NOT AND, NOT OR.

In our case it is enough to click the group operator box and select the AND item from the drop-down menu.

Filter Builder dialog - Setting group operator

See also:

Invoking the Filter Builder dialog

Adding a new condition

Setting filter criteria

Setting filter operator

Setting filter criteria values

Adding a new group

Applying filter conditions


Applying filter conditions

Suppose we have created a condition within the new group. If we need, we can add more conditions at the same level and specify the required values using the value boxes. When the operation is completed, the Filter Builder dialog will look like in the screenshot below.

Click the Apply button to see the result of the filtering you have made, and click OK or Cancel to close the dialog with or without saving your filter conditions respectively.

Filter Builder dialog - Applying filter conditions

The Filter Builder dialog allows you to save filter criteria to and load them from external files. Clicking the Save As… or the Open… buttons activates the corresponding dialogs. Filter settings are stored in *.flt files.

Please be informed that a column in the file is referenced by its position within a view, hence filter settings cannot be correctly restored if columns have been deleted from the view after saving the filter to a file.

See also:

Invoking the Filter Builder dialog

Adding a new condition

Setting filter criteria

Setting filter operator

Setting filter criteria values

Adding a new group

Setting group operator


Import/Export Tools

Using SQL Manager for DB2 you are provided with powerful tools to import and export data to/from your DB2 database.

Export Data Wizard

Exports data to various supported formats including MS Excel, MS Access, RTF, HTML, PDF, CSV, XML, MS Excel 2007 and more.

Import Data Wizard

Imports data from any of supported formats: MS Excel, MS Access, DBF, TXT, CSV, XML, MS Excel 2007, MS Word 2007 and more.

Export Data as SQL Script

Exports data to an SQL script as a number of INSERT statements.

Using templates

Facilitates using import/export wizards.

See also:

Getting Started

Database Explorer

Database Management

Database Objects Management

Query Management Tools

Data Management

Change management

Database Tools

Instance Services

Personalization

How To...


Export Data Wizard

Export Data Wizard allows you to export data from a table / view or from a query result to any of supported formats (MS Excel, MS Access, MS Word, RTF, HTML, PDF, TXT, CSV, XML, DBF, MS Excel 2007, MS Word 2007, etc.). You can save your settings as a template any time for future use.

To start the wizard, right-click the object in DB Explorer and select the Data Manipulation | [image] Export Data... context menu item.

Alternatively, you can open the Data tab of Table Editor / View Editor or the Result(s) tab of SQL Editor / Query Builder, right-click the grid there and select the Data Manipulation | [image] Export Data of <object_name>... context menu item.

  • Setting name and format for the destination file
  • Selecting fields for export
  • Adjusting formats applied to exported data
  • Setting header and footer text for the destination file
  • Setting format-specific options
  • Setting common export options
  • Exporting data

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Import Data Wizard

Export as SQL Script

Using templates


Setting destination file name and format

This step of the wizard allows you to select the destination file format you need to export data into.

Destination file name

Type in or use the btnSaveAs button to specify the path to the file using the Save as... dialog. The file name extension changes automatically according to the selected Destination format.

Note: If the target file already exists, the application will show a warning dialog where you can choose the action you need.

Export Data - Setting destination file name and format

Destination format

Specify the format of the destination file. For details refer to Supported file formats.

Click the Next button to proceed to the Selecting fields for export step of the wizard.


Selecting fields for export

This step of the wizard allows you to select the table field(s) to be exported.

To select a field, you need to move it from the Available fields list to the Selected fields list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the fields from one list to another.

Export Data - Selecting fields for export

If you leave all the fields in the Available fields list, all fields of the table (except BLOBs) will be exported.

CheckBox Allow captions

Check this option if you need to export the field captions as well.

Click the Next button to proceed to the Adjusting data formats step of the wizard.


Adjusting data formats

This step allows you to customize formats applied to exported data.

Data formats

Edit the format masks to adjust the result format in the way you need: Integer, Float, Date, Time, DateTime, Currency, Boolean True, Boolean False, NULL string, Decimal separator, Thousand separator, Date separator, Time separator.

Export Data - Adjusting data formats

Hint: The formats used by default are specified in the Data Export section of the Environment Options dialog.

For more details refer to Format specifiers.

Click the Next button to proceed to the Setting header and footer step of the wizard.


Setting header and footer

Set Header text and Footer text for the result file. This text will appear at the beginning and at the end of the result file respectively.

Export Data - Setting header and footer

Click the Next button to proceed to Setting format-specific options.


Setting format-specific options

This step of the wizard allows you to customize Format-specific options:

  • Excel options
  • Access options
  • Word / RTF options
  • HTML options
  • PDF options
  • TXT options
  • CSV options
  • XML options
  • MS Excel 2007 / ODS options
  • MS Word 2007 / ODT options

To get more information about the file formats, see the Supported file formats page.


Excel options

This step allows you to set options for the target MS Excel (*.xls) file.

You can customize Data format, Extensions and set Advanced options available within the corresponding tabs:

  • Data format
  • Extensions
  • Advanced

Export Data - Format-specific options - Excel

When you are done, click the Next button to proceed to Setting common export options.


Data format

The Data Format tab contains general options which allow you to adjust the format for each kind of Excel cells. This means that you can specify such parameters as font, borders, filling color and method, etc. for each entity (such as data field, header, footer, caption, data, hyperlink and so on) separately. Also it is possible to create styles to make the target Excel file striped by columns or rows.

  • Fields
  • Options
  • Styles

For your convenience the previews illustrating the changes are displayed in the Sample Group area on each page of Data Format tab.


Fields

Using the Fields tab you can set font options, border and fill options and aggregate functions for all the fields you want to export.

The Font tab allows you to specify properties of the font that will be used in the output Excel file cells.

Use the Font and Size drop-down lists to select the font and size to be applied to the output text.

Use the buttons below to set font color, make text bold, italicized, strikethrough text, set underline effects, specify text horizontal and vertical align.

Export Data - Format-specific options - Excel - Data Format - Fields

The Borders tab allows you to specify properties of the borders of the output Excel file cells.

Click the [image] [image] [image] [image] buttons on the left to show/hide the borders they indicate.

Use the drop-down list for each border to select the line type and the [image] button on the right to select the line color for each border.

Export Data - Format-specific options - Excel - Data Format - Fields - Borders

The Fill tab allows you to specify the fill pattern for the output Excel file cells.

Use the drop-down list to select the preferable fill pattern type.

Click the [image] button on the left to set the background color for the fill pattern.

Click the [image] button on the right to set the foreground color for the fill pattern.

Export Data - Format-specific options - Excel - Data Format - Fields - Fill

The Aggregate tab allows you to specify an aggregate function for the field in the output Excel file.

Select a function that will be applied to the field:

RadioButton None

RadioButton AVG

RadioButton MAX

RadioButton SUM

RadioButton MIN

Export Data - Format-specific options - Excel - Data Format - Fields - Aggregate

You can reset the changes any time using the Reset Item and the Reset All buttons.


Options

Using the Options tab you can set font options, border and fill options for all elements of the Excel sheet (header, caption, footer, aggregates and hyperlinks).

Export Data - Format-specific options - Excel - Data Format - Options

The font, borders and fill options are specified in the same way as for output Fields. For details refer to the Fields page.

You can reset the changes any time using the Reset Item and the Reset All buttons.


Styles

Using the Styles tab you can make a style template: set font options, border and fill options and save them.

To add a style template, click the Plus iconPlus button.

To delete a style template, select it and click the Minus iconMinus button.

To reorder style templates in the list, use the btnMoveItemUp btnMoveItemDown buttons.

To load a style template, click the iconLoadFromFile button.

To save the current style template, click the btnSave button.

If you have created or loaded more than one style template, they can be ignored, or used column-by-column or row-by-row (it depends on the Strip type selection).

Export Data - Format-specific options - Excel - Data Format - Styles

The font, borders and fill options are specified in the same way as for output Fields. For details refer to the Fields page.

You can reset the changes any time using the Reset Item and the Reset All buttons.


Extensions

The Extensions tab provides an ability to add hyperlinks and notes and to any cell of the target file, to specify a value of a cell, to create a chart and to merge cells.

Click the Plus iconPlus button to add an element;

click the Minus iconMinus button to delete an element.

  • Hyperlinks
  • Notes
  • Charts
  • Cells
  • Merged Cells


Hyperlinks

If you need to create a hyperlink:

  • set the cell coordinates (Col and Row);
  • specify whether this is a local link or URL;
  • enter the title of the hyperlink;
  • specify the target file location or address.

Export Data - Format-specific options - Excel - Extensions - Hyperlinks

Use the Col and Row spinner controls to specify the column and row for the hyperlink in the output file.

The Style group allows you to select the preferable hyperlink style:

RadioButton URL

RadioButton Local file (i.e. the file is located on your local machine or on a machine in the LAN)

Use the Title box to specify the hyperlink name.

The Target box lets you enter the path to the target file or URL. Use the [image] button to check whether the specified location is available.


Notes

If you need to create a note:

  • set the cell coordinates (Col and Row);
  • enter text of a note for the cell;
  • set the font and fill properties using the corresponding tabs.

The Base tab allows you to specify basic properties of the note to be added to the output Excel file.

Use the Col and Row spinner controls to specify the column and row for the note in the file.

Use the edit-box below to enter the text of the note.

Export Data - Format-specific options - Excel - Extensions - Notes - Base

The Font tab allows you to specify properties of the font that will be used for the note.

Use the Font and Size drop-down lists to select the font and size to be applied to the output text.

Use the buttons below to set font color, make text bold, italicized, strikethrough text, set underline effects, specify text horizontal and vertical align.

The Orientation group allows you to select the note text orientation:

RadioButton No rotation

RadioButton Top to bottom

RadioButton Counterclockwise

RadioButton Clockwise

Export Data - Format-specific options - Excel - Extensions - Notes - Font

The Fill tab allows you to specify the fill type and transparency for the note.

The Fill Type group allows you to select whether the fill color will be solid or gradient:

RadioButton Horizontal

RadioButton Vertical

RadioButton Diagonal up

RadioButton Diagonal down

RadioButton From corner

RadioButton From center

Click the [image] button to set the background color for the fill pattern.

Click the [image] button to set the foreground color for the fill pattern.

The Transparency control allows you to set the transparency degree for the note. Move the slider between the 0% and 100% threshold values to select the required transparency value within this scope.

Export Data - Format-specific options - Excel - Extensions - Notes - Fill


Charts

If you need to create a chart:

  • enter the chart title;
  • select the chart style;
  • set the legend position;
  • specify if you want to show the legend;
  • specify if you want to set the chart color automatically;
  • define the chart position and category labels using the corresponding tabs.

The Base tab allows you to specify basic properties of the chart to be added to the output Excel file.

Use the Title box to specify the chart name.

Use the Style drop-down list to select the preferable chart style (Column, Column 3D, Bar, Bar 3D, Line, Line Mark, Line 3D, etc.).

The Legend position group allows you to specify position of the chart legend:

RadioButton Bottom

RadioButton Top

RadioButton Left

RadioButton Corner

RadioButton Right

CheckBox Show legend

This options specifies whether the chart legend will be visible or not.

CheckBox Auto color

If this option is selected, each series will be automatically differentiated with different colors on the chart, otherwise one color will be applied for all series.

Export Data - Format-specific options - Excel - Extensions - Charts - Base

The Position tab allows you to specify properties pertaining to the chart position on the output file sheet.

RadioButton Auto

Specifies automatic position of the chart.

The Placement group allows you to specify the chart position relative to the data:

RadioButton Bottom

RadioButton Right

Use the Left and Top spinner controls to specify the spacing between the chart and data at the left and at the top respectively.

Use the Height and Width spinner controls to specify the chart height and width respectively.

RadioButton Custom

Specifies absolute position of the chart (irrelative to the data). Use the spinner controls to set the coordinates you need.

Export Data - Format-specific options - Excel - Extensions - Charts - Position

The Category Labels tab allows you to specify in which rows and columns the chart will be built.

RadioButton Column

Use the drop-down list to select the column that will be used to take values for x-axis.

RadioButton Custom

Specify the range of cells from which x-axis values will be taken. Use the spinner controls to set the range you need.

Export Data - Format-specific options - Excel - Extensions - Charts - Category Labels

To build a chart, you also need to create series that will be used to take values for y-axis. To add series for the chart:

  • add one or more series using the iconPlus button;
  • enter the titles;
  • set data ranges (select a column from the drop-down list or set the custom range);
  • define colors for all the graphs.

Use the Title box to specify the series name.

Data range

RadioButton Column

Use the drop-down list to select the column that will be used to take values for the series.

RadioButton Custom

Specify the range of cells from which the series will be formed. Use the spinner controls to set the range you need.

Click the [image] button to set the color for the series.

Export Data - Format-specific options - Excel - Extensions - Series


Cells

If you need to add a value in a specific cell:

  • set the cell coordinates (Col and Row);
  • select the cell type;
  • enter a value;
  • if you are adding a numeric or a date/time value, you can set the cell format;
  • set the font, borders and fill properties using the corresponding tabs.

Export Data - Format-specific options - Excel - Extensions - Cells

The Base tab allows you to specify basic properties of the cell.

Use the Col and Row spinner controls to specify the column and row denoting the cell.

Use the Cell type drop-down list to select the data type for the cell (Boolean, DateTime, Numeric or String).

Set the required value in the Value edit box.

The Formats group allows you to specify data format for numeric or a date/time types.

The font, borders and fill options are specified in the same way as for output Fields. For details refer to the Fields page.


Merged Cells

If you want to merge two or more cells, set the range of cell coordinates: First col, Last col, First row, Last row. Use the spinner controls to set the range you need.

Export Data - Format-specific options - Excel - Extensions - Merged Cells


Advanced

The Advanced tab allows you to set a number of advanced options to be applied to the result MS Excel file.

Page header

If necessary, enter some text for the page header.

Page footer

If necessary, enter some text for the page footer.

Hint: It is also possible to set macros in the Page header and Page footer fields:

&N stands for the quantity of pages;

&P - the number of the current page.

Sheet title

Specify the sheet title for the target file.

Page background

If necessary, use the Ellipsis EllipsisButton button to browse for a graphical file to be applied as the page background.

Export Data - Format-specific options - Excel - Advanced

CheckBox Calculate column width automatically

This option allows the wizard to determine column width in the target file automatically according to column size.


Access options

This step allows you to set options for the target MS Access (*.mdb) file.

Set the name for the target table and specify whether the wizard should create a new table in the MS Access database if it does not exist yet, or use the existing table to export data into.

Export Data - Format-specific options - Access

When you are done, click the Next button to proceed to Setting common export options.


Word / RTF options

This step allows you to set options for the target MS Word (*.doc) and Rich Text Format (*.rtf) files.

  • Base Styles
  • Strip Styles

For your convenience the previews illustrating the changes are displayed in the Sample Group area within the Base Styles and the Strip Styles tabs.

Export Data - Format-specific options - Word

When you are done, click the Next button to proceed to Setting common export options.


Base Styles

The Base Styles tab contains the list of target file entities: HEADER, CAPTION, DATA, FOOTER. You can customize style options, such as font and size, background and foreground colors, text alignment, etc. for each of them by clicking the corresponding item in the list and setting the options in the right-side panel. You can also switch page orientation for the target Word/RTF file using this tab.

Export Data - Format-specific options - Word - Base Styles

Use the Font and Size drop-down lists to select the font and size to be applied to the text.

Use the buttons below to set font color, make text bold, italicized, underlined, strikethrough text, specify horizontal align.

CheckBox Highlight

Enables/disables text highlight.

CheckBox Background

Enables/disables background for text.

Click the [image] button to set the background color for the text.

Click the [image] button to set the highlight color for the text.

You can reset the changes any time using the Reset Item and the Reset All buttons.


Strip Styles

Using the Strip Styles tab you can create a style template: set font, size, background and foreground colors, text alignment, highlight and save them.

To add a style template, click the Plus iconPlus button.

To delete a style template, select it and click the Minus iconMinus button.

To reorder style templates in the list, use the btnMoveItemUp btnMoveItemDown buttons.

To load a style template, click the iconLoadFromFile button.

To save the current style template, click the btnSave button.

If you have created or loaded more than one style template, they can be ignored, or used column-by-column or row-by-row (it depends on the Strip type selection).

Export Data - Format-specific options - Word - Strip Styles

You can reset the changes any time using the Reset Item and the Reset All buttons.


HTML options

This step allows you to set options for the target HTML (*.html) file.

  • Preview
  • Basic
  • Multi-file
  • Advanced

Export Data - Format-specific options - HTML

When you are done, click the Next button to proceed to Setting common export options.


Preview

The Preview tab allows you to customize the style that will be applied to the target HTML file using a number of built-in templates provided in the Templates drop-down list.

Export Data - Format-specific options - HTML - Preview

You can select any of the pre-defined templates and customize it by clicking objects in the preview panel, and save the settings as a custom template using the Save template... button. Use the Load template... button to load a previously saved custom template from your hard disk.

Click on an element of the table to select the color that will be applied for this element (background, font, header row, odd row, even row, non-visited link, visited link, active link).


Basic

The Basic tab allows you to specify the basic parameters of target HTML file:

  • specify the title of the result file;
  • select whether the cascade style sheet (CSS) should be internal or external (the Ellipsis EllipsisButton button to browse for a *.css file);
  • determine whether boolean fields of the table should be exported as HTML check boxes.

Export Data - Format-specific options - HTML - Basic


Multi-file

The Multi-file tab provides you with an ability to split the target HTML file into several separate files. This tab allows you to specify the record count for a single file, set an option to generate an index HTML file, and add an ability to navigate between the exported files.

Export Data - Format-specific options - HTML - Multi-file

Multi-file export

CheckBox Use multi-file export

Enables/disables the multi-file export feature.

Record(s) in a single file

Use the spinner control to specify the number of records to be exported into each of the files.

CheckBox Generate index

Specifies that an index file containing links to all the data files will be generated. Use the edit-box next to the checkbox to set a name for the index file.

Navigation

This group allows you to specify properties for navigation elements, i.e. the elements that provide quick access to pages of the multi-file document. Navigation is implemented as a set of hyperlinks.

CheckBox On top

Specifies that the hyperlinks will be placed at the top of the page.

CheckBox On bottom

Specifies that the hyperlinks will be placed at the bottom of the page.

Use the Index link, First link, Prior link, Next link and Last link boxes to specify captions for the corresponding navigation elements.


Advanced

The Advanced tab allows you to set a number of advanced options to be applied to the result HTML file.

Export Data - Format-specific options - HTML - Advanced

Body options

Default font

Use the drop-down list to select the font that will be used in the result file by default.

Background

If necessary, use the Ellipsis EllipsisButton button to browse for a graphical file to be applied as the page background.

Table options

Use the spinner controls to specify common table options: cell padding, cell spacing, border.

Background

If necessary, use the Ellipsis EllipsisButton button to browse for a graphical file to be applied as the table background.

It is also possible to define advanced attributes for both the HTML body and table.


PDF options

This step allows you to set options for the target PDF (*.pdf) file.

Fonts

This group of options allows you to customize fonts for the header, caption, data, footer of the result file.

Use the Base font name and Font encoding drop-down lists to select the preferable font (Helvetica, Courier, Times Roman, etc.) and encoding (Standard, WinANSI, MacRoman, PDFDoc) respectively, and the Font size spinner control to specify the font size.

Click the Font color... button to select the color to be applied to the font.

For your convenience the preview illustrating the changes is displayed in the Sample area.

Export Data - Format-specific options - PDF

Page options

Use the Page size drop-down list to select one of the standard page formats (Letter, Legal, A3, A4, etc.).

Use the Width and Height spinner controls to specify the page width and height respectively.

Use the Units drop-down list to select the unit of measure that will be used in report settings: inches, millimeters, or dots.

Use the Orientation drop-down list to select the preferable page orientation: portrait or landscape.

Margins

Use the Left, Right, Top, Bottom spinner controls to specify the corresponding page margins for the output PDF file.

Grid options

Use the Col spacing, Row spacing, Line width spinner controls to specify spacing for grid columns, rows, and grid line width respectively.

When you are done, click the Next button to proceed to Setting common export options.


TXT options

This step allows you to set options for the target text (*.txt) file.

Set the Calculate column width option on if you want each column of the target file to be adjusted to the maximum number of characters in it. The Spacing option specifies the number of spaces between columns in the target file.

Export Data - Format-specific options - TXT

When you are done, click the Next button to proceed to Setting common export options.


CSV options

This step allows you to set options for the target CSV (*.csv) file.

CheckBox Quote strings

Check this option to apply quoting for string values in the target file.

CheckBox Quote captions

Check this option to apply quoting for captions in the target file.

Specify the column separator using the Comma drop-down list and the preferable quote character using the Quote drop-down list.

Export Data - Format-specific options - CSV

When you are done, click the Next button to proceed to Setting common export options.


XML options

This step allows you to set options for the target XML (*.xml) file.

Specify XML document encoding in the Encoding edit box and set the Standalone option on if you intend to create a standalone XML document (standalone="yes").

XML type

Select the type of the result XML document: Datapacket 2.0 or Access.

Conversion between generic XML documents and documents of the XML-Datapacket (CDS) format can be performed with the help of XML Mapper by Borland®.

Export Data - Format-specific options - XML

When you are done, click the Next button to proceed to Setting common export options.


MS Excel 2007 / ODS options

This step allows you to set options for the target MS Excel 2007 (*.xlsx) or ODF Spreadsheets (*.ods) file.

Using the Base Styles tab you can set font and border options for all elements of the Excel 2007 / ODS sheet (HEADER, CAPTION, DATA, FOOTER). You can customize style options, such as font and size, background and foreground colors, text alignment, etc. for each of them by clicking the corresponding item in the list and setting the options in the right-side panel.

If necessary, you can also specify the sheet name for the target Excel 2007 / ODS file.

Use the Font and Size drop-down lists to select the font and size to be applied to the text.

Use the buttons below to set font color, make text bold, italicized, underlined, specify horizontal and vertical align.

CheckBox Background

Enables/disables background for text.

Click the [image] button to set the background color for the text.

Click the Wrap Text button to enable/disable the text wrapping feature.

For your convenience the previews illustrating the changes are displayed in the Sample Group area within the Base Styles and the Strip Styles tabs.

Export Data - Format-specific options - Excel 2007 - Base Styles

Using the Strip Styles tab you can create a style template: set font, size, background color, text alignment, wrap text options and save them.

To add a style template, click the Plus iconPlus button.

To delete a style template, select it and click the Minus iconMinus button.

To reorder style templates in the list, use the btnMoveItemUp btnMoveItemDown buttons.

To load a style template, click the iconLoadFromFile button.

To save the current style template, click the btnSave button.

If you have created or loaded more than one style template, they can be ignored, or used column-by-column or row-by-row (it depends on the Strip type selection).

Export Data - Format-specific options - Excel 2007 - Strip Styles

You can reset the changes any time using the Reset Item and the Reset All buttons.

The Border tab allows you to specify properties of the borders of the output Excel 2007 / ODS file cells.

CheckBox Use border

Enables/disables borders in the output file.

Click the [image] button to set the color to be applied to the borders.

Use the Border Style drop-down list to select the preferable style that will be used for borders (thin, dashed, dashdot, dotted, etc.).

Export Data - Format-specific options - Excel 2007 - Border

When you are done, click the Next button to proceed to Setting common export options.


MS Word 2007 / ODT options

This step allows you to set options for the target MS Word 2007 (*.docx) or ODF text (*.odt) file.

Using the Base Styles tab you can set font options for all elements of the Word 2007 / ODT document (HEADER, CAPTION, DATA, FOOTER). You can customize style options, such as font and size, background and foreground colors, text alignment, text highlight, etc. for each of them by clicking the corresponding item in the list and setting the options in the right-side panel.

Use the Font and Size drop-down lists to select the font and size to be applied to the text.

Use the buttons below to set font color, make text bold, italicized, underlined, strikethrough text, specify horizontal align.

CheckBox Background

Enables/disables background for text.

Click the [image] button to set the background color for the text.

CheckBox Highlight

Enables/disables text highlight.

If this option is enabled, you should select the preferable highlight color from the drop-down list.

For your convenience the previews illustrating the changes are displayed in the Sample Group area within the Base Styles and the Strip Styles tabs.

Export Data - Format-specific options - Word 2007 - Base Styles

Using the Strip Styles tab you can create a style template: set font, size, background color, text alignment, highlight options and save them.

To add a style template, click the Plus iconPlus button.

To delete a style template, select it and click the Minus iconMinus button.

To reorder style templates in the list, use the btnMoveItemUp btnMoveItemDown buttons.

To load a style template, click the iconLoadFromFile button.

To save the current style template, click the btnSave button.

If you have created or loaded more than one style template, they can be ignored, or used column-by-column or row-by-row (it depends on the Strip type selection).

Export Data - Format-specific options - Word 2007 - Strip Styles

You can reset the changes any time using the Reset Item and the Reset All buttons.

Using the Border tab you can enable borders in the result Word 2007 / ODT document and customize them.

CheckBox Use border

Enables/disables borders in the output file.

Click the [image] button to set the color to be applied to the borders.

Use the Border Style drop-down list to select the preferable style that will be used for borders (single, thick, double, hairline, etc.).

Export Data - Format-specific options - Word 2007 - Border

When you are done, click the Next button to proceed to Setting common export options.


Setting common export options

Use this step of the wizard to set common export options. The detailed description of these options is given below.

Export Data - Setting common export options

Constraints

CheckBox Export empty tables

If checked, you can export the table even if it does not contain any data.

Skip ... record(s)

Specifies the number of records to be skipped before export starts.

RadioButton Export all records

Specifies that all records of the table will be exported.

RadioButton Export only ... record(s)

Specifies the number of records to be exported.

CheckBox Open files after export

If this option is checked, the result file will be opened with the currently associated program after the export operation is completed.

CheckBox Print files after export

If this option is checked, the result file will be sent to the default printer after the export operation is completed.

When you are done, click the Next button to proceed to the last step of the wizard.


Exporting data

This step of the wizard is intended to inform you that all export options have been set, and you can start the export process.

The log area allows you to view the log of operations and errors (if any).

Export Data - Exporting data

CheckBox Close the Wizard after successful completion

If this option is selected, the wizard is closed automatically when the export process is completed.

If necessary, you can save a template for future use.

Click the Finish button to run the export process.

After the operation is completed, you can view the number of exported records, elapsed time, estimated export speed, and the log of operations and errors (if any).


Import Data Wizard

Import Data Wizard allows you to import data to a table / view from any of supported formats (MS Excel, MS Access, DBF, XML, TXT, CSV, HTML, MS Excel 2007, MS Word 2007, ODF). You can save your settings as a template any time for future use.

To start the wizard, right-click the table/view in DB Explorer, select the Data Manipulation | [image] Import Data... context menu item.

Alternatively, you can open the Data tab of Table Editor / View Editor, right-click the grid there, then select the Data Manipulation | [image] Import Data to <object_name>... context menu item.

  • Setting source file name and format
  • Selecting the source to import data from
  • Setting correspondence between the source and target fields
  • Adjusting common data formats
  • Setting advanced field formats
  • Setting import mode and data write type
  • Customizing common import options
  • Importing data

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Export Data Wizard

Export as SQL Script

Using templates


Selecting source file name and format

This step of the wizard allows you to select the source file format you need to import data from.

Source file name

Type in or use the ExplorerButton button to specify the path to the file using the Open file... dialog. The file name extension changes automatically according to the selected Import Type.

Import Data - Selecting source file name and format

Import Type

Specify the format of the source file. For details refer to Supported file formats.

CSV format parameters

For CSV import you should define Delimiter and Quote settings using the corresponding drop-down lists.

If you have chosen the MS Access type then the following dialog appears:

Import Data - Selecting source file name and format - Access password

Here you can enter the password for the created/updated table.

Click the Next button to proceed to the Setting fields correspondence step or to the Selecting data source step of the wizard if you have selected MS Access as the source file format.


Selecting data source

This step of the wizard is only available when you are importing data from MS Access. Select a table from the table list or input a query in the corresponding text boxes to specify the data source.

If you choose a query as the data source, you also can load a SQL query from a *.sql file or save the current query text to a file using the Load from File... and the Save to File... buttons correspondingly.

Import Data - Selecting data source

Click the Next button to proceed to the Setting fields correspondence step of the wizard.


Setting fields correspondence

This step of the wizard allows you to set correspondence between columns of the source file and fields of the target DB2 table.

  • MS Excel
  • MS Access
  • DBF
  • XML Datapacket
  • TXT
  • CSV
  • HTML
  • XML Generic
  • MS Excel/Word 2007, ODF

To get more information about the file formats, see the Supported file formats page.


Excel

Specify ranges in the grid for the target and source fields:

  • select a field of the target DB2 table in the Fields list;
  • proceed to the Sheet grid: click a column caption to select the whole column or click the row number to select the whole row;
  • the selected column/row of the source file gets green highlight, and a new range indicating the source and target fields correspondence appears in the Ranges list;
  • repeat the operation for all the fields you need to be included in the import process.

If the source Excel file and the destination DB2 table have the same order of columns or rows, you can use the iconAutoFillColumns Auto Fill Cols or the iconAutoFillRows Auto Fill Rows buttons to set correspondence between them automatically.

If necessary, you can choose to skip a defined number of the source file columns and/or rows using the Col(s) and Row(s) spinner controls of the Skip group (e.g. if you need to exclude column headers from the imported data range).

Import Data - Setting fields correspondence - Excel

To clear ranges for a field, select the field in the Fields list and click the iconCross Clear Ranges button.

To clear all ranges specified for the target table fields, click the iconClearAllRanges Clear All button.

Right-click a range in the Ranges list to call its popup menu. Using the popup menu you can add or edit ranges manually, remove them or change their order.

Import Data - Setting fields correspondence - Excel - Popup menu

The Range dialog allows you to edit the data range for import manually.

Range Type

Use the drop-down list to select whether a column, a row, or a cell of the source Excel file will be mapped to the target table field.

Depending on the selected range type you should specify the column (e.g. B), the row (e.g. 2) or the cell (e.g. A2).

Start / Finish

These groups allow you to set the precise data range for import: select Where data started / finished or use the spinner control to specify the start/finish row (or start/finish column).

Direction

Use this group to select the direction for importing data of the specified range: Down or Up.

Sheet

Use this group to define whether the specified range will be taken from the default Excel sheet or from a custom sheet (select sheet number or sheet name using the corresponding drop-down lists).

Import Data - Setting fields correspondence - Excel - Range

Click the Next button to proceed to the Adjusting data formats step of the wizard.


Access

Set correspondence between the source MS Access fields and the target DB2 table fields:

  • select a field of the target DB2 table in the Destination Fields list;
  • select the corresponding field of the source MS Access table in the Source Fields list;
  • click the iconPlus Add button to set correspondence between the selected fields;
  • the pair of fields appears in the list below;
  • repeat the operation for all the fields you need to be included in the import process.

Use the iconAutoFillColumns Auto Fill button to set correspondence between the source and target fields automatically on the basis of their order.

Import Data - Setting fields correspondence - Access

To remove a correspondence, select the pair of fields in the list below and click the iconMinus Remove button.

To remove all correspondences, click the iconCross Clear button.

Click the Next button to proceed to the Adjusting data formats step of the wizard.


DBF

Set correspondence between the source DBF columns and the target DB2 table fields:

  • select a field of the target DB2 table in the Destination Fields list;
  • select the corresponding column of the source DBF table in the Source Fields list;
  • click the iconPlus Add button to set correspondence between the selected fields;
  • the pair of fields appears in the list below;
  • repeat the operation for all the fields you need to be included in the import process.

Use the iconAutoFillColumns Auto Fill button to set correspondence between the source and target fields automatically on the basis of their order.

CheckBox Skip deleted records

Use the option to exclude records marked as deleted.

Import Data - Setting fields correspondence - DBF

To remove a correspondence, select the pair of fields in the list below and click the iconMinus Remove button.

To remove all correspondences, click the iconCross Clear button.

Click the Next button to proceed to the Adjusting data formats step of the wizard.


XML Datapacket

Set correspondence between the source XML columns and the target DB2 table fields:

  • select a field of the target DB2 table in the Destination Fields list;
  • select the corresponding column of the source XML table in the Source Fields list;
  • click the iconPlus Add button to set correspondence between the selected fields;
  • the pair of fields appears in the list below;
  • repeat the operation for all the fields you need to be included in the import process.

Use the iconAutoFillColumns Auto Fill button to set correspondence between the source and target fields automatically on the basis of their order.

Import Data - Setting fields correspondence - XML

To remove a correspondence, select the pair of fields in the list below and click the iconMinus Remove button.

To remove all correspondences, click the iconCross Clear button.

Click the Next button to proceed to the Adjusting data formats step of the wizard.


TXT

Set correspondence between the source text file columns and the target DB2 table fields:

  • select a field of the target DB2 table in the Fields list;
  • double-click in the text viewer area to add vertical separators delimiting the source column bounds;
  • click the area between the separators to assign the column to the selected target table field - the selected source column gets black highlight;
  • repeat the operation for all the fields you need to be included in the import process.

If necessary, you can choose to skip a defined number of the source file lines using the Skip Lines spinner control (e.g. if you need to exclude column headers from the imported data range).

Import Data - Setting fields correspondence - TXT

To clear all correspondences, click the iconCross Clear button.

Note: if you cannot see the content of the source text file properly, you should select the appropriate Charset to be used for processing data.

Click the Next button to proceed to the Adjusting data formats step of the wizard.


CSV

Set correspondence between the target table fields and the source CSV file columns:

  • select a field of the target DB2 table in the Fields list;
  • proceed to the source grid viewer area: click a caption to assign the column to the selected target table field;
  • the selected column of the source file gets gray highlight;
  • repeat the operation for all the fields you need to be included in the import process.

If the source CSV file and the destination DB2 table have the same order of columns, you can use the iconAutoFillColumns Auto Fill button to set correspondence between them automatically.

Note that the CSV delimiter is specified at the Selecting source file name and format step of the wizard.

The Col(s) control indicates the currently selected source file column. You can also use this spinner control for quick column selection.

If necessary, you can choose to skip a defined number of the source file rows using the Row(s) spinner control of the Skip group (e.g. if you need to exclude column headers from the imported data range).

Import Data - Setting fields correspondence - CSV

To remove a correspondence, select the field in the Fields list and click the iconCross Clear button.

Note: if you cannot see the content of the source text file properly, you should select the appropriate Charset to be used for processing data.

Click the Next button to proceed to the Adjusting data formats step of the wizard.


HTML

Set correspondence between the target table fields and the source HTML file columns:

  • select a field of the target DB2 table in the Fields list;
  • proceed to the source grid viewer area: select the Table from which you intend to import data and click a column to assign the column to the selected target table field;
  • the selected column of the source file gets green highlight;
  • repeat the operation for all the fields you need to be included in the import process.

If the source HTML file and the destination DB2 table have the same order of columns, you can use the iconAutoFillColumns Auto Fill button to set correspondence between them automatically.

The Col control indicates the currently selected source file column. You can also use this spinner control for quick column selection.

If necessary, you can choose to skip a defined number of the source file rows using the Row spinner control of the Skip group (e.g. if you need to exclude column headers from the imported data range).

Import Data - Setting fields correspondence - HTML

To remove a correspondence, select the field in the Fields list and click the iconCross Clear button.

To remove all correspondences, click the iconClearAllRanges Clear All button.

Click the Next button to proceed to the Adjusting data formats step of the wizard.


XML Generic

In order to set mapping of a Generic XML document, you should enter the relative XPath (the path must be specified in the XPath format). Click the iconAutoFillColumns Fill Grid button to get the grid filled with text and attribute values of the selected node.

Note: if the source XML document contains huge amount of data, building the tree may take a long time.

Set correspondence between the source XML file columns and the target DB2 table fields:

  • select a field of the target DB2 table in the Fields list;
  • proceed to the source grid viewer area: click a column to assign the column to the selected target table field;
  • the selected column of the source file gets gray highlight;
  • repeat the operation for all the fields you need to be included in the import process.

You can use the iconAutoFillColumns Auto Fill button to set correspondence between the source and target fields automatically according to their order (mapping is started from the first attribute value in this case).

The Col(s) control indicates the currently selected source file column. You can also use this spinner control for quick column selection.

If necessary, you can choose to skip a defined number of the source file lines using the Row(s) spinner control of the Skip group (e.g. if you need to exclude node headers from the imported data range).

Import Data - Setting fields correspondence - XML Document

To remove a correspondence, select the field in the Fields list and click the iconCross Clear button.

To remove all correspondences, click the iconClearAllRanges Clear All button.

Click the Next button to proceed to the Adjusting data formats step of the wizard.


MS Excel/Word 2007, ODF

Specify ranges in the grid for the target and source fields:

  • select a field of the target DB2 table in the Fields list;
  • proceed to the Sheet grid: click a column to assign the column to the selected target table field;
  • the selected column of the source file gets green highlight;
  • repeat the operation for all the fields you need to be included in the import process.

If the source file and the destination DB2 table have the same order of columns, you can use the iconAutoFillColumns Auto Fill button to set correspondence between them automatically.

The Col control indicates the currently selected source file column. You can also use this control for quick column selection.

If necessary, you can choose to skip a defined number of the source file rows using the Skip spinner control (e.g. if you need to exclude column headers from the imported data range).

Import Data - Setting fields correspondence - MS Excel and Word 2007, ODF

To remove a correspondence, select the field in the Fields list and click the iconCross Clear button.

To remove all correspondences, click the iconClearAllRanges Clear All button.

Click the Next button to proceed to the Adjusting data formats step of the wizard.


Adjusting data formats

This step of the wizard provides a number of options for setting common formats for all imported data:

Date & Time formats: Short date, Long date, Short time, Long time;

Separators: Decimal, Thousand, Date, Time;

Boolean True (specify the text that will be displayed for the boolean TRUE values);

Boolean False (specify the text that will be displayed for the boolean FALSE values);

NULL values (specify the text that will be displayed for the NULL values).

For more information refer to the Format specifiers page.

Import Data - Adjusting data formats

Click the Next button to proceed to the Setting advanced field formats step of the wizard.


Setting advanced field formats

This step of the wizard allows you to set formats each field separately.

Select a field in the list and adjust format options that will be applied to this field only.

Import Data - Setting advanced field formats

Specify Generator value and Generator step for incremental data generation into the specified field, or enter a Constant value which will be set for all records in the field.

Specify the NULL value which will be used for the records where the value is NULL.

If necessary, specify the default value.

Use the Left / Right quotation edit boxes to specify left/right quotation marks.

Use the Quotation action drop-down list to select whether the quotation marks should be added, removed, or left 'As is'.

Use the Character case drop-down list to select the case that will be used for string values of the field: Upper, Lower, UpperFirst, UpperFirstWord, or 'As is'.

Use the Character set drop-down list to select which charset will be used for string data in the field: ANSI, OEM, or As is.

The Replacements area allows you to set the text you need to be replaced during data import into the selected field. Click the Plus iconPlus button to specify a new replacement options using the Add Replacement dialog.

Import Data - Setting advanced field formats - Add Replacement

To edit a replacement, click the Edit [image] button.

To remove a replacement, click the Minus iconMinus button.

When you are done, click the Next button to proceed to the Setting import mode step of the wizard.


Setting import mode

This step of the wizard allows you to define the records processing mode as Insert All, Insert New, Update, Update or Insert, Delete, Delete or Insert mode:

  • Insert all: all records from the source file are inserted into the tables irrespective of whether any records exist in the destination table or not
  • Insert new: already existing records are skipped, and new records are inserted into the destination table
  • Update: all existing records are updated from the source file
  • Update or insert: already existing records are updated and new records are inserted into the destination table
  • Delete: already existing records are deleted
  • Delete or insert: existing records are deleted and new records are inserted into the destination table

Import Data - Setting import mode

Here is an example of some import modes offered by Import Data Wizard:

All import modes (except for the Insert All mode) are based on key values information. In order to perform import operations with these modes used, you need to have matches between the source file key column(s) and the destination table key field(s).

For example, your source file contains three rows with the key values 1, 2, 3, and your destination table contains three rows with the key values 1, 2, 4.

Destination table | Source file data
Import Data - Setting import mode - Destination Table | Import Data - Setting import mode - Source Table

If you use the Insert new import mode, in this case only the row with key value 3 will be inserted into the destination table.

If you use the Update import mode, then the rows with key values 1, 2 will be updated.

If you use the Update or insert import mode, then rows 1, 2 will be updated and the row with key value 3 will be inserted.

It is applied to all other import modes, except for the Insert all mode. For all these modes (except for the Insert all mode) it is obligatory to select the primary key fields. This field (or fields) is used as key field to identify specific data in the target database.

Insert new | Update | Update or insert | Delete | Delete or insert
Import Data - Setting import mode - Result - Insert new | Import Data - Setting import mode - Result - Update | Import Data - Setting import mode - Result - Update or insert | Import Data - Setting import mode - Result - Delete | Import Data - Setting import mode - Result - Delete or insert

The key columns for these operations are defined in the Key columns area.

Single commands / Universal mode / Batch insert type

The Single commands import mode is performed with the Single Commands method used and serves to generate and execute single SQL commands on the server, whereas the Batch insert mode uses native DB2 commands to import a data set as a batch. With the help of the Single commands import mode your data can be imported considerably faster as compared to the Universal mode which is used for backward compatibility.

Use Import mode to select whether to insert all records, or to update/delete existing ones. Note that for updating/deleting existing records in the target table you should move its key columns from the Available columns list to the Selected columns list.

The Key columns area allows you to select the fields of the table to be used as the key fields for the import process.

To select a field, you need to move it from the Available columns list to the Selected columns list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the fields from one list to another.

When you are done, click the Next button to proceed to the Customizing common options step of the wizard.


Customizing common options

Use this step of the wizard to set common import options. The detailed description of these options is given below.

Import Data - Customizing common options

Commit

RadioButton Commit when done

Commits the transaction when all records are imported.

RadioButton Commit after each block

Inserts the COMMIT statement after a defined number of records.

RadioButton Commit changes manually

Select this option if you intend to commit the transaction manually.

Block size

Use the spinner control to define the number of records in each committed block.

Record count

RadioButton Import all records

Specifies that all records of the source file will be imported.

RadioButton Import only ... record(s)

Specifies the number of records to be imported.

When you are done, click the Next button to proceed to the last step of the wizard.


Importing data

This step of the wizard is intended to inform you that all import options have been set, and you can start the import process.

The log area allows you to view the log of operations and errors (if any).

Import Data - Importing data

CheckBox Close the Wizard after successful completion

If this option is selected, the wizard is closed automatically when the import process is completed.

If necessary, you can save a template for future use.

Click the Finish button to run the import process.

After the operation is completed, you can view the total number of processed records, the number of inserted/updated/deleted records, the number of committed records, the number of errors, elapsed time, and the log of operations and errors (if any).


Export as SQL Script

SQL Manager for DB2
  • Index
  • « Prev
  • Next »

Export as SQL Script Wizard

Export as SQL Script Wizard allows you to export data from a table / view or from a query result to SQL script as a number of INSERT statements. You can save your settings as a template any time for future use.

To start the wizard, right-click the object in DB Explorer, select the Data Manipulation | [image] Export Data as SQL Script...context menu item.

Alternatively, you can open the Data tab of Table Editor / View Editor or the Result(s) tab of SQL Editor / Query Builder, right-click the grid there, then select the Data Manipulation | [image] Export <object_name> as SQL Script... context menu item.

  • Selecting destination DBMS
  • Setting destination file name
  • Setting BLOB options
  • Selecting field to export
  • Editing the result table definition
  • Setting export options
  • Exporting as SQL Script

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Export Data Wizard

Import Data Wizard

Using templates


Selecting destination DBMS

This step of the wizard allows you to define the destination server you need to export data for. The result script will be generated in compliance with the specifications of the selected DBMS:

RadioButton DB2

RadioButton InterBase/Firebird

RadioButton Microsoft® SQL Server™

RadioButton MySQL

RadioButton Oracle

RadioButton PostgreSQL

Export as SQL Script - Defining type of destination server

CheckBox Add CREATE TABLE statement

Check this option to add the CREATE TABLE statement to the result script.

Click the Next button to proceed to the Setting destination file name step of the wizard.


Setting destination file name

Specify whether the result script will be loaded to SQL Script Editor or saved to a file.

File name

Type in or use the btnSaveAs button to specify the path to the file and the file name.

If necessary, select the File charset using the corresponding drop-down list.

Enter the Table name and the Schema name to be included in the result SQL script. Schema name should only be specified for the DBMS in which this object is implemented.

Export as SQL Script - Setting destination file name

Click the Next button to proceed to the Setting BLOB options step of the wizard.


Setting BLOB options

BLOB and arrays options

In this group of options you can determine whether BLOB fields are not to be extracted, extracted as strings, or extracted into a separate file (available for DB2, InterBase/Firebird, MS SQL, Oracle destination servers). If the latter is selected, you also need to specify the File name (the *.blo file where the BLOB data will be stored) and the location of the file on your local machine using the btnSaveAs button.

CheckBox Compress file

Check this option if you wish to compress the file containing BLOB data.

Compression

Define the desired compression level to be applied for the file: None, Fastest, Default, Best.

Export as SQL Script - Setting BLOB options

Note: If you choose to save BLOB fields in a file then afterwards this data can be restored only by using the SQL Manager for DB2 SQL Script tool.

Click the Next button to proceed to the Selecting fields to export step of the wizard.


Selecting fields to export

This step of the wizard allows you to select the table field(s) to be exported to SQL script.

To select a field, you need to move it from the Available fields list to the Selected fields list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the fields from one list to another.

Export as SQL Script - Selecting fields to export

Click the Next button to proceed to the Editing table definition step of the wizard.


Setting export options

Specify common export options according to your needs.

If necessary, you can choose to replace non-print characters in strings with spaces.

CheckBox Quote identifiers

Check this option to apply quoting for identifiers in the destination file.

CheckBox Use multi insert statements

Use this option to allow multi insert statements in the result script.

Data options

Records in block

Use the spinner control to define the number of records in each committed block.

CheckBox Insert COMMIT after each block

Check this option to add the COMMIT statement after a defined number of records.

Export as SQL Script - Setting export options

Click the Next button to proceed to Exporting as SQL Script.


Editing table definition

This step is available only if the Add CREATE TABLE statement option was checked on the Selecting destination DBMS step of the wizard. It allows you to view/edit the SQL script for creating the table.

For your convenience the syntax highlight, code folding and a number of other features for efficient SQL editing are implemented. For details see Working with SQL Editor area and Using the context menu.

Export as SQL Script - Editing table definition

Click the Next button to proceed to the Setting export options step of the wizard.


Exporting as SQL Script

This step of the wizard is intended to inform you that all export options have been set, and you can start the export as SQL script process.

The log area allows you to view the log of operations and errors (if any).

Export as SQL Script - Exporting as SQL Script

CheckBox Load generated script into Script Editor

Check this option to load the result script to SQL Script Editor.

CheckBox Close the Wizard after successful completion

If this option is selected, the wizard is closed automatically when the export process is completed.

If necessary, you can save a template for future use.

Click the Finish button to run the export as SQL script process.


Change management

This set of tools allows you to store changes in metadata, remember database structure state, compare database states in different time points and view history of database changes.

Version control system (VCS) is a mean that enables teamwork under a project.

This system can be useful for single developers, whose databases have complex business logic in procedures, triggers etc. VCS provides change management means to control changes of objects.

What can you get from VCS in SQL Manager for DB2:

For database developers:

  • Control of changes in database;
  • Getting (storing, testing) change scripts that reveal differences between two database states;
  • Possibility to rollback database to definite state.

For database administrators:

  • Control of changes in database.

This section can be inactive if version control is disabled for the database. To enable version control use the corresponding section of the Database Registration Info dialog.

SQL Manager for DB2 provides the following Change management tools:

Create tag wizard

Remembers current database state.

Check repository wizard

Reveals and fixes differences between database state and it's description in repository.

Get change script wizard

Generates script that reflects differences between two database states.

See also:

Getting Started

Database Explorer

Database Management

Database Objects Management

Query Management Tools

Data Management

Import/Export Tools

Database Tools

Instance Services

Personalization

How To...


Create tag wizard

This wizard allows you to create a Tag for databases with version control enabled.

Tag is a special mark that indicates certain database state. It marks all the files in the database VCS repository.

When you create a tag, current database state is remembered for further comparison or rollback.

To launch the wizard use the Change management | Create Tag... item of database context menu (or any database object context menu), or use the Tools | Change management | Create Tag... main menu item.

  • Selecting source database
  • Specifying tag caption
  • Performing operation

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Check repository wizard

Get change script

History


Selecting source database

At this step you need to select a database for which a tag should be created.

Create tag wizard - Selecting source database

Use the Source database drop-down list for the purpose.

Note: Version control must be enabled for the selected database.

Click the Next button to proceed to the Specifying tag caption step of the wizard.


Specifying tag caption

Use this step to define tag name.

Create tag wizard - Specifying tag caption

CheckBox Move tag if it already exists

Enable the option to move new tag over existing one in case of their names coincidence.

Click the Next button to proceed to the Performing operation step of the wizard.


Performing operation

This step informs you that all necessary settings are defined and tag can be created.

Create tag wizard - Performing operation

To close the wizard after successful completion of the operation use the corresponding option.

Click the Run button to perform the operation.


Check repository wizard

Check repository wizard reveals differences (if any) between database state and its description in the VCS repository and eliminates ones if any. This wizard should be used when any changes have been made to database without synchronization to the corresponding repository e.g. changes made when VCS was disabled for the database.

To launch the wizard use the Change management | Check repository... item of database context menu (or any database object context menu), or use the Tools | Change management | Check repository... main menu item.

  • Selecting database
  • Selecting object types
  • Checking repository
  • Specifying action for each difference
  • Selecting objects to remove from the repository
  • Checking and correcting script
  • Adding comments
  • Performing operation

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Create tag wizard

Get change script

History


Selecting database

At this step you should select a database to check version control repository.

Check repository wizard - Selecting database

Use the Database to check drop-down list for the purpose.

Note: Version control must be enabled for the selected database.

Click the Next button to proceed to the Selecting object types step of the wizard.


Selecting object types

At this step you need to select object types for the check repository operation.

Check repository wizard - Selecting object types

RadioButton Check the whole database

Selects all database objects for check repository operation.

RadioButton Check selected object types only

This option enables selecting object types manually.

Click the Next button to proceed to the Checking repository step of the wizard.


Checking repository

This step informs you that all necessary settings are defined and version control repository can be checked.

Check repository wizard - Checking repository

Click the Run button to check repository.

The number of errors reflects the number of mismatches of two database states.

To repeat the operation click the Check Again button.

Click the Next button to proceed to the Specifying action for each difference step of the wizard.


Specifying action for each difference

At this step you can view objects that have been changed and whose changes are not reflected in the repository.

Use the Action column to define action for the selected object.

Save

This action is available only for objects that exist in a database and are described in VCS repository but whose description is not up to date. Use this option to add changes to the object description.

Create New/Replace Existing

This actions appear for objects that exist in database but have no description in the database VCS repository. Use the Create New option to add new description, or the Replace Existing to substitute the existing description. If the Replace Existing option is selected, the Replacement should be defined. Note that the Replacement field contains the list of similar objects that are described in the repository but are absent from the database.

Check repository wizard - Specify action

Click the Next button to proceed to the Selecting objects to remove from the repository step of the wizard.


Selecting objects to remove from the repository

Use this step to mark objects to remove its description from the repository.

Table contains only objects whose descriptions exist in VCS repository but are absent from the database.

Check repository wizard - Selecting objects to remove from repository

Click the Next button to proceed to the Checking and correcting script step of the wizard.


Checking and correcting script

This step allows you to view and correct script with changes selected at the previous steps.

In this editor you can use all the features available in SQL Editor: syntax highlight, code completion etc.

Note: This script will not be executed. It will be added to the database history in the version control repository. If database history already contains commands that caused such changes in the database, remove corresponding commands from the script.

Check repository wizard - Checking and correcting script

Click the Next button to proceed to the Adding comments step of the wizard.


Adding comments

Use this step to bind commentaries to the changes that will be made to the version control repository.

Changes that will be applied to the repository you can find in the Specifying action for each difference and Selecting objects to remove from the repository steps of the wizard.

Check repository wizard - Adding comments

Click the Next button to proceed to the Performing operation step of the wizard.


Performing operation

This step informs you that all necessary settings are defined and changes can be applied.

Check repository wizard - Performing operation

Click the Run button to apply changes defined at the previous steps.

To close the wizard after successful completion of the operation use the corresponding option.


Get change script wizard

Get change script wizard generates script that reflects differences between two database states. Any database state existing in its version control history can be taken as start or end point.

To launch the wizard use the Change management | Get change script... item of database context menu (or any database object context menu), or use the Tools | Change management | Get change script... main menu item.

  • Selecting source database
  • Selecting script generation method
  • Specifying start and end points for the script
  • Specifying comments
  • Defining script destination
  • Performing operation

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Create tag wizard

Check repository wizard

History


Selecting source database

Use this step to select source database to get change script.

Get change script wizard - Selecting source database

Use the Source database drop-down list for the purpose.

Note: Version control must be enabled for the selected database.

Click the Next button to proceed to the Selecting script generation method step of the wizard.


Selecting script generation method

This step allows you to select script generation method.

Get change script wizard - Selecting script generation method

RadioButton Generate script step-by-step

Use this method to generate script that reflects consecutive changes made to database during period defined at the next step.

Note: This script can't be used to rollback to the initial state of the database (start point).

RadioButton Generate differential script

Using this method the program generates script reflecting difference between two database states.

Note: Script generated using this method never contains intermediate changes of an object.

Click the Next button to proceed to the Specifying start and end points for the script step of the wizard.


Specifying start and end points for the script

This step allows you to define the period. Generated script will consider changes made in this period.

Get change script wizard - Specifying start and end points

Script start point

First select start point type: RadioButton Tag or RadioButton Date. Then either select tag from the drop-down list or specify a date. RadioButton Last revision of branch can be selected as start point only when getting differential script.

Script end point

First select end point type: RadioButton Last revision of branch (current database state), RadioButton Tag or RadioButton Date. Then either select tag from the drop-down list or specify date.

Note: If the step-by-step mode is selected in the previous step, start point must be earlier then end point.

Click the Next button to proceed to the Specifying comments step of the wizard.


Specifying comments

This step allows you to select comments to be added to each statement of the script. When getting a differential script this step is unavailable.

Get change script wizard - Specifying comments

Check the needed options to add corresponding comment to each script statement.

To disable comments uncheck the CheckBox Add description option.

Click the Next button to proceed to the Defining script destination step of the wizard.


Defining script destination

At this step you need to set script destination.

Get change script wizard - Specifying script destination

Script destination

RadioButton Automatically load to Script Editor

With this option enabled the generated script will be opened in the Script Editor where you can execute it at once.

RadioButton Save to file

Use this option to save script to a file for the future use. File name and its location are defined in the File name field.

Regardless of the script destination selected you need to define Script character set.

Click the Next button to proceed to the final step of the wizard.


Performing operation

This step informs you that all necessary settings are defined and change script can be generated.

Get change script wizard - Performing operation

Click the Run button to generate change script.

To CheckBox Close the wizard after successful completion use the corresponding option.


History

With this tool you can view all the changes made to database/object.

To open database/object history use the Change management | History item of database/object context menu, or select the Tools | Change management | History item of main menu.

  • History of database changes
  • Object history
  • Comparing object versions

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Create tag wizard

Check repository wizard

Get change script


History of database changes

Use the navigation bar to select a Database. Define the Period within the corresponding section. Changes made in this period will be displayed in the working area.

Change Management - Version Control History

At the top of the window you can find a table that displays information about changes made in the specified period. It displays transaction ID, Date when transaction was made, name of the User who made changes and Comment to a transaction if any.

Note: You can customize grouping and filtering within this table.

In the bottom part of the window you can view SQL statement of the selected action.

See also:

Create tag wizard

Check repository wizard

Get change script


Object history

You can browse change history of any object.

To open object history use the Change management | History item of object context menu.

Change Management - Object history

History of object changes is displayed as a table. In this table you can find the following information: database Revision and Date when the object was changed. The Author of changes made to object is also displayed.

Comment part of the window displays comments to the selected object modification.

The navigation bar of this window allows you to iconDB select database, to iconRefresh refresh data and to iconSelectObject select object.

See also:

Create tag wizard

Check repository wizard

Get change script


Comparing object versions

You can view differences between two object versions.

Object History - Revisions

Select two object revisions you need to compare. Right-click any of the objects to call the context menu and select the Compare Properties or Compare Scripts item to view differences as table of properties or as object script respectively.

The window displaying progress of the operation will appear. Close it to view the results of the operation.

Object History - Comparing progress

Check the CheckBox Close after finish flag if you need the results window appear once the operation is finished.

Viewing properties comparison results:

Change Management - Object History - Comapring Properties

Window contains table where you can see all object properties and its value in compared revisions. Properties with different values are highlighted with grey.

Viewing script comparison results:

Change Management - Object History - Comapring Scripts

Window contains DDL of objects revisions. Extra lines in an early revision script are red, in latter revision - grey. Lines for pasting absent lines are yellow and different lines are blue.

Use the toolbar buttons to move cursor to btnMoveItemUp Previous difference or to btnMoveItemDown Next one, to btnFindText Find word or statement or to btnSearchAgain Find next one.

See also:

History of database changes

Object history


Database Tools

SQL Manager for DB2 provides a number of powerful tools that allow you to perform various operations over your databases.

SQL Monitor

Displays all the SQL statements executed while working in SQL Manager for DB2.

SQL Script Editor

Executes SQL scripts in the database.

Search in Metadata

Provides quick search for a string within the scope of database metadata.

Extract Database Wizard

Extracts the table metadata and/or data to an SQL script which can be executed later on another machine to restore the database structure and/or data.

Activity Monitor

Displays all current connections to a database.

Print Metadata

Creates powerful metadata reports in the WYSIWYG mode ready for printing.

HTML Report

Creates powerful metadata reports in the HTML format.

Reports management

Tools for efficient management of reports: creating, editing, viewing, printing.

Dependency Tree

Allows you to view all the object dependencies in one diagram.

CLP Console

Allows you to execute the DB2 CLP commands.

Compare Databases

Creates an SQL script that provides database structure synchronization.

Grant Manager

Allows you to manage grants on your DB2 database objects.

Visual Database Designer

Allows you to lay out your database schema visually.

Project Interaction

Creates projects which allow you to work with virtual databases that do not require connection to the server.

External Tools

Allows to add external Windows applications.

Using templates

Facilitates using SQL Manager wizards.

See also:

Getting Started

Database Explorer

Database Management

Database Objects Management

Query Management Tools

Data Management

Import/Export Tools

Change management

Instance Services

Personalization

How To...


Dependency Tree

The Dependency Tree tool allows you to view all the object dependencies in one diagram.

To call the Dependency Tree window, select the Tools | btnDependencyTree Dependency Tree main menu item, or use the Dependency Tree button on the main toolbar.

  • Using Navigation bar and Toolbar
  • Viewing dependency tree

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Database Objects Management


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Dependency Tree.

Dependency Tree - Using Navigation bar

The Navigation bar of the Dependency Tree window allows you to:

Database group

iconDB select a database for browsing object dependencies

General group

iconRefresh refresh the currently displayed dependency tree

iconPrint print the diagram

iconPrintSetup set printing options using the Print Setup dialog

iconSaveAsPicture save the current diagram as a picture

iconOptions edit dependency tree options

iconRestoreDefaultSize restore the default size and position of the window

Object group

navigate by switching to the previous object

navigate by switching to the next object

show/hide subobjects

select a root object

Diagram Layout group

Use the drop-down list to specify the diagram layout: Show all, Show depending on Root, Show Root depends on.

Items of the Navigation bar are also available on the ToolBar of the Dependency Tree window. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.

Hint: Items of the Object panel of the Navigation bar are also available in the context menu of the Dependency Tree area.


Viewing dependency tree

To view dependencies of an object, click the Select object Navigation bar item. Then select the required object in the Select Object dialog window. The dependency tree will appear in the main area of the window.

Dependency Tree - Select object

While the tree of dependencies is being built, the progress bar is displayed in the status area at the bottom of the window.

The root object is marked out with a blue frame.

The objects that the root object depends on are located to the left of the root object.

The objects that depend on the root object are located to the right of the root object.

Object dependencies are denoted as regular arrows from the left to the right (->).

A cyclic dependency (i.e. when the object already has some other depending object(s)) is denoted as a line ending with a cross (-x).

You can switch between objects by selecting them in the diagram. The selected object becomes the root object. To make an object root, you can also right-click it in the diagram area and select Set as Root from the context menu. The context menu of an object also allows you to edit it using the corresponding editor.

The history of selected root objects is also available: you can move back and forward through this history using the Previous object and the Next object links on the Navigation bar or toolbar.

Hint: To show/hide subobjects (e.g. table triggers, foreign keys), click the Show subobjects / Hide subobjects item on the Navigation bar.

See also:

Select Object dialog


SQL Monitor

SQL Monitor allows you to view the log of all operations performed over databases and database objects in SQL Manager for DB2. The content of the window is read-only.

To open the SQL Monitor window, select the Tools | SQL Monitor main menu item, or use the Shift+Ctrl+M shortcut.

  • Using Navigation bar and Toolbar
  • Working with SQL Monitor

See also:

SQL Monitor options


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in SQL Monitor.

SQL Monitor - Using Navigation bar

The Navigation bar of SQL Monitor allows you to:

General group

clear the content of the window

save the content to a *.txt file using the Save as... dialog

iconFindText search for a string using the Find Text dialog

iconSearchAgain search again

iconOptions configure SQL Monitor using the SQL Monitor section of the Environment Options dialog

iconRestoreDefaultSize restore the default size and position of the window

iconAlwaysOnTop specify that the window is displayed on top of other child windows

Items of the Navigation bar are also available on the ToolBar of SQL Monitor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Working with SQL Monitor

The working area of SQL Monitor lists the log of database operations and SQL queries as items, each consisting of 3 parts: Executed (the date and time of the operation), Operation (SQL statement sent to the server), Result (the result of the operation).

Items of the context menu of SQL Monitor area provide access to various functions for working with the window content. The context menu contains standard text-processing functions (Copy, Select All), spelling checking and functions for working with the content as a whole, e.g. you can set markers, move the cursor to a particular line, save the content to a file or as a favorite query, configure the editor using the properties item or preview/print the content. Most of these operations can be also performed with the corresponding hot keys used.

Implementation of the Find Text dialog and Incremental search bar contributes to more efficient work with the content of SQL Monitor.

SQL Monitor - Working with SQL Monitor


SQL Script Editor

Using SQL Script Editor you can view, edit and execute SQL scripts.

To open SQL Script Editor, select the Tools | btnNewSQLScript New SQL Script / Tools | btnShowSQLScript SQL Script main menu items or use the corresponding toolbar buttons. You can also use the Shift+Ctrl+S shortcut for the same purpose.

In the script area you can view and edit the SQL script text. For your convenience syntax highlight and code completion features are implemented.

  • Using Navigation bar and Toolbar
  • Working with SQL Script editor area
  • Using Script Explorer
  • Script execution

Note: SQL Script Editor does not show results returned upon SELECT queries execution. Please use SQL Editor for that purpose instead.

See also:

SQL Editor

SQL Script options

Editor Options


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in SQL Script Editor.

SQL Script Editor - Using Navigation bar

The Navigation bar of SQL Script Editor allows you to:

Destination group

iconHost select a node

iconDB select a database for the script

General group

iconAutoDDL toggle AutoDDL

iconExecute execute the current script

iconCompile execute a script from file

iconNew create a new script

iconLoadFromFile load a script from an *.sql file using the Open SQL Script dialog

iconSaveToFile save the current script

iconSaveToFileAs save the script to an *.sql file using the Save as... dialog

iconSaveToFileAs save the script to an *.sql file to the version control repository folder using the Save as... dialog (available only for databases with Version control enabled)

iconDBExplorer enable/disable parsing of SQL code

enable/disable result log

iconOptions configure SQL Script Editor within the Script Options section of the Environment Options dialog

iconRestoreDefaultSize restore the default size and position of the editor window

iconAddToVC include current shared script into version control

iconUpdateFromVC update shared script from version control

iconCommitToVC commit shared script to version control

Version Control group

define whether to log executed script to VC if it changes objects or always

specify whether comments to the script should be asked RadioButton before or RadioButton after run

Explorer group

iconDBExplorer browse the tree objects used in the script using the Script Explorer panel

Items of the Navigation bar are also available on the ToolBar of SQL Script Editor. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.

See also:

Working with SQL Script editor area

Using Script Explorer

Script execution


Working with SQL Script editor area

The Editor area of SQL Script is provided for efficient working with SQL scripts in text mode.

For your convenience the syntax highlight, code completion and a number of other features for efficient SQL editing are implemented:

  • using object links allowing you to open the object in the associated editor;
  • ability to display line numbers;
  • code folding for statements and clauses;
  • customizable margins and gutters;
  • formatting code for better representation

and more.

The context menu of SQL Script Editor area contains execution commands, most of the standard text-processing functions (Cut, Copy, Paste, Select All), spelling checking and functions for working with the script as a whole, e.g. you can enable/disable parsing, toggle bookmarks and comments, move the cursor to a particular line, change the case of selected text, load/save the content from/to a file or save as a favorite query, configure the editor using the Properties item or preview/print the text of the script. Most of these operations can be also performed with the corresponding hot keys used.

Implementation of the Find Text / Replace Text dialogs and Incremental search bar contributes to more efficient work with the SQL code.

SQL Script Editor - Working with SQL Script editor area

For your convenience the possibility to use macros is implemented.

To start recording a macro, click the btnRecordMacro Record button available in the status bar area, or use the Shift+Ctrl+R shortcut.

To stop recording, click the btnStopRecordMacro Stop button, or use the Shift+Ctrl+R shortcut.

To call the recorded macro, use the btnPlayMacro Play button, or use the Shift+Ctrl+P shortcut.

See also:

Using Navigation bar and Toolbar

Using Script Explorer

Script execution

Managing Favorite queries

SQL Script options


Using script explorer

The Explorer group on the Navigation bar displays the tree of objects, used in the current script and allows you to get to the required script fragment quickly by clicking the object in the tree.

SQL Script Editor - Using Script Explorer

Hint: When you click a node in the Script Explorer tree, the corresponding SQL statement is highlighted in the editor area. If you double-click a node, the corresponding SQL statement is highlighted, and the current focus is switched to the editor area (the cursor appears after the highlighted statement).

See also:

Using Navigation bar and Toolbar

Working with SQL Script editor area

Database Objects Management


Script execution

When all the script parameters are set, you can immediately execute the script in SQL Script Editor.

To execute a script, click the btnExecuteQuery Execute Script item of the Navigation bar or toolbar. You can also use the context menu or F9 hot key for the same purpose.

SQL Script Editor - Script execution

Note: If the CheckBox Execute selected text separately option (see the Tools | SQL Script section of the Environment Options dialog) is enabled (by default) and a text fragment is currently selected, only this fragment is executed when you click Execute script on the Navigation bar or press F9. If this option is disabled, the whole script is executed, but you can still execute the selected fragment using the corresponding Execute Selected Only item of the context menu or by pressing Ctrl+F9.

If the SQL syntax is correct, the script is executed and the 'Done!' information message appears.

SQL Script Editor - Script execution - Done

If the syntax contains errors or script cannot be executed, the corresponding error message is displayed in the status bar area at the bottom of the editor window.

Hint: When you select an item from the error list (in the status bar area), the corresponding SQL statement is highlighted in the editor area. If you double-click an item, the corresponding SQL statement is highlighted, and the current focus is switched to the editor area (the cursor appears after the highlighted statement).

Note: SQL Script Editor does not show results returned upon SELECT queries execution. Please execute such queries in SQL Editor to see the result dataset.

See also:

Using Navigation bar and Toolbar

Working with SQL Script editor area

Using Script Explorer


Extract Database Wizard

Extract Database Wizard allows you to extract database objects and/or data to an SQL script, e.g. for backup purposes.

To start the wizard, select the Tools | btnExtractDB Extract Database... main menu item.

  • Selecting a database for extraction
  • Specifying destination file name
  • Setting extraction mode
  • Setting BLOB options
  • Selecting objects for metadata extraction
  • Selecting objects for data extraction
  • Customizing script options
  • Start of extraction process
  • Using templates

See also:

SQL Script Editor

Database Objects Management

Using templates


Selecting source database

This step of the wizard allows you to select the source database from which metadata and/or data are to be extracted.

If necessary, check the CheckBox Extract all metadata and data of the database option to simplify the wizard.

Extract Database - Selecting source database

Click the Next button to proceed to the Specifying destination file name step of the wizard.


Specifying destination file name

Script destination

This group of options allows you to specify whether the result SQL script will be automatically loaded to SQL Script Editor or saved into a file.

File name

Set a name for the result *.sql file and type in or use the btnSaveAs Save as... button to specify the path to this file on your local machine or on a machine in the LAN.

File charset

If necessary, use the drop-down list to select the character set to be applied to the output file.

Extract Database - Specifying destination file name

Depending on whether you have checked the CheckBox Extract all metadata and data of the database option at the Selecting source database step, upon pressing the Next button you will either proceed to the next step of the wizard, or you will be immediately forwarded to the Setting BLOB options step, and then to the Customizing script options step of the wizard.


Setting extraction mode

This step allows you to specify the extraction mode: choose whether structure only, data only or both are to be extracted.

Extract Database - Setting extraction mode

Click the Next button to proceed to the Setting BLOB options step of the wizard.


Setting BLOB options

BLOB options

In this group of options you can determine whether BLOB fields are not to be extracted, extracted as strings, or extracted into a separate file. If the latter is selected,

RadioButton Don't extract BLOB fields

In this case BLOB fields values are not exported; BLOB fields have NULL values in the the INSERT statements of the result script.

RadioButton Extract BLOB fields as strings (may corrupt your data)

INSERT statements of the result script contain BLOB fields values as strings.

RadioButton Extract BLOB fields into file

BLOB fields values are exported into the *.blo file. You need to specify the File name and the location of the file on your local machine using the Save as... btnSaveAs button. The result script contains SET BLOBFILE '...' operator and INSERT statements with references to the data stored in the *.blo file.

CheckBox Compress file

Check this option if you wish to compress the file containing BLOB data.

Compression

Define the desired compression level to be applied for the file: None, Fastest, Default, Best.

Extract Database - Setting BLOB options

Click the Next button to proceed to Selecting objects for structure extraction.


Selecting objects for structure extraction

This step of the wizard allows you to select objects for metadata extraction.

Note that this step is only available if the CheckBox Extract all metadata and data of the database option was unchecked when selecting the source database.

RadioButton Extract all objects

Adds all objects of the database to structure extraction process.

RadioButton Extract all objects of schema...

Adds all objects of a schema to structure extraction process.

Schema name

Use the drop-down list to select the schema to extract all objects from.

RadioButton Extract selected objects

Adds only selected objects to structure extraction process.

Objects to extract

Use the drop-down list to select the type of objects to be extracted.

To select an object, you need to move it from the Available list to the Selected list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the objects from one list to another.

Extract Database - Selecting objects for structure extraction

Click the Next button to proceed to Selecting objects for data extraction.


Selecting objects for data extraction

This step of the wizard allows you to select tables for data extraction.

Note that this step is only available if the CheckBox Extract all metadata and data of the database option was unchecked when selecting the source database.

RadioButton Extract data of the selected tables

Adds only selected tables to data extraction process.

To select a table, you need to move it from the Available list to the Selected list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the tables from one list to another.

RadioButton Extract data of all tables

Adds all tables of the database to data extraction process.

RadioButton Extract data of tables selected on the previous step

Adds only the tables selected for metadata extraction.

Extract Database - Selecting objects for data extraction

Click the Next button to proceed to the Customizing script options step of the wizard.


Customizing script options

This step allows you to customize common script options and data options for the extraction process.

Script options

CheckBox Extract dependent objects

This option determines objects' dependencies usage in the extraction process. Check the option to extract all objects that the selected objects depend on.

CheckBox Extract privileges

Tick off the option if you want the privileges (permissions on the objects) to be extracted.

CheckBox Generate "DROP" statements for objects

Check the option to add the DROP statements for the extracted objects in the result script.

Extract Database - Customizing script options

Data options

Records in Block / CheckBox Insert COMMIT statement after each block

These controls allow you to define whether the COMMIT statement is inserted into the script or not, and to specify the number of records in each block to be supplemented with this statement.

CheckBox Extract table data just after its definition

If this option is selected, the INSERT INTO commands for each table follow the table definition (CREATE TABLE).

CheckBox Abort extraction on error

This option determines whether the extraction process should be stopped or forced to continue if an error occurs.

Click the Next button to proceed to the last step of the wizard.


Start of extraction process

This step of the wizard is intended to inform you that all extraction options have been set, and you can start the extraction process.

The log area allows you to view the log of operations and errors (if any).

Extract Database - Start of extraction process

CheckBox Load script to Script Editor

Check this option to load the result script to SQL Script Editor.

CheckBox Close the wizard after successful completion

If this option is selected, the wizard is closed automatically when the extraction process is completed.

If necessary, you can save a template for future use.

Click the Finish button to run the extraction process.


Print Metadata

Print Metadata allows you to generate and print metadata reports of any database object(s).

To open the window, select the Tools | btnPrintMetadata Print Metadata main menu item, or use the Print Metadata button on the main toolbar.

  • Using Navigation bar and Toolbar
  • Printing options
  • Print Preview

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Database Objects Management

Print Metadata options


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Print Metadata.

Print Metadata - Using Navigation bar

The Navigation bar of the Print Metadata window allows you to:

Database group

iconDB select a database for the printing report

General group

iconPrint print metadata of the selected object(s)

iconPreview preview the printing report

iconRestoreDefaultSize restore the default size and position of the window

Show group

Tick filter database objects by type

Items of the Navigation bar are also available on the ToolBar of the Print Metadata window. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Printing options

The Print Metadata window allows you to select the database objects for printing metadata.

To select an object, you need to move it from the Available objects list to the Objects for printing list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the objects from one list to another.

After you select one or several objects, the Printing Options panel appears at the bottom.

Printing Options

Select an object in the Objects for printing list and specify items to be included into the printing report: DDL, Description , Fields/Params, Indexes (availability of the items depends on the object).

Print Metadata - Printing options

See also:

Using Navigation bar and Toolbar

Print Preview


Print preview

You can btnPrintPreview make a preview of the printing report and btnPrintMetadata print metadata for objects of the selected type using the corresponding items of the Navigation bar (or toolbar).

Print Metadata - Preview

The toolbar of the Preview window allows you to:

  • start printing the report;
  • open a previously saved printing report;
  • save the current report to an external *.fp3 file;
  • export the preview content to any of the available formats: HTML file, Excel file, Text file, RTF file, CSV file, HTML file, BMP image, Excel table (OLE), JPEG image, TIFF image (use the btnPreviewExport Export button for this purpose);
  • search for text within the printing report;
  • adjust zoom options;
  • enable/disable printing report outline;
  • enable/disable printing report thumbnails;
  • specify page settings;
  • edit the page using Report Designer;
  • navigate within the printing report pages;
  • close the Preview window.

See also:

Using Navigation bar and Toolbar

Printing options


HTML Report Wizard

HTML Report wizard allows you to generate a detailed HTML report of the selected database objects.

To start HTML Report Wizard, select the Tools | [image] HTML Report main menu item, or use the HTML Report button on the main toolbar.

  • Selecting database and directory
  • Selecting object types
  • Specifying CSS for HTML report
  • Setting additional report options
  • Creating HTML report
  • Using templates

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Database Objects Management

Using templates


Selecting database and directory

At this step of the wizard you should select the source database and output directory for the HTML report.

Source database

Use the drop-down list of registered and connected databases to select the source database for the report.

Output directory

Type in or use the ExplorerButton button to specify the path to the output directory for the result HTML files using the Browse for Folder dialog.

HTML Report - Selecting database and directory

Click the Next button to proceed to the Selecting object types step of the wizard.


Selecting object types

Use this step of the wizard to select the types of objects to be included in the result HTML report.

HTML Report - Selecting object types

Use the Move to Available Move all to Available Move all to Selected Move to Selected buttons to select the needed database components to extract.

Click the Next button to proceed to the Specifying CSS step of the wizard.


Specifying CSS

This step of the wizard allows you to edit the CSS (Cascading Style Sheet) file and preview settings that will be used by the result HTML report.

HTML Report - Specifying CSS

Click the Next button to proceed to the Setting additional report options step of the wizard.


Setting additional report options

Use this step of the wizard to set additional HTML report options.

HTML Report - Setting additional report options

If necessary, you can set optional text to Report header and Report footer of the result HTML report. For your convenience the default header and footer text is already available. If necessary, you can edit this text according to your needs.

DDL font size

This control allows you to set the font size for the DDL section. Move the slider between the small and large threshold values to select the required font size value within this scope. Note that the text size also depends on your browser settings.

Click the Next button to proceed to Creating HTML report.


Creating HTML report

This step of the wizard is intended to inform you that all necessary options have been set, and you can start the process.

The log area allows you to view the log of operations and errors (if any).

HTML Report - Creating HTML report

CheckBox Show report after generating

This option opens the result report in your default browser after generating.

CheckBox Close the wizard after successful completion

If this option is selected, the wizard is closed automatically when the creating HTML report process is completed.

If necessary, you can save a template for future use.

Click the Finish button to run the process.


Reports management

SQL Manager for DB2 provides several tools for efficient reports management:

  • Create Report Wizard

This tool is used to simplify the process of creating reports.

  • Report Designer

It is a basic tool for creating powerful reports.

  • Report Viewer

Allows you to view created reports.

Reports can be stored either in the database (table DB2MREPORTS will be created to store them) or in a directory on your hard drive specified on the Directories page of the Database Registration Info dialog.


Create Report Wizard

Using Create Report Wizard you can create a report containing required datasets, bands and fields on them, with a definite report style applied.

To start the wizard, select the Database | New Object... main menu item, then select [image] Report in the Create New Object dialog. Alternatively, you can right-click the Reports node of the DB Explorer tree and select the New Report... item from the context menu.

  • Specifying report name and options
  • Selecting report bands
  • Selecting report style
  • Specifying paper settings
  • Specifying margins
  • Specifying other page settings

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Report Designer

Report Viewer


Specifying database name and report options

Select the source database for adding a report and choose the action you need to perform: either create a new report or import an existing report from file.

Set the name for the new report and specify the save options for it:

RadioButton Save to database

The report will be created on the server inside the database.

RadioButton Save to file

If this option is selected, the report will be saved as a *.fr3 file to the directory specified on the Directories page of the Database Registration Info dialog.

Create Report - Specifying database name and report options

Click the Next button to proceed to the Selecting report bands step of the wizard.


Selecting report bands

This step of the wizard allows you to select the bands to be included in the report.

To select a band, you need to move it from the Available Bands list to the Report Bands list. Use the Items - Move to Selected Items - Move all to Selected Items - Move to Available Items - Move all to Available buttons or drag-and-drop operations to move the fields from one list to another.

Use the Edit [image] button to create datasets for 'data' bands using Query Builder.

Create Report - Selecting report bands

Brief information about bands functionality is listed below. See FastReport Help for more information.

Name | Functionality
Report title | Prints once at the beginning of report
Report summary | Prints once at the end of report
Page header | Prints at the top of each page
Page footer | Prints at the bottom of each page
Master header | Prints at the beginning of master list
Master data | Data rows of master list
Master footer | Prints at the end of master list
Detail header | Prints at the beginning of detail list
Detail data | Data rows of detail list
Detail footer | Prints at the end of detail list
Subdetail header | Prints at the beginning of subdetail list
Subdetail data | Data rows of subdetail list
Subdetail footer | Prints at the end of subdetail list
Group header | Prints at the beginning of each group
Group footer | Prints at the end of each group

Click the Next button to proceed to the Selecting report style step of the wizard.


Selecting report style

Select the report style by clicking one of the images illustrating the styles available for the report.

Create Report - Selecting report style

Click the Next button to proceed to the Specifying paper settings step of the wizard.


Specifying paper settings

Specify report options: paper size and orientation, page margins, other settings.

Create Report - Specifying paper settings

Use the Margins tab to specify margins for the result report.

CheckBox Open the report after the wizard has finished

If this option is checked, the report will be opened in Report Designer after generating.

When you are done, click the Finish button to run the report generation process.


Specifying margins

Page margins

CheckBox Stretch to print area

If this option is checked, the size of report is adjusted to the print area. If this option is unchecked, you can specify the left, right, top and bottom margins (in millimeters).

Create Report - Specifying margins

Use the Other tab to specify other page settings for the result report.

CheckBox Open the report after the wizard has finished

If this option is checked, the report will be opened in Report Designer after generating.

When you are done, click the Finish button to run the report generation process.


Specifying other page settings

Options

CheckBox Print to previous page

This option allows to use white space on a previous page. This option can be used in case when a report template consists of several pages or when printing batch (composite) reports.

CheckBox Two-pass report

If this option is selected, report's formation will be performed in two steps. During the first pass, a report is formed, and is divided into pages, but the result is not saved anywhere. During the second pass a standard report formation with saving a result in the stream is performed.

CheckBox Page numbering

This option allows to print a page numbers.

Columns

Number

This parameter specifies the number of columns for multi-column reports' printing.

Gap, mm

This parameter specifies the width of the gap between columns.

Create Report - Specifying other page settings

CheckBox Open the report after the wizard has finished

If this option is checked, the report will be opened in Report Designer after generating.

When you are done, click the Finish button to run the report generation process.


Report Designer

Report Designer allows you to create and edit reports. This tool can be opened after completion of Create Report Wizard to design a new report.

To edit an already existing project, use the appropriate Navigation bar item of Report Viewer.

This module is provided by Fast Reports, Inc. (http://www.fast-report.com) and has its own help system. Press F1 key in the Report Designer to call the FastReport help.

Please find the instructions on how to create a simple report in the Report Designer below:

  • Adding dialog form
  • Adding database and query components
  • Adding report data
  • Viewing the report
  • Saving the report

Note: The Object Inspector which allows you to edit report object properties, can be shown/hidden by pressing the F11 key.

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Create Report Wizard

Report Viewer


Adding dialog form

To add a dialog form, select the File | New Dialog main menu item in Report Designer.

The new dialog appears within the DialogPage1 tab of the designer. Use the available RAD tools to add necessary interface elements to the dialog.

Report Designer - Adding dialog form

To call the dialog, proceed to the Code tab and supply the corresponding statement, e.g.

begin

DialogPage1.ShowModal;

end.

Using the Language drop-down list you can select the script language to be used for the event handler: PascalScript (by default), C++Script, BasicScript, Jscript.

For instance, the following C++ Script code can be used as the handler for the OnClick event of the 'Show' button to open ZeosDB2Query:

{

ZeosDB2Query1.Active = true;

}

See also:

Adding database and query components

Adding report data

Viewing the report

Saving the report


Adding database and query components

Adding database component

In order to add the Database component:

  • proceed to the Data tab of Report Designer;
  • pick the Database [image] component on the toolbar (on the left);
  • click within the working area - the corresponding ZeosDB2Database1 icon appears in the area;
  • set the database name and authorization parameters within the Properties Inspector.

Report Designer - Adding database component

Adding query component

In order to add the Query component:

  • proceed to the Data tab of Report Designer;
  • pick the Query [image] component on the toolbar (on the left);
  • click within the working area - the corresponding ZeosDB2Query1 icon appears in the area;
  • set the database name and authorization parameters within the Properties Inspector;
  • double-click the ZeosDB2Query1 icon to open the SQL window;
  • input the SQL query that returns the required dataset and click the btnPostEdit button;
  • repeat the operation if you wish to add other query components to the report.

Report Designer - Adding query component

Note: The Properties Inspector panel which allows you to edit report object properties can be shown/hidden by pressing the F11 key.

Using the above given steps you can create as many queries as you need. In order to select a dataset returned by a query, select the Report | Data... main menu item of Report Designer to call the Select Report Datasets dialog. Pick the required query within the dialog and press OK.

Report Designer - Selecting datasets

See also:

Adding dialog form

Adding report data

Viewing the report

Saving the report


Adding report data

Adding bands

In order to add a band to the report:

  • proceed to the Page1 tab of Report Designer;
  • pick the Insert Band [image] component on the toolbar (on the left);
  • select the band to be added to the report;
  • click within the working area - the corresponding element appears in the area;
  • set element properties within the Properties Inspector.

Report Designer - Adding bands

Adding report data

In order to add data to the report:

  • proceed to the Data tab within the panel on the right side of the window;
  • pick a field within the [image] Data tree and drag it to the working area;
  • add all necessary elements one by one using drag-and-drop operation for each of them.

Report Designer - Adding report data

Note: The Properties Inspector panel which allows you to edit report object properties can be shown/hidden by pressing the F11 key.

See also:

Adding dialog form

Adding database and query components

Viewing the report

Saving the report


Viewing the report

Viewing the report

To preview the newly created report, select the File | Preview main menu item or use the corresponding Preview btnPrintPreview toolbar button. You can also use the Ctrl+P shortcut for the same purpose. This mode allows you to view, edit and print the result report.

To print the report, use the Print btnPrint toolbar button or the corresponding context menu item.

Report Designer - Preview

It is also possible to preview/print the report using Report Viewer.

See also:

Adding dialog form

Adding database and query components

Adding report data

Saving the report


Saving the report

When all report parameters are set, you can save the report to an external *.fr3 file on your local machine or on a machine in the LAN.

To save the report, select the File | Save main menu item or use the corresponding Save Report btnSave toolbar button. You can also use the Ctrl+S shortcut for the same purpose.

If necessary, you can add the report to the database using Create Report Wizard and perform preview/print operations using Report Viewer.

See also:

Adding dialog form

Adding database and query components

Adding report data

Viewing the report


Report Viewer

Using [image] Report Viewer you can view, edit, save and print reports.

Possible report operations are described on the Using Navigation bar and Toolbar page.

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of , refer to the Feature Matrix page.

See also:

Create Report Wizard

Report Designer


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Report Viewer.

Report Viewer - Using Navigation bar

The Navigation bar of Report Viewer allows you to:

Object group

iconDB select a database

select a report for viewing

General group

iconRefresh refresh the content of the window

edit report using Report Designer

iconSaveToFile save the current report

iconSaveToFileAs save the report to a *.fr3 file using the Save as... dialog

iconPrint print the report

iconRestoreDefaultSize restore the default size and position of the viewer window

Items of the Navigation bar are also available on the ToolBar of the Report Viewer window. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Search in Metadata

The Search in Metadata tool is implemented for quick search within the scope of database metadata. The tool allows you to set various search conditions and view the results.

To launch the Search in Metadata tool, select the Tools | iconSearchInMetadata Search in Metadata main menu item, or use the Ctrl+Alt+F shortcut.

  • Using Navigation bar and Toolbar
  • Setting search conditions
  • Viewing search results

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Database Objects Management


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Search in Metadata.

Search in Metadata - Using Navigation bar

The Navigation bar of the Search in Metadata tool allows you to:

Database group

iconDB select a database for searching

General group

iconSearchInMetadata set search conditions

iconRestoreDefaultSize restore the default size and position of the window

Explorer group

iconDBExplorer browse the tree of found database objects

Items of the Navigation bar are also available on the ToolBar of the Search in Metadata tool. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Setting search conditions

The Find in metadata dialog allows you to set search conditions. It opens each time the Search in Metadata tool is launched.

Search in Metadata - Setting search conditions

Text to find

Enter a search string in this box. The Arrow-Down button which can be found next to the input box allows you to select any of the previously entered search strings.

Database

Use the drop-down list to select a database for the search operation.

Options

Available search options are similar to those provided by the Find Text dialog. For detailed description of the search options refer to the Find Text dialog page.

When all the options are set, click OK. The Search in Metadata [search string] report window will display the search progress and results.

See also:

Find Text dialog


Viewing search results

The Search in Metadata window allows you to view the search progress and results fetched from the database.

Search in Metadata - Viewing search results

After the search is complete, the Explorer group on the Navigation bar displays the tree of database objects in which the search string is found, and allows you to view metadata of the required object or its fragment quickly by clicking enclosed object branches in the tree.

The Object <object_name> area is provided for viewing metadata of the objects, with the search string highlighted.

For your convenience the syntax highlight, code completion and a number of other features for efficient SQL editing are implemented. For details see Working with SQL Editor area and Using the context menu.


Visual Database Designer

Visual Database Designer is provided for visual presentation of databases, database objects and relations between objects. It also allows you to create, edit and drop tables and table fields, set relations between tables and perform other operations you may need to achieve your purpose.

To open the designer, select the Tools | btnVDBD Visual Database Designer main menu item, or use the VDBD button on the main toolbar.

  • Using Navigation bar and Toolbars
  • Using Diagram Navigator and DB Objects panel
  • Using context menus
  • Adding/removing objects to/from diagram
  • Incremental search
  • Creating new objects
  • Creating relations
  • Working with diagram pages
  • Reverse engineering
  • Printing diagram
  • Saving/loading diagram
  • Setting diagram options

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Database Objects Management

Visual Database Designer options


Using Navigation bar and Toolbars

The Navigation bar and Toolbars provide quick access to tools implemented in Visual Database Designer.

VDBD - Using Navigation bar

The Navigation bar of Visual Database Designer allows you to:

Database group

iconDB select a database for building the diagram

File group

iconNew create a new diagram

iconLoadFromFile open an existing diagram

iconSaveToFile save the diagram

iconSaveToFileAs save the diagram with the objects XML files of the VDBD project

Navigator group

Tick use Diagram Navigator

General group

iconCompile compile the changes (if any)

undo last action

redo last action

iconRefresh refresh objects in the diagram

iconPrintSetup open the Print Setup dialog

iconPrint print the diagram

iconPreview preview the diagram

iconRestoreDefaultSize restore the default size and position of the window

iconOptions edit diagram options

Pages group

add a new page

delete the current page

delete all pages

Objects group

Here you can find objects (Tables, Views, Procedures, Functions) that were added to the diagram.

iconFindText search for objects in the diagram using the Objects panel

btnReverseEngineer perform Reverse Engineering

The Toolbars of Visual Database Designer provide quick access to most tools for working with diagrams.

To enable the toolbars, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbars only) or RadioButton Both (if you need both the toolbars and the Navigation bar) in the Bar style for child forms group.

The main toolbar (by default, the toolbar is located at the top of the diagram area) contains a number of tools (including items of the Navigation bar, context menu, tools for printing diagram, etc.) allowing you to:

iconDB select the database for building the diagram;

undo last action

redo last action

iconCompile compile the changes (if any)

iconNew create a new diagram;

iconLoadFromFile open an existing diagram;

iconSaveToFile save the current diagram to a *.dbd file;

btnSaveAsPicture save the current diagram as an image;

activate the Incremental search panel;

  • adjust diagram zoom for optimal representation: iconZoomIn zoom in, iconZoomOut zoom out, iconZoomFitModel fit model;

iconZoomSelectRectangleToFit switch cursor mode: select / select rectangle to fit;

iconPrintSetup open the Print Setup dialog;

iconPrint print the diagram;

iconPreview show Print Preview;

iconAlwaysOnTop arrange objects in the diagram;

btnExtractDB extract metadata of all objects in the diagram and load the script to SQL Script Editor;

btnReverseEngineer perform Reverse Engineering;

iconRefresh refresh objects in the diagram;

iconOptions view/edit diagram options;

  • specify a predefined zoom value;

The Pages toolbar (by default, the toolbar is located at the top of the diagram area) contains tools for working with diagram pages allowing you to:

add a new page;

delete the current page;

delete all pages.

VDBD - Toolbars - Pages

The Alignment Palette (by default, the toolbar is located on the left side of the diagram area) allows you to:

  • align left/right edges of selected objects;
  • align tops/bottoms of selected objects;
  • align horizontal/vertical centers of selected objects;
  • space selected objects equally horizontal/vertical.

VDBD - Toolbars - Alignment Palette

The New object toolbar (by default, the toolbar is located on the left side of the diagram area) allows you to:

  • set the cursor mode to Select;
  • create a new object (a table, a view, a procedure, a function, or a comment);
  • create a new relation (material or virtual).

VDBD - Toolbars - New object

The Object customization toolbar (by default, the toolbar is located at the top of the diagram area) allows you to:

VDBD - Toolbars - Object customization

  • specify a font to be applied to the text of the selected element;
  • specify font size for the text of the selected element;
  • toggle font attributes (bold, italic, underlined);
  • define the fill colors (font color, pen color, brush color).

See also:

Using Diagram Navigator and DB Objects panel

Using context menus

Adding/removing objects to/from diagram

Incremental search

Creating new objects

Creating relations

Working with diagram pages

Reverse engineering

Printing diagram

Saving/loading diagram

Setting diagram options


Using Diagram Navigator and Objects pane

SQL Manager for DB2
  • Index
  • « Prev
  • Next »

Using Diagram Navigator and Objects panel

To navigate within the large diagram, use the Navigator tool available on the Navigation bar. It allows you to see the whole diagram in a reduced scale and to perform a number of operations over the diagram objects.

VDBD - Diagram navigator

A mouse click in the Navigator area sets the center of the visible diagram area. The area currently visible in the main diagram area is outlined in a red bounding rectangle.

Using the Navigator you can work with the diagram objects in the same way as in the main diagram area: add/remove, create new objects, move objects within the diagram and perform other operations.

The Objects panel available on the Navigation bar allows you to find out the list of the database objects that were added to the diagram.

VDBD - Database Objects pane

Right-click an item within the list to call the context menu allowing you to:

iconFindText find the selected object in the diagram (if the object is found, it will be highlighted in the diagram area);

btnReverseEngineer reverse engineer builds relationship diagram on the basis of the current database's structure.

Tick specify whether tables are to be displayed;

Tick specify whether views are to be displayed;

Tick toggle objects representation mode: as a tree / as a list;

Tick select the sorting mode applied to the objects in the list: by schema, name / by type, schema, name / by name, schema / by type, name, schema;

iconRefresh refresh the list.

See also:

Using Navigation bar and Toolbars

Adding/removing objects to/from diagram

Creating new objects

Creating relations

Working with diagram pages


Using context menus

The context menu of the diagram area contains a number of items available in the Navigation bar and toolbars and allows you to:

  • select all objects in the diagram area;
  • select all headers and/or fields in the diagram area;
  • adjust diagram zoom for optimal representation: zoom in, zoom out, select rectangle to fit, fit model, specify a predefined zoom value;
  • set the cursor mode to Select or create a new table, view, procedure, function, relation, virtual relation, or comment;
  • configure the grid: draw grid, snap to grid;
  • adjust the diagram style: draw entities icons, draw attributes icons, draw only names of entities, draw foreign key names;
  • perform Reverse Engineering;
  • extract metadata of the diagram objects to SQL Script Editor;
  • view/edit diagram options.

VDBD - Using context menu

The context menu of an entity contains items for working with the object and allows you to:

  • edit the object using its editor (Table Editor, View Editor, Procedure Editor, Function Editor);
  • create a new object using its editor (New table, View Editor, Procedure Editor, Function Editor);
  • drop the object from the database;
  • show/hide object subitems (for tables) or the entire object (for views, procedures, functions);
  • remove the object from the diagram.

VDBD - Using entity context menu

The context menu of a field contains items for working with the object and its fields and allows you to:

  • edit the selected field using its editor (Field Editor);
  • create a new field;
  • drop the selected field;
  • edit the object using its editor (Table Editor, View Editor);
  • create a new object using its editor (New table, View Editor);
  • drop the object from the database;
  • show/hide object subitems (for tables);
  • remove the object from the diagram.

VDBD - Using field context menu

See also:

Using Navigation bar and Toolbars

Adding/removing objects to/from diagram

Incremental search

Creating new objects

Creating relations


Adding/removing objects to/from diagram

To add an object to the diagram:

  • drag it from the Database explorer panel to the diagram area or simply double-click this object in the list.

To add objects by Reverse engineering, you can right-click within the Database Objects list and select the iconPlus Add new objects... context menu item.

To remove an object from the diagram, select it in the diagram area, then right-click its title and choose the Remove <object_name> item from the context menu, or just press the Del key.

VDBD - Removing objects from diagram

See also:

Using Navigation bar and Toolbars

Using Diagram Navigator and DB Objects pane

Using context menus

Creating new objects

Creating relations

Reverse engineering

Database Objects Management


Incremental search

To search for an object within the diagram:

  • right-click the required object in the Database Objects panel and select the btnFindText Find Object in Diagram item from the context menu

or

  • click the [image] Incremental Search button on the main toolbar or use the Ctrl+F shortcut to activate the Incremental Search panel in the status bar area of the designer window.

VDBD - Incremental Search

Type a string in the edit-box, and the object having the name with the closest match will be highlighted in the diagram area.

See also:

Using Diagram Navigator and DB Objects pane


Creating objects

To create a new object using Visual Database Designer:

  • click the Create table button on the New object toolbar;
  • click the required point on the diagram to place the new object at;
  • specify object properties using its editor (New table, View Editor, Procedure Editor, Function Editor).

VDBD - Creating new table

Hint: To create a new object, you can also select the corresponding item from the context menu. The context menus also allow you to edit and drop database objects.

Note: Before you press the iconCompile Compile button the object is created on the diagram area only but not in the database.

See also:

Using Diagram Navigator and DB Objects pane

Adding/removing objects to/from diagram

Incremental search

Creating relations


Creating relations

Creating material relations

To establish a new material relation (which is the foreign key in terms of database management):

  • click the Create Relation button on the New object toolbar;
  • click the entity where the referential constraint should be created;
  • click the referred entity;
  • specify the new foreign key properties using Foreign key Editor.

VDBD - Creating relations

Creating virtual relations

SQL Manager for DB2 provides an ability to build virtual relations between any tables.

Virtual relations do not exist physically, they are only stored in the diagram. They are designed for building database structure visually. A virtual relation can be materialized further into a Foreign Key.

To establish a new virtual relation (which is implemented as a virtual foreign key):

  • click the Create Virtual Relation button on the New object toolbar;
  • click the entity where the virtual referential constraint should be created;
  • click the referred entity;
  • specify the new virtual foreign key properties using Foreign key Editor.

Hint: To create a relation, you can also use the corresponding item of the context menu.

Once the relation is created, it is displayed as a line between two entities in the diagram area. The style the line is drawn is determined by the diagram notation.

The context menu of this line allows you to view the foreign key using Foreign key Editor, or drop the foreign key (or virtual relation) from the database.

VDBD - Creating relations - Context menu

See also:

Using Diagram Navigator and DB Objects pane

Adding/removing objects to/from diagram

Incremental search

Creating new objects


Working with diagram pages

SQL Manager for DB2
  • Index
  • « Prev
  • Next »

Working with multiple diagram pages

You can create several pages in one diagram to split the model into several subject groups, e.g. for better comprehension.

To manage diagram pages, right-click on the tabs at the bottom of the diagram area and select the required popup menu items for adding, deleting and renaming pages.

VDBD - Working with diagram pages

Hint: Page management items are also available on the Pages toolbar of Visual Database Designer.

See also:

Using Diagram Navigator and DB Objects pane

Adding/removing objects to/from diagram


Reverse engineering

The reverse engineering operation builds relationship diagram on the basis of the current database's structure. The objects are arranged automatically within the diagram model.

To start the reverse engineering process, click the btnReverseEngineer Reverse Engineer button on the main toolbar, or use the corresponding item of the context menu.

VDBD - Reverse engineering

The Preparing Reverse Engineering dialog allows you to select schemas containing objects to reverse engineer.

VDBD - Reverse engineering - Select schema

For your convenience the Select All and Deselect All items are available in the context menu of the schemas list.

See also:

Using Navigation bar and Toolbars

Using Diagram Navigator and DB Objects pane

Adding/removing objects to/from diagram


Printing diagram

Visual Database Designer allows you to print and preview the diagram.

To preview the diagram:

  • click the btnPrintPreview Print Preview button on the toolbar;
  • preview the diagram using the Print Preview window.

To setup print options:

  • click the btnPrintSetup Print Setup button on the toolbar, or use the corresponding link on the Navigation bar;
  • set printing options using the Print Setup dialog and press OK.

To print the diagram:

  • click the btnPrintMetadata Print button on the toolbar;
  • set printing options using the Print Setup dialog and click the Print button.


Print preview

The Print Preview dialog allows you to see the diagram layout in WYSIWYG mode before it will be printed.

Use the navigation buttons or the spinner control to navigate within the preview pages.

Click the Print options... button to call the Print Setup dialog.

If necessary, specify the preview zoom according to your preferences.

Click the Print all button to start printing.

VDBD - Printing diagram - Print Preview

See also:

Print Setup dialog


Print setup dialog

The Print Setup dialog of Visual Database Designer provides two tabs for setting printing options: Printer and Page options.

The Printer tab of the Print Setup dialog allows you to:

  • specify the printer (use the Choose printer button to select a printer which is not set by default on your system; the name, driver, port fields display the selected printer details);
  • specify print layout: print using a defined scale factor or arrange diagram at a defined number of pages horizontally and vertically;
  • set other print options.

Database tools - VDBD - Print Setup - Printer

The Page options tab of the Print Setup dialog allows you to:

  • specify page margins (in millimeters): Top margin, Bottom margin, Left margin, Right margin;
  • specify Page header and Page footer: enter the header/footer running titles text, set left/center/right align.

Database tools - VDBD - Print Setup - Page options

Hint: It is also possible to set macros in the Page header and Page footer fields:

#PCOUNT stands for the quantity of pages;

#PAGE - the number of the current page;

#DATE denotes the current date;

#TIME denotes the current time.

See also:

Print Preview


Saving/loading diagram

Use the btnSave Save Diagram and the ExplorerButton Open Diagram buttons on the main toolbar to save the diagram as a *.dbd file for future use or to load the previously saved diagram.

VDBD - Saving and Loading diagram

If necessary, you can save the diagram as an image: click the btnSaveAsPicture Save as Picture button on the on the main toolbar.

A diagram is saved with the objects XML files of the VDBD project.

See also:

Using Navigation bar and Toolbars

Using Diagram Navigator and DB Objects pane

Using context menus

Adding/removing objects to/from diagram


Setting diagram options

The behavior and look of each diagram page can be customized on the Visual Database Designer page of the Environment Options dialog.

This page is called by using the btnEnvironmentOptions Page options item of the Navigation bar or on the main toolbar, or through the corresponding item of the context menu.

VDBD - Setting diagram options

See also:

Using Diagram Navigator and DB Objects pane

Visual Database Designer options


Activity Monitor

Activity Monitor allows you to get information about database connections and remove them, if necessary.

Use Activity Monitor when troubleshooting database issues, and to terminate a deadlocked or otherwise unresponsive process.

To launch the tool, select the Services | iconActivityMonitor Activity Monitor main menu item.

  • Using Navigation bar and Toolbar
  • Working with Activity Monitor

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

SQL Monitor

Activity Monitor options


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in Activity Monitor.

Activity Monitor - Using Navigation bar

The Navigation bar of the Activity Monitor window allows you to:

Database group

iconDB select a database for viewing activity

General group

iconRefresh refresh the information

iconInfoMessages show/hide connection details

iconCross force the selected application to disconnect from the database

iconOptions configure Activity Monitor within the Activity Monitor section of the Environment Options dialog

iconRestoreDefaultSize restore the default size and position of the window

iconAlwaysOnTop specify that the window is displayed on top of other child windows

Items of the Navigation bar are also available on the ToolBar of the Activity Monitor window. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Working with Activity Monitor

Activity Monitor displays the list of database connections, and allows you to manage them efficiently.

The list displays the database connections as a grid with the following columns: Application name, Client platform, Client protocol, Client name, Auth ID, Execution ID, Client DB alias, Client product ID, Authority level. If more convenient, you can change the order of the columns by dragging their headers horizontally.

Click a column caption to sort items by values of this column in the ascending or the descending mode.

If necessary, you can group the data in grid by any of the columns. This operation is performed by dragging the column header to the gray "Group by" box area at the top. When grouping by a column is applied to the grid, all the rows are displayed as subnodes to the grouping row value. To reverse grouping, just drag the column header back.

Activity management tools are available through the Navigation bar and toolbar of Activity Monitor.

If the Show Details mode is enabled, you can view detailed information on each connection by expanding the corresponding row.


CLP Console

CLP Console allows you to execute the DB2 CLP commands to access and maintain the database manager. These commands are used to control the system interactively.

To launch this tool, select the Tools | iconCLPConsole CLP Console main menu item, or use the CLP Console button on the main toolbar.

  • Using Navigation bar and Toolbar
  • Working with editing area
  • Viewing execution results

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

CLP Console options

CLP Tools


Using Navigation bar and Toolbar

The Navigation bar and Toolbar provide quick access to tools implemented in CLP Console.

CLP Console - Using Navigation bar

The Navigation bar of the CLP Console window allows you to:

Connection Info group

iconHost select an active node

iconDB select an active database

General group

iconExecute execute the command

iconOptions configure CLP Console within the CLP Console section of the Environment Options dialog

iconRestoreDefaultSize restore the default size and position of the window

iconAlwaysOnTop specify that the window is always on top

Items of the Navigation bar are also available on the ToolBar of the CLP Console window. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.


Working with editing area

The Edit tab of CLP Console allows you to input the DB2 CLP commands.

The working area provides all features for efficient text editing. See Working with SQL Editor area for details.

CLP Console - Working with CLP Console

To execute a command, click the btnExecuteQuery Execute item of the Navigation bar or toolbar. You can also use F9 key for the same purpose.

Command execution results are displayed within the Result tab of CLP Console.

See also:

Using Navigation bar and Toolbar

Viewing execution results


Viewing execution results

The Result tab is provided for viewing command execution results (or error messages) returned by the server.

CLP Console - Viewing results

See also:

Using Navigation bar and Toolbar

Working with editing area


Compare Databases

Compare Databases Wizard creates an SQL script that provides database structure synchronization. This tool allows you to compare databases or projects that may be stored on different hosts. You can modify the target database/project on the basis of the source database/project (perform source-to-target synchronization), or vice versa. As a result you can get an *.sql file with a saved script or view this script in the Script Editor.

To launch the wizard use the Tools | iconCompare Compare Databases... item of the main menu.

  • Selecting source database
  • Selecting schemas of the source database
  • Selecting target database
  • Selecting schemas of the target database
  • Selecting type of the synchronization script
  • Defining options for destination script
  • Performing operation

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Project Interaction

Using templates


Selecting source database

Use this step to define source database for comparing.

Database Comparer Wizard - Select the source database

Source host

Define a host or project where the source database is located.

Source database

Select a source database or project from the drop-down list.

RadioButton Compare whole databases\projects

RadioButton Compare separate schemas

If RadioButton Compare separate schemas is checked then you need to select schemas at the Selecting schemas of the source database step.

Otherwise proceed to the Selecting target database step.

Use the templates button to save current settings to template or to restore settings from an existing template.


Selecting schemas of the source database

This step appears only if the RadioButton Compare separate schemas option was checked at the first step.

Use this step of the wizard to select the schemas of the source database to compare.

Database Comparer Wizard - Select source schemas

For your convenience the Select All, Deselect All and Invert selections functions are implemented in the context menu of the schemas list area.

Click the Next button to proceed to the Selecting target database step of the wizard.


Selecting target database

Use this step to define target database for comparing.

Database Comparer Wizard - Specify the target database

Target host

Define a host where target database is located.

Target database

Select target database from the drop-down list.

If RadioButton Compare separate schemas at the first step was checked then you need to select the schemas of the target database at the Selecting schemas of the target database step.

Otherwise you will proceed to the Selecting type of the synchronization script step.

Use the templates button to save current settings to template or to restore settings from an existing template.


Selecting schemas of the target database

This step appears only if the RadioButton Compare separate schemas option was checked at the first step.

Use this step of the wizard to select the schemas of the target database to compare.

Database Comparer Wizard - Select terget schemas

For your convenience the Select All, Deselect All and Invert selections functions are implemented in the context menu of the schemas list area.

Click the Next button to proceed to the Selecting type of the synchronization script step of the wizard.


Selecting type of the synchronization script

Specify the direction of comparing selected databases.

Database Comparer Wizard - Select the type of synchronization script

RadioButton Target database into source database

Enables reverse comparing: the synchronization script will contain statements which make the target database identical to the source one.

RadioButton Source database into target database.

Enables direct comparing: the synchronization script will contain statements which make the source database identical to the target one.

Click the Next button to proceed to the Defining options for destination script step.

Use the templates button to save current settings to template or to restore settings from an existing template.


Defining options for destination script

Use this step to define additional options for destination script.

Database Comparer Wizard - Select additional options

Script destination

RadioButton Automatically load to Script Editor

With this option enabled, the synchronization script will not be saved. It will be loaded to Script Editor.

RadioButton Save to file

Use this option if you need to save the synchronization script to a file.

File name

Defines the name of the file to save the synchronization script to. Click the btnSaveAs Save button to locate file using the standard dialog or type the file name and its location manually.

File charset

Specified character set will be used when saving the script to file.

Click the Next button to proceed to the Performing operation step.

Use the templates button to save current settings to template or to restore settings from an existing template.


Performing operation

This step of the wizard is intended to inform you that all necessary options have been set, and you can start comparing databases.

The log area allows you to view the log of operations and errors (if any).

Compare Database Wizard - Comparing database

CheckBox Close the Wizard after successful completion

If this option is selected, the wizard is closed automatically when the process is completed. If the option is disabled then you can repeat the operation with the same or redefined parameters.

Click the Run button to run the backup database operation.

Use the templates button to save current settings to template or to restore settings from an existing template.


Grant Manager

Grant Manager allows you to set the user access grants on certain databases and database objects: schemas, tables, views, procedures, functions, materialized query tables, table spaces, etc. Granting privileges on the selected database objects allows a user to perform the defined operation over the objects.

To open Grant Manager, select the Tools | iconGrantManager Grant Manager main menu item.

  • Using Navigation bar, Toolbar and context menu
  • Managing database-specific privileges
  • Filtering objects in list

See also:

Users

Groups


Using Navigation bar, Toolbar and context menu

The Navigation bar, Toolbar and context menu provide quick access to tools implemented in Grant Manager.

Grant Manager - Using Navigation bar

The Navigation bar of Grant Manager allows you to:

Database group

iconDB select a database for grants management

Authorization group

btnGroupManager select an existing database user/group to grant privileges to

General group

iconCompile compile changes

iconRefresh refresh the content of the window

iconRestoreDefaultSize restore the default size and position of the window

Objects group

Tick select database object type to grant privileges on

Items of the Navigation bar are also available on the ToolBar of Grant Manager. To enable the toolbar, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.

The context menu is aimed at facilitating your work: you can perform a variety of operations using context menu items.

The context menu of Grant Manager allows you to:

  • grant a permission on an object to the selected user/group;
  • revoke a previously granted permission;
  • grant all permissions on an object to the selected user/group;
  • revoke all previously granted permissions on an object;
  • grant all permissions (with GRANT Option) on an object to the selected user/group;
  • grant a permission on all objects to the selected user/group;
  • revoke a previously granted permission on all objects;
  • grant a permission (with GRANT Option) on all objects to the selected user/group;
  • grant all permissions on all objects to the selected user/group;
  • revoke all previously granted permissions on all objects;
  • grant all permissions (with GRANT Option) on all objects to the selected user/group.

Grant Manager - Using context menu

See also:

Managing database-specific privileges

Filtering objects in list


Managing database-specific privileges

This window allows you to define privileges on database objects and grant privileges to a user or group.

To edit the privileges of a user/group on an object of a database, select the database using the Database panel of the Navigation bar, then select a user or group from the Authorization list available within the Navigation bar or toolbar. Then select the type of objects to be displayed in the main working window using the drop-down list at the top.

The Object Name column contains the list of objects of the selected type; each subsequent column corresponds to the permission which can be granted on the selected object:

Control, Select, Insert, Update, Alter, Delete, Rule, Index, References (for tables, materialized query tables);

Control (for indexes);

Control, Select, Insert, Update, Delete (for views);

Control, Bind, Execute (for packages);

Execute (for procedures, functions);

Control, Select, Alter, Index (for nicknames);

Read, Write (for SQL variables, security labels);

Control, Alter, Drop (for schemas);

Use (for table spaces);

DBADM, Connect, CreateTab, ImplictSchema, BindAdd, CreateNotFencedRoutine, Load, Create External Routine, Quiesce Connect, Security Admin (for databases).

Grant Manager - Managing database-specific privileges

The list of objects can be configured in several ways: you can specify that only granted objects are displayed in the grid, or define an object name to filter the objects by that name.

Right-click a cell to grant a specific permission on a certain object. To grant a permission on an object, you should find the object in the Object Name list and the column with the corresponding permission. The context menu of a cell contains possible permissions that can be granted:

Grant

Grant with GRANT Option

Revoke (removes a previously granted permission)

Grant All

Grant All with GRANT Option

Revoke All

Grant on All

Grant on All with GRANT Option

Revoke on All

It is also possible to select a cell range using the SHIFT key and to apply privileges to the whole selected range at once.

See also:

Using Navigation bar, Toolbar and context menu

Filtering objects in list


Filtering objects in list

In large databases with huge amount of objects it may be difficult to find the required object. For this purpose you are provided with several tools for filtering objects in list:

  • the Object type control: select the required object type from the drop-down list (e.g. Tables);
  • the Filter panel: enter a character string to filter the object names by that string;
  • the CheckBox Granted only option: check this option to display objects with at least one granted operation.

Grant Manager - Filtering objects in list

See also:

Using Navigation bar, Toolbar and context menu

Managing database-specific privileges


Project Interaction

Project Interaction Wizard creates projects which allow you to work with virtual databases that do not require connection to the server. It also allows you to create or update new databases on the basis of existing projects.

To launch the wizard use the Tools | [image] Project Interaction... item of the main menu or select it from the database\project context menu.

You can find your Projects in the Object Inspector tab below the DB Explorer area.

  • Selecting the source database/project
  • Creating new project
  • Selecting objects to check
  • Selecting database objects
  • Specifying actions
  • Selecting script destination
  • Performing operation

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Database Objects Management

Compare Databases wizard


Selecting the source database/project

This step of the wizard allows you to specify the source database in order to create a new project or update an existing one. Also you can choose a source project to create or update database.

Project Interaction - Select the source database

Source host

Define a host where the source database is located, or choose the Projects item of the drop-down list if you want to define a project as a source.

Source database/project

Use the drop-down list to select the database for the project.

Target host

Define a host where target database is located, or choose the Projects item of the drop-down list if you want to define a project as a target.

Target project/database

Use the drop-down list to select the project for updating.

If RadioButton Update project/database is checked you need to select target project/database from the drop-down list. Then proceed to the Select objects to check step.

If RadioButton Create project/database is checked then the target project/database field becomes unavailable. The new project/database will be created.

You can also create a new database if you choose an already existing project as a source.

Click the Next button to proceed to the Create Database wizard.


Creating new project

This step appears only if the RadioButton Create project option was checked at the first step.

This step of the wizard allows you to specify properties of a new project.

Project Interaction - Create new project

Project name

Input the project name in this box. This value must be unique to differentiate the project from any other project.

RadioButton Create empty project creates a project with no objects.

RadioButton Create clone of source database creates a project on the basis of an existing database. All objects from the database will be copied to the project.

If RadioButton Create clone of source database is checked then you need to choose objects to clone:

RadioButton Clone all objects allows coping all objects from the source database

RadioButton Clone all objects of schema allows you to choose schema name from the relevant drop-down list.

RadioButton Clone selected objects allows coping only necessary objects.

Database version

Use the spinner controls to specify the preferable version of the database server. The database project will use the set of objects and settings that are relevant for this version.

If RadioButton Clone selected objects is checked then click the Next button to proceed to the Select database objects step.

Otherwise click the Next button to proceed to the Performing operation step of the wizard.


Creating new database

This step of the wizard allows you to create a new database on your DB2 system.

Here you are to provide the necessary Database and Node information for the new database in the corresponding boxes: Database name, Database alias, Path/Drive, Database comment, Node name, User name, Password.

Project Interaction - Create new database

Database name

Enter the database name in this box. This value must be unique to differentiate the database from any other database the local database directory or the system database directory.

Database alias

Provide any database alias that is convenient for you (by default NEW_DB). If no alias is provided, the specified database name is used. This alias will be displayed in the DB Explorer window.

Path/Drive

Use the ellipsis EllipsisButton button to specify the location where the new database will reside. If a path is not specified, the database will be created on the default database path specified in the database manager configuration file (dftdbpath parameter).

Supply a Database comment, if necessary.

Node info

Select the node for the new database using the Node name combo-box, and supply the User name and Password.

CheckBox Restrict access

If this option is selected, the RESTRICT_ACCESS database configuration parameter is set to YES and no privileges are automatically granted to PUBLIC.

CheckBox Automatic storage

Specifies that automatic storage is being explicitly disabled or enabled for the database.

Click the Next button to proceed to the Setting connection properties step of the wizard.


Setting connection properties

Use this step of the wizard to provide the necessary Tablespace and Code page information for the new database in the corresponding boxes: Number of segments, Default extent size, Territory, Codeset, Collation, Comments codepage.

Project Interaction - Setting connection properties

Tablespace info

Number of segments

Set the number of segment directories that will be created and used to store the AT, IDX and LF files.

Default extent size

If necessary, specify the default extent size (in pages) for table spaces in the database.

Page size

Defines the size of pages used for the table space. Supported sizes include 4K, 8K, 16K, and 32K.

Code page info

Territory

Specify the territory to be used for data entered into the database being created. After you create the database, you will not be able to change the specified territory.

Codeset

Specify the code set to be used for data entered into the database being created. After you create the database, you will not be able to change the specified code set.

Collate using

Identify the type of collating sequence to be used for the database being created. You may leave this field blank to apply the default collating sequence of the operating system based on the current territory code.

Comments codepage

Specify the codepage that should be used for database comments.

If CheckBox Specify tablespaces manually is checked then click the Next button to proceed to the Defining database files step.

Otherwise click the Next button to proceed to the Selecting script destination step of the wizard.


Defining database files

This step appears only if the CheckBox Specify tablespaces manually option was checked at the Setting connection properties step.

Use this step of the wizard to define the location of the new database files and a number of tablespace parameters using the corresponding controls.

Catalog tablespace

Contains parameters of the table space which will hold the catalog tables (SYSCATSPACE).

User tablespace

Contains parameters of the initial user table space (USERSPACE1).

Temp tablespace

Contains parameters of the initial system temporary table space (TEMPSPACE1).

Project Interaction - Defining database files

Managed by...

RadioButton System: specifies that the table space is to be a system managed space (SMS) table space.

RadioButton Database: specifies that the table space is to be a database managed space (DMS) table space.

CheckBox Automatic resize

Specifies whether or not the auto-resize capability of a DMS table space or an automatic storage table space is to be enabled. Auto-resizable table spaces automatically increase in size when they become full. The option can be modified only if Managed by Database option is selected. Check the Automatic resize option to enable auto-resize capability.

CheckBox File system caching

The option specifies whether or not Input/Output operations are to be cached at the file system level.

Extent size (pages)

Specify the number of 4KB pages that will be written to a container before skipping to the next container.

Prefetch size (pages)

Specify the number of 4KB pages that will be read from the table space when data prefetching is being performed.

Max size (MB)

Specifies the maximum size to which a table space that is enabled for auto-resize can automatically be increased.

Overhead

Set the number that specifies the I/O controller overhead, disk seek, and latency time (in milliseconds).

Transfer rate

Set the number that specifies the time in milliseconds to read one 4KB page into memory.

Increase size (MB)

Specifies the amount, per database partition, by which a table space will automatically be increased when the table space is full, and a request for space has been made.

Directory

Use the btnAddItem Add item / btnRemoveItem Remove item buttons to add or remove a directory for the table space, and the EllipsisButton ellipsis button to specify the path to the directory within the Browse for Folder dialog.

Click the Next button to proceed to the Selecting script destination step of the wizard.


Selecting objects to check

This step of the wizard allows you to select objects to check and define default check options. These options determine what set of objects of the source database/project will be compared to the target project/database objects.

Project Interaction - Select objects to check

Objects to check

Specify the objects to be checked before adding into project.

RadioButton Check all objects allows checking all objects.

RadioButton Check all objects of schema allows choosing schema name from the relevant drop-down list.

RadioButton Check selected objects allows selecting only necessary objects for checking.

Default check options

Use drop-down lists to specify actions to apply to:

  • Target modified objects. These are objects that were changed in target project/database. You can replace target object with source object or do not take any action.
  • Source new objects. These are objects that were added in the source project/database. You can add source object from the database/project to target project/database or do not perform any action.
  • Target new objects. These are objects that were added in the target database/project. You can delete new target object or ignore it.

If RadioButton Check all objects or RadioButton Check all objects of schema is checked then proceed to the Specify actions step.

If RadioButton Check selected objects is checked then proceed to the Select database objects step.


Selecting database objects

This step of the wizard allows you to select objects to be included into the project. To select an object, you need to move it from the Available list to the Selected list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move objects from one list to another.

Project Interaction - Select database objects

Click the Next button to proceed to the Specifying actions step of the wizard.


Specifying actions

This step of the wizard allows you to specify actions to apply to objects from the source database that do not match with objects from the target project.

Project Interaction - Specify actions

Status Deleted means that the object was removed from the target project.

Click the object and select the action from the drop-down list. You can add source object to target or ignore it.

If you are updating an existing database then click the Next button to proceed to the Selecting options for script step of the wizard.

Otherwise proceed directly to the Performing operation step.


Selecting script destination

This step of the wizard allows you to set destination options for the result script.

Project Interaction - Select options for script

Script destination

This group of options allows you to specify whether the result SQL script will be executed, automatically loaded to SQL Script Editor or saved into a file.

File name

Set a name for the result *.sql file and type in or use the btnSaveAs Save as... button to specify the path to this file on your local machine or on a machine in the LAN.

Click the Next button to proceed to the Performing operation step of the wizard.


Performing operation

This step of the wizard is intended to inform you that all necessary options have been set, and you can start the creating project process.

The log area allows you to view the log of operations and errors (if any).

Project Interaction - Performing Operation

CheckBox Close the wizard after successful completion

If this option is selected, the wizard is closed automatically when the creating project process is completed.

If necessary, you can save a template for future use.

Click the Run button to run the process.


Instance Services

SQL Manager for DB2 provides support for a number of instance tools you may need to manage your DB2 databases.

Backup Database

Backups database.

Restore Database

Restores database from a previously created backup.

Rollforward Database

Runs the rollforward database service.

Restart Database Wizard

Allows you to perform the Restart Database operation.

Quiesce Database Wizard

Allows you to perform the quiesce database operation.

Unquiesce Database Wizard

Allows you to perform the unquiesce database operation.

Ping Database

Pings the selected database.

CLP Tools

DB2 CLP utilities: export, import, load, move.

Reorganize Tables

Runs the reorganize tables service.

Reorganize indexes

Runs the reorganize indexes service.

Run Statistics

Runs DB2 database statistics.

Stop Database Manager Wizard

Allows you to perform the Stop Database Manager operation.

Start Database Manager Wizard

Allows you to perform the Start Database Manager operation.

See also:

Getting Started

Database Explorer

Database Management

Database Objects Management

Query Management Tools

Data Management

Import/Export Tools

Change management

Database Tools

Personalization

How To...


Backup Database

Backup Database Wizard allows you to perform the database backup operation on your DB2 system.

This operation is used to create a backup copy of a database or a table space.

To run the wizard, select the Services | [image] Backup Database main menu item, or right-click the database alias in the DB Explorer tree and select the Database Operations | Backup Database context menu item.

  • Setting DB name and backup mode
  • Setting backup options
  • Selecting table spaces to backup
  • Specifying additional parameters
  • Running backup

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Restore Database

Quiesce Database Wizard

Using templates


Setting DB name and backup mode

This step of the wizard allows you to specify the database name, backup mode (location type) and backup directory.

Backup Database - Setting DB name and backup mode

Database

Use the drop-down list to select the database to backup.

Location type

Use the drop-down list to select the preferable location where a backup image will be created:

Local device

Select this mode to backup the database to the local machine.

Tivoli Storage Manager

Select this mode to backup the database to TSM server (using Tivoli Storage Manager output).

Vendor library

Select this mode if you wish to run the backup operation with the name of the shared library specified (DLL on Windows operating systems) containing the vendor backup and restore I/O functions to be used.

XBSA

Select this mode if you wish to run the backup operation with the XBSA interface used. Backup Services APIs (XBSA) is an open application programming interface for applications or facilities that need data storage management for backup or archiving purposes.

Backup directory or device names

Type in or use the ellipsis EllipsisButton button to specify the full path to the directory for backup files using the Browse dialog. Here you can enter a list of directory or tape device names. This target directory or device must exist on the database server.

Vendor DDL

The name of the shared library (DLL on Windows operating systems) containing the vendor backup and restore I/O functions to be used. It can contain the full path. If the full path is not defined the default path on which the user exit program resides will be used.

Click the Next button to proceed to the Setting backup options step of the wizard.


Setting backup options

This step of the wizard allows you to set the backup options.

Backup Database - Setting backup options

Buffer options

Use the spinner controls to specify the preferable buffer size, number of buffers, parallelism (number of buffer manipulators).

Backup type

Use the options to specify the preferable backup type: online or offline.

Select the backup level: database or table spaces.

CheckBox Incremental

This option specifies a cumulative (incremental) backup image. An incremental backup image is a copy of all database data that have changed since the latest successful, full backup operation.

CheckBox Delta

This option specifies a non-cumulative (delta) backup image. A delta backup image is a copy of all database data that have changed since the latest successful backup operation of any type.

To make a reverse copy of active transaction logs, check the corresponding option. Type in or use the ellipsis EllipsisButton button to specify the path within the Browse dialog.

If necessary, you can CheckBox add the current date and time to the log file names.

CheckBox Quiesce database

Select this option to perform the Quiesce Database operation as well.

Click the Next button to proceed to Starting backup or to the Selecting table spaces to backup step of the wizard if you have selected table spaces as the backup level.


Specifying additional parameters

This step of the wizard provides disconnect parameters.

Backup Database - Specifying additional parameters

CheckBox Disconnect immediate

Enable this option to disconnect from database immediately when Run button is pressed on the final step.

Timeout

Define time interval in minutes to wait before disconnecting from database.

CheckBox Force users to disconnect

Enable the option to avoid cancelling the operation because of users' connection to the database.

If you have selected Tablespaces as the Backup level on the previous step then click the Next button to proceed to the Selecting table spaces to backup step of the wizard. Otherwise, proceed to the Running backup step.


Selecting table spaces to backup

This step of the wizard allows you to select table spaces for backup. Check/uncheck the corresponding boxes to select/deselect table spaces.

Backup Database - Selecting tablespaces to backup

Click the Next button to proceed to Running backup.


Running backup

This step of the wizard is intended to inform you that all necessary options have been set, and you can start the process.

The log area allows you to view the log of operations and errors (if any).

Backup Database - Starting backup

CheckBox Close the wizard after successful completion

If this option is selected, the wizard is closed automatically when the backup process is completed.

If necessary, you can save a template for future use.

Click the Finish button to run the process.


Restore Database

Restore Database Wizard allows you to perform the database restore operation on your DB2 system.

This operation is used to rebuild a damaged or corrupted database that has been backed up using Backup Database Wizard. The restored database is in the same state it was in when the backup copy was made. A database can be overwritten with a different image, and a backup image can be restored to a new database.

To run the wizard, select the Services | [image] Restore Database main menu item, or right-click the database alias in the DB Explorer tree and select the Database Operations | Restore Database context menu item.

  • Setting DB name and restore mode
  • Selecting containers
  • Selecting backup image
  • Setting restore options
  • Running restore

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Backup Database

Rollforward Database

Quiesce Database Wizard

Using templates


Setting DB name and restore mode

This step of the wizard allows you to specify the database name, and the preferable restoration variant.

Restore Database - Setting DB name and restore mode

Database

Use the drop-down list to select the database to restore.

Restore mode

Specify the preferable restoration variant:

RadioButton Restore to an existing database

RadioButton Restore to a new database

RadioButton Restore history file only

CheckBox Roll forward

Select this option to perform the Rollforward Database operation as well.

Click the Next button to proceed to the Selecting containers step of the wizard.


Selecting containers

This step of the wizard allows you to set common restore options and to select the table spaces to be restored.

Restore Database - Selecting containers

CheckBox Restore whole database

Check the option to restore the entire database.

CheckBox Redirect containers

This option specifies a redirected restore operation.

To select a table space, you need to move it from the Available tablespaces list to the Selected tablespaces list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the table spaces from one list to another.

Click the Next button to proceed to the Selecting backup image or to the Setting target database options step of the wizard if ypu have selected the RadioButton Restore to a new database option on the first step.


Setting target database options

This step of the wizard appears only if the RadioButton Restore to a new database option was selected on the first step. It allows you to define parameters for a newly created database.

Restore Database - Setting target database options

New database alias

Enter any database alias that is convenient for you. This alias will be displayed in the DB Explorer window.

Path/Drive

Use the ellipsis EllipsisButton button to specify the location where the new database will reside. If a path is not specified, the database will be created on the default database path specified in the database manager configuration file (dftdbpath parameter).

New log path

This parameter allows you to specify a string of up to 242 bytes to change the location where the log files are stored.

CheckBox Replace existing database

If a database with the same alias as the target database alias already exists, this parameter specifies that the restore utility is to replace the existing database with the restored database.

Click the Next button to proceed to the Selecting backup image step of the wizard.


Selecting backup image

Use this step of the wizard to select the backup image. Use the Show backups from date ... to date ... options to filter the list of backup images by date.

Restore Database - Selecting backup image

Click the Next button to proceed to the Setting restore options step of the wizard.


Setting redirect containers

This step of the wizard appears only if the CheckBox Redirect containers option was checked on the second step of the wizard.

Use this step of the wizard to define paths for containers.

Restore Database - Setting redirect containers

Tablespace

Use the drop-down list to choose a Tablespace and then specify the Container path and Container type in the grid.

Note: New container paths must differ from old ones, otherwise you won't be able to proceed to the next step.

Click the Next button to proceed to the Setting restore options step of the wizard.


Setting restore options

This step of the wizard allows you to set the restore options.

Restore Database - Setting restore options

Buffer options

Use the spinner controls to specify the preferable buffer size, number of buffers, parallelism (number of buffer manipulators).

Final state

Specify the preferable database state after the operation:

RadioButton leave in roll forward pending state

RadioButton reset roll forward pending state after restore

CheckBox Online restore

Enable the option to leave connections to database alive when performing operation.

CheckBox Quiesce database

This option indicates whether Quiesce Database operation should be performed as well.

Click the Next button to proceed to Running restore.


Running restore

This step of the wizard is intended to inform you that all necessary options have been set, and you can start the process.

The log area allows you to view the log of operations and errors (if any).

Restore Database - Starting restore

CheckBox Close the wizard after successful completion

If this option is selected, the wizard is closed automatically when the restore process is completed.

If necessary, you can save a template for future use.

Click the Run button to run the process.


Rollforward Database

Rollforward Database Wizard allows you to perform the database rollforward operation on your DB2 system.

This operation is used to recover a database by applying transactions recorded in the database log files. Invoked after a database or a table space backup image has been restored, or if any table spaces have been taken offline by the database due to a media error. The database must be recoverable (that is, the logarchmeth1 or logarchmeth2 database configuration parameters must be set to a value other than OFF) before the database can be recovered with rollforward recovery.

To run the wizard, select the Services | iconRollforwardDatabase Rollforward Database main menu item, or right-click the database alias in the DB Explorer tree and select the Database Operations | Rollforward Database context menu item.

  • Setting DB name and final state
  • Setting rollforward options
  • Starting rollforward database

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Backup Database

Restore Database

Using templates


Setting DB name and final state

This step of the wizard allows you to specify the database name and its preferred final state.

Rollforward Database - Setting DB name and final state

Database

Use the drop-down list to select the database to rollforward.

Final state

Specify the preferable database state after the operation:

RadioButton Leave in roll forward pending state

RadioButton Reset roll forward pending state after restore

Click the Next button to proceed to the Setting rollforward options step of the wizard.


Setting rollforward options

This step of the wizard allows you to set the rollforward options.

Rollforward Database - Setting rollforward options

Roll forward point

Use the options to specify the preferable point to be used for rollforward recovery:

RadioButton End of logs

RadioButton Local time

RadioButton Greenwich mean time

If necessary, you can enable the CheckBox Overflow log path. Type in or use the ellipsis EllipsisButton button to specify the path within the Browse dialog.

Click the Next button to proceed to Starting rollforward database.


Starting rollforward database

This step of the wizard is intended to inform you that all necessary options have been set, and you can start the process.

The log area allows you to view the log of operations and errors (if any).

Rollforward Database - Starting rollforward database

CheckBox Close the wizard after successful completion

If this option is selected, the wizard is closed automatically when the rollforward process is completed.

If necessary, you can save a template for future use.

Click the Finish button to run the process.


Restart Database Wizard

Restart Database Wizard allows you to perform the Restart Database operation on your DB2 system.

This operation is used to restart the database if it has been abnormally terminated and left in an inconsistent state. If the operation is completed successfully, the application remains connected to the database.

To run the wizard, select the Services | iconRestartDatabase Restart Database main menu item, or right-click the database alias in the DB Explorer tree and select the Database Operations | Restart Database context menu item.

  • Setting DB name and connection info
  • Restarting database

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Quiesce Database Wizard

Using templates


Setting DB name and connection info

This step of the wizard allows you to specify the database name and connection parameters for the restart database operation.

Restart Database - Setting DB name and connection info

Database

Use the drop-down list to select the database to restart.

Connection properties

In this group you should specify User name and Password for connection to the selected database. Enable the CheckBox Use same login and password option to use the ones specified during the database registration.

CheckBox Quiesce database

Select this option to perform the Quiesce Database operation as well.

Click the Next button to proceed to restarting database.


Restarting database

This step of the wizard is intended to inform you that all necessary options have been set, and you can start the process.

The log area allows you to view the log of operations and errors (if any).

Restart Database - Restarting database

CheckBox Close the wizard after successful completion

If this option is selected, the wizard is closed automatically when the restarting database process is completed.

If necessary, you can save a template for future use.

Click the Finish button to run the process.


Quiesce Database Wizard

Quiesce Database Wizard allows you to perform the quiesce database operation on your DB2 system.

This operation is used to disconnect all users from the database and put it into a quiesced mode. When a database is in quiesced mode, users cannot connect from outside of the database engine. Quiesced mode is ordinarily activated when there is a necessity to perform administrative tasks on a database. After administrative tasks are complete, you can use Unquiesce Database Wizard to activate the database and allow other users to connect to the database.

To run the wizard, select the Services | iconQuiesceDatabase Quiesce Database main menu item.

  • Setting DB name and connection info
  • Specifying additional parameters
  • DB quiescence

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Unquiesce Database Wizard

Using templates


Setting DB name and connection info

This step of the wizard allows you to specify the database name and connection parameters for the quiesce database operation.

Quiesce Database - Setting DB name and connection info

Database

Use the drop-down list to select the database to quiesce.

Connection properties

In this group you should specify User name and Password for connection to the selected database. Enable the CheckBox Use same login and password option to use the ones specified during the database registration.

Click the Next button to proceed to Specifying additional parameters step.


Specifying additional parameters

This step of the wizard provides disconnect parameters.

Quiesce Database - Specifying additional parameters

CheckBox Disconnect immediately

Enable this option to disconnect from database immediately when Run button is pressed in the final step.

Timeout

Define time interval in minutes to wait before disconnecting from database.

CheckBox Force users to disconnect

Enable the option to avoid cancelling the operation because of users' connection to the database.

Click the Next button to proceed to database quiescence.


DB quiescence

This step of the wizard is intended to inform you that all necessary options have been set, and you can start the process.

The log area allows you to view the log of operations and errors (if any).

Quiesce Database - DB quiescence

CheckBox Close the wizard after successful completion

If this option is selected, the wizard is closed automatically when the quiescence process is completed.

If necessary, you can save a template for future use.

Click the Finish button to run the DB quiescence process.


Unquiesce Database Wizard

Unquiesce Database Wizard allows you to perform the unquiesce database operation on your DB2 system.

This operation is used to restore user access to the database which have been quiesced for maintenance or other administrative tasks.

To run the wizard, select the Services | iconUnquiesceDatabase Unquiesce Database main menu item.

  • Setting DB name and connection info
  • DB unquiescence

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Quiesce Database Wizard

Using templates


Setting DB name and connection info

This step of the wizard allows you to specify the database name and connection parameters for the unquiesce database operation.

Unquiesce Database - Setting DB name and connection info

Database

Use the drop-down list to select the database to unquiesce.

Connection properties

In this group you should specify User name and Password for connection to the selected database. Enable the CheckBox Use same login and password option to use the ones specified during the database registration.

Click the Next button to proceed to database unquiescence.


DB unquiescence

This step of the wizard is intended to inform you that all necessary options have been set, and you can start the process.

The log area allows you to view the log of operations and errors (if any).

Unquiesce Database - DB unquiescence

CheckBox Close the wizard after successful completion

If this option is selected, the wizard is closed automatically when the unquiescence process is completed.

If necessary, you can save a template for future use.

Click the Finish button to run the DB unquiescence process.


Ping Database

Ping Database Wizard allows you to ping selected database.

This service is useful for database connection stability test.

Note: Database hint in the DB Explorer tree contains average ping to this database.

To run the wizard, select the Services | iconPingDatabase Ping Database main menu item.

  • Specifying database
  • Pinging database

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Using templates


Specifying database

At this step of the wizard you need to select database to ping and define ping options.

Ping Database - Specifying database

Database

Select the database you need to ping.

Request package size

At this field you can define the outgoing packet size in bytes.

Response packet size

This field allows you to define the incoming packet size.

Number of iterations

Use this field to set the preferable ping iterations.

Click the Next button to proceed to the Pinging database step of the wizard.


Pinging database

This step of the wizard is intended to inform you that all necessary options have been set, and you can start the process.

The log area allows you to view the log of operations and errors (if any).

Ping Database - Pinging Database

CheckBox Close the wizard after successful completion

If this option is selected, the wizard is closed automatically when the pinging database process is completed.

If necessary, you can save a template for future use.

Click the Run button to run the process.


CLP Tools

IBM DB2 provides command line processor (CLP) to execute database administrative functions. The CLP is used to execute database utilities, SQL statements and online help. For more information refer to DB2 server documentation.

SQL Manager for DB2 provides the following DB2 CLP tools:

CLP Export

Runs the CLP export utility.

CLP Import

Runs the CLP import utility.

CLP Load

Runs the CLP load utility.

CLP Move

Runs the CLP move utility.


CLP Export

CLP Export Data Wizard allows you to perform data export with the CLP export utility used.

The CLP export utility extracts data using an SQL select or an XQuery statement, and places that information into a file. You can use the output file to move data for a future import or load operation or to make the data accessible for analysis.

To run the wizard, select the Services | iconCLPExport CLP Export main menu item, or right-click a database alias in the DB Explorer and select the Database Operations | CLP Export context menu item.

  • Specifying DB name and connection info
  • Specifying data destination
  • Specifying DEL file modifiers
  • Specifying LOB destination
  • Specifying SQL SELECT statement
  • Exporting data

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

CLP Import

CLP Load

CLP Move

CLP Console


Specifying DB name and connection info

This step of the wizard allows you to specify the database name and connection parameters for the CLP export data operation.

CLP Export - Specifying the DB name and connection parameters

Database

Use the drop-down list to select the database to export data from.

Connection properties

In this group you should specify User name and Password for connection to the selected database. Enable the CheckBox Use same login and password option to use the ones specified during the database registration.

Click the Next button to proceed to the Specifying data destination step of the wizard.


Specifying data destination

This step allows you to specify the data destination options.

CLP Export - Specifying data destination - DEL

Name of the external file into which the data are to be exported | Destination for error, warning, and informational messages returned by the utility

Type in or use the btnSaveAs button to specify the path to the file and the file name.

File type

Select the type of the exported file. Supported file types are:

Delimited ASCII (*.del)

Worksheet formats (*.wsf)

Integration Exchange Format (*.ixf)

Enable the CheckBox Write each LOB value to a separate file, CheckBox Export XML document in UTF-16 codepage and CheckBox Write each XDM instance to a separate file options, if necessary.

CLP Export - Specifying data destination - WSF

File format

This option is available for Worksheet formats only. Use the drop-down list to select one of available values:

Lotus 1-2-3 Release 1, or 1a

Lotus Symphony Release 1.0

Lotus 1-2-3 Version 2, or Lotus Symphony Release 1.1

WCF file containing DBCS characters

CLP Export - Specifying data destination - IXF

Target codepage

This option is available for International Exchange Format only. Use the drop-down list to select one of available codepage values.

Click the Next button to proceed to the Specifying DEL file modifiers step of the wizard, or to the Specifying LOB destination step if the Worksheet formats or International Exchange Format file types have been specified.


Specifying DEL file modifiers

The step is only available if the Delimited ASCII (DEL) file type was selected at the previous step. You can use this step to specify file modifiers for file of this type.

CLP Export - Specifying DEL ASCII file modifiers

Target codepage

Defines the codepage of the exported file.

CheckBox Suppress recognition of double character delimiters

If this option is enabled, the character delimiter is not doubled if it is present in character fields.

CheckBox Remove leading zeros from all exported decimal columns

If the option is enabled, all insignificant zeros will be removed during the export procedure.

CheckBox Prefix positive decimal values with a blank

If the option is selected, the blank space will precede the positive decimal values. Otherwise the positive decimal values will be prefixed by a plus (+) sign.

CheckBox Use ISO date format

Enable the option if you want the source date format data to be exported complying with ISO date format.

Timestamp format

Defines the timestamp data format.

Character string delimiter

Defines the character that will be used in place of double quotation marks to enclose a character string.

Decimal point character

Specifies the character that will be used in place of a period as a decimal point character.

Column delimiter

Defines the character that will be used in place of a comma to signal the end of a column.

Click the Next button to proceed to the Specifying LOB destination step of the wizard.


Specifying LOB destination

Use this step of the wizard to specify base file names and destination directories for LOB and XML files.

CLP Export - Selecting LOB destination

Specify paths to directories in which LOB files are to be stored | base file names for LOB files | paths to directories in which XML files are to be stored | base file names for XML files.

Items should be delimited with a comma. If you leave the fields empty, base filename and path for XML and LOB will be the destination filename and directory specified at the Specifying data destination step.

You can type in the paths manually, or click the ellipsis EllipsisButton button to open the Paths to directories... dialog.

CLP services - Paths to LOB file directories

Type in a path in the lower editable area or use the ExplorerButton button to specify the path to the file using the Open dialog.

The dialog allows you to Add, Replace and Delete paths.

You can also reorder items in the list with the help of the [image] [image] buttons.

Click the Next button to proceed to the Specifying SQL SELECT statement step of the wizard.


Specifying SQL SELECT statement

At this step of the wizard you need to specify the SQL SELECT statement by typing it manually in the editing area or building it visually using Query Builder.

CLP Export - Specifying SQL SELECT statement

Click the Next button to proceed to the Exporting data step of the wizard.


Exporting data

This step of the wizard is intended to inform you that all necessary options have been set, and you can start the process.

The log area allows you to view the log of operations and errors (if any).

CLP Export - Exporting data

CheckBox Close the wizard after successful completion

If this option is selected, the wizard is closed automatically when the process is completed.

If necessary, you can save a template for future use.

Click the Run button to run the process.


CLP Import

CLP Import Data Wizard allows you to perform data import with the CLP import utility used.

The CLP import utility populates a table, typed table, or view with data using an SQL INSERT statement. If the table or view receiving the imported data already contains data, the input data can either replace or be appended to the existing data.

To run the wizard, select the Services | iconCLPImport CLP Import main menu item, or right-click a database alias in the DB Explorer and select the Database Operations | CLP Import context menu item.

  • Specifying DB name and connection info
  • Specifying data source and destination
  • Specifying common file modifiers
  • Specifying advanced file modifiers
  • Specifying LOB source
  • Specifying fields to import
  • Specifying additional parameters
  • Importing data

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

CLP Export

CLP Load

CLP Move

CLP Console


Specifying DB name and connection info

This step of the wizard allows you to specify the database name and connection parameters for the CLP import data operation.

CLP Import - Specifying the DB name and connection parameters

Database

Use the drop-down list to select the database to import data into.

Connection properties

In this group you should specify User name and Password for connection to the selected database. Enable the CheckBox Use same login and password option to use the ones specified during the database registration.

Click the Next button to proceed to the Specifying data source and destination step of the wizard.


Specifying data source and destination

At this step you need to specify the data source and destination table for the import operation.

CLP Import - Specifying data source and destination

Name of the external file from which the data are to be imported | Destination for error, warning, and informational messages returned by the utility

Type in or use the ExplorerButton and the btnSaveAs buttons to specify the path to the file and the file name.

File type

Select the type of the data source file. Supported file types are:

Delimited ASCII (*.del)

Non-delimited ASCII (*.asc)

Worksheet formats (*.wsf)

Integration Exchange Format (*.ixf)

Selected action

Use the drop-down list to specify the action to be performed by the utility:

INSERT

Adds the imported data to the table without changing the existing table data.

INSERT_UPDATE

Adds rows of imported data to the target table, or updates existing rows (of the target table) with matching primary keys.

REPLACE

Deletes all existing data from the table by truncating the data object, and inserts the imported data. The table definition and the index definitions are not changed. This option can only be used if the table exists. If this option is used when moving data between hierarchies, only the data for an entire hierarchy, not individual sub-tables, can be replaced.

REPLACE_CREATE

If the table exists, deletes all existing data from the table by truncating the data object, and inserts the imported data without changing the table definition or the index definitions. If the table does not exist, creates the table and index definitions, as well as the row contents, in the code page of the database. See Imported table re-creation for a list of restrictions. This option can only be used with .ixf files. If this option is used when moving data between hierarchies, only the data for an entire hierarchy, not individual subtables, can be replaced.

CREATE

Creates the table definition and row contents in the code page of the database. If the data was exported from a DB2 table, sub-table, or hierarchy, indexes are created. If this option operates on a hierarchy, and data was exported from DB2, a type hierarchy will also be created. This option can only be used with IXF files.

Destination

This section allows you to define destination for importing data. Use the Schema and Table drop-down lists to specify the schema and table into which the data are to be imported.

Click the Next button to proceed to the Specifying common file modifiers step of the wizard.


Specifying common file modifiers

Specify common file modifiers at this step of the wizard.

CLP Import - Specifying common file modifiers

General options

CheckBox Do not import default values for columns that are not nullable

Enable the option if you do not want to import default values into not nullable columns that are not explicitly specified in the source column. With this option disabled, default values will be imported if they can be specified.

CheckBox Suppress all warnings about rejected rows

Enable the option to let DB2 ignore such warnings during the import process.

Field defaults

Identity column behavior

IDENTITY MISSING modifier makes importing a table with an identity column more convenient if the input data file does not contain any values (not even NULLS) for the identity column.

IDENTITY IGNORE modifier indicates to the import utility that even though the input data file contains data for the identity column, the data should be ignored, and an identity value should be generated for each row.

Generated column behavior

GENERATED MISSING modifier makes importing a table with generated columns more convenient if the input data file does not contain any values (not even NULLS) for all generated columns present in the table.

GENERATED IGNORE modifier indicates to the import utility that even though the input data file contains data for all generated columns present in the target table, the data should be ignored, and the computed values should be loaded into each generated column.

CheckBox Use defaults for blank

Enable this option to substitute blank values with default values.

If the Integration Exchange (IXF) format was specified at the Specifying data source and destination step, additional options are available:

CLP Import - Specifying common file modifiers - IXF

CheckBox Suppress translation between code pages

Enable this option to direct the utility to accept data despite code page mismatches, and to suppress translation between code pages.

CheckBox Import row, even if the source data size exceeds the size of the target column

If the option is enabled, no checking target length is performed. An attempt is made to import each row, even if the source data has a column definition that exceeds the size of the target table column.

CheckBox Drop existing indexes and create new ones

This option directs the utility to drop all indexes currently defined on the existing table, and to create new ones from the index definitions in the IXF file. This option can only be used when the contents of a table are being replaced.

Click the Next button to proceed to the Specifying advanced file modifiers step of the wizard.


Specifying advanced file modifiers

This step allows you to define advanced file modifiers. Depending on the source file type the set of available options will be different.

If the Integration Exchange (IXF) format or Worksheet formats (WSF) were specified at the Specifying data source and destination step, this step is skipped.

If the Delimited ASCII (DEL) format was specified at the Specifying data source and destination step:

CLP Import - Specifying advanced file modifiers - DEL

Source codepage

Codepage of the source file.

CheckBox Insert implied decimal point on decimal data

Enable the option to insert the implied decimal point according to the table definition.

CheckBox Suppress recognition of character x'1A' as the EOF character

If the option is enabled, character x'1A' will be recognized as the end of file character.

Date format

Use the drop-down list to specify the date format for the imported data.

Time format

Use the drop-down list to specify the time format for the imported data.

Timestamp format

Use the drop-down list to specify the timestamp format for the imported data.

Character string delimiter

Defines the specified character that will be used in place of double quotation marks to enclose a character string.

Decimal point character

Specifies the character that will be used in place of a period as a decimal point character.

Column delimiter

Defines the character that will be used in place of a comma to signal the end of a column.

CheckBox Use ISO date format

Enable the option if you want the source date format data to be imported complying with ISO date format.

CheckBox Prefix positive decimal values with a blank

If the option is checked the blank space will precede the positive decimal values. Otherwise the positive decimal values will be prefixed by a plus sign (+).

CheckBox Prioritize character string delimiter over record delimiter

Use this option to change delimiters priority.

CheckBox Preserve leading and trailing blanks in each field

Enable the option to keep blanks from removing. Without this option, all leading and trailing blanks that are not inside character delimiters are removed, and a NULL is inserted into the table for all blank fields.

CheckBox Suppress recognition of double character delimiters

If the option is enabled, the double character delimiter is not interpreted as a literal instance of the character delimiter.

If the Non-delimited ASCII (ASC) format was specified at the Specifying data source and destination step, the following options are available:

CLP Import - Specifying advanced file modifiers - ASC

Source codepage

Codepage of the source file.

CheckBox Insert implied decimal point on decimal data

Enable the option to insert the implied decimal point according to the table definition.

CheckBox Suppress recognition of character x'1A' as the EOF character

If the option is enabled, character x'1A' will be recognized as the end of file character.

Date format

Use the drop-down list to specify the date format for the imported data.

Time format

Use the drop-down list to specify the time format for the imported data.

Timestamp format

Use the drop-down list to specify the timestamp format for the imported data.

CheckBox Import row, even if the source data size exceeds the size of the target column

If the option is enabled, an attempt is made to import each row, even if the source data has a column definition that exceeds the size of the target table column.

CheckBox Truncate trailing blank spaces when importing into variable-length field

If this option is not specified, blank spaces are kept.

CheckBox Truncate trailing nulls (0x00 characters) when importing into variable-length field

If this option is not specified, nulls are kept.

Specify the Character to denote null values in the corresponding field.

CheckBox Record length in characters

Enable this option to restrict the number of characters to read for each row without using a new-line character to indicate the end of the row. Maximum value is 32767.

Click the Next button to proceed to the Specifying LOB source step of the wizard.


Specifying LOB source

Use this step of the wizard to specify source directories for LOB and XML files.

CLP Import - Specifying LOB source

Specify paths to directories where LOB files are stored | paths to directories where XML files are stored.

Items should be delimited with a comma. If you leave the fields empty, path for XML and LOB will be the directory specified at the Specifying data source and destination step.

You can type in the paths manually, or click the ellipsis EllipsisButton button to open the Paths to directories... dialog.

CLP services - Paths to LOB file directories

Type in a path in the lower editable area or use the ExplorerButton button to specify the path to the file using the Open dialog.

The dialog allows you to Add, Replace and Delete paths.

You can also reorder items in the list with the help of the [image] [image] buttons.

Click the Next button to proceed to the Specifying fields to import step of the wizard.


Specifying fields to import

This step allows you to specify columns to be imported.

CLP Import - Specifying fields to import

Columns list

This group contains options pertaining to selection of table columns for data import.

Depending on the File type specified at the Specifying data source and destination step of the wizard, different sets of options are available.

RadioButton Select all columns from the external input file

This option is available for the DEL, WSF and IXF file types. If the option is selected, all the external file columns are selected for import (by default).

RadioButton Selection of columns from the external input file is by column name

This option is available for the WSF and IXF file types. If the option is selected, external file columns will be selected by their names.

RadioButton Selection of columns from the external input file is by column position

This option is available for the DEL, WSF and IXF file types. If the option is selected, you can define the order of selected columns in the list by setting the Position value.

RadioButton Selection of columns from the external input file is by column location

This option is available for the ASC file type. If the option is selected, data will be imported from the external Non-delimited ASCII file columns according to the specified End and Start values.

Click the Next button to proceed to the Specifying additional parameters step of the wizard.


Specifying additional parameters

At this step of the wizard additional CLP import data structure parameters can be specified.

CLP Import - Specifying additional parameters

Use the spinner controls to define the number of physical records to be imported | restart count | skip count | the number of warnings after which the import operation stops | the number of records to import before committing.

Access level

RadioButton Allow no access

Specifies that the CLP import utility locks the table exclusively.

RadioButton Allow write access

Specifies that the data in the table should still be accessible to readers and writers while the import is in progress.

Timeouts

RadioButton Don't use timeouts

Indicates that there is no timeout.

RadioButton Use timeout value from configuration

Indicates that the value of the locktimeout option from database properties is respected.

Click the Next button to proceed to the Importing data step of the wizard.


Importing data

This step of the wizard is intended to inform you that all necessary options have been set, and you can start the process.

The log area allows you to view the log of operations and errors (if any).

CLP Import - Importing data

CheckBox Close the wizard after successful completion

If this option is selected, the wizard is closed automatically when the process is completed.

If necessary, you can save a template for future use.

Click the Run button to run the process.


CLP Load

CLP Load Data Wizard allows you to load data with the CLP load utility used.

The CLP load utility is capable of efficiently moving large quantities of data into newly created tables, or into tables that already contain data. The load utility is faster than the import utility, because it writes formatted pages directly into the database, while the import utility performs SQL INSERTs.

To run the wizard, select the Services | iconCLPLoad CLP Load main menu item, or right-click a database alias in the DB Explorer and select the Database Operations | CLP Load context menu item.

  • Specifying DB name and connection info
  • Specifying data source and destination
  • Specifying common file modifiers
  • Specifying advanced file modifiers
  • Specifying action
  • Specifying LOB source
  • Specifying load parameters
  • Specifying fields to load
  • Specifying additional parameters
  • Loading data

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

CLP Export

CLP Import

CLP Move

CLP Console


Specifying DB name and connection info

This step of the wizard allows you to specify the database name and connection parameters for the CLP load data operation.

Specific DB Tools - Load service - specifying the DB name and connection parameters

Database

Use the drop-down list to select the database to load data into.

Connection properties

In this group you should specify User name and Password for connection to the selected database. Enable the CheckBox Use same login and password option to use the ones specified during the database registration.

Click the Next button to proceed to the Specifying data source and destination step of the wizard.


Specifying data source and destination

At this step you need to specify the data source and destination table for the load operation.

CLP Load - Specifying data source and destination

Source

Data location

Use the drop-down list to select the source data location: Client location, Server location, Statement, TSM (Tivoli Storage Manager) media, or Other.

Specify a list of source files, devices, vendors, pipes, or SQL statements

Type in or use the ellipsis EllipsisButton button to specify the list using the corresponding Specify a list... dialog.

CLP services - List of source files

Type in a path in the lower editable area or use the ExplorerButton button to specify the path to the file using the Open dialog.

The dialog allows you to Add, Replace and Delete paths.

You can also reorder items in the list with the help of the [image] [image] buttons.

Destination for error, warning, and informational messages returned by the utility

Type in or use the btnSaveAs button to specify the path to the file and the file name.

File type

Select the type of the data source file. Supported file types are:

Delimited ASCII (*.del)

Non-delimited ASCII (*.asc)

Integration Exchange Format (*.ixf)

Destination

This section allows you to define destination for loading data. Use the Schema and Table drop-down lists to specify the schema and table into which the data are to be loaded.

Click the Next button to proceed to the Specifying common file modifiers step of the wizard.


Specifying common file modifiers

Specify common file modifiers at this step of the wizard.

CLP Load - Specifying common file modifiers

General options

CheckBox Preservation of source data order is not required

Enabling this option you can improve efficiency of the load utility, but it might corrupt the order of presorted data.

CheckBox Skip the header verification code

Enable the option to skip the header verification code (applicable only to load operations into tables that reside in a single-partition database partition group).

CheckBox Suppress all warnings about rejected rows

Enable the option to let DB2 ignore such warnings during the load process.

Page free space

The value is interpreted as the percentage of each data page that is to be left as free space. If the specified value is invalid because of the minimum row size, the row will be placed on a new page. If a value of 100 is specified, each row will reside on a new page.

Total free space

The value is interpreted as the percentage of the total pages in the table that is to be appended to the end of the table as free space. For example, if x is 20, and the table has 100 data pages after the data has been loaded, 20 additional empty pages will be appended.

Field defaults

Identity column behavior

IDENTITY MISSING modifier makes loading a table with an identity column more convenient if the input data file does not contain any values (not even NULLS) for the identity column.

IDENTITY IGNORE modifier indicates to the load utility that even though the input data file contains data for the identity column, the data should be ignored, and an identity value should be generated for each row.

IDENTITY OVERRIDE modifier is used for loading user-supplied values into a table with a GENERATED ALWAYS identity column. This can be quite useful when migrating data from another database system, and the table must be defined as GENERATED ALWAYS.

Generated column behavior

GENERATED MISSING modifier makes loading a table with generated columns more convenient if the input data file does not contain any values (not even NULLS) for all generated columns present in the table.

GENERATED IGNORE modifier indicates to the load utility that even though the input data file contains data for all generated columns present in the target table, the data should be ignored, and the computed values should be loaded into each generated column.

GENERATED OVERRIDE modifier is used for loading user-supplied values into a table with generated columns. This can be useful when migrating data from another database system, or when loading a table from data that was recovered using the RECOVER DROPPED TABLE option of the ROLLFORWARD DATABASE command.

CheckBox Use defaults for blank

Enable this option to substitute blank values with default values.

If the Integration Exchange (IXF) format was specified at the Specifying data source and destination step, additional options are available:

CLP Load - Specifying common file modifiers - IXF

CheckBox Suppress translation between code pages

Enable this option to direct the utility to accept data despite code page mismatches, and to suppress translation between code pages.

CheckBox Load row, even if the source data size exceeds the size of the target column

If the option enabled an attempt is made to load each row, even if the source data has a column definition that exceeds the size of the target table column.

Click the Next button to proceed to the Specifying advanced file modifiers step of the wizard.


Specifying advanced file modifiers

This step allows you to define advanced file modifiers. Depending on the source file type the set of available options will be different.

If the Integration Exchange (IXF) format was specified at the Specifying data source and destination step, this step is skipped.

If the Delimited ASCII (DEL) format was specified at the Specifying data source and destination step:

CLP Load - Specifying advanced file modifiers - DEL

Source codepage

Codepage of the source file.

Exception file to which rejected rows are written

Type in or use the btnSaveAs button to specify the path to the file and the file name to which rejected rows will be written during the load process.

CheckBox Reduced syntax checking is done on user-supplied column values

Enable this option to reduce syntax checking on user-supplied column values, and enhances performance. Tables are guaranteed to be architecturally correct (the utility performs sufficient data checking to prevent a segmentation violation or trap), however, the coherence of the data is not validated. Only use this option if you are certain that your data is coherent and correct.

CheckBox Insert implied decimal point on decimal data

Enable the option to insert the implied decimal point according to the table definition.

CheckBox Suppress recognition of character x'1A' as the EOF character

If the option is enabled, character x'1A' will be recognized as the end of file character.

Date format

Use the drop-down list to specify the date format for the loaded data.

Time format

Use the drop-down list to specify the time format for the loaded data.

Timestamp format

Use the drop-down list to specify the timestamp format for the loaded data.

Character string delimiter

Defines the specified character that will be used in place of double quotation marks to enclose a character string.

Decimal point character

Specifies the character that will be used in place of a period as a decimal point character.

Column delimiter

Defines the character that will be used in place of a comma to signal the end of a column.

CheckBox Use ISO date format

Enable the option if you want the source date format data to be imported complying with ISO date format.

CheckBox Prefix positive decimal values with a blank

If the option is checked the blank space will precede the positive decimal values. Otherwise the positive decimal values will be prefixed by a plus sign (+).

CheckBox Prioritize character string delimiter over record delimiter

Use this option to change delimiters priority.

CheckBox Preserve leading and trailing blanks in each field

Enable the option to keep blanks from removing. Without this option, all leading and trailing blanks that are not inside character delimiters are removed, and a NULL is inserted into the table for all blank fields.

CheckBox Suppress recognition of double character delimiters

If the option is enabled, the double character delimiter is not interpreted as a literal instance of the character delimiter.

If the Non-delimited ASCII (ASC) format was specified at the Specifying data source and destination step:

CLP Load - Specifying advanced file modifiers - ASC

Source codepage

Codepage of the source file.

Exception file to which rejected rows are written

Type in or use the btnSaveAs button to specify the path to the file and the file name to which rejected rows will be written during the load process.

CheckBox Reduced syntax checking is done on user-supplied column values

Enable this option to reduce syntax checking on user-supplied column values, and enhances performance. Tables are guaranteed to be architecturally correct (the utility performs sufficient data checking to prevent a segmentation violation or trap), however, the coherence of the data is not validated. Only use this option if you are certain that your data is coherent and correct.

CheckBox Insert implied decimal point on decimal data

Enable the option to insert the implied decimal point according to the table definition.

CheckBox Suppress recognition of character x'1A' as the EOF character

If the option is enabled, character x'1A' will be recognized as the end of file character.

Date format

Use the drop-down list to specify the date format for the loaded data.

Time format

Use the drop-down list to specify the time format for the loaded data.

Timestamp format

Use the drop-down list to specify the timestamp format for the loaded data.

CheckBox Load row, even if the source data size exceeds the size of the target column

If the option is enabled, an attempt is made to load each row, even if the source data has a column definition that exceeds the size of the target table column.

CheckBox Truncate trailing blanc spaces when loading into variable-length field

If this option is not specified, blank spaces are kept.

CheckBox Truncate trailing nulls (0x00 characters) when loading into variable-length field

If this option is not specified, nulls are kept.

Specify the Character to denote null values in the corresponding field.

CheckBox Record length in characters

Enable this option to restrict the number of characters to read for each row without using a new-line character to indicate the end of the row. Maximum value is 32767.

Specify whether the utility should expect numeric data to be in binary, decimal and/or packed decimal format.

Click the Next button to proceed to the Specifying action step of the wizard.


Specifying action

Use this step of the wizard to specify the CLP load action.

CLP Load - Specifying action

Selected action

INSERT

Adds the loaded data to the table without changing the existing table data.

REPLACE

Deletes all existing data from the table, and inserts the loaded data. The table definition and the index definitions are not changed.

RESTART

Restarts a previously interrupted load operation. The load operation will automatically continue from the last consistency point in the load, build, or delete phase.

TERMINATE

Terminates a previously interrupted load operation, and rolls back the operation to the point in time at which it started, even if consistency points were passed.

Dictionary

RadioButton Keep dictionary

All processed rows are subject to compression using the existing dictionary

RadioButton Reset dictionary

A new row compression dictionary is built, and all processed rows are subject to compression using this new dictionary.

Exception table

CheckBox Use exception table

Specifies that an exception table will be used for the load operation. Any row that is in violation of a referential or check constraint will be deleted from your table and copied to the exception table.

Use the Schema and Table drop-down lists to specify the schema and table to be used as the exception table.

You can also choose whether to CheckBox insert rows with a range violation and CheckBox insert rows with a unique constraint violation into the exception table or not.

Click the Next button to proceed to the Specifying LOB source step of the wizard.


Specifying LOB source

Use this step of the wizard to specify source directories for LOB, XML files, Vendor Sort, and other directories.

CLP Load - Specifying LOB source

Specify paths to directories in which LOB files are to be stored | paths to directories in which XML files are to be stored | Vendor Sort work directories | Copy target paths, devices, or a shared library.

Items should be delimited with a comma. If you leave the fields empty, path for XML and LOB will be the directory specified at the Specifying data source and destination step.

You can type in the paths manually, or click the ellipsis EllipsisButton button to open the Paths to directories... dialog.

CLP services - Paths to LOB file directories

Type in a path in the lower editable area or use the ExplorerButton button to specify the path to the file using the Open dialog.

The dialog allows you to Add, Replace and Delete paths.

You can also reorder the paths in the list with the help of the [image] [image] buttons.

LOB location

Use the drop-down list to select the LOB data location: Client location, TSM (Tivoli Storage Manager) media, or Other.

Path name to be used on the server for temporary files

Specify the name of the path to be used when creating temporary files during a load operation. Note that the name should be fully qualified according to the server database partition.

Vendor location

Use the drop-down list to select the vendor library location: Client location, TSM (Tivoli Storage Manager) media, or Other.

Copy target location

Use the drop-down list to select the copy target location: Client location, TSM (Tivoli Storage Manager) media, or Other.

Click the Next button to proceed to the Specifying load parameters step of the wizard.


Specifying load parameters

This step allows you to specify a number of parameters for the load operation.

CLP Load - Specifying load parameters

Use the spinner controls to define the corresponding parameter values.

The number of physical records to be loaded

Stands for the ROWCOUNT parameter.

This parameter allows you to restrict the number of rows to be loaded into the table.

The number of records to load before establishing a consistency point

Stands for the SAVECOUNT parameter.

This value is converted to a page count, and rounded up to intervals of the extent size.

The number of 4KB pages (regardless of the degree of parallelism) to use as buffered space for transferring data within the utility

Stands for the DATA BUFFER parameter.

If the value specified is less than the algorithmic minimum, the minimum required resource is used, and no warning is returned

Specify a value that overrides the SORTHEAP database configuration parameter during a load operation

Stands for the SORT BUFFER parameter.

This parameter is useful for throttling the sort memory used by LOAD without changing the value of SORTHEAP, which would also affect general query processing.

Stop the load operation after selected number of warnings

Stands for the WARNINGCOUNT parameter.

This parameter should be defined if no warnings are expected, but verification that the correct file and table are being used is desired.

Click the Next button to proceed to the Specifying fields to load step of the wizard.


Specifying fields to load

This step allows you to specify columns to be loaded.

CLP Load - Specifying fields to load

Columns

This group contains options pertaining to selection of table columns for loading data.

Depending on the File type specified at the Specifying data source and destination step of the wizard, different sets of options are available.

RadioButton Select all columns from the external input file

This option is available for the DEL, WSF and IXF file types. If the option is selected, all the external file columns are selected for load (by default).

RadioButton Selection of columns from the external input file is by column name

This option is available for the WSF and IXF file types. If the option is selected, external file columns will be selected by their names.

RadioButton Selection of columns from the external input file is by column position

This option is available for the DEL, WSF and IXF file types. If the option is selected, you can define the order of selected columns in the list by setting the Position value.

RadioButton Selection of columns from the external input file is by column location

This option is available for the ASC file type. If the option is selected, data will be loaded from the external Non-delimited ASCII file columns according to the specified End and Start values.

Click the Next button to proceed to the Specifying additional parameters step of the wizard.


Specifying additional parameters

At this step of the wizard some additional CLP load parameters can be specified.

CLP Load - Specifying additional parameters

Use tablespace

Use the drop-down list to select the table space in which a shadow copy of the rebuilt index is placed and then copied over to the original table space at the end of the load.

Indexing mode

This setting specifies whether the load utility is to rebuild indexes or to extend them incrementally. Use the drop-down list to select the preferable value:

Automatically set

Stands for the AUTOSELECT mode. If this mode is selected, the load utility will automatically decide between the REBUILD and INCREMENTAL modes. The decision is based on the amount of data being loaded and the depth of the index tree.

Rebuild indexes

Stands for the REBUILD mode. If this mode is selected, all indexes will be rebuilt.

Extend indexes

Stands for the INCREMENTAL mode. If this mode is selected, indexes will be extended with new data.

Do not attempt index creation

Stands for the DEFERRED mode. If this mode is selected, the load utility will not attempt index creation if this mode is specified. Indexes will be marked as needing a refresh.

CheckBox Collect statistics based on the profile defined for the current table

The option instructs the load utility to collect statistics during the load operation according to the profile defined for this table. This profile must be created before load is executed.

CheckBox Non-recoverable load

Enabling this option implies that the load transaction is to be marked as non-recoverable and that it will not be possible to recover it by a subsequent rollforward utility.

CheckBox Start load immediately, forcing other applications

If this option is selected, load is started immediately, and applications are forced off the system to allow for the load operation.

CheckBox Check pending cascade immediate

This option indicates that Set Integrity Pending state is immediately extended to all descendent foreign key tables, descendent immediate materialized query tables and descendent staging tables.

CheckBox Leave the table in quiesced exclusive state after load

If the option is selected, the table specified at the Specifying data source and destination step will remain locked for exclusive access after the load operation is completed.

Access level

RadioButton Allow no access

Specifies that the CLP load utility locks the target table for exclusive access during the load.

RadioButton Allow read access

Specifies that the CLP load utility locks will lock the target table in a share mode. Data that existed before the start of the load will be accessible by readers to the table, data that is being loaded is not available until the load is complete.

CPU parallelism

The parameter specifies the number of processes or threads used by the load utility to parse, convert, and format data records.

Disk parallelism

The parameter specifies the number of processes or threads used by the load utility to write data records to disk.

Click the Next button to proceed to the Loading data step of the wizard.


Loading data

This step of the wizard is intended to inform you that all necessary options have been set, and you can start the process.

The log area allows you to view the log of operations and errors (if any).

CLP Load - Loading data

CheckBox Close the wizard after successful completion

If this option is selected, the wizard is closed automatically when the process is completed.

If necessary, you can save a template for future use.

Click the Run button to run the process.


CLP Move

CLP Move Data Wizard allows you to move data between DB2 databases with the CLP move utility used.

The CLP move utility, when used in the EXPORT/IMPORT/LOAD mode, facilitates the movement of large numbers of tables between DB2 databases located on workstations. The COPY mode (available in DB2 9.5 and higher) allows you to copy schema templates (with or without data) from a source database to a target database or move an entire schema from a source database to a target database.

To run the wizard, select the Services | iconCLPMove CLP Move main menu item, or right-click a database alias in the DB Explorer and select the Database Operations | CLP Move context menu item.

  • Specifying DB name and connection parameters
  • Specifying EXPORT destination
  • Specifying COPY destination
  • Setting IMPORT/LOAD options
  • Selecting objects to export/copy
  • Specifying COPY options
  • Moving data

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

CLP Export

CLP Import

CLP Load

CLP Console


Specifying DB name and connection parameters

This step of the wizard allows you to specify the database name, action (mode) and connection parameters for the CLP move data operation.

CLP Move - Specifying the DB name and connection parameters

Database

Use the drop-down list to select the database for moving data.

Action

Use the drop-down list to select the preferable action: EXPORT, IMPORT, LOAD, or COPY.

Note: The COPY mode is available in DB2 version 9.5 and higher.

Connection properties

In this group you should specify User name and Password for connection to the selected database. Enable the CheckBox Use same login and password option to use the ones specified during the database registration.

Click the Next button to continue. The set of further wizard steps depends on the action you specify at this step.

Proceed with the EXPORT action

Proceed with the IMPORT/LOAD action

Proceed with the COPY action


Specifying EXPORT destination

At this step you need to specify the destination of data to be exported and set filters for table selection.

Note: The step is available only if the EXPORT action was specified at the Specifying DB name and connection parameters step.

CLP Move - Specifying EXPORT destination

Extract to

Type in or use the ExplorerButton button to specify the path to the directory for exported data.

Path to LOB files

Type in or use the ExplorerButton button to specify the path to the directory for LOB files.

CheckBox Allow warnings

When disabled, tables that experience warnings during export are not included in the db2move.lst file (although the *.ixf file and *.msg files of those tables are generated anyway).

Filters

This group allows you to specify filters for selection of tables to be exported.

RadioButton Export all tables

If this option is selected, no filter will be applied, i.e. all available tables will be exported.

RadioButton Select tables manually

If this option is selected, you will be able to specify up to four additional filters (by definer, by table space, by schema, by table name), and to select tables at the next step of the wizard.

Use additional filters

This sub-group allows you to define additional filters for objects that will be available for selection at the next step. Available filters are:

CheckBox by definer

CheckBox by tablespace

CheckBox by schema

CheckBox by table name

Check/uncheck the boxes to enable/disable the filters. Use the editable area to specify filter criteria.

Note: You can use comma (,) as a delimiter for filter expressions. You can also use the asterisk (*) sign as a wildcard character that can be placed anywhere in the string when defining filters.

You can click the ellipsis EllipsisButton button to open the Additional filters dialog allowing you to manage the list of filters:

CLP Move - Additional filters

Type in a filter expression in the lower editable area.

The dialog allows you to Add, Replace and Delete filter conditions.

You can also reorder the filters in the list with the help of the [image] [image] buttons.

RadioButton Export tables listed in file

If this option is selected, the utility will export the tables that are listed in the specified file. Type in or use the ExplorerButton button to specify the path to the file using the Open dialog.

Click Next to proceed to the Selecting objects step of the wizard.


Specifying COPY destination

Use this step of the wizard to define the destination of data to be copied and set filters for table selection.

Note: The step is available only if the COPY action was specified at the Specifying DB name and connection parameters step.

CLP Move - Specifying COPY destination

Copy mode

Select the copy mode from the drop-down list:

LOAD_ONLY

Creates all supported objects from the source schema, and populates the tables with the source table data.

DDL_AND_LOAD

Creates all supported objects from the source schema, but does not repopulate the tables.

DDL_ONLY

Loads all specified tables from the source database to the target database. The tables must already exist on the target.

Target database

Select the target database from the drop-down list and then define the User name and Password required to connect to the database.

Filters

This group allows you to specify filters for selection of tables to be copied.

RadioButton Select tables manually

If this option is selected, you will be able to specify up to two additional filters (by schema, by table name), and to select tables at the next step of the wizard.

Use additional filters

This sub-group allows you to define additional filters for objects that will be available for selection at the next step. Available filters are:

CheckBox by schema

CheckBox by table name

Check/uncheck the boxes to enable/disable the filters. Use the editable area to specify filter criteria.

Note: You can use comma (,) as a delimiter for filter expressions. You can also use the asterisk (*) sign as a wildcard character that can be placed anywhere in the string when defining filters.

You can click the ellipsis EllipsisButton button to open the Additional filters dialog allowing you to manage the list of filters:

CLP Move - Additional filters

Type in a filter expression in the lower editable area.

The dialog allows you to Add, Replace and Delete filter conditions.

You can also reorder the filters in the list with the help of the [image] [image] buttons.

RadioButton Copy tables listed in file

If this option is selected, the utility will copy the tables that are listed in the specified file. Type in or use the ExplorerButton button to specify the path to the file using the Open dialog.

Click Next to proceed to the Selecting objects step of the wizard.


Setting IMPORT/LOAD options

Use this step of the wizard to define options for the IMPORT/LOAD operation.

Note: The step is available only if the IMPORT or LOAD action was specified at the Specifying DB name and connection parameters step.

CLP Move - Setting IMPORT_LOAD options

Action mode

Use the drop-down list to select one of available import/load modes which determine the method in which the data is imported/loaded:

INSERT (for IMPORT and LOAD)

INSERT_UPDATE (for IMPORT only)

REPLACE (for IMPORT and LOAD)

CREATE (for IMPORT only)

REPLACE_CREATE (for IMPORT only)

The first three, INSERT, INSERT_UPDATE, and REPLACE are used when the target tables already exist. All three support IXF, WSF, ASC, and DEL data formats. However, only INSERT and INSERT_UPDATE can be used with nicknames. The other two modes, REPLACE_CREATE and CREATE, are used when the target tables do not exist. Load has only two modes: REPLACE and INSERT.

Working directory

Type in or use the ExplorerButton button to specify the path to the working directory for importing/loading data.

Path to LOB files

Type in or use the ExplorerButton button to specify the path to the directory for LOB files.

Click Next to proceed to the Moving data step of the wizard.


Selecting objects to export/copy

Use this step of the wizard to select objects to be exported/copied.

Note: The step is available only if the EXPORT or COPY action was specified at the first step, and the RadioButton Select tables manually option was selected at the Specifying EXPORT destination/Specifying COPY destination step.

CLP Move - Selecting objects

The Available tables list displays the tables with names satisfying filter criteria set at the previous step (Specifying EXPORT destination / Specifying COPY destination) as a grid with the following columns: Table name, Definer, Tablespace, Schema. If more convenient, you can change the order of the columns by dragging their headers horizontally.

Click a column caption to sort items by values of this column in the ascending or the descending mode.

If necessary, you can group the data in grid by any of the columns. This operation is performed by dragging the column header to the gray "Group by" box area at the top. When grouping by a column is applied to the grid, all the rows are displayed as subnodes to the grouping row value. To reverse grouping, just drag the column header back.

To select an object, you need to move it from the Available tables list to the Selected tables list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the objects from one list to another.

Click Next to proceed to the Specifying COPY options step of the wizard (for the COPY action), or directly to the Moving data step (for the EXPORT action).


Specifying COPY options

Use this step of the wizard to define options for the COPY operation.

Note: The step is available only if the COPY action was specified at the first step.

CLP Move - Specifying COPY options

Working directory

Type in or use the ExplorerButton button to specify the path to the working directory for copying data.

Schema map

Allows you to rename schema when copying to target. Provides a list of the source-target schema mapping, separated by commas, surrounded by brackets, e.g.

((s1, t1), (s2, t2))

This would mean objects from schema s1 will be copied to schema t1 on the target; objects from schema s2 will be copied to schema t2 on the target.

Tablespace map

You can specify table space name mappings to be used instead of the table spaces from the source system. This will be an array of table space mappings surrounded by brackets, e.g.

((TS1, TS2),(TS3, TS4))

This would mean that all objects from table space TS1 will be copied into table space TS2 on the target database and objects from table space TS3 will be copied into table space TS4 on the target.

Owner name

“OWNER” allows you to change the owner of each new object created in the target schema after a successful COPY. The default owner of the target objects will be the connected user; if this option is specified, ownership will be transferred to the new owner.

CheckBox Non recoverable

Enable this option if you do not want to make backup of the table spaces immediately.

Click Next to proceed to the Moving data step of the wizard.


Moving data

This step of the wizard is intended to inform you that all necessary options have been set, and you can start the process.

The log area allows you to view the log of operations and errors (if any).

CLP Move - Moving data

CheckBox Close the wizard after successful completion

If this option is selected, the wizard is closed automatically when the process is completed.

If necessary, you can save a template for future use.

Click the Finish button to run the process.


Reorganize Tables

Reorganize Wizard allows you to perform the REORG operation over your DB2 tables.

This operation is used to reorganize a table by reconstructing the rows to eliminate fragmented data, and by compacting information.

To run the wizard, select the Services | iconReorganizeTables Reorganize Tables main menu item, or right-click a table in the DB Explorer tree and select the Table Services | Reorganize Tables context menu item.

  • Setting database name and backup option
  • Selecting tables
  • Setting reorganize options
  • Setting runstats options
  • Reorganizing tables

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Tables

Reorganize Indices

Using templates


Specifying the source database name

This step of the wizard allows you to specify the database name for the reorganize tables operation.

Reorganize Tables - Setting DB name and backup option

Database

Use the drop-down list to select the database containing tables for reorganizing.

CheckBox Backup tablespace before reorganization

Select this option to perform the backup operation for table space before reorganization.

Click the Next button to proceed to the Selecting tables step of the wizard.


Selecting tables

This step of the wizard allows you to select the table(s) to be included into the reorganize operation.

To select a table, you need to move it from the Available tables list to the Selected tables list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the tables from one list to another.

Reorganize Tables - Selecting tables

Note: You can use the Select tables from schema... drop-down list to filter objects in the Available tables list by schema.

Click the Next button to proceed to the Setting reorganize options step of the wizard.


Setting reorganize options

This step of the wizard allows you to set the reorganize options.

Reorganize Tables - Setting reorganize options

Reorganize by index

Use this drop-down list to select an index to reorganize the selected table by.

Temporary tablespace

Specifies the name of a system temporary table space in which a temporary copy of the table being reorganized is stored.

Options

RadioButton Execute online

Select this option to reorganize the table while permitting user access (INPLACE).

CheckBox Truncate table

This option determines whether the table is to be truncated or not.

Action

Specify the preferable action: Start, Stop, Pause, Resume.

RadioButton Execute offline

Select this option to reorganize the table while not permitting user access (INPLACE).

CheckBox Reorganize Long/LOB data

If this option is selected, Long fields and LOB data will be reorganized.

CheckBox Access table through index

Check this option to specify that table rows are to be reorganized by accessing the table through an index.

Table access

RadioButton Read-only

This option specifies that other users can have read-only access to the table while the indexes are being reorganized.

RadioButton Read/write

This option specifies that other users can read from and write to the table while the indexes are being reorganized.

RadioButton Do not allow access

This option specifies that no other users can access the table while the indexes are being reorganized.

Select tables one by one in the Table name list and set options for each of them separately, or check the CheckBox Use equal options for all tables option to apply the current options for all the tables.

Click the Next button to proceed to the Setting runstats options step of the wizard.


Setting runstats options

This step of the wizard allows you to set the runstats options.

Set the corresponding options in case you need to CheckBox Perform runstats before reorganization FOR ALL TABLES and/or CheckBox Perform runstats after reorganization FOR REORGANIZED TABLES ONLY.

Reorganize Tables - Setting runstats options

For details see the Setting runstats options page of the Run Statistics chapter.

Click the Next button to proceed to reorganizing tables.


Reorganizing tables

This step of the wizard is intended to inform you that all necessary options have been set, and you can start the process.

The log area allows you to view the log of operations and errors (if any).

Reorganize Tables - Reorganizing tables

CheckBox Close the wizard after successful completion

If this option is selected, the wizard is closed automatically when the reorganizing tables process is completed.

If necessary, you can save a template for future use.

Click the Run button to run the process.


Reorganize Indices

Reorganize Wizard allows you to perform the RUNSTATS operation over your DB2 table indexes.

This operation is used to reorganize all indexes defined on a table by rebuilding the index data into unfragmented, physically contiguous pages.

To run the wizard, select the Services | iconReorganiseIndices Reorganize indexes main menu item, or right-click a table in the DB Explorer tree and select the Table Services | Reorganize indexes context menu item.

  • Setting database name
  • Selecting tables
  • Setting reorganize options
  • Setting runstats options
  • Reorganizing indexes

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Tables

Reorganize Indices

Using templates


Setting DB name

This step of the wizard allows you to specify the database name for the reorganize indexes operation.

Reorganize Indices - Setting DB name

Database

Use the drop-down list to select the database containing indexes for reorganizing.

Click the Next button to proceed to the Selecting tables step of the wizard.


Selecting tables

This step of the wizard allows you to select the table(s) to be included into the reorganize operation.

To select a table, you need to move it from the Available tables list to the Selected tables list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the tables from one list to another.

Reorganize Indices - Selecting tables

Note: You can use the Select tables from schema... drop-down list to filter objects in the Available tables list by schema.

Click the Next button to proceed to the Setting reorganize options step of the wizard.


Setting reorganize options

This step of the wizard allows you to set the reorganize options.

Reorganize Indices - Setting reorganize options

Options

RadioButton Cleanup only

If this option is selected, cleanup is performed without rebuilding the indexes.

RadioButton Convert type 1 indexes to type 2

If this option is selected, type 1 indexes will be converted to type 2.

RadioButton Cleanup pages only

If this option is selected, only committed pseudo empty pages will be removed from the index tree.

RadioButton Cleanup all

If this option is selected, indexes will be cleaned up by removing both committed pseudo deleted keys and committed pseudo empty pages.

Table access

RadioButton Read-only

This option specifies that other users can have read-only access to the table while the indexes are being reorganized.

RadioButton Read-write

This option specifies that other users can read from and write to the table while the indexes are being reorganized.

RadioButton Do not allow access

This option specifies that no other users can access the table while the indexes are being reorganized.

Click the Next button to proceed to the Setting runstats options step of the wizard.


Setting runstats options

This step of the wizard allows you to set the runstats options.

Set the corresponding options in case you need to CheckBox perform runstats before reorganization FOR ALL TABLES and/or CheckBox perform runstats after reorganization FOR REORGANIZED TABLES ONLY.

Reorganize Indices - Setting runstats options

For details see the Setting runstats options page of the Run Statistics chapter.

Click the Next button to proceed to reorganizing indexes.


Reorganizing indices

SQL Manager for DB2
  • Index
  • « Prev
  • Next »

Reorganizing indexes

This step of the wizard is intended to inform you that all necessary options have been set, and you can start the process.

The log area allows you to view the log of operations and errors (if any).

Reorganize Indices - Reorganizing indices

CheckBox Close the wizard after successful completion

If this option is selected, the wizard is closed automatically when the reorganizing indexes process is completed.

If necessary, you can save a template for future use.

Click the Run button to run the process.


Run Statistics

Runstats Wizard allows you to perform the RUNSTATS operation over your DB2 tables.

This operation is used to update statistics about the physical characteristics of a table and the associated indexes. These characteristics include the number of records, number of pages and the average record length. It is recommended to run the operation when a table has had many updates, or after reorganizing a table.

To run the wizard, select the Services | iconRunStatistics Run Statistics main menu item, or right-click a table in the DB Explorer tree and select the Table Services | Run Statistics context menu item.

  • Setting database name
  • Selecting tables
  • Setting runstats options
  • Running statistics

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Backup Database

Restore Database

Rollforward Database

Restart Database Wizard

Quiesce Database Wizard

Unquiesce Database Wizard

Ping Database

CLP Tools

Reorganize Tables

Reorganize indexes

Stop Database Manager Wizard

Start Database Manager Wizard


Setting DB name

This step of the wizard allows you to specify the database name for the runstats operation.

Run Statistics - Setting DB name

Database

Use the drop-down list to select the database containing tables for updating statistics.

Click the Next button to proceed to the Selecting tables step of the wizard.


Selecting tables

This step of the wizard allows you to select the table(s) to be included into the run statistics operation.

To select a table, you need to move it from the Available tables list to the Selected tables list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the tables from one list to another.

Run Statistics - Selecting tables

Note: You can use the Select tables from schema... drop-down list to filter objects in the Available tables list by schema.

Click the Next button to proceed to the Setting runstats options step of the wizard.


Setting runstats options

This step of the wizard allows you to set the runstats options.

Run Statistics - Setting runstats options

Table options

CheckBox Collect table statistics

When this option is selected, table statistics are collected.

CheckBox Collect column statistics

When this option is selected, column statistics are collected.

Specify whether basic column statistics are to be collected RadioButton on all columns or RadioButton on key columns only.

CheckBox Collect distribution statistics

If this option is enabled, both basic statistics and distribution statistics are collected on the columns.

Specify whether distribution statistics are to be collected RadioButton on all columns or RadioButton on key columns only.

If necessary, specify the Frequency and the Quantile values that will be used to determine the maximum number of frequency and quantile statistics to be collected for the columns.

Index options

CheckBox Collect index statistics

When this option is selected, index statistics are collected.

CheckBox Collect detailed statistics

Use this option to calculate extended index statistics.

CheckBox Collect sampled statistics

Use this option to employ a CPU sampling technique when compiling the extended index statistics.

Access mode

RadioButton Read-only

This option specifies that other users can have read/write access to the table while statistics are calculated.

RadioButton Read/Write

This option specifies that other users can have read-only access to the table while statistics are calculated.

Sampling options (available for server version 9.7)

RadioButton System

This option allows RUNSTATS to collect statistics on a sample of the data pages from the table(s).

RadioButton Bernoulli

This option allows RUNSTATS to collect statistics on a sample of the rows from the table or statistical view.

Click the Next button to proceed to running statistics.


Running statistics

This step of the wizard is intended to inform you that all necessary options have been set, and you can start the process.

The log area allows you to view the log of operations and errors (if any).

Run Statistics - Running statistics

CheckBox Close the wizard after successful completion

If this option is selected, the wizard is closed automatically when the running statistics process is completed.

If necessary, you can save a template for future use.

Click the Run button to run the process.


Stop Database Manager Wizard

Stop Database Manager Wizard allows you to perform the Stop Database Manager operation on your DB2 system.

This operation is used to stop the current database manager instance. The database manager is active unless it is explicitly stopped. If an application is connected to the database, the database manager instance cannot be stopped. This operation also deactivates any outstanding database activations before stopping the database manager.

To run the wizard, select the Services | iconStopDatabaseManager Stop Database Manager main menu item, or right-click the database alias in the DB Explorer tree and select the Database Operations | Stop Database Manager context menu item.

  • Setting node name and connection info
  • Stopping Database Manager

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Start Database Manager Wizard

Using templates


Setting node name and connection info

Use this step of the wizard to specify the Node where the database resides.

Stop DB Manager - Setting node name and connection info

CheckBox Force application to disconnect

Select this option to enforce disconnect from the database.

Connection information

Set authorization parameters that will be used to access the node: User name and Password.

Click the Next button to proceed to stopping Database Manager.


Stopping Database Manager

This step of the wizard is intended to inform you that all necessary options have been set, and you can start the process.

The log area allows you to view the log of operations and errors (if any).

Stop DB Manager - Stopping Database Manager

CheckBox Close the wizard after successful completion

If this option is selected, the wizard is closed automatically when the stopping Database Manager process is completed.

If necessary, you can save a template for future use.

Click the Finish button to run the process.


Start Database Manager Wizard

Start Database Manager Wizard allows you to perform the Start Database Manager operation on your DB2 system.

This operation is used to start the current database manager instance background processes on a single database partition or on all the database partitions defined in a multi-partitioned database environment.

To run the wizard, select the Services | iconStartDatabaseManager Start Database Manager main menu item, or right-click the database alias in the DB Explorer tree and select the Database Operations | Start Database Manager context menu item.

  • Setting node name and connection info
  • Starting Database Manager

Availability:
Full version (for Windows) | Yes
Lite version (for Windows) | No
Note: To compare all features of the Full and the Lite versions of SQL Manager, refer to the Feature Matrix page.

See also:

Stop Database Manager Wizard

Using templates


Setting node name and connection info

Use this step of the wizard to enter the remote instance name and specify the node where the database resides.

Start DB Manager - Setting node name and connection info

Click the Next button to proceed to starting Database Manager.


Starting Database Manager

This step of the wizard is intended to inform you that all necessary options have been set, and you can start the process.

The log area allows you to view the log of operations and errors (if any).

Start DB Manager - Starting Database Manager

CheckBox Close the wizard after successful completion

If this option is selected, the wizard is closed automatically when the starting Database Manager process is completed.

If necessary, you can save a template for future use.

Click the Finish button to run the process.


Options

SQL Manager for DB2 provides you with capabilities for flexible personalization of the application.

Please see the chapters below to learn how to use personalization tools effectively.

  • Environment Options
  • Editor Options
  • Visual Options
  • Save Settings
  • Localization
  • Keyboard Templates
  • Object Templates
  • Find Option dialog

The Options menu allows you to export all program settings to a *.reg file for future use, e.g. when you need to move the settings to another machine (see Save Settings for details).

Hint: Each of the SQL Manager Options dialogs is provided with the Reset to defaults button. You can use it either to Reset current category or to Reset all categories.

See also:

Getting Started

Database Explorer

Database Management

Database Objects Management

Query Management Tools

Data Management

Import/Export Tools

Change management

Database Tools

Instance Services

How To...


Environment Options

Environment Options allow you to customize general options of the SQL Manager application.

To open the Environment Options window, select the Options | Environment Options... main menu item, or use the Environment Options btnEnvironmentOptions button on the main toolbar.

Preferences

Full mode activation

Confirmations

Windows

Tools

DB Explorer

Table Editor

SQL Editor

SQL Monitor

Activity Monitor

CLP Console

SQL Script

Query Builder

Style & Color Palette

Visual Database Designer

Print Metadata

Projects

Dependencies

Data Export

Fonts

Grid

Data Options

Print Data

Color & Formats

Advanced

Column Options

Localization

Global Shortcuts

Find Option

See also:

Editor Options

Visual Options


Preferences

CheckBox Show splash screen at startup

Displays the splash screen of SQL Manager for DB2 at the application startup. This option is available in the Full version of SQL Manager.

CheckBox Restore desktop on connect

This option determines whether the previously opened windows and their positions should be restored upon connection to the database.

CheckBox Disable multiple instances

Checking this option prevents one from running multiple instances of SQL Manager for DB2.

CheckBox Show desktop panel (for MDI Environment style only)

Displays Desktop Panel when no child windows are open.

CheckBox Show Full Version features

This option is available in the Lite version of SQL Manager. When selected, a 30-day period of fully-functional usage is activated.

Environment Options - Preferences

If necessary, you can reset all toolbars and menus of the application using the corresponding button.

Hint: The Reset to Defaults button which is common for all sections of the Environment Options dialog opens a menu with items allowing you to discard all changes and reset options of the current category or of all categories to their defaults.

See also:

Full mode activation

Confirmations

Windows

Tools

Fonts

Grid

Localization

Global Shortcuts

Find Option


Full mode activation

Note that when using the FREE Lite version of SQL Manager for DB2 (which contains functional limitations) you can activate a 30-day period of fully-functional usage. During this period you will get the splash screen displaying the number of days left every time you start the application. After the period expires, you will be able to continue using the Lite version.

Environment Options - Full mode activation

To activate the 30-day Full version mode, please enable the CheckBox Show Full Version features option available on the Preferences page of the Environment Options dialog (note that this option is only available in the Lite version of SQL Manager).


Confirmations

CheckBox Confirm saving the object (or document) upon closing the editor

If this option is selected, the program requires confirmation each time you want to save changes in a database object or document.

CheckBox Confirm dropping of object

If this option is selected, the program requires confirmation of dropping a database object.

CheckBox Confirm exit from SQL Manager

If this option is selected, you are prompted for confirmation each time when you exit the application.

Environment Options - Confirmations

CheckBox Confirm transaction commit

If this option is selected, the program requires confirmation on attempt to commit a transaction.

CheckBox Confirm transaction rollback

If this option is selected, the program requires confirmation on attempt to rollback a transaction.

CheckBox Confirm deleting records

This option enables/disables a confirmation dialog for deleting records.

CheckBox Confirm addition into spell checking dictionary

Enable this option if you wish to be prompted for adding a word to the dictionary which is used for checking words spelling (see Spell Checking).

CheckBox Confirm transformation of misprint into substitution

If this option is selected, you need to confirm replacing a misprinted word with a corresponding substitution word (see Spell Checking).


Windows

Environment style

This group allows you to define the basic window environment - RadioButton MDI (like Microsoft® Office) or RadioButton Floating Windows (like Borland® Delphi IDE).

Windows restrictions

This option allows you to set the number of editors (Table Editor, SQL Editor, etc.) that can be opened simultaneously.

Zoom options

This group of options is only available if Environment Style is set to Floating-windows environment. It allows you to set maximization size for child windows:

RadioButton Full screen

RadioButton Restricted by Main Form

RadioButton Restricted by Main Form and DB Explorer

RadioButton Justified my Main Form and DB Explorer

Bar style for child forms

Here you can define the location of action buttons: RadioButton within the Navigation bar (on the left) and/or RadioButton on the Toolbar.

If necessary, you can also CheckBox Enable floating toolbars for your application.

Environment Options - Windows


Tools

CheckBox Show only connected databases in drop-down menu

If this option is checked, only connected databases are displayed in drop-down menus of such tools as Query Builder, SQL Script, etc.

CheckBox Allow using parameters in query text

This feature allows you to specify different values within a query in a popup dialog just before the query execution. Use the colon (':') character before an identifier (e.g. :P1) to specify a parameter within the query.

CheckBox Asynchronous data opening

Check this option to allow getting object data in background mode (asynchronously).

CheckBox Asynchronous query execution

Check this option to allow executing queries in background mode (asynchronously).

Environment Options - Tools

New object editor should be opened for

Use this group to specify the database to open new editors for:

RadioButton Database currently selected in DB Explorer;

RadioButton Database selected in currently focused editor.


DB Explorer

General options

CheckBox Show hosts in DB Explorer

Shows/hides hosts in the DB Explorer tree.

CheckBox Show table subobjects

Shows/hides table subobjects (fields, indexes, etc.) in the DB Explorer tree.

CheckBox Show view subobjects

Shows/hides view subobjects in the DB Explorer tree.

CheckBox Sort by aliases

Use this option to apply sorting registered nodes and databases by their aliases in the DB Explorer tree.

CheckBox Rename objects by editing in place

Allows you to edit object names in DB Explorer by selecting any object and clicking its alias one more time.

CheckBox Search by categories

This option determines the search scope when the Find Item feature is used: if this option is selected, the search is performed within the currently selected category (node in the tree) only.

CheckBox Use case sensitive search

If this option is selected, the search string case is considered when using the Search Panel.

CheckBox Refresh objects on showing in SQL Assistant

This option enables/disables refreshing objects each time they are displayed in SQL Assistant.

CheckBox Auto expand navigation panel

If this option is selected, the navigation panel will be expanded every time you start SQL Manager for DB2

CheckBox Show hint

The option enables/disables hints for objects in the DB Explorer tree.

Environment Options - Tools - DB Explorer

Recent objects count

Defines the number of objects displayed within the Recent menu of the DB Explorer.

Table / View / Procedure / Function / Other objects' details in SQL Assistant

These options switch the SQL Assistant mode for displaying details for DB2 objects selected in the DB Explorer tree:

for tables: fields, primary/unique keys, Foreign keys, checks, indexes, triggers, table status, definition or description;

for views: fields, triggers, definition or description;

for procedures/functions: parameters, definition or description;

for other objects: definition or description.

See also:

Database Explorer


Table Editor

CheckBox Always open the Fields tab

If this option is checked, the Fields tab is activated by default upon opening a table in Table Editor.

CheckBox Show Object Explorer

Enables/disables the Object Explorer panel within the Navigation bar of Table Editor.

CheckBox Do not retrieve record count for a table

Check this option to disable retrieving record count for tables (with this feature enabled, opening large tables may take much time).

CheckBox Allow editing tables with no keys

Enables/disables editing tables that have no key fields (note that editing tables without unique or primary keys might lead to data integrity issues).

Environment Options - Tools - Table Editor

See also:

Table Editor


SQL Editor

CheckBox Explain query on execution

If this option is checked, the query plan is displayed automatically upon query execution in SQL Editor.

CheckBox Show result for each query

With this option checked, when you execute two or more queries, the result of each query will be displayed one by one. Otherwise, only the result of the last query will be displayed.

CheckBox Execute selected text separately

Check this option to allow execution of the selected statement separately.

CheckBox Write only successfully executed queries to database SQL log file

If this option is checked, unsuccessful queries will not be saved to the SQL Editor log file (see Setting log options in the Database Registration Info dialog).

Environment Options - Tools - SQL Editor

CheckBox Show results on Edit tab

If this option is checked, the Results tab is displayed as a separate tab.

CheckBox Don't save queries automatically for the next session

If this option is checked, the SQL query text will not be saved. Otherwise, it will be saved in Windows registry and will be therefore available in the next sessions of application.

CheckBox Same queries for all databases

With this option enabled, SQL Editor stores all queries in a shared repository, so that switching to another database does not cause loading queries of that database (applying this option does not affect currently opened copies of SQL Editor). The value of the option can be changed freely without any risk to lose the query repository content.

CheckBox Refresh DB Explorer upon successful DDL statement execution

If this option is selected, the content of DB Explorer is refreshed each time a DDL statement is executed successfully in SQL Editor.

Transaction confirmation

CheckBox Disable transaction confirmation

If this option is checked, no transaction confirmation will be required on closing Visual Query Builder and SQL Editor. Specify the default action (Commit or Rollback) and this action will be performed automatically each time when you close the editor.

See also:

SQL Editor


SQL Monitor

SQL log

This group of options allows you to enable logging of all SQL Monitor events to a file. Check the Log SQL Monitor events to file option, specify the path to the log file using the btnSaveAs button, and enter a name for the *.sql file. To clear the log file after it reaches some definite size, check the CheckBox Clear log file when it is greater than... option and set the maximum file size (in Kilobytes).

Environment Options - Tools - SQL Monitor

CheckBox Show time of operation

If this option is checked, the execution time of logged operations is added to the log.

CheckBox Always show on top

Select this option if you want to display the SQL Monitor window in the foreground permanently.

See also:

SQL Monitor


Activity Monitor

CheckBox Allow user to disconnect applications

This option determines the availability of the Force application to disconnect feature of Activity Monitor. If the option is enabled, you can select a connection in the list and click the corresponding item on the Navigation bar.

CheckBox Refresh automatically

If this option is selected, the activity status is refreshed automatically after the specified time interval. Use the spinner control to set the refresh time (in seconds).

Environment Options - Tools - Activity Monitor

See also:

Activity Monitor


CLP Console

CheckBox Clear results on execution

If this option is selected, previous results are cleared upon each command execution.

CheckBox Collapse previous results

If this option is selected, previous results are collapsed in the code folding manner.

Command log

This group of options allows you to enable logging of all CLP Console results to a file. Check the Log Command Console output to file option, specify the path to the log file using the btnSaveAs button, and enter a name for the *.sql file. To clear the log file after it reaches some definite size, check the Clear log file when it is greater than... option and set the maximum file size (in Kilobytes).

Environment Options - Tools - CLP Console

See also:

CLP Console


SQL Script

CheckBox Enable parsing

With this option checked, SQL Script Editor parses the loaded script to enable fast navigation in the Script Explorer tool.

CheckBox Show message when done

Displays a message box on finishing script execution.

CheckBox Execute selected text separately

Check this option to allow execution of the selected statement separately.

CheckBox Don't clear error list on selected text execution

If this option is checked, the error list is not cleared upon execution of the selected statement.

CheckBox Skip unknown statements

If this option is selected, statements classified as 'unknown' are skipped by the tool during script execution.

Environment Options - Tools - SQL Script

Database options

CheckBox Register newly created databases

If this option is selected, newly created databases will be registered automatically.

CheckBox Connect automatically to just created database

If this option is selected, SQL Manager immediately attempts to connect to a newly created database.

Transaction options

CheckBox Rollback on abort

This option evokes automatic rollback when script execution is aborted (due to an error or if interrupted by user).

See also:

SQL Script Editor


Query Builder

General options

CheckBox Allow SELECT queries only

When this option is checked, the INSERT, UPDATE and DELETE statements are not allowed in Query Builder.

CheckBox Select condition row

Displays the selected condition in different rows on the Criteria and Grouping Criteria tabs of Query Builder.

CheckBox Drag field name

Displays the dragged field name in the Builder area.

CheckBox Hide selection when inactive

Hides the selection when the Query Builder window is inactive.

CheckBox Show field types

Displays the field data type next to the field name in the table box.

CheckBox Union all by default

Check this option to use the UNION ALL expression in Query Builder by default.

The UNION keyword allows you to include the results of two SELECT statements in one resulting table.

The ALL parameter incorporates all rows into the results, including duplicates. If not specified, duplicate rows are removed.

Environment Options - Tools - Query Builder

Visible tabs

These options specify which Query Builder tabs are available and which are not. Use the check boxes to make the corresponding tabs visible/invisible.

Script format

These options specify case formatting of keywords and functions in query text within the Edit tab: As is keeps the original case, Uppercase sets all the keywords/functions to the upper case, Lowercase sets all the keywords/functions to the lower case, and First upper sets the first letters of all keywords/functions to the upper case.

Additionally, you can set styles and color for all Query Builder objects by using Style & Color Palette.

See also:

Visual Query Builder


Style & Color Palette

Style

These options specify the way various Query Builder elements look: the Condition button: Flat, 3DLook, Raised; object borders: Bump, Etched, Raised, Sunken. If necessary, you can also specify flatness for objects and buttons using the corresponding options.

CheckBox XP tables style
This option determines the appearance of non-client areas of tables in Query Builder.

CheckBox Show icons on tabs
With this option selected, you can see icons next to the tab names in Query Builder.

Environment Options - Tools - Query Builder - Style & Color

Color palette

These options define the colors of various Query Builder elements.

Active condition row (at the Criteria and Grouping criteria tabs):

Environment Options - Tools - QB - Style & Color - Active condition row

Condition text (at the Criteria and Grouping criteria tabs):

Environment Options - Tools - QB - Style & Color - Condition text

Condition item text (at the Criteria and Grouping criteria tabs):

Environment Options - Tools - QB - Style & Color - Condition item text

Table client area (in the diagram area):

Environment Options - Tools - QB - Style & Color - Table client area

Active table caption (in the diagram area):

Environment Options - Tools - QB - Style & Color - Active table caption

Inactive table caption (in the diagram area):

Environment Options - Tools - QB - Style & Color - Inactive table caption

Field text (in the diagram area):

Environment Options - Tools - QB - Style & Color - Field text

Selected field text (in the diagram area):

Environment Options - Tools - QB - Style & Color - Selected field text

Work space (in the diagram area):

Environment Options - Tools - QB - Style & Color - Work space

Field (at the Criteria and Grouping criteria tabs):

Environment Options - Tools - QB - Style & Color - Field

Operation (at the Criteria and Grouping criteria tabs):

Environment Options - Tools - QB - Style & Color - Operation

Group (at the Grouping criteria tab):

Environment Options - Tools - QB - Style & Color - Group

Predicate (at the Criteria and Grouping criteria tabs when a subquery is used):

Environment Options - Tools - QB - Style & Color - Predicate

Subquery (at the Criteria and Grouping criteria tabs when a subquery is used):

Environment Options - Tools - QB - Style & Color - Subquery

Click an item to select a color for the corresponding element using the Color dialog where you can specify the required color from the palette.


Visual Database Designer

Visual settings

Model notation

When you work in Visual Database Designer, you can choose one of the following modeling notations:

  • Integration DEFinition for Information Modeling (IDEF1X);
  • Information Engineering (IE).

The IDEF1X and IE notations use different symbols to represent relationships between entities (and tables).

Environment Options - Tools - VDBD

CheckBox Draw PRIMARY KEY fields separately

Separates Primary key fields from other fields with a horizontal line.

Environment Options - Tools - VDBD - Draw PRIMARY KEY fields separately

CheckBox Draw entities icons

Displays icons at the left of each entity header according to its type.

Environment Options - Tools - VDBD - Draw entities icons

CheckBox Draw attributes icons

Displays icons at the left of each attribute according to its type (Primary key, Foreign key, ordinary field).

Environment Options - Tools - VDBD - Draw attributes icons

CheckBox Draw only names of entities

Displays only entity headers, fields are hidden.

Environment Options - Tools - VDBD - Draw only names of entities

CheckBox Draw FOREIGN KEY name

Displays foreign key names for the corresponding relations.

Environment Options - Tools - VDBD - Draw FOREIGN KEY name

Grid options

CheckBox Show grid

Displays dots in the diagram area to make the grid visible.

CheckBox Snap to grid

Automatically aligns entities on the form with the nearest grid line. You cannot place an entity in between grid lines.

Grid size

Sets grid spacing in pixels along the x- and y-axes. Specify a higher number to increase grid spacing.

Style & Color

This group allows you to set style and color for various Visual Database Designer diagram elements: workspace, relation, table, view, function, procedure, selected item, field, primary key, foreign key, etc.

Select an item in the list and set its properties:

Font name | Font size

Use the drop-down lists to select the font and size of the element (if applied).

Font color | Brush color | Pen color

Set fill colors by clicking an item to call the Color dialog where you can specify the required color from the palette.

Font style

Set font attributes (bold, italic, underlined) using the corresponding check-boxes.

If necessary, you can apply the properties to all elements using the corresponding button.

See also:

Visual Database Designer


Print Metadata

Default paper size

Define the default paper size for reports created with the Print Metadata tool used:

RadioButton A4 (210 x 297 mm)

RadioButton Letter (8 1/2 x 11 ")

Environment Options - Tools - Print Metadata

See also:

Print Metadata


Projects

Default directory for Projects

Use the Explorer ExplorerButton button to specify the path to the directory where your projects will be saved.

Environment Options - Tools - Projects

See also:

Project Interaction

Projects


Dependencies

This section allows you to set preferences pertaining to the Dependencies tab of object editors and the Dependency Tree tool.

Environment Options - Tools - Dependencies

CheckBox Use simplified resolving of object dependencies

Set this option to disable parsing while fetching object dependencies.

CheckBox Show subobjects in dependencies

With this option checked all subobjects e.g. indices, foreign keys etc. will be displayed in the dependency tree.

CheckBox Scroll current object into visible area of Dependency Tree

Checking this option enables to displace a big dependency diagram so as to display an object for which it was built.

Max number of history items in Dependency Tree

Set the maximum number of history items to be saved in Dependency Tree tool.

Dependency Tree diagram layout

RadioButton Show all objects

Check this option to view all objects of the dependency tree.

RadioButton Show only objects that depend on Root object

Set this option to view only objects that depend on Root object.

RadioButton Show only objects that Root object depends on

This option allows to display only those objects that the Root object depends on.

Note: Navigation through history items is performed by using the Previous object / Next object items of the Navigation bar.

See also:

Dependency Tree


Data Export

This page allows you to customize formats applied to exported data.

Environment Options - Tools - Data Export

Data formats

Edit the format masks to adjust the result format in the way you need: Integer format, Float format, Date format, Time format, DateTime format, Currency format, Boolean True, Boolean False, Null string.

CheckBox Auto save format strings

Select this option to save specified format strings automatically.

These settings can also be specified at the Adjusting data formats step of Export Data Wizard.

Fore more details see Format specifiers.

See also:

Export Data Wizard


Fonts

This section of the Environment Options dialog allows you to specify fonts used in the application.

The box below displays the sample text with the selected font applied.

Environment Options - Fonts

System font name

Defines the font used by SQL Manager for DB2. Select the font name from the drop-down list of available system fonts.

Environment Options - Fonts - System font name

System font size

Defines the font size used by SQL Manager for DB2. Type in or use the drop-down list to select the required value.


Grid

General options

CheckBox Striped grids

Displays the odd grid rows in a different color defined by the Strip option available on the Color & Formats page.

CheckBox Show editor immediately

Allows editing the cell value right after the cell is clicked.

CheckBox Always show editor

Set this option to make the cell editors always active.

CheckBox Enable auto-search in grid

If this option is checked, the cursor is automatically forwarded to the closest match when you start typing.

CheckBox Row multi-selection

With this option set, multiple rows can be selected in grid.

CheckBox Invert selection

Determines whether a single cell within the focused row or the entire row is highlighted when focused.

CheckBox Column auto-width

With this option set, column widths are changed in order to display all columns without using the horizontal scroll bar. If the content a column is still too large to display without a need to resize the grid, then the column values are truncated and the hidden characters are replaced with an ellipsis at the end.

CheckBox Cell auto-height

If the widths of the columns are insufficient to display the full content, then text clipping occurs. Set this option to prevent this. If this option is set, the cell content is displayed in multiple lines where necessary. You can set the number of lines to display using the Cell max line count option.

Environment Options - Grid

Grid layout preference

RadioButton Autofit column widths

Use this option to shrink the grid columns so that the longest visible column value fits.

RadioButton Save and restore layout

Use this option to keep the original grid width. Check the Restore sorting option to apply defaults to sorting (except for SQL sorting) as well.

Root level options

These options are applied to the main view of the grid. See Grid View for details.

Detail level options

These options are applied to the detail view of the grid. See Grid View for details.

CheckBox Show "Group by" box

Displays the gray area above the column caption allowing one to group data in the grid.

CheckBox Show indicator

Activates/deactivates the row indicator panel at the left.

Environment Options - Grid - Show indicator

CheckBox Show navigator

Activates/deactivates the data navigator similar to the navigation panel at the top of the grid. The navigator is available at the bottom of detail level view.

Environment Options - Grid - Show navigator

CheckBox Show "New item row"

Displays an empty row at the bottom of a view which is a convenient way for adding data to the grid.

CheckBox Hide tabs for single detail

This option is useful when only one view is present on the detail level. When the option is enabled, the view tab is hidden.

See also:

Grid View


Data Options

Limit options in table and view editors

Define the number of records to be selected on opening the Data tab of Table Editor and View Editor:

RadioButton Select all records from a table*

RadioButton Select only ... records* (you should set the number of records using the corresponding spinner control)

Advanced

CheckBox Use separate connections for each data view within a database

Select this option to use a separate connection for each data view within a database. Disabling this option is recommended if maximum allowed number of connections is too low.

CheckBox Asynchronous query execution

Check this option to allow executing queries in background mode (asynchronously). Note that this option is only available when the Use separate connections for each data view within a database option is enabled.

CheckBox Perform data sorting on client in data view

If enabled, the data are sorted by SQL Manager for DB2 (on the client side). If this option is disabled, the data are sorted on DB2 server with the help of the ORDER BY clause used in SQL query.

CheckBox Perform data filtration on client in data view

If enabled, the data are filtered by SQL Manager for DB2 (on the client side).

If disabled, SQL filter is used in data view. In this case filtering is performed on the DB2 server with the help of the WHERE clause used in SQL query.

With the Perform data sorting on client in data view option enabled, sorting is performed by means of the grid. Otherwise a click on the column header for sorting causes reloading all table data with the selected field in the ORDER BY expression of the SELECT statement.

If the table contains a huge amount of records and the Select only N records mode (see the Default limit options in table and view editors group) is used, this mode is more preferable (e.g. all the records having values starting with "A" will be displayed, and not those which were in originally opened N records).

All above-mentioned is related to the Perform data filtration on client in data view option as well. If the filter is applied to a table containing a great number of records, it is strongly recommended to enable this option - in this case the filter will be applied to all table/view records, not only to those which are displayed at the present moment.

Load visible rows mode if records more than...*

Set this option to switch to the Load visible rows mode when the number of records in the dataset exceeds the specified value.

String fields width (chars)

Using this option you can limit string fields width that may improve performance on large datasets.

Environment Options - Grid - Data Options

Default grid mode

RadioButton Load all rows*

The grid loads all records from a dataset. This option increases the grid performance by reloading only changed dataset records when updating. In this mode all features (automatic sorting, filtering and summary calculations) are available.

RadioButton Load visible rows*

The grid loads only a fixed number of dataset records into memory. This option minimizes dataset loading time. Automatic sorting, filtering, summary calculations are not available in this mode.

The Default grid mode options allow you to define the grid mode which will be used by default.

With the Load all rows option enabled, when loading data, all the records are loaded into grid buffers. In this mode opening the tables with many records may take a considerable amount of time. But in this case you can make use of some advantages: in the filter drop-down list the column headers are displayed with the values for quick filtering; it is possible to open several sub-levels at the same time when viewing data in master-detail view, etc.

In case opening and other operations with an object consisting of many records takes sufficient time, the Load visible rows mode should be used instead. It can be set individually for each table and saved between sessions (can be set through the context menu of the grid).

Default records count retrieving mode

RadioButton Always retrieve

Check this option to enable retrieving record count for tables (with this feature enabled, opening large tables may take much time).

RadioButton Never retrieve

Check this option to disable retrieving record count for tables.

Quick query latency

Note: Changing the options marked with the asterisk (*) sign does not affect the way data are viewed in currently opened windows. These options are used as default values for Data Options parameters for newly registered databases. To change the options for registered databases, please use the Database Registration Info dialog.


Print Data

Save/restore following print data properties

These options specify which Print Data properties will be saved between work sessions (e.g. if you tick off the Page settings item, those settings will be saved and stored between the sessions).

You can save/restore the following Print Data properties: Card view representation, Detail view representation, Expanding, Formatting, Level options, "On every page" options, Pagination, Preview options, Image options, Selection options, Report size options, Showing grid elements, Page number format, Page settings, Report title.

Environment Options - Grid - Print Data


Color & Formats

Display formats

Integer fields

Defines the format for displaying SMALLINT, INTEGER and BIGINT fields.

Float fields

Defines the format for displaying DOUBLE and DECIMAL fields.

Datetime fields

Defines the format for displaying DATETIME fields.

Date fields

Defines the format for displaying DATE fields.

Time fields

Defines the format for displaying TIME fields.

For more information refer to the Format specifiers page.

Environment Options - Grid - Color & Formats

Colors

Options of this group allow you to set colors for basic grid elements. Use the ellipsis EllipsisButton button to open the Color dialog allowing you to select the required color from the palette.

Grid
Defines the background color of the data grid.

Row
Defines the color of the selected row in the data grid.

Strip
Defines the color of the odd rows (applied if the Striped grids option is set on the Grid page).

NULL values

Text
Defines the text that stands for NULL values in grid.

Font color
Defines the font color for displaying NULL values in the grid. Use the ellipsis EllipsisButton button to open the Color dialog allowing you to select the required color from the palette.


Advanced

Advanced options

CheckBox Cell hints for clipped text

Indicates whether a hint box is displayed when hovering over a cell containing clipped text.

CheckBox Focus cell on cycle

Determines whether the focus moves to the next row after it reaches the right-most cell within the current row.

CheckBox Focus first cell on new record

Determines whether the focus moves to the first cell of a newly created row.

CheckBox Next cell on pressing Enter

Determines whether the current view columns can be navigated by using the Enter key.

CheckBox Show navigator hints

Indicates whether a hint box is displayed when hovering over navigation buttons.

CheckBox MRU list in column filter

Enables showing of Most Recently Used items when filtering columns.

CheckBox Expand buttons for empty details

Specifies whether to display expand buttons within master rows that do not have associated details.

Card width

Defines the width of the card used in Card View mode.

Environment Options - Grid - Advanced

Form view

CheckBox Large memo editor

Sets the number of lines for text-typed fields when viewing data in Form view.

CheckBox Word wrap in memo editor

Determines whether long strings are wrapped within the memo editor area.

CheckBox Word wrap in string editor

Determines whether long strings are wrapped within the string editor area.

Grid lines

Determines whether to display vertical and horizontal lines between cells.

Detail tabs position

Specifies the position of the tabs in detail level views: top or left.

Card layout direction

Specifies the direction of cards in Card View mode: horizontal or vertical.

Show edit buttons

Indicates when the edit buttons are displayed: never, for focused record or always.


Column Options

Common options

CheckBox Auto-select text

Determines whether all text within an editor is automatically selected when the editor gets focus.

CheckBox Hide selection on losing focus

Determines whether the visual indication of the selected text remains when the editor loses focus.

Memo editor options

CheckBox Inserting Return characters

Specifies whether a user can insert return characters into text.

CheckBox Inserting Tab characters

Specifies whether a user can insert tab characters into text.

CheckBox Word wrap in grid

Determines whether long strings are wrapped in grid.

CheckBox Popup memo editors

Turns on popup memo editors for text BLOB type fields.

Environment Options - Grid - Column Options

Spin editor options

CheckBox Use Ctrl+Up instead of Up to increase value

Allows you to use Ctrl+Up and Ctrl+Down key combinations for editing spinner values (for INTEGER field values).

CheckBox Show large increment buttons

Determines whether fast buttons (for large increment) are visible within the editor.

Increment

Specifies the increment value for the spin editor (spinner control).

Large increment

Specifies the large increment value for the spin editor (spinner control).

Spin editor buttons' position

Specifies the position of spin editor (spinner control) buttons: vertical, horizontal / left and right or horizontal / right.


Localization

The Localization section of the Environment Options dialog is provided for managing the localization files of SQL Manager for DB2.

You can create your own *.lng files similar to those available in the %program_directory%\Languages folder, add them to the list of available languages and set the new language as the program interface language.

Default directory

Use the Explorer ExplorerButton button to specify the directory where the *.lng files are to be stored by default.

Choose program language

Use the drop-down list of available languages to select the interface language to be applied to the application.

CheckBox Auto scan languages on startup

When checked, the directory with localization files will be scanned automatically at the application startup; all the languages found will be added to the list of available languages.

Available Languages

Lists all the languages available for localization and the corresponding *.lng files. Double-click a language in the list to edit its name or the *.lng file.

Add Defaults

This button is used to search for *.lng files in the Default directory and add all of them to the Available Languages list.

Add

Opens the Add language dialog where you can specify your own localization file and set the language name.

Edit

Opens the Edit language dialog where you can change the language name or select another localization file for the specified language.

Delete

Removes the selected language from the Available languages list (without confirmation).

Environment Options - Localization

See also:

Localization


Global Shortcuts

This section allows you to view/edit shortcuts most needed actions when working with EMS SQL Manager for DB2.

Environment Options - Global Shortcuts

To edit shortcut, select the required action click the ellipsis button and press the preferred key combination to assign it with the action.

Environment Options - Global Shortcuts - Edit


Find Option

The Find Option section allows you to search for options available within the Environment Options dialog easily and quickly.

Option

In this field you can enter the name of the option to search for within SQL Manager Environment Options.

Environment Options - Find Option

The Available options area lists all options of the Environment Options category according to the specified name. The Option Kind, Category and Group columns specify option type and location.

Select the required option in the list and click iconFindText Show Option to open the corresponding section where you can view/edit the value of this option. For your convenience the required option is marked with an animated iconFindOption icon.


Editor Options

Editor Options allow you to set the parameters of viewing and editing SQL statements within SQL Editor and other SQL editing tools of the SQL Manager application.

To open the Editor Options window, select the Options | btnEditorOptions Editor Options... main menu item, or use the Editor Options button on the main toolbar.

  • General
  • Display
  • SQL Formatter
  • Key Mapping
  • Spell Checking
  • Find Option

See also:

Environment Options

Visual Options


General

Editor options

CheckBox Auto indent

If this option is checked, each new indention is the same as the previous one when editing SQL text.

Indents and outdents are used in the process of text editing to make the source code easier to read.

CheckBox Insert mode

If this option is checked, the insert symbols mode is on by default.

CheckBox Find text at cursor

If this option is checked, the Text to find field in the Find Text dialog is automatically filled with the text on which the cursor is set.

CheckBox Always show hyperlinks

If this option is checked, hyperlinks are displayed in the editor window. To open a link, click it with the Ctrl key pressed.

CheckBox Double click line

If this option is checked, double-clicking the line on which the cursor is set selects the whole line.

CheckBox Trim trailing spaces

If this option is checked, all spaces after the last symbol in line will be trimmed.

CheckBox Fixed line height

Prevents line height calculation. If this option is checked, the default line height is taken.

CheckBox Persistent blocks

Keeps marked blocks selected even when the cursor is moved with the arrow keys used, unless a new block is selected.

CheckBox Fixed column move

If this option is checked, the caret keeps its horizontal position when moved between lines.

CheckBox Optimal fill

Check this option to enable optimal algorithm of filling text content in the working area of the editor.

CheckBox Unindent keep align

Keeps align for the lines that are not indented.

CheckBox Smart caret

This option determines the caret movement (up, down, line start, line end). The caret is moved to the nearest position on the screen.

CheckBox Resolve aliases

Enables/disables the syntax highlight and code completion features for aliases.

Editor Options - General

CheckBox Overwrite blocks

Replaces a marked block of text with whatever is typed next. If Persistent Blocks is also selected, the text you enter is appended to the currently selected block.

CheckBox Show caret in read only mode

Displays/hides the caret in read-only mode.

CheckBox Copy to clipboard as RTF

If this option is checked, the selected text is copied in RTF format.

CheckBox Drag and drop text

This option allows to drag and drop selected text.

CheckBox Group undo

This option allows you to undo multiple actions of the same kind.

CheckBox Group redo

This option allows you to redo multiple actions of the same kind.

CheckBox Cursor beyond EOL

If this option is checked, the horizontal position of a cursor is kept. If you move the cursor (using the Up and Down arrow keys) onto a line having length less than the current cursor horizontal position, it will be positioned after the last symbol of the line.

CheckBox Enable column selection

Enables/disables column selection mode.

CheckBox Hide cursor on type

Hides/displays mouse cursor within the working area while a user is typing some text.

CheckBox Hide dynamic (no focus)

Hides dynamic highlights when an editor is not focused.

CheckBox Collapse empty lines

Collapses empty lines after a text range when this range has been collapsed.

CheckBox Scroll to the last line only

When the option is enabled, you can scroll to the last line of the text only, otherwise you can scroll to the end of the page.

CheckBox Word wrap

When on, text is wrapped at the right margin of the editor area to fit in the visible area.

CheckBox Variable horizontal scrollbar

If this option is checked, the horizontal scrollbar varies according to the current content of the editor.

CheckBox Float markers

When enabled, markers are linked to the text, and they will move with the text while the text is being edited; otherwise the markers are linked to the caret position, and stay unchanged while the text is being edited.

CheckBox Undo after save

Keeps undo buffer unchanged after saving.

CheckBox Disable selection

Disables any selection when editing.

CheckBox Draw current line focus

Draws the focus rectangle around the current line when the editor has focus.

CheckBox Hide selection (no focus)

Hides the selection when the editor loses focus.

CheckBox Greedy selection

Selects an extra column/line in column/line selection modes.

CheckBox Keep selection mode

Enables selection for caret movement commands (like in BRIEF).

CheckBox Select search result

Determines whether the search result should be selected.

CheckBox Smart paste

When this option is enabled, the editor gets both Unicode and ANSI content from the clipboard, converts them using the selected character set and selects the best text to be pasted. This allows getting correct text copied from both ANSI and Unicode applications disregarding the currently selected keyboard language.

CheckBox Disable all code features

This option disables code completion, code folding, highlight and all options that are set on the Quick Code page. For options that are set on the Highlight page, the defaults will be applied.

Collapse level

Specifies the level of text ranges that will be affected by the "Collapse all" command.

Undo limit

Defines the maximum number of changes possible to be undone.

Tab mode

Specifies the way the TAB key is processed. Possible values are: Use tab character (inserts a tab character); Insert spaces (inserts space characters); Dialog behaviour (when the edit control is in a dialog, the focus is switched to the next control); Smart tab (tabs to the first non-white space character in the preceding line).

Tab stops

Defines the tab length used when editing a text.

Comment symbols

Defines the symbols which will be used to comment code fragments.

Block indent

Specify the number of spaces to indent a marked block.

Hint: The Reset to Defaults button which is common for all sections of the Editor Options dialog opens a menu with items allowing you to discard all changes and reset options of the current category or of all categories to their defaults.


Display

Gutter

CheckBox Show line numbers

If this option is checked, line numbers are displayed in the SQL text editor window.

CheckBox Gutter auto width

Enable this option to specify that the gutter width will be adjusted automatically.

CheckBox Display line state

If this option is checked, a colored line indicating the state of all altered lines in the text is displayed at the gutter of the editor window.

CheckBox Use code folding

Check this option to enable to code folding feature of SQL Editor.

Width

Defines the gutter width in the editor window.

Color

Defines the gutter color in the editor window. Select an item from the drop-down list or click the ellipsis EllipsisButton button to select a color using the Color dialog where you can specify the required color from the palette.

Editor Options - Display

Right margin

CheckBox Visible

Makes the right text margin visible.

CheckBox Word break

Allows breaking the words at the right margin.

Position

Defines the position of the right text margin in the editor window.

Color

Defines the color of the right margin in the editor window. Select an item from the drop-down list or click the ellipsis EllipsisButton button to select a color using the Color dialog where you can specify the required color from the palette.

Code staples

CheckBox Visible

Makes the code staples visible in the editor window.

CheckBox Single color

Check the option to apply a single color for code staples.

Color

Defines the code staples color in the editor window (if the Single color option is deselected). Select an item from the drop-down list or click the ellipsis EllipsisButton button to select a color using the Color dialog where you can specify the required color from the palette.

Default editor fonts

Use these options to set the fonts, style, size and color used in the editor. If the Show only fixed-width fonts option is checked, only fonts with fixed width are displayed in the Font dialog.


Highlight

The Highlight section of the Editor Options dialog allows you to specify the fonts, styles, foreground and background colors, borders and other attributes of the text used by the editor to mark out various text fragments: string, number, SQL keyword, symbol, comment, identifier link, highlighted link, table alias, SQL datatype, SQL variable, SQL function, wrong symbol, exception, parenthesis match, current line, selected text, search mark.

Editor Options - Display - Highlight

The Element list contains all elements available in SQL editors of the program. For your convenience the preview area (located to the right of the Element list) illustrates the changes being made to each of the elements.

If you click the Disable element button, the standard settings will be applied to this element; the button text will change to Enable element. If you press this button, you will be able to change font and color attributes for this element.

Controls for changing the properties of the item selected in the Element list are located below. Use the following instructions for each of the elements.

Use the Style drop-down list to choose the parameter to change.

You can define the font type, size and style for the selected element by pressing the Set custom font... button.

There is also a possibility to set the font style in the Font style group:

Bold

Italic

Underline

Strike out

Vertical alignment

Allows you to set the vertical alignment of the key words. Possible values are:

Top

Center

Bottom

Capitalization

Allows you to change the case of the key words. Possible values are:

Unchanged

Upper case

Lower case

Toggle case (all letters except the first one are in the upper case)

Initial caps (the first letter is in the upper case, others are in the lower case)

Select the text foreground/background colors from the Foreground color / Background color drop-down lists. If you check the CheckBox Default box, the default color will be applied.

CheckBox Read only

Specifies that the selected element cannot be altered.

CheckBox Hidden

Specifies that the element will be displayed only when placing a cursor over them.

In the Borders group you can set border properties for the selected element:

Left

Top

Right

Bottom

Use the first drop-down list for each border to choose the border line type; then use the second list to choose the border color.

CheckBox Multiline border

Specifies that the line will be displayed at the beginning and at the end of the line.

Note: When setting colors, select an item from the drop-down list or click the ellipsis EllipsisButton button to select a color using the Color dialog where you can specify the required color from the palette.

See also:

Quick Code


Quick Code

The Quick Code section of the Editor Options dialog allows you to specify the automatic features, fonts, styles, foreground and background colors, borders and other attributes of the text used by the editor to display objects for 'quick code': tables, functions, indexes, fields, procedures, defaults, views, sequences, triggers, schemas, tablespaces, aliases, servers, MQ tables, UDS types, wrappers, nicknames, SQL keywords, SQL functions.

Editor Options - Display - Quick Code

The Completion list object list contains all objects for which you can set quick code parameters. For your convenience the preview area (located to the right of the Completion list object list) illustrates the changes being made to each of the objects.

If you click the Disable element button, the standard settings will be applied to this object; the button text will change to Enable element. If you press this button, you will be able to change font and color attributes for this object.

Controls for changing the properties of the item selected in the Completion list object list are located below. Use the following instructions for each of the objects.

CheckBox Code completion

If this option is checked, then on typing the first word characters in the SQL text editor you will be offered some variants for the word completion in a popup list (an analogue of the Code Insight feature in Delphi IDE). The popup list will appear after a period of time defined by the Delay option.

Sensitivity

This option allows you to set the number of characters to be typed before code completion is activated.

Specify whether items of the code completion list should be sorted RadioButton by type or RadioButton by name, and check the CheckBox Sort field names option to apply sorting for field names as well.

CheckBox Show information hints

This option enables/disables information hints.

CheckBox Code parameters

If this option is checked, the Delphi-like hint for key words is enabled.

Delay

Using this option you can change the time after which completion variants popup.

CheckBox Auto launch keyboard templates

Allows you to use keyboard templates for faster typing frequently used expressions (see Keyboard Templates).

Select the style to be applied to the words inserted automatically (Custom font, Font style and colors, Back and foreground or Background only). Then, depending on the style selection, set custom font, Font style, Foreground color, Background color, Borders.

Use the Style drop-down list to choose the parameter to change.

You can define the font type, size and style for the selected element by pressing the Set custom font... button.

There is also a possibility to set the font style in the Font style group:

Bold

Italic

Underline

Strike out

Vertical alignment

Allows you to set the vertical alignment of the words inserted automatically. Possible values are:

Top

Center

Bottom

Capitalization

Allows you to change the case of the words inserted automatically. Possible values are:

Unchanged

Upper case

Lower case

Toggle case (all letters except the first one are in the upper case)

Initial caps (the first letter is in the upper case, others are in the lower case)

Select the text foreground/background colors from the Foreground color / Background color drop-down lists. If you check the CheckBox Default box, the default color will be applied.

CheckBox Read only

Specifies that the selected element cannot be altered.

CheckBox Hidden

Specifies that the element will be displayed only when placing a cursor over them.

Use the Capitalization drop-down list to choose the case for the selected element:

Unchanged

Upper case

Lower case

Toggle case (all letters except the first one are in the upper case)

Initial caps (the first letter is in the upper case, others are in the lower case)

In the Borders group you can set border properties for the selected element:

Left

Top

Right

Bottom

Use the first drop-down list for each border to choose the border line type; then use the second list to choose the border color.

CheckBox Multiline border

Specifies that the line will be displayed at the beginning and at the end of the line.

Note: When setting colors, select an item from the drop-down list or click the ellipsis EllipsisButton button to select a color using the Color dialog where you can specify the required color from the palette.

See also:

Highlight


SQL Formatter

SQL Formatter is a feature implemented in SQL Manager for DB2 and is a useful tool for formatting SQL queries and scripts, making SQL statements easy to read. SQL Formatter is introduced in SQL Editor, SQL Script and some object editors.

The Settings tab of the SQL Formatter section allows you to enable this feature and apply SQL formatting to subqueries, if necessary.

CheckBox Format SQL query

Check this option to enable SQL formatting.

CheckBox Format subquery

Enables SQL formatting for subqueries.

Editor Options - SQL Formatter

See also:

SQL Editor


SQL Words

The SQL words page of the SQL Formatter section allows you to select the key words for each action of SQL formatter and to set formatting parameters.

Wrap first element

Wraps the selected text at a specific column. Select the SQL key words after which formatting should be applied.

Params in line/list

Allows you to display the parameters followed by the defined key words in list or in line.

Editor Options - SQL Formatter - SQL Words

OR - AND

Set the placement of the AND an OR operators according to the operands followed by them. See the example below.

RadioButton Left

WHERE

AND ...

AND ...

AND ...

RadioButton Separate

WHERE

...

AND

...

AND

RadioButton Right

WHERE

... AND

... AND

... AND

The Keywords case / Identifiers case options allow you to define the case of the corresponding items.

You can choose UPPER, lower, Capitalize.

Default case means that the name of the identifier/keyword remains "AS IS".

CheckBox Space before bracket

Adds a "space" character before the opening bracket and after the closing one.

CheckBox Space into brackets

Adds a "space" character after the opening bracket and before the closing one.

Indent in list

Sets the size of indent relatively to the previous string.


Key Mapping

For your convenience key mapping is provided in SQL Manager for DB2. On this page you can set the shortcuts for various commands/operations according to your needs.

Use the Commands list on the right to select the command for which you need to make a shortcut, then place cursor into the Key editor and press the key combination you find useful (use Ctrl Alt Shift buttons). After setting the shortcut, press the New button to add it to the list of existing Key combinations. If the specified shortcut is already assigned to another command/operation, an error message with the command/operation will be returned.

Editor Options - Key Mapping

Note: It is possible to set more than one key combination for the same command/operation (e.g. Ctrl-K, Ctrl-H) using the Add button.

If necessary, you can export the current Key mapping list to an external file by pressing the Export button.

Manage the shortcuts within the Key combinations list using the Delete (to remove the selected item) and the Clear (to remove all shortcuts for this command/operation) buttons.

It is also possible to save a custom key mapping scheme, if necessary:

  • set the shortcuts for the appropriate commands/operations;
  • click the Save As... button;
  • input the new scheme name in the corresponding dialog.

To delete a scheme, select it in the Scheme name drop-down list and press the Delete button.

See also:

SQL Editor

SQL Manager shortcuts


Spell Checking

Spell checking is a new feature implemented in SQL Manager for DB2 for your convenience.

Set the necessary Spell checker mode:

RadioButton Highlighting

In this mode incorrectly spelled and misprinted words are highlighted in the editor.

RadioButton Autocorrection

In this mode incorrectly spelled and misprinted words are replaced with the corresponding words from the Substitutions list automatically.

RadioButton None

In this mode the spelling checker is disabled.

Use the Add... button to add a new item to the Substitutions list, the Edit... button to alter the selected substitution, and the Delete button to remove the selected substitution from the spelling checker vocabulary.

Editor Options - Spell Checking

Case sensitivity

CheckBox Support case consistency with substitution

If this option is selected, the spelling checker uses the case of words-substitutions when performing a replacement.

CheckBox Ignore case while spell checking

Check this option to disable case checking.

CheckBox Keep the misprint case when replacing

Check this option if you do not wish to change the case of the replaced word.

Misprints

Controls of this group allow you to manage the spelling checker vocabulary: use the Add... button to add a new misprint to the vocabulary, the Auto button to use the default list of misprints, the Edit... button to change the selected misprint, the Delete button to remove the selected misprint from the vocabulary, and the Clear button to empty the list of misprints for the currently selected substitution.

It is also possible to exclude a misprint from spell checking without deleting the misprint. This misprint will therefore remain in the vocabulary, but it will be ignored by the spelling checker.

To mark a misprint as excluded, you need to move it from the Check list to the Ignore list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the misprints from one list to another.


Find Option

The Find Option section allows you to search for options available within the Editor Options dialog easily and quickly.

Option

In this field you can enter the name of the option to search for within SQL Manager Editor Options.

Editor Options - Find Option

The Available options area lists all options of the Editor Options category according to the specified name. The Option Kind, Category and Group columns specify option type and location.

Select the required option in the list and click iconFindText Show Option to open the corresponding section where you can view/edit the value of this option. For your convenience the required option is marked with an animated iconFindOption icon.


Visual Options

Visual Options allow you to customize the application interface style to your liking.

To open the Visual Options window, select the Options | btnVisualOptions Visual Options... main menu item, or use the Visual Options button on the main toolbar.

Use the Scheme name box to select the interface scheme you would like to be applied: MS Office 11 style, MS Office XP style, MS Office 2000 style, Windows XP native style or Classic style.

  • Bars and menus
  • Trees and lists
  • Edit controls
  • Check boxes
  • Buttons
  • Page controls
  • Group boxes
  • Splitters
  • Navigation bar
  • Find Option

For your convenience the previews illustrating the changes are displayed in the Sample Group area at the bottom of each section within the Visual options dialog.

It is also possible to create one's own interface scheme, if necessary:

  • set your preferences within the available sections of the Visual Options dialog (Bars and menus, Trees and lists, Edit Controls, Check boxes, Buttons, etc.);
  • click the Save As... button;
  • specify the new scheme name in the Save Visual Scheme dialog.

See also:

Environment Options

Editor Options


Bars and menus

Use the Bars and menus section of the Visual options dialog to customize SQL Manager bars style, menus animation and a number of general options concerning toolbars and menus usage.

Visual Options - Bars and menus

Bar style

Use the drop-down list to select the painting style that will be applied to the bars:

Standard

Enhanced

Flat

XP native

Office 11

Note: If the XP native style is selected, bars use the currently applied XP theme to paint themselves. However, if the currently installed operating system is not Windows XP or the Windows Classic theme is currently applied, bars will be painted using the Enhanced style.

Menu animation

Use the drop-down list to specify the menu animation effects:

None (no animation)

Random (random choice: Unfold, Slide, Fade)

Unfold (unfolding menus)

Slide (sliding drop-down and popup menus)

Fade (menus fade in when appearing)

CheckBox Sunken border

If this option is enabled, the border of each dockable bar is drawn using sunken borders. Otherwise, no border is drawn around the dockable bar.

CheckBox Use F10 for menu

If this option is disabled, the application does not respond to the F10 key press events and the main menu will not will be called.

CheckBox Menu shows recent commands first

This option determines whether the most frequently used items will be placed in menus at first position.

If this option is enabled, frequently used menu items are "promoted" and displayed higher on the list. Unused and infrequently used menu items are visually suppressed and appear "collapsed".

Hint: If you wish to disable this feature, you can also right-click the toolbar and select the Customize... popup menu item to call the Customize dialog, then proceed to the Options tab within the dialog, and deselect the Menus show recently used commands first option.

CheckBox Show full menus after delay

This option is available only if the Menu shows recent commands first option is selected.

If this option is enabled, infrequently used menu items (if they appear "collapsed") will be automatically expanded after a delay upon setting mouse cursor (or upon selection with the Up/Down keys) on the bottom of the menu. Otherwise, the menu expands only after clicking its bottom-most button (or using the Ctrl+Down shortcut).

CheckBox Flat close buttons

This option determines the border style of the Close buttons.

If this option is enabled, the Close button is drawn flat. Otherwise, it has a 3D look.

CheckBox Gray-scale disabled images

This option specifies whether default images must be painted faded.

By default, images within disabled links are painted grayscale when the XP native or Office11 bar style is used. For other bar styles, such images are painted grayed out.

If this option is enabled, images of disabled links will be painted grayscale independently of the selected bar style.

Hint: The Reset to Defaults button which is common for all sections of the Visual Options dialog allows you to discard all changes and reset options to their defaults.


Trees and lists

Use the Trees and lists section of the Visual options dialog to view and edit the corresponding options.

Visual Options - Trees and lists

Look & feel

This setting determines the manner in which tree and list elements are painted. Use the drop-down list to select the painting style that will be applied to the trees and lists:

Standard

Flat

UltraFlat

CheckBox Hide selection

This option specifies how selected tree nodes and list items are displayed when focus leaves the tree or list control.

If this option is enabled, selected nodes look like other nodes. Otherwise, selected nodes/items are highlighted within the tree/list.

CheckBox Hide focus rectangle

This option determines whether a focus rectangle is displayed around the focused tree node or list item within the tree or list control.

If this option is disabled, the focused node/item is not highlighted but the focus rectangle is displayed around it.

CheckBox Native style

This option determines whether the native Windows style will be applied to the trees and lists.

The option has the highest priority for trees and lists. If this option is selected, the tree nodes and list items are painted according to the native Windows style, regardless of other painting settings.

Note: The Native style option is currently supported for the Windows® XP operating system only.


Edit controls

Use the Edit controls section of the Visual options dialog to customize the appearance of various SQL Manager for DB2 edit controls: Border style, Button style, Button transparency, etc.

Visual Options - Edit controls

Border style / Button style

Use these drop-down lists to specify the style around an editor (the edit control borders) and select the painting style that will be applied to the edit control buttons (ellipsis button, arrow-down combo-box button, etc.) respectively:

None

Single

Thick

Flat

3D

UltraFlat

Button transparency

Represents the button transparency mode within an editor. Use the drop-down list to specify the transparency that will be applied to the edit control buttons (ellipsis button, arrow-down combo-box button, etc.):

None (a button is always displayed in a non-transparent fashion)

Inactive (a button is drawn when the editor has focus or when the mouse cursor is positioned over the button; otherwise, the button is transparent)

Always (a button is always transparent)

Hide inactive (a button is drawn only when the editor has focus; otherwise, the button is invisible)

Hide unselected (a button is drawn when the editor has focus or when the mouse cursor is positioned over the editor region; otherwise, the button is invisible).

Edges

This group defines which edges are displayed within an editor. Check/uncheck the boxes to hide/show individual edges of the edit controls:

CheckBox Left (if unchecked, the left border edge is invisible)

CheckBox Right (if unchecked, the right border edge is invisible)

CheckBox Top (if unchecked, the top border edge is invisible)

CheckBox Bottom (if unchecked, the bottom border edge is invisible)

CheckBox Hot track

This option specifies whether editor items are highlighted when the mouse cursor is positioned over an edit control. Select this option to highlight an edit control in response to mouse movements.

CheckBox Shadow

If this option is selected, a shadow is displayed for the edit controls.

CheckBox Native style

This option determines whether the native Windows style will be applied to the edit controls.

The option has the highest priority for edit controls. If this option is selected, the edit controls are painted according to the native Windows style, regardless of other painting settings.

Note: The Native style option is currently supported for the Windows® XP operating system only.

CheckBox Autosize

This option specifies whether an editing field is resized to entirely display its contents.


Check boxes

Use the Check boxes section of the Visual options dialog to customize the border style and the appearance of check boxes and radio buttons.

Visual Options - Check boxes

Border style

This setting determines the manner in which check box and radio group borders are painted. Use the drop-down list to select the painting style that will be applied to the check boxes and radio groups:

None

Single

Thick

Flat

3D

UltraFlat

CheckBox Shadow

If this option is selected, a shadow is displayed for the check boxes and radio groups.

CheckBox Native style

This option determines whether the native Windows style will be applied to the check boxes and radio buttons.

The option has the highest priority for check boxes and radio buttons. If this option is selected, the check boxes and radio buttons are painted according to the native Windows style, regardless of other painting settings.

Note: The Native style option is currently supported for the Windows® XP operating system only.


Buttons

Use the Buttons section of the Visual options dialog to customize SQL Manager buttons.

Visual Options - Buttons

Button kind

This setting determines the manner in which a button is painted. Use the drop-down list to select the painting style that will be applied to buttons:

Standard

Flat

UltraFlat

CheckBox Native style

This option determines whether the native Windows style will be applied to the buttons.

The option has a higher priority than the Button kind setting. If this option is selected, the buttons are painted according to the native Windows style, otherwise the Button kind selection is applied.

Note: The Native style option is currently supported for the Windows® XP operating system only.


Page controls

Use the Page controls section of the Visual options dialog to customize the style of all SQL Manager page controls.

Visual Options - Page controls

Tabs are visual elements of tab controls. Their purpose is to identify pages and switch between them. Once a tab is clicked, the corresponding page is selected.

Pages are container controls that represent the contents of tab controls. Tab controls contain a single page, whose context is to be updated each time the selected tab changes. Page controls contain the number of pages equal to the number of tabs.

Tab style

Use the drop-down list to select the painting style that will be applied to the tab controls:

Tabs (tabs are painted as notebook tabs)

Buttons (the selected tab is painted as a pressed button, other tabs are painted as released buttons)

Flat (tabs are painted as notebook tabs, but appear lowered slightly)

CheckBox Hot track

This option specifies whether tab captions are highlighted when the mouse pointer hovers over tabs. Select this option to enable tab highlighting.

CheckBox Multiline pages

This option specifies whether tabs are arranged across several rows.

If this option is enabled, tabs are automatically arranged into the minimum number of rows required to fit all of them. If this option is disabled, tabs are displayed within a single row.

CheckBox Native style

This option determines whether the native Windows style will be applied to the tab controls.

The option has the highest priority for the tab controls. If this option is selected, the tabs are painted according to the native Windows style, regardless of other painting settings.

Note: The Native style option is currently supported for the Windows® XP operating system only.

Options of the Slants group allow you to apply the Slanted painting style to tabs and specify the appearance aspects (positions) of tab slants.

CheckBox Slants

If this option is enabled, the Slanted painting style is applied to a tab control: all tabs appear slanted, and the selected tab's top edge is highlighted.

Slants Positions

Specify the positions (sides) at which the tabs are bent by slants.

RadioButton Left (slants bend left sides of the tabs)

RadioButton Right (slants bend right sides of the tabs)


Group boxes

Use the Group boxes section of the Visual options dialog to customize all SQL Manager group boxes to your liking.

Visual Options - Group boxes

Border style

This setting determines the manner in which group box borders are painted. Use the drop-down list to select the painting style that will be applied to the group box borders:

None

Single

Thick

Flat

3D

UltraFlat

Look & feel

This setting determines the manner in which group boxes are painted. Use the drop-down list to select the painting style that will be applied to the group boxes:

Standard

Flat

UltraFlat

Office11

CheckBox Shadow

If this option is selected, a shadow is displayed for the group boxes.

CheckBox Native style

This option determines whether the native Windows style will be applied to the group boxes.

The option has the highest priority for the group boxes. If this option is selected, the group boxes are painted according to the native Windows style, regardless of other painting settings.

Note: The Native style option is currently supported for the Windows® XP operating system only.


Splitters

Use the Splitters section of the Visual options dialog to customize all SQL Manager splitters to your liking.

Visual Options - Splitters

Hot zone style

This setting determines the manner in which splitter hot zones are painted. Use the drop-down list to select the hot zone style that will be applied to the splitters:

Windows XP task bar

Media Player 8

Media Player 9

Simple

None (hot zone is disabled)

CheckBox Hot zone drags a splitter

This option is applied when the Hot zone style value is different from None, and specifies whether the splitter can be dragged by its hot zone.

If this option is enabled, you can drag the splitter by its hot zone (i.e. use any part of the splitter's area for dragging). Otherwise, attempts to drag the splitter by the hot zone will have no effect.


Navigation bar

Use the Navigation bar section of the Visual options dialog to customize the Navigation bars of all SQL Manager tools according to your preferences.

Visual Options - Navigation bar

View style

Several types of control representations (views) are available for Navigation bars. View styles define the appearance of Navigation bar elements (background, scroll buttons, group headers, links/items and hint boxes). Use the drop-down list to select the view style that will be applied to the Navigation bars:

Office 11

XP

Simple

Advanced

CheckBox Border

This option specifies whether a border style will be applied to the Navigation bars.

If this option is enabled, the Navigation bars have thin borders. Otherwise, no borders are drawn around the Navigation bars.


Find Option

The Find Option section allows you to search for options available within the Visual Options dialog easily and quickly.

Option

In this field you can enter the name of the option to search for within SQL Manager Visual Options.

Visual Options - Find Option

The Available options area lists all options of the Visual Options category according to the specified name. The Option Kind, Category and Group columns specify option type and location.

Select the required option in the list and click iconFindText Show Option to open the corresponding section where you can view/edit the value of this option. For your convenience the required option is marked with an animated iconFindOption icon.


Save Settings

Save Settings Wizard allows you to export the settings of SQL Manager for DB2 - wholly or partially - to a single *.reg file which can be applied afterwards to SQL Manager for DB2 installed on another machine, or it can be used to backup previous settings.

To start the wizard, select the Options | Save Settings main menu item.

To apply saved settings you need to open the created *.reg file, then press the OK button in the window appeared. All settings will be applied automatically (they will be added in the Windows Registry).

  • Specifying destination file
  • Selecting settings
  • Selecting databases
  • Saving settings


Specifying destination file

This step of the wizard allows you to specify the location of the destination file.

Filename

Use the btnSaveAs button to set the path to the *.reg file where the application settings are to be saved.

Note: If the target file already exists, the application will show a warning dialog where you can choose the action you need.

Save Settings - Specifying destination file

Click the Next button to proceed to the next step of the wizard.


Selecting settings

This step of the wizard allows you to specify the information you need to be saved to the result file: Nodes registration info, Database registration info, Database projects, Tabs, Environment options, Editor options, Visual options, Keyboard templates, External tools list, Form placements, MRU lists.

Save Settings - Selecting settings

Click the Next button to proceed to the next step of the wizard.


Selecting databases

This step of the wizard allows you to select the database(s) to save the registration settings.

To select a database, you need to move its alias from the Available Databases list to the Selected Databases list. Use the Move all to Selected Move to Selected Move to Available Move all to Available buttons or drag-and-drop operations to move the databases from one list to another.

Save Settings - Selecting databases

Click the Next button to proceed to the last step of the wizard.


Saving settings

This step of the wizard is intended to inform you that the saving settings operation has been configured, and the wizard is ready to save the application settings to the specified file.

The log area allows you to view the log of operations and errors (if any).

Save Settings - Saving settings

CheckBox Close the Wizard after successful completion

If this option is selected, the wizard is closed automatically when the export process is completed.

If necessary, you can save a template for future use.

Click the Finish button to start saving settings.


Localization

When using SQL Manager for DB2, your are provided with multi-language interface support. You can change the program language, specify the directories for your localization files easily, edit existing localizations and create your own localization files.

Changing Program Language

In order to select the program interface language:

  • select the Options | Select Program Language... main menu item;
  • select the interface language in the Select Language dialog;
  • click OK to apply the language and close the dialog.

Editing Program Localization

In order to edit the interface localization:

  • open one of the program windows (e.g. Table Editor, SQL Editor) where you wish to edit the localization of captions and hints;
  • use the Shift+Ctrl+L keyboard shortcut to open the Localization Editor window;
  • edit window captions and hints as necessary;
  • click the Save btnSave button on the toolbar.

Note: The Localization Editor window is only available if the currently selected language is different from the default.

Creating New Localization Files

In order to create a new localization file:

  • create a new localization file similar to those located in the %program_directory%\Languages folder;
  • select the Options | Environment Options main menu item;
  • proceed to the Localization section of the Environment Options dialog;
  • click the Add button;
  • set the language name and the path to the new *.lng file within the Language Info Editor dialog.

The new language is added to the list of available languages. Now you can set it as the interface language using the Select Program Language dialog or the Localization section of the Environment Options dialog.

See also:

Localization

Language Info Editor


Localization Editor

The Localization Editor window allows you to edit the captions and hints of any SQL Manager window, if the selected program language is different from the default one.

To call this window, use the Shift+Ctrl+L shortcut in any child window of SQL Manager for DB2.

The working area of the window contains the element names and the corresponding strings divided by the "=" character. These strings are what you see in the program as menu items, window captions, button hints, etc. Edit them to change the program appearance. Be careful and do not edit the identifiers that stand before the "=" character - this will not produce any effect.

For your convenience the Find and Replace features are provided - the corresponding btnFindText btnReplaceText toolbar buttons are used to call the Find Text dialog or the Replace Text dialog respectively. The Search Again btnSearchAgain button enables the repeated search for the text that was last searched.

Localization - Localization Editor

When you are done with editing, click the Save btnSave button on the toolbar to apply the changes you have made.

See also:

Select Program Language

Localization


Select Program Language

The Select Language dialog allows you to select a language for SQL Manager for DB2 localization.

To open this dialog, select the Options | Select Program Language... main menu item.

The dialog displays the list of available languages configured on the Environment Options | Localization page. Select a language from the list and click OK to confirm your choice and close the dialog.

Localization - Select Program Language

See also:

Localization Editor

Localization


Keyboard Templates

The Keyboard Templates window allows you to create new keyboard templates for quicker typing regularly used expressions and to edit the existing ones.

To open this window, select the Options | Keyboard Templates... main menu item.

To add a new keyboard template, click the Add Template... button, set the template name and define the template expression. In the upper right area of the window you can change the case of the template expression (As is, Uppercase, Lowercase, First upper).

You can deactivate an existing template by selecting it from the list on the left and removing the Active flag of the template.

If necessary, you can also edit the template name using the Edit Template... button, delete the template using the Delete Template button or edit the template expression within the Expansion area of the window. For faster editing you can use the Cursor, Author, Time, Date, Clipboard, Marker buttons.

Hint: Add/edit/delete template items are also available in the context menu of the template list on the right.

CheckBox Old style

This option specifies whether the selected keyboard template expansion should conform to the template specifications used in the earlier versions of SQL Manager for DB2.

Once you have defined the templates, you can use them in SQL Editor. First of all, make sure that the CheckBox Auto launch keyboard templates option is selected on the Quick Code page of the Editor Options dialog. When editing SQL text in SQL Editor, type a template name and use the Ctrl+J shortcut: the text associated with the template (Expansion) will be inserted automatically.

Hint: The Reset to defaults button which is available at the bottom of the Keyboard Templates dialog allows you to discard all changes and restore the settings to their defaults.

See also:

Quick Code

SQL Manager shortcuts


Object Templates

The Object Templates window allows you to preset the definition template for the name and/or body of an object to be created.

To open this window, select the Options | Object Templates... main menu item.

Select an object in the tree (Alias, Audit Policy, Buffer Pool, Role, Event Monitor, Function, Tablespace, Trusted Context, MQ Table, Nickname, Partition Group, Procedure, Schema, Sequence, Server, SQL Variable, Table, Trigger, UD Type, Structured Type, User, View, Favorite Query, Project, Report) and set its template using the editor area.

See also:

Database Objects Management


Find Option dialog

The Find Option dialog allows you to search for SQL Manager options easily.

To open this dialog, select the Options | Find Option main menu item.

Option

In this field you can enter the name of the option to search for within the entire set of SQL Manager options.

Find Option dialog

The Available options area lists all options by categories according to the specified name. The Option Kind, Category and Group columns specify option type and location.

Select the required option in the list and click iconFindText Show Option to open the corresponding dialog where you can view/edit the value of this option. For your convenience the required option is marked with an animated iconFindOption icon.


External Tools

When using SQL Manager for DB2, you can add external Windows applications to make your work more efficient.

  • External Tools dialog
  • External Tool Info editor

Adding External Tools

In order to add an external program:

  • select the Options | External Tools... main menu item;
  • click the Add... button in the External Tools dialog;
  • specify parameters of the new external tool within the External Tool Info editor;
  • confirm adding the new external tool by clicking OK in the External Tool Info editor and the External Tools dialog.

This adds the icon and the title of the application you have selected to the Tools | External Tools submenu. Now you can run this tool quickly without closing SQL Manager.

Removing External Tools

In order to remove an external program:

  • select the Options | External Tools... main menu item;
  • select the tool to be removed in the Tools list of the External Tools dialog;
  • press the Del key or click the Delete button within the dialog;
  • click OK to confirm removing the tool and closing the dialog.

The selected tool has been removed and is no longer accessible from the Tools | External Tools submenu.

See also:

SQL Monitor

SQL Script Editor

Search in Metadata

Extract Database Wizard

Activity Monitor

Print Metadata

HTML Report

Reports management

Dependency Tree

CLP Console

Compare Databases

Grant Manager

Visual Database Designer

Project Interaction


External tools dialog

The External Tools dialog allows you to manage the list of external applications which can be easily run from within SQL Manager environment.

To open this dialog, select the Options | External Tools... main menu item.

Tools

Lists all added external applications.

Add...

Opens the External Tool Info editor for adding a new tool to the Tools | External Tools submenu.

Edit...

Opens the External Tool Info editor for editing the title, the hot key, the path to the executable file, the working directory and execution parameters of the tool currently selected in the Tools list.

Delete

Removes the selected tool from the list of SQL Manager for DB2 external tools.

External tools - External Tools dialog

To change the order of tools in the list, use the [image] [image] arrow buttons at the bottom area of the dialog, or use the Ctrl+Shift+Up / Ctrl+Shift+Down shortcuts. You can also drag-and-drop items within the list box to change their positions.

See also:

External Tool Info editor


External tool info editor

The External Tool Info editor allows you to set common parameters of running added external programs from within SQL Manager environment. This dialog is used both when adding external tools and editing their parameters (see Add External Tool and External Tools).

Title

Enter the title to be displayed in the Tools | External Tools submenu of SQL Manager.

Hot Key

Press a key or a key combination to set it as a hot key for running the tool.

Program

Use the Explorer ExplorerButton button to specify the path to the *.exe file of the external program.

Working Dir

Set the default working directory of the program.

Parameters

This box stores parameters for the program execution (if required).

External tools - External Tool Info editor

See also:

External Tools dialog


How to...

The succeeding pages of this chapter are intended to provide you with brief instructions on how to perform this or that operation correctly using SQL Manager for DB2.

Work with Databases

Connect to a database

Create a database

Edit database connection parameters

Make work with a database faster

Design a visual database structure

View an ER diagram

Backup a database

Restore a database from a backup

Create a database copy

Document a database

Save metadata reports to file

Log database changes

Get an SQL dump

Synchronize two databases

Work with Database objects

Group objects

Find objects

View dependecies

Get an object DDL

Work with Data

View tables with many records

Set data filter

Sort and group data

Export/import data

Export data as SQL script

Export filtered data

Edit data of master-detail tables

Add image to table

Set data display format

Work with Queries and Scripts

Create SQL statements rapidly

Control a query productivity

Work with several queries an once

Save most frequently used queries

Execute queries with parameters

Export query results into file

Execute scripts

Execute a large SQL script

Make SQL script work faster

Customize work with Query/Script text

View executed queries and scripts

Work with version control

Enable version control

Rollback to previous revision state

View database changes

View procedure changes

Work with database objects offline

Transfer program settings

Create a simple report in Report Designer

Update SQL Manager

Report bugs and suggestions

See also:

Getting Started

Database Explorer

Database Management

Database Objects

Query Management Tools

Data Management

Import/Export Tools

Change management

Database Tools

Instance Tools

Personalization


Connect to a database

If you want to connect to a database that has not been registered yet then perform the following operations:

  1. Launch the Register Database wizard by selecting the Database | btnRegisterDB Register Database... main menu item.
  2. If a host where the database is located has not been registered yet then select RadioButton Add new catalog entry option on the first step. Otherwise, select the RadioButton Use existing entry option.
  3. In the first case provide node registration info on the second step and User name and Password on the third step.
  4. In the second case select the database(s) you want to register and then provide the User name and Password for each database on the third step.
  5. The registered database(s) is/are now displayed in the DB Explorer. To connect to the database double-click its alias or select the btnConnectToDB Connect to Database item of the database context menu.


Create a database

If you want to create a database, please, make sure that the host for this database has been already registered. For more details see the Register Node wizard.

To create a database on the registered server perform the following operations:

  1. Launch the Create Database wizard by selecting Database | btnCreateDB Create Database main menu item.
  2. On the first step define a name for the newly created database, the location where the new database will reside, select the node for the new database and supply the User name and Password.
  3. On the second step set connection properties and collation for a new database.
  4. On the final step define the location of the new database files and a number of tablespace parameters using the corresponding controls and then check the CheckBox Register after creating option in order to open the Database Registration Info dialog after database creation.


Edit database connection parameters

If you have made a mistake when creating and registering a database or the information provided is incomplete then it can be edited using the Database Registration Info dialog. You can view this information both for connected or disconnected database.

To open the dialog, select the database or any of its objects in the DB Explorer tree, then select the Database | btnDBRegistrationInfo Database Registration Info... main menu item, or right-click the database alias in DB Explorer and use the btnDBRegistrationInfo Database Registration Info... context menu item.

The connection parameters can be changed on the Connections tab of the dialog. Here you can define or redefine the following properties in the corresponding boxes: Node name, User name, Password, Login timeout, Database name, Database alias, Database comment.


Make work with a database faster

If your database contains too many objects or if a connection to the database is slow you can increase work speed by uncheking the CheckBox Refresh objects on connection option when registering database or editing the Database Registration Info.

Also you can uncheck the CheckBox Restore desktop on connect option in the Preferences section of the Environment Options.


Design a visual database structure

To design your database visually you may use the Visual Database Designer tool. It allows you to create, edit and drop tables and table fields, set relations between tables and perform other operations you may need to achieve your purpose.

To create a new object right-click within the diagram area and then choose the Create item of the context menu. After that a new object will appear on a diagram.

After you have finished designing your diagram you can click a Compile button to create this structure physically.


View an ER diagram

The relationship diagram is built using the reverse engineering operation.

To view an ER diagram of a scheme you should follow the steps:

  1. Run Visual Database Designer;
  2. Click the btnReverseEngineer Reverse Engineer button on the main toolbar or use the corresponding item of the context menu.
  3. Choose schemas to reverse engineer from.

The created diagram can be saved as a *.dbd file ( btnSave Save Diagram button) or as an image ( btnSaveAsPicture Save as Picture button).


Backup a database

A database backup is created by means of the Backup Database Wizard. To launch it choose Services | [image] Backup Database main menu item.

  1. On the first step define the location for a backup: Local device, Tivoli Storage Manager, Vendor library or XBSA.
  2. On the second step set buffer options and define whether to perform an online or offline backup.

You can set

  • number of buffers - number of memory buffers DB2 will use to store backup data prior to sending it off to the target;
  • buffer-size - the size of each of these member buffers;
  • parallelism - the number of table spaces to be backed up in parallel.

Here you can set a backup level. If you do not want to backup the full database you can backup a set of tablespaces if you like (or even a single tablespace). In this case select the Tablespace item from the Backup level drop-down list.

If you want to backup only the data pages that have changed then check the CheckBox Incremental option.

  3. On the third step set additional parameters for backup operation.
  4. If you have selected Tablespaces as the Backup level on the second step then on the fourth step select table spaces to back up.


Restore a database from a backup

Use the Restore Database Wizard to restore a database from a backup. To launch the wizard and set restore options choose the Services | [image] Restore Database main menu item.

  1. On the first step select the preferable restore mode:
  • Restore to an existing database
  • Restore to a new database
  • Restore history file only
  2. On the second step select table spaces to restore or choose to restore the whole database and define whether you want to perform a redirected restoring by checking the CheckBox Redirect containers option.
  3. If you are restoring to a new database then on the third step set target database options.
  4. On the next step choose a backup image from which you want to restore a database.
  5. If the CheckBox Redirect containers option was checked on the second step then define new paths for containers on the fifth step.
  6. On the next step set restore options: buffer option and final state. Here you can also specify whether you want to perform an online restore operation. This means that other agents can connect to the database while the backup image is being restored, and that the data in other table spaces will be available while the specified table spaces are being restored.


Create a database copy

In order to create a copy of the whole database or of separate objects you can:

  1. Extract DB objects structure and data into SQL script using the Extract Database Wizard. The result script can be used to copy or restore your database.
  2. Create database backups with the help of the Backup Database Wizard.
  3. Create copies of separate database objects by using the Duplicate Object Wizard.
  4. Create a project on the basis of the existing database using the Project Interaction Wizard. It will serve as a virtual database with objects copied from the real one.


Document a database

There are several ways to document a database:

  1. You can generate a detailed HTML report of the selected database objects using HTML Report Wizard.
  2. You can generate and print metadata reports of any database object(s). Generated reports can be exported to any of the available formats: HTML file, Excel file, Text file, RTF file, CSV file, HTML file, BMP image, Excel table (OLE), JPEG image, TIFF image.
  3. You can save the Visual Database Designer diagram as a *.dbd file for future use. A diagram is saved with the objects XML files. If necessary, you can also save the diagram as an image.


Save metadata reports to file

To save a metadata report in a file of any supported format (*.txt, *.csv, *.pdf, *.html) you should do the following:

  1. Open the Print Metadata window by selecting the Tools | iconPrint Print Metadata item of the main menu.
  2. Mark the needed objects and define printing settings and click the btnPrintPreview Preview button on the navigation bar or toolbar.
  3. In the opened Preview window click btnPreviewExport Export and select from the drop-down list the needed file format for report saving. When done, specify file name and location.


Log database changes

If you want to perform metadata changes logging and SQL query logging you need to:

  1. Check the CheckBox Enable log of metadata changes and specify the path to the *.sql file to store the metadata logs.
  2. Check the CheckBox Enable log of SQL Editor queries and specify the path to the *.sql file to store the logs of SQL queries: date/time of query execution, SQL text, execution result or errors (if any).

This can be done in the Database Registration Info | Logs window.


Get an SQL dump

To get an SQL dump (an *.sql file) of your database use the Extract Database Wizard that will extract database objects and/or data to an SQL script, e.g. for backup purposes.


Synchronize two databases

The synchronization between two databases can be done with a help of the Compare Databases Wizard. This wizard allows you to compare databases and create a script to deploy changes from one database into another one.

To run the wizard use the Tools | iconCompare Compare Databases... item of the main menu.


Group objects

If you want to group objects you can do it in one of the following ways:

  • Using favorite objects (situated in the DB Explorer tree):
  1. Click create New Sub Folder in the Favorite Objects folder using the corresponding item of the context menu
  2. Define its name and drag-and-drop necessary objects there or use the Add Object item of the created folder context menu. Pick the objects to add to folder from the appeared dialog.
  • Using DB Explorer tabs:
  1. Right-click the necessary object in the DB Explorer.
  2. Choose the btnNewTabFromHere New Tab from Here item of the object context menu and define the name of the tab.
  3. Now your objects are stored on the separate tab of a DB Explorer.

Note: If object is not a tree node, it cannot be placed on separate tab.


Find objects

In order to search for objects you need you can:

  1. Call the Find Object dialog by right-clicking the Database alias, any database object group nodes or objects in the DB Explorer tree and select the Find Object... context menu item.
  2. Call the Find Object dialog by using the Ctrl+F shortcut.
  3. Type in the first letters in the edit-box of the Search Panel, and the corresponding object will be highlighted in the tree, as displayed in the picture below.

Note: Objects among which the search is performed should be updated and the object node should be expanded.

  4. Launch the Search in Metadata tool by selecting the Tools | iconSearchInMetadata Search in Metadata main menu item, or using the Ctrl+Alt+F shortcut. After the search is complete, the Explorer group on the Navigation bar displays the tree of database objects in which the search string is found, and allows you to view metadata of the required object or its fragment.


View dependecies

If you want to view all the object dependencies then:

  1. Use a dependencies tab in the Table Editor.
  2. Use the Dependency Tree tool.

These tools may be useful when you can't find an object that prevents your from dropping a table.


Get an object DDL

In order to get an object DDL you can:

  1. Right-click the object in the DB explorer tree and select the Script to New SQL Editor | Create context menu item.
  2. Right-click the object and select the Edit Table <table_name>... context menu item or double-click the table and then proceed to the DDL tab in the opened table editor window.
  3. Right-click the object in the DB explorer tree and select the Data Manipulation | Export Data as SQL Script context menu item.


View tables with many records

If your table contains a lot of records you can minimize dataset loading time by:

  1. Setting the number of records to be selected;
  2. Enabling RadioButton Load visible records in order to load only a fixed number of dataset records into memory;
  3. Checking the RadioButton Never retrieve option to disable retrieving record count for tables.

These options can be set only for the selected database on the Data Options page of the Database Registration Info.

Default settings for newly registered databases can be defined on the Grid | Data Options page of the Environment Options dialog.

You can set the maximum number of visible records in the Record Limit counter HowTo - Grid View - Set Record Limit located on the Data View toolbar. Press Enter or click the data grid to apply changes.

If the number of records exceeds the maximum number, the Move all to Selected Fetch all button becomes active. It allows viewing all records in a table.

Use the Grid Mode tab of the Data View context menu to set the display mode. You can choose among the Load All Rows, Load Visible Rows and Default modes.


Set data filter

Quick Filtering (by the current value in a cell)

Open the context menu of the needed column and choose the Quick Filter item. Then choose a filter condition in the opened submenu.

Filtering by Column

HowTo - Grid View - Quick Filter

Open the drop-down list on the column title and choose a filter condition from the list.

You can set advanced conditions by using the Custom... menu item.

When choosing this item, the special window for setting filter conditions opens.

Advanced Filtering

You can set advanced filter options by pressing the button btnSetFilter on the toolbar of the Data View and set filter parameters in the Filter Builder. Apply the set conditions by pressing the Apply button.

If a filter is set for a table, the special bar appears in the lower part of the table where you can see filter conditions and the history of filter changes opened by pressing the drop-down list.

Data View - Grid View - Filtering records - Filtering panel

Disable Filtering

To cancel filtering, open the context menu of the column and choose the Disable filter item.

Or press the btnClose button on the filter toolbar.


Sort and group data

In order to sort data, do the following:

  1. Open data at the Data or Results tab.
  2. Choose the column by which you need to sort data and click the column title.
  3. If the column was not sorted, the first click will sort it in the ascending order and the second one - in the descending order.

Note: To cancel the sorting, open the context menu by right-clicking the necessary column and choose the Clear Sorting item, or press the Ctrl button and click the column title.

To enable grouping, drag the column title to the special grouping bar above the grid.

HowTo - Data View - Grid View - Grouping data by two columns_Small

Note: To disable grouping, drag the column title from the group bar back to the table.


Export/import data

You can export data from a database table into an external file of any supported format by means of the Export Data Wizard.

There are several ways to launch Export Data Wizard:

  1. Open the Data or Results tab, press [image] Export Data on one of the Data View toolbars.
  2. Open the Data or Results tab, choose Data Manipulation | [image] Export Data in the Data Grid context menu.
  3. Open the table context menu in the DB Explorer, choose the Data Manipulation | [image] Export Data item.
  4. Open the Data or Results tab and use the shortcut Shift+Ctrl+E.

You can import data from external sources into a table or view using Import Data Wizard:

  1. Open the Data tab, press the [image] Import Data button on one of the Data View toolbar.
  2. Open the Data tab, choose Data Manipulation | [image] Import Data in the Data Grid context menu.
  3. Open the table context menu in the DB Explorer, choose the [image] Import Data item.
  4. Open the Data tab and use the shortcut Ctrl+I.

Note: Export and import data tools are available in full version of SQL Manager for DB2 only.


Export data as SQL script

You can export data from a database table into SQL script with INSERT INTO statements in one of the following ways:

  1. Open the Data or Results tab, press the [image] Export Data as SQL Script on one of the Data View toolbars and set export parameters in the opened Export as SQL Script Wizard.
  2. Open the Data or Results tab, choose Data Manipulation | [image] Export Data as SQL Script in the Data Grid context menu and set export parameters in the opened Export as SQL Script Wizard.
  3. Open the table context menu in the DB Explorer, choose the Data Manipulation | [image] Export Data as SQL Script item and set export parameters in the opened Export as SQL Script Wizard.

Note: In order to extract table DDL (CREATE TABLE statement), check the CheckBox Add CREATE TABLE statement box at the Step 1.


Export filtered data

If you have set a filter in a Data View and want to export only this data then you need to uncheck CheckBox Perform data filtration on client in data view option on the Database Registration Info | Data Options tab. In this case all the changes made by applying filters are performed on the DB2 server with the help of the WHERE clause used in SQL query. Otherwise your changes will just be displayed on your client machine but data will be exported into a file without applied filters.


Edit data of master-detail tables

You can work with data in multi-level mode, that is you can view and modify it in several related tables simultaneously.

To manage grid levels, right-click the grid and select the Grid Levels context menu group. Click Add Grid Level in the menu to run the Create Grid Level wizard. After the level is added you can edit data of the related tables.


Add image to table

If you want to add an image to a table then do the following:

  1. Open the table on the Data tab.
  2. Go to the BLOB View section (the navigation buttons are located in the bottom part of the window) and then proceed to the Image tab.
  3. If there are several BLOB fields, choose the required field from the Select BLOB Column drop-down list on the toolbar of the Blob View tab and press the iconLoadFromFile Load from File button on the same toolbar.
  4. Choose the needed image file in the appeared dialog.

HowTo - Grid View - BLOBView - Select BLOB Column

Note: Adding images to table is possible only if table contains at least one BLOB field.


Set data display format

To set the format for displaying data open the Options | btnEnvironmentOptions Environment Options dialog from the main program menu, proceed to the Color & Formats tab and define or choose the display format for some data types in the Display formats section.


Create SQL statements rapidly

There are two options for creating SQL queries rapidly:

In the DB Explorer

  1. Right-click a table in the DB Explorer
  2. Choose Script to New SQL Editor context menu item.
  3. Select the necessary query type.

In the Visual Query Builder

  1. Open Visual Query Builder.
  2. On the Builder tab drag an object from the DB Explorer tree to the diagram area.
  3. Choose necessary fields to include in the query by checking the corresponding box located to the left from the field name in the list, or just by double-clicking it. To include all fields of the table/view, check the box located to the left of the table/view caption.
  4. Associate two objects by their fields.Drag a field from one object list to another. This will set a link between these objects by the selected fields. It is indicated by a bidirectional arrow between the linked fields.
  5. Edit link properties. Double-click the linking arrow or right-click it and select the Property popup menu item. The Link properties dialog allows you to change the association condition by choosing it from the drop-down list.
  6. You can view and edit your SQL statement on the Edit tab of the Visual Query Builder.


Control a query productivity

You can view a query productivity on the query plan. It allows you to view the sequence of actions performed by the database server in the process of the query execution, and the amount of system resources used for the query execution.

To view the Plan of a query, open the query in SQL Editor and use the btnExplainQuery Show estimated execution plan item of the Navigation bar or toolbar.

If necessary, you can specify that the Plan tab appears automatically upon query execution in SQL Editor: select the CheckBox Show actual execution plan on query execution option available within the Tools | SQL Editor section of the Environment Options dialog.


Work with several queries an once

SQL Editor provides a possibility to open and edit several queries. You can create tabs in the lower part of the SQL Editor, each tab may contain a separate query. There are several ways for creating tabs:

  1. Open btnShowSQLEditor SQL Editor and choose btnNewSQLEditor Add New Query on one of the toolbars.
  2. Open btnShowSQLEditor SQL Editor and choose btnNewSQLEditor Add New Query in the context menu of the existing tab. HowTo - WorkWithQueries - AddNewQuery
  3. Use the shortcut Ctrl + N.

Note: Each tab can be renamed and any query can be added to Favorite Queries.


Save most frequently used queries

Use the Favorite Queries feature to store your most frequently used SQL queries. To access the list of your favorite queries you can use the Favorite Queries node of DB Explorer or create a separate tab for your Favorite queries.

Using the context menu you can create a new Favorite query or edit an existing one using Favorites editor, open any of the existing queries in SQL Editor or remove a query if you don't need it any longer.


Execute queries with parameters

If you want to use queries with parameters then you should check CheckBox Allow using parameters in query text option in the Environment Options | Tools.

This feature allows you to specify different values within a query in a popup dialog just before the query execution. Use the colon (':') character before an identifier (e.g. :P1) to specify a parameter within the query.


Export query results into file

When executing queries, their results can be displayed on the Edit or Results tab in the Data View.

You can copy data from database tables into an external file of any supported format in one of the following ways:

  1. Open the Data or Results tab, press [image] Export Data on one of the Data View toolbars and define export parameters in the opened Data Export Wizard.
  2. Open the Data or Results tab, choose Data Manipulation | [image] Export Data in the Data Grid context menu and define export parameters in the opened Data Export Wizard.
  3. Open the table context menu in the DB Explorer, choose the [image] Export Data item and define export parameters in the opened Data Export Wizard.
  4. Open the Data or Results tab and use the shortcut Ctrl+E.


Execute scripts

SQL Script allows you to create, view, edit and execute SQL scripts. To open SQL Script Editor select the Tools | btnShowSQLScript SQL Script... main menu item. This tool is intended for work with a great number of SQL statements and with scripts that are stored in files. For instance, you can execute a script directly from a file without loading it to the Editor window. This reduces memory usage. However SQL Script allows just to estimate whether the execution of script statements will be successful, but it does not return query result.

Note: To execute SQL scripts you should use SQL Script, not SQL Editor. The latter is intended for creating, editing and executing SQL statements. It also provides a possibility to view query result, perform various operations with it (data import, data export, etc.) and manage transactions.


Execute a large SQL script

If you need to execute a large SQL script it's not necessary to load it from file to the SQL Script Editor window as it can take a lot of time. Instead you can execute script directly from *.sql, *.zsql or *.txt file. In order to do this click the iconCompile Execute script from file button of the Navigation bar and Toolbar in SQL Script editor.


Make SQL script work faster

In order to make the SQL script work faster, you can disable some functions.

Parsing

Choose and disable the iconDBExplorer Disable Parsing item on one of SQL Script Editor toolbars.

Automatic Creation of Hierarchical Text Structure

Uncheck the CheckBox Use code folding box in the Display section of the Editor options.

Syntax Highlight and Quick Code for Aliases

Choose Options | Editor options in the main program menu, proceed to the General tab and uncheck the CheckBox Resolve aliases box - the syntax highlight and quick code for aliases will be disabled.


Customize work with query/script text

To customize work with a query/script text you may:

Use Internal Link

This means that the name of the object existing on a database is highlighted in a query/script text. Such an object can be opened by holding the Ctrl key and clicking the object with a mouse.

Add Text Template

Keyboard templates allow you to type regularly used expressions and edit the existing ones quicker. Once you have defined the templates, you can use them in SQL Editor. When editing SQL text in SQL Editor, type a template name and use the Ctrl+J shortcut: the text associated with the template will be inserted automatically.

Use Automatic Completion (Object List)

You can call the autocompletion list by starting entering the first characters of the text and using the shortcut Ctrl + Space.

Customize Autocompletion List

Choose Options | Editor options in the main program menu, proceed to the Quick Code tab and define the list and quick code parameters.

Apply Automatic Formatting of Query/Script

Choose Quick Code | Format in the SQL Editor/SQL Script context menu or the Shift+Ctrl+F shortcut to apply automatic formatting.

Set Font and Query/Script Format at the Display tab

Choose Options | Editor options in the main program menu, proceed to the Display tab and define common font and format parameters for SQL Editor/SQL Script.

Set Font and Query/Script Format at the Highlight tab

Choose Options | Editor options in the main program menu, proceed to the Highlight tab and define font options for each element.

Note: If some font parameters are defined on the Highlight tab, they will be applied to the query/script text and not the ones defined on the Display tab.


View executed queries and scripts

To view all queries and scripts sent to the server you need to launch SQL Monitor. It will show you the log of database operations and SQL queries as items, each consisting of 3 parts: Executed (the date and time of the operation), Operation (SQL statement sent to the server), Result (the result of the operation).

Note: SQL Monitor only displays scripts and queries executed in SQL Manager for DB2 during current session.


Work with Version Control

Change management system allows you to:

  • Systematization of release database new versions process: storing different database versions; tracking of database changes; Getting (storing, testing) change scripts which reveal differences between two database states.
  • Possibility to rollback database to definite state.
  • Control of database changes.

When a user of the system makes typical actions, such as getting previous version of a document or creating new version etc., he works with a local copy of repository. As the amount of applied changes grows, repositories of various developers become more different. This results in necessity of synchronization of repositories. Synchronization can be performed by interchange of patches or change sets among developers.


Enable version control

SQL Manager for DB2
  • Index
  • « Prev
  • Next »

Enabling version control

To start working with Version Control System (VCS) you need to:

  1. Install change management system.

The following systems are supported:

  • CVS
  • Microsoft Visual SourceSafe
  • Team Foundation Server
  2. Create the directory for CVS, which is a working copy of VCS (version control system) directory.
  3. Open the Change Management tab of the Database Registration Info dialog to check the CheckBox Enabled flag.
  4. Create local repository for each database under version control. Press the Repository Management Wizard button to open the corresponding wizard. Use this wizard to define settings for linking database to VCS repository. Repository is a directory, where VCS stores all documents with history of its changes and other service information.
  5. Specify the parameters of the created repository at the Change Management tab of the database registration info dialogue, or confirm autocomplete on closing the Repository management wizard.
  6. Confirm the changes and reconnect to the database.

You can view/edit repository connection settings within the Provider settings dialog which can be called by pressing the Properties button.


Rollback to previous revision state

If you want to rollback a database to the state of a previous revision then you need to perform the following actions:

  1. Right-click database in the DB Explorer and select Change management | Get Change Script item from the popup menu or select the Tools | Change Management | Get Change Script in the main program menu. Get change script wizard will appear.
  2. On the second step check RadioButton Generate differential script in order to generate a script reflecting difference between two database states.
  3. On the third step specify a date or tag as a script end point so as to define a state to which you want to rollback your database and create a reverse script.
  4. Execution of this script will rollback your database to the necessary point.


View database changes

If you want to view committed database changes you can do it in one of the following ways:

  • Using database history:
  1. Right-click database alias in the DB Explorer and select Change management | History item from the popup menu or select the Tools | Change Management | History in the main program menu.
  2. Define the Period within the corresponding section. Changes made in this period will be displayed in the working area.
  3. At the top of the window you can find a table that displays information about changes made in the specified period. It displays transaction ID, Date when transaction was made, name of the User who made changes and Comment to a transaction if any. In the bottom part of the window you can view SQL statement of the selected action.
  • Using tags and change script:
  1. Right-click database alias in the DB Explorer and select Change management | Get Change Script item from the popup menu or select the Tools | Change Management | Get Change Script in the main program menu. Get change script wizard will appear.
  2. On the second step check RadioButton Generate differential script in order to generate a script reflecting difference between two database states.
  3. On the third step you may either select tags from the drop-down list to specify two database states to view changes between or pick up dates to define a period of changes.
  4. After that a generated change script will show you the differences between two database states.


View procedure changes

If you have modified a procedure and want to view committed changes then you need to do the following:

  1. Right-click this procedure in the DB Explorer.
  2. Select Change management | History item from the popup menu. You will see a table of object changes history.
  3. Select two procedure revisions you need to compare.
  4. Right-click any of the objects to call the context menu and select the Compare Properties or Compare DDL item to view differences as table of properties or as object script respectively.
  5. If you are comparing properties then in the window appeared you will see a table containing all procedure properties and its value in compared revisions. Properties with different values are highlighted with grey.
  6. If you are comparing DDL then in the window appeared you will see DDL of procedures revisions. Extra lines in an early revision script are red, in latter revision - grey. Lines for pasting missing lines are yellow and different lines are blue.


Work with database objects offline

SQL Manager for DB2 allows you to perform actions on your database offline. This can be done by using projects which may be considered as virtual databases that do not require connection to the server.

When creating a project you can create a new database or copy an existing one. After the project is created you can work with it as if it was a real database: create, edit or drop schemas, create and drop tables, views, functions etc, undo and redo actions. But all actions are performed offline.

Existing projects can be updated with a database. In this case new or modified objects from a database are copied to the project. Vice versa you can create database from a saved project or alter a database with a project.

The process of creating and updating a project is executed by means of Project Interaction Wizard. As a result of updating a database you get an sql script showing differences between database and projects. This script can be executed, loaded to the SQL Script Editor or saved to an *.sql file.

Like databases projects can be compared with each other or with databases by means of Compare Databases Wizard. After comparing is completed one project can be transformed into another project or database.

You can use Visual Database Designer to work with a project.


Transfer program settings

If you want to apply current program settings (wholly or partially) to SQL Manager for DB2 installed on another machine you can save them into a single *.reg file. This can be done by means of the Save Settings Wizard.

Note that Favorite Queries are not saved in this case. To get access to your queries from another machine please store them in the database.


Create a simple report in Report Designer

SQL Manager for DB2
  • Index
  • « Prev
  • Next »

Create simple report in the report designer

To create a report using Report Designer:

  1. Select the Tools | [image] Report Designer main menu item.
  2. In the opened Report Designer select the File | [image] New Report main menu item, or click the [image] New Report item of the navigation bar. The following objects will be added to the newly created report: ReportTitle, MasterData and PageFooter.
  3. Connect to data source.
  4. Add ADOTable or ADOQuery object.
  5. Link ADOTable or ADOQuery with ADODatabase.
  6. Place database fields Page1. Move the required fields from Data Tree to Band MasterData.


Update SQL Manager

SQL Manager for DB2 can be updated in the following ways:

  1. Download the SQL Manager for DB2 distribution package from the download page, then extract archive to the preferable directory (e.g. c:\unzipped). Close SQL Manager for DB2 if it's opened and run DB2ManagerFullSetup.exe or DB2ManagerLiteSetup.exe.
  2. Select the Help | SQL Manager Direct, then press the Update button. If new SQL Manager for DB2 version is released it will be offered for downloading. Click Yes in the dialog window to update SQL Manager for DB2 automatically.


Report bugs and suggestions

Before reporting bugs and suggestions make sure you are using the latest version of the SQL Manager for DB2. If so then you may contact us via Members Area on http://www.sqlmanager.net/, via Help main menu or by sending an email to support@sqlmanager.net. Please, don't forget to mention your OS version, DB2 version and program version. Describe the steps to reproduce the bug in detail and illustrate them with screenshots.


Program interface

Main menu

The main menu allows you to perform various Database operations, open To-Do List and activate/deactivate Database Explorer, SQL Assistant and various toolbars within the View menu, manage your databases using items of the Tools and Services menus, customize the application using the Options menu, manage SQL Manager Windows using Window List and other tools, view the Tip of the Day and access Registration information and product documentation, update the product to the latest version using the corresponding items available within the Help menu.

Appendix - Program interface - MainMenu

Note: To learn how to configure SQL Manager menus, refer to the Customize toolbars and menus page.

Navigation bars in object editors and program tools

Navigation bars are interface elements that enable users to quickly locate tools they need. Navigation bar items are displayed within a group with the help of links. A typical Navigation bar of SQL Manager contains links to commonly accessed tools (refresh, print, restore default size of the window), options pertaining to the editor or tool, and specific tools.

Appendix - Program interface - NavBar - Expanded

Navigation bar panes (groups) can be expanded/collapsed. When expanded, a panel provides access to its links; when collapsed, panes are displayed as headers only.

To expand/collapse a panel, click the panel header. The [image] [image] icons indicate the current panel state (collapsed/expanded respectively).

Appendix - Program interface - NavBar - Collapsed

Note: Depending on the current tab selection, Navigation bars in most of the program tools expand to one or more additional panes with tab-specific actions that can be useful for working with the object or service.

Note: To configure the Navigation bars, you can use the Navigation bar section of the Visual Options dialog.

Hint: Most items of the Navigation bars are also available on the Toolbars.

Toolbars in the main program window, object editors and program tools

A toolbar is a horizontal row or vertical column of selectable image buttons that give the user a constantly visible reminder of and an easy way to select certain application functions. Most SQL Manager editors and tools are supplemented with toolbars.

Appendix - Program interface - Toolbar

To enable the toolbars in SQL Manager for DB2, open the Environment Options dialog, proceed to the Windows section there and select RadioButton Toolbar (if you need the toolbar only) or RadioButton Both (if you need both the toolbar and the Navigation bar) in the Bar style for child forms group.

Hint: Most SQL Manager toolbars are dockable, i.e. you can place a toolbar to any available location within the parent window.

To learn how to configure toolbar items, refer to the Customize toolbars and menus page.

Progress bars

A progress bar is an interface element that conveys the progress of a task or service. Several SQL Manager editors (e.g. SQL Script),tools (e.g. Dependency Tree) and wizards (e.g. Import Data Wizard) are supplemented with progress bars indicating the progress of lengthy operations.

The graphic of SQL Manager progress bars is accompanied by a textual representation of the progress in the percent format.

Splitters

Splitter controls are used to resize docked controls at run time. In SQL Manager for DB2 the splitter controls are used on the main form, DB Explorer, and in program tools and editors as a separator between the working area and Navigation bars, status bars, etc.

Appendix - Program interface - Splitter

Incremental Search bar

Incremental search bar is the tool which is available in the status bar area of some SQL Manager tools. The bar is normally called through the Ctrl+I shortcut. Type in the first letters of the search string, and the corresponding string will be highlighted in the search scope.


Viewing object DDL structure

The DDL (Data Definition Language) tab displays the SQL statement for creating the object with all its subobjects, if any. This text is read-only. If you want to change the object definition, use the appropriate editor tabs instead, or copy the text to the Windows Clipboard to paste it in the SQL Editor or SQL Script Editor.

Appendix - Viewing DDL structure

Hint: If more convenient, you can use the Save DDL to file and Open DDL in SQL Editor items available on the DDL panel within the Navigation bar of object editors.


Editing object description

The Description tab allows you to view and edit the comment for the object (optional).

Appendix - Editing object description

You can save changes made in this area by clicking the Save Description item on the Navigation bar.


Browsing object dependencies

The Dependencies tab allows you to view objects that depend on the object being edited, and the objects that the edited object depends on.

While the tree of dependencies is built, the progress bar is displayed in the status area of the editor window.

Appendix - Browsing object dependencies

Hint: To open a dependent object or a depending object in its editor, you can simply double-click the object alias in the Objects that <object_name> depends on and Objects that depend on <object_name> lists.

See also:

Dependency Tree


Compile window

The Compile window is used to trace the errors and edit SQL statements during their compilation. The compilation window appears each time metadata is changed, both when the compilation is successful and when there are compilation errors.

Comment for Version Control

This box is available only if the Version Control system is enabled. Here you can leave a message about the object modification.

Statement sequence

This area contains the list of operations and the result of their parsing (successful or error).

Selected statement

This area displays the SQL statement pending to be executed to perform metadata changing. In this area you can view and edit the SQL statement.

In case of a compilation error the Error tab also becomes visible - here you can view the error description returned by the server.

Commit

This button starts execution of the statement(s). Click it to commit the current transaction. This button is available only if there were no errors in compilation.

Rollback

This button cancels the script execution and allows you to return to the previous stage (editor window or DB Explorer).

Rollback and Recompile

This button calls for recompilation with the changes you made in the Selected statement editing area. Use this button after correcting the SQL statement.

Appendix - Changing Metadata window

If necessary, you can copy information to clipboard and save it in a text editor afterwards (the button is only enabled when a compilation error occurs).


Tip of the Day

This window allows you to see short messages notifying you about interesting particularities and useful features of SQL Manager for DB2.

To open this window, select the Help | Tip of the Day main menu item.

If you check the CheckBox Show tips at startup option, this window will popup each time you start SQL Manager for DB2.


Find Text dialog

The Find Text dialog is provided for quick and flexible searching for specified text within the working area of SQL Manager editors.

Text to find

Enter a search string in this box. The Arrow-Down button which can be found next to the input box allows you to select any of the previously entered search strings.

Options

CheckBox Case sensitive

This option can be used to differentiate uppercase characters from lowercase ones during the search process.

CheckBox Whole words only

Use this option to search for words only (with this option off, the search string might be found within longer words.)

CheckBox Regular expressions

Recognizes regular expressions in the Text to find field.

For example, you can type "empl*" to search for metadata containing the "empl" substring; enter "^emp" to search for words starting with "emp" or "^emp|emp$" to search for the string "emp" at the beginning or at the end of the string.

Note: The syntax of regular expressions that can be used in the Text to find field is similar to that used in Perl regular expressions. Comprehensive information about it can be found at http://perldoc.perl.org/perlre.html#Regular-Expressions.

Direction

RadioButton Forward

Searches from the current position to the end of the working area.

RadioButton Backward

Searches from the current position to the beginning of the working area.

Scope

RadioButton Global

Searches within the entire working area, in the direction specified by the Direction setting.

RadioButton Selected text

Searches only within the currently selected text, in the direction specified by the Direction setting. You can use the mouse or block commands to select a block of text.

Origin

RadioButton From cursor

The search starts at the cursor's current position, and then proceeds either forward to the end of the scope, or backward to the beginning of the scope depending on the Direction setting.

RadioButton Entire scope

The search covers either the entire block of selected text or the entire script (no matter where the cursor is in the Editor area) depending upon the Scope options.

CheckBox Mark search result with stack marker

The option toggles marking search results. If this option is selected, stack markers are set at all search positions - this makes it possible to jump from one marker (search result) to another within the text.

Click the Show All button to highlight every occurrence of the search string.


Replace Text dialog

The Replace Text dialog is provided for searching and replacing text within the working area of SQL Manager editors.

Text to find

Enter a search string in this box. The Arrow-Down button which can be found next to the input box allows you to select any of the previously entered search strings.

Text to replace

This box allows you to enter a string to replace the search string. The Arrow-Down button which can be found next to the input box allows you to select any of the previously entered strings. To replace the search string with an empty string, leave this input box blank.

Options

CheckBox Case sensitive

This option can be used to differentiate uppercase characters from lowercase ones during the search process.

CheckBox Whole words only

Use this option to search for words only (with this option off, the search string might be found within longer words.)

CheckBox Regular expressions

Recognizes regular expressions in the Text to find field.

CheckBox Replace with template

This option requires the Regular expressions option selection.

Enable this option to use regular expressions in the Text to replace field. Expression used in this field will be applied to each string that matches the Text to find expression.

Note: The syntax of regular expressions that can be used in the Text to find and the Text to replace fields is similar to that used in Perl regular expressions. Comprehensive information about it can be found at http://perldoc.perl.org/perlre.html#Regular-Expressions.

CheckBox Prompt on replace

Check this option if you wish to be prompted before replacing upon each occurrence of the search string. When this option is off, the search string is replaced automatically.

Direction

RadioButton Forward

Searches and replaces from the current position to the end of the working area.

RadioButton Backward

Searches and replaces from the current position to the beginning of the working area.

Scope

RadioButton Global

Searches and replaces within the entire working area, in the direction specified by the Direction setting.

RadioButton Selected text

Searches and replaces only within the currently selected text, in the direction specified by the Direction setting. You can use the mouse or block commands to select a block of text.

Origin

RadioButton From cursor

The search and replace process starts at the cursor's current position, and then proceeds either forward to the end of the scope, or backward to the beginning of the scope depending on the Direction setting.

RadioButton Entire scope

The search and replace process covers either the entire block of selected text or the entire script (no matter where the cursor is in the Editor area) depending upon the Scope options.

CheckBox Mark search result with stack marker

The option toggles marking search results. If this option is selected, stack markers are set at all search positions - this makes it possible to jump from one marker (search result) to another within the text.

Click the Replace All button to replace every occurrence of the search string. If you have checked the Prompt on replace option, the confirmation dialog box appears upon each occurrence of the search string.


Format specifiers

The following format specifiers are supported in the format string:

Float/Integer format

0

Digit place holder. If the value being formatted has a digit in the position where the '0' appears in the format string, then that digit is copied to the output string. Otherwise, a '0' is stored in that position in the output string.

#

Digit placeholder. If the value being formatted has a digit in the position where the '#' appears in the format string, then that digit is copied to the output string. Otherwise, nothing is stored in that position in the output string.

.

Decimal point. The first '.' character in the format string determines the location of the decimal separator in the formatted value; any additional '.' characters are ignored.

,

Thousand separator. If the format string contains one or more ',' characters, the output will have thousand separators inserted between each group of three digits to the left of the decimal point. The placement and number of ',' characters in the format string does not affect the output, except to indicate that thousand separators are wanted.

E+

Scientific notation. If any of the strings 'E+', 'E-', 'e+', or 'e-' are contained in the format string, the number is formatted using scientific notation. A group of up to four '0' characters can immediately follow the 'E+', 'E-', 'e+', or 'e-' to determine the minimum number of digits in the exponent. The 'E+' and 'e+' formats cause a plus sign to be output for positive exponents and a minus sign to be output for negative exponents. The 'E-' and 'e-' formats output a sign character only for negative exponents.

Date/Time format

c

Displays the date using the format using the Short Date Format, followed by the time using the Long Time Format. The time is not displayed if the date-time value indicates midnight precisely.

d

Displays the day as a number without a leading zero (1-31).

dd

Displays the day as a number with a leading zero (01-31).

ddd

Displays the day as an abbreviation (Sun-Sat) using the strings of the Short Day Names.

dddd

Displays the day as a full name (Sunday-Saturday) using the strings of the Long Day Names.

ddddd

Displays the date using the Short Date Format.

dddddd

Displays the date using the Long Date Format.

e

Displays the year in the current period/era as a number without a leading zero (Japanese, Korean and Taiwanese locales only).

ee

Displays the year in the current period/era as a number with a leading zero (Japanese, Korean and Taiwanese locales only).

g

Displays the period/era as an abbreviation (Japanese and Taiwanese locales only).

gg

Displays the period/era as a full name. (Japanese and Taiwanese locales only).

m

Displays the month as a number without a leading zero (1-12). If the m specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.

mm

Displays the month as a number with a leading zero (01-12). If the mm specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.

mmm

Displays the month as an abbreviation (Jan-Dec) using the strings given of the Short Month Names.

mmmm

Displays the month as a full name (January-December) using the strings of the Long Month Names.

yy

Displays the year as a two-digit number (00-99).

yyyy

Displays the year as a four-digit number (0000-9999).

h

Displays the hour without a leading zero (0-23).

hh

Displays the hour with a leading zero (00-23).

n

Displays the minute without a leading zero (0-59).

nn

Displays the minute with a leading zero (00-59).

s

Displays the second without a leading zero (0-59).

ss

Displays the second with a leading zero (00-59).

z

Displays the millisecond without a leading zero (0-999).

zzz

Displays the millisecond with a leading zero (000-999).

t

Displays the time using the Short Time Format.

tt

Displays the time using the Long Time Format.

am/pm

Uses the 12-hour clock for the preceding h or hh specifier, and displays 'am' for any hour before noon, and 'pm' for any hour after noon. The am/pm specifier can use lower, upper, or mixed case, and the result is displayed accordingly.

a/p

Uses the 12-hour clock for the preceding h or hh specifier, and displays 'a' for any hour before noon, and 'p' for any hour after noon. The a/p specifier can use lower, upper, or mixed case, and the result is displayed accordingly.

ampm

Uses the 12-hour clock for the preceding h or hh specifier, and displays the contents of the TimeAMString global variable for any hour before noon, and the contents of the TimePMString global variable for any hour after noon.

/

Displays the date separator character using the Date Separator.

:

Displays the time separator character using the Time Separator.

'xx'/"xx"

Characters enclosed in single or double quotes are displayed as-is, and do not affect formatting.


Language Info Editor

The Language Info Editor dialog allows you to set the language name and specify the corresponding *.lng localization file. This dialog is opened when you add or edit a language (see Environment Options | Localization).

Language Name

The name of the language that is displayed in the Select Program Language dialog and within the Available Languages list of the Environment Options | Localization section.

Language File

The *.lng file containing the translated string resources. See the %program_directory%\Languages folder to find already existing localization files.

Adding a language

The Add language dialog allows you to specify your own localization file and set the language name.

Editing a language

The Edit language dialog allows you to change the language name or select another localization file for the specified language.


Using templates

For your convenience the ability to use templates is provided by SQL Manager for DB2. A template is a named collection of wizard options stored in a file.

Instead of performing a long chain of routine steps all the time you can save all the options of the wizard for future use as a template file. Select the Templates | Save Template drop-down menu item, specify the template file name and set an optional comment for the template file.

Appendix - Using templates

When starting the wizard next time, you can load the template by selecting the Templates | Load Template drop-down menu item.

Note that saving/loading of templates is possible at any step of the wizard.


Supported file formats

RadioButton MS Excel

The most popular e-table format used by Microsoft® Excel (*.xls). The result files are fully compatible with Microsoft® Excel versions 97-2000, 2003 and XP.

RadioButton MS Access

File of Microsoft® Access format (*.mdb) with an ADO connection used.

RadioButton MS Word

One of the most popular text processing formats used by Microsoft® Word (*.doc). The result files are fully compatible with Microsoft® Word versions 97-2000, 2003 and XP.

RadioButton RTF

Rich Text Format (*.rtf) supported by many text processing programs (e.g. WordPad).

RadioButton HTML

Hyper Text Markup Language file format (*.html, *.htm), complete compatibility with HTML 4.0 specification.

RadioButton PDF

A standard format in electronic publishing (*.pdf).

RadioButton Text file

Plain text file format (*.txt).

RadioButton CSV file

Comma-Separated Value file format (*.csv).

RadioButton DIF file

Data Interchange File (*.dif) format.

RadioButton SYLK

Symbolic Links (*.slk) file format.

Note: all the text formats including Text file, CSV, DIF, SYLK are usually used as working or interchange formats.

RadioButton LaTeX

A specific file format (*.tex) which is a popular (especially among mathematicians and physicists) macroextension of TeX pack developed by D.Knut.

RadioButton XML

A markup language for documents containing structured information (*.xml).

RadioButton DBF

Database file format (*.dbf) used by dBASE and a number of xBASE applications.

RadioButton MS Excel 2007

The contemporary e-table format used by Microsoft® Excel 2007 (*.xlsx). The result files are fully compatible with Microsoft® Excel 2007.

RadioButton MS Word 2007

The contemporary text processing format used by Microsoft® Word 2007 (*.docx). The result files are fully compatible with Microsoft® Word 2007.

RadioButton ODF Spreadsheets

OASIS Open Document Format for Office Applications - open document file format for spreadsheets (*.ods) used by a number of applications including OpenOffice.org and KOffice.

RadioButton ODF text

OASIS Open Document Format for Office Applications - open document file format for word processing (*.odt) documents used by a number of applications including OpenOffice.org and KOffice.


To-Do List

The To-Do List window allows you to make up a list of tasks for the database.

To call this window, select the View | To-Do List main menu item, or use the Shift+Ctrl+T shortcut.

The task list is displayed in a form of a grid. Its columns (Action, Priority, User, Category) correspond to the task parameters. Click the column caption to sort the task list by the current parameter or change the sorting direction. Use the Navigation bar and context menu to add, edit, and delete to-do items.

Appendix - To-Do List

Database

Select the database to apply the task list to. When switching between the databases you can view different task lists.

To add a task to this list, click the Add Item link on the Navigation bar, or select Add Item from the context menu. You can also use the Ins key for the same purpose. Define the task parameters and click OK to add the new task to the list.

Appendix - To-Do List - Edit To-Do item

Text

Optional text to describe the task.

Priority

Set a numeric value to indicate the priority of the task.

User Name

The database User name this task is applied to.

Category

Set a category for the task. Using categories may be useful for grouping tasks.

To modify a task, select the task in the list and click the Edit Item link of the Navigation bar, or select Edit Item in the context menu. You can also use the Enter key for the same purpose.

To remove a task, select the task in the list and click the Delete Item link of the Navigation bar, or select Delete Item in the context menu. You can also use the Del key for the same purpose.

To remove all tasks from To-Do List, click the Delete all link of the Navigation bar, or select Delete all in the context menu. You can also use the Ctrl+Del shortcut for the same purpose.


Windows List

The Windows List panel allows you to browse the list of windows that are currently opened within SQL Manager for DB2 IDE.

To activate this panel as a DB Explorer tab, select the Windows | Window List main menu item, or use the Ctrl+Alt+0 shortcut.

Appendix - Window List

If necessary, you can right-click within the list area to call the popup menu which allows you to bring a window to foreground, close windows one by one or in groups, and to arrange the windows according to your preferences.


Customize toolbars and menus

For your convenience SQL Manager for DB2 provides toolbars and menus that you can customize, so the commands you use frequently are readily available and easily identifiable.

The Customize dialog allows you to create and personalize SQL Manager menus and toolbars.

To call this dialog, click More buttons... btnMoreButtons on the right side of any toolbar, then click Add or Remove Buttons and select Customize... from the drop-down menu. Alternatively, you can right-click any toolbar and select the Customize... popup menu item.

Toolbars

Toolbars

This list displays all currently existing toolbars of SQL Manager (both default and user-defined toolbars). Check/uncheck the box at a toolbar name to show/hide the toolbar.

New...

Use this button to add a new user-defined toolbar to the Toolbars list. Set a name for the newly created toolbar and dock it by dragging it to any permitted location within the application window.

Rename...

Use this button to rename the selected user-defined toolbar.

Delete

Use this button to delete the selected user-defined toolbar.

Appendix - Customize - Toolbars

Commands

This tab allows you to browse the list of all commands available within the menus and toolbars of the application window. Selecting categories in the Categories list displays commands of the selected category (e.g. 'Database' or 'Tools') in the Commands list.

If necessary, you can pick a command and drag it to any toolbar to create a button for this command.

Appendix - Customize - Commands

Options

Personalized Menus and Toolbars

CheckBox Menus show recently used commands first

This option determines whether the most frequently used items will be placed in menus at first position.

If this option is enabled, frequently used menu items are "promoted" and displayed higher on the list. Unused and infrequently used menu items are visually suppressed and appear "collapsed".

CheckBox Show full menus after a short delay

This option is available only if the Menus show recently used commands first option is selected.

If this option is enabled, infrequently used menu items (if they appear "collapsed") will be automatically expanded after a delay upon setting mouse cursor (or upon selection with the Up/Down keys) on the bottom of the menu. Otherwise, the menu expands only after clicking its bottom-most button (or using the Ctrl+Down shortcut).

Reset my usage data

Resets the lists of recently used commands in the toolbars and menus.

Appendix - Customize - Options

Other

CheckBox Large icons

This option displays larger icons on the parent window toolbars.

CheckBox Show ToolTips on toolbars

If this option is selected, ToolTips (hints) popup when the mouse cursor is positioned over a toolbar button.

CheckBox Show shortcut keys in ToolTips

If this option is selected, the corresponding shortcuts are displayed in ToolTips (hints) for toolbar buttons.

Menu animations

Use the drop-down list to specify the menu animation effects:

None (no animation)

Random (random choice: Unfold, Slide, Fade)

Unfold (unfolding menus)

Slide (sliding menus)

Fade (menus fade in when appearing)


SSH tunneling options

SSH (Secure Shell Host) protocol is used to heighten computer security when working with Unix systems on the Internet. SSH uses several encryption algorithms of different reliability. The spread of SSH is also related to the fact that a number of *nix operating systems (e.g. FreeBSD) include SSH server in their standard distributions. To learn more about SSH, please visit http://openssh.org.

The SSH tunneling feature of SQL Manager is a means of ensuring secure connection to DB2 servers when working over insecure connection channels. You can also use SSH tunnel to get access to the remote DB2 servers when port 3306 is closed for external connections for some reasons.

The connection via SSH tunnel works in the following way.

First, a connection is established and the process of authentication between SSH client built in SQL Manager and remote DB2 server is performed. Then all incoming and outgoing information between the application and DB2 is transmitted through SSH server with the help of a communication port (regularly port 22), and SSH server transfers this information directly to DB2 server.

To setup the connection via SSH tunnel, input the following values in the corresponding fields:

  • SSH host name is the name of the host where SSH server is running
  • SSH port indicates the port where SSH server is activated
  • SSH user name stands for the user on the machine where SSH server is running (Note: it is a Linux/Windows user, not a user of DB2 server)
  • SSH password is the Linux/Windows user password

Please note that DB2 host name should be set relatively to the SSH server in this case. For example, if both DB2 and SSH servers are located on the same computer, you should specify localhost as host name instead of the server external host name or IP address.

Appendix - SSH tunneling options

CheckBox Use Private Key for authentication

If the SSH encryption is enabled on the SSH server, a user can generate a pair of cryptographic keys (the Private key and the Public key). The Public key is placed on the SSH server, and the Private key is the part you keep secret inside a secure box that can only be opened with the correct passphrase (or an empty string as the passphrase). When you wish to access the remote system, you open the secure box with your passphrase (if any), and use the private key to authenticate yourself with the Public key on the remote Linux computer.

SSH Key file

Specify the location (the secure box) of the Private key file on your local machine.

Supported Private Key file formats are:

OpenSSH

Putty

SSH.com

Note that you need to trust your local machine not to scrape your passphrase or a copy of your Private key file while it is out of its secure box.

SSH Private Key - Passphrase


Connection Lost dialog

When DB2 server connection loss is detected by SQL Manager, the Connection Lost dialog is displayed. You can choose one of available options in this case:

Appendix - Connection Lost

RadioButton Close database

The application closes the database, and its objects are no more displayed in DB Explorer and child windows.

RadioButton Try to reconnect

The application tries to reconnect to the server.


SQL Manager Direct

SQL Manager Direct is a feature of SQL Manager for DB2 which provides you with quick access to the related Internet resources and allows you to keep your SQL Manager version up-to-date.

To open the SQL Manager Direct window, select the Help | SQL Manager Direct item from the main menu.

Links to sqlmanager.net resources provided by the SQL Manager Direct window are grouped into several sections:

  • SQL Manager for DB2 News
  • General Information
  • Downloads
  • Related Products

Upon a link selection you will be immediately forwarded to the corresponding resource.

SQL Manager for DB2 News

This section takes you directly to the latest EMS news column. Using the links you can get up-to-date news, product information and downloads from sqlmanager.net.

General Information

This section offers a number of links to product news, features, Feature Matrix, system requirements, testimonials and much more.

Downloads

Using links of this section you can download other product versions from the download page.

Related Products

This section allows you to browse the list of related products developed by EMS Database Management Solutions, Inc.

Appendix - SQL Manager Direct

Use the btnBack btnForward buttons to navigate in the same way as you normally do it using a web browser.

Click the Update button to refresh the page.

s

CheckBox Automatically poll network in interval (in days)

If this option is selected, the page is refreshed automatically after the specified time interval. Use the spinner control to set the interval (in days).

In the Status area at the bottom of the SQL Manager Direct window you can find the status of your request to the sqlmanager.net website.


Database Login dialog

The Database Login dialog appears on attempt to connect to a database if the Login prompt before connection option is enabled on the Options page of the Database Registration Info dialog.

Appendix - Database Login

Note: If SSH tunneling is used for the database connection, SSH authorization must be passed first.

Specify user name and password and click OK to start working with the database.


Overwriting existing output file

If a file having the same name as specified for an output file generated by SQL Manager already exists, a warning dialog is displayed.

Appendix - Overwrite File Warning dialog

You can Overwrite the file, Make it Unique, or Cancel both and change the path or file name manually.

The application makes the file unique by adding the current timestamp to the specified file name if the CheckBox Add Timestamp to filename option is enabled, or by adding a simple numeric postfix to the file name if this option is disabled.


Script conversion

The Script conversion dialog allows you to select encoding to be used for script conversion upon loading script to one of SQL Manager editors (SQL Editor, SQL Script Editor) from an external file.

Appendix - Script conversion

RadioButton Windows default

Specifies that the standard Windows encoding will be used for the script conversion.

RadioButton Database default

Specifies that the default encoding of the database will be used for the script conversion.

RadioButton Other encoding

Allows you to select the encoding that will be used for the script conversion.

Preview

This area displays the script with the current encoding parameters applied.


Label-Based Access Control

Label-Based Access Control (LBAC) greatly increases the control you have over those who can access your data. LBAC lets you decide exactly who has WRITE access and who has READ access to individual rows and individual columns.

The LBAC capability is highly configurable and can be tailored to match your particular security environment. All LBAC configuration is performed by a security administrator, which is a user that has been granted the SECADM authority by the system administrator.

A security administrator configures the LBAC system by creating security label components. A security label component is a database object that represents a criterion you want to use to determine if a user should access a piece of data. For example, the criterion can be whether the user is in a certain department, or whether they are working on a certain project. A security policy describes the criteria that will be used to decide who has access to what data. A security policy contains one or more security label components. Only one security policy can be used to protect any one table, but different tables can be protected by different security policies.

After creating a security policy, a security administrator creates objects, called security labels that are part of that policy. Security labels contain security label components. Exactly what makes up a security label is determined by the security policy and can be configured to represent the criteria that your organization uses to decide who should have access to particular data items.

If you decide, for instance, that you want to look at a person's position in the company and what projects they are part of to decide what data they should see, then you can configure your security labels so that each label can include that information. LBAC is flexible enough to let you set up anything from very complicated criteria, to a very simple system where each label represents either a "high" or a "low" level of trust.


Select Object dialog

The Select Object dialog appears each time the application requests a database object selection, e.g. upon a root object selection for the Dependency Tree tool, or when choosing an object to be added to a project, or when choosing an object to compare its versions.

Appendix - Select Object

First select the object type in the list on the left-hand side of the window. Use the Schema drop-down list at the top to select the schema, pick the object you need and click OK the apply your selection.


SQL Manager shortcuts

You can change shortcuts to your liking within the Global Shortcuts tab of the Environment options dialog.

Database management:

Shift+Ctrl+R | Register a DB2 node using Register Node Wizard
Shift+Alt+R | Register a database using Register Database Wizard
Shift+Alt+U | Unregister the selected database
Shift+Ctrl+C | Connect to a database
Shift+Ctrl+D | Disconnect from a database

Database objects management:

Ctrl+N | Create a new object (the object type depends on the current selection)
Ctrl+O | Edit the selected object in its editor
Ctrl+R | Rename the selected object
Shift+Del | Drop the selected object
Ctrl+Shift+C | Collapse the current DB Explorer tree branch and switch selection to the parent tree node

SQL Manager tools:

F11 | View/hide Database Explorer
Ctrl+F | Search for an item in the DB Explorer tree
Shift+Ctrl+T | Open the To-Do List window
F12 | Show SQL Editor
Shift+F12 | Open a new instance of SQL Editor
Shift+Ctrl+M | Open SQL Monitor
Shift+Ctrl+S | Open SQL Script Editor
Shift+Ctrl+L | Open Localization Editor
Ins | Add a new table subobject (the subobject type depends on the current tab selection)
Ctrl+I | Start incremental search

SQL Editor and SQL Script (fixed and default):

F9 | Execute query/script
Alt+F9 | Execute selected only
Ctrl+Alt+F9 | Execute under cursor
Ctrl+Alt+F2 | Reset execution point (SQL Editor only)
Shift+Ctrl+<digit> | Toggle bookmark #<digit>
Ctrl+<digit> | Go to bookmark #<digit>
Ctrl+Q,N | Go to next bookmark
Ctrl+Q,P | Go to previous bookmark
F2 | Drop marker to current position
Esc | Collect marker (jump back)
Shift+Esc | Swap marker to current position
Ctrl+Z; Alt+BkSp | Undo
Shift+Ctrl+Z; Shift+Alt+BkSp | Redo
Ctrl+F | Search for text using the Find Text dialog
Ctrl+R | Replace text using the Replace Text dialog
F3 | Search next
Ctrl+I | Start incremental search
Alt+G | Go to line number (an input number dialog prompts for the number)
Ctrl+L | Load a script from an external file
Ctrl+S | Load the script to an external file
Shift+Ctrl+F | Format the SQL text using SQL Formatter
Alt+<symbol> | Switch to the query with <&symbol> in its name (SQL Editor only)
Ctrl+J | Insert a keyboard template
Сtrl+D | Toggle query results display mode (at the Edit tab or at a separate one)
Ctrl+Alt+Left | Switch to the next tab of SQL Editor
Ctrl+Alt+Right | Switch to the previous tab of SQL Editor
Ctrl+Alt+PgUp | Switch to the last tab of SQL Editor
Ctrl+Alt+PgDown | Switch to the first tab of SQL Editor
Ctrl+Q,S | Move cursor to beginning of line
Ctrl+Q,D | Move cursor to end of line
Ctrl+Q,R | Move cursor to absolute beginning
Ctrl+Q,C | Move cursor to absolute end
Ctrl+O,N | Normal selection mode
Ctrl+O,L | Line selection mode
Ctrl+O,C | Column selection mode
Shift+Ctrl+Left | Select the previous word
Shift+Ctrl+Right | Select the next word
Shift+Home | Select text to the beginning of the line
Shift+End | Select text to the end of the line
Shift+PageUp | Select one page up
Shift+PageDown | Select one page down
Shift+Ctrl+PageUp | Select text to the first line on the page
Shift+Ctrl+PageDown | Select text to the last line on the page
Shift+Ctrl+Home | Select text to the absolute beginning
Shift+Ctrl+End | Select text to the absolute end
Shift+Alt+Left | Select column symbol-by-symbol to the left
Shift+Alt+Right | Select column symbol-by-symbol to the right
Shift+Alt+Up | Select column upwards
Shift+Alt+Down | Select column downwards
Shift+Ctrl+Alt+Left | Select column word-by-word to the left
Shift+Ctrl+Alt+Right | Select column word-by-word to the right
Shift+Alt+Home | Select column to the beginning of line
Shift+Alt+End | Select column to the end of line
Shift+Alt+PageUp | Select column to the beginning of the page
Shift+Alt+PageDown | Select column to the end of the page
Shift+Ctrl+Alt+Home | Select column from the current cursor position to the beginning of the first line
Shift+Ctrl+Alt+End | Select column from the current cursor position to the beginning of the last line
Ctrl+Up | Scroll up one line with cursor position unchanged
Ctrl+Down | Scroll down one line with cursor position unchanged
Alt+Down, Alt+Up | Toggle case of a current word
Ctrl+Alt+Up | Toggle case to upper of a current selection or char
Ctrl+Alt+Down | Toggle case to lower of a current selection or char
Ctrl+G+T | Toggle folding
Ctrl+G,Ctrl+C | Collapse/Expand block at current line
Ctrl+G,Ctrl+F | Collapse block at current line
Ctrl+G,Ctrl+E | Expand block at current line
Ctrl+G,Ctrl+M | Collapse all blocks in the text
Ctrl+G,Ctrl+P | Expand all blocks in the text
Ctrl+= | Collapse/expand the nearest block
Shift+Ctrl+B | Jump to matching bracket (change range side)
Shift+Ctrl+I | Indent selected block
Shift+Ctrl+U; Shift+Tab | Unindent selected block
Ctrl+/ | Comment/uncomment selected block
Ctrl+Space | Show code completion
Ctrl+Alt+Space | Show character map
Shift+Ctrl+Space | Show code parameters
Ctrl+C; Ctrl+Ins | Copy selection to Clipboard
Ctrl+X; Shift+Del | Cut selection to Clipboard
Ctrl+V; Shift+Ins | Paste Clipboard to current position
Ctrl+T | Delete from cursor to the next word
Ctrl+BkSp | Delete from cursor to the end of the previous word
Ctrl+B | Delete from cursor to the beginning of the line
Shift+Ctrl+Y | Delete from cursor to the end of the line
Ctrl+Y | Delete the current line
Ctrl+M; Enter; Shift+Enter | Break line at current position, move caret to a new line
Ctrl+Alt+I | Insert Tab char
Shift+Ctrl+R | Start macro recording
Shift+Ctrl+P | Play macro
Alt+End | Skip misprint
Ctrl+Alt+End | Skip all misprints
Alt+Home | Correct all misprints
Shift+Ctrl+Q | Save text as Favorite

Print Data View:

Ctrl+O | Load a printing report from a file
Ctrl+S | Save the report to file
Ctrl+P | Open the Print dialog
Ctrl+Home | Go to the first page
Ctrl+Up | Go to the previous page
Ctrl+Down | Go to the next page
Ctrl+End | Go to the last page
Ctrl+D | Open Report Formatter
Ctrl+\ | Zoom 100%
Ctrl+0 | Zoom page width
Ctrl+1 | Whole page
Ctrl+2 | Two pages
Ctrl+4 | Four pages
Ctrl+W | Widen to source width
Ctrl+M | Show/hide margins
Ctrl+K | Set background color for the report

Working with windows, menus and tabs:

Ctrl+Tab | Switch to the next tab
Ctrl+Alt-0 | Open Windows List
Ctrl+Alt+D | Set defaults to all windows
Ctrl+F6 | Switch to the previous window
F6 | Switch to the next window
Ctrl+W | Close the active window
Ctrl+Down | Expand a collapsed menu


SQL Manager for DB2
  • Index

Fields

Enter topic text here.