Welcome to dbForge Studio for MySQL

Thank you for choosing dbForge Studio for MySQL!

dbForge Studio for MySQL Overview

dbForge Studio is a powerful and comprehensive MySQL GUI tool that provides a complete set of instruments for server management and administration. It offers tools for database development, administration tools, and SQL query tools. Combination of the very best features of existing MySQL front ends and MySQL GUI tools makes dbForge Studio the perfect choice for a database developer and administrator as well as for a novice user.

Where to start

To start using dbForge Studio for MySQL, see Getting Started section. The guide helps you get started quickly by describing how to setup a new database connection, and provides an explanation of the key steps for basic database operations.

See Also

Getting Started

© 2004-2018 Devart


What's New in dbForge Studio for MySQL, v8.0
· Full support for MySQL v.8.0
· Connectivity support for MariaDB v10.3
· Connectivity support for Tencent Cloud
· Keyword navigation

See Also

Welcome to dbForge Studio for MySQL

Editions


Editions

dbForge Studio for MySQL has four editions: Express, Standard, Professional and Enterprise.

Enterprise is a supreme edition of the tool that extends the features of the Professional edition with the Data Generator, Copy Database, and Documenter functionality.

Professional is a full-featured software that facilitates your database management with the following functionality: database projects; accurate comparison and synchronization of database structures (schema comparison) or database content (data comparison); debugging stored procedures, functions, triggers, and scripts; complex queries creating; intelligent SQL Coding with code suggestion feature, etc.

Standard includes all must-have tools for database administrators and developers, such as a MySQL stored routine debugger, Query Builder, code snippets, object search, Data Export and Data Import wizards, etc.

Express is a free software that provides basic functionality for working with schema objects, user accounts, SQL scripts, maintenance wizard, and queries.

The matrix below compares features of the dbForge Studio editions.

Features | Enterprise | Professional | Standard | Express
SQL Development
MySQL stored procedure debugger |  |  |  |
Query Profiler |  |  |  |
Context-sensitive code completion |  |  |  |
Phrase completion |  |  |  |
Quick information about schema objects |  |  |  |
Parameter information for stored routines |  |  |  |
SQL code formatting |  |  |  |
Formatting code through the command line |  |  |  |
Support for SQL refactoring |  |  |  |
Automatic SQL syntax check |  |  |  |
One step access to a schema object editor from code (go to definition) |  |  |  |
Visual Query Builder with support of SELECT statement |  |  |  |
Visual Query Builder with support of INSERT, UPDATE, and DELETE statements |  |  |  |
Visual Query Builder with support of sub-queries |  |  |  |
Quick INSERT statements generation from data grid without opening wizard |  |  |  |
SQL editor with syntax highlighting, bookmarks, and text searching |  |  |  |
Execution of scripts, selected SQL fragments, and statements |  |  |  |
Code Snippets |  |  |  |
Customizable DDL generation wizard |  |  |  |
Execution plan tool |  |  |  |
Executed Queries History |  |  |  |
Database Design
Database Designer |  |  |  |
Database refactoring |  |  |  |
Schema comparison and synchronization tool |  |  |  |
Support of command-line interface for schema comparison and synchronization |  |  |  |
Dependencies lister |  |  |  |
Database project framework |  |  |  |
Schema object searching on a live database |  |  |  |
Visual routine editor |  |  |  |
Flat table editor with heuristics support |  |  |  |
Partitioning support for table editor |  |  |  |
Object Viewer window for quick browsing of schema object properties |  |  |  |
CRUD generation |  |  |  |
Administration
Security Manager to administer user accounts and privileges |  |  |  |
Session manager |  |  |  |
Server Variables window |  |  |  |
Service control for starting and stopping MySQL servers |  |  |  |
Table maintenance wizard and flush dialog |  |  |  |
Data Pump
Database backup and restore wizards |  |  |  |
Support of command-line interface for database backup and restore |  |  |  |
Data comparison and synchronization tool |  |  |  |
Support of command-line interface for data comparison and synchronization |  |  |  |
Data Import from 9+ file formats |  |  |  |
Data Export to 13+ file formats |  |  |  |
Support of command-line interface for data import/export |  |  |  |
Data Generator with 200+ predefined meaningful data generators |  |  |  |
Copy Databases |  |  |  |
Data Analysis
Pivot tables |  |  |  |
Data reports |  |  |  |
Master-Detail Browser |  |  |  |
Creating data reports through command line |  |  |  |
Data searching on a live database |  |  |  |
Enhanced visual data editor |  |  |  |
Automated data report delivery |  |  |  |
Generation of Database Documentation in HTML, PDF, Markdown file formats |  |  |  |
General
Support of Sphinx and Percona |  |  |  |
Support of MySQL 5.5, 5.6, 5.7 |  |  |  |
Support of MariaDB |  |  |  |
Support of SSL/SSH/HTTP connections |  |  |  |
MySQL pluggable authentication and Windows authentication on connecting to MySQL server |  |  |  |
Working with MySQL on Amazon RDS and Amazon Aurora |  |  |  |
Working with Alibaba Cloud |  |  |  |
Working with Galera Cluster |  |  |  |
Working with Google Cloud |  |  |  |
Working with Azure for MySQL |  |  |  |
Work with MySQL embedded server |  |  |  |
Multiple database connections in Database Explorer window |  |  |  |
Dynamic help on MySQL accessible from the editor |  |  |  |
Connections coloring |  |  |  |
Full shortcut customization |  |  |  |
Rich user settings |  |  |  |
Wizards for exporting/importing user settings |  |  |  |

1 Context-sensitive object suggestions for SELECT, INSERT, UPDATE, DELETE, and CALL statements.

2 SQL code formatting is available only for SELECT and DML statements..

3 The number of tables in query is limited to 3.

4 The number of schema objects on a diagram is limited to 10.

5 It does not support backup projects, auto-deletion of old backup files, compression, and creating backup files larger than 1MB.

6 CSV format has no restrictions for data export and import, for other formats only first 50 rows are processed. User templates are not supported.

7 You can connect to Sphinx and work with SQL documents only. Code completion is not supported.

8 The history is saved for the last 3 days only.

See Also

Welcome to dbForge Studio for MySQL

Requirements


Requirements

dbForge Studio for MySQL requires the following:

· .NET Framework 4.5.2 or higher installed
You can download .NET Framework here.

Note

.NET Framework is pre-installed in Microsoft Windows 7, Windows 8, Windows 8.1 and Windows 10.
· 2 GHz or higher processor
· 1024 MB RAM
· 150 MB of free hard disk space
· Microsoft Windows XP,7,8, 8.1,10, Windows Server 2008,2012

MySQL and MariaDB Connectivity:

· Support for all MySQL server versions 3.23-8.0
· Support for all MariaDB server versions 5.5-10.3
· Secure connections via SSL/SSH
· HTTP connections via PHP tunnel
· Support for UTF-8 databases
· Work with MySQL embedded server
· Direct access to MySQL server without client libraries
· MySQL pluggable authentication and Windows authentication on connecting to MySQL server (PAM)
· Support for Windows authentication when creating connection to MySQL server
· Working with MySQL on Amazon RDS and on Amazon Aurora
· Percona PAM Authentication for MySQL
· Sphinx Search Engine
· Galera Cluster
· Google Cloud Platform
· Alibaba Cloud
· Azure MySQL

See Also

Welcome to dbForge Studio for MySQL

Copyright Information


Copyright Information

Information in this document, including URL and other Internet Web site references, is subject to change without notice. Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, e-mail address, logo, person, place or event is intended or should be inferred. Complying with all applicable copyright laws is the responsibility of the user.

Devart may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Devart, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.

Copyright 2004-2018 Devart. All rights reserved.

Microsoft, Visual Studio, and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

The names of actual companies and products mentioned herein may be the trademarks of their respective owners.

See Also

Welcome to dbForge Studio for MySQL

Previous Releases


Previous Releases

In This Section

What's New in dbForge Studio for MySQL, v7.4

What's New in dbForge Studio for MySQL, v7.3

What's New in dbForge Studio for MySQL, v7.2

What's New in dbForge Studio for MySQL, v7.1

What's New in dbForge Studio for MySQL, v7.0

What's New in dbForge Studio for MySQL, v6.3

What's New in dbForge Studio for MySQL, v6.2

What's New in dbForge Studio for MySQL, v6.1

What's New in dbForge Studio for MySQL, v6.0

What's New in dbForge Studio for MySQL, v5.0

What's New in dbForge Studio for MySQL, v4.5

What's New in dbForge Studio for MySQL, v3.6

What's New in dbForge Studio for MySQL, v3.5

What's New in dbForge Studio for MySQL, v3.1

What's New in dbForge Studio for MySQL, v3.0

What's New in MyDeveloper Studio, v2.1

What's New in MyDeveloper Studio, v2.0

What's New in MyDeveloper Studio, v1.51

What's New in MyDeveloper Studio, v1.5

See Also

Welcome to dbForge Studio for MySQL

Getting Started


What's New in dbForge Studio for MySQL, v7.4

SQL Document

· New Transaction Reminder implemented
· New Execution notifications implemented
· Color effect of the current line

Code Completion

· Code folding for EGIN ... END for IF
· Prompting Percona Server variables (CL, QI and Parameter Info)
· Prompting MySQL Server variables
· Prompting variables forВ MariaDB Server
· Prompting Optimizer Hints
· Prompting Geographic Functions
· Prompting Extended JSON Functions
· Prompting values forВ TABLE_TYPE
· Prompting Multiple-Clustering-Indexes for TokuDB Engine
· Prompting Cast(... AS JSON)
· Prompting CHANGE MASTER TO
· Prompting CHANGE REPLICATION FILTER
· Prompting ALTER INSTANCE
· PromptingВ CONNECT Zipped File Tables
· Prompting ALTER USER CURRENT_USER
· Prompting SHOW CREATE USER
· Prompting RESET MASTER
· Prompting CREATE [OR REPLACE] ... [IF NOT EXISTS]
· Prompting Spatial Reference systems
· Prompting Compound Statements Outside Of Stored Programs
· Prompting SET DEFAULT ROLE ... FOR
· Prompting VIR virtual table type for CONNECT engine
· Prompting SET ROLE
· Prompting CONNECT engine supports
· Prompting SPIDER ENGINE
· Prompting START TRANSACTION
· Prompting RELEASE_ALL_LOCKS() Рё ANY_VALUE()
· Prompting CREATE TABLE
· Prompting Ngram and mecab Full-Text Parser

Query Builder

· New aggregates functions added
· Design of WHERE clause improved

Data Viewer

· Spatial Viewer improved
· Data Types in the Data Editor column headers corrected

Data Export and Import

· Export to Google Sheets and Import from Google Sheets implemented
· Data Export to SQL with Bulk option added

Schema Compare

· New Schema Comparison and Synchronization Engine implemented
· Formatting of object DDLs in the Diff view the Schema Comparison document implemented
· New Schema Comparison Options added:
· Associate column names having similar name options
· Ignore case in objects names
· Ignore spaces in objects names
· Disable dependency analysis
· Ignore collations
· Ignore datatypes in column
· Ignore permissions
· Ignore Triggers
· Ignore firing order for triggers
· Ignore check constraints
· Ignore column order in indexes
· Ignore constraints' names
· Ignore foreign keys actions ON UPDATE and ON DELETE
· Ignore indexes
· Ignore fulltext Indexes
· Ignore spatial Indexes
· Ignore indexes' names
· Ignore primary keys
· Ignore triggers present only in Target
· Ignore indexes present only in Target
· Ignore comments
· Ignore column default values
· Ignore NOT NULL constraints
· Ignore COMMENT objects
· Always Exclude newly added objects
· Ignore Partitions
· Schema Synchronization Wizard redesigned
· New Schema Synchronization Options added:
· Include USE database name
· Use DROP and CREATE instead of ALTER for tables
· Use DROP and CREATE instead of ALTER for views, procedures, functions
· Exclude comments
· Check For Object Existence
· New comparison and synchronization progress improved

Data Comparison

· New Data Comparison Options added:
· Column synchronization without comparison
· Data Tolerance сomparison
· New Data Synchronization Options added:
· Include USE database name
· Check for the concurrency updates
· Disable check constraints
· New comparison and synchronization progress improved

Data Generator

· New Data Population Options added:
· Include USE database name
· Disable check constraints

Copy Databases

· Finished Copying Notification implemented
· Command-Line Interface implemented

Other Improvements

· Product Update Manager improved
· Digital signature for the installation file.
· Support for SHA256 Authentication when connecting to MySQL

See Also

What's New in dbForge Studio for MySQL, v7.3

Previous Releases


What's New in dbForge Studio for MySQL, v7.3

Enterprise Edition

The new Enterprise edition of the tool includes the following exclusive features:

· Data Generator allows generating test data and instantly populating your database with it.
· Database Documenter is a tool for generation of database documentation in HTML, PDF, and Markdown file formats.
· With Copy Database, you can copy a set of databases by generating and running a script.

Connectivity

· Support for MariaDB 10.1.
· Support for MariaDB 10.2.
· Support for MariaDB Galera Cluster 10.0 Series.
· Support for Google Cloud Platform.
· Support for Alibaba Cloud.
· Support for Azure MySQL.
· Display of server version when testing a connection.

Support for New Table Engines

· Support for TokuDB.
· Support for NDBCLUSTER.
· Support for RocksDB.

Data Export/Import

· Support for JSON data.
· Redesigned XML data import/export.
· Preview of the generated UPDATE script in the Data Import wizard.
· Detection of column type when importing data from the Excel format.

SQL Document

· CTRL+W shortcut for closing current tab.
· Opening new tabs next to current one
· CTRL+N shortcut for opening new SQL window with inherited server and database of the current window.
· Display the connection coloring in the status bar.
· Now each document creates its own connection.
· The Close All Unmodified Tabs command.
· Format Document (CTRL+K+D) command in the shortcut menu of SQL document.
· Closing of connection to MySQL Server when it is not being used.
· Query navigation.
· Improved query text parsing.
· Redesigned query execution history.

Data Viewer and Editor

· Data Viewer and Editor features a new Geometry view, that helps visualizing spatial geometry data.

Data Comparison

· Support for data conversions.
· Sorting in the result grid by the header.

Database Backup and Data Export

· Database Backup Wizard and Data Export Wizard allow encrypting data with AES256.

Other Improvements

· Trial product activation.
· Greatly improved visual style of the application with high DPI support.
· Support for PowerShell.
· Specific exit codes are added.
· Compliance with the Federal Information Processing Standard (FIPS).
· Redesigned Generate Script As option.
· CRUD generation.
· Optional exclusion of databases from the completion list.

See Also

What's New in dbForge Studio for MySQL, v7.2

Previous Releases


What's New in dbForge Studio for MySQL, v7.2

Database Design

· Visual Object Editors have been totally redesigned.

Database Search

· The Database Search tool has been completely redesigned for optimal search of both, objects and data.

Administration

· Redesigned Table Maintenance wizard.

Connectivity

· Connection through Named Pipe implemented.

SQL Development

· Improved SQL document parser performance.

Data Editor and Viewer Window

· Improved XML View
· New JSON View

Other improvements

· Styled icons are used by default.

See Also

What's New in dbForge Studio for MySQL, v7.1

What's New in dbForge Studio for MySQL, v7.1


What's New in dbForge Studio for MySQL, v7.1

Data Types in Data Grid

Data type information is available in the column header. The feature adds an additional convenience while analyzing retrieved data.

Generate Script AS for Multiple Objects

Now you can simultaneously select several objects in the Database Explorer to apply the Generate Script As option.

Generate Script AS in Data Grid

You can select multiple records in the result dataset (Datagrid) and apply the Generate Script As option for them.

See Also

What's New in dbForge Studio for MySQL, v7.0

Previous Releases


What's New in dbForge Studio for MySQL, v7.0
· Support for MySQL 5.7
o Support for the PASSWORD EXPIRE option in Security Manager
o Support for computed columns
o Support for the JSON Data Type
o Support for Spatial Indexes
· Support for Percona PAM authentication
· Support for the Amazon Aurora connection
· Improved code refactoring

See Also

What's New in dbForge Studio for MySQL, v6.3

Previous Releases


What's New in dbForge Studio for MySQL, v6.3

SQL Editing and Execution

· Command-line interface for SQL formatting
· Query execution pane
· Option to change a snippets folder location
· Phrase completion
· Extended support of MySQL 5.7 in Code Completion
· Option to set files encoding within the /execute command-line operation

Database Explorer

· Alternative ways to create a new object
· Sending objects to a database diagram
· Displaying the objects number

Schema Comparison and Sync

· Selecting object types for comparison

Data Comparison and Sync

· Option to ignore differences in characters that signify the end of line
· Show white spaces option
· Ignore computed columns option
· Setting up the limit size of bulk during synchronization

Data Export and Import

· Export to the Excel 2007 (XLSX) format
· Retaining records filtering when the Export Selected Rows Only option is selected
· Export of BLOB fields as TEXT to Excel, TXT, HTML, PDF, RTF, and CSV formats
· Export to Excel, RTF, PDF with/without a header
· Force quotes option when exporting data to a CSV file
· Option to select encoding when exporting to DBF
· Import of dynamic values from Excel and Excel 2007
· Detecting column types when importing data from the CSV format

Data Report

· Support of report parameters in the command-line interface

Data Editor

· Easy way to hide data results
· Data Viewer and LOB Editor are combined in a single control
· Redirect Data to Output is transformed into additional data editor

Database Restore

· Option to set files encoding within the /restore command-line operation

GUI

· Support of multiple monitors
· Modeless Data Report Wizard windows

Other Features and Improvements

· Enhanced Find and Replace window

See Also

What's New in dbForge Studio for MySQL, v6.2

Previous Releases


What's New in dbForge Studio for MySQL, v6.2

GUI

· Switching tabs by the CTRL+ALT+PAGE UP and CTRL+ALT+PAGE DOWN key combinations
· Windows connection coloring is added
· Restoring document tabs from the last session is possible now
· Updated Database Explorer
· Switching between wizard window and primary window is possible now
· New UI themes
· Updated Start Page
· Updated design

Object Editors

· Viewing script while editing columns, indexes etc.
· Sphinx search engine is supported

Code completion

· Alias refactoring is supported
· Quick Info for cursors is available
· Code Completion in Event Editor and Trigger Editor
· Detect changes on a server before refreshing suggestion cache

See Also

What's New in dbForge Studio for MySQL, v6.1

Previous Releases


What's New in dbForge Studio for MySQL, v6.1

Database connectivity support

· MySQL 5.6
· MySQL 5.7
· MariaDB 5.5
· MariaDB 10.0

MariaDB Virtual Columns are supported in:

· Data Export/Import wizards
· Data/Schema Comparison tools

Maria DB new features

· SELECT (LIMIT ROWS EXAMINED) extended syntax
· INSTALL SONAME new statement
· SHOW EXPLAIN syntax
· Multi-source replication syntax
· Dynamic Columns syntax for DML statements
· New KILL syntax
· Expanded CREATE TABLE or ALTER TABLE syntax
· New SHOW options are supported
· Aria ENGINE
· Virtual columns

New MySQL 5.6 new features

· New ALTER TABLE ... EXCHANGE PARTITION syntax constructions are supported
· Microseconds in the TIME, DATETIME and TIMESTAMP data types are supported
· New SELECT with partitioning syntax constructions are supported

MySQL 5.7 new features

· New PRECEDES (CREATE TRIGGER) syntax constructions are supported
· New spacial data types (DATA_GEOMETY) are supported
· New GET DIAGNOSTIC syntax constructions are supported
· New ALTER TABLE ALGORITHM=INPLACE syntax constructions are supported
· New ALTER TABLE RENAME INDEX syntax constructions are supported

Microseconds support for TIME, DATETIME and TIMESTAMP data types

· Data Editor
· Data Export/Import wizards
· Data Comparison tool

Pluggable authentication is supported

The product provides the extended support of pluggable authentication modules for MySQL servers.

Minor features and improvements

· The application start time is decreased
· Performance when worked with UI is improved
· Federated and Aria engines are supported
· All new clauses and statements are supported in Syntax Check
· The FOLLOWS and PRECEDES clauses are supported in the Trigger editor
· The ability to redo changes after undo in the table editor is added
· Microsoft Windows 8.1 is supported

See Also

What's New in dbForge Studio for MySQL, v6.0

Previous Releases


What's New in dbForge Studio for MySQL, v6.0

Database refactoring

This feature allows renaming objects in a database and automatically updates links to these objects in the whole database.

· Preview of changes in the database with possibility to cancel them selectively is supported
· Possibility to generate refactoring script of a database without changing it is supported
· Refactoring feature can be accessed from Database Explorer and object editors
· Possibility to rename several columns from object editor
· If an error in processing dependencies is encountered, a user can fix it manually

Query builder with support of DML statements and usability improvements

· Visual building of INSERT, UPDATE, and DELETE statements is supported
· Conversion of SELECT queries into INSERT statements is supported
· One-click conversion of SELECT query into UPDATE or DELETE with saving of WHERE condition is supported
· Execution of separate subqueries to check their correctness without leaving diagram interface
· Usability of visual expression editor is improved
· Query type is indicated on the diagram surface

Data export to SQL statements

· Data export to INSERT, UPDATE, and MERGE statements is supported
· Ability to export query results as well as data directly from a table is supported
· Quick generation of INSERT statements from data grid without opening wizard is supported

Improved database object editors

· Editable column grid in the table editor now allows adding and editing columns without opening the pop-up dialog
· Full-text search in the column grid in the table editor is added
· Schema changes can now be viewed before updating database
· Editor layout was revised, and now it allows viewing designer and table SQL simultaneously
· F7 shortcut can now be used to toggle all editor views
· Stored procedure editor Design tab is redesigned
· Heuristics is supported: data type of the new column is suggested basing on the column name. For example, for Customer_ID column Integer data type will be suggested

New features in the data comparison tool

· New data comparison reports now contain table data (not just a summary)
· Comparison of custom query results (along with tables and views) is added
· "One-to-many" objects mapping when addressing columns that were separated as a table in the target database is added
· Possibility to include objects into comparison by mask, which is useful when comparing groups of tables is implemented
· Options on the data comparison document bottom toolbar are extended. The navigation, search, visible columns, and hide unmodified columns options are added
· Analysis of comparison results is improved: 'Hide unmodified columns' option, per-column difference counters are added

Improved code completion

· Column picker feature allows selecting multiple column suggestions from drop-down list
· Asterisk expansion in SELECT statements is added
· Context-specific suggestions is improved
· Quick object information is improved
· JOIN clause autogeneration is added
· Autogeneration of table aliases is added
· Sorting suggested keywords by relevance is added
· Highlighting occurrences of an identifier in SQL document is added
· Performance of describing objects' metadata is improved

Automated data report delivery

This feature enables users to set an automatic data report generation and delivery to the requested destination.

Setup of report's generation and delivery can be executed through the command line, providing an opportunity to use Windows scheduler for regular report generation:

· Users can choose the format for report generation
· Users can choose "Report delivery" method: e-mail, ftp, shared folder

Code Snippets Manager

Code Templates feature is now renamed to Code Snippets and extended with the Snippets Manager window for adding and editing SQL templates.

Improved code formatter

· Format profiles are supported
· Formatting options are extended
· Preview window for viewing formatted code with support of code highlighting and editing is added
· Search of options by name is added

New window docking system

· Switching between tool windows on CTRL+TAB is supported

Minor features

· When multiple SELECT statements are executed, query results are now shown in separate tabs
· If there is more than one SELECT statement in a document, query results are now displayed on separate tabs in the Data window after execution
· Support of MySQL pluggable authentication on creating a connection to MySQL server is added
· Support of Windows authentication on creating a connection to MySQL server
· F5 shortcut now works for execution of a selected SQL fragment as well as for the entire script
· Export of connection list from the application together with other settings is supported
· Print setup for master-detail browser is supported
· New skins added (Metropolis, Windows 7 and VS2010)

See Also

What's New in dbForge Studio for MySQL, v5.0

Previous Releases


What's New in dbForge Studio for MySQL, v 5.0

Support for MySQL server 5.5

Our product is fully compatible with MySQL server version 5.5

· New features were added and obsolete clauses removed in the Syntax check functionality
· New encodings were added to the encoding list in the Connection Properties dialog
· New kinds of partitioning are supported in the table editor

Master-Detail Browser

Explore and analyze master-detail data in a convenient browser with the following features:

· Design view allows building relations between tables with setting where condition and fetch limit, choosing fields for output, and sorting them by default
· Data of the parent table/view is shown in the upper part of the Data view to allow analyzing data of child tables/views without extra navigation.
· The document allows saving and loading data and diagram for future use
· Sorting and filtering data in the Data view
· Ability to analyze self-referencing tables

Object dependency tree - unique feature

Easily explore object's references and dependants in Database Explorer. Compilation of dependants for debugging is now also available through the object's shortcut menu.

Enhanced Data Editor

Newly added features and a few totally redesigned ones provide even more freedom when working with data.

· Foreign Key lookup editor added
· Server-side sorting and filtering implemented to avoid retrieving all data from the table and enhance work in Paginal Mode
· Few indications added to inform user about Data Editor's state
· Editing of tables in join statements is enabled now
· Option for numbering records added
· Copy data with header functionality added
· Ability to build graphical representation of your data with fully functional wizard added

Improved Security Manager

· Ability to edit permissions for several users added
· Virtual roles for users were added to allow granting a definite set of permissions to selected users
· Grouping by hosts in the users list tree added
· Editing users and working with Security Manager window simplified

Data Export and Import improvements

· Ability to export data from several tables at once added
· Exporting data from command line added
· Importing data from command line added

Object Viewer - a simple way to view object's details

Object Viewer (formerly known as Summary Window) was totally redesigned to provide an easier way for analyzing objects and their structure:

· There are three views to display properties, DDL (text), and data of the selected object
· Inner navigation through object hierarchy
· History with previously viewed objects
· More information about each object is displayed in the Properties view now

Brand new start page

New functional start page providing the easiest way to learn the product's features and to run the most frequently used ones added.

New state-of-the-art skins

Four new UI skins added to improve the application appearance.

Other improvements

· Ability to view internal SQL queries that are sent to the server with parameter's values added
· Few UI improvements in Database Explorer were made
· Options to ignore clauses during the comparison of events added to the Schema Comparison wizard
· Highlighting of differences on comparing SQL profiling results added
· More informative progress during Schema and Data comparison

See Also

What's New in dbForge Studio for MySQL, v 4.5

Previous Releases


What's New in dbForge Studio for MySQL, v4.5

What's New in dbForge Studio for MySQL, v 4.50

Redesigned Database Backup Wizard

Schema Export wizard has been totally redesigned to provide more freedom for backing up schemas. It features the following:

· Capability to save backup options for future use
· Support of command line interface. You can back up schemas in automatic mode using Windows task scheduler
· Automatic archiving of schema backup scripts
· Writing a report about backup process into a log file
· Automatic removing old backup files based on date or quantity

New tool for database developers - Query Profiler

dbForge Studio offers results of internal MySQL tools like SHOW PROFILE and EXPLAIN in a convenient and clear GUI. Besides you get STATUS variables for the required query automatically calculated.

Additional benefits:

· Plan of the query displayed in the tree view for easy review
· Profiling history that can be saved for further analysis
· Capability to compare profiling results in two clicks
· Capability to print profiling results

Revised Data Comparison tool

Diverse testing and close interaction with database developers, admins and casual users resulted in thoughtful redesign and enhancement of Data Comparison tool. Now it embraces the following:

· Capability to compare and synchronize databases of any size
· Increased performance of comparison processes
· Generating accurate comparison reports in HTML and Excel formats
· Capability to change synchronization direction in one click
· New comparison options: Ignore columns by mask, Ignore trailing spaces, Round float types
· Quick filtering tables in comparison results
· Optimized object management during custom synchronization
· Capability to edit values of default comparison options
· New synchronization option Exclude Comments

Improved Query Builder tool

Meet a stronger Query Builder tailored for creating complex conditions with several clicks. The new power is based on the following:

· Optimized performance of the Selection tab in the expression editor
· New Wrap to Subquery option to wrap tables into a subquery
· Visual addition of subqueries to any part of the main query
· Optimized navigation in the editor, particularly between subqueries
· Capability to edit view location in the query document
· Joins show connection direction; better described connection properties
· New skin for objects on the diagram

Quick generating template SQL scripts for database objects

Thanks to this new functionality, you can save your time while working with database objects. For example, you can quickly generate template SQL scripts CREATE, DROP, SELECT, INSERT, UPDATE or DELETE scripts for tables. This option is available in the shortcut menu and called ‘Create Script As’.

A few improvements in Schema Comparison tool

· Extended capabilities of Schema Comparison wizard
· New comparison options to ignore some table options, DEFINER and SQL SECURITY expressions, default values for columns

Other improvements

· New SQL document view layout - now you can see query text and retrieved data at the same time
· Generate DDL wizard was renamed into Generate Schema Script

See Also

What's New in dbForge Studio for MySQL, v 3.6

Previous Releases


What's New in dbForge Studio for MySQL, v3.6

What's New in dbForge Studio for MySQL, v 3.60

Unlimited database connectivity

It is good news for web developers working with remote databases, as employment of remote connections becomes as simple as local ones. dbForge Studio for MySQL 3.60 offers totally redesigned HTTP tunneling with simple tunneling script uploading to the web site. No need to be limited by slow and inconvenient phpMyAdmin. To provide more flexibility while using SSH connection, public key authentication is supported.

Higher performance on large databases

Having passed multiple performance tests on large databases with all database objects, including hundreds of tables, thousands of records, possessing various data types, dbForge Studio for MySQL 3.60 proved marked performance improvement as compared with the previous version and beneficial leading among competitive programs.

The results of performance tests show that dbForge Studio for MySQL 3.60 combines high performance with accuracy and correctness to ensure high quality and efficient database management.

One more improvement is asynchronous execution of stored procedure. It is a great benefit when working with slow procedures.

Optimized database connectivity

In contrast to the prior version dbForge Studio for MySQL 3.60 reduced network traffic up to several times for performing such common tasks:

· Opening connections
· Managing database objects
· Performing schema and data export
· Retrieving data from tables
· Executing procedures or stopping the execution

This optimization makes possible to use dbForge Studio for MySQL 3.60 in cases of traffic limitations.

As database industry matures and the competitive fast-paced business environment encourages cost reducing, dbForge Studio stays ahead putting the power of modern as well as efficient database management tools into the hands of database professionals to make the most of modern databases.

See Also

What's New in dbForge Studio for MySQL, v 3.5

Previous Releases


What's New in dbForge Studio for MySQL, v3.5

What's New in dbForge Studio for MySQL, v 3.50

New Tool for Visual Database Development - Database Designer

Database Designer is a powerful visual design tool for database development that allows you to build a clear and effective database structure visually, see the complete picture representing all the tables, foreign key relations between them, views, and stored routines of your database. It eases access to the database objects for viewing their properties, editing, retrieving data, executing stored routines. With Database Designer you also can perform reverse engineering of your databases to IDEF1X or IE diagrams, which can be easily printed.

Improved Schema Comparison

· Schema Synchronization Wizard which eases synchronization process.
· Schema Update Script window for viewing update script statements for selected object in the SchemaComparison document.
· Added object grouping by Objects Type, Operation, Difference, No Group.
· Added copying connection and database settings from source to target and from target to source in the New Schema Comparison Dialog Box.
· Added object filtering by name.
· Added Include in Synchronization column with check boxes to SchemaComparison document to simplify excluding/including database objects to synchronization.

Enhanced Data Comparison

Custom database object mapping was added, which allows you to compare data database objects with different names and structure and compare table data with view data. You can also use new Ignore Case, Ignore Spaces, Ignore Underscores options to tune automatic mapping, and easily remap custom mapped objects with automatic mapping. DataComparison document filtering improved. New Data Comparison Wizard now has convenient navigation between pages and allows you to copy connection settings between source. Data Synchronization Wizard allows you to customize data synchronization. Data comparison and synchronization performance greatly increased. Now you can compare only view data.

Execute Script Wizard

Execute Script Wizard allows you to execute large scripts without opening them and loading the whole script in memory. When you try to open too large script, you will be prompted to execute it instead.

Other New Features

· MARIA table engine supported.
· Compression for connections to MySQL supported.
· Correlated subqueries supported in Query Builder.
· Support for different encodings in SQL, XML and text files added.
· Added options for controlling script size limit when code editor features are turned off.
· Spreadsheet like data selection in grid with mouse pointer or SHIFT and CTRL keys is now possible.

See Also

What's New in dbForge Studio for MySQL, v 3.1

Previous Releases


What's New in dbForge Studio for MySQL, v3.1

What's New in dbForge Studio for MySQL, v 3.10

Support of multiple database project deployment connections

Now you can set different connections for project configurations. These connections allow you to deploy the same database project to various servers. You get more freedom in handling the project. For example, you can test the project on one server and deploy the final version to another one.

Incremental database project synchronization with the server

Now when you apply the project changes to the server, you can deploy only the required ones without redeploying the whole database.

Database object dependencies supported

In prior versions the Generate DDL, Schema Export, New Project Wizard, Schema Synchronization wizards generated SQL scripts paying no attention to object dependencies. Now all objects in SQL scripts are generated based on object dependency sorting principle. For example, if View 1 refers to View 2, View 1 will come first or tables will follow those tables which refer to them.

This ensures that the generated SQL scripts will be executed without errors and you won't loose your time for additional code editing.

Optimized SQL editor performance

SQL editor performance has been greatly increased due to optimized parsing of SQL scripts. You can open and edit large SQL scripts quicker. Moreover, to speed up your work, automatic switching off SQL editing features in large SQL scripts is implemented.

Filter toolbar in the Error List window

Filter toolbar is added to Error List window to show the quantity of errors, warnings, and messages. Also it filters the list of records, so that you can access the records of the selected type in one click.

Sample database project added to the installation

A sample database project, based on MySQL database Sakila, is added to the installation. Using the sample, even beginners will quickly get the idea and start working with projects successfully.

See Also

What's New in dbForge Studio for MySQL, v 3.0

Previous Releases


What's New in dbForge Studio for MySQL, v3.0

What's New in dbForge Studio for MySQL, v 3.00

Editions

Starting from the version 3.00 dbForge Studio for MySQL will be divided into three editions: Express, Standard, and Professional.

· Express edition provides basic functionality for working with schema objects, user accounts, and SQL scripts. Express edition is free.
· Standard edition includes all must-have tools for a database developer, such as a debugger, Query Builder, code templates, object search, various export and maintenance wizards.
· Professional edition features database project development functionality, schema and data comparison tools, SQL formatting and syntax checking.

Database Projects Greatly Improved

Project building to an SQL script is available with support of different build options and build configurations. Project build includes SQL syntax check, reference check, scripts processing with applying database options, and generating the result script or several scripts based on the selected order.

· Building project to a single script
· Building project to a collection of scripts
· Reference check on build
· Multiple build configurations
· Adapting build results to specified server version
· Schema comparison tool integration
· Refactoring of project objects
· Easy deleting object from project
· All project objects in code completion list

Schema Comparison

Schema comparison tool allows you to quickly compare and synchronize either two schemas or a schema and a project. Based on your needs, a target schema can be synchronized with a source one completely or partially. Schema comparison provides the following features:

· Compare database with database
· Compare database with project
· Synchronization between different server versions
· Comparison results filtering
· Schema synchronization script generation
· Per object viewing of DDL differences
· Exclude objects from synchronization
· Save and load comparison settings

Data Comparison

Data comparison tool allows complete or partial comparing of data between different schemas. Data differences are conveniently displayed. Data comparison provides the following features:

· Comparison of large tables
· Optional view comparison
· Custom comparison keys support
· Option for BLOB data comparison
· Comparison results filtering
· Data synchronization script generation
· Per record viewing of data differences
· Exclude tables and records from synchronization
· Save and load comparison settings

SQL Formatting

Highly customizable code formatting allows you to set up various options for different statement kinds. SQL formatting features:

· Automatic formatting on statement delimiter
· Automatic formatting on paste
· Formatting of current statement, selected fragment, whole document, or multiple files
· Many options can be set individually for different kinds of statements
· Automatic placing new lines and spaces
· Automatic case setting

Code Refactoring

Renaming of a database object in a script or project is supported. All statements, referencing to this object are automatically updated. All changes can be previewed and disabled. Updating of text strings and comments is also supported.

SQL Syntax Check

You can check your code and quickly locate errors without using MySQL server. Syntax check of the entire database project is also available.

Brand New Query Builder

Query Builder was completely re-designed to meet user needs. SQL syntax support was significantly enhanced. Following features were added:

· Support for subqueries on any nesting level
· Powerful expression editor, which allows building very complex conditions without typing code
· Reworked diagram with much better appearance
· Most actions can be performed with keyboard shortcuts

Extended Data Export

A range of supported formats for export is increased. Now you can export data even to another database server through ODBC. Following output formats are now available: CVS, DBF, HTML, MS Access, MS Excel, ODBC, PDF, RTF, Text and XML. Using well-designed Data Export wizard, you can set additional parameters for each output format.

Improved Stored Routine Debugger

· Support for session and server variables in watches
· Some server function call processing improved

Search and Replace Extended

Following search and replace functionality was added:

· Search in data
· Search in LOB Viewer/Editor
· Search and replace in project files
· Search and replace in files on disc

Context-sensitive Help

dbForge Studio for MySQL provides "on the fly" support during your work. You can press F1 to quickly retrieve reference information about MySQL statements, keywords, data types and built-in functions from SQL editor.

Import and Export Settings

Import and Export Settings Wizard allows you to export and import all your settings, layout, toolbars, keyboard shortcuts. Wizard also allows you to reset settings to their default values. You may export, import, and reset settings completely or partially.

Support of new table features and storage engines

· Partitioning support
· Merge engine support
· Falcon engine support

Summary Window

Summary window is added for quick access to database object properties when browsing schema with Database Explorer. Window displays information about currently selected database object or a collection of objects.

See Also

What's New in MyDeveloper Studio, v 2.1

Previous Releases


What's New in MyDeveloper Studio, v2.1

Enhanced Code Templates

· Code Templates window now allows you to preview code templates.
· Code templates are now not organized in folders in the completion list and can be inserted with typing template shortcut and pressing the TAB key.

Database Explorer Enhancements

· Database Explorer now stores navigation history.
· Different icons are available for different types of tables and folders.
· Column type and size can be displayed in the Database Explorer.

Other New Features

· Same file can be included several times in the deployment order for project deployment.
· Security definer setting supported for views, stored procedures and functions.
· Comments for table columns supported.
· SQL Log output can now be customized.
· Date format can now be set for the Data Editor.
· Table columns can now be created using copy/paste operations.

See Also

What's New in MyDeveloper Studio, v 2.0

Previous Releases


What's New in MyDeveloper Studio, v2.0

Stored routines and SQL debugging support

Added stored procedure and SQL script debuggers.

MySQL Database Project Support

Added a project management framework for bookmarking related scripts and organizing database developments. Projects can be deployed in any order and saved to a file.

Security Manager

Completely redesigned Security Manager to control user accounts.

Improved SQL Editor

Greatly improved the SQL Editor. The following features were added:

· Enhanced Find and Replace window lets you search and replace text in all opened documents and view search results in a Find Results window
· Advanced Code completion includes keywords and objects from the parsed script
· Parameter information
· Quick information about pointed object in the script
· Navigation bar for navigating to script objects and sub objects
· Bookmarks
· Syntax customization
· In-place visual select statements editing with Query Builder window
· Incremental search

Improved Working with Data

The following features added for working with data:

· You can now print data from data editor directly
· Sequential fetch feature was added - not all the data can now be fetched at once, cursor can be left opened to fetch data later
· Data output can now be redirected to the Output window and viewed as text
· Card View mode gives a visual way to view data rows

Session Manager

Added a Session Manager for controlling and analyzing user sessions.

Extended Database Object Search

Added search in object data and stored procedure source code. You can now also perform search on columns, constraints and indexes.

Service Manager

Added a Service Manager to find and control MySQL services.

Document Outlining

Added a Document Outline window for viewing the structure of SQL documents. To simplify code navigation, DML commands, DDL statements, BEGIN ... END blocks and variables are represented as single structural units.

Code Templates

Added an extensive collection of SQL and stored routine code templates.

Hot keys customizing

Added fully customizable keyboard mapping schemes.

Other new features

· Added table maintenance, flush and server variables support
· Added event object support
· Now you can open several object editors for the same type of object in one document.
· The Output window now has several tabs for viewing different kinds of messages.

See Also

What's New in MyDeveloper Studio, v 1.51

Previous Releases


What's New in MyDeveloper Studio, v1.51

Large database import improved

MySQL Developer now allows to choose database to import data to. Import operation performance increased.

See Also

What's New in MyDeveloper Studio, v 1.5

Previous Releases


What's New in MyDeveloper Studio, v1.5

User and Privileges Management

User Manager and Grant Manager allows you easily manipulate MySQL accounts and privileges.

Database Export/Import

Database Export Wizard provides you flexible export of a database or of some database objects to a script. Database export can be tuned with a lot of options. You can export objects' structure, tables' data or both of them. Database Import Wizard can import database from a script in a few clicks.

Trigger Support

MySQL Developer now supports triggers. You can use visual Trigger editor to create or edit them.

Script Support

Now you can edit or execute not only single queries but scripts too.

Stop Execution Feature

All queries and scripts are now executed asynchronously. You can continue work on other documents while executing script. At any time you can interrupt its execution clicking the Stop execution button.

Execution of Selected SQL Fragment

You can now select and execute any part of script or query.

Data Export

Data Export Wizard provides you capability to export data to external format. Export to HTML, XML, MS Excel and Text format is supported. You can set different export options to change result file appearance.

Dynamic Data Viewing

Use Dynamic Data Viewing to view data of a table or view just by selecting it in the Database Explorer.

Paginal Data Access Mode

If there are very many data in a table you can use Paginal Mode to view data in parts. You can set page row count to view as many records on the page as you wish.

LOB Viewer/Editor

LOB Viewer and Editor allow to view and edit BLOB and Text data in corresponding table fields.

Database Object Search

MySQL Developer allows to search for database objects by name and type. You can search for an object in specific databases or in the whole server.

Secure SSL and SSH Connections Support

You can now use SSL and SSH connection for secure working with data.

Query Plan Tool

With Query Plan Tool you can analyze select statements and improve table structure.

Duplicate Object

This feature allows to duplicate any database object into the same or another database.

DDL Generation Wizard

This wizard generates DDL script for selected database objects. You can select objects from one or several databases for DDL script generation.

Embedded Server Support

Connection to embedded server can be now established.

Tabbed Groups for Documents

You can open several tab groups with documents, resize them, move documents from one group to another, show only one document group.

Drag-n-Drop Files

You can now drop files on MySQL Developer window to open them.

There are also many MySQL Developer improvements.

See Also

Previous Releases


Getting Started

In this section you will find basic How To topics that help you getting started with dbForge Studio

In This Section

Installation Guide
This section gives an overview of the install/uninstall processes.

Activating dbForge Studio for MySQL
This topic describes the activation procedure.

dbForge Studio for MySQL Start Page
This section describes the basic functionality provided by dbForge Studio for MySQL.

How To: Connect to a Database
This topic explains how to create a new server connection.

How To: Create and Edit a Query
This topic demonstrates how to create a query using the SQL editor and the power of Intellisense features.

How To: Create a Query in Query Builder
This topic shows how to create a query in visual mode.

How To: Edit Data
This topic shows how to edit table data.

How To: Create a Table in Table Editor
This topic explains how to create a new table with help of the Table Editor.

How To: Backup a Database
This topic explains how to backup a database using the Database Backup Wizard and the command line. Also it explains how to schedule backup.


Installation Guide

In This Section

How To: Install dbForge Studio for MySQL
This section describes how to install the application.

How To: Uninstall dbForge Studio for MySQL
This section describes how to uninstall the application.


How To: Install dbForge Studio for MySQL

This topic describes how to install dbForge Studio for MySQL on Windows OS with the help of Devart dbForge Studio for MySQL Setup Wizard.

To install dbForge Studio for MySQL

1. Run dbforgemysql.exe to begin installation.
2. On the Welcome to dbForge Studio for MySQL page, click Install.
3. On the Select Destination page, select the directory where dbForge Studio for MySQL will be installed. To change the default directory, click Browse. Optionally, click the License Terms link to learn End-User Agreement for dbForge Studio for MySQL. If you agree to the Devart dbForge Studio for MySQL License Terms, click Next.
4. Optionally, on the Shortcuts page, select the additional shortcuts you would like the Setup Wizard to create while installing. There are two options available: Create a desktop icon and Add a shortcut to the start menu. Click Next.
5. On the File Associations page, select the document types and file extensions that will be associated with this application when it is installed on your computer. Click Next.
6. On the Startup Optimization page, specify whether you want to optimize the application startup time. There are three options available: Generate images for all assemblies during the installation (recommended), Generate images for all assemblies in the background, and Do not generate images. Click Next to start the installation.
7. Optionally, on the Installing page, you can interrupt the installation by clicking the Cancel button.
8. On the final page, click Finish to exit Setup wizard. Optionally, you can select the Launch "dbForge Studio for MySQL" option to start the application immediately after installation.

See Also

How To: Uninstall dbForge Studio for MySQL


How To: Uninstall dbForge Studio for MySQL

This topic describes how to uninstall dbForge Studio for MySQL from Windows OS.

To uninstall dbForge Studio for MySQL

1. To begin the uninstall, go to Control Panel and then Programs and Features.
2. Right click dbForge Studio for MySQL and select Uninstall.
3. The Uninstall dialog box appears. Click Yes, if you are sure you want to uninstall the application. This starts the dbForge Studio for MySQL Uninstaller.
4. Optionally, on the Uninstall options page, you can specify the following options for uninstaller and then click Uninstall.
· Settings to remove
o Registry options
o Connection list
o Snippets
o Configuration files
o Format profiles
o Projects, scripts and exported data
5. Go to the product feedback page after uninstall - select this option to leave a feedback about application.
6. Click Uninstall to proceed with the uninstall.
7. If the uninstall is successful, the dialog box confirming that the application was successfully removed appears. Click OK to exit the uninstaller.

See Also

How To: Install dbForge Studio for MySQL


Activating dbForge Studio for MySQL

Unless activated, dbForge Studio for MySQL works on the trial basis for 30 days. When this time period expires, dbForge Studio for MySQL must be activated with the purchased activation key.

dbForge Studio for MySQL can be activated either online, or offline.

Online activation

This activation method requires an active Internet connection.

To activate dbForge Studio for MySQL online:

1. If you have not purchased dbForge Studio for MySQL, click Buy Now... on the pop-up window that appears at the start of dbForge Studio for MySQL. If you already have your activation key, click Activate...

Alternatively, click Activate Product on the Help menu.

2. The Activation window opens. Copy your activation key from the e-mail that was sent to you after your purchase, and paste it into the edit box.
The activation key looks like a long sequence of letters and digits.

Note

If you do not see the e-mail with the activation key, be advised to check your Junk/ Spam/Bulk folders.

You can always retrieve your activation key at your Customer Portal page.

3. Click Activate.

Offline activation

Offline activation allows activating dbForge Studio for MySQL right at the Devart web site. This activation method helps activating the product when the online activation fails.

To activate dbForge Studio for MySQL offline:

1. Click the Manual Activation button on the Activation window. It opens when online activation fails.

2. Copy the activation request text with the Copy to Clipboard button, or save it to a text file with the Save to File... button.

3. Open the Manual Product Activation page of the Devart web site, and paste the copied text in the text box. Click Download license. The license file with the .lic extension is downloaded to your computer.

4. Return back to the Activation window of dbForge Studio for MySQL and click the Load license... button. Specify the location of the downloaded .lic file and click Open.

See Also

Getting Started

dbForge Studio for MySQL Start Page


dbForge Studio for MySQL Start Page

The goal of the start page is to provide a location, available when the product first started, for the user to find out about the dbForge Studio for MySQL functionality. We also added some other features to this start page such as the ability to navigate to the product support page, blog, feedback page, etc. The Start page uses a multi-tab model that provides the relevant features and tools in a specific tab.

To access the Start page, click Start Page in the View menu.

Section | Tool | Description
 | Devart website | Opens the Devart company website.
 | Recent Files | The section displays recently opened files. Click a required file name link to open the file.
 | Database Connection | Use the suggestion list to quickly switch to the required server connection.
 | New Connection | Click the button to open the Database Connection Properties dialog box and set up another server connection.
 | SQL Editor | The SQL editor allows you to write and edit SQL code. It supports auto completion and auto look-up. For example, when typing an SQL SELECT query in the SQL editor, after typing a keyword such as WHERE, the editor will perform on auto column look-up to display the list of available columns pertaining to the current query. After typing a keyword such as FROM, the SQL editor will display a list of available tables to choose from.
 | Query Profiler | You can use the Query Profiler tool to debug, troubleshoot, monitor, and measure your application's SQL statements and stored procedures. The tool enables you to select precisely which events you want to monitor. For example, you might want to see when stored procedures are called, when they complete, how long they take to execute, how many logical reads occur during execution, and so on.
 | Query Builder | The visual Query Builder allows you construct complex database queries. You do not need to be a developer to build a query. A rich set of visual options allows you to combine SQL clauses like JOINs, GROUP BY with properties like Indexes, Operators, Aliases, Sort Type, Sort Order and Criteria. Based on your selections, the visual Query Builder will generate a complete SQL script that can be executed.
 | Debug Stored Procedures | SQL debugger allows you to interactively debug stored procedures by displaying the SQL call stack, local variables, and parameters for the SQL stored procedure. As with debugging in other programming languages, you can view and modify local variables and parameters, view global variables, as well as control and manage breakpoints while debugging your SQL script.
 | Execute Script | The Execute Script wizard allows you to execute large scripts without opening them in editor and loading them to memory.
 | New Database Diagram | A visual tool that allows you to design and visualize a database to which you are connected. When designing a database, you can use Database Designer to create, edit, or delete tables, columns, keys, indexes, relationships, and constraints. To visualize a database, you can create one or more diagrams illustrating some or all of the tables, columns, keys, and relationships in it.
 | New Database Object | The visual editor helps you to create a database object. The editor lists available databases on a specific MySQL server instance. You may choose a specific database to place your object there
 | New Schema Comparison | This tool will help you to find differences in objects from two MySQL databases, view update script generated by the application, and perform synchronization of changes so that both databases are identical.
 | New Documenter | Click to generate a new database documentation file.
 | Find Database Object | The product provides the database object search functionality and the possibility of data search in tables and views. It is also possible to search for some text block in the database object DDL.
 | New Project Wizard | This wizard will assist you while creating a database project. The database project is offline representation of a database schema with extended opportunities for offline schema development. It is a collection of logically organized SQL scripts and query files, which are used both to create a new database and update the existing one.
 | Manage Server Security | A professional tool for convenient and easy management of MySQL users and their privileges. It allows you to effortlessly create, edit, or delete user accounts, grant or revoke privileges either at global or object levels, and fully control database security without monotonous code typing into the command line. Graphical user interface provides a clear way to do all these tasks.
 | Start Stop MySQL Server | This tool allows you to control all MySQL server instances in one place. The Service Control window lists added services of the local and remote computers so that you can easily manage them.
 | Monitor Sessions | This tool provides GUI view and Search access for: session details, kill session, session grouping.
 | View Server Variables | The MySQL server maintains many system variables that indicate how it is configured. Each system variable has a default value. System variables can be set at server startup using options on the command line or in an option file. Most of them can be changed dynamically while the server is running. This tool allows you to view and edit server variables.
 | Backup Database | It is important to back up your databases so that you can recover your data and be up and running again in case problems occur, such as system crashes, hardware failures, or users deleting data by mistake. Backups are also essential as a safeguard before upgrading a MySQL installation, and they can be used to transfer a MySQL installation to another system or to set up replication slave servers. This tool will help you to create a database backup file.
 | Restore Database | If you are moving your data to a new server, or you have removed the old database completely you can restore it using the backup file. Backing up the physical database files makes restore much faster than logical techniques such as the mysqldump command. The Database Restore wizard will help you to select the backup file and restore a database in a split-seconds.
 | Perform Table Maintenance | This tool helps you perform maintenance operations: — TABLE CHECK perform an integrity check to make sure that the table's structure and content have no problems. This operation can be done for MyISAM and InnoDB tables. — TABLE REPAIR corrects integrity problem to restore the table to a known, usable state. This operation can be done for MyISAM tables. — TABLE ANALYSIS updates statistics about the distribution of index key values. This is information that the optimizer use to generate execution plans for queries. This operation can be done for MyISAM and InnoDB tables. — TABLE OPTIMIZATION re-organizes a table so that its contents can be accessed more efficiently. This operation can be done for MyISAM and InnoDB tables.
 | Flush Objects | Using this tool you can: — Reload the DES keys from the file that was specified with the --des-key-file option at server startup time. — Flush the host cache if some of your hosts change IP address or if the error message Host 'host_name' is blocked occurs. — Close and reopen all log files. If binary logging is enabled, the sequence number of the binary log file is incremented by one relative to the previous file. — Reloads the privileges from the grant tables in the mysql database. — Defragment the query cache to better utilize its memory. — Flush tables and, depending on the variant used, acquires locks. — Add the current thread's session status variable values to the global values and resets the session values to zero.
 | Copy Databases | The tool copies a set of databases by generating and running a script.
 | Export Data | This tool allows you to export your MySQL data. Select the Database objects to export, and configure the related options.
 | Backup Database | Dump databases in SQL format and schedule regular MySQL database backups. Use 5 levels of file compression and wide set of options to fine-tune backups. Save your settings and connections as a project for the next time or to use in the command line.
 | Import External Data | Fill MySQL databases with external data using the import tool. It supports more than 10 popular data formats and allows to customize the whole process. Templates and automating data import tasks through command line are also available.
 | Restore Database | If you are moving your data to a new server, or you have removed the old database completely you can restore it using the backup file. Backing up the physical database files makes restore much faster than logical techniques such as the mysqldump command. The Database Restore wizard will help you to select the backup file and restore a database in a split-seconds.
 | New Data Comparison | The tool gives clear view of differences between data, allows analyzing them, generates synchronization script, and applies changes at a glance. It also allows scheduling regular MySQL and MariaDB data comparisons using command line.
 | New Data Generation | This tool to create large volumes of meaningful test data and populate your database with it.
 | Master-Detail Browser | Use the Master/Detail browser to view or edit data from multiple tables, snapshots, views or queries linked by foreign keys or a user-defined master-detail relationship. This is typical of a database setup from an Entity/Relationship diagram, where one table's objects are related to another table's objects by a linking field or fields.
 | New Data Comparison | The tool gives clear view of differences between data, allows analyzing them, generates synchronization script, and applies changes at a glance. It also allows scheduling regular MySQL and MariaDB data comparisons using command line.
 | Design New Report | Design in minutes any data reports with parameters, customizable formatting, calculated summaries, etc with the help of the MySQL reporting tool provided by dbForge Studio. Streamline your work with multi-dimensional data, visualize data trends and dependencies, make quick but reasonable business decisions, convert your data in professionally-looking pivot tables.
 | Build Pivot Table | Group and summarize your data in pivot tables to make it easier to read and understand.
 | Export Data | This tool allows you to export your MySQL data. Select the Database objects to export, and configure the related options.
 | Find Data | Locate specific data records in a database.

See Also

Getting Started

How To: Connect to a Database


How To: Connect to a Database

dbForge Studio for MySQL offers you visual, quick, and simple way to manage database connections through the Connection Manager window.

Create a New Server Connection

Before you can connect to a database, you must create a server connection.

To create a server connection, perform the following actions:

1. Open the Database Connection Properties dialog box by one of the following ways:

· Click [image] New Connection on the Database menu

- or-

· Click the [image] New Connection button on the Connection toolbar.

2. Select the connection type in the Type box. There are tow connection types available: TC/IP and Named pipe.

3. Enter the host name in the Host box.

3. For a TC/IP connection, enter the port information in the Port box. Default port number is 3306. For a Named pipe connection, enter the pipe name in the Pipe box.

4. Enter the login credentials in the User and Password fields.

5. In Database, type or select the name of the database to which you want to connect.

6. The Connection Name should be generated automatically from the Host name. You can create a distinctive name for your new connection.

7. (optional) You can assign a category for a new connection in the Document Category box.

8. (optional) You can click Advanced to configure advanced connection properties.

9. (optional) You can click Security to configure security properties. For example, you can set up either SSL or SSH security properties.

10. (optional) You can click HTTP to configure HTTP tunnel properties.

11. (optional) You can click Test Connection to verify that you can connect to the database by using the specified connection information.

12. Click OK to create the connection.

Note

The Connection toolbar is hidden by default. To unhide it, right-click on the Menu bar and choose Connection.

See Also

Getting Started


How To: Create and Edit a Query

This topic explains how to create and edit an SQL query in dbForge Studio

To create a query:

1. Create a server connection. For more information about how to create a server connection see How To: Connect to a Database
2. On the Start page click SQL Development and then click SQL Editor. Alternatively, click New SQL on the Standard toolbar. An empty SQL document opens.
3. Start type a query to a database.
4. Click Execute or press CTRL+F5 to see the query results.

Coding Techniques Example

The dbForge Studio SQL editor provides many features that make it easier for you to write and manage your code. Let's explore some Intellisense features that assist you while coding.

We are going to create a sample query. In this example we will use the sakila database. Let's display all the films stored in the sakila database, that were released after 2004.

1. Open the SQL Editor.
2. Start typing the SELECT statement. Enter first three letters "sel". dbForge Studio shows you the list of the relevant keywords and snippets. You can select the SELECT keyword from the list and press ENTER. The keyword appears in the SQL editor. You can also select the "Sel" snippet from the list and press the TAB button. In this case the SELECT * FROM statement appears in the SQL editor.

If you start type the same letters "sel" a little faster, before the list appears (by default the list has 200 ms delay), a little tool tip appears next to the letters. It signals that you can press the TAB button to complete the statement automatically by inserting a snippet.

Regardless of the method you choose, the SQL editor displays the SELECT * FROM statement.

3. Now, lets type a table name from which we want to retrieve the data. Start type "f". dbForge Studio shows you a list of valid members from the sakila database. If you continue typing characters, the list is filtered to include only the members that begin with those characters. After selecting an item, you can insert it into your code by pressing TAB (or ENTER) or by typing a space. dbForge Studio also shows a quick info for every highlighted item in the list. It allows you to see the object structure immediately.

The film table comes first on the list, so just press TAB or ENTER to insert it into the SQL editor. dbForge Studio assigns the alias for the film table automatically.

4. We need to select films categories that is stored in a separate tables. In a similar way, either type or insert the JOIN keyword and press SPACE. dbForge Studio shows you all available solutions to implement JOIN. Select required statement and press ENTER.

Now, type one more JOIN keyword to join the category table. Again, dbForge Studio shows you the list of available solutions to choose.

5. Use CTRL + K + D combination to format the query text. Now we can execute the query to see results. To do so, click the Execute button on the Debug panel, or press F5.

6. There is no need to retrieve all the columns from the film table, so we can leave only required ones. Place the cursor after the asterisk character and press TAB.

dbForge Studio shows the columns list that are available in the film table.

Lets select and remove all but f.film_id and f.title.

7. Next, add a category name. For this, place the cursor after f.title and click CTRL + space.

A list of valid members appears. Select a check box next to the name column. It will be added to the SELECT statement automatically. We can rename it by typing c.name AS category_name.

8. The last step is to add WHERE condition. Add the WHERE f.release_year > 2004 statement at the end of the query and press F5 to execute it.

We got what we wanted.

As you can see that Intellisense feature provided by dbForge Studio allows you to create complex queries in a few keystrokes.

See Also

How To: Create a Query in Query Builder

Getting Started


How To: Create a Query in Query Builder

This topic explains how to create and edit an SQL query in dbForge Studio using the Query Builder features.

We are going to create a sample query using visual designer. Let's repeat the sample we have created in the How To: Create and Edit a Query topic. We will use the sakila database and display all the films stored in the sakila database, that were released after 2004.

To create a query visually:

1. Create a server connection. For more information about how to create a server connection see How To: Connect to a Database.
2. On the Start page click SQL Development and then click Query Builder. Now, you can drag-and-drop tables from the Database Explorer to the editor. Holding Ctrl, select the category, film, and film_category tables in the Database Explorer, and drag-and-drop them over to the visual editor. Alternatively, right-click any of the selected tables, point to Send to, and then click Query Builder in the shortcut menu.

3. Select the film_id and title checkboxes in the film table, and the name checkbox in the category table.

Actually, our query is ready to be executed. However, we need to add a WHERE condition, to display the films that were released after 2004.

4. Go to the Where tab to insert the condition. Click the green plus icon.

5. Click enter value.

6. Select release_year from the list.

7. Click the equals sign and select greater than instead.

8. Click enter a value and type 2004.

9. Click Execute. The result set displays the information we have requested.

As you can see the results are the same we have in the How To: Create and Edit a Query topic.

Visual Query Builder is a powerful tool that allows you to build complex queries quickly and with no code typing.

See Also

Getting Started

How To: Edit Data


How To: Edit Data

When dbForge Studio executes any statement returning a result set, the retrieved data is displayed in Data Editor of the Data view of the same SQL document or the Data window. This topic tells how to edit the data in grid; for information about customizing data grid, as well as sorting, grouping and filtering, visit the Viewing Data in Grid topic.

Editing Data

1. In Data Editor available in the Data view of SQL document, Object Viewer, or in the Data window, click a cell you want to edit.
2. After editing, confirm the changes by clicking the [image] End Edit button under the grid or selecting the End Edit option from the shortcut menu.

Tip: To discard changes, click the [image] Cancel Edit button or select the Cancel Edit option from the shortcut menu.

In dbForge Studio, you can also edit data right after retrieving it from a table or in the data view after any query was executed.

To retrieve data, select Retrieve Data from the shortcut menu of the table in Database Explorer. After this a window asking if you want to make the received data grid editable or not will appear. If you want to make the grid editable, click the Make Editable button, if you want the grid to be read-only, click Keep Read-Only. You can check the Don't show this message again check box, and the message won't appear when you click Retrieve Data any more.

To make data received after clicking Retrieve Data editable you can also choose the table name from the Table drop-down list on the toolbar , or leave it read-only by selecting (read-only).

If you choose the read-only mode, you will gain in the performance aspect, as the application will work faster in this mode.

To edit data in join query results, you should set the table you want to edit data from to the editable mode, as described above. After you set one table as editable, the data of other tables included into the result will become light-gray.

Note

When you change the mode of any table from read-only to editable or vice versa, a balloon with the corresponding message is shown on the status bar.

Inserting, Deleting, and Copying Data

Use the shortcut menu or the corresponding buttons under the grid. For example, you can do the following:

· To insert NULL (instead of empty string), select Set Value To ->Null from the shortcut menu. You can also use the CTRL+0 key combination.

Tip: Use Set Value To menu to quickly set an empty string, zero, or a current date.

· To insert SET and ENUM data, dbForge Studio offers convenient editors. Click a field of the ENUM data type and select a required value from the drop-down list.

Click a field of SET data type and tick off a required value (or values) in the drop-down editor.

· To add a new record, select the Append option from the shortcut menu or click the Append button under the grid. To delete a record from the grid, select the Delete option from the shortcut menu or click the '-' button under the grid, or press CTRL+DELETE keys.
· To copy and paste cell values, use the corresponding options from the shortcut menu.

Selecting Data

You can easily select and copy the data just like cells in a spreadsheet. Do either of these actions:

· Move the mouse pointer across the grid holding the left mouse button.
· Click the first cell of the data range, press SHIFT, and, holding the SHIFT key, click the last cell. A rectangular range of cells will be selected.

Tip: Using the CTRL key, you may include and exclude cells to selection. Any number of rows may be copied and pasted to some other application, for example, a spreadsheet, but when you paste data in the data grid, only the first row will be pasted.

dbForge Studio allows you to control data editing with transactions. When working with grid-based editor, you can access the following buttons on the Connection toolbar: Begin Transaction, Commit, and Rollback.

Note

Some queries return read only data, for example, queries with aggregate functions (count, avg etc.), or data, retrieved from non-updatable views. Such data can't be edited. It is also impossible to edit the result of executing of the script with several select statements.

Row and Cell Indicators

When working with grid, you can see special indicators near to the focused cell. These indicators reflect current editing state.

The row is focused.

The row is being edited.

The row has been edited.

Incorrect value was entered into a cell. You must either fix the value or press the ESCAPE key to cancel changes made to the cell.

See Also

Getting Started

How To: Create a Table in Table Editor


How To: Create a Table in Table Editor

In this example we will create a new table that does not contain any data. Nevertheless, while creating the table you must decide what types of data you want to store in it. The data is held in fields, and each field can be declared as one of the data types that are available.

The sakila database contains the film table. We are going to create a table that will store film ratings descriptions.

To create a table:

1. You must be connected to a database. For more information about how to create a server connection see How To: Connect to a Database.
2. In the Database Explorer, double-click a required database wherein you need to create a table.
3. Right-click the Tables folder and select New Table. The Table Editor opens.

4. In the Name text box, enter a table name. You can give it a name such as ratings_description.
5. In the grid below, click the first empty cell and enter the column name. You can give it a name such as id. Notice, that the data type for that column is defined automatically. Select the check box next to id, in order to set this column as the primary key.
6. Click next empty cell and enter the column name. You can give it a name such as description. Notice, that the data type for that column is defined automatically.
7. Click Apply Changes.

The new empty table is created. It now appears in the Database Explorer in the Tables folder.

See Also

Getting Started

How To: Backup a Database


How To: Backup a Database

In this example we will create the sakila database backup.

To backup the database:

1. Click Backup Database on the Administration tab of Start Page. The Database Backup Wizard opens.
2. Select a connection or click <Manage...> in the Connection list, and then click New, to create a new connection. For more information about how to create a server connection see How To: Connect to a Database.
3. Once the connection is established, select a database you want to backup in the Database list.
4. Specify a folder path to store backups in the Path text box.
5. Specify an output file name in the respective text box.
6. Set up some optional settings such as: append time stamp to the file name, auto delete old files, use compression etc, at your own decision. Click Next.

7. Select database objects to backup. Click Next.

8. Specify detailed options on how backup should be performed. Click Next.

9. Select the Write a report to a log file check box to save the backup process information to a log file. Enter the path where to store the file, for instance C:\Backups\Backup.log.

10. Click Backup.
11. As soon as the backup process have finished click Save Project.

A project file contains all the information that you have entered while walkthrough the wizard pages.

Running Backup from the Command Line

To run backup from the command line:

1. Click Start.
2. Type cmd in the Search programs and files text box and press the ENTER button.

Note

To run the Command Line in Windows 8:

From the Desktop Mode

· Move the mouse cursor to the exact lower left corner until the desktop shortcuts menu appears.
· Right-click to see the shortcut menu and than click Run

From the Charms Bar

· Move your mouse to the upper right corner until the Charms Bar appears.
· Select Apps from the list and type “run” in the search box.
· Click Run from the search results.

Use Windows + R Shortcut Keys

· In desktop mode, press the Windows key and R at the same time, to show the Run command line.
3. Enter the command line as follows: "c:\Program Files\Devart\dbForge Studio for MySQL\dbforgemysql.com" /backup /projectfile:"c:\Backups\sakila.backup". Press ENTER.

After the process ends, a backup file appears in the specified directory.

Scheduling Database Backup

You can use the Windows Task Scheduler to create and manage backup tasks that your computer will carry out automatically at the times you specify.

To create Windows task:

1. Run the Windows Task Scheduler.

Note

To run the Windows Task Scheduler:

1. Click Start and then click Control Panel.
2. Click Administrative Tools.

Note

If your current view is Category, click System and Security, and then click Administrative Tools.
3. Click Task Scheduler.
3. Click the Action menu, and then click Create Basic Task.
4. Type a name for the task and an optional description, and then click Next.
5. Do one of the following:
· To select a schedule based on the calendar, click Daily, Weekly, Monthly, or One time, click Next; specify the schedule you want to use, and then click Next.
· To select a schedule based on common recurring events, click When the computer starts or When I log on, and then click Next.
· To select a schedule based on specific events, click When a specific event is logged, click Next; specify the event log and other information using the drop-down lists, and then click Next
6. To schedule a program to start automatically, click Start a program, and then click Next.
7. Click Browse to enter a path to the .bat file that stores the command line string. For instance, a .bat file can contain a command line string as follows: "c:\Program Files\Devart\dbForge Studio for MySQL\dbforgemysql.com" /backup /projectfile:"c:\Backups\sakila.backup".
8. Click Next.
9. Click Finish.

See Also

Getting Started


Connecting to Databases

In This Section

How To: Manage Database Connections
Find out how to connect to a database using three types of database connections.

Advanced Settings for Database Connections
Learn how to apply additional options to tune database connections.

Using Secure Connections
Read how to use SSL and SSH protocols for secure connections.

Using HTTP Tunneling
Learn how to connect to a database using HTTP tunneling.

Working with Embedded Server
Learn how to work with Embedded Server.

Viewing Database Schema Information
Learn what you can see in the Database Explorer window.


How To: Manage Database Connections

dbForge Studio for MySQL offers you visual, quick, and simple way to manage database connections through the Database Explorer window.

By default, Database Explorer displays recently used database connections. If you open Database Explorer for the first time, no connections are shown.

Note

The Database Explorer is not available in the dbForge Data Compare for MySQL and dbForge Schema Compare for MySQL.

Use Database Explorer to do the following:

Create a database connection

1. Open the Database Connection Properties dialog box by either of these ways:
· Click the New Connection button on the Database Explorer toolbar
· Right-click in the Database Explorer window and select New Connection from the shortcut menu
2. Set up connection parameters. Refer to the How To: Connect to a Database topic for more information.

Windows connection coloring

Window connection coloring allows you immediately know to which server you're connected to. You can add coloring for each server connection.

Open a database connection

Double-click a connection in Database Explorer. The connection icon will be changed to [image] and the connection node will open to show database objects.

Close a database connection

Right-click a connection in Database Explorer and select Close. The connection icon will be changed to [image] to indicate the close.

Edit a database connection

Right-click a connection in the Database Explorer and select Modify Connection. The Database Connection Properties dialog box opens enabling you to edit the parameters.

Duplicate a database connection

Right-click a connection in the Database Explorer and select Duplicate Connection. A copy of the connection will appear in the Database Explorer window.

Delete a database connection

Right-click a connection in the Database Explorer and select Delete. The message appears asking "Are you sure you want to remove database connection 'name'?". Click Yes to drop the connection. Click No to cancel dropping.

View a database connection information

Right-click a connection in the Database Explorer and select Properties. The Properties window opens displaying the connection properties.

See Also

Advanced Settings for Database Connections


Advanced Settings for Database Connections

dbForge Studio for MySQL offers a number of useful features to tune and better manage database connections, and reduce traffic.

Connection timeout

Specify the required time period after which dbForge Studio for MySQL stops its attempts to get response from the MySQL Server and open a connection. Note, zero means to wait infinitely.

Execute timeout

Specify the required time period after which dbForge Studio for MySQL stops its attempts to execute a query. Note, zero means to wait infinitely.

Encoding

By default, the client connection character set is UTF-8. You can select a different encoding from the drop-down list.

Detect MySQL character set

When selected, dbForge Studio for MySQL automatically identifies the character set used by the MySQL Server after the connection is created. Selecting this option is mandatory for MySQL Server 3.23-5.x.

Use compression

If selected, dbForge Studio for MySQL will use compression when exchanging data with the MySQL Server to reduce the traffic.

Keep connection alive

If selected, dbForge Studio for MySQL will ping the MySQL Server to validate the status of the open connection. It will notify you in case the connection is closed, saving your time and prompting to reconnect.

Ping timeout

The time period after which dbForge Studio for MySQL will ping the MySQL Server to validate the status of the open connection.

See Also

Using Secure Connections


Using Secure Connections

When MySQL client communicates with MySQL Server, all communication (with the exception of the user password) is done in plain text. This means that anyone who gets between your client and the server can have full access to all information transmitted and even alter the data while it is in transit.

To protect your information, you need to encrypt communications between the MySQL Server and the client application. dbForge Studio for MySQL offers you secure database connections using SSL and SSH network protocols.

Both connections lead to a higher CPU load on the client and the MySQL Server or the SSH Server, as encrypted connections require more computations.

SSL connection

Secure Sockets Layer (SSL) a network protocol which enables two parties to negotiate a 'secure' communications channel, ensuring the privacy, authenticity, and integrity of message data. SSL connection is established between the MySQL Server and a client (it is built in dbForge Studio). The connection mechanism includes the following stages:

1. The client requests an SSL connection from the MySQL server.
2. The two parties negotiate a common cipher suite, which consists of a key exchange algorithm, a certificate verification algorithm, an encryption algorithm, and an integrity check.
3. The server provides its certificate so it can be authenticated by the client. Optionally, the client may provide its certificate to be authenticated by the server.
4. The two parties compute the cryptographic parameters used in the cipher suite, such as the secret keys needed for data encryption.
5. The two parties exchange application data, using the generated session key, negotiated algorithms and computed cryptographic parameters. Once the cryptographic parameters are established, the application data is transparently encrypted and checked for integrity in both directions.

To use SSL connection:

· Get or generate certificates for MySQL Server and SSL client
· Create SSL connection

SSH connection

Secure Shell (SSH) is a network protocol used to exchange data through a secure channel between two networked devices. In contrast to Telnet and other insecure remote shells that transmit all data, including login information, in plain text, SSH provides encrypted communication over an insecure network.

SSH connection is established between SSH server and a client (it is built in dbForge Studio). Find more information about SSH server at www.openssh.org. The client is used to access remote machines and execute commands.

SSH offers SSH tunneling to provide secure transmit of data. All the data transmitted over the insecure network is encrypted on one side of SSH connection and decrypted on another side. This ensures privacy, authenticity, and integrity of transmitted data and allows you to connect to a remote MySQL server, when a port is blocked.

SSH connection includes the following stages:

1. Connection between SSH Server and MySQL Server is created.
2. Authentication between SSH Server and MySQL Server is successfully done.
3. The client and MySQL Server exchange the data which is transmitted through SSH Server.

To use SSH connection:

· Install and set up SSH Server
· Create SSH connection

See Also

Using HTTP Tunneling


How To: Create SSH Connection

SSH (Secure Shell Host) connection is established between an SSH server and a client (it is built in dbForge Studio). The client is used to access remote machines and execute commands.

SSH protocol offers SSH tunneling to provide secure transmit of data. All the data transmitted over the insecure network is encrypted on one side of SSH connection and decrypted on another side. This ensures privacy, authenticity, and integrity of transmitted data and allows you to connect to a remote MySQL Server, when a port is blocked.

SSH connection includes the following stages:

1. Connection between the SSH Server and the MySQL Server is created.
2. Authentication between the SSH Server and the MySQL Server is successfully done. The SSH Server can use two types of authentication:
· Password authentication - it uses a password of a user account on the SSH Server.
· Public key authentication - it uses a pair of public and private keys which you can generate by a key generator tool, for example, PuTTygen.
3. The client and MySQL Server exchange the data which is transmitted through the SSH Server.

SSH Connection using Password authentication:

1. Check that you have the SSH Server installed and set up. If no, see How To: Install and Set Up SSH Server topic.
2. Open the Database Connection Properties dialog box by any of these ways:
· On the Database menu, select New Connection.
· Click the [image] New Connection button on the Database Explorer toolbar.
· Right-click the Database Explorer window and select New Connection from the shortcut menu.
3. Switch to the Security tab, check Use security protocol and select Use SSH.
4. Select Password authentication and input login information required to connect to the SSH server:
· Host - the name or ip address of the SSH Server.
· Port - the TCP/IP port to connect to the SSH Server. By default, it is 22.
· User - the name of the user account on the SSH Server.
· Password - the password of a user account on the SSH Server.

Tip: Select the Save password check box, otherwise while opening the connection, the Connect to MySQL Database dialog box will appear and dbForge Studio will ask you to enter the password again.

5. On the General tab set login information required to connect to the MySQL Server. It should be set relatively to the SSH Server. Specify the following:
· Host - the name of the MySQL Server host. If SSH and MySQL Servers are on the same machine, the host name can be 'localhost'. It is highly recommended to specify the IP address explicitly (especially for the Linux OS).
· Port - the TCP/IP port to connect to the MySQL Server. By default, it is 3306.
· User - the name of the user account on the MySQL Server.
· Password - the password of the user account on the MySQL Server.

6. Specify the default database of the MySQL Server. To see all databases of the selected MySQL Server in the Database Explorer window, select Show all databases, otherwise you will see only the selected one.
7. (Optional) To test the created connection, click the Test Connection button.
8. Click OK to establish the database connection.

SSH Connection using Public key authentication:

1. Check that you have the SSH Server installed and set up to allow public key authentication. If no, see How To: Install and Set Up SSH Server.
2. Open the Database Connection Properties dialog box by any of these ways:
· On the Database menu, select New Connection
· Click the [image] New Connection button on the Database Explorer toolbar
· Right-click in the Database Explorer window and select New Connection from the menu

Note

The Database Explorer is not available in the dbForge Data Compare for MySQL, dbForge Schema Compare for MySQL.
3. Switch to the Security tab, check Use security protocol and select Use SSH.
4. Select Public key authentication and input login information required to connect to the SSH Server:
· Host - the name or ip address of the SSH Server.
· Port - the TCP/IP port to connect to the SSH Server. By default, it is 22.
· User - the name of the user account on the SSH Server.
· Passphrase - the passphrase for a private key. You can set it while generating public and private keys through a key generator tool, for example PuTTygen.
· Private key - the private key file location on your local machine. Click the button in the field to specify the location or enter it manually. (You can generate the private key along with a public key using a key generator tool. Note if you are using PuTTygen, you can either convert a generated private key into OpenSSH format (by selecting Conversions>Export OpenSSH key in the menu) or use it without conversion. dbForge Studio supports both formats.

5. On the General tab set login information required to connect to the MySQL server. It should be set relatively to the SSH server. Specify the following:
· Host - the host name of the MySQL Server. If SSH and MySQL Servers are on the same machine, the host name can be 'localhost'.
· Port - the TCP/IP port to connect to the MySQL Server. By default, it is 3306.
· User - the user of the MySQL Server.
· Password - the password of the user account on the MySQL Server.

6. Specify the default database of the MySQL Server. To see all databases of the selected MySQL Server in the Database Explorer window, select Show all databases, otherwise you will see only the selected one.
7. (Optional) To test the created connection, click the Test Connection button.
8. Click OK to establish the database connection.

Tip: To see in the Database Explorer a more appropriate name for the created connection, change the default connection name. By default, it is generated like this: <selected database>.<MySQL Server host>.

See Also

Using Secure Connections

How To: Install and Set Up SSH Server


How To: Create SSL Connection
1. Open the Database Connection Properties dialog box by any of these ways:
· On the Database menu, select New Connection.
· Click the [image] New Connection button on the Database Explorer toolbar
· Right-click in the Database Explorer window and select New Connection from the menu

Note

The Database Explorer is not available in the dbForge Data Compare for MySQL, dbForge Schema Compare for MySQL.
2. Switch to the Security tab, check Use security protocol and select Use SSL.
3. Specify the location of the client key, client certificate, and authority certificate in the corresponding fields. If you have no certificates, see How To: Generate Certificates for SSL Server and Client topic for more information.

4. Optionally, you can specify the required cipher or select all available ones. All ciphers are checked by default. The following ciphers are allowed in dbForge Studio for MySQL:
· DES(40)
· DES(56)
· 3DES(168)
· AES(128)
· AES(256)
· RC4(40)
· RC4(128)
· RC2(40)
5. On the General tab set login information required to connect to the MySQL Server.
· Host - the name or ip address of the MySQL Server host.
· Port - the TCP/IP port to connect to the MySQL Server. By default, it is 3306.
· User - the name of the user account on the MySQL Server.
· Password - the password of the user account on the MySQL Server.

6. Specify the default database of the MySQL Server. To see all databases of the selected MySQL Server in the Database Explorer window, select Show all databases, otherwise you will see only the selected one.
7. (Optional) To test the connection, click the Test Connection button.
8. Click OK to establish the database connection.

See Also

Using Secure Connections

How To: Generate Certificates for MySQL Server and SSL Client


How To: Generate Certificates for MySQL Server and SSL Client

To create SSL connection the following three files are required:

· Client key - used along with the client certificate to encrypt and decrypt data during a connection
· Client certificate
· Authority certificate - used to verify identity of a client and a server

You need to specify their location in my.ini file of the MySQL server and on the Security tab of the Database Connection Properties dialog box.

1. Download OpenSSL. This command line tool is used for creation and management of private keys, public keys, and parameters.
2. Open the command prompt by using Start -> Run -> cmd and type the following to go to OpenSSL install directory (for example, it is D:\OpenSSL):

d:

cd \openssl

3. Generate a key file used for authority certificate generation by typing:

openssl genrsa 1024 > ca-key.pem

(This string will create ca-key.pem file)

4. Generate the authority certificate by typing the following:

openssl req -new -x509 -nodes -days 1000 -key ca-key.pem -config myssl.cnf > ca-cert.pem

(This string will create ca-cert.pem file.)

5. Generate a key file used for server certificate generation by typing the following:

openssl req -newkey rsa:1024 -days 1000 -nodes -keyout server-key.pem -config myssl.cnf > server-req.pem

(This string will create server-key.pem file.)

6. Generate the server certificate file by typing the following:

openssl x09 -req -in server-req.pem -days 1000 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 > server-cert.pem

(This string will create server-cert.pem file.)

7. Generate a key file used for client certificate generation by typing the following:

openssl req -newkey rsa:1024 -days 1000 -nodes -keyout client-key.pem -config myssl.cnf > client-req.pem

(This string will create client-key.pem file.)

8. Generate the client certificate file by typing the following:

openssl x509 -req -in client-req.pem -days 1000 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 client-cert.pem

(This string will create client-cert.pem file.)

9. Relocate the generated files on your machine if required, and go to the installation directory of the MySQL Server. Open the my.ini file and after [mysqld] line specify the location of the generated files - ca-cert.pem, server-cert.pem, and server-key.pem by typing:

ssl

ssl-ca="D:/SSL Certificates/ca-cert.pem"

ssl-cert="D:/SSL Certificates/Server/server-cert.pem"

ssl-key="D:/SSL Certificates/Server/server-key.pem"

10. Restart the MySQL Server and check if it supports SSL by opening a new SQL document in dbForge Studio for MySQL - (in the top menu, select SQL expanding the New node of the File menu) and typing the following:

SHOW VARIABLES LIKE 'have_openssl'

If the server returns YES, you can set up SSL client. If the response is NO or something does not work in the existing configuration, please, visit http://dev.mysql.com/doc/refman/5.1/en/secure-connections.html for instructions on how to start up a required server from scratch.

See Also

Using Secure Connections

How To: Install and Set Up SSH Server


How To: Install and Set Up SSH Server

To install SSH Server:

1. Download SSH Server at www.openssh.org.
2. Unzip setup.exe and run it.
3. Accept all the default settings. This places all appropriate files in C:\Program Files\NetworkSimplicity.

To set up SSH Server:

1. Open a command prompt by using Start -> Run -> cmd.
2. Type the following to go to your install directory (by default, it is C:\Program Files\NetworkSimplicity):

c:

cd \program files\networksimplicity

3. Go into the ssh subdirectory by typing:

cd ssh

4. Use mkpasswd to tune the passwd file. For example, to allow a local user "localjoe" to login, type the following:

mkpasswd -l -u localjoe >> ..\etc\passwd

To allow a domain user "domainbob" to login, type:

mkpasswd -d -u domainbob >> ..\etc\passwd

If you are on a domain controller, it is recommended to use the -d option, rather than the -l option. Though -l is a valid option on a domain controller for domain accounts you can end up having a spurious group ID associated with your username.

NOTE: If you want to use mkpasswd with a user that is not in your primary domain then you must use a different syntax. If you wanted to get user jdoe from trusted domain trustdomain you would type:

mkpasswd -d -u jdoe trustdomain >> ..\etc\passwd

Do this for all users that should be able to login. You can copy these files to other OpenSSH on Windows installations as long as the users are identical.

5. Use mkgroup to create a group file. Type the following for local groups:

mkgroup -l >> ..\etc\group

For domain groups:

mkgroup -d >> ..\etc\group

If you do both, open the file in notepad and remove any duplication.

6. Reboot the server by typing:

net stop opensshd

net start opensshd

7. Test the connection from another machine by typing:

cmd ssh user@just_install_server

8. Use a special key generator, for example PuTTygen, to generate public and private keys in OpenSSH format. They are used to provide authentication between the SSH Server and client. Note if you are using PuTTygen, you can either convert a generated private key into OpenSSH format (by selecting Conversions>Export OpenSSH key in the menu) or use the keys without conversion. dbForge Studio supports both formats.

In the public key file copy the public key located between the following lines:

BEGIN SSH2 PUBLIC KEY

Comment: "rsa-key-20090714"

'this is the public key to copy'

END SSH2 PUBLIC KEY

9. Create authorized_keys.pub file in C:\Program Files\NetworkSimplicity\ssh\.ssh\ folder. This file will contain a public key used by the SSH Server to authenticate the client and give access to the MySQL Server. In the file type the following:

ssh-rsa 'your public key' user@user

10. Open C:\Program Files\NetworkSimplicity\ssh\sshd_config file and specify the location of authorized_keys.pub file:

AuthorizedKeysFile /ssh/.ssh/authorized_keys.pub

11. If you want to use SSH connections with password authentication, check that your server supports this authentication. PasswordAuthentication line in sshd_config file should contain yes.
12. Reboot the server by typing:

net stop opensshd

net start opensshd

See Also

Using Secure Connections

Using HTTP Tunneling


Using HTTP Tunneling

While working with a remote website, you need to connect to its database, but the access through the database server port is blocked, use HTTP tunneling.

When you can't connect to the MySQL server directly, for example a firewall blocks the access from all network protocols, except HTTP protocol, you can use HTTP tunneling.

HTTP tunneling is a method of connecting to a MySQL Server through HTTP/HTTPS protocol and using port 80, by default, which is used by a web browser.

HTTP tunneling mechanism (used in dbForge Studio for MySQL) includes the following stages:

1. dbForge Studio sends data as encrypted requests through HTTP protocol to a web server with PHP 5 support where tunnel.php script is located.
2. The script decrypts the requests and sends data to the MySQL Server.
3. When the script receives data from the MySQL Server, it transforms it into encrypted requests and sends them back to dbForge Studio.

To use HTTP tunneling:

1. Upload the Tunneling script
2. Set up HTTP tunneling

See Also

Uploading the Tunneling Script


How To: Set Up HTTP tunneling

To set up HTTP tunnel:

1. Check that tunnel.php script is successfully uploaded to the web server. If no, see Uploading the Tunneling Script topic.
2. Click the [image] New Connection button on the Database Explorer toolbar to open the Database Connection Properties dialog box.

Note

The Database Explorer is not available in the dbForge Data Compare for MySQL and dbForge Schema Compare for MySQL.
3. Switch to the HTTP tab, check Use HTTP tunnel.
4. Enter the URL of the tunnel.php script uploaded to the web server. Note, if the web server is located on the port different from default 80, you should enter an URL like this: http://_web_server_name:port/script_location.

Select Keep connection alive to make the web server preserve the created connection open between requests.

5. If the tunneling script is located on the password-protected server, select Use Credentials and input login information (user, password) required to connect to the web server.

Tip: Select the Save password check box, otherwise while opening the connection, the Connect to MySQL Database dialog box will appear and dbForge Studio for MySQL will ask you to enter the password again.

6. If you can not access the web server directly, but only through a proxy server, select Use Proxy and specify proxy settings.

7. On the General tab set login information required to connect to the MySQL Server. Specify the following:
· Host - the host name of the remote MySQL Server located on the web server.
· Port - the TCP/IP port to connect to the remote MySQL Server. By default, it is 3306.
· User - the name of the user account on the remote MySQL Server.
· Password - the password of the user account on the remote MySQL Server.

8. Specify the default database of the MySQL Server. To see all available databases in the Database Explorer window, select Show all databases, otherwise you will see only the selected one.
9. (Optional) To test the created connection, click the Test Connection button.
10. Click OK to establish the database connection.

Tip: To see in the Database Explorer a more appropriate name for the created connection, change the default connection name. By default, it is generated like this: <selected database>.<MySQL Server host>.

See Also

Using HTTP Tunneling

Working with Embedded Server


Uploading the Tunneling Script

Note

The web server you will upload the tunneling script to should support PHP 5 and allow access to the MySQL Server.
1. Open Windows Explorer and type the following in the address line: ftp://web_server_name|ip address:port/. This will move you to the folders on the web server.
2. Enter the login information, if required.
3. Find the tunnel.php script in \Program Files\Installed Provider folder\dbForge Studio for MySQL\ folder (it is provided along with a distribution package of dbForge Studio for MySQL) and upload it to the required folder on the web server.

When the tunneling script is uploaded, set up HTTP tunneling to connect to the database. You will use the URL of the uploaded script while setting up HTTP connection.

See Also

Using HTTP Tunneling

Working with Embedded Server


Working with Embedded Server

Embedded Server is an easy at installation server to be used by applications that do not require multi-user work with data. As an example, Embedded Server can be used for money access machines, automatic cash desks, different electronic facilities and so on. Please refer to MySQL Reference Manual for more details about Embedded Server's features, usage, and licensing.

Limitations

Here are known restrictions of current Embedded Server version. All of them are caused by the server itself, it is not a problem of dbForge Studio. For troubleshooting tips, refer to MySQL documentation.

· Simultaneous usage of several copies of Embedded Server at the same machine can cause unexpected errors;
· Running Embedded and common Servers on the same machine can cause troubles. Simultaneous access to the same data from different instances of MySQL Server (for example, from MySQL Server and Embedded Server) can be a reason of data loss;
· Switching between Embedded MySQL Server and MySQL Server in case of using InnoDB also can cause unexpected problems;
· Your application may suddenly shut down if you have wrong configuration for Embedded Server. The same thing may happen because of some error inside the Server.

To install Embedded Server:

1. Download the server installation package from MySQL AB web site (http://dev.mysql.com/downloads/mysql/).
2. Install the server.
3. Create a directory for your Embedded Server. This will be your "basedir" directory.
4. Make sure you have libmysqld.dll available through PATH environment variable (for example, place it to your Windows\System32 directory), or place it to a directory, where dbForge Studio is installed.
5. Copy "share" folder from the MySQL server installation to the basedir.
6. Create a folder for data inside the basedir directory. This is your "datadir" directory. You can copy here "mysql" folder from your Server installation.
7. Now you can use MySQL Embedded Server.

To configure Embedded Server:

Do either of these ways to configure the Embedded Server before using it:

· Use my.ini file
· Specify data as parameters in connection string

To use my.ini file, you have to create it at the root Windows folder and fill its following sections:

[Server] - common settings for MySQL usual and Embedded servers.

[Embedded] - settings specific to Embedded server.

Tip: Find the details about the list of settings in MySQL Reference Manual.

Minimal my.ini example:

[embedded]
basedir=c:/servers/embedded/
datadir=c:/servers/embedded/data/

According to this configuration, contents of the 'share' folder can be found in the 'c:\servers\embedded\share\' path, data is located in the 'c:\servers\embedded\data\' folder. Notice the use of forward slashes instead of backslashes.

To connect to Embedded Server:

1. Open the Database Connection Properties dialog box by any of these ways:
· On the Database menu, select New Connection
· Click the [image] New Connection button on the Database Explorer toolbar
· Right-click in the Database Explorer window and select New Connection from the menu

Note

The Database Explorer is not available in the dbForge Data Compare for MySQL, dbForge Schema Compare for MySQL.
2. Switch to the Embedded tab of the Database Connection Properties dialog box.
3. Check Use embedded server.
4. Clear the Use my.ini file check box and fill Base directory and Data directory fields if you want to set these directories manually and don't want to use my.ini file.
5. Click OK to establish the database connection.

See Also

Viewing Database Schema Information


Viewing Database Schema Information

After database connection is created and opened, you can explore database schema hierarchy by expanding tree nodes. Database Explorer allows you to view, edit, create and drop database objects. To see what actions are available for specific node, right-click on it to display shortcut menu.

As other users modify the database, you can refresh the list of database objects displayed in the Database Explorer and their properties by clicking the Refresh button.

To rename a database object quickly, focus on it in the Database Explorer and press the F2 key or click it again after short pause.

The following node types are available for MySQL server connection:

· Database
· Table
· Column
· Index
· Key
· Function
· View (in MySQL v5.0.1 and higher)
· Stored Procedure (in MySQL v5.0 and higher)
· Stored Function (in MySQL v5.0 and higher)
· Stored procedure or function parameter (in MySQL v5.0 and higher)
· Trigger (in MySQL v5.0.13 and higher)
· Event (in MySQL 5.1.11 and higher)

You can view database object properties in the Properties window. Select Properties from the View menu or press F4.

To view additional information about the selected schema in the Database Explorer, open the Object Viewer window by selecting Object Viewer from the View menu. You can double-click tables, views, procedures, functions, triggers, events folders in the Database Explorer and the Object Viewer will open automatically.


Writing and Executing SQL Statements

In This Section

SQL Document Overview
Describes what SQL document is and how to treat it.

Writing SQL Statements
Basic tips on writing SQL statements ans working with SQL scripts.

Executing SQL Statements
Explains some special features for executing SQL statements.

How To: Work with Code Snippets
Explains how to insert, create, and modify code snippets.

How To: Work with Literals
Explains how to create and modify literals in code snippets.

Viewing Server Messages and Errors
Describes windows designed to display server messages and errors.

Statement Expansion
Describes statements expanding functionality.

Using Parameters
Information on how to use parameters to simplify process of editing the query.

Query Execution History
Describes how to use the Query History window to view, search and edit executed queries.

Executing Large Scripts
Tells how to execute a large script without opening it in the editor.

Opening Large Scripts in SQL Editor
Contains information about opening large scripts in the editor.

Associating Windows with Connection
Information on how documents and tool windows use connections.

SQL Document Shortcut Keys
Lists shortcut keys designed to facilitate your work with SQL documents and stored procedures.

Working with Command Line
Explains how to execute scripts and format code using command line.

Phrase Completion
Describes the phrase completion feature provided by dbForge Studio for MySQL.


SQL Document Overview

Most of the time you interact with a database by writing and executing SQL queries. In this way, SQL document is an essential part of every database tool in dbForge product line. It is a place where you create SQL statements in order to run them against a database server. This topic gives you an overview of SQL document layout, views, and functions.

To create a new SQL Document:

On the Standard toolbar, click New SQL.

The following image is an example of the SQL document.

Note

Actual document look may slightly vary from the image above, depending on the product you use.

SQL Document Overview

Each SQL document includes different representations of the content. They are called document views. On the above screen-shot you can see two document views: Text and Data.

· Text view contains SQL editor which allows you to write SQL statements.
· Data view, typically shown after a query is executed, displays a data editor with result sets returned by a database server.

To switch to a specific view:

· Click a button with a view name on the bottom-panel of the document.
· Right-click document bottom-panel to open the shortcut menu and select a view from the list.

Representing Query Execution Results

The query execution results can be represented in two ways - in text and in grid formats.

To represent results as text, on the SQL toolbar, click the Results as Text button before query execution. The following image represents a sample of query execution results in text format.

To represent results as grid, on the SQL toolbar, click the Results as Grid button before query execution. The following image represents a sample of query execution results in grid format.

Document Layout

SQL document has two types of view layout: Split Layout and Combined Layout. To switch document layout use appropriate buttons at the bottom-right corner of the document.

Split Layout

In the split layout a document has one prominent (main) view which is aligned to the top of the document view port. Other views are called additional, they are displayed in the bottom area of the document view port.

Main view remains always in split layout visible and you can toggle only additional views. But you can see two views at a time to avoid unnecessary switching.

To temporary hide additional document views, click the [image] Hide/Show additional document views button at the bottom-right corner of the document, or just press CTRL+R.

To change the main document view, use the Swap main and additional documents views button to swap the main view and active additional view.

Combined Layout

In the combined layout you can see only one view at a time. A document view fills entire document view port. Typically, you need this layout when you a focusing on one specific document representation (for example, when you extensively work with data).

See Also

Writing and Executing SQL Statements

Writing SQL Statements


Writing SQL Statements

Every SQL document contains the Text view with SQL editor in it. You switch to this view to edit your SQL queries.

When you type text in SQL editor, it automatically recognizes and highlights SQL syntax.

For ease of SQL writing and reviewing, you can also use such supported shortcut keys as: CTRL+PLUS (+) KEY (to zoom the query in), CTRL+MINUS (-) KEY (to zoom the query out), CTRL+0 (to return an SQL document to the one-to-one scale).

You write and execute SQL queries not only one at a time but you may as well compose SQL scripts. SQL scripts consist of multiple SQL statements separated by the appropriate statement delimiter.

See Also

Writing and Executing SQL Statements

Executing SQL Statements


Executing SQL Statements

How to Run Execution

Entire Script

To execute the entire script, click the Execute button on the SQL toolbar.

Alternatively, on the SQL menu, select the Execute command.

Selected Block of Text

To execute an arbitrary text block:

1. Select the text block using the mouse or keyboard.
2. Run the Execute command as when executing the entire script. Alternatively, select Execute Selection from the shortcut menu of SQL Editor

Current Statement

To execute current statement, click the Execute Current Statement button on the SQL toolbar.

Alternatively, right-click a required statement, and select Execute Current Statement command on the shortcut menu.

Execute to Cursor

To execute script to the current position of the cursor:

1. Move cursor to the required position.
2. Click Execute to Cursor on the shortcut menu or press Ctrl+Shift+F10.

How to Stop Execution

To stop SQL execution, click Stop Execution the SQL toolbar.

Representing Query Execution Results

The query execution results can be represented in two ways - in text and in grid formats.

To represent results as text, click Results as Text on the SQL toolbar before query execution.

To represent results as grid, click Results as Grid on the SQL toolbar before query execution.

See Also

Writing and Executing SQL Statements


Viewing Server Messages and Errors

When you run a query against a database server, it returns a response to the client. There are three types of server response to an SQL query:

· Tabular data
· Status (info) message
· Error

Tabular data is displayed in the data editor. Status messages and errors are logged to the Output window. Errors are not only logged to the Output window, but are also shown in the Error List window.

Using Output Window

The following image shows the general view of the Output window.

Note

Depending on the product, the Output window appearance may vary.

Output Panes

The window can contain up to three output panes (depending on the specific product):

· The General pane contains most output messages, not only from a database server, but from the application itself.
· The SQL Log pane displays all SQL queries executed by the application during the current session. To see these queries, select the Write queries sent by the program to SQL Log option in the Output, Environment, Options dialog box.
· The Debug pane contains messages sent by a stored procedure debugger.

As you can see from the previous screen-shot, server errors are also logged to the Output window. You can navigate to the place of an error by double-click or from the shortcut menu.

Searching Output Messages

You can search text in Output window. To find specific text:

1. Focus the Output window.
2. Open the Find and Replace window by pressing CTRL+F.
3. Enter search text and press the Enter key on the keyboard or click the Search button.

Using Error List Window

When something goes wrong, typically you see an error. If this is a user or database server error, such as mistyped query, in most cases you will see it in Error List window.

Here is an example of an error displayed in Error List.

Error List shows not only errors, but also warnings and informational messages which require user attention. Warning is in essence a non-blocking error. And informational message is just a user notification.

You can filter messages by type using appropriate buttons on the toolbar of Error List window.

You can navigate to the place of an error by double-clicking it in the list or by selecting Go to Error from the shortcut menu.

How to View Errors from Current Document Only

Error List aggregates all error messages in the application. And if you have multiple open documents with errors, the error processing can quickly become awkward.

But the window has one more filter button - In Active Document. This button allows to view only those errors that are located in current document window.

See Also

Writing and Executing SQL Statements

Using Parameters


Statement Expansion

Wildcard expansion

This feature allows you to replace the asterisk (*) symbol with the list of columns from the required table or view on pressing the TAB key.

Inserting columns list on pressing TAB

You may insert a list of columns available for the needed objects (tables, views, etc.) of the FROM list instead of the * symbol by pressing the TAB key. If such list can be inserted, a hint is displayed when the cursor is after the * symbol.

Expanding INSERT and ALTER statements

This feature saves much time for users as it allows them to type just available table names, views or events in the ALTER and INSERT statements and expand the statement to the full template by pressing the TAB key.

Expanding the ALTER VIEW statement

1. Start typing the ALTER VIEW statement. Select actor_info from the appeared suggestion list. Press ENTER.

2. The TAB key hint appears.

3. Press TAB to display the view definition.

Execute current statement

You can execute a current SQL statement without selecting it. You just need to place the cursor in the statement, and press F8 - dbForge Studio will define statement boundaries itself.

See Also

Writing and Executing SQL Statements

Using Parameters


Using Parameters

What is a Parameter?

Parameter is a placeholder for a variable that contains a value of some type that is passed to a database server along with the SQL text at the query execution time. Also parameter can hold values returned by a server after query or stored procedure execution.

You can benefit from using of parameters in the following situations:

· When you execute a query multiple times with different input values
· When you debug a query from your application code

Adding Parameters to a Query Text

There are two types of parameters, that you can add to a query text:

· Named parameter
· Unnamed parameter

Named Parameters

Parameters are declared using ':' or '@' prefix followed by name of the parameter.

For example:

SELECT
employee.*
FROM
hr.employee
WHERE
employee.title = :job AND
employee.vacation_hours <= :level

:job and :level are parameters in this query.

Unnamed Parameters

Unnamed parameters can be specified as '?' symbol.

For example:

SELECT
employee.*
FROM
hr.employee
WHERE
employee.title = ? AND
employee.vacation_hours <= ?

Parameters for this query are created in the order of appearance.

Modifying Parameter Values and Types

When you run a query that contains parameters with empty values, you will be automatically prompted to initialize them.

To set parameter values and types click Edit Parameters on the SQL toolbar or main menu. In the Edit Parameters dialog box set parameters' type, value, and other properties.

Note

When you execute a query with preset parameter values, you will not be automatically prompted to edit them. To edit parameters, press F8 or select Edit Parameters on the SQL toolbar.

See Also

Writing and Executing SQL Statements

Query Execution History


Query Execution History

The Execution History window allows you to view, search, edit the executed queries. To open the window, click [image] on the SQL toolbar. Alternatively, point to Other Windows in the View menu, and then click Execution History.

The window looks in the following way:

Setting Up Execution History behavior

To set up behavior of execution history:

1. On the Tools menu, click Options. The Options dialog box opens.
2. Navigate to Environment, Documents, Execution History.
3. To enable storing query execution history, select the check box next to the Store executed queries within option, and set the number of days to store executed queries.
4. Optionally, modify the path to store the execution history database, maximum script size to store, and timeframe for default output of execution history.

Filtering Execution History

To quickly find the required query, you can:

· Type the search string into the Search box and specify query execution time frame.
· Use sorting, grouping and filtering.

Editing Query

To edit an executed query, select it the list, and click Edit Query in the Query DDL section of the window. The query will be opened in a new SQL document.

See Also

Writing and Executing SQL Statements

Executing Large Scripts


Executing Large Scripts

dbForge Studio allows you to execute large scripts without opening them in the SQL editor and loading the whole script in memory. When you try to open a large script, you will be prompted to execute it with help of the Execute Script Wizard.

To execute a large script, do the following:

1. To open the Execute Script Wizard, go to the Database menu, and click [image] Execute Large Script.
2. Click the Connection field to select a connection to a required database server against which you want to execute your script. In the drop-down list of the field, you can click the <Manage...> link to open the Connection Manager dialog box. It will help you to create a connection if necessary.
3. Click the Database drop-down list to select a required from the list of those databases that are available on the selected database server.
4. In the File name box specify the path to the script you want to execute.
5. In the SQL file encoding field check that the file encoding is selected correctly. The program automatically selects it basing on the script, if it fails, the default encoding (the current Windows encoding on the machine where the program is running) is selected. You can always select a required encoding from the drop-down list.
6. Click Execute to execute the script.

Tip: See all script execution messages in the Output window.

See Also

Writing and Executing SQL Statements

Opening Large Scripts in SQL Editor


Opening Large Scripts in SQL Editor

To avoid performance slowdown, some features are disabled when working with large SQL scripts.

If script size exceeds 10 Mb, the SQL syntax highlight is disabled. It is not enabled when you reduce the script in the editor. You should reopen script to re-enable the feature.

Note

Maximum file size the application can open depends on available memory on your computer.

See Also

Writing and Executing SQL Statements


Associating Windows with Connection

When several connection are established in the Database Explorer, you can execute queries or perform another actions with either of them. SQL documents are associated with a connection which you can see or set on the Connection toolbar. The drop-down list in the toolbar shows what connection is associated with the active document or tool window. If a tool window, that does not require a connection, is active, connection of the active document (or tool window in the document area) is displayed.

When creating or opening a SQL document, it is assigned a default connection. If you create SQL document with no connection present in Database Explorer, the document will have no connection and you can not execute SQL or retrieve data. You can change connection for SQL document by selecting required connection in the Document Connection box on the Connection toolbar.

See Also

Writing and Executing SQL Statements

SQL Document Shortcut Keys


SQL Document Shortcut Keys

Use following shortcut keys when working with an SQL document or stored procedure.

Icon | Command Name | Shortcut Keys | Action | Where is used
 | Execute | F5 | Execute query associated with current document | SQL Editor, Query Builder
 | Execute Current Statement | F8 | Execute current statement | SQL Editor
 | Execution History | CTRL+ALT+H | Opens the Execution History window | SQL Editor
 | Edit Parameters | CTRL+SHIFT+P | Edit parameters | SQL Editor
 | List Members | CTRL+J | List members | SQL Editor
 | List Members | CTRL+K, L | List members | SQL Editor
 | Complete Word | CTRL+SPACE | Complete word | SQL Editor
 | Complete Word | CTRL+K, W | Complete word | SQL Editor
 | Complete Word | Alt+RIGHT ARROW | Complete word | SQL Editor
 | Parameter Info | CTRL+SHIFT+SPACE | Parameter information | SQL Editor
 | Parameter Info | CTRL+K, P | Parameter information | SQL Editor
 | Insert Template | CTRL+K, X | Insert code template | SQL Editor
 | Insert Template | CTRL+K, CTRL+X | Insert code template | SQL Editor
 | Quick Info | CTRL+K, I | Display quick information | SQL Editor
 | Quick Info | CTRL+K, CTRL+I | Display quick information | SQL Editor
 | Comment Selection | CTRL+E, C | Comment selection | SQL Editor
 | Uncomment Selection | CTRL+E, U | Uncomment selection | SQL Editor
 | Toggle Outlining Expansion | CTRL+M, M | Toggle outlining expansion | SQL Editor
 | Toggle All Outlining | CTRL+M, L | Toggle all outlining | SQL Editor
 | Stop Outlining | CTRL+M, P | Stop outlining | SQL Editor
 |  | CTRL+F2 | Switch to Navigation Bar | SQL Editor
 |  | CTRL+ALT+PGUP | Switch from the current document tab to the previous tab | SQL Editor
 |  | CTRL+ALT+PGDOWN | Switch form the current document tab to the next tab | SQL Editor
 | Go To Definition | F12 | Go to definition | SQL Editor
 |  | CTRL+R | Hide/Show additional document views | SQL Editor
 |  | CTRL+L | Delete current code line and copy it to clipboard | SQL Editor

These shortcuts are default shortcuts. All shortcuts can be customized.

See Also

Writing and Executing SQL Statements

How To: Work with Literals


Working with Literals

This topic explains how to work with literals used in code snippets.

Creating a New Literal

1. Click [image] Snippets Manager on the Tools menu. The Snippets Manager window opens.
2. Select a snippet in the list of available snippets to add a literal to.
3. Under the Literals field, click the Add button. The Edit literal window opens.
4. Specify the literal's name, default value, and description in the corresponding fields.
5. Click OK to add the literal to the list.

Editing a Literal

1. Click [image] Snippets Manager on the Tools menu. The Snippets Manager window opens.
2. Choose the required snippet in the list of snippets and the literal in the Literals field.

Note

Predefined literals cannot be modified.
3. Click the Edit button below the Literals field. The Edit literal window opens.
4. Modify the literal's name, default value, and description.
5. Click OK to save the changes.

See Also

Writing and Executing SQL Statements

How To: Work with Code Snippets


Working with Code Snippets

This topic explains how to use code snippets in dbForge Studio for MySQL.

Code snippets help to boost SQL code typing. You can use predefined snippets provided in the application and create your own to insert them in SQL scripts and queries.

dbForge Studio code snippets are XML files with the .snippet file name extension.

The Code Snippets window contains a rich collection of templates organized in folders. In this window, you can arrange and preview snippets. To view a snippet, select it in the window. If the preview pane is not visible, right-click a snippet and select [image] Toggle preview from the menu.

Inserting Code Snippets

1. Click [image] Code Snippets on the View menu. The Code Snippets window opens.
2. In the Code Snippets window, choose the required template and drag it to the SQL editor.
3. Specify variable names and parameter values in the lines marked green, and the press ENTER to complete code fragment editing.

Alternatively

1. Click Insert Snippet on the SQL Editor shortcut menu.
2. Select the required template.
3. Use the UP ARROW and DOWN ARROW keys to select the item in the snippets list.
4. Specify variable names and parameter values in the lines marked green and press ENTER to complete code fragment editing.

Code snippets can also be inserted by entering template shortcut word or words and pressing the TAB key.

Note

If you want to include a code fragment into the inserted template, select it with the mouse pointer before placing snippet to the editor. If the snippet does not provide surrounding, selected text will be deleted.

To move the snippet to the root folder of the Code Snippets window, drag it on the one that already is in the root folder or to the upper border of the Code Snippets window.

Creating Code Snippets

1. Click [image] Snippets Manager on the Tools menu. The Snippets Manager window opens.
2. Click [image] New Snippet on the manager toolbar.

Note

Actual document look may slightly vary from the above image, depending on the product you use.
3. In the Text field, enter the text of the snippet.
4. Specify a shortcut and snippet description in the corresponding Shortcut and Description fields.

Notes

The Location field is read-only and is filled automatically when you choose the folder available in the list of snippets.

The shortcut (if any) will be taken as snippet name. If there is no shortcut specified, the new snippet will be named Snippet. To change the snippet name, double click it in the list of snippets and enter the needed name.
5. Click Save on the toolbar.

Editing Code Snippets

1. Click [image] Snippets Manager on the Tools menu. The Snippets Manager window opens.
2. Select the required snippet from the list of available snippets.

Note

Actual document look may slightly vary from the above image, depending on the product you use.
3. Modify the snippet's description, shortcut, and text in the corresponding fields.
4. Click the Save button on the manager toolbar.
5. To change the snippet name, double click it in the list of available snippets.

Default Snippets Location

By default, all snippets are stored in a folder that is located at C:\ProgramData\Devart\dbForge Studio for MySQL\Snippets.

You can change the default location when editing an existing snippet or creating a new one by setting a new path in the Location field of Snippets Manager.

See Also

Writing and Executing SQL Statements

Executing Scripts through the Command Line


Working with Command Line

This section explains how to work with data reports using command line interface. It provides comprehensive examples of the frequently used tasks that can be performed with data reports through command line.

Note

The command line functionality is available only in certain editions of dbForge Studio. For the detailed information on features availability in the dbForge Studio editions, please refer to the Editions topic.

In This Section

Executing Scripts through the Command Line
Describes hot to execute scripts through the command line.

Exit Codes used in Command Line for /execute
Describes exit codes for the /execute switch.

Formatting Code through the Command Line
Describes hot to format code through the command line.

Exit Codes used in Command Line for /formatsql
Describes exit codes for the /formatsql switch.

See Also

Writing Data Reports

Advanced Topics


Executing Scripts through the Command Line

You can automate executing the scripts using the command line.

Note

The command line functionality is available only in certain editions of dbForge Studio. For the detailed information on features availability in the dbForge Studio editions, please refer to the Editions topic.

1. Click Start.
2. Type 'cmd' in the Search programs and files text box and press the ENTER button.

Note

To run the Command Line in Windows 8:

From the Desktop Mode

· Move the mouse cursor to the exact lower left corner until the desktop shortcuts menu appears.
· Right-click to see the shortcut menu and than click Run.

From the Charms Bar

· Move your mouse to the upper right corner until the Charms Bar appears.
· Select Apps from the list and type “run” in the search box.
· Click Run from the search results.

Use Windows + R Shortcut Keys

· In desktop mode, press the Windows + R keys, to show the Run command line.
3. Type a path to the dbforgemysql.com file located in the dbForge Studio for MySQL installation folder on your PC, and press the SPACE key.

C:\Program Files\Devart\dbForge Studio for MySQL\dbforgemysql.com

4. To execute the corresponding script, use the /execute command, and press the SPACE key.

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /execute /?

5. Specify connection details of the server where to execute the script.

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /execute /connection:"User Id=root;Host=db;Port=3320;Database=test;Character Set=utf8"

6. Specify the script file.

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /execute /connection:"User Id=root;Host=db;Port=3320;Database=test;Character Set=utf8" /inputfile "script.sql"

7. Specify the password.

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /execute /connection:"User Id=root;Host=db;Port=3320;Database=test;Character Set=utf8" /inputfile "script.sql" /Password:mypsw

8. To hide the command line window, use the /quiet command. (Useful for batch files).

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /execute /connection:"User Id=root;Host=db;Port=3320;Database=test;Character Set=utf8" /inputfile "script.sql" /Password:mypsw /quiet

9. Press ENTER to run the process.

If you use the /argfile argument, all the following commands are specified inside an argfile:

/execute

/connection:"User Id=root;Host=db;Port=3320;Database=test;Character Set=utf8"

/inputfile "script.sql"

In this case, the command line string will be written as follows:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /argfile:myarg.txt

Arguments Used in Command Line

Select corresponding command line switches to perform the required operations:

Argument | Action and Usage
/connection | This switch is used to specify a connection string. Command usage looks like: /connection:<connection_string>
/database | This switch is used to specify a database to execute the script to. Databases specified in the script before will be ignored. It does not affect the objects specified with fully qualified names.
/inputfile | This switch is used to specify an SQL or ZIP file with the script to execute.
/password | This switch is used to specify a server password. It overrides the password specified in the connection string. Command line usage looks like: /password:<pw>
/encoding | This switch is used to specify the encoding which should be applied to open and execute the script. Command line usage looks like: /encoding:<encoding>

See Also

Writing and Executing SQL Statements

Exit Codes used in Command Line for /execute


Exit Codes used in Command Line for /execute

If script execution is run through the command-line interface, the following exit codes are returned depending on the execution result:

Error Code | Description | Additional Information
0 | Success | The operation been completed with no errors.
10 | Command line usage error | The command line was used incorrectly. For example, an incorrect flag, or incorrect syntax may have been used.
11 | Illegal argument duplication | Some arguments must not appear more that once.
20 | Trial expired | The trial period has expired, or dbForge Studio has not been activated.
40 | Server connection fail | Server connection failed.
103 | Execution error | A script execution error occurred.
105 | Resource unavailable | A file is missing.

See Also

Writing and Executing SQL Statements

Formatting Code through the Command Line


Formatting Code through the Command Line

You can automate code formatting using the command line.

Note

The command line functionality is available only in certain editions of dbForge Studio. For the detailed information on features availability in the dbForge Studio editions, please refer to the Editions topic.

1. Click Start.
2. Type 'cmd' in the Search programs and files text box and press the ENTER button.

Note

To run the Command Line in Windows 8:

From the Desktop Mode

· Move the mouse cursor to the exact lower left corner until the desktop shortcuts menu appears.
· Right-click to see the shortcut menu and than click Run.

From the Charms Bar

· Move your mouse to the upper right corner until the Charms Bar appears.
· Select Apps from the list and type “run” in the search box.
· Click Run from the search results.

Use Windows + R Shortcut Keys

· In desktop mode, press the Windows + R keys, to show the Run command line.
3. Type a path to the dbforgemysql.com file located in the dbForge Studio for MySQL installation folder on your PC, and press the SPACE key.

C:\Program Files\Devart\dbForge Studio for MySQL\dbforgemysql.com

4. Specify the operation you want to perform (code formatting) and the required parameters and arguments:

dbforgemysql /formatsql [/switch1[:value | [parameter1:value parameter2:value ..]] /switch2 ..]

Tip: To see a quick help on the arguments available in the command line, type the following:

/formatsql /?

5. Press ENTER to run the process.

Note

You can set the unlimited quantity of the required extensions:
dbforgemysql /formatsql /sourcefolder:"c:\" /filextention:*.sql /filextention:*.prg /filextention:*.db1

Arguments Used in Command Line

Select corresponding command line switches to perform the required operations:

Argument | Action and Usage
/connection | This switch is used to specify a connection string. Command usage looks like: /connection:<connection_string>
/encoding | This switch specifies the encoding which should be applied to open and save files. Command line usage looks like: /encoding:<codepage|encoding name>
/filextention | This switch is used to specify the extension of the source folder files that will be formatted. The .sql extension is selected by default. Command usage looks like: /filextention:*.<sql|prc|txt|...>
/includesubfolders | This switch is used to include the current directory and all subdirectories in search operation. Command usage looks like: /includesubfolders
/log | This switch is used to generate a formatting log file in the specified directory. Command usage looks like: /log:<filepath>
/outputfile | This switch is used to specify the path to an output file where formatting results of the source file will be saved (in this case, the source file is saved without changing). If the parameter is not specified, the formatting results will be saved in the source file. Command usage looks like: /outputfile:<path>
/outputfolder | This switch is used to specify the patch to an output folder where the source folder files with formatting results will be saved (files form the source folder will no be changed). If the parameter is not specified, the formatting results will be saved in the source folder. Command usage looks like: /outputfolder:<path>
/password | This switch is used to specify a server password. It overrides the password specified in the connection string. Command usage looks like: /password:<pw>
/profile | This switch is used to specify the path to a file that contains settings for formatting options. If the parameter is not specified, the default settings will be applied to the formatting options. Command usage looks like: /profile:<path>
/sourcefile | This switch is used to specify the source SQL file to be formatted. Command usage looks like: /sourcefile:<path>
/soucefolder | This switch is used to specify the path to a folder where the files for formatting are located. Command usage looks like: /sourcefolder:<path>

See Also

Exit Codes used in Command Line for /formatsql

Writing and Executing SQL Statements


Exit Codes used in Command Line for /formatsql

If code formatting is run through the command-line interface, the following exit codes are returned depending on the execution result:

Error Code | Description | Additional Information
0 | Success | The operation been completed with no errors.
10 | Command line usage error | The command line was used incorrectly. For example, an incorrect flag, or incorrect syntax may have been used.
11 | Illegal argument duplication | Some arguments must not appear more that once.
20 | Trial expired | The trial period has expired, or dbForge Studio has not been activated.
40 | Server connection fail | Server connection failed.
103 | Execution error | A script execution error occurred.
105 | Resource unavailable | A file is missing.

See Also

Phrase Completion

Writing and Executing SQL Statements


Phrase Completion

Code Completion suggests not only separate keywords and object names, but entire code phrases. The following code phrases are supported:

· BINLOG EVENTS
· BINARY LOGS
· BLOCK IO
· CACHE INDEX
· CHANGE MASTER
· CHARACTER SET
· CHECKSUM TABLE
· COALESCE PARTITION
· CONTEXT SWITCHES
· CROSS JOIN
· DUPLICATE KEY UPDATE
· ENCLOSED BY
· ESCAPED BY
· EXCHANGE PARTITION
· FOR CONNECTION
· FOR EACH ROW
· FOR QUERY
· FOR UPDATE
· FOREIGN KEY
· GROUP BY
· IDENTIFIED BY
· INNER JOIN
· KEY UPDATE
· MODIFIES SQL DATA
· NOT EXISTS
· NOT FOUND
· NOT NULL
· NOT PRESERVE
· ON COMPLETION
· ON DUPLICATE KEY UPDATE
· ON SCHEDULE
· ON SLAVE
· ON UPDATE CURRENT_TIMESTAMP
· ORDER BY
· OUTER JOIN
· OPEN TABLES
· PAGE FAULTS
· PRIMARY KEY
· READS SQL DATA
· REBUILD PARTITION
· RELAYLOG EVENTS
· RELEASE SAVEPOINT
· REORGANIZE PARTITION
· SHARE MODE
· SOUNDS LIKE
· SQL DATA
· SQL SECURITY
· STARTING BY
· TEMPORARY TABLE
· TERMINATED BY
· UPGRADE DATA DIRECTORY NAME

Example

GROUP BY is prompted in the SELECT query.

See Also

Writing and Executing SQL Statements

Building Queries with Query Builder


Building Queries with Query Builder

In This Section

Query Builder Overview
Provides basic information about Query Builder.

How To: Add Tables to Query
Describes how to add tables to SELECT list when visually building a query.

How To: Remove Tables from Query
Information on how to remove tables from SELECT statements.

How To: Include Columns in Query
Information on how to setup SELECT clause.

How To: Make Joins Between Tables
Information on how to create relations between tables.

How To: Build WHERE or HAVING Clause
Information on how to set up WHERE and HAVING clauses.

How To: Include Fields in GROUP BY or ORDER BY Clauses
Information on how to setup GROUP BY and ORDER BY clauses.

Building a Query in Visual Mode
Contains a step-by-step procedure to easily create inner and outer joins and customize a query.

Working with Different Query Types
Tells how to use types of queries.

Working with Query Diagram
Tells how to manage shapes on the diagram.

Working with Subqueries
Tells how to create and edit subqueries.

Navigating Query with Document Outline
Describes how to navigate queries with the Document Outline window.


Query Builder Overview

Query Builder is designed to enhance productivity and simplify SQL query building tasks. Query Builder provides a graphical user interface for creating SQL queries. You can drag-and-drop multiple tables, views and their columns onto a visual designer to generate SQL statements.

You can use Query Builder to perform the following tasks:

Working with a graphical representation of a query or with SQL code
Query Builder includes a pane that displays your query graphically and a pane that displays the SQL text of your query. You can work in either the graphical pane or the text pane. Query Builder synchronizes the views so that they are always current.

Joining related tables
If you add more than one table to your query, Query Builder automatically determines how the tables are related and constructs the appropriate join command.

Querying or updating databases
You can use Query Builder to return data by using SELECT statements and to create queries that update, add, or delete records in a database.

Viewing and editing results immediately
You can run your query and work with a recordset in a grid that allows you to scroll through and edit records in the database.

See Also

Building Queries with Query Builder

How To: Add Tables to Query


How To: Add Tables to Query

The first step in building a SELECT query is to decide which tables and views you need to add to SELECT list.

Adding Tables and Views

To add tables and views to the query, simply drag-and-drop them from the Database Explorer tree to the query diagram.

You can also select required tables in the Database Explorer, right click the selected tables, and then click Send To, and then click Query Builder. Table shapes with the lists of table columns appear. Select the columns to include them into the SELECT list. Check "All Columns" option if you want to select all the fields in a table.

After you have added tables to the query diagram, you can use the Selection tab of the tabbed editor to adjust the query to your needs.

Note

A connection you are using while dragging a table must be the connection of the query document. You will not be able to perform a drag and drop operation from another connection.

Note

The appearance may slightly vary depending on the product you use.

Besides tables, you can also add views to the diagram.

They are displayed as shapes with the list of columns which you can mark to include in the SELECT list.

See Also

Building Queries with Query Builder

How To: Remove Tables from Query


Remove Tables from Query

You can remove a table or any table-valued object from the query.

To remove a table or table-structured object

· In the Diagram Pane, select a table, view, function, synonym, or query, and then press DELETE, or right-click the object and then click Remove from the diagram. You can select and remove multiple objects at one time.

Alternatively

· Remove all references to the object in the SQL editor.

When you remove a table or table-valued object, the Query Builder automatically removes joins that involve that table or table-valued object and removes references to the object's columns in the SQL editor and.

Note

Removing a table or table-valued object does not delete anything from the database, it only removes it from the current query.

See Also

Building Queries with Query Builder

How To: Include Columns in Query


How To: Include Columns in Query

To use a column in a query, you must add it to the query. You may add a column to display it in query output, to use it for sorting, to search the contents of the column, or to summarize its contents.

To add an individual column

· In the Diagram Pane, select the check box next to the column that you want to include.

Alternatively

· In the Tabbed Editor, move to the first blank grid row, click the field in the Column column, and select a table and a column name from the drop-down list.

To add all columns for one table or table-valued object

· In the Diagram Pane, select the check box next to *(All Columns).

To add all columns for all tables and table-structured objects

1. In the Design Pane, select all tables.
2. Make sure no join lines in the Design Pane are selected.
3. Right-click any table and select Select all columns from the shortcut menu.

See Also

Building Queries with Query Builder

How To: Make Joins Between Tables


How To: Make Joins Between Tables

A join between two tables describes how these tables are related. Depending on a join kind you can get different results for the same tables. Refer to SQL manual for information on joins and their effect. dbForge Studio allows you to visually create 5 kinds of joins: inner, left outer, right outer, natural, and cross join. You can also easily set very complex conditions for any kind of joins.

Creating Joins

To add a join between two tables, do either of these actions:

· Use the diagram - Drag-and-drop a source column from one table to a destination column in the second table.
· Use the Joins tab of the tabbed editor - Click the [image] button of the top tree node. A new empty join with an empty condition will appear. Click the <Enter table name> field and specify the join tables. You may type them or select them from the drop-down list. Then set the join kind by clicking the red-colored join kind and selecting a required item from the shortcut menu. You can remove a join by clicking its [image] button.

To edit join properties, use the toolbar, connector shortcut menu, or Joins tab of the tabbed editor.

To change a join kind, use the [image] Select all rows from "[table]" and [image] Select all rows from "[table]" buttons on the Query toolbar.

To remove a join, select the connector, then either right-click on it and choose Remove from Diagram or hit the DELETE key.

Note

Joins are automatically created when a table with foreign key and its referenced table is placed on the diagram.

Working with join conditions and condition groups

The tabbed editor shows joins as a tree with join, condition and group nodes. A join consists of conditions and condition groups. A group consists of several conditions or subgroups, united with a logical operator. You can change a group logical operator by clicking it and selecting another one from the menu. To navigate between conditions and groups, use the UP ARROW and DOWN ARROW keys. Use the LEFT ARROW and RIGHT ARROW keys to navigate between a criteria operator and operands.

To create a new group, click the upper-level group operator or join kind and choose Add Group from the appeared menu.

To create a new condition, do the following:

1. Navigate to the group or the join you want to enhance and click the [image] button or press the INSERT or PLUS SIGN key. Alternatively, click the upper-level group operator and choose Add Condition from the appeared menu.
2. Click the condition column and select a column you need from the appeared menu.
3. Click the condition criteria operator and select a criteria operator you want to apply.
4. If the condition operator requires operand value(s), specify it (them).

To remove a condition, click the [image] condition button or navigate to the condition and press the DELETE or MINUS SIGN key. To remove a group, click its logical operator and choose Remove Group from the appeared menu or navigate to the group and press the DELETE or the MINUS SIGN key.

You also can copy, cut, and paste conditions and groups with CTRL+C, CTRL+X, and CTRL+V keys.

See Also

Building Queries with Query Builder

How To: Build WHERE or HAVING Clause


How To: Build WHERE or HAVING Clause

When retrieving data, you may want to set up a filtering expression or relation between tables. You can do it using WHERE and HAVING clauses. Refer to SQL manual to learn what's different in these sections. In dbForge Studio visual interface for WHERE and HAVING clauses is the same.

In the tabbed editor conditions are displayed as a tree with condition and group nodes. A group consists of several conditions or subgroups, united with a logical operator. You can change a group logical operator by clicking it and selecting another one from the menu. To navigate between conditions and groups, use the UP ARROW and DOWN ARROW keys. Use the LEFT ARROW and RIGHT ARROW keys to navigate between criteria operator and operands.

To create a new group, do one of the following:

· Click the upper-level group operator and choose Add Group from the appeared menu.
· Press CTRL+PLUS SIGN.

Building WHERE and HAVING Clause

To create a new condition, do the following:

1. Navigate to the group you want to enhance and click the [image] button or press INSERT or PLUS SIGN key. Alternatively, click the upper-level group operator and choose Add Condition from the appeared menu.
2. Click the condition column and select the column you need from the appeared menu.
3. Click the condition criteria operator and select the criteria operator you want from the list.
4. If the condition operator requires operand value(s), specify it (them).

To remove a condition, click the [image] condition button or navigate to condition and press DELETE or MINUS SIGN key. To remove a group click its logical operator and choose Remove Group from the appeared menu or navigate to the group and press DELETE or MINUS SIGN key.

You also can copy, cut, and paste conditions and groups with CTRL+C, CTRL+X, and CTRL+V keys.

The following clause is generated according to the sample image:

WHERE
Product.Color = 'silver' AND
ProductCategory.Name >= 'components'

See Also

Building Queries with Query Builder

How To: Include Fields in GROUP BY or ORDER BY Clauses


How To: Include Fields in GROUP BY or ORDER BY Clauses

When you need to group resulting data, you must specify the field you want to group on in GROUP BY clause. When you want to sort data by a field, you must include the field in ORDER BY list. In dbForge Studio, the interface for this clauses is approximately the same. The only difference is that ORDER BY tab has the Change Order button that you can use to alter sorting direction.

Including Fields in ORDER BY Clause

To include fields in ORDER BY clause, switch to the corresponding tab of the tabbed editor and perform the following steps:

1. Select the field you want to perform grouping/ordering on and click the right arrow button.
2. Repeat this operation for every field that should be added to the clause.
3. Use the up arrow and down arrow buttons to change the order of columns.
4. If you want to exclude a field from the list, select it and click the left arrow button.
5. For ordering lists, select a field and click the Change Order button to alter the sorting order.

See Also

Building Queries with Query Builder

Building a Query in Visual Mode


Building a Query in Visual Mode

In this walkthrough you will learn how to use Query Builder in generating SELECT statements.

Retrieving Data from Tables Using Query Builder

Suppose you need to know what department the employee belongs to. To accomplish this task, it is needed to get employee's name and department internal code from one table (Emp) and name of the department from another table (Dept).

Creating Inner Join between Two Tables

1. In the Database Explorer make sure that connection to your server containing the base ("Demobase") is active.
2. Click [image] Query Builder on the SQL Development tab of Start Page.
3. Drag the table Emp from the Database Explorer onto the query diagram of the document. A table shape should appear containing a list of table's columns. Do the same for Dept.
4. Select the EName check box field in the Emp table shape and the Dname check box field in the Dept table shape to include them into the SELECT list. These fields appear in the Selection tab of the tabbed editor below the query diagram.
5. Drag the field DeptNo from the Emp table shape onto the same field at the Dept table shape. A connector between two tables appear, indicating the relation has been established.
6. Switch to the Joins tab of the tabbed editor to make sure the relation has been established properly. You can see "Emp.DeptNo=Dept.DeptNo" string.
7. Click [image] on the Query toolbar to perform the query.
EName | Dname
Smith | Sales
Allen | Sales2
Ward | Sales2
Jones | Sales
Martin | Sales2
Blake | Sales2
King | Accounting

Creating an Outer Join Between Two Tables

Now when data from several tables can be retrieved at the same query, let's have a closer look at the SQL statement that was just composed. A distinctive feature of the INNER JOIN is that if an employee has DeptNo, which is never encountered in the Dept table, then this employee will not be listed in the query result. You can set value of DeptNo to other than 10, 20 or 30 to make sure that after performing the same query the corresponding entry disappears from the returned data. An OUTER JOIN should be used to save the situation.

To create an OUTER JOIN:

1. Right-click the connector between two tables.
2. Estimate the position of table shapes on the query diagram. If the table shape representing table Emp is to the left of the connector, choose Select all rows from "Emp" from the shortcut menu. Notice that the middle of the connection has changed its form.
3. Switch to the Joins tab of the tabbed editor to see the changes. To click the red-colored join kind and to choose Left Outer Join from the shortcut menu is an alternative way to set up the relation.
4. Click the [image] Execute button on the Query toolbar to execute the query.

The result of this query should be exactly as of previous. To see how the outer join works, change a value of DeptNo in either of the tables to a unique value and re-execute the query.

Customizing a Query Using Query Builder

There are six clauses in the SELECT statement and for every clause there is a tab in the tabbed editor. The tabbed editor is the easiest way to adjust a query to your needs. Now the previous query should become a bit more complex. Suppose it is needed to find out how much money employees earn in each department. Let's exclude a president from the list and sort it by money amount in descending order.

1. Switch to the Design view of the query that was built in the previous part of the walkthrough.
2. In the Emp table shape, clear the check-box next to the EName field to exclude it from SELECT list.
3. Switch to the Selection tab of the tabbed editor. Click the first empty cell and select Emp.Sal (SAL (emp)) field from the drop-down list.
4. In the same row, click the column Alias and enter a pseudonym for the field. Let it be "Money".
5. In the same row, click the Function column and choose Sum from the drop-down list. Pay attention to the changes that occurred in the table shape related to the Emp table.
6. On the Where tab of the tabbed editor, click the [image] button.
7. Click the left <enter a value> field, then select Emp.Job from the drop-down list.
8. Click the condition operator ('=') and choose does not equal from the drop-down list.
9. Click the right <enter a value> field and type 'President'.
10. On the Group By tab, select the field Dept.DName and click [image] . Use up arrow and down arrow buttons to change order of columns. If you have missed and added a wrong field to the Group By list, select it and click on the left arrow button. You should not do anything at the Having tab. It is absolutely similar to the Where tab.
11. On the Order By tab, click Money, then click the [image] right arrow button.
12. Select this field in the Ordered By list and click [image]. Notice what happened to table shapes after all these manipulations.
13. At any moment you can switch to the Text view of a document to inspect a query you have built using Query Builder. To do it, click on the Text button at the bottom part of a document. If the Text button is not visible, use a corresponding item in the shortcut menu. Another way to change document's view is to use commands from the View menu.
14. In either Design or Text view, click [image].

If you have followed the instruction correctly and used source data provided in the previous topic, the following table should appear:

Dname | Money
Sales2 | 6950
Sales | 3775

If you have made changes to the tables involved in the query, your results may differ.

Note

Depend on the product you use the retrieval data may differ from this example.

See Also

Building Queries with Query Builder

Working with Different Query Types


Working with Different Query Types

dbForge Studio gives you an ability to simplify your work with different types of SQL queries. Using these types, you can manipulate or control your data to your profit.

Query Types

The current type is specified on the label in the left upper part of any query document. To change it, use the Change type list on the toolbar or the Change type item in the shortcut menu of the document.

Name | Description
SELECT | Use this type to create queries with the SELECT operator.
INSERT RESULTS | Use this query type to create queries with the INSERT INTO operator. Click the ellipsis button on the label to select the needed table or click the name of the selected table on the label to change it. Specify the needed values and conditions on the tabs below the diagram.
INSERT VALUES | Use this query type to create queries with the INSERT INTO operator. Click the ellipsis button on the label to select the needed table or click the name of the selected table on the label to change it. Specify the name and value you want to insert in the Insert tab.
UPDATE | Use this query type to create queries with the UPDATE operator. Click the ellipsis button on the label to select the needed table or click the name of the selected table on the label to change it. Specify the needed values on the tabs below the diagram.
DELETE | Use this query type to delete records from the selected table. Click the ellipsis button on the label to select the needed table or click the name of the selected table on the label to change it. Specify the needed condition on the Where tab under the diagram.

Note

You can add only one row to a table in one query.

See Also

Building Queries with Query Builder

Working with Query Diagram


Working with Query Diagram

This section provides information about managing shapes on the query diagram.

In This Section

Diagram Overview
Provides basic information about the diagram.

Diagram Layout
Describes how to layout the diagram automatically and change shape order.

Aligning Shapes
Describes how to align shapes on the diagram.

Changing Shape Size
Describes shape size changing.

Controlling Spacing between Shapes
Describes how to change spacing between shapes.

Diagram Shortcuts
This section describes shortcuts for query builder diagram.

See Also

Building Queries with Query Builder

Working with Subqueries


Diagram Overview

Query Builder diagram allows you to view and edit visual query representation. Table shapes on the diagram represent tables, views and subqueries. Joins are represented as connections between table shape fields.

Table controls can be moved (by dragging them with mouse or by keyboard), resized, aligned to the diagram grid. You also can zoom in and out of the diagram using either CTRL+Mouse Wheel or Zoom In and Zoom Out buttons on the Query toolbar. Use the Actual Zoom button to return to actual zoom.

The order of overlapping shapes can be controlled using the Bring to Front and Send to Back buttons of the Layout toolbar or use corresponding items of the Order submenu of the Layout menu.

You may control diagram layout both with mouse and keyboard. All operations can be executed with keyboard.

Diagram can be customized on theGeneral, Query Builder Options dialog box. You can enable or disable diagram grid and grid snapping, set grid step, enable or disable table shape shadow, and set diagram background color.

See Also

Building Queries with Query Builder

Diagram Layout


Diagram Layout

Diagram layout can be controlled in a number of ways. Diagram shapes can be moved (by dragging them with mouse or by keyboard), resized, aligned to the diagram grid. Read Aligning Shapes and Changing Shape Size topics for more information.

dbForge Studio allows you to layout a diagram automatically or manually. To resize the diagram automatically, just click the Layout Diagram button on the Diagram toolbar.

You may change shape order either by right-clicking them and choosing Bring to Front or Send to Back from the Shape sub menu of the shortcut menu, or by using the corresponding buttons on the Layout toolbar.

See Also

Working with Query Diagram

Aligning Shapes


Aligning Shapes

Each shape may be aligned to the grid. To align a shape to the grid, select it and click the Align to Grid button on the Layout toolbar.

Several shapes can be aligned in a column or in a row.

· To align in a row, select shapes and click the Align Tops, Align Middles, or Align Bottoms button on the Layout toolbar to align the shapes by their top, center, or bottom of the primary selection respectively. Their horizontal position remains unchanged.
· To align in a column, select shapes and click the Align Rights, Align Lefts, or Align Centers button to align the shapes by their right side, left side, or center of the primary selection respectively. Their vertical position remains unchanged.

You may also use corresponding commands of the Align sub menu of the Layout menu.

See Also

Working with Query Diagram

Changing Shape Size


Changing Shape Size

To change shape size, select it and drag the square resize markers at the shape sides and corners. To fit shape size to grid, select it and click the Size to Grid button on the Layout toolbar or select Size to Grid from the Make Same Size submenu of the Layout menu. Shapes have minimal and maximal height and width. Minimal width and height are constant. Maximal width depends on the length of the name of the longest column in a table shape. Maximal height depends on the table shape column count.

You can also fit the same size for multiple shapes. To do this, select the shapes and click the Make Same Width or Make Same Height buttons on the Layout toolbar. You may also use corresponding items of the Make Same Size submenu of the Layout menu. When using this feature, the size of the selected shapes will be aligned with the size of primary selection.

Note

A primary selection is one of the selected shapes. Its resize markers are blue, while resize markers of other selected shapes are black. If a selected shape cannot have the same size as the primary selection, its size will be changed to become as close to the primary selection size as possible.

See Also

Controlling Spacing between Shapes

Controlling Spacing between Shapes


Controlling Spacing between Shapes

Diagram provides flexible control over spacing between shapes on the diagram. You can proportionally increase and decrease horizontal and vertical spacing between the shapes, make it equal or remove it.

· To increase spacing between shapes, select shapes, which will be moved, and click Increase Horizontal Spacing or Increase Vertical Spacing on the Layout toolbar or choose Increase from the Horizontal Spacing or Vertical Spacing submenu of the Layout menu.
· To decrease spacing between shapes, select shapes, which will be moved, and click Decrease Horizontal Spacing or Decrease Vertical Spacing on the Layout toolbar or choose Decrease from the Horizontal Spacing or Vertical Spacing submenu of the Layout menu.
· To make spacing between shapes equal, select shapes, which will be moved, and click Make Horizontal Spacing Equal or Make Vertical Spacing Equal on the Layout toolbar or choose Make Equal from the Horizontal Spacing or Vertical Spacing submenu of the Layout menu.
· To remove spacing between shapes, select shapes, which will be moved, and click Remove Horizontal Spacing or Remove Vertical Spacing on the Layout toolbar or choose Make Equal from the Horizontal Spacing or Vertical Spacing submenu of the Layout menu.

Note

When increasing or decreasing spacing or making it equal, spacing is considered as distance between centers of shapes. But when removing spacing it is considered as distance between shape borders. When you remove, for example, vertical spacing, shapes will be located in the following way: the top of the second shape will be located at the same height as the bottom of the highest shape, the top of the third one will be located at the same height as the bottom of the second shape and so on.

See Also

Working with Query Diagram

Diagram Shortcuts


Diagram Shortcuts

This section contains shortcuts for query builder diagram.

In This Section

Diagram Shortcuts Overview
This topic explains how to use shortcut keys to perform certain operations using keyboard.

Focus and Selection Shortcuts
Contains shortcuts for moving focus and selecting shapes or columns.

Zoom and Scroll Shortcuts
Contains shortcuts for moving and zooming the diagram sheet.

Shape and Column Managing Shortcuts
Contains shortcuts for manipulating shapes and columns.

See Also

Working with Query Diagram

Working with Subqueries


Diagram Shortcuts Overview

Diagram allows you to speed up your work with keyboard shortcuts. This topic explains how to use them to perform certain operations using keyboard.

Some diagram shortcuts can be customized.

Moving Focus and Selecting Shapes

To switch between shapes, use TAB (SHIFT+TAB) keys. TAB key moves focus and selection forward, SHIFT+TAB moves it backward. To select multiple shapes, move focus with CTRL+ALT+TAB or SHIFT+CTRL+ALT+TAB shortcut and add required shapes to selection with the SPACE key (these shortcuts are not available in Windows 7).

Moving and Resizing Shapes

To move selected shapes with snapping to the grid, use arrow keys. To move the shapes one pixel, press CTRL+arrow keys. To resize the shapes, press SHIFT+arrow keys or CTRL+SHIFT+arrow keys. To collapse/expand a table control, use ALT+RIGHT ARROW/ALT+LEFT ARROW keys.

Bookmarking a Viewing Area of the Diagram

You can bookmark the current viewing area of the diagram by pressing CTRL+SHIFT+{0-9}. Then you can scroll the sheet or change the zoom, but quickly come back to the saved viewing area by pressing CTRL+{0-9}.

Working with Columns

To add columns to the query:

1. Navigate to a table.
2. Switch to its columns with SHIFT+PERIOD keys.
3. Use arrow keys to navigate to the column to add to query.
4. Press ENTER to add column
5. Repeat steps 3-4 for all columns you want to add
6. Press the ESC key to move focus from the columns to the table.

Viewing Diagram

To scroll the diagram, switch focus to it with the ESC or SHIFT+COMMA keys and use arrow keys. You may also use PAGE UP and PAGE DOWN keys. To zoom in and out use CTRL+PLUS SIGN and CTRL+MINUS SIGN keys.

Other Shortcuts

You can assign shortcuts for all commands from the layout menu. These commands don't have shortcuts by default. Use the Keyboard page of the environment options to assign shortcuts. Type Diagram in the Show Commands Containing field to filter commands.

See Also

Diagram Shortcuts

Focus and Selection Shortcuts


Focus and Selection Shortcuts

Use following shortcut keys for changing focus and selection on the diagram.

Shortcut Keys | Action | Where is used
Ctrl+A | Selects all | Diagram
TAB | Moves focus and selection forward | Diagram
SHIFT+TAB | Moves focus and selection backward | Diagram
CTRL+ALT+TAB | Moves focus forward without moving selection (this shortcut is not available in Windows 7) | Diagram
CTRL+SHIFT+ALT+TAB | Move focus backward without moving selection (this shortcut is not available in Windows 7) | Diagram
HOME | Moves focus and selection to the first item (shape or column) | Diagram
END | Moves focus and selection to the last item (shape or column) | Diagram
SPACE | Toggle selection of the focused item | Diagram
UP ARROW | Moves focus and selection to the previous column or stored routine parameter | Diagram
DOWN ARROW | Moves focus and selection to the next column or stored routine parameter | Diagram
CTRL+UP ARROW | Moves focus without selection to the previous column or stored routine parameter | Diagram
CTRL+DOWN ARROW | Moves focus without selection to the next column or stored routine parameter | Diagram
SHIFT+UP ARROW | Moves focus to the previous column or stored routine parameter. Adds it to selection if the first selection column or stored routine parameter is below, otherwise, removes selection from the current column or stored routine parameter. | Diagram
SHIFT+DOWN ARROW | Moves focus to the next column or stored routine parameter. Adds it to selection if the first selection column or stored routine parameter is above, otherwise, removes selection from the current column or stored routine parameter. | Diagram
CTRL+SHIFT+UP ARROW | Moves focus to the previous column or stored routine parameter and extends the selection on it | Diagram
CTRL+SHIFT+DOWN ARROW | Moves focus to the next column or stored routine parameter and extends the selection on it | Diagram
SHIFT+PERIOD | Moves focus to the lower level | Diagram
SHIFT+COMMA | Moves focus to the upper level | Diagram
ESC | Moves focus to the upper level | Diagram
ALT+DOWN ARROW | Moves focus to the table shape name if the focus was on the table shape. Table shape expands if it was previously collapsed. | Diagram

See Also

Diagram Shortcuts

Zoom and Scroll Shortcuts


Zoom and Scroll Shortcuts

Use following shortcut keys for working with the diagram sheet.

Icon | Command Name | Shortcut Keys | Action | Where is used
 | Zoom In | CTRL+PLUS SIGN | Zoom in | Diagram
 | Zoom In | CTRL+MouseWheel forward | Zoom in | Diagram
 | Zoom Out | CTRL+MINUS SIGN | Zoom out | Diagram
 | Zoom Out | CTRL+MouseWheel backward | Zoom out | Diagram
 |  | UP ARROW | Scroll the sheet up when the sheet is focused | Diagram
 |  | DOWN ARROW | Scroll the sheet down when the sheet is focused | Diagram
 |  | LEFT ARROW | Scroll the sheet left when the sheet is focused | Diagram
 |  | RIGHT ARROW | Scroll the sheet right when the sheet is focused | Diagram
 |  | PAGE UP | Scroll the sheet one page up | Diagram
 |  | PAGE DOWN | Scroll the sheet one page down | Diagram
 |  | CTRL+SHIFT+{0-9} | Bookmark a current viewport (a visible region of the diagram) | Diagram
 |  | Ctrl+{0-9} | Return to a bookmarked viewport | Diagram

See Also

Diagram Shortcuts

Shape and Column Managing Shortcuts


Shape and Column Managing Shortcuts

Use following shortcut keys to manipulate shapes and columns on the diagram.

Shortcut Keys | Action | Where is used
UP ARROW | Moves the selected shapes one grid step up if some shapes are selected | Diagram
DOWN ARROW | Moves the selected shapes one grid step down if some shapes are selected | Diagram
LEFT ARROW | Moves the selected shapes one grid step left if some shapes are selected | Diagram
RIGHT ARROW | Moves the selected shapes one grid step right if some shapes are selected | Diagram
CTRL+UP ARROW | Moves the selected shapes one pixel up if some shapes are selected | Diagram
CTRL+DOWN ARROW | Moves the selected shapes one pixel down if some shapes are selected | Diagram
CTRL+LEFT ARROW | Moves the selected shapes one pixel left if some shapes are selected | Diagram
CTRL+RIGHT ARROW | Moves the selected shapes one pixel right if some shapes are selected | Diagram
SHIFT+UP ARROW | Decreases the height of the selected shapes one grid step if some shapes are selected | Diagram
SHIFT+DOWN ARROW | Increases the height of the selected shapes one grid step if some shapes are selected | Diagram
SHIFT+LEFT ARROW | Decreases the width of the selected shapes one grid step if some shapes are selected | Diagram
SHIFT+RIGHT ARROW | Increases the width of the selected shapes one grid step if some shapes are selected | Diagram
CTRL+SHIFT+UP ARROW | Decreases the height of the selected shapes one pixel if some shapes are selected | Diagram
CTRL+SHIFT+DOWN ARROW | Increases the height of the selected shapes one pixel if some shapes are selected | Diagram
CTRL+SHIFT+LEFT ARROW | Decreases the height of the selected shapes one pixel if some shapes are selected | Diagram
CTRL+SHIFT+RIGHT ARROW | Increases the height of the selected shapes one pixel if some shapes are selected | Diagram
ALT+LEFT ARROW | Expands the shape or table compartment | Diagram
ALT+LEFT ARROW | Collapses the shape or table compartment | Diagram
ENTER | Opens editor for the selected objects | Database Diagram
ENTER | Includes selected columns to the query if some columns are selected | Query Builder Diagram
DELETE | Excludes the selected shapes from the diagram when shapes are selected | Diagram
DELETE | Drops the selected columns, constraints, or triggers from database when table columns, constraints, or triggers are selected. | Database Diagram
CTRL+DELETE | Drops the selected database objects from the database | Database Diagram

See Also

Diagram Shortcuts

Working with Subqueries


Working with Subqueries

This section describes how to visually create subqueries in dbForge Studio.

In This Section

Subqueries Overview
Contains basic information on working with subqueries.

Subqueries in From Clause
Describes how to add subqueries to FROM clause.

Subqueries in Other Clauses
Describes how to add subqueries in SELECT, WHERE, and HAVING clauses.

See Also

Building Queries with Query Builder

Navigating Query with Document Outline


Subqueries Overview

dbForge Studio offers full support for subqueries in all SELECT statement clauses. Each subquery can have its own subqueries.

When you create a subquery or open it for visual editing, a subquery tab of the query document appears. This offers you simple navigating subqueries using these tabs. You can navigate to the upper-level query from the subquery with the [image] Parent Query button on the Query toolbar. You can also use the Document Outline window to navigate the complex queries.

Note

If you want to include a table along with joins, conditions, and subqueries into a subquery, you have to set focus on the whole diagram area instead of the particular table and perform the Wrap to Subquery operation for your diagram.

See Also

Working with Subqueries

Subqueries in From Clause


Subqueries in From Clause

Subqueries in the FROM clause are represented as table controls on the diagram. They can be treated exactly as tables.

Creating Subqueries

To create a new subquery:

In the query document, do either of these actions to open the SubQuery tab:

· Right-click the diagram and choose Create Subquery from the shortcut menu
· Click the Create Subquery button on the Query toolbar
· Select Create Subquery from the Query menu

The SubQuery tab appears where you can create the subquery - add a table, select required columns, specify conditions, etc.

You can include a table into a subquery in two clicks. Just right-click a table on the diagram, and select Wrap to Subquery item from the menu. The table shape will change its color and the subquery will be added to the query. You can add an alias to your subquery by typing it into the caption of subquery table shape. When the subquery is created, you can switch to the Text view to check the code.

To quickly navigate to your main query and subquery, use the tabs of the query document or open the Document Outline window.

To edit a subquery, click the [image] button on the subquery title bar or right-click the subquery and select Edit Subquery from the shortcut menu.

To rename a subquery, double-click its title and enter a required alias.

See Also

Working with Subqueries

Subqueries in Other Clauses


Subqueries in Other Clauses

Subqueries in SELECT, WHERE, and HAVING Clauses

Subqueries in these clauses are highlighted like hyperlinks. You can add subqueries to these clauses by typing them instead of columns. To open such subquery for visual editing, click them holding the CTRL key. Subqueries in the SELECT clause may be renamed by entering name into the Alias column.

Subqueries in GROUP BY and ORDER BY Clauses

Subqueries in these clauses should always return only one value (i.e. one row having one column). To add such subquery, type it into the expression box and press ENTER. You can open them for visual editing only by navigating to them with Document Outline.

Subquery in SELECT clause

To add a subquery to SELECT clause:

1. In the query document go to the Selection tab of the tabbed editor (it is placed under the diagram) and click the field in the Column field. The operand editor opens.
2. Click the [image] Create Subquery button. The program inserts a subquery template into the condition and automatically moves you to the subquery tab of the query document.

Subquery in WHERE and HAVING Clauses

To add a subquery to WHERE and HAVING clauses:

1. In the query document create a condition on the WHERE or HAVING tab of the tabbed editor and click the [image] Create Subquery button in the Operand editor.

The program inserts a subquery template into the condition and automatically moves you to the subquery tab of the query document.

2. Drag-and-drop a table to the subquery and add the subquery conditions. The subquery template will be populated with the added parameters.

See Also

Working with Subqueries

Navigating Query with Document Outline


Navigating Query with Document Outline

Use the Document Outline window to quickly navigate to the root query and clauses containing subqueries. If the Document Outline window is not visible, click the View menu, and then click Document Outline. The Document Outline window contains nodes, representing all the query clauses, selected columns, tables and views in the From clause, and all the subqueries on any nesting level. Double-click on the clause node activates the corresponding Query Builder tab for the corresponding subquery or the root query. Double-click on the subquery node opens the corresponding subquery for editing. Double-click on the table column or table node selects the corresponding column or table.

The Working with Subqueries window represents the root query and clauses (SELECTION, FROM, WHERE, and HAVING) containing subqueries as nodes in the tree. Double-click the nodes to go to the corresponding query tabs.

See Also

Working with Subqueries

Building Queries with Query Builder


Working with Data in Data Editor

This section describes some things you should know about manipulating data in dbForge Studio for MySQL.

In This Section

Viewing Data in Grid
Describes how to use multiple grid editor's features to customize the data display and get more insight.

Editing Data in Grid
Describes how to quickly edit data using various grid editor's features.

Data Shortcut Keys
Lists useful shortcut keys for working with data.

Inserting and Retrieving Data
Tells how to insert, edit, and retrieve data using SQL editor.


Viewing Data in Grid

This section describes features for viewing data in dbForge Studio for MySQL.

In This Section

Viewing Data in Grid Overview
Describes how to efficiently view data in dbForge Studio.

Sorting Data in Grid
Describes how to sort data in the grid.

Grouping Data in Grid
Describes how to use data grouping.

Filtering Data in Grid
Describes how to apply various filter conditions to filter data in the grid.

Server-side and Client-side Sorting and Filtering Data in Grid
Describes how sorting and filtering are processed on the client side and on the server side. Gives a list of problems that may be encountered.

Paginal Mode
Describes how to use the paginal mode to limit row count in the grid.

Auto-search Mode
Describes how to use the auto-search mode to quickly locate data.

Card View
Describes how to use the card mode for graphical data representation.

See Also

Working with Data in Data Editor

Editing Data in Grid


Viewing Data in Grid Overview

The Data Editor allows you to view and quickly edit data right in the grid.

To Access Data

· Execute a query that returns data.
· Open the table or view editor and switch to the data view.
· Right-click on the table or view in the Database Explorer and choose Retrieve Data from the shortcut menu.
· Double-click a table or view in Database Explorer and switch to the Data view of the Object Viewer.
*In Query Builder: right-click the table or view in the Data Editor and select Data View from the shortcut menu.
· Drag the table or view from the database explorer to the Data Window.

Use the rich set of data management options in the shortcut menu.

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Note

If you want to retrieve all data from a table with a large number of records, a message warning you about the possibility of the "Out of memory" exception is shown, and you can choose either of the following actions - continue retrieving data, cancel retrieving data, or turn on Paginal Mode.

To simplify data analysis, you can use the following features:

· Grouping Data in Grid
· Sorting Data in Grid
· Filtering Data in Grid
· Paginal Mode
· Card View
· Auto-search Mode
· Data Viewer

Note

By default, Paginal Mode is enabled in data view with 1000 records per page, so only 1000 records are displayed at once.

You can change columns order and width, group by order via dragging column headers into required place. You can fit the column's width to the column content by right-clicking on an appropriate header and choosing Best Fit from shortcut menu. To adjust widths of all columns at once, choose Best Fit (all columns) instead. Note that this operation can take some time when there are many records in the grid.

To refresh data, click the Refresh command in the Data menu (for Data view), the shortcut menu, or on the toolbar. To abort too long refresh operation, click the Stop Refresh command in the Data menu (for Data view) or on the toolbar.

Grid rows' background and foreground colors can be set. You can set them separately for odd and even rows, focused row, selected rows, focused cell, group rows.

Data row can be viewed, edited and printed as cards. To learn more about it, visit the Card View topic.

You can also export data from the grid, using the Export Data button on the toolbar or selecting a corresponding option from the shortcut menu.

Tip: you can use down arrow to add an empty row to the table displayed in the grid. If you've added an empty row accidentally, you can easily delete it using the up arrow.

Note

Null values 0000-00-00 in fields of DATE data type are displayed as 01.01.0001. Null values of TIMESTAMP fields are displayed as 01.01.0001 0:00:00.

See Also

Viewing Data in Grid

Sorting Data in Grid


Sorting Data in Grid

By default, dbForge Studio retrieves unsorted data from tables if the Retrieve Data option was used. If data was retrieved after executing an SQL statement, it will be sorted according to the operators used in this statement (in case operators are sorting-related, e. g. ORDER BY).

To sort data

To sort data in grid or to change the sort order, click the header of a column. Alternatively, right-click a column header, and then click Sort Ascending or Sort Descending on the shortcut menu.

To assign a secondary sorting, click another column header, while holding down the SHIFT key. You can set as many sorting columns as you need. To stop sorting on a certain column, click it while holding the CTRL key.

To clear column sorting, click the Clear Sorting option on the table shortcut menu.

The current sort order of a column is indicated by the sort glyph (a small arrow displayed at the column header's right edge). If data is sorted in ascending order, the sort glyph represents an up-arrow. When sorting in descending order, the sort glyph is displayed as a down-arrow. If the column isn't sorted, the sort glyph is hidden.

Note

Actual document look may slightly vary from the above image, depending on the product you use.

See Also

Viewing Data in Grid

Grouping Data in Grid


Grouping Data in Grid

To group data by column, click [image] Show Group by Box on the document toolbar. The Group by Box pane will appear above the grid. Drag a column header you want the data to be grouped by to the pane.

Alternatively, right-click the required column header and click Group By This Column on the shortcut menu. The data is automatically displayed in groups marked with collapsed nodes. The column header is moved to the Group By Box pane.

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Group By Box is the area above the data grid where you can see the grouping order and perform further grouping-related operations. Drag a column header to Group By Box to group the data by that column. You can group the data by multiple columns. In this case the grid will display a tree of nested groups that you can expand by clicking '+' buttons. To collapse the groups, click '-' buttons.

To expand or collapse all groups at once, right-click the Group By Box pane, and then click Full Expand or Full Collapse on the shortcut menu.

To cancel grouping by column, drag-and-drop the column header from the Group By Box pane to the grid or right-click the column header, and then click Ungroup from the shortcut menu.

To remove all groupings, right-click Group By Box, and then click Clear Grouping on the shortcut menu.

See Also

Viewing Data in Grid

Filtering Data in Grid


Filtering Data in Grid

Hiding Data of a Column

1. Right-click the required column, and then click Visible Columns on the shortcut menu. The Visible Columns dialog box opens.
2. Clear the check box next to the column you want to hide in the grid.
3. Click OK to close the dialog box and apply the filter condition.

Filtering Data by Column

· On a column header, click the [image] Filter button. Select the filter value from the drop-down list box. The box includes a set of values encountered in the column and the universal items such as All, Custom, Blanks, and Non Blanks.
· Right-click a column, and point to Quick Filter on the shortcut menu, and then click the required filtering condition.

When the data is filtered, the column Filter button will be changed to [image] to indicate the applied filter. The filter condition appears at the bottom of the grid providing you a one-click quick access to the filter condition parameters. You can manage them in the following ways:

· To remove all filter conditions, click [image] at the bottom of the grid. To remove the filter condition of a column, right-click this column and click Clear Filter on the shortcut menu.
· To switch from the filtered data to the full data display, clear the [image] check box at the bottom of the grid.
· To edit the filter condition, click [image] . The Filter Editor dialog box opens.

Applying a Custom Filter Condition to Column

1. Right-click the required column, point to Quick Filter on the shortcut menu, and then click [image]. The Filter Editor dialog box opens.
2. Choose a relation type and type values to build a filter.

Filter conditions in the Filter Editor dialog box are displayed as a tree with condition and group nodes. A group consists of several conditions or subgroups, united with a logical operator. To change a group logical operator, click it and select another one from the menu. To navigate between conditions and groups, use the UP ARROW and DOWN ARROW keys. To navigate between a condition column, a criteria operator and an operand value, use the LEFT ARROW and RIGHT ARROW keys.

To remove a condition, click [image] or navigate to the condition and press the DELETE or MINUS SIGN key. To remove a group, click its logical operator and select the Remove Group from the appeared menu. You can copy, cut, and paste conditions and groups with CTRL+C, CTRL+X, and CTRL+V keys.

3. Click OK to apply the filter condition to the data in the grid.

Creating a New Filter Condition

1. Create a new group:
· Click the upper-level group operator and select Add Group from the menu.
· Press CTRL+PLUS SIGN.
2. Create a new filter condition by doing one of the following:
· Click the upper-level group operator and select Add Condition from the menu.
· Navigate to a group you want to enhance, and press INSERT or PLUS SIGN key.
· Click [image] of the group you want to enhance.
3. Click the condition column, and then and select the column you need from the menu.
4. Click the condition criteria operator and select the criteria operator you want to apply.
5. If the condition operator requires operand values, specify them.

See Also

Viewing Data in Grid

Server-Side and Client-Side Sorting and Filtering


Server-Side and Client-Side Sorting and Filtering

In dbForge Studio, sorting and filtering of data can be performed on the client or on the server side.

If there are not many records in a table, they are all shown in the result grid after retrieving data from a table or after executing a SELECT statement. If you want to sort these records or use a filter, the filtering and sorting procedures are performed on the client side and all available records are processed.

But if there are many records in a table, they are not displayed after executing a SELECT statement or retrieving data at once, because such action can cause hanging of the client machine or some other problems associated with too much data to operate.

The other case when not all records are displayed in the grid, is when Paginal Mode is on and there are more records then the number of records displayed on one page. In these cases, if you perform client-side sorting or filtering, only records available on the client machine are processed. That means you will not get a complete result of filtering or sorting. That's why dbForge Studio performs server-side filtering or sorting when not all records can be displayed in the grid.

When server-side filtering or sorting is performed, the application sends a query that is a modification of the starting query to the server. The shortcoming of this way is that server resources are taken, but the benefit is that a user will get a complete result of sorting or filtering.

But once all records are received, for example, after pressing CTRL+END or scrolling to the end, server-side filtering and sorting is turned off and client-side filtering and sorting is used.

See Also

Viewing Data in Grid

Paginal Mode


Paginal Mode

Paginal Mode splits data into pages and is used for displaying data with large number of records.

To enable Paginal Mode, click Paginal Mode.

To configure the number of record per a page, type or select the value from the Page Row Count drop-down list box.

To navigate through pages, use the corresponding buttons on the document toolbar.

Paginal mode toolbar buttons

By default, Paginal Mode is enabled for data views with 1000 records on a page, so only 1000 records are displayed at once. You may change default settings on the Data Editor, General tab of the Options window.

Note

Paginal Mode can also be enabled by clicking the corresponding button on a message received when retrieving data from a table that has large number of records.

Note

If not all records are displayed on one page when Paginal mode is on, the warning icon [image] is shown on the status bar. If you move the mouse pointer onto the icon, a notification informing that the data is split into pages will be shown.

See Also

Viewing Data in Grid

Auto-search Mode


Auto-Search Mode

Auto-search mode allows you to search column data.

To enable or disable the Auto-Search mode, do any of the following:

· Press CTRL+I keys.
· On the Data menu, click Auto-search mode.
· Click Auto-search mode on the Data Editor toolbar.

To search for the data, select a cell in a column, and type first letters of the required data. If you made a mistake when typing, press BACKSPACE and type the string again.

To navigate to the next entry, press CTRL+DOWN keys. To return to the previous entry, press CTRL+UP. The entries will be highlighted.

See Also

Viewing Data in Grid

Card View


Card View

Data Editor allows you to view, edit, and print data in the Card View mode. In the Card View mode, each data row is represented as a card with caption 'Record N' and number.

To enable the Card View mode, click the Switch to Card View button on the Data Editor toolbar. To return the grid view mode, click the Switch to the Grid View button on the Data Editor toolbar.

You can view or edit data in the same way as in the grid mode. Data cards can be expanded and collapsed with help of corresponding button on a caption.

To sort or filter data in the card mode, click the Customize button, and then click either Sort, or Filter next to a column.

To customize the column display in cards, click the Customize button and select or clear check boxes next to the required columns.

Card View

See Also

Viewing Data in Grid

Editing Data in Grid


Editing Data in Grid

This section describes how to effortlessly edit data in dbForge Studio for MySQL.

In This Section

Editing Data in Grid Overview
The topic describes how to quickly edit data using various grid editor's features.

Cached Updates
This topic explains how to use cached updates mode.

Editing Foreign Keys
This topic explains how to edit foreign keys in tables.

See Also

Working with Data in Data Editor


Editing Data in Grid Overview

When dbForge Studio for MySQL executes any statement returning a result set, the retrieved data is displayed in the Data Editor of the data view of the same SQL document or the Object Viewer. This topic shows how to edit the data in grid; for information about customizing data grid, as well as sorting, grouping and filtering, visit Viewing Data in Grid topic.

To edit data:

1. In the Data Editor, available in the data view of an SQL document, click a cell you want to edit.
2. After editing, confirm the changes by pressing the [image] End Edit button under the grid or selecting the End Edit option from the shortcut menu.

Tip: To discard changes, press the [image] Cancel Edit button or select the Cancel Edit option from the shortcut menu.

In dbForge Studio for MySQL, you can also edit data right after retrieving it from a table or in the data view after any query was executed.

To retrieve data, select Retrieve Data from the shortcut menu of the table in the Database Explorer. To make received data editable, you can also choose the table name from the Table drop-down list on the toolbar, or leave it read-only by selecting (read-only).

If you choose the read-only mode, you will gain in the performance aspect, as the application will work faster in this mode.

To edit data in join query results, you should set the table you want to edit data from to the editable mode, as described above. After you set one table as editable, the data of other tables included into the result will become light-gray.

Note

When you change the mode of any table from read-only to editable or vice versa, a balloon with the corresponding message is shown on the status bar.

Note

To view values of CHAR and VARCHAR fields you should take into account the following points:

1. If length >= 200 is stated in the column type, buttons will be shown in the grid. Click these buttons, and the editor will be shown in a separate window.
2. If there are more than 4000 symbols in a cell, data can not be edited directly in the cell. To edit data in such cells, you should click the [...] button.

To insert, delete, copy and paste data:

Use the shortcut menu or the corresponding buttons under the grid. For example, you can do the following:

· To insert NULL (instead of empty string), right click Set Value To, and then select Null from the shortcut menu. You can also use the CTRL+0 key combination.
Tip: Use Set Value To menu to quickly set an empty string, zero, or a current date.

To insert SET and ENUM data, dbForge Studio offers convenient editors. Click a field of ENUM data type and select a required value from the drop-down list.

Click a field of SET data type and tick off a required value (or values) in the drop-down editor.

· To add a new record, select the Append option from the shortcut menu or click the [image] Append button under the grid. To delete a record from the grid, select the Delete option from the shortcut menu or click the '-' button under the grid or press CTRL+DEL keys.
· To copy and paste cell values, use the corresponding options from the shortcut menu.

To select data:

You can easily select and copy the data just like cells in a spreadsheet. Do either of these actions:

· Move the mouse pointer across the grid holding the left mouse button
· Click the first cell of the data range, press SHIFT, and, holding the SHIFT key, click the last cell. A rectangular range of cells will be selected.

Tip: Using the CTRL key, you may include and exclude cells to selection. Any number of rows may be copied and pasted to some other application, for example, a spreadsheet, but when you paste data in data grid, only the first row will be pasted.

Note

Actual document look may slightly vary from the above image depending on the product you use.

Row and cell indicators

When working with grid, you can see special indicators near to the focused cell. These indicators reflect current editing state.

The row is focused.

The row is being edited.

The row has been edited.

Incorrect value was entered into a cell. You must either fix the value or press the ESCAPE key to cancel changes made to the cell.

See Also

Editing Data in Grid

Cached Updates


Cached Updates

Cached updates mode allows you to control data editing within single database object. For the object you have turned this mode on, updates are stored locally on the client side until you click the Apply Changes button. If you do not need the changes to be applied, click the Cancel Changes button. When you close the document in the cached updates mode, you cancel all changes made since the last Apply command.

See Also

Editing Data in Grid

Working with Data in Data Editor


Foreign Key Lookup

Foreign key lookup functionality opens table data basing on the link available in the cell. This functionality is based on foreign key relation between tables.

If you retrieve data of a table that has links based on foreign keys, you will be able to see data from the related table directly in Data Editor. The data of the parent table is shown if you click the [image] button of the field you want to edit. The record of the parent table this foreign key corresponds to will be highlighted, as shown on the image below:

Note

Actual document look may slightly vary from the above image depending on the product you use.

See Also

Editing Data in Grid

Working with Data in Data Editor


Data Shortcut Keys

Use following shortcut key combinations when working with data in the Data Editor or data view of an SQL document.

Icon | Command Name | Shortcut Keys | Action | Where is used
 | Auto-search mode | CTRL+I | Data auto-search mode | Data Editor
 | Refresh | F5 | Refresh Data view | Data Editor
 |  | CTRL+HOME | Focus on first record in data grid | Data Editor
 |  | CTRL+END | Focus on last record in data grid | Data Editor
 |  | CTRL+DELETE | Delete currently selected row in data grid | Data Editor
 |  | INSERT | Insert new record in data grid | Data Editor
 |  | CTRL+0 | Insert NULL value in current cell | Data Editor

These shortcuts are default shortcuts. All shortcuts can be customized.

See Also

Working with Data in Data Editor


Inserting and Retrieving Data

This walkthrough describes how to insert data into a table and perform a query using the SQL Editor.

Adding a Database Connection

First of all a connection to the MySQL server should be created.

1. To open the Database Explorer window, click Database Explorer on the View menu.
2. In the Database Explorer window, click the New Connection button.
3. Set up connection parameters in the dialog window that appears.
4. To navigate through the connection created, click on the plus mark to the left of the tree nodes.

Note

The Database Explorer is not available in the dbForge Data Compare for MySQL, dbForge Schema Compare for MySQL.

Creating Database and Tables

1. Open the SQL editor by clicking the Create New SQL button on the Standard toolbar.
2. In the displayed document, type the following text:

CREATE DATABASE demobase;
CREATE TABLE demobase.dept (
DeptNo INT(11),
Dname VARCHAR(14) NOT NULL,
Loc VARCHAR(13),
PRIMARY KEY (DeptNo)
);
CREATE TABLE demobase.emp (
EmpNo INT(11),
EName VARCHAR(10),
Job VARCHAR(9),
MGR INT(11),
HireDate DATETIME,
Sal FLOAT,
Commission FLOAT,
DeptNo INT(11),
PRIMARY KEY (EmpNo),
UNIQUE INDEX index1 USING BTREE (EmpNo)
);

3. Click the Execute SQL button or press the F5 key.

Inserting Data into a Table

There are two ways to insert data into a table. First, you can do it using a query. The second way is to use the grid-based data editor. Here both ways are described.

Here goes content of the Emp table:

EmpNo | EName | Job | Mgr | HireDate | Sal | Comm | DeptNo
7839 | King | President | Null | 1981-11-17 | 5000 | Null | 10
7698 | Blake | Manager | 7839 | 1981-05-01 | 2850 | Null | 30
7566 | Jones | Manager | 7839 | 1981-04-02 | 2975 | Null | 20
7499 | Allen | Salesman | 7698 | 1981-02-20 | 1600 | 300 | 30
7369 | Smith | Clerk | 7566 | 1980-12-17 | 800 | Null | 20
7521 | Ward | Salesman | 7698 | 1981-02-22 | 1250 | 500 | 30
7654 | Martin | Salesman | 7698 | 1981-09-28 | 1250 | 1400 | 30

Content of the Dept table should be like this:

DeptNo | Dname | Loc
10 | Accounting | New York
20 | Sales | Dallas
30 | Sales2 | Chicago

Using the SQL Editor to Insert Data

1. Establish a connection to the server.
2. Open SQL editor by clicking the Create New SQL button on the Standard toolbar.
3. In the displayed document, type the following text:

INSERT INTO Dept (DeptNo, Dname, Loc) VALUES (10,'Accounting','New York')

4. Click the Execute SQL button or press the F5 key.

If there were no mistakes in the statement, the Output window appears with the report that 1 record has been affected.

The query used is a full form of the statement "INSERT INTO". To insert bigger blocks of data, use the following form:

INSERT INTO Dept VALUES (20,'Sales','Dallas'), (30,'Sales2','Chicago')

Note that names of the fields are omitted and several rows are inserted with the simple query. After executing it you must receive message "2 rows affected".

Using the Grid-based Data Editor to Insert Data

1. In Database Explorer, navigate to the Emp table.
2. Right-click it and choose Retrieve Data from shortcut menu.

The editor is displayed where you can view the data the table contains, if any.

3. Click the Append button (+) or press the INSERT key.
4. Click in the very first cell. Type in the value: 7839.
5. Click in the next cell or press TAB, type in: King.
6. In the following cell, type: President.
7. Go on filling the row until you reach the last column. In the DEPTNO column, click the [image] button and use the Foreign Keys Lookup editor to choose the required department from the displayed grid. Press ENTER to apply inserting the row.
8. Click in the first cell of the second row. Now you have to fill it starting with value 7698. Repeat steps 3-7 to insert all the required rows into the table.

Now, when there is a table populated with data, let's see how it can be retrieved.

Retrieving Data from Tables

1. The most simple example of an SQL statement is selecting all data from a single table.
2. In the Database Explorer make sure that connection to your server containing the database ("FirmStaff") is active.
3. Click the Create New SQL button on the Standard toolbar to open a new SQL document.
4. In the document, type the string SELECT * FROM Demobase.Emp

- or -

drag the table from the Database Explorer onto the document area to make this string appear automatically.

5. Click the Execute SQL button on the SQL toolbar [image].

If everything is correct, either the Data window or the Data view of a document should appear containing all data in the table.

EmpNo | EName | Job | Mgr | HireDate | Sal | Comm | DeptNo
7369 | Smith | Clerk | 7566 | 1980-12-17 | 800 | Null | 20
7499 | Allen | Salesman | 7698 | 1981-02-20 | 1600 | 300 | 30
7521 | Ward | Salesman | 7698 | 1981-02-22 | 1250 | 500 | 30
7566 | Jones | Manager | 7839 | 1981-04-02 | 2975 | Null | 20
7654 | Martin | Salesman | 7698 | 1981-09-28 | 1250 | 1400 | 30
7698 | Blake | Manager | 7839 | 1981-05-01 | 2850 | Null | 30
7839 | King | President | Null | 1981-11-17 | 5000 | Null | 10

Note

You can edit results of a query in these windows as described in the previous part of this topic.

You can execute any kind of queries using the SQL editor. Consider this:

SELECT count(*) Quantity, Job, Sum(Sal) Money FROM Demobase.Emp

WHERE Sal>800 GROUP BY Job HAVING count(*)>1 ORDER BY Money

The query returns all categories of employees (GROUP BY job) that have more than one member in the category (HAVING Count(*)>1). For every category the total salary is shown (SELECT ... Sum(Sal) Money) together with the number of members in the category (SELECT Count(*) Quantity). Employees that have salary of 800 or less are excluded. The whole grid is ordered by salary amount (ORDER BY Money).

Quantity | Job | Money
3 | Salesman | 4100
2 | Manager | 5825

Now when you've learned how to retrieve data from a single table, it is time to find out how to perform SELECT on several tables.

See Also

Working with Data in Data Editor


Working with Data Generator

In This Section

How to: Set Up Data Generator
This topic describes how to set up Data Generator to generate test data.

Using Generators
This topic describes how to select and customize data generators provided in Data Generator.

Generating Data for Empty Database
This topic describes how to generate realistic test data for an empty database using Data Generator.

Populating Database
This topic describes how to populate a database with generated test data using Data Generator.

Creating Custom Generators
This topic describes how to create a custom generator using dbForge Studio.

How To: Generate Data through the Command Line
This topic explains how to use the command line interface to generate data.

Exit Codes Used in Command Line for /generatedata
This topic describes exit codes for the /generatedata switch.


How to: Set Up Data Generator

This topic describes how to set up Data Generator to generate test data.

It is recommended to back up the database that you are going to populate before you generate the data. You can adjust the settings and repeat the data generation if you are not satisfied with the results. To generate data, first select a MySQL server instance and a database you want to populate.

To generate data:

1. In the Tools menu, click New Data Generation. The Data Generator wizard will open.
2. Specify the connection and select a required database.

3. Click Next. The Options page will appear.

4. On the Options page, set required options.
5. Click Execute. The following page displays data generation result.

You can specify the tables that you want to populate by selecting the check box that is located next to the table name. Further, you can define how you want the data to be generated: click the table name in the tree view and specify the details in the settings pane. All the changes are displayed in real-time.

Note

There may be errors during data generation. For example, a column may be a foreign key of a table, that is not included into generation.

To resolve such issues, navigate to the Related Tables section of the Table generation settings, and include/exclude parent and child tables from data generation.

6. On the Data Generator toolbar, click Generate Data.

The Output window will open, where you can:

· select the Open data population script in the internal editor option to add custom data to the database.
· save the SQL script to a file
· run the script automatically

Select a required option and click Next.

7. On the Options tab, configure the synchronization options. Click Next.
8. The Summary tab allows you to see the details of an error or warning.

When you are setting up the tables and columns that you want to populate, SQL Data Generator displays warning and error messages to inform you when there may be a problem with the data generation.

9. Click Generate to finish the process.

See Also

Using Generators

Working with Data Generator


Using Generators

dbForge Studio for MySQL provides a collection of generators to create different column values for the tables you want to populate.

The following basic data generators are available:

· Constant Generator
· Files Folder Generator
· Foreign Key (auto assigned) Generator
· Foreign Key (manually assigned) Generator
· JSON Generator
· Lorem Ipsum Generator
· Regular Expression Generator
· Shuffled Text Generator
· SQL Query Generator
· String Generator
· Table or View Generator
· Text File Generator
· Twaddle Generator
· Uniqueidentifier Generator
· Weighted List Generators

In addition to basic generators, dbForge Studio for MySQL provides 90+ meaningful generators, including advanced generators, and user-defined generators.

To select a generator for a column

1. In the Tables and columns to populate pane, click a column.
2. In the Column generation settings pane, select a generator type from the Generator drop-down list box.

Note

The Generator list features only those generators that are compatible with data type of the selected column.
3. (Optional) In the Fill Settings section of the Column generation settings pane, customize the default value generation settings. The array of settings depends on the generator type.

See Also

Generating Data for Empty Database

Working with Data Generator


Generating Data for Empty Database

This topic describes how to populate an empty database using dbForge Studio.

The following use case demonstrates the use of dbForge Studio to quickly populate an empty database with meaningful test data. For this purpose, the following database called salesdb was created. The screenshot below graphically demonstrates the structure of the database, including tables, columns, connections, data types, foreign keys, etc.

To Generate test data:

1. On the Standard toolbar, click New Data Generation.
2. Specify the connection and select the salesdb database. Click Next.
3. The Options page will appear. On the Options page, set required options and click Open. The following window opens.

The window allows you to:

· select columns to be populated (in the Tables and columns to populate pane);
· select a generator you want to use for each separate column (in the Generation settings pane);
· customize parameter settings for each generator (in the Generation settings pane).

To populate all the columns, select the checkbox next to the salesdb. Alternatively, you can specify the tables that you want to populate by selecting the check boxes next to the table names.

In addition, dbForge Studio provides the Preview window, that shows a table with the generated data.

Selecting generators for individual columns

For a column you select, dbForge Studio automatically assigns a generator based on the column and table characteristics: name, data type, etc. You may select a different generator for the column and customize the parameters of this generator in the settings pane.

Below are several examples of how generators are assigned to specific columns, as well as how they may be customized.

FirstName column

Select the FirstName column. The First Name (any gender) generator is automatically assigned to this column. The generator provides realistic male first names. In the text box, you can see a predefined regexp template to generate names. The template may be customized by inserting various snippets, counters, files, and columns.

MiddleInitial column

Select the MiddleInitial column. The Middle Name generator is automatically assigned to this column. The generator provides a wide range of middle names including both the full names and initials. The values to be generated may be customized using regular expressions. For example, if you want only one-character initials to be generated, specify the [A-Z] regular expression in the text box of the settings pane. The values may also be adjusted by inserting predefined regexp snippets, counters, files, and columns.

Twitter column

Select the Twitter column. The Twitter generator is automatically assigned to this column. The generator yields a great number of twitter user names. The user names will be generated with an at sign (@) at the beginning of the names. To customize the names (e.g. include uppercase letters, numbers, underscore characters, etc), use regular expressions. The names may be further adjusted by inserting predefined regexp snippets, counters, files, and columns.

SSN column

Select the SSN column. The US Social Security Number (SSN) generator is automatically assigned to this column. The generator will populate the column with random numbers. You can customize the numbers in the text box using various regular expressions or by inserting regexp snippets, counters, files, and columns.

For example, with the help of regexp snippets, you can add or generate lower case and uppercase letters, hexadecimal characters, digits without a zero. You can also specify groups, alternatives, repeats, etc. of the generated values.

With the help of the counter, you may can get a sequence of digits in increment/decrement order, sequence of characters in increment/decrement order, and hexadecimal characters in increment/decrement order.

ShippingMethod column

Select the ShippingMethod column. The Shipping Method generator is automatically assigned to this column. The generator provides a wide range of realworld shipping methods, such as USPS Express Mail, FedEx, DHL, Airmail Priority, etc. The list of all shipping methods is visible in the text box of the settings pane. You can customize this list manually or by adding regexp snippets, counters, columns, files from the drop-down lists below the text box.

Preview window

While selecting tables and customizing generators, the Preview window displays data to be generated in real-time.

See Also

Populating Database

Working with Data Generator


Populating Database

To Populate Database:

On the Data Generator toolbar, click the Populate data to the target database... button.

The Data Population Wizard opens, where you can:

· select the Open data population script in the internal editor option to add custom data to the database
· save the SQL script to a file
· execute the data population script against the database

Select the required option and click Next.

On the Options tab, configure the synchronization options. Click Next.

The Summary tab allows you to see the data population action plans and warnings.

Besides, when you are setting up the tables and columns that you want to populate, dbForge Studio displays warning and error messages to inform you when there may be a problem with the data generation.

Click Generate to finish the process.

See Also

Creating Custom Generators

Working with Data Generator


Creating Custom Generators

dbForge Studio for MySQL allows you to create, save, and use your own custom data generators that would better meet your needs, instead of customizing the predefined generators over and over again. You can add one or more custom generators to the existing categories: Business, Health, Location, IT, Payment, Personal, and Product.

The following example on how to add a custom generator is based on the Regular Expression Generator, which is most frequently customized.

To add a new generator:

1. Open the Data Generators folder in C:\Users\Public\Public Documents\Devart\dbForge Data Generator for MySQL\.

2. In this folder, create an .xml file or copy and paste one of the existing files.

3. Edit the file to include the following code:

<?xml version="1.0" encoding="utf-8"?>
<Generators xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Generator>
<Category>IT</Category>
<Name>Enter a generator name here</Name>
<ShortName>Enter a short name here</ShortName>
<Description>Enter a description here</Description>
<Type>MySqlRegularExpressionGenerator</Type>
<Language>DE<Language>
<ColumnTypes>
<Type>varchar</Type>
<Type>char</Type>
</ColumnTypes>
<Matches>
<Match table=".*Test.*" сolumn=".*Name.*" Priority="100" minlen="4"/>
<Match table=".*Test.*" сolumn="Name" priority="90" minlen="4"/>
<Match table=".*Test.*" сolumn="Name" priority="80" minlen="4"/>
<Match table=".*" сolumn="^Addr.*Type$" priority="70" minlen="4"/>
<Match table="Language" column="Lang.*Id$" priority="60" minlen="2"/>
<Match table=".*" сolumn="^extn.*" priority="20" minlen="50" maxlen="60"/>
<Match table=".*" сolumn="^SIN$" priority="5"/>
<Match table="(Person|User|Cust|Emp|Employee)" column="SIN" priority="10"/>
</Matches>
<Options>
<Expression>Your regular expression should be here</Expression>
</Options>
</Generator>
</Generators>

4. Save the .xml file.

5. Run dbForge Studio.

Explanation of tags

Tag | Description
<Category></Category> | the category a custom generator is added to
<Name></Name> | the name of a generator being added
<ShortName></ShortName> | the name of a generator that will be displayed in the Preview window
<Description></Description> | the description of a generator
<Type></Type> | the type of a basic generator on which a created generator is based
<Language></Language> | a language to assign a generator depending on a user's locale
<Matches></Matches> | auto-mapping rules
<ColumnTypes></ColumnTypes> | data types for which a generator will be available
<Options></Options> | contains other tags for configuring a generator, depending on a generator type (see Options Content)

Mapping rules:

Value | Description
table="" | a name of the matched table(s)
column="" | a name of the matched column(s)
. * | any number of characters
^ | strict beginning of a name, i.e. "^Test.*" means that the beginning of the name must be "Test", followed by any characters (the valid table names may be the following: test, testing, Test123, etc.)
$ | strict end of a name, i.e. ".*Test$" means that the end of the name must be "Test", preceded by any characters (the valid table names may be the following: test, myTest, 123test, etc.)
| | "or" listing
priority="n" | mapping priority - the rule according to which a generator is automatically assigned to a column (the higher the number, the higher the priority; for the custom generators it should be higher than 4 because the default MySQL data type generators have a priority range of between 1 and 4)
minlen="n" | the minimum permissible length of a column (the parameter is ignored for tinytext, text, mediumtext, longtext, tinyblob, blob, mediumblob, and longblob)
maxlen="n" | the maximum length of a column (this parameter is optional; the parameter is ignored for tinytext, text, mediumtext, longtext, tinyblob, blob, mediumblob, and longblob)

Custom data types:

Data type | The unsigned value range
utinyint | 0 to 255
uint | 0 to 4294967295
usmallint | 0 to 65535
ubigint | 0 to 18446744073709551615
umediumint | 0 to 16777215

See Also

Populating Database

Working with Data Generator


How To: Generate Data through the Command Line

You can automate data generation using the command line.

1. Click Start, type 'cmd' in the Search programs and files text box, and press ENTER. The Command Prompt opens.

2. Specify the operation you want to perform and the required parameters and arguments (actions you want to run) in the Command Prompt, for example as follows:

dbforgemysql.com /generatedata [/switch1[:value | [parameter1:value parameter2:value ..]] /switch2 ..]

3. Press ENTER to run the process.

Select corresponding command line switches to perform the required operations:

Argument

Action and Usage

/connection

This switch is used to specify a connection string. The command line looks like:

/connection:<connection_string>

/errormode

This switch is used to specify the application behavior when an error is encountered:

· to ignore all errors during the data population, specify: ignore,
· to cancel the data population if any error occurs, specify: abort.

The command line looks like:

/errormode:<ignore|abort>

/password

This switch is used to specify a password. It overrides the password specified in the connection string. The command line looks like:

/password:<pw>

/projectfile

This switch is used to specify data generation template to use. Some project options can be overridden by switches. The command line looks like:

/projectfile:<path>

See Also

Working with Data Generator

Exit Codes Used in Command Line for /generatedata


Exit Codes Used in Command Line for /generatedata

If data generation is run through the command-line interface, the following exit codes are returned depending on the execution result:

Error Code | Description | Additional Information
0 | Success | The operation been completed with no errors.
10 | Command line usage error | The command line was used incorrectly. For example, an incorrect flag, or incorrect syntax may have been used.
11 | Illegal argument duplication | Some arguments must not appear more that once.
20 | Trial expired | The trial period has expired, or dbForge Studio has not been activated.
30 | Project file corrupted | Project file corrupted.
40 | Server connection fail | Server connection failed.
105 | Resource unavailable | A file is missing.
108 | No objects | There are no objects for generation.

See Also

Working with Data Generator


Exporting and Importing Data

This section describes how to use the Import and Export Wizard to import data in dbForge Studio and to export data in other formats.

In This Section

Data Export
This section describes how to export data using the Data Export wizard.

Data Import
This section describes how to import data using the Data Import wizard.


Data Export

This section describes how to export data using the Data Export wizard.

In This Section

Data Export Overview
Gives the essential information to start exporting data.

How To: Export Data
Describes how to export data.

Saving and Using Templates
Tells how to save export settings into templates and save time.

Working with Command Line
Explains how to export data using command line.


Data Export Overview

With dbForge Studio you can easily export data from one or several tables to the following file formats:

· HTML (Hyper Text Markup Language)*- a data storage format used for the web pages.
· Text - plain text format.
· XLS - Microsoft Excel spreadsheet.
· XLSX - Microsoft Excel 2007 spreadsheet.
· Google Sheets - a spreadsheet that is a part of a free, web-based software office suite offered by Google within its Google Drive service.
· MS Access - database of well-known Microsoft DBMS Access (2003, 2007+).

Note

If you do not have Microsoft Office installed, you need to install Open XML SDK 2.5 for Microsoft Office to use the result Microsoft Excel spreadsheet.
· RTF - Rich Text Format from Microsoft.
· PDF (Portable Document Format) - file format, created by Adobe Systems for document exchange. (Only Latin charset data can be exported.)
· JSON - an open-standard format that uses human-readable text to transmit data objects consisting of attribute-value pairs.
· XML (XML Schema Definition) - XML data representation with data contained in attributes. Contains XML schema.
· CSV (Comma-separated values)* - another name for the comma-delimited format of data storage.
· ODBC (Open Database Connectivity)* - a data storage format used to access any data from any application.
· DBF - a database filename extension (Foxpro, dBase III, dBase IV, dBase 7). Other files can also be connected with DBF files, for example: .DBT (dBase III, IV, Clipper), .FPT (FoxBASE/FoxPro). While exporting data, ANSI charset is used.
· SQL - format of the file that contains a SQL script.

Note

* Express Edition of dbForge Studio supports export only to HTML, CSV and ODBC formats.

Note

When using text/csv ODBC provider, on the Export Format page enter a file name with an extension in the Destination table name field, e.g., 'table.csv'.

Note

When exporting data to MS Excel format through ODBC provider, the following export limits exist:

· for export to MS Excel 2003 format - 65536 records
· for export to MS Excel 2007 format - 1 048 576 records

Data export to MS Excel (not through ODBC provider) is limited only by available system memory.

dbForge Studio gives a simple way to export data both from Database Explorer and the grid. Using Database Explorer, you can select any table for export in seconds. Also you can compose a complex query, execute it, and then select exported data from the grid.

dbForge Studio includes the Data Export Wizard which allows you to select the following:

· columns
· data formats for each column
· rows
· additional options for each exported format

Based on your needs, you can save your selected export options into a template file for the further usage in the wizard.

See Also

Data Export

How To: Export Data


How To: Export Data

Export data to other formats

1. Open the Data Export wizard by doing either of these actions:
· Click Export Data on the Data Pump tab of Start Page.
· In Database Explorer right-click a table or a view (or CTRL+click several tables and/or views) you want to export data from and select [image] Export Data from the shortcut menu.
· Right-click data grid and choose Export Data from the shortcut menu, or click the [image] Export Data button on the Data Editor window toolbar.
· Click [image] Export Data on the Database menu.

Note

The appearance of the Data Export Wizard can differ depending on a product you use.

2. On the Export format page, select an export format or load export options from a template file if you saved them previously and click Next.
3. On the Source page, select a required MySQL server connection, a database, table(s), view(s), which you want to export. For the Google Sheets export format, specify Google Spreadsheet ID/URL to export data into. Click Next.

Note

If you opened the wizard from the data grid, the Source tab would allow to specify only a name and a path of the destination file (the one where the exported data will be saved.
4. Set additional settings for the selected export format on the Options wizard page and click Next.
5. Select exported columns and click Next. (For CSV, HTML, PDF, RTF, and Text export formats, select formats of data representation, e.g., integer, date, time, etc. For Excel and Excel 2007 formats, the field is editable only for binary columns and includes only two data types (HexString and String) in the drop-down list).
6. Select exported rows. You can export all rows, only selected in the grid ones, or a specified range.
7. Specify how the application should behave when an error is encountered.
8. (Optional) To export options to a template file for future usage, click the Save Template button and specify a path and a name of the template file.
9. Define how dbForge Studio for MySQL should handle errors during export and whether to write a log file.
10. Click the Export button and see the result of export process.
11. Select whether to open the exported file or result folder, and click the Finish button. Data export is finished.

Filtered data export

There is a filter in the Data Export wizard window.

If you want to filter data, use the required column filter. To do this, firstly write a whole data query using the SELECT * FROM statement. Click the Execute button to implement the query. Then on the required column name, click the filter icon. In the drop-down list, choose the item to filter by. Right click the filtered grid, and select Export Data to call the Data Export wizard.

Another and the most reliable way to export filtered data is to filter it directly in the query. Execute the SELECT * FROM statement with the WHERE condition, where you can specify the required filter. And then implement already filtered data export with the Data Export wizard, calling it from the filtered grid shortcut menu.

Follow the Data Export wizard steps, click the Export button. If the data export is finished successfully, the Data export complete message appears.

See Also

Data Export

Saving and Using Templates During Data Export


Saving and Using Templates During Data Export

Template is a set of export settings stored in a file.

It's no use wasting your time on selecting the same settings each time you export data. Select once, save multiple settings to a file, and use it to have customized export without efforts.

For example, you need to export data from an existing table to text format once a day. You can set up the export options once, and next time all you need to do is to select the Text export format and a location of the data source and click Export. To illustrate the case, let's export data from the sales database to the sales_export.txt file, create a template, and then use it.

To create a template:

1. Click [image] Export Data on the Database menu.
2. On the Export Format page select Text.
3. On the Source page, select a required connection and a database if needed.
4. Specify a path and a name of a destination file (the one where the exported data will be saved.) Click Next.
5. On the Options page, set text alignment to Left and also set the column length to 60. Click Next.
6. Click Export to start exporting the data.
7. To save all settings, click the Save Template button at the bottom and specify a name and a location of a template file in the Save As dialog. This template will appear in the User templates area of the Template section.

To load a template:

1. Click [image] Export Data on the Database menu.
2. In the Templates section, select a previously saved user template.
3. Specify a path and a name of the destination file to save the exported data.
4. On the Source tab select the Source connection, database, and table.
5. Other user's settings are loaded automatically.

See Also

Data Export


Working with Command Line

This section describes how to automate data export using command line.

Note

The command-line interface is available only in certain editions of dbForge Studio. For detailed information on the features availability in the dbForge Studio editions, please refer to the Editions topic.

In This Section

How To: Export Data through Command Line
This topic explains how to use the command line interface to export data.

Additional /dataexport Arguments
The topic contains information on command line switches and examples of their usage.

Exit Codes Used in Command Line for /dataexport
The topic contains information on exit codes for the /dataexport operation.


How To: Export Data through Command Line

You can automate data export process using command line. Such possibility can be very useful if you need to export data from the same table or view quite often (for example, such data may be needed for generating a report, etc.). In this case you can create a template file using Data Export Wizard, where all export settings will be saved, and perform export by specifying the name of this file in the command line instead of going through all wizard pages. Note that some parameters like connection, destination file, and some others can be specified directly in the command line. In this case values of these parameters specified in your template file will be overridden.

To create a template file:

1. On the Database menu click [image] Export Data to open Data Export Wizard.
2. Go through all wizard pages and specify necessary information and settings.
3. When all necessary settings were made, click the Save Template button on any of the wizard's pages.

Note

The generated file does not contain password information for security purposes. If the Save Password option is checked for the selected connection in dbForge Studio for MySQL, you should not do anything regarding the password. If it is not, then you should define the password with the help of the /password option.

Note

It is not necessary to click the Export button in the wizard and perform the export process itself to create a template file.

To export data through the command line:

1. Click Start.
2. Type cmd in the Search programs and files text box and press the ENTER button.

Note

To run the Command Line in Windows 8:

From the Desktop Mode

· Move the mouse cursor to the exact lower left corner until the desktop shortcuts menu appears.
· Right-click to see the shortcut menu and than click Run

From the Charms Bar

· Move your mouse to the upper right corner until the Charms Bar appears.
· Select Apps from the list and type “run” in the search box.
· Click Run from the search results.

Use Windows + R Shortcut Keys

· In desktop mode, press the Windows key and R at the same time, to show the Run command line.
3. Type a path to the dbforgemysql.com file, located in dbForge Studio for MySQL installation folder on your PC, and press the SPACE key:

C:\Users\user>"C:\Program Files\Devart\dbForge Studio for MySQL\dbforgemysql.com"

Note

It is not necessary to specify the extension of the dbforgemysql.com file.
4. Specify the operation you want to perform (data export) and the template file:

/dataexport /templatefile:<filepath>

5. Type all other arguments you need.
6. Press ENTER to run the process.

See Also

Working with Command LineWorking with Command Line

Additional /dataexport Arguments


Additional /dataexport Arguments

This topic gives detailed description of command line switches and examples of their usage.

Arguments

To get more information on switches related to data export through the command-line interface, type:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /dataexport /?

The following table describes all switches for the option.

Parameter

Action

/connection

Use this switch to specify a connection string. Command usage looks like:

/connection:<connection_string>

/errormode

Use this switch to specify the application behavior when an error is encountered. Command usage looks like:

/errormode:<ignore | abort>

Here ignore means that all uncritical errors will be ignored, and abort means that the export process will be canceled if an error occurs.

/outputfile

Use this switch to specify a destination file, or a directory for multiple export. Command usage looks like:

/outputfile:<filepath>

Note

The option is not available for the ODBC format.

/outputtable

Use this switch to specify a destination table name for SQL, ODBC and Access formats. Command usage looks like:

/outputtable:<tablename>

Note

You cannot use this option to export multiple tables at once.

During export to the server, the value of the option will be generated as the table's name in INSERT queries.

For example,

INSERT INTO my_table (column1, column2, column3) VALUES (1, 2, 3)

When exporting to the SQL format, inserts will be generated to a file specified by the /singlefile parameter.

/password

Use this switch to specify a server password in order to override the one specified in the connection string or force connecting with the specified password (when the connection string is hidden into the template file). Command usage looks like:

/password:<pw>

/range

Use this switch to specify a range of exported rows. Command usage looks like:

/range all | <start:<startfrom> length:<count>>

The possible values and parameters for the switch are the following:

· all - type to export all rows
· start:<startfrom> - type to specify the number of the row to start export from
· length:<count> - type to specify the quantity of rows to export

/singlefile

Use this switch to specify all data be exported into a single file, even if there are several source tables. Available for SQL export only. Command usage looks like:

/singlefile[:true|:false]

/table

Use this switch to specify one or several source tables. Command usage looks like:

/table <tablename> [<tablename>] /singlefile[:true|:false]

/templatefile

Use this switch to specify a template file. Command usage looks like:

/templatefile:<filepath>

The entire command line used to export data may look as the following:

C:\Users\User>"C:\Program Files\Devart\dbForge Studio for MySQL\dbforgemysql.com" /dataexport /templatefile:"c:\Users\User\Documents\dbForge Studio for MySQL\Export\sample_template.det"

See Also

Exit Codes Used in Command Line for /dataexport

How To: Export Data through Command Line


Exit Codes Used in Command Line for /dataexport

If data export is run through the command-line interface, the following exit codes are returned depending on the execution result:

Error Code

Description

Additional Information

0

Success

The operation been completed with no errors.

1

Unhandled exception

See the log for more details.

2

Ctrl-Break

Execution stopped because of a Ctrl-Break

10

Command line usage error

The command line was used incorrectly. For example, an incorrect flag, or incorrect syntax may have been used.

11

Illegal argument duplication

Some arguments must not appear more that once.

12

Unsatisfied argument dependency

There is an unsatisfied argument dependency or violated exclusion when the command line is run. For example:

/arg2 The numeric value supplied for an argument is outside the range of valid values for that argument.depends on /arg1 but you have specified /arg2 without specifying /arg1

/arg2 can't be used with /arg1 but you have used both

13

Argument value out of range

The numeric value supplied for an argument is outside the range of valid values for that argument.

14

Argument value overflow

The numeric value supplied for an argument is outside the range of valid values for that argument

15

Invalid argument value

The value supplied for an argument is invalid.

20

Trial expired

The trial period has expired, or dbForge Studio has not been activated.

30

Project file corrupted

Project file corrupted

40

Server connection fail

Server connection failed.

103

Execution error

A script execution error occurred.

105

Resource is unavailable

A file is missing.

108

No objects

There are no files for data export.

See Also

Data Export

Working with Command Line


Data Import

This section describes how to import data using the Data Import wizard.

In This Section

Data Import Overview
Describes a data import process and its steps.

MS Access Import
Describes how to import data from MS Access format.

CSV Import
Describes how to import data from CSV format.

DBF Import
Describes how to import data from DBF format.

MS Excel Import
Describes how to import data from MS Excel format.

Googe Sheets Import
Describes how to import data from Google Sheets format.

Text Import
Describes how to import data from Text format.

JSON_Import
Describes how to import data from JSON format.

XML Import
Describes how to import data from XML format.

Migrating Data from Other Servers
Describes how to migrate data from other servers.

Saving and Using Templates
Describes how to save and use import settings as templates.

Importing Data to a New Table
Describes how to quickly import data to a new table.

Working with Command Line
Describes how to import data using command line.

See Also

Exporting and Importing Data


Data Import Overview

Data import is a process of converting data stored in one format into another.

dbForge Studio automates this process and offers a wizard to guide you. You will get a correct and painless way to:

· Import data into a table from MS Access (2003, 2007+), CSV, DBF (Foxpro, dBase III, dBase IV, dBase 7), MS Excel, Text, XML formats
· Migrate data from other servers
· Customize the import

One more benefit is that you can optimize your import by saving the import settings as a template for future usage for importing data with the help of the wizard, and get a customized import immediately next time.

To import data using the Data Import wizard, you need to do simple steps:

1. Select an import format and a file with the data that you want to import.
2. Select a destination table.
3. Adjust data formats for the Source data.
4. Set additional options to customize the import.
5. Set a correspondence between the Source file content and columns of the Target table.
6. Select a data processing mode, e.g., whether to add the records to the Target table or update the existing ones, or both.
7. Define how dbForge Studio should handle errors during import and whether to write a log file.

See Also

Data Import

MS Access Import


MS Access Import

This topic describes how to import data from a MS Access (2003, 2007+) file.

1. Decide what table to import the data to:

For a new table:

· On the Database menu, click Import Data.. The Data Import wizard opens.

For an existing table:

· Right-click a table in the Database Explorer and select Import Data from the shortcut menu. The Data Import wizard opens with predefined parameters: a MySQL connection, a database, and a table to import the data to.
· Alternatively, on the Database menu click Import Data, and select a required table on the Destination table wizard page.
2. Select MS Access import format and specify a location of Source file. Click Next.

If the Source data is protected with a password, the Open MS Access database dialog box appears where you should enter the password.

Note

Data Import Wizard pages can slightly differ due to the product you have been using.

3. Select a Source table or view. To quickly find them in the list, enter characters of a required name into the Filter field. The list will be filtered to show only those that contain such characters in their names.

You can use a query for partial data import. Click Custom Query and edit the query. Click OK to save the changes.

4. Specify a Target MySQL connection, a database, a schema, and a table to import the data to. If you selected a table in Database Explorer before opening the Data Import wizard, the wizard will open with the predefined connection parameters of the selected table. To create or edit MySQL connections, click the corresponding buttons. Click Next.
5. Specify data formats for the Source data and click Next.
6. Map the Source columns to the Target ones. If you are importing the data into a new table, dbForge Studio will automatically create and map all the columns. If you are importing into an existing table, only columns with the same names will be mapped, the rest should be mapped manually. (If no columns with the same name are found, they are mapped in succession - the 1st column in Source with the 1st column in Target, etc.)

See the Target columns in the top and the Source columns at the bottom of the wizard page. Click Source column fields and select required columns from the drop-down list.

Note

To cancel mapping of all the columns, click Clear Mappings on the toolbar. To restore it, click Fill Mapping.
7. If you are importing to a new table, you can edit the Target column properties by double-clicking them in the top grid. Select the Key check box for a column with a primary Key and click Next.

Note

You should select at least one column with a primary key, otherwise some of import modes on the Modes wizard page will be disabled.
8. Select an import mode to define how dbForge Studio should import the data. Click Next.
9. Select how dbForge Studio should handle errors during import and whether you want to get a log file with details about the import session.
10. Click Import and see the import progress. dbForge Studio will notify you whether the import completed successfully or failed. Click the Show log file button to open the log file.
11. Click Finish to finish the import and close the wizard.

Note

You can save the import settings as a template for future uses. Click the Save Template button on any wizard page to save the selected settings. Next time you should only select a template and specify a location of the Source data - all the settings will be already set. For more information, go to Saving and Using Templates topic.

Note

If you try to import data from Access databases after MySQL server has closed the connection due to inactivity, the “Lost connection to MySQL server during query” message will appear.

To avoid such problem, view the 'wait_timeout' server variable that defines the time in seconds the server waits for activity on a non-interactive connection before closing it by executing the following query:

show variables like 'wait_timeout'

Then go to the Advanced tab of the Connection Properties dialog box, check the Keep connection alive checkbox and define the Ping timeout property so that its value is smaller than the value of the 'wait_timeout' variable but greater than 0. This will keep the connection alive.

Another workaround is just to increase the value of the 'wait_timeout' variable to give a connection more time to be inactive before MySQL server closes it.

This is just the way the functionality works since MySQL server just closes a connection and doesn't return any error code in such cases. So, in addition to the previously provided workarounds, you should check manually whether column types are set correctly when importing data.

See Also

Data Import

CSV Import


CSV Import

This topic describes how to import data from a CSV file.

Note

Data Import Wizard pages can slightly differ due to the product you have been using.

1. Decide what table to import the data to:

For a new table:

· On the Database menu, click Import Data. The Data Import wizard opens.

For an existing table:

· Right-click a table in the Database Explorer and select Import Data from the shortcut menu. The Data Import wizard opens with predefined parameters: a MySQL connection, a database, and a table to import the data to.
· Alternatively, on the Database menu click Import Data, and select a required table on the Destination table wizard page.
2. Select CSV import format and specify a location of Source data. Click Next.
3. Specify a MySQL connection, a database, a schema and a table to import the data to. If you selected a table in Database Explorer before opening the Data Import wizard, the wizard will open with the predefined connection parameters of the selected table. To create or edit MySQL connections, click the corresponding buttons. Click Next.
4. Preview the Source data and specify additional options to customize the import:
· Set a quantity of lines to skip during the import. Lines are counted from the top.
· Select the line number where the table header is located. It will be highlighted with blue in the Preview section. If you don't specify the header position, the imported columns will get default names - column1, column2, etc.
· Specify a column delimiter. See the result in the Preview section.

Click Next.

5. Specify data formats for the Source data and click Next.
6. Map the Source columns to the Target ones. If you are importing the data into a new table, dbForge Studio will automatically create and map all the columns. If you are importing into an existing table, only columns with the same names will be mapped, the rest should be mapped manually. (If no columns with the same name are found, they are mapped in succession - the 1st column in Source with the 1st column in Target, etc.)

See the Target columns in the top and the Source columns at the bottom of the wizard page. Click Source column fields and select required columns from the drop-down list. (For more information about mapping, go to Mapping, Data Import Wizard topic.)

Note

To cancel mapping of all the columns, click Clear Mappings on the toolbar. To restore it, click Fill Mapping.

7. If you are importing to a new table, you can edit the Target column properties by double-clicking them in the top grid. Select the Key check box for a column with a primary key and click Next.

Note

You should select at least one column with a primary key, otherwise some of import modes on the Modes wizard page will be disabled.
8. Select an import mode to define how dbForge Studio should import the data. Click Next.
9. Select how dbForge Studio should handle errors during import and whether you want to get a log file with details about the import session.
10. Click Import and see the import progress. dbForge Studio will notify you whether the import completed successfully or failed. Click the Show log file button to open the log file.
11. Click Finish to finish the import and close the wizard.

Note

You can save the import settings as a template for future uses. Click the Save Template button on any wizard page to save the selected settings. Next time you should only select a template and specify a location of the Source data - all the settings will be already set. For more information, go to Saving and Using Templates topic.

See Also

Data Import

DBF Import


DBF Import

This topic describes how to import data from a DBF file.

Note

Data Import Wizard pages can slightly differ due to the product you have been using.

1. Decide what table to import the data to:

For a new table:

· On the Database menu, click Import Data. The Data Import wizard opens.

For an existing table:

· Right-click a table in the Database Explorer and select Import Data from the shortcut menu. The Data Import wizard opens with predefined parameters: a MySQL connection, a database, and a table to import the data to.
· Alternatively, on the Database menu click Import Data, and select a required table on the Destination table wizard page.
2. Select DBF import format and specify a location of Source data. Click Next.
3. Specify a MySQL connection, a database, and a table to import the data to. If you selected a table in Database Explorer before opening the Data Import wizard, the wizard will open with the predefined connection parameters of the selected table. To create or edit MySQL connections, click the corresponding buttons. Click Next.
4. Preview the Source data and specify additional options to customize the import:
· Check that the file encoding is set correctly.
· Check Read deleted records to import rows marked as deleted in Source.

Click Next.

5. Specify data formats for the Source data and click Next.
6. Map the Source columns to the Target ones. If you are importing the data into a new table, dbForge Studio will automatically create and map all the columns. If you are importing into an existing table, only columns with the same names will be mapped, the rest should be mapped manually. (If no columns with the same name are found, they are mapped in succession - the 1st column in Source with the 1st column in Target, etc.)

See the Target columns in the top and the Source columns at the bottom of the wizard page. Click Source column fields and select required columns from the drop-down list.

Note

To cancel mapping of all the columns, click Clear Mappings on the toolbar. To restore it, click Fill Mapping.
7. If you are importing to a new table, you can edit the Target column properties by double-clicking them in the top grid. Select the Key check box for a column with a primary key and click Next.

Note

You should select at least one column with a primary key, otherwise some of import modes on the Modes wizard page will be disabled.
8. Select an import mode to define how dbForge Studio should import the data. Click Next.
9. Select how dbForge Studio should handle errors during import and whether you want to get a log file with details about the import session.
10. Click Import and see the import progress. dbForge Studio will notify you whether the import completed successfully or failed. Click the Show log file button to open the log file.
11. Click Finish to finish the import and close the wizard.

Note

You can save the import settings as a template for future uses. Click the Save Template button on any wizard page to save the selected settings. Next time you should only select a template and specify a location of the Source data - all the settings will be already set. For more information, go to Saving and Using Templates topic.

See Also

Data Import

MS Excel Import


MS Excel Import

This topic describes how to import data from a MS Excel file.

Note

Data Import Wizard pages can slightly differ due to the product you have been using.

1. Decide what table to import the data to:

For a new table:

· On the Database menu, click Import Data. The Data Import wizard opens.

For an existing table:

· Right-click a table in Database Explorer and select Import Data from the shortcut menu. The Data Import wizard opens with predefined parameters: a MySQL connection, a database, and a table to import the data to.
· Alternatively, on the Database menu click Import Data, and select a required table on the Destination table wizard page.
2. Select Excel (for Excel 97-2003) or Excel 2007 import format and specify a location of Source data. Click Next.
3. Specify a MySQL connection, a database, a schema and a table to import the data to. If you selected a table in Database Explorer before opening the Data Import wizard, the wizard will open with the predefined connection parameters of the selected table. To create or edit MySQL connections, click the corresponding buttons. Click Next.
4. Preview the Source data and specify additional options to customize the import:
· If the source data is located on several sheets, specify which of them to choose for the import.
· Specify the data range to import. You can see it highlighted with green in the Preview section. If you want to import the data partially, clear the Detect a range automatically check box and enter Start Cell and End Cell values or click the [image] button next to these fields and double-click a cell in the Preview grid. The specified range will be highlighted with green, skipped lines will be highlighted with white.
· Select to import the data either in rows or in columns.
· Specify the header position if required. It will be highlighted with blue in the Preview section. If you don't specify the header position, the imported columns will get default names - column1, column2, etc.

Click Next.

5. Specify data formats for the Source data and click Next.
6. Map the Source columns to the Target ones. If you are importing the data into a new table, dbForge Studio will automatically create and map all the columns. If you are importing into an existing table, only columns with the same names will be mapped, the rest should be mapped manually. (If no columns with the same name are found, they are mapped in succession - the 1st column in Source with the 1st column in Target, etc.)

See the Target columns in the top and the Source columns at the bottom of the wizard page. Click Source column fields and select required columns from the drop-down list.

Note

To cancel mapping of all the columns, click Clear Mappings on the toolbar. To restore it, click Fill Mapping.
7. If you are importing to a new table, you can edit the Target column properties by double-clicking them in the top grid. Select the Key check box for a column with a primary key and click Next. Note you should select at least one column with a primary key, otherwise some of import modes on the Modes wizard page will be disabled.
8. Select the import mode to define how dbForge Studio should import the data. Click Next.
9. On the Errors handling wizard page, select how dbForge Studio should handle errors during import and whether you want to get a log file with details about the import session.
10. Click Import and see the import progress. dbForge Studio will notify you whether the import completed successfully or failed. Click the Show log file button to open the log file.
11. Click Finish to finish the import and close the wizard.

Note

You can save the import settings as a template for future uses. Click the Save Template button on any wizard page to save the selected settings. Next time you should only select a template and specify a location of the Source data - all the settings will be already set.

See Also

Data Import

Text Import


Googe Sheets Import

This topic describes how to import data from a Google Sheets file.

Note

Data Import Wizard pages can slightly differ due to the product you have been using.

1. Decide what table to import the data to:

For a new table:

· On the Database menu, click Import Data. The Data Import wizard opens.

For an existing table:

· Right-click a table in Database Explorer and select Import Data from the shortcut menu. The Data Import wizard opens with predefined parameters: a MySQL connection, a database, and a table to import the data to.
· Alternatively, on the Database menu click Import Data, and select a required table on the Destination table wizard page.
2. Select the Google Sheets import format and specify URL/ID of the Google Spreadsheet containing source data. Click Next.
3. Specify a MySQL connection, a database, a schema and a table to import the data to. If you selected a table in Database Explorer before opening the Data Import wizard, the wizard will open with the predefined connection parameters of the selected table. To create or edit MySQL connections, click the corresponding buttons. Click Next.
4. Preview the Source data and specify additional options to customize the import:
· If the source data is located on several sheets, specify which of them to choose for the import.
· Specify the data range to import. You can see it highlighted with green in the Preview section. If you want to import the data partially, clear the Detect a range automatically check box and enter Start Cell and End Cell values or click the [image] button next to these fields and double-click a cell in the Preview grid. The specified range will be highlighted with green, skipped lines will be highlighted with white.
· Select to import the data either in rows or in columns.
· Specify the header position if required. It will be highlighted with blue in the Preview section. If you don't specify the header position, the imported columns will get default names - column1, column2, etc.

Click Next.

5. Specify data formats for the Source data and click Next.
6. Map the Source columns to the Target ones. If you are importing the data into a new table, dbForge Studio will automatically create and map all the columns. If you are importing into an existing table, only columns with the same names will be mapped, the rest should be mapped manually. (If no columns with the same name are found, they are mapped in succession - the 1st column in Source with the 1st column in Target, etc.)

See the Target columns in the top and the Source columns at the bottom of the wizard page. Click Source column fields and select required columns from the drop-down list.

Note

To cancel mapping of all the columns, click Clear Mappings on the toolbar. To restore it, click Fill Mapping.
7. If you are importing to a new table, you can edit the Target column properties by double-clicking them in the top grid. Select the Key check box for a column with a primary key and click Next. Note you should select at least one column with a primary key, otherwise some of import modes on the Modes wizard page will be disabled.
8. Select the import mode to define how dbForge Studio should import the data. Click Next.
9. On the Errors handling wizard page, select how dbForge Studio should handle errors during import and whether you want to get a log file with details about the import session.
10. Click Import and see the import progress. dbForge Studio will notify you whether the import completed successfully or failed. Click the Show log file button to open the log file.
11. Click Finish to finish the import and close the wizard.

Note

You can save the import settings as a template for future uses. Click the Save Template button on any wizard page to save the selected settings. Next time you should only select a template and specify a location of the Source data - all the settings will be already set.

See Also

Data Import

Text Import


Text Import

This topic describes how to import data from a TXT file.

Note

Data Import Wizard pages can slightly differ due to the product you have been using.

1. Decide what table to import the data to:

For a new table:

· On the Database menu, click Import Data. The Data Import wizard opens.

For an existing table:

· Right-click a table in the Database Explorer and select Import Data from the shortcut menu. The Data Import wizard opens with predefined parameters: a MySQL connection, a database, and a table to import the data to.
· Alternatively, on the Database menu click Import Data, and select a required table on the Destination table wizard page.
2. Select Text import format and specify a location of Source data. Click Next.
3. Specify a MySQL connection, a database, a schema and a table to import the data to. If you selected a table in Database Explorer before opening the Data Import wizard, the wizard will open with the predefined connection parameters of the selected table. To create or edit MySQLconnections, click the corresponding buttons. Click Next.
4. Select how you want to split the Source data into columns:
· Manual - for manual splitting. In the Preview section double-click desired positions to set column ranges. The markers will appear. You can move them forward or backward to change the columns length. To remove the markers, double-click them.
· Fixed width - to split into columns with fixed width. Specify a width value and see how the Source columns are splitted in the Preview section.
· Delimiter - requires you to specify a column delimiter. See the result in the Preview section.

5. Specify additional options to customize the import. (For more information, refer to the Text Options, Data Import Wizard topic.) Click Next.
6. Specify data formats for the Source data and click Next.
7. Map the Source columns to the Target ones. If you are importing the data into a new table, dbForge Studio will automatically create and map all the columns. If you are importing into an existing table, only columns with the same names will be mapped, the rest should be mapped manually. (If no columns with the same name are found, they are mapped in succession - the 1st column in Source with the 1st column in Target, etc.)

See the Target columns in the top and the Source columns at the bottom of the wizard page. To change automatic mapping, do the following:

· (for columns splitted with a delimiter) Click Source column fields in the top grid and select required columns from the drop-down list.
· (for columns with fixed width or manual splitting) Select a Target column in the top grid and click the Unmap button. To map it to a Source column, click a required one in the bottom grid and click the Map button. The length and starting position values of the Source column will appear in the corresponding fields in the top grid. If required, you can change these values manually. (For more information about mapping, go to Mapping for Text Data, Data Import Wizard topic.)

Note

To cancel mapping of all the columns, click Clear Mappings on the toolbar. To restore it, click Fill Mapping.
8. If you are importing to a new table, you can edit the Target column properties by double-clicking them in the top grid. Select the Key check box for a column with a primary key and click Next. Note you should select at least one column with a primary key, otherwise some of import modes on the Modes wizard page will be disabled.
9. Select an import mode to define how dbForge Studio should import the data. Click Next.
10. Select how dbForge Studio should handle errors during import and whether you want to get a log file with details about the import session.
11. Click Import and see the import progress. dbForge Studio will notify you whether the import completed successfully or failed. Click the Show log file button to open the log file.
12. Click Finish to finish the import and close the wizard.

Note

You can save the import settings as a template for future uses. Click the Save Template button on any wizard page to save the selected settings. Next time you should only select a template and specify a location of the Source data - all the settings will be already set. For more information, go to Saving and Using Templates topic.

See Also

Data Import

JSON Import


JSON Import

This topic describes how to import data from an JSON file.

Note

Data Import Wizard pages can slightly differ due to the product you have been using.

1. Decide what table to import the data to:

For a new table:

· On the Database menu, click Import Data. The Data Import wizard opens.

For an existing table:

· Right-click a table in Database Explorer and select Import Data from the shortcut menu. The Data Import wizard opens with predefined parameters: a MySQL connection, a database, and a table to import the data to.
· Alternatively, on the Database menu click Import Data, and select a required table on the Destination table wizard page.
2. Select JSON import format and specify a location of Source data. Click Next.
3. Specify a MySQL connection, a database, a schema and a table to import the data to. If you selected a table in Database Explorer before opening the Data Import wizard, the wizard will open with the predefined connection parameters of the selected table. To create or edit MySQLconnections, click the corresponding buttons. Click Next.
4. Preview the Source data and specify additional options to customize the import:
· Check that the Source encoding is set correctly.

Click Next.

5. Specify data formats for the Source data and click Next.
6. Map the Source columns to the Target ones. If you are importing the data into a new table, dbForge Studio will automatically create and map all the columns. If you are importing into an existing table, only columns with the same names will be mapped, the rest should be mapped manually. (If no columns with the same name are found, they are mapped in succession - the 1st column in Source with the 1st column in Target, etc.)

See the Target columns in the top and the Source columns at the bottom of the wizard page. Click Source column fields and select required columns from the drop-down list.

Note

To cancel mapping of all the columns, click Clear Mappings on the toolbar. To restore it, click Fill Mapping.
7. If you are importing to a new table, you can edit the Target column properties by double-clicking them in the top grid. Select the Key check box for a column with a primary key and click Next. Note you should select at least one column with a primary key, otherwise some of import modes on the Modes wizard page will be disabled.
8. Select an import mode to define how dbForge Studio should import the data. Click Next.
9. Select output options to manager the data import script. Click Next.
10. Select how dbForge Studio should handle errors during import and whether you want to get a log file with details about the import session.
11. Click Import and see the import progress. dbForge Studio will notify you whether the import completed successfully or failed. Click the Show log file button to open the log file.
12. Click Finish to finish the import and close the wizard.

Note

You can save the import settings as a template for future uses. Click the Save Template button on any wizard page to save the selected settings. Next time you should only select a template and specify a location of the Source data - all the settings will be already set. For more information, go to Saving and Using Templates topic.

See Also

Data Import

XML Import


XML Import

This topic describes how to import data from an XML file.

Note

Data Import Wizard pages can slightly differ due to the product you have been using.

1. Decide what table to import the data to:

For a new table:

· On the Database menu, click Import Data. The Data Import wizard opens.

For an existing table:

· Right-click a table in Database Explorer and select Import Data from the shortcut menu. The Data Import wizard opens with predefined parameters: a MySQL connection, a database, and a table to import the data to.
· Alternatively, on the Database menu click Import Data, and select a required table on the Destination table wizard page.
2. Select XML import format and specify a location of Source data. Click Next.
3. Specify a MySQL connection, a database, a schema and a table to import the data to. If you selected a table in Database Explorer before opening the Data Import wizard, the wizard will open with the predefined connection parameters of the selected table. To create or edit MySQLconnections, click the corresponding buttons. Click Next.
4. Preview the Source data and specify additional options to customize the import:
· Check that the Source encoding is set correctly.
· Select from the drop-down list a tag that identifies a table row in the Source data.
· Select Consider tag attributes as table fields, if required.

Click Next.

5. Specify data formats for the Source data and click Next.
6. Map the Source columns to the Target ones. If you are importing the data into a new table, dbForge Studio will automatically create and map all the columns. If you are importing into an existing table, only columns with the same names will be mapped, the rest should be mapped manually. (If no columns with the same name are found, they are mapped in succession - the 1st column in Source with the 1st column in Target, etc.)

See the Target columns in the top and the Source columns at the bottom of the wizard page. Click Source column fields and select required columns from the drop-down list.

Note

To cancel mapping of all the columns, click Clear Mappings on the toolbar. To restore it, click Fill Mapping.
7. If you are importing to a new table, you can edit the Target column properties by double-clicking them in the top grid. Select the Key check box for a column with a primary key and click Next. Note you should select at least one column with a primary key, otherwise some of import modes on the Modes wizard page will be disabled.
8. Select an import mode to define how dbForge Studio should import the data. Click Next.
9. Select how dbForge Studio should handle errors during import and whether you want to get a log file with details about the import session.
10. Click Import and see the import progress. dbForge Studio will notify you whether the import completed successfully or failed. Click the Show log file button to open the log file.
11. Click Finish to finish the import and close the wizard.

Note

You can save the import settings as a template for future uses. Click the Save Template button on any wizard page to save the selected settings. Next time you should only select a template and specify a location of the Source data - all the settings will be already set. For more information, go to Saving and Using Templates topic.

See Also

Data Import

Migrating Data from Other Servers


Importing Data to a New Table
1. On the Database menu, click Import Data. The Data Import wizard opens.
2. Select a required import format and specify a location of Source data. Click Next.
3. Specify a Target MySQL connection and a database, select New table, and enter a name of a table to import the data to. To create or edit MySQL server connections, click the corresponding buttons. Click Next.
4. Specify additional options to customize the import. Click Next.
5. Specify data formats for the Source data and click Next.
6. dbForge Studio will automatically create and map all the columns in a Target database to the Source columns. See the Target columns in the top and the Source columns at the bottom of the wizard page. To remap columns, click Source column fields and select required columns from the drop-down list.

Note

To cancel mapping of all the columns, click Clear Mappings on the toolbar. To restore it, click Fill Mapping.
7. You can edit the Target column properties by double-clicking them in the top grid. Select the Key check box for a column with a primary key and click Next.
8. Select how dbForge Studio should handle errors during import and whether you want to get a log file with details about the import session.
9. Click Import and see the import progress. dbForge Studio will notify you whether the import completed successfully or failed. Click the Show log file button to open the log file.
10. Click Finish to finish the import and close the wizard.

Note

You can save the import settings as a template for future uses. Click the Save Template button on any wizard page to save the selected settings. Next time you should only select a template and specify a location of the Source data - all the settings will be already set.

See Also

Data Import

Migrating Data from Other Servers


Migrating Data from Other Servers

Note

Data Import Wizard pages can slightly differ due to the product you have been using.

1. Decide what table to import the data to:

For a new table:

· On the Database menu, click Import Data. The Data Import wizard opens.

For an existing table:

· Right-click a table in the Database Explorer and select Import Data from the shortcut menu. The Data Import wizard opens with predefined parameters: a MySQL connection, a database, and a table to import the data to.
· Alternatively, on the Database menu, click Import Data., and select a required table on the Destination table wizard page.
2. Select ODBC import format and click Next.
3. Specify ODBC data provider options for import: select a system or a user data source name from the drop-down list or specify a connection string by clicking Build and selecting a required data source. Enter a user name and a password if the selected data source requires them. Click Next.
4. Select a Source table or view. To quickly find them in the list, enter characters of a required name into the Filter field. The list will be filtered to show only those that contain such characters in their names. You can use a query for a partial data import. Click the Custom Query button and edit the query. Click OK to save the changes.
5. Specify a MySQL connection, a database, a schema and a table to import the data to. If you selected a table in Database Explorer before opening the Data Import wizard, the wizard will open with the predefined connection parameters of the selected table. To create or edit MySQL connections, click the corresponding buttons. Click Next.
6. Specify data formats for the Source data and click Next.
7. Map the Source columns to the Target ones. If you are importing the data into a new table, dbForge Studio will automatically create and map all the columns. If you are importing into an existing table, only columns with the same names will be mapped, the rest should be mapped manually. (If no columns with the same name are found, they are mapped in succession - the 1st column in Source with the 1st column in Target, etc.)

See the Target columns in the top and the Source columns at the bottom of the wizard page. Click Source column fields and select required columns from the drop-down list. (For more information about mapping, go to Mapping, Data Import Wizard topic.)

Note

To cancel mapping of all the columns, click Clear Mappings on the toolbar. To restore it, click Fill Mapping.
8. If you are importing to a new table, you can edit the Target column properties by double-clicking them in the top grid. Select the Key check box for a column with a primary key and click Next. Note you should select at least one column with a primary key, otherwise some of import modes on the Modes wizard page will be disabled.
9. Select an import mode to define how dbForge Studio should import the data. Click Next.
10. Select how dbForge Studio should handle errors during import and whether you want to get a log file with details about the import session.
11. Click Import and see the import progress. dbForge Studio will notify you whether the import completed successfully or failed. Click the Show log file button to open the log file.
12. Click Finish to finish the import and close the wizard.

Note

You can save the import settings as a template for future uses. Click the Save Template button on any wizard page to save the selected settings. Next time you should only select a template and specify a location of the Source data - all the settings will be already set. For more information, go to Saving and Using Templates topic.

See Also

Data Import

Saving and Using Templates


Saving and Using Templates During Import

A template is a set of import settings stored in a file.

It's no use wasting your time on selecting the same settings each time you import data. Select once, save multiple settings to a file, and use it to have customized import without efforts.

For example, you need to import data stored in text format into an existing table once a day. You can set up the import options once, and next time all you need to do is to select Text import format and a location of Source data and click Import. To illustrate the case, let's import .txt Source file to an existing table create a template, and then use it.

Creating Template

1. Open the Data Import wizard, and select Text import format and a path to .txt Source file.
2. Move to the Destination table wizard page, and select a Target MySQL connection and a database. Select Existing table and in the drop-down list select the table.
3. On the Options wizard page in the Skip lines field, enter 3 to start importing the Source data from the 4th line. As there is a header in the Source with column names, let's specify its position, otherwise the imported columns will get default names - column1, column2. Enter 2 in the corresponding field. Select to import only even lines and Fixed width type of splitting for the Source data.

4. On the Mapping wizard page, you can see that dbForge Studio has mapped all the Source and Target columns, as all of them have the same names.
6. One more thing is left. Let's set Universal sortable date\time format for the Source data. On the Data formats wizard page, let's clear the Autodetect Date and Time format check box and select the format from the drop-down list.
7. Everything is appropriate, so click Import to start importing the data.
8. Click the Save Template at the bottom and specify a name and a location of a template file in the Save As dialog. Let's call it _txt_template. This template will appear in the User templates section.

Loading Template:

1. Click _txt_template, which was created following the aforementioned steps, in the Templates section on the first page of the Data Import wizard.
2. Select Text import format and a location of Source data.
3. On the Destination table wizard page, select the Target connection and database. Select Existing table and in the drop-down list select the table.
4. Move to the Options wizard page and see the Skip lines and Header position fields and Fixed width splitting type already selected. The same happens with mapping and a date\time format on the other wizard pages.

See Also

Data Import

Importing Data to a New Table


Working with Command Line

This section describes how to automate data import using command line.

Note

The command-line interface is available only in certain editions of dbForge Studio. For detailed information on the features availability in the dbForge Studio editions, please refer to the Editions topic.

In This Section

How To: Import Data through Command Line
This topic explains how to use the command line interface to import data.

Additional /dataimport Arguments
The topic contains information on command line switches and examples of their usage.

Exit Codes Used in Command Line for /dataimport
The topic contains information on exit codes for the /dataimport operation.


How To: Import Data through Command Line

You can automate data import process using command line. Such possibility can be very useful if you need to import data to the same table or view quite often. In this case you can create a template file using Data Import Wizard, where all import settings will be saved, and perform import by specifying the name of this file in the command line instead of going through all wizard pages. Note that some parameters like connection, input file, and some others can be specified directly in the command line. In this case values of these parameters specified in your template file will be overridden.

To create a template file:

1. On the Database menu, click Import Data to open the Data Import Wizard.
2. Go through all wizard pages and specify necessary information and settings.
3. When all necessary settings were made, click the Save Template button on any of the wizard's pages.

Note

The generated file does not contain password information for security purposes. If the Save Password option is checked for the selected connection in dbForge Studio for MySQL, you should not do anything regarding the password. If it is not, then you should define the password with the help of the /password option.

Note

It is not necessary to click the Import button in the wizard and perform the import process itself to create a template file.

To import data through command line:

1. To open Command Prompt, press Win+R and type cmd in the Open line.
2. Type a path to the dbforgemysql.com file, located in dbForge Studio for MySQL installation folder on your PC, and press the SPACE key:

C:\Users\user>"C:\Program Files\Devart\dbForge Studio for MySQL\dbforgemysql.com"


Additonal /dataimport Arguments

Additional /dataimport Arguments

This topic gives detailed description of command line switches and examples of their usage.

Arguments

To get more information on switches related to data import through the command-line interface, type:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /dataimport /?

The following table describes all switches for the option.

Parameter

Action

/connection

Use this switch to specify a connection. Command usage looks like:

/connection:<connection_string>

/create

Use this switch to create a new table for the imported data.

/errormode

Use this switch to define the application behavior when an error is encountered. Command usage looks like:

/errormode:<ignore|abort>

Here ignore means that all uncritical errors will be ignored, and abort means that the export process will be canceled if an error occurs.

/inputfile

Use this switch to specify a destination file, or a directory for multiple export. Command usage looks like:

/inputfile:<filepath>

Note

The option is not available for the ODBC format.

/inputtable

Use this switch to specify the table you want to import data from. Command usage looks like:

/inputtable:<tablename>

Note

The option is only available for ODBC and Access formats,

/password

Use this switch to set a server password in order to override the one specified in the connection string or force connecting with the specified password (when the connection string is hidden into the template file). Command usage looks like:

/password:<pw>

/table

Use this switch to specify a target table (i.e. the table where you want to insert the imported data). Command usage looks like:

/table:<tablename>

/templatefile

Use this switch to specify a template file. Command usage looks like:

/templatefile:<filepath>

The entire command line used to import data may look like as following:

C:\Users\user>"C:\Program Files\Devart\dbForge Studio for MySQL\dbforgemysql.com" /dataimport /templatefile:"c:\Users\User\Documents\dbForge Studio for MySQL\Import\sample_template.dit"

See Also

Data Import

Exit Codes Used in Command Line for /dataimport


Exit Codes Used in Command Line for /dataimport

If data import is run through the command-line interface, the following exit codes are returned depending on the execution result:

Error Code

Description

Additional Information

0

Success

The operation been completed with no errors.

1

Unhandled exception

See the log for more details.

2

Ctrl-Break

Execution stopped because of a Ctrl-Break

10

Command line usage error

The command line was used incorrectly. For example, an incorrect flag, or incorrect syntax may have been used.

11

Illegal argument duplication

Some arguments must not appear more that once.

12

Unsatisfied argument dependency

There is an unsatisfied argument dependency or violated exclusion when the command line is run. For example:

/arg2 The numeric value supplied for an argument is outside the range of valid values for that argument.depends on /arg1 but you have specified /arg2 without specifying /arg1

/arg2 can't be used with /arg1 but you have used both

13

Argument value out of range

The numeric value supplied for an argument is outside the range of valid values for that argument.

14

Argument value overflow

The numeric value supplied for an argument is outside the range of valid values for that argument

15

Invalid argument value

The value supplied for an argument is invalid.

20

Trial expired

The trial period has expired, or dbForge Studio has not been activated.

30

Project file corrupted

Project file corrupted

40

Server connection fail

Server connection failed.

103

Execution error

A script execution error occurred.

105

Resource is unavailable

A file is missing.

108

No objects

There are no files for data import.

See Also

Data Import

Working with Command Line


Data Analysis

In This Section

Working with Pivot Table
This section describes how to create pivot tables and efficiently analyze data using pivot tables.

Viewing Data in Master-Detail Tables
This topic describes how to view data in Master-Detail tables.


Working with Pivot Table

This section describes how to create pivot tables and efficiently analyze data using pivot tables.

In This Section

What is Pivot Table?
Explains nuts and bolts of a pivot table and lists the benefits.

Pivot Table Components
Describes the components of a pivot grid and how to use them.

How To: Create a Pivot Table
Tells how to transform data into a pivot table and use data analysis features.

How To: Create a Chart in Pivot Table
Tells how to create a chart basing on pivot table data.

Managing a Pivot Table
Explains how you can manage data in a pivot table.

See Also

Data Analysis

Viewing Data in Master-Detail Tables


What is Pivot Table?

Data analysis is not always a snap. You can look at the same data from different angles and only some of them can bring valuable information. When dealing with data, one often beats his brains with grouping, sorting, or doing anything else to get required results and grasp the whole picture. Pivot Table is designed exactly to end these miseries and enable you to fisk any obscure data with several mouse clicks. It's possible to be a data-management guru with Pivot Table.

Pivot Table is a tool that converts large amounts of data into compact and informative summaries - pivot tables. You can rearrange (or pivot) your data by a simple drag of a mouse until you get the layout best for understanding the data relations and dependencies.

Pivot Table in Use

Let's take the Sakila database, retrieve some data for analysis, and create a pivot table to see its benefits.

Note

As the original Sakila database contains a huge number of table records, they were cut down to half to illustrate the example.

Suppose you are interested in monthly and yearly income of the stores based on film rental amounts in each film category. You would like to know which of film categories are more profitable to improve the range of films. The main data is stored in Payment table, other tables are required to get full names of film categories and film titles.

To get required data from the tables, you should select the following fields and build a query using the Query Builder:

· title from Film table
· name from Category table
· amount and payment_date from Payment table

This is what you should have received after executing the query. The usual grid will display the data the same way.

To analyze which film category had more rentals and brough the highest revenue in each particular month, you should sum up and then compare rental amounts of each film category. This way is time-consuming and often followed by errors.

Let's see how data can be displayed in a pivot table. To create a pivot table, you need to open the Pivot Table view of the SQL document and drag the required fields from the Data Source window (which opens automatically with the list of fields specified in the query) into required areas in a pivot table. The Pivot Table view contains the pivot table areas, so it's easy to understand how the dragged fields will be displayed.

Now, following the tips, let's drag amount field into the Data area, category name and film field to the Row area, and payment date to the Column area.

Note

PivotGrid automatically decomposes any fields of date or time type, so you can see payment date field decomposed into year, month, and day fields.

Let's drag only year and month. Sum of all values as well as grand total values are automatically calculated for each row and column in the pivot table.

Now you have the following neat summaries:

· Sums of rentals for each film category by month and by year
· Sums of rentals for each film title by month and by year
· Grand Total values for each film category and each film title by month and by year

You can collapse Category nodes and easily compare the sums of rentals, that's all.

See Also

Working with Pivot Table

How To: Create a Pivot Table


How To: Create a Pivot Table

This topic describes how to create pivot tables and efficiently analyze data using pivot tables.

Pivot Table

Pivot table is a table that allows you to easily rearrange or pivot your data by a simple drag of a mouse until you get the layout best for understanding the data relations and dependencies. You can create pivot tables using Pivot Table view of the SQL document.

Some facts about a pivot table creation:

· You should connect a pivot table to the data you want to display and rearrange in the pivot table. The data source can be a query in the SQL or query document.
· Not all the data source tables are good for converting into a pivot table. The data source should contain a column with duplicated values, which can be grouped, and a column with numeric data, which can be used to calculate grand totals and custom totals.
· You should place data source fields from the Data Source view into pivot table areas to add the data to the pivot table.

Creating Pivot Table

Let's create a pivot table using a query file retrieving four three columns from the Sakila database.

Note

As the original Sakila database contains a huge number of table records, they were cut down to half to illustrate the example.

Lets analyze which film category had more rentals and brought the highest revenue in each particular month. To do this:

1. Open a query document by clicking the [image] New Query icon on the Standard toolbar to select it as a data source for a pivot table. In the Database Explorer, select required tables from the Sakila database and drag-and-drop them to the query document. They are displayed as shapes with columns. In required table shapes, select corresponding check boxes next to these four columns: category name, film title, payment amount, and payment date.

2. Switch to the Pivot Table view to see the pivot table template. The Data Source view opens automatically with the fields (when dealing with pivot tables, data source columns are referred to as fields) specified in our query document.

Note

Any field with date or time data format is decomposed in the Data Source view to its components.

In this case the payment date field has been decomposed to four fields: year, month, day, and master field. The latter allows you to add the three payment date sub-fields to a pivot table at once.

3. Let's think how to efficiently place the selected fields in the pivot table:
· Category name and film title field contain string values, some of them are rather long. It will be good to place these field as row field to see their values vertically at the left of the pivot table. In this case you will have the long but tighter table.
· Payment amount field has numeric data, so it is reasonable to place it into data area where grand totals and custom totals can be calculated.
· If Payment date field is displayed as column field, i.e., horizontally in the pivot table, you will be able to group payment amount figures by payment day, month, and year. Let's add only Month and Year of payment date to simplify the analysis. Note, you can change the layout and display category name and film title CategoryName field as Column field and payment date as Row field. No limitations, the data can be easily rearranged until it becomes the most readable.

To add fields to the pivot table, drag-and-drop them from the Data Source view to a required pivot table area or highlight a field in the Data Source view, select a required area from the Destination area drop-down list and click the Add To button or just press ENTER.

To add two or more fields to the same pivot table area, add the first field and then drop the second one before or after the first field in the area.

4. Now our pivot table contains the following:
· category name and film title as row fields
· payment date (Year) and (Month) as column fields
· payment amount as data field
· custom totals and grand totals that are automatically calculated for the added fields

For more information about the pivot table, go to the Pivot Table Components topic.

The film titles may be hidden by collapsing the category name nodes to define the most profitable category by month or year. The names of employees may be hidden by collapsing the department name. To sort the values in the fields, click the [image] Sort button. You can filter payment amounts, for example, to display only payment amounts in 57. Click the [image] button in the payment date (Year) field and uncheck 2006 in the dialog box. For more information about managing data in the pivot table, refer to Managing a Pivot Table topic.

5. If required, you can apply conditional styles to the pivot table to better process the data. For example, you may need to quickly see what films brought monthly revenue higher than $40.
· Click the [image] Conditional Styles button on the Pivot Table toolbar or right-click the pivot table header and select Conditional Styles from the menu. In the opened dialog, click the button to add a new condition.
· Select payment amount in the list of fields, Greater or Equal in the Condition field, enter 0 in the Value1 field. In the Apply to section, clear all the check boxes except the Cell check box. In the Appearance section, click the BackColor field and select the LightCyan color to highlight the cells.

See the result in the pivot table.

See Also

Working with Pivot Table

How To: Create a Chart in Pivot Table


How To: Create a Chart in Pivot Table

In dbForge Studio, you can view pivot data as a chart. Such an option helps to visualize data dependencies and compare it.

You can view a chart associated with the needed pivot data directly in the pivot table document, in a special view.

Let's build a chart basing on the data of the pivot table created in the How To: Create a Pivot Table topic.

1. Open the Charts view of the pivot table document by clicking the [image] Show Chart button on the pivot table document toolbar.
2. Select the data that should be displayed on the chart on the Pivot Table view of the document by pressing CTRL and clicking the needed cells of the pivot table or by selecting the cells of the table with the left mouse button pressed:

3. Adjust the Chart options using the Chart view toolbar, shortcut menu, or [image] Chart Designer.

See Also

Working with Pivot Table

Managing a Pivot Table


Managing a Pivot Table

Learn how to efficiently manage the pivot table data in this section.

In This Section

Reordering Fields
Tells how to rearrange fields in a pivot table.

Filtering Fields
Tells how to filter fields in a pivot table.

Sorting Fields
Tells how to sort fields in a pivot table.

Grouping Fields
Tells how to group fields in a pivot table.

Using Summary Functions to Calculate Custom Totals
Tells how to apply summary calculation functions.

Applying Conditional Styles
Tells how to change a pivot table appearance using conditional styles.

Printing
Tells how to print a pivot table.

See Also

Working with Pivot Table

Pivot Table Components


Reordering Fields

Reordering fields is the key point in finding the best table layout to understand data dependencies, make the conclusions, and use them to your benefit.

A pivot table is the very place where you can change the location of any field with a single drag of a mouse. Drag-and-drop a field from one area to another to rearrange their data.

You can easily swap row and column fields to display row field values in columns and column field values in rows. Compare the two screenshots.

If there are two or more fields in one section, you can use Order options from the right-click to reorder the fields within the area.

See Also

Managing a Pivot Table

Filtering Fields


Filtering Fields

You can use various types of filtering to display only required data in a pivot table.

To filter values of any field, click the [image] Filter button on the field header and in the opened dialog box select only required values that you want to display. The Filter button will be highlighted with purple and the data will be filtered according to the selected criteria.

For example, to filter payment amount values to display only those that were made in 2005, you should click the Filter button on the header of the payment date (Year) field and uncheck 2006 in the dialog box.

You can add a filter field to filter the whole data in the pivot table. Drag-and-drop a required field from the Data Source view to the filter area in the pivot table. In the picture below the film rating film was added to filter the list of films by their rating.

Also you can use the PivotGrid Prefilter dialog box to apply advanced filtering conditions to filter the data. To open the dialog box, click the [image] Prefilter icon on the toolbar or right-clock the pivot table header and select Prefilter from the menu.

To create a filtering condition in the Prefilter dialog box, do the following:

1. Click the [image] button to add a new condition.
2. Click the field name and select a required one from the drop-down list.
3. Click the condition criteria operator (displayed using the green font color) and select a required one from the drop-down list.

4. To add more conditions to this group, click the [image] button again and specify the condition properties. To remove a condition, click the [image] condition button or navigate to the condition and press DELETE.
5. To add a new group of conditions, click the upper-level group operator and select Add Group from the menu. Then specify the condition properties. To remove a group, click its logical operator and select Remove Group from the menu.

6. The pivot table will display data matching the created filtering conditions. In the case described here, the list of film titles was filtered to see it starting with CHILL LUCK film title and ending with DANCING FEVER one. To edit the conditions, click the Edit Prefilter button. To see the data unfiltered, clear the check box next to the filtering condition. To cancel filtering, click the [image] button.

See Also

Managing a Pivot Table

Sorting Fields


Sorting Fields

You can sort data in a pivot table to display it in ascending or descending order.

To sort values of any field, click the [image] Sort button on the field header.

See Also

Managing a Pivot Table

Grouping Fields


Grouping Fields

To better understand data dependencies, you can group data in a pivot table using various predefined group modes. To group values of some field, right-click the field in the Data Source view and select a required group mode from the menu. It will appear as a new sub-field of the selected field and you will be able to add it to a required area in a pivot table.

Values of date and time type can be grouped by years, months, quarters, days, weeks, days, etc. Numeric data can be grouped into numeric ranges, for example 0-9, 10-19, etc. Text data can be grouped by first letter.

To remove grouping, select a required sub-field and click Delete.

Creating custom groups

Besides predefined group modes you can create your own group criteria using the Collection Editor dialog box.

To create a custom group mode, do the following:

1. In the Data Source view right-click a field you want to apply a custom group mode and select Custom from the menu.
2. When the Collection Editor dialog box opens, enter a value to set a range for grouping. The pivot table will group the field values into the specified range and a custom group mode will appear as a new sub-field of the selected field in the Data Source view. To delete a custom group mode, right-click the sub-field and select Remove Group from the menu.

See Also

Managing a Pivot Table

Using Summary Functions to Calculate Custom Totals


Using Summary Functions to Calculate Custom Totals

Pivot table offers you a number of summary functions that you can apply to required column or row fields to calculate custom totals for their values. Custom totals are displayed in additional rows or columns highlighted with the grey color.

The summary functions are applied only to those fields that summarize the data of another field, for example, data of the category name field summarizes data of the film title field. The default function calculates the sum of all values, so you can see the Sum values just after adding row and column fields in a pivot table. You can cancel the default function or, quite the contrary, add others.

To apply a summary function to a field, do the following:

1. Select a required field in the Data Source view and go to the Properties window (to open it, right-click the field and select Properties from the menu).
2. Click the Summary field and check a required function or several ones to apply. See the custom totals in a pivot table.

See Also

Managing a Pivot Table

Applying Conditional Styles


Applying Conditional Styles

Conditional styles give you freedom to change a pivot table appearance to make the data more readable. For example, you can highlight values of some field that are greater than 100 with the red color, and values of another field that meet some other condition with the blue color, the difference between data in a pivot table will be clear at a glance.

Besides setting a background color for some cells, you can select an image as a background, change a font and its color, specify a condition to apply only for some values in a required field, etc.

Let's examine conditional styles benefits by the following example:

There is the list of films and their rental payments grouped by month and year. It is required to quickly identify which films bring the expected revenue, i.e., the sum of their rental payments meet the planned monthly range of $20-40 and which films are in less demand, i.e., the sum of their rental payments are less than $10.

Conditional styles in use:

1. Open the Conditional Styles dialog box by either of these ways:
· Click the [image] Conditional Styles icon on the toolbar
· Right-click the pivot table header and select Conditional Styles from the menu
2. Click the [image] Add Condition icon to create a new condition.
3. Select the payment amount field from the Field drop-down list and go to the Condition field to select Between value.
4. Enter 20 and 40 values into Value1 and Value2 fields to specify the required range of values.
5. Unselect all the check boxes except the Cell one in the Apply To section, as there is no need to apply this condition for all the cell types in the pivot table.
6. In the Appearance section click the BackColor field and select LightBlue. Now the first condition is ready. Click the [image] Add Condition icon to create another condition for the films which have the sum of payment amounts less than $10.

7. Select the payment amount field from the Field drop-down list and go to the Condition field to select Less value.
8. Enter 10 into the Value1 field and leave only the Cell check box selected in the Apply To section.
9. In the Appearance section select the red color from the ForeColor field to change the font color of the payment amount values into red.
10. Click OK to apply the conditional styles to the pivot table. The data will look like the following:

See Also

Managing a Pivot Table

Printing


Printing

To print a pivot table:

1. Select Print from the File menu. The Preview window opens where you can customize the display of the pivot table.
2. Click the [image] Quick Print button to start printing.

See Also

Managing a Pivot Table

Pivot Table Components


Pivot Table Components

Find detailed information about the components of the PivotGrid window and how to use them in this section.

In This Section

Areas
Describes data areas of a pivot table.

Headers
Describes headers of a pivot table.

Filter Field
Describes filter fields of a pivot table.

Column Field
Describes column fields of a pivot table.

Row Field
Describes row fields of a pivot table.

Data Field
Describes data fields of a pivot table.

Totals
Describes custom totals you can get in a pivot table.

Grand Totals
Describes grand totals you can get in a pivot table.

See Also

Working with Pivot Table

Viewing Data in Master-Detail Tables


Areas

To convert your data into a pivot table, you can drag-and-drop data source fields into four areas in the Pivot Grid view of the SQL document. They are the following:

· Filter area - displays a data source field as a Filter field.
· Row area - displays a data source field as a Row field.
· Column area - displays a data source field as a Column field.
· Data area - displays values of the Data field that you dragged from the Data Source view, Total and Grand Total values that are automatically calculated after adding the fields to this area, and any custom summary calculations you can select for the fields.

See Also

Pivot Table Components

Headers


Headers

Headers are part of fields added to a pivot table in the Pivot Grid view of the SQL document. They display the fields names and allow you to manage the fields data in different ways. You can sort, filter, move the field headers to any pivot table area to rearrange the data and get the best layout to understand the data relations and dependencies.

You can see the headers for filter, column, row, and data fields.

See Also

Pivot Table Components

Filter Field


Filter Field

Filter field is a data source field that you place into filter field area in the Pivot Grid view of the SQL document. It allows you to filter all the data in a pivot table by applying custom filtering criteria.

To add a filter field, drag-and-drop a required field from the Data Source view. To set filter criteria, click the [image] Filter button in the filter field and select criteria from the drop-down dialog box.

See Also

Pivot Table Components

Column Field


Column Field

Column field is a data source field that you place into column field area in the Pivot Grid view of the SQL document. It consists of a column header and values. A column header displays a column name and allows you to sort and filter column data, move the column to any pivot table area to rearrange the data.

To add a column field, drag-and-drop a required field from the Data Source view. You can add more than one column field, in this case the values of the leftmost column field will be displayed only once, as the values of other column fields will be repeated.

See Also

Pivot Table Components

Row Field


Row Field

Row field is a data source field that you place into row field header area in the Pivot Grid view of the SQL document. It consists of a row header and values. A row header displays a row name and allows you to sort and filter row data, move the column to any pivot table area to rearrange the data.

To add a row field, drag-and-drop a required field from the Data Source view. You can add more than one row field, in this case the values of the leftmost column field will be displayed only once, as the values of other row fields will be repeated.

See Also

Pivot Table Components

Data Field


Data Field

Data field is a data source field that you place into data area in the Pivot Grid view of the SQL document. To add a data field, drag-and-drop a required field from the Data Source view. Sum of data field values as well as grand total values are automatically calculated and displayed in a pivot table.

You can select the following summary calculation functions to apply for data fields:

· Sum
· Average
· Count
· Min, Max
· Standard deviation based upon the entire data or the subset
· Population Variance based upon the entire data or the subset

Data fields consist of a header and values. The header contains a data field name, which helps you identify the values of the data fields.

See Also

Pivot Table Components

Totals


Totals

Row Totals are rows containing a calculated sum of row field values. Column totals are columns containing a calculated sum of column field values.

Totals are calculated based on selected summary functions and displayed in the Data area highlighted with the grey color. The default function calculates the sum of all values. You can cancel the default function or, quite the contrary, add others.

See Also

Pivot Table Components

Grand Totals


Grand Totals

Row Grand Totals are rows containing an automatically calculated sum of row field totals. Column Grand Totals are columns containing an automatically calculated sum of column field totals.

Grand Totals are displayed in the data area highlighted with the light yellow color when you add any data fields to the Row Fields, Column Fields, and Data area in the Pivot Grid view of the SQL document.

Besides automatic grand total values you can get custom totals for a required field. They are calculated based on selected summary functions.

See Also

Pivot Table Components

Viewing Data in Master-Detail Tables


Viewing Data in Master-Detail Tables

dbForge Studio provides a possibility to view data in parent tables or views as well as in related child tables or views, and also in self-referencing tables with the help of Master-Detail Browser. This feature is useful because it allows users to view and analyze related data all together in a comprehensive and easy way.

There are several ways to open Master-Detail Browser:

· On the Database menu, click [image] Master-Detail Browser
· Click New in the File menu, and then click [image] Master-Detail Browser
· Right-click on a table(s) or view(s) in the Database Explorer window and click Send to then click [image] New Master-Detail option.

When you open the browser, a master-detail document with the *.mdet extension is created.

In This Section

How To: View Data in Related Tables
Tells how to easily view data in related tables.

How To: Work with Self-Referencing Tables
Tells how to view data in self-referencing tables.

Working with Master-Detail Browser Document
Explains how to work with Master-Detail Browser documents.

Sorting and Filtering Data in Master-Detail Browser
Explains how sort and filter resulting data.

Tips for Working with Master-Detail Browser
Gives some recommendations that will help to improve working with Master-Detail Browser.

See Also

Data Analysis


How To: View Data in Related Tables

This topic gives a quick guide on how to view data in related tables with the help of Master-Detail Browser.

For example, you need to view details for each actor for all categories in the Sakila database. To do this, you should perform the following actions:

1. On the Database menu, click [image] Master-Detail Browser.
2. Drag the actor, film_actor_id , and film tables from Database Explorer to the designer area.
3. Select the actor table and click [image] on the toolbar pane of the master-detail document.

4. Link columns, if needed.
5. Select checkboxes near the columns you want to be included into the results and deselect the checkboxes near the columns you don't want to be included into the result.
6. Click [image] on the toolbar pane.
7. Navigate between the records in the master table and click + to view the detail data.

See Also

Viewing Data in Master-Detail Tables

How To: Work with Self-Referencing Tables in Master-Detail Browser


How To: Work with Self-Referencing Tables in Master-Detail Browser

This topic explains how to work with self-referencing tables in Master-Detail Browser.

Self-referencing table is a table that is a parent and a dependent in the same referential constraint. I. e. in such tables a foreign key constraint can reference columns within the same table.

The example specified below shows how to view data in a self-referencing table regarding available relations between columns using Master-Detail Browser.

Prerequisites

To perform the steps described in the Viewing Data in a Self-Referencing Table part of this topic, you will need a self-referencing table itself. Below is an example of such table (the Employees table) and it will be used in the Viewing Data in a Self-Referencing Table section as a sample table:

EmpNo | EName | Job | MGR | HireDate | Sal | Commission | DeptNo
7369 | SMITH | CLERK | 7902 | 12/17/1980 12:00:00 AM | 800 | (null) | 20
7499 | ALLEN | SALESMAN | 7698 | 02/20/1981 12:00:00 AM | 1600 | 300 | 30
7521 | WARD | SALESMAN | 7698 | 02/22/1981 12:00:00 AM | 1250 | 500 | 30
7566 | JONES | MANAGER | 7839 | 04/02/1981 12:00:00 AM | 2975 | (null) | 20
7654 | MARTIN | SALESMAN | 7698 | 09/28/1981 12:00:00 AM | 1250 | 1400 | 30
7698 | BLAKE | MANAGER | 7839 | 05/01/1981 12:00:00 AM | 2850 | (null) | 30
7782 | CLARK | MANAGER | 7839 | 06/09/1981 12:00:00 AM | 2450 | (null) | 10
7788 | SCOTT | ANALYST | 7566 | 07/13/1980 12:00:00 AM | 3000 | (null) | 20
7839 | KING | PRESIDENT | (null) | 11/17/1980 12:00:00 AM | 5000 | (null) | 10
7844 | TURNER | SALESMAN | 7698 | 09/08/1981 12:00:00 AM | 1500 | 0 | 30
7876 | ADAMS | CLERK | 7788 | 07/13/1987 12:00:00 AM | 1100 | (null) | 20
7900 | JAMES | CLERK | 7698 | 12/03/1980 12:00:00 AM | 950 | (null) | 30
7902 | FORD | ANALYST | 7566 | 12/03/1980 12:00:00 AM | 3000 | (null) | 20
7934 | MILLER | CLERK | 7782 | 01/23/1982 12:00:00 AM | 1300 | (null) | 10

Viewing Data in a Self-Referencing Table

Task: it is required to view all employees regarding the levels of company hierarchy using the data available in the sample Employees table.

Solution: because the manager is also an employee, there is a relationship from the MGR column to the EmpNo column. The EmpNo column contains identification number of all employees, and the MGR column contains the identification number of the manager a person subordinates to (you see, the company president has (null) in the MGR column, as he doesn't subordinate to anyone). Now, as you've understood the relationship between these columns, you can perform the following steps to solve the task specified above using dbForge Studio Master-Detail Browser:

1. On the Databasemenu, click [image] Master-Detail Browser. An empty Master-Detail Browser document will open.
2. Drag'n'drop the Employees table you've created onto the designer surface.
3. Create a relationship between the MGR and EmpNo columns by selecting the MGR column and dragging it to the EmpNo column. An arrow indicating the relationship will be displayed on the diagram:

Note

There is no foreign key in this table, but if there is one and a relation between columns was established earlier, it's displayed on the diagram after dropping the table onto it.
4. Click the [image] Browse Data button.
5. In the Data view that opened, select the row with PRESIDENT specified in the Job column in the upper part of the view, and click + near each detail record in the lower part of the view to see the next level of company hierarchy and the employees belonging there:

See Also

Viewing Data in Master-Detail Tables

Working with Master-Detail Browser Document


Working with Master-Detail Browser Document

This topic explains how to work with the Master-Detail Browser document. The document is divided into two views - Design and Data. It is described how to work with each of these views below.

Working with Design View

To add one or more tables/views to the diagram drag them from the Database Explorer window onto the designer surface.

Note

The first table/view that you drag will be automatically set as master table/view and marked with peach colour. To set another table/view as master, you can select this table/view and click Set Table as Master [image] on the document toolbar or right-click it and select the same command from the shortcut menu.

Note

Arrows between tables/views indicate any existing relationships between these tables/views.

Note

At least one parent table/view (without any arrows pointing to it) must be added to the document, or an error message will be displayed if you try to view results.

When dragging tables onto the designer surface, relationship lines are automatically created if a relationship exists in the database for the added tables.

A line with an arrow pointing in the direction of the link indicates a one to one relationship. But you can also create links between different columns yourself. To create a link, simply drag a column from one object to a column in the second object that you want to link. You can change the direction of a created or an existing link by right-clicking on it and selecting Change Link Direction in the shortcut menu.

Note

You can not make links between columns of different types.

Now you can select columns you want to include into or exclude from your result by checking or unchecking checkboxes near the columns. You can also select all columns by clicking the Select All Columns [image] option on the document toolbar or selecting this option in the table/view shortcut menu. To cancel selection of all the columns, click the Unselect All Columns [image] option on the document toolbar or select this option in the table/view shortcut menu.

You can also sort columns in tables/views in ascending or descending order using the Sort Ascending [image] or Sort Descending [image] options from the document toolbar or the shortcut menu correspondingly.

Under the designer area you can specify a fetch limit for the result set, and a field to specify a WHERE condition. Also you can view the name of the currently selected table/view or link here.

To view results, click the [image] Browse Data button on the document toolbar or press F5. After this the Data view with result set will be opened.

To send the available relation to Query Builder, click the Send to Query option in the menu.

Working with Data View

In the upper part of the Data view the data of the parent table/view is shown. The lower part of the document is occupied by data available in the child tables/views. You can navigate through the records of the parent table/view, and the corresponding data of the child tables/views will be shown in the lower part of the view. If there is more than one child table/view, click + to view data of these child tables/views.

For the parent table/view, you can change the order of the available records. For the child tables/views, you can also change the records order and also apply filtering. To learn more about sorting and filtering data in parent and child tables/views, refer to the Sorting and Filtering Data in Master-Detail Browser topic.

In this view, you can click the Refresh button to refresh data, Stop Refresh to stop refreshing.

Click [image] Show Design to return to the design view.

Note

In the split document view document is divided in two parts - Design and Data. If you've designed the required relationship and you are ready to work with data, you can hide the Design view by clicking the [image] Hide Design button in the Data view. After this the Data view will occupy all document area. To return to the Design view, click the [image] Show Design button on the document toolbar.

See Also

Viewing Data in Master-Detail Tables

Sorting and Filtering Data in Master-Detail Browser


Sorting and Filtering Data in Master-Detail Browser

In dbForge Studio Master-Detail Browser resulting data displayed in the documnet Data view can be sorted and filtered. This topic explains how to perform each of these actions.

Sorting Data

Data can be sorted in both master and detail tables. To sort data by some particular column, click the column header. Clicking on the cell removes sorting from all other columns, sets sorting order to ascending if it has not been set before, or changes the sorting direction.

To assign secondary sorting, click on another column header, while holding down the Shift key. You can set any number of sorting columns. To stop sorting on a certain column, click it holding CTRL key.

The Up arrow indicates ascending sorting.

The Down arrow indicates descending sorting.

No arrow indicates that no sorting is applied to the column.

Filtering Data

Data can be filtered only in detail tables. To apply filtering to some column, click the [image] funnel button on the header of a column you want to apply filtering to. The drop-down list opens with a set of values encountered in this column and the universal items such as All, Custom, Blanks, and Non Blanks. To view only rows containing Blanks (NULLs), Non Blanks (not NULLs), or a certain value, select the corresponding item in the list. To set a custom filter, select (Custom), and create a filter in the opened Custom AutoFilter window.

To remove all filter conditions, click the [image] button in the bottom of the grid.

See Also

Viewing Data in Master-Detail Tables

Tips for Working with Master-Detail Browser


Tips for Working with Master-Detail Browser

This topic gives you some pieces of advice for working with Master-Detail Browser and describe the problems you may encounter when using this functionality.

Working with tables containing large amounts of data.

If you have a large table, but you don't need to view all data from this table, you can set a fetch limit in the corresponding field under the diagram. In this case the application will not require as much memory as it would have required for fetching all data.

In case you want to view only data that answers some certain criteria, you can write a WHERE condition in the corresponding field under the diagram. In this case only data that satisfies this criteria will be displayed.

Problems that may occur when viewing data of related tables:

· If a cycle in some table is found, then the "Cannot retrieve master-detail data. The cycle in table TableName was found." error message is shown. In this case you won't be able to view table data.
· If there are tables not connected with any tables on the diagram, data of such tables won't be displayed in the Data view.
· Only relation of the Master-Detail-Detail-Detail-... kind can be processed in Master-Detail Browser. If the relation has a different scheme, data from the tables that escape the specified relation scheme will not be available in the Data view.

See Also

Viewing Data in Master-Detail Tables

Data Analysis


Working with Database Objects

In this section you can learn how to perform certain operations on database objects.

In This Section

How To: Create and Drop Databases
Describes how to add and remove databases from server.

How To: Create a Database Object
Provides general guidance on database object creation.

How To: Create Copy of Database Object
This topic describes how to copy database object.

How To: Dispaly the Number of Database Objects
This topic describes how to display the number of database objects.

Working with Tables
This topic provides information about table editing.

How To: Work with Views
Overview on working with views in MySQL.

How To: Generate DDL Statements for Database Objects
This topic describes how to generate DDL script for database objects.

How To: Work with Stored Programs
This topic describes how to create, edit, execute or delete stored programs.

How To: View Object Dependencies
This topic describes the object dependencies tree.

Refactoring
This section describes using refactoring in database objects and SQL code.

Walkthroughs
Walkthroughs on creating database objects.


How To: Create and Drop Databases

Database is MySQL schema object that represents a folder containing tables. Tables can not exist outside a database. In MySQL 3.23 database has only one property - Name. In the later versions of MySQL, Charset and Collation are added.

Creating a Database

1. In the Database Explorer, right-click a connection node and select New Database.

- or -

Select New Database from the Database menu.
2. Input name of the database.
3. Select Character set and Collation.
4. Click OK, and, if specified name is unique, the database will appear in the Database Explorer.

Editing a Database

1. In the Database Explorer, right-click a database node and select Edit Database from the shortcut menu.
2. Select Character set and Collation.
3. Click Update Database.

Note

Database can be renamed only on MySQL 5.1.7 - 5.1.23 and 6.0.0. You can not rename database in other MySQL versions.

Dropping a Database

Drop a database by selecting Delete from the node shortcut menu.

Note

When you drop database all tables and data containing within it are lost.

See Also

Working with Database Objects

Working with Tables


How To: Create a Database Object

This topic describes ways to create a database object with the help of dbForge Studio.

Note

This topic contains general guidance on creating database objects. For detailed information on a specific database object, refer to the appropriate topic.

To Create a Database Object:

1. On the Standard toolbar, click [image] New Database Object. The New Object dialog box opens.
2. In the New Object dialog box, select a location, and object type.
3. Input an object name.
4. Click Create.

5. Proceed with creating an object in a corresponding editor.

-OR-

1. In Database Explorer, navigate to a required database.
2. Right-click a database node to open the shortcut menu.
3. Point to New Object, and then click a required object type.

4. Proceed with creating a database object in a corresponding editor.

-OR-

1. In Database Explorer, right-click an appropriate database object node, and then click Create <Object Name>.

2. Proceed with creating a database object in a corresponding editor.

See Also

Working with Database Objects

How To: Create Copies of Database Objects


How To: Create Copies of Database Objects

How To: Create a Copy of a Database Object

dbForge Studio for MySQL gives you the duplicate object feature. You can make an exact copy of a database object in the same or different database of the same server. It can be very useful for database designers.

To copy an object, right-click its node and select Duplicate Object from the shortcut menu. Then select destination database and type a new object name. If the selected object is a table, you can copy data from it or create an empty table copy.

Note that if you copy a table with foreign key constraints, these constraints will not be copied because there may be no referenced tables in the target database.

You can copy objects of following types:

· Tables
· Views
· Stored procedures and functions

See Also

Working with Database Objects

How To: Generate DDL Statements for Database Objects


How To: Dispaly the Number of Database Objects

How To: Display the Number of Database Objects

dbForge Studio enables to display the number of existing database objects.

To display the number of database objects, in Database Explorer, double-click a database object node. The number of database objects is displayed in parentheses to the right of the node name.

Note

If a database object node includes sub-nodes, the object number is not displayed. Instead, the object number for each sub-node is displayed separately.

See Also

Working with Database Objects

Working with Tables


Working with Tables

In this section you can learn how to perform certain operations on tables.

In This Section

How To: Create, Drop, and Edit Tables
Describes adding, removing, and editing tables from a database.

How To: Define Table Structure
Describes defining columns and indexes in a table and setting up table options.

Working with Constraints
Describes how to work with primary and foreign keys in MySQL.

Working with Partitioned Tables
Describes working with partitioned tables.

How to Use FEDERATED Tables
Describes how to work with a table stored on the remote server.

See Also

Working with Database Objects

Creating and Dropping Tables


How To: Create, Drop, and Edit Tables

This topic describes ways to create, drop, and edit a table in a database with the help of dbForge Studio.

Creating a Table

1. On the Standard toolbar, click New Database Object and specify the Table type in the dialog.

2. Input the table name.
3. Click Create and, if specified name is unique, the table editor will appear.
4. Add at least one column to the table.
5. Optionally, alter the name, change database (owner) in which the new table will be created, or set comment for the table.
6. Save the document.

-or-

1. In the Database Explorer, right-click the Tables node and select New Table.
2. Input the table name.
3. Add at least one column to the table.
4. Optionally, alter the name, change database (owner) in which the new table will be created, or set comment for the table.
5. Save the document.

Note

To learn about adding columns, constraints, indexes to the table and defining other table parameters, see Defining Table Structure.

Dropping a Table

Drop table by selecting Delete from node shortcut menu.

Note

When you drop a table all data containing in it is lost.

Editing a Table

Editing a table implies editing its structure: changing, removing, or adding columns, indexes, modifying table options. Table editor allows performing all these actions and viewing changes in the script of the table.

To edit a table and view changes:

1. Right-click it in the Database Explorer.
2. Select Edit Table from the shortcut menu.
3. Make necessary changes in table structure. See topic Defining Table Structure for detailed information.
4. Click the Script Changes button to view changes.

Note

If you modify column names, a message asking if refactoring should be used, will appear.

5. To apply changes, click Update Database. If you want to undo all actions made since table document (or any another object editor) was opened or saved, click the Undo button on the Standard toolbar. However, you cannot issue a Redo command for database objects, because when you click Undo, the database object is reloaded from server, and all unsaved changes are lost.

See Also

Working with Tables

Defining Table Structure


How To: Define Table Structure

A table contains columns and indexes. Besides, a table has options such as table type, row format and so on. Defining a table structure means setting up all these elements.

To define table structure, create the table or open existing one from Database Explorer. There are 7 tabs in Table editor: Main, Constraints, Indexes, Options, Partitioning, SQL, Data. Partitioning tab appears only when creating a table and when editing partitioned tables. Working with partitioned tables is described in the Partitioned Tables section.

Defining Columns

Switch to the Columns tab of Table editor to define columns and its properties or rename the table.

To add a column to table, right-click on the grid and select New Column from the shortcut menu. Alternatively, press the INSERT key.

To edit an existing column, double-click a column row.

To remove a column, right-click on it and select Delete Column from the shortcut menu.

Defining Constraints

Switch to the Constraints tab of Table editor to add or alter foreign and primary keys and their properties.

To add a key to table, right-click the tab and select New Foreign Key or New Primary Key from the shortcut menu, then choose the type of key you want to create.

To edit an existing key and its properties, double-click a key row to accomplish this task.

To remove a key, right-click it and select Delete Constraint from the shortcut menu.

Defining Indexes

Switch to the Indexes tab of Table editor to define indexes. Generally, it is similar to defining columns.

To add an index to table, right-click on the tab and choose New Index from the shortcut menu. Another way to do it is to press the INSERT key.

To edit an existing index, right-click on it and choose Edit Index from the shortcut menu. You can also double-click on an index row to accomplish this task.

To remove an index, right-click on it and choose Delete Index from the shortcut menu.

When you add a new index or edit existing one, the Index Properties dialog box appears. To learn more about properties listed in the dialog, see Index Properties.

Defining Options

Tune up specific options according to your plans for the table in the Options tab of the Table editor. For more information, see Options, Table Editor.

Defining Triggers

Switch to the Triggers tab of Table editor to add or configure triggers and their properties.

To add an index to table, right-click on the tab and choose New Trigger from the shortcut menu. Another way to do it is to press the INSERT key.

To edit an existing index, right-click on it and choose Edit Trigger from the shortcut menu. You can also double-click on an index row to accomplish this task.

To remove an index, right-click it and choose Delete Index from the shortcut menu.

When you add a new trigger or edit an existing one, the Trigger Editor dialog box appears. To learn more about properties listed in the dialog, see Trigger Editor.

Defining Partitioning

Switch to the Partitioning tab of Table editor to add partitions or subpartitions.

To select a partition (subpartition) type, select the required one from the drop-down list.

To add a partitioning (subpartition) expression, enter the required one into the corresponding field.

To add a partition, click the Add button or right-click in the field under the Add button and select Add partition. Then specify the properties of the partition. For more information on how to add partitions, see How To: Add or Remove Partitions or Subpartitions topic.

Removing Partitioning

To remove a partition, select one from the list and click the Remove button or right-click the partition and select Remove.

See Also

Working with Tables

Working with Constraints


Working with Constraints

In this section you can learn how to perform certain operations on tables.

In This Section

How To: Manage Primary Keys
Overview on working with primary keys.

How To: Manage Foreign Keys
Overview on working with foreign keys.

See Also

Working with Tables

Working with Partitioned Tables


How To: Manage Primary Keys

A primary key constraint designates a column as the primary key of a table or view. A composite primary key designates a combination of columns as the primary key. A primary key combines a Not Null and unique constraint in one declaration. Therefore, to satisfy a primary key constraint, no primary key value can appear in more than one row in the table, and no column that is part of the primary key can contain Null. A table or view can have only one primary key.

Creating Primary Keys

1. Open a table and select New Primary Key from the Table menu.
2. Add required columns to the key and click OK. You can also switch to the Constraints tab and create the primary key within the shortcut menu.

Editing Primary Keys

1. Navigate to the key in the Database Explorer and double-click it or open the table that owns the primary key.
2. Switch to Constraints tab and choose Edit Constraint from shortcut menu.

Dropping Primary Keys

1. Navigate to the key in the Database Explorer.
2. Select Delete from the shortcut menu.

-or-
1. Open the table that owns the primary key.
2. Switch to the Constraints tab.
3. Select Delete Constraint from the key's shortcut menu.

See Also

Working with Constraints

How To: Manage Foreign Keys


How To: Manage 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. The same table or view can contain a foreign key and a referenced key.

You can define multiple foreign keys in a table or view. Also, a single column can be part of more than one foreign key.

The following restrictions are actual for foreign constraints:

· Both tables must be of the InnoDB type and they must not be temporary tables.
· In the referencing table, there must be an index where the foreign key columns are listed as the first columns in the same order.
· In the referenced table, there must be an index where the referenced columns are listed as the first columns in the same order. Starting with MySQL/InnoDB 4.1.2, such index will be created on the referenced table automatically if it did not exist.
· Index prefixes on foreign key columns are not supported. One consequence of this is that BLOB and TEXT columns cannot be included in a foreign key, because indexes on those columns must always include a prefix length.
· If the CONSTRAINT symbol is given, it must be unique in the database. If it is not given, InnoDB creates the name automatically.

Creating Foreign Keys

1. Open the table you need and choose New Foreign Key from the Table menu.
2. Add required columns, select referenced table and referenced constraint, and click OK.

-or-

1. Switch to the Constraints tab.
2. Create a constraint from the shortcut menu.

Note

Note, to create a foreign key, the referenced table should have a unique index, otherwise dbForge Studio will prompt you to create it. Click Yes in the dialog and the unique index will be added. For more information, see Create New Unique Index Message.

Editing Foreign Keys

1. Navigate to the constraint in the Database Explorer, double-click it or open the table that owns the constraint,
2. Switch to the Constraints tab and select Edit Constraint from the shortcut menu.

For more information on constraint options, see Foreign Key Properties.

Dropping Foreign Keys

1. Navigate to the Constraints in the Database Explorer
2. Select Delete from the shortcut menu.

-or-

1. Open the table that owns the key.
2. Switch to the Constraints tab.
3. Select Delete Constraint from its shortcut menu.

Example of Creating a Foreign Key

Assume you need to ensure that each employee in table Emp (described in the Creating a Database and Two Tables walkthrough) has and will have a valid reference to a manager. That is, for each employee value of field MGR there always will be one of the EMPNO values in the same table. This is best implemented with a foreign key.

1. Open the table and create a primary key for field EMPNO as described in topic How To: Manage Primary Keys.
2. Create the foreign key as described above. Select MGR as constraint column, then select EMP as referenced table, and select the primary key you have created in step 1 as the referenced constraint.

That's all you need to do to establish a referential integrity constraint.

See Also

Working with Constraints

Working with Partitioned Tables


Working with Partitioned Tables

In this section you can learn how to manipulate partitioned tables.

In This Section

Partitioning Methods
Describes partitioning methods.

How To: Create Partitioned Tables
Describes creating of partitioned tables.

How To: Add or Remove Partitions or Subpartitions
Describes manipulating partitions and subpartions.

How To: Merge Tables
Describes merging tables.

See Also

Working with Tables

Partitioning Methods


Partitioning Methods

MySQL 5.1.3 and higher allows you to divide table and index data into smaller parts - partitions and subpartitions that can be stored and managed individually.

Note

To check whether the current version of MySQL server supports partitioning, go to Database -> Sever Variables and check the value of the system variable have_partitioning. It must be 'YES'.

MySQL provides you a handy interface for creating partitioned tables and manipulating partitions and subpartitions.

Note

MySQL does not support partitioning of MERGE and CSV tables. Partitioning of BLACKHOLE tables is supported starting from version 5.1.6.

MySQL provides you several partitioning methods. They are range, range columns, hash, key, linear hash, linear key, list, list columns partitioning, and composite partitioning.

Range partitioning provides mapping rows to partitions based on ranges of partitioning expression value.

Range Columns partitioning is similar to range partitioning, but enables you to define partitions using ranges based on multiple column values. In addition, you can define the ranges using columns of types other than integer types.

List partitioning provides mapping rows to partitions based on lists of discrete values set for each partition.

List Columns partitioning is similar to list partitioning, but enables the use of multiple columns as partition keys, and for columns of data types other than integer types to be used as partitioning columns; you can use string types, DATE, and DATETIME columns.

Note

Range Columns and List Columns partitioning are supported starting from MySQL 5.5.0.

Hash partitioning provides mapping rows to partitions based on a value of the specified hash function of partitioning expression value.

Key partitioning provides mapping rows to partitions based on MySQL hash function of the specified partitioning key.

Linear hash and linear key methods differ from regular hash and key partitioning in that linear hashing utilizes a linear powers-of-two algorithm whereas regular hashing employs the modulus of the hashing function's value.

If the table to be partitioned has a UNIQUE or PRIMARY key, then any columns supplied as arguments to the HASH user function or to the KEY's column_list must be part of that key, except for the NDBCluster tables.

When the composite partitioning method is applied, a table is divided into partitions with the help of the range or list partitioning method and partitions can be further divided into subpartitions with the hash or key subpartitioning method. Each partition must have the same number of subpartitions.

The partitioning expression can be any expression that returns non-constant non-random integer or integer subtype value. The partitioning key is a set of one or more table columns that determines the partition.

MySQL allows you to alter table partitioning for the existing tables. On MySQL 5.1.6 and higher it is possible to partition a non-partitioned table. With dbForge Studio you can add or remove partitions, change range or list partition values, and even add and remove the whole partitioning.

Note

Hash and Key partitions cannot be removed.

See Also

Working with Partioned Tables

How To: Create Partitioned Tables


How To: Create Partitioned Tables

This topic describes creating of partitioned tables of the following types supported in MySQL:

· Range-partitioned
· Range column-partitioned
· Hash-partitioned
· List-partitioned
· List columns-partitioned
· Key-partitioned
· Composite partitioned

To learn more about working with partitioned tables and their types in MySQL, see Working with Partitioned Tables.

Creating a Range-Partitioned Table

1. Click the Create New Database Object button and select type "Table" from the list.
2. Input the table name.
3. Click Create and, if the specified name is unique, the table will appear in the Database Explorer.
4. Add required table columns to the table and set table type and required parameters.
5. Optionally, you can alter the name or change database (owner) in which the new table will be created.
6. Switch to the Partitioning tab.
7. Select the partitioning type Range.
8. Specify the Partitioning expression.
9. Add required partitions and set values for partitions' bounds for all partition columns.

For more information on how to add partitions, read How To: Add or Remove Partitions or Subpartitions.

10. Set other parameters (Comment, Storage engine) for partitions if necessary.
11. Save the document.

Creating a Range Column-Partitioned Table

1. Click the Create New Database Object button and select type "Table" from the list.
2. Input the table name.
3. Click Create and, if the specified name is unique, the table will appear in the Database Explorer.
4. Add required table columns to the table and set table type and required parameters.
5. Optionally, alter the name or change database (owner) in which the new table will be created.
6. Switch to the Partitioning tab.
7. Select the partitioning type Range Columns.
8. Specify the Partitioning columns.
9. Add required partitions and set values for partitions' bounds for all partition columns.

For more information on how to add partitions, read How To: Add or Remove Partitions or Subpartitions.

10. Set other parameters (Comment, Storage engine) for partitions if necessary.
11. Save the document.

Creating a Hash-Partitioned Table

1. Click the Create New Database Object button and select type "Table" from the list.

- or -

In the Database Explorer, right-click on the Tables node and select New Table.

2. Input the table name.
3. Click Create and, if specified name is unique, the table will appear in the Database Explorer.
4. Add required table columns to the table and set table type and parameters.
5. Optionally, alter the name or change database (owner) in which the new table will be created.
6. Switch to the Partitioning tab.
7. Select the partitioning type Hash (Linear Hash).
8. Specify the Partitioning expression. If the table has a primary key or unique key with NOT NULL columns, you should use only the columns of this key.
9. Add required partitions. For more information on how to add partitions, read How To: Add or Remove Partitions or Subpartitions.
10. Set other parameters (Comment, Storage engine) for partitions if necessary.
11. Save the document.

Creating a List-Partitioned Table

1. Click the Create New Database Object button and select type "Table" from the list.

- or -

In the Database Explorer, right-click the Tables node and select New Table.

2. Input the table name.
3. Click Create and, if specified name is unique, the table will appear in the Database Explorer.
4. Add required table columns to the table and set table type and required parameters.
5. Optionally, alter the name or change database (owner) in which the new table will be created.
6. Switch to the Partitioning tab.
7. Select the partitioning type List.
8. Specify the Partitioning expression.
9. Add required partitions and set list values for partitions.

For more information on how to add partitions, read How To: Add or Remove Partitions or Subpartitions.

10. Set other parameters (Comment, Storage engine) for partitions if necessary.
11. Save the document.

Creating a List Columns-Partitioned Table

1. Click the Create New Database Object button and select type "Table" from the list.

- or -

In the Database Explorer, right-click on Tables node and select New Table.

2. Input the table name.
3. Click Create and, if specified name is unique, the table will appear in the Database Explorer.
4. Add required table columns to the table and set table type and required parameters.
5. Optionally, alter the name or change database (owner) in which the new table will be created.
6. Switch to the Partitioning tab.
7. Select the partitioning type List Columns.
8. Specify the Partitioning columns.
9. Add required partitions and set list values for partitions.

For more information on how to add partitions, read How To: Add or Remove Partitions or Subpartitions topic.

10. Set other parameters (Comment, Storage engine) for partitions if necessary.
11. Save the document.

Creating a Key-Partitioned Table

1. Click the Create New Database Object button and select type "Table" from the list.

- or -

In the Database Explorer, right-click on Tables node and select New Table.

2. Input the table name.
3. Click Create and, if specified name is unique, the table will appear in the Database Explorer.
4. Add required table columns to the table and set table type and parameters you need.
5. Optionally, alter the name or change database (owner) in which the new table will be created.
6. Switch to the Partitioning tab.
7. Select partitioning type Key.
8. Select Partitioning columns. If the table has a primary key or unique key with NOT NULL columns, you should use only the columns of this key.
9. Add required partitions. For more information on how to add partitions, read How To: Add or Remove Partitions or Subpartitions.
10. Set other parameters (Comment, Storage engine) for partitions if necessary.
11. Save the document.

Note

Linear hash and linear key partitioned tables can be created in the same way as hash and key partitioned tables respectively. Just select Linear hash instead of Hash or Linear key instead of Key in the Partitioning type drop-down list.

In a composite partitioned table, partitions are divided into subpartitions. Subpartitions can be set individually for each partition.

Creating a Composite Partitioned Table

1. Click the Create New Database Object button and select type "Table" from the list.
2. Input the table name.
3. Click Create and, if specified name is unique, the table will appear in the Database Explorer.
4. Add required table columns to the table and set table type and parameters you need.
5. Optionally, alter the name or change database (owner) in which the new table will be created.
6. Switch to the Partitioning tab.
7. Select partitioning type Range, Range Columns, List or List Columns.
8. Select subpartitioning type.
9. Specify the Partitioning expression.
10. Select Subpartitioning columns for the key subpartitioning or specify the Subpartitioning expression for hash subpartitioning. If the table has a primary key or unique key with NOT NULL columns, you should use only the columns of this key. For key partitioning, you may skip the Subpartitioning columns setting, the key columns will be used in that case.
11. Add required partitions and set values for partitions' bounds for all partition columns. For more information on how to add partitions, read How To: Add or Remove Partitions or Subpartitions.
12. Add subpartitions manually if required or set their quantity for partitions. Each partition must have the same number of subpartitions.

Note

In MySQL 5.1.8 and higher subpartition names must be unique across the entire table.
13. Set tablespace names for partitions and subpartitions if required.
14. Save the document.

Note

Linear hash and linear key subpartitioned tables can be created in the same way as hash and key subpartitioned tables respectively. Just choose Linear hash instead of Hash or Linear key instead of Key in the Subpartitioning type drop-down list.

See Also

Working with Partitioned Tables

How To: Add or Remove Partitions or Subpartitions


How To: Add or Remove Partitions or Subpartitions

Manipulate table partitions and subpartitions on the Partitioning tab of table editor.

Current table partitions and subpartitions are shown in the Partitions tree.

To remove a partition or subpartition, select its node in the tree and click the Remove button or select Remove from its shortcut menu.

To change a partition name, select the partition in the tree and edit its name in the Name box.

Adding Partitions

To add a partition, do the following depending on the partitioning type:

Hash and Key Partitioning

Click the Add button.

Range Partitioning

Click the Add button. Range boundaries values must be set for partitions. To set the partition boundary value, select it in the Partitions tree and specify the value. When using range partitioning, records, having partitioning expression values up to the first partition's values inclusive maps to the first partition. Record maps to n-th partition if record has partitioning expression value more than (n-1)-th partition border value and less or equal than n-th partition border value. Values of different partitions cannot be equal, so the value of the current partition must be greater than the value of the previous partition. When adding a new partition to an existing partitioned table this rule must be observed too. MAXVALUE keyword can be used for the partitions to set its boundaries to the maximum possible value of the corresponding partitioning key column type.

Range Columns Partitioning

A similar procedure applies to the range column partitioning, however in comparison with Partitioning expression section, that was in range partitioning, Partition columns section may contain multiple columns. A value list must be supplied for each partition definition in the Value field, and each value list must have the same number of values as the Partitioning expression has columns. The elements in the partitioning column list and in the value list defining each partition must occur in the same order. In addition, each element in the value list must be of the same data type as the corresponding element in the column list. However, the order of the column names in the partitioning column list and the value lists does not have to be the same as the order of the table column definitions.

List Partitioning

Click the Add button. Value list should be set for each partition. To edit values for the partition, select it in the tree and click the [image] button in the Value box. The Values Editor dialog box will appear. To add an item to the list, type a value in the box and click Add. To delete item select it in the list and click Delete. Click OK to apply changes. Value list must contain values for the partitioning expression. Record will be stored in the partition, having the value of the partitioning key in the list.

List Columns Partitioning

A similar procedure applies to column list partitioning, however in comparison with Partitioning expression section, that was in range partitioning, Partition columns section may contain multiple columns. A list of value sets must be supplied for each partition definition in the Value field, and each set of values must have the same number of values as the Partitioning expression has columns. The elements in the partitioning column list and in the sets of values must occur in the same order. In addition, each element in the sets of values must be of the same data type as the corresponding element in the column list. However, the order of the column names in the partitioning column list and the sets of values does not have to be the same as the order of the table column definitions.

Composite Partitioning

Click the Add button and select Add partition from the shortcut menu or right-click the Partitions tree and select Add partition from the shortcut menu. Range boundaries or value list for partitions should be set just like when using range or list partitioning.

To add a subpartition, right-click the partition in the Partitions tree and select Add subpartition from the shortcut menu or do the following:

1. Select a partition in the Partitions tree.
2. Click Add button.
3. Select Add subpartition from the shortcut menu.

Note

All partitions must have the same number of subpartitions. In MySQL 5.1.7 and earlier, names of subpartitions must be unique within each partition, but do not have to be unique within the whole table. In MySQL 5.1.8 and higher they must be unique within the entire table.

You can also set subpartition quantity without setting all the subpartitions manually.

Removing Partitions and Subpartitions

To remove a subpartition, select it in the tree and click the Remove button, or right-click the subpartition and select Remove from the shortcut menu. Note that you should keep the same subpartition number for each partition, otherwise, you will get an error when saving the table.

If you remove an existing subpartition from the table, when saving the table, a dialog appears asking whether to remove a partition and lose all its data or to repartition the entire table without losing data. Click Remove to remove a partition with its data, or Repartition to repartition the table and keep the partition data, or Cancel to cancel partitioning changes. But if you have changed the partitioning or subpartitioning type or expression before saving the table, it will be repartitioned without a confirmation dialog.

See Also

Advanced, Working with Partitioned Tables

Merge Tables


How To: Merge Tables

Merge table is a collection of MyISAM tables, having identical columns and indexes, that can be used as one.

Creating a Merge Table

1. Click Create New Database Object and specify type "Table" in the dialog.
2. Input name of the table.
3. Click the Create button and, if specified name is unique, the table will appear in the Database Explorer.
4. Specify the MERGE Table type.
5. You can set table columns and indexes manually. They must be the same as in the underlying MyISAM tables. This step is optional.
6. Switch to the Merge Options tab.
7. Select Insert Method to determine the MyISAM table to insert rows into when they are inserted in the merge table.
8. Select the owner of the underlying tables.
9. Add the tables you need from the Available tables list to the Underlying tables list using the [image] button.
10. If you have skipped step 5, select a table in the Underlying tables list and click the Import button to import the table structure from the selected table. You may inspect the selected table structure by clicking the blue-colored table name near the Import button.
11. Save the document.

Note

MySQL does not check if the underlying tables have the same structure or even if they are MyISAM tables when creating the merge table. However, if you create a merge table with non-MyISAM tables or tables with different structure, or if you drop or alter the underlying table after creating the merge table, you are very likely to encounter errors when working with the merge table.

Editing a Merge Table

You can edit a merge table by selecting Edit Table from Database Explorer node shortcut menu. If you change Table type of the merge table, you will lose the mapping to the underlying tables. Data rows will be copied to the altered table and stored using the new storage engine.

Dropping a Merge Table

You can drop view by selecting Delete from the Database Explorer node shortcut menu.

See Also

Advanced, Working with Partitioned Tables

How To: Work with Views


How to Use FEDERATED Tables

FEDERATED table allows you to work with remote tables and not to store them locally.

Creating a FEDERATED Table

To create a FEDERATED table, use the database where the table is stored.

1. Go to the Columns tab of the table editor.
2. Select the FEDERATED storage engine type in the Engine combo box.

3. Switch to the Federated options tab.
4. Specify the connection string. Alternatively, to connect to the required table on the server, select the corresponding server and the table link.
5. Now you can access to the server that store the required table through the federated table, view all changes, and work with table's data on the remote server.

Editing a FEDERATED Table

You can edit a federated table by selecting Edit Table from the Database Explorer node shortcut menu. All the changes you make will be also shown on the server where the table is stored.

Dropping a FEDERATED Table

You can drop the federated table by selecting Delete from the Database Explorer node shortcut menu. Once the connection is broken between the running servers, you can make changes and view the result changes only on the server that stores the tables.

Note

If you have MySQL 5.0.13 installed, use COMMENT rather than CONNECTION.

See Also

Working with Tables

How To: Work with Views


How To: Work with Views

View is a logical table based on one or more tables or views. A view contains no data itself, but retrieves it from underlying tables and views when requested. Views are introduced in MySQL 5.0.1.

dbForge Studio allows you to create, modify, and drop views, retrieve and alter data in underlying tables.

Creating a View

1. Click the Create New Database Object button and specify type "View" in the dialog.
2. Input name of the view.
3. Click Create and, if specified name is unique, the document of this view will appear. Note that views share the same namespace with tables.
4. Type a query that will represent the view. You do not have to type "CREATE OR REPLACE VIEW ... AS" because dbForge Studio adds this clause for you.
5. Optionally, alter the name or change database (owner) in which the new view will be created.
6. Save the document. If there are any errors in the SQL syntax, you will be notified about it.

-or-

1. In the Database Explorer, right-click the Views node and select New View.
2. Input name of the view and type a query that will represent the view. You do not have to type "CREATE OR REPLACE VIEW ... AS" because dbForge Studio adds this clause for you.
3. Optionally, alter the name or change database (owner) in which the new view will be created.
4. Save the document. If there are any errors in the SQL syntax, you will be notified about it.

Editing a View

Edit a view by selecting Edit View from the Database Explorer node shortcut menu. In the opened document, you can alter the query text. Once a view is created, you can not modify its name or owner. Save the document to apply changes you've made to the query text.

Dropping a View

Drop a view by selecting Delete from the Database Explorer node shortcut menu.

Retrieving and Modifying View Data

To retrieve view data, right-click on view in Database Explorer and choose Retrieve Data from shortcut menu. The data is rendered in grid-based editor. You can browse and edit view data in the same way as you browse and edit table data.

Note

Some views can be non-updatable. You can not edit their data.

See Also

Working with Database Objects

How To: Create Copy of Database Object


How To: Generate DDL Statements for Database Objects

dbForge Studio for MySQL allows you to generate DDL statements for database objects, such as: tables, views, stored procedures and functions, and triggers. Using this feature you can make scripts for recreating database objects or object groups.

To generate script

In Database Explorer, right-click an object you want to generate script for (if you need to generate script for multiple objects, select them with holding the CTRL key), point to Generate Script As, then point to required script type, and then select the output option for the script: you can can either open it in a new SQL window, or save it to file. or copy it to clipboard.

Note

Scipt generation is also available in the the Database Backup and Restore and Database Projects features.

Configuring Scipt Generation Options

To setup script generation options, in the Tools menu, click Options, and expand the Generate Schema Script node.

The Options window allows you to configure both, general script generation options, and options that are specific to the CRUD generation script.

See Also

Working with Database Objects

How To: Create Partitioned Tables


How To: Work with Stored Programs

This topic describes working with stored programs are stored procedures and functions, triggers and events in dbForge Studio for MySQL.

Events

Event is a task that runs according to schedule. An event's action statement may include most SQL statements permitted within stored routines. dbForge Studio supports events on MySQL servers starting from MySQL 5.1.11. dbForge Studio allows you to create, modify, and drop events.

Creating an Event

1. On the Standard toolbar, click New Database Object and specify the Event type in the dialog.
2. Input name of the event.
3. Click the Create button and, if specified name is unique, the document of this event will appear. Note that views share the namespace with tables.
4. Select Enable, Recurrent and Drop on Completion options to set event state and schedule.
5. Optionally, you can alter the name or change database (owner) in which the new event will be created.
6. Go to the Timing tab and set the event schedule.
7. Save the document. If there are any errors in the SQL syntax, you will be notified about it.

-or-

1. In the Database Explorer, right-click the Events node and select New Event.
2. Input name of the event.
3. Type SQL statements that will represent the event body.
4. Select Enable, Recurrent and Drop on Completion options to set event state and schedule.
5. Optionally, you can alter the name or change database (owner) in which the new event will be created.
6. Go to the Timing tab and set the event schedule.
7. Save the document. If there are any errors in the SQL syntax, you will be notified about it.

Editing an Event

Edit event by selecting Edit Event from Database Explorer node shortcut menu. Note that event can not be saved if the start day of the event already passed. Set it to a correct value (current or future time) to save the event.

Dropping an Event

Drop event by selecting Delete from the Database Explorer node shortcut menu.

Stored Procedures and Functions

Stored procedure (function) is a set of statements that resides on server side and can be executed. Using dbForge Studio, you can create, edit, execute and delete stored procedures.

Creating a Stored Procedure

1. In the Database Explorer, navigate to the Procedures node.
2. Select New Procedure from the shortcut menu.
3. Provide procedure name in dialog box opened and click Create.

A new document appears with template in Text view. Fill it with statements or switch to Design view to edit procedure properties. Save the document to finish procedure creation.

Editing a Stored Procedure

To edit a stored procedure:

1. In the Database Explorer, navigate to the Procedures node and expand it.
2. Right-click a procedure and select Open from the shortcut menu.

- or -

double-click a procedure.

You can switch to the Design view to edit some properties of the procedure.

Figure 1: editing a procedure in the Text View

Figure 2: editing a procedure in the Design View

Executing a Stored Procedure

Right-click a stored procedure in the Database Explorer and select Execute.

The stored procedure editor opens if it was not opened before. If the procedure accepts parameters, you will see the Parameters dialog box where you can assign initial values for procedure arguments. Once the stored procedure is executed, you will see a corresponding record in the Output window. The data returned by the stored procedure will appear in Data view of the stored procedure editor.

Stopping Stored Procedure Execution

Click the [image] Stop Execution button on the toolbar.

Deleting a Stored Procedure

Right-click a stored procedure in the Database Explorer, and select Delete.

Note

You can treat stored functions exactly the same way as stored procedures.

Triggers

Trigger is a routine executed under certain conditions.

Using dbForge Studio, you can create, edit and delete triggers.

Note

dbForge Studio supports triggers only with MySQL server 5.0.13 and higher.

Creating a Trigger

1. In the Database Explorer, navigate to the Triggers node.
2. Select New Trigger from shortcut menu. A new document appears with template in the Design view.
3. Provide trigger name. Optionally, you can change schema for the object.
4. Specify trigger body.
5. Switch to the Event tab and specify the event to fire the trigger.
6. Save the document.

Editing a Trigger

1. In the Database Explorer, navigate to Triggers node and expand it.
2. Right-click a trigger and select Edit Trigger from the shortcut menu.

The Trigger Editor has two tabs: Main and Event. In the Main tab, you can choose trigger type and fill its body, as well as switch the trigger on or off. In the Event tab you can set up event that should execute the trigger.

Deleting a Trigger

Select Delete from the trigger shortcut menu.

See Also

Working with Database Objects


How To: View Object Dependencies

The Objects Dependencies tree, introduced in dbForge Studio for MySQL, offers a fast a simple way to view and navigate trough database object dependencies, that belong to each database object.

Each of available database objects within Database Explorer has Depends On and Used By collections.

The Depends On collection includes database objects that must be present for the object to function properly. The Used By collection includes database objects that depend upon the selected object.

In its turn, you can expand any object within Used By or Depends On to analyze its own dependencies.

Right-click any database element to learn more abut it, find it in Database Explorer etc. (the list of available options depends on an object's type).

See Also

Working with Database Objects

How To: Work with Stored Programs


Refactoring

Refactoring can be used for renaming database objects and objects in code. Refactoring allows you to keep all dependencies and this way the structure of your database will be also kept.

In This Section

How To: Perform Refactoring of Database Objects
This topic explains how to perform renaming of database objects using refactoring.

How to: Perform Refactoring in SQL Script
This topic explains how to rename objects in SQL scripts using refactoring.

Advanced Topics
This section contains more detailed information on refactoring process.

See Also

Working with Database Objects


How To: Perform Refactoring of Database Objects

Renaming database objects using refactoring implies making changes in all dependencies. This way all relations, foreign keys, and references will be kept. This topic gives description of performing renaming procedure of a database object using refactoring.

Renaming Objects from Database Explorer

Basic refactoring process

1. Select the object you want to rename in the Database Explorer tree. Right-click it.
2. On the shortcut menu, point to Refactoring, and then click Rename.
3. In the Rename dialog box, enter the new name of the object and click OK.
4. In the Preview Changes window, view the changes that will be applied to your database. Clear the check boxes near the ones that you don not need.
5. Click Apply.

-or-

1. Double-click an object you want to rename.
2. Change the name and press ENTER.
3. In the message box click Refactor.
4. In the appeared Preview Changes window view the changes that will be applied to your database. Clear the check boxes near the ones that you don not need.
5. Click Apply.

Using refactoring script

You can view changes that will be made to the database before applying them. For this, you can:

1. Check the Generate script without updating database option.
2. Click Apply.
3. The generated script will be opened in the SQL Editor.
4. View the script and press F5 to execute it and apply changes to the database.

Renaming Database Objects from Object Editors

To rename an object with refactoring from object editor, you should:

1. Open the object editor.
2. Rename the object.

Note

You can also rename columns using refactoring in the table editor.
3. Click the Update Database or Script Changes button.
4. In the appeared message, click Yes.
5. View changes in the Preview Changes window, adjust them, if needed.
6. Click Apply or Generate (depends on what you are doing - updating a database right away or viewing script changes).

Multiple refactoring in table editor

You can rename several columns at once using refactoring. To do this:

1. Open the table you want to edit in the table editor.
2. Rename the columns you need to rename.
3. Click the Update Database or Script Changes button.
4. View changes in the Preview Changes window. Changes in the tree are grouped by columns.
5. Click Apply or Generate (depends on what you are doing - updating a database right away or viewing script changes).

See Also

Refactoring

How to: Perform Refactoring in SQL Script


How To: Perform Refactoring in SQL Script

This topic will explain how to use refactoring in SQL scripts and project objects. To rename a project object or change name of an object in a script using refactoring, perform the following steps:

1. For project object, right-click the object name in the SQL editor or in Schema View and choose [image] Rename from the shortcut menu.
To rename object in a script, open the code, right-click the object name in the SQL editor, and click [image] Rename.
2. The Rename window will appear. Enter a new object name.
3. Use the corresponding check boxes to determine whether to search in text strings and comments and whether to preview changes, then click OK.
4. If the Preview reference changes check box was checked, Preview Changes dialog box will appear. Here you can preview, enable, and disable project changes.
5. Click the Apply button to apply the selected changes, or click the Cancel button to cancel them.

See Also

Refactoring

Advanced Topics


Advanced Topics

This section contains information on peculiarities of refactoring usage.

In This Section

Refactoring Overview
This topic explains what is refactoring and which objects can be refactored.

Refactoring Usage
This topic describes situations where refactoring can be useful.

See Also

Refactoring

Working with Database Objects


Refactoring Overview

Refactoring is used to improve design of your database schemas. You can perform refactoring of database objects and in SQL scripts. Refactoring can be applied in online and offline (database projects) database development.

Renaming objects from the Database Explorer tree, object editors and scripts generated from the Database Explorer is considered a part of online database development.

Renaming objects from the project is considered a part offline database development.

Database objects that can be renamed during online database development

· Tables
· Columns

Note

If you rename a column with a trigger on it, the trigger will be recreated.
· Views
· Functions
· Procedures

Database objects that can be renamed during offline database development

· Tables
· Views
· Stored routines
· Triggers
· Events
· Table and view columns
· Stored routine parameters
· Stored code variables
· Users
· Aliases

Note

Changes made by refactoring may be rolled back only if the changed files were opened before refactoring. In that case you may activate the corresponding document and press CTRL+Z to undo refactoring changes.

See Also

Advanced Topics

Refactoring Usage


Refactoring Usage

This topic describes examples of situations, where users can benefit the most form refactoring.

Renaming columns referenced by other columns using foreign keys

When renaming a column, it is necessary to make sure that all references using foreign keys are working. When simply renaming the column, you will have to find all foreign keys, delete them, rename the column and recreate the keys. When renaming using refactoring, the application will find all foreign keys and apply the new column name in all database.

Renaming columns used in creating views

It often happens that the column you need to rename is used in views. In case you just rename the column, you'll get an error when data is selected for the view. To avoid it, you will have to edit all views that use the renamed column after you actually rename it. Refactoring tool in dbForge Studio will edit all views on its own after you rename the column.

Renaming objects with code

If you rename an object with code, for example, a stored routine and make a mistake in the code, the procedure or function will be lost and you will have to recreate it from memory.

dbForge Studio for MySQL refactoring tool uses a special algorithm that changes such scenario:

1. A temporary stored routine is created. It contains the code of the procedure before renaming.
2. All objects that use this routine are deleted.
3. All objects that use this stored routine are recreated, but the routine is renamed.
4. The routine with new name and new code is created.
5. The temporary stored routine is deleted.

In case the fifth step fails, the script execution stops and the original code can be restored from the temporary object.

See Also

Advanced Topics

Refactoring


Walkthroughs

Read these walkthroughs to perform basic operations with dbForge Studio step-by-step.

In This Section

Creating a Database and Two Tables
Describes how to create a database with two tables

Creating a View
Describes how to create a view.

Creating a Trigger
Describes how to create a trigger.

See Also

Working with Database Objects

Creating a Database and Two Tables


Creating a Database and Two Tables

The following walkthrough describes how to add a database connection, create a database and a table. To complete the walkthrough you must have a MySQL server running.

To get acquainted with dbForge Studio, let us perform some common operations and see how a database and data within it can be managed. In order to interact with MySQL, a client must first establish a connection with the server.

Note

In this topic as well as in the other topics, clicking with the right mouse button is referred to as "right-click". Clicking with the left mouse button is referred to as "click". "Double-click" means that you should click quickly with the left mouse button twice.

Prerequisites

In order to complete this walkthrough, you will need access to MySQL 5.0 server version 5.0.30 or higher, or to MySQL server 5.1.13 or higher.

To create database and tables you should have the CREATE privilege on the created database or the global CREATE privilege.

Adding a Database Connection

1. To open the Database Explorer window, click Database Explorer on the View.
2. In the Database Explorer window, click on the New Connection button.
3. Set up connection parameters in the dialog window that appears.
4. To navigate through the connection created, click on the plus mark to the left of the tree nodes.

Now suppose you don not have any databases on this server. You have to create one to continue working and proceed in step-by-step learning of dbForge Studio.

Creating a Database

1. In the Database Explorer, right-click on the active connection node and select New Database.
2. Input the name of the database: Demobase, and specify database character set and collation.
3. Click the OK button, and, if specified name is unique, the database will appear in the Database Explorer.

Creating a database in MySQL is not very difficult as it has only one property: its name. Now to go on you have to create several tables inside this database.

Creating Tables

Defining Tables' Structure

Suppose you need to manage an organization's employees. To keep track of their status, you might want to create two tables, one named "Emp" with data on every employee and the other named "Dept" with data on departments that employees work in.

Let table "Emp" have the following structure:

Column name | Type | Description
EmpNo | INT | Internal employee's number
EName | VARCHAR (10) | Name of the employee
Job | VARCHAR (9) | Occupation
MGR | INT | Internal number of employee's manager
HireDate | DATETIME | Date when the employee was hired
Sal | FLOAT | Salary of the employee
Comm | FLOAT | Commission
DeptNo | INT | Internal number of a department where the employee works

Primary index should be created for column "EmpNo".

Table "Dept" may be described as follows:

Column Name | Type | Description
DeptNo | INT | Internal number of the department
DName | VARCHAR (14) | Name of the department
Loc | VARCHAR (14) | Location of the department

Primary index should be created for column "DeptNo".

Creating the Tables

1. In the Database Explorer, navigate to database you want to create table in and expand it. In our example it should be "Demobase".
2. Right-click on the Tables node and choose [image] New Table from the shortcut menu.
3. In the opened dialog, type the name of the table (it should be "Emp") and click Create.

Table editor appears with a blank document in it.

4. Right-click in the table editor (the General tab must be active), and choose New Column... from the shortcut menu or press the INSERT key. Column Properties dialog appears.
5. Type in column name: "EmpNo".
6. Tick Primary option below.
7. Set type for the column to INT.
8. Click OK to create the column.
9. Repeat steps 4, 5, 7 and 8 to set up all other columns with their respective options.
10. After you have finished with the table, click the [image] Save button to confirm changes made to the table.

Note

Length of fields with variable size can be changed in the field "Length" in the middle-right of the column editor.

Adding an Index to the Table

1. Open the table "Emp" from the Database Explorer using double-click if it is not open yet.
2. Switch to the Indexes tab.
3. Right-click on the document, and choose New Index from the shortcut menu or press the INSERT key. Index Properties dialog appears.
4. In the dialog, type in a name for the index.
5. Set it to be unique by checking an appropriate check box.
6. There are two lists in the dialog: Index columns and Available columns. In the Available columns list, select field "EmpNo" and click the Add Field button.

Field EmpNo is removed from the original list and added to the Index columns list.

7. Click OK to create an index.
8. Click the Save button to confirm changes made to the table.

Now the first table is ready. Repeat these steps for table "Dept" to create it.

See Also

Walkthroughs

Creating a View


Creating a View

The following walkthrough describes how to create a view. Tables created in the previous parts of walkthrough will be used there.

Prerequisites

In order to complete this walkthrough, you will need access to MySQL server 5.0 or higher.

You also should have the following privileges:

· CREATE VIEW on the demobase database
· SELECT privilege on the emp and dept tables

dbForge Studio for MySQL supports views on MySQL 5.0 and higher.

Creating a View

View is a logical table based on one or more tables or views. A view contains no data itself, but retrieves it from underlying tables and views when requested. Let's create a view that takes data from two tables (Dept and Emp), joins them and shows the result set.

1. In the Database Explorer, navigate to the Views node in your schema.
2. Right-click on it and choose New View from the shortcut menu.
3. Type the name of the view (Staff) and click Create.
4. In the template that appears paste the following text:

SELECT demobase.emp.ename AS name, demobase.emp.job, demobase.emp.sal
AS salary, demobase.dept.dname AS department FROM demobase.emp, demobase.dept
WHERE demobase.emp.deptno = demobase.dept.deptno

It says, take employee's name, job and salary from the table Emp, and determine from which department the employee is. Show this data for every employee.

5. Save the document and refresh the Views node. Now all you have to do is to choose Retrieve Data from the shortcut menu of the view.

See Also

Walkthroughs

Creating a Trigger


Creating a Trigger

The following walkthrough describes how to create triggers. Trigger is a routine executed under certain conditions.

Prerequisites

In order to complete this walkthrough, you will need access to MySQL server 5.0.13 or higher.

You should also have the following privileges:

· TRIGGER privilege on the demobase database
· ALTER, UPDATE and SELECT privileges on the dept table
· SELECT, INSERT, UPDATE and DELETE privileges on the emp table to test trigger work

Creating trigger

Let's add a column in table 'dept' where the sum of salary of all employees in this department will be stored. To create this column:

1. In the Database Explorer make sure that connection to your server containing the base ("Demobase") is active.
2. Click on Create New SQL button on the Standard toolbar to open new visual SQL document.
3. Type or paste following script there:

ALTER TABLE demobase.dept ADD COLUMN salsum FLOAT;
UPDATE demobase.dept SET salsum =
(SELECT SUM(demobase.emp.sal) FROM demobase.emp
WHERE demobase.emp.deptno = demobase.dept.deptno);

First the query adds a column to a table and then fills it with data.

4. Execute the script by clicking Execute on the SQL toolbar.

Now our column is ready and filled with correct data. But when a new employee will be added or removed from the 'emp' table, this column should be updated too. This can be done automatically with triggers. So, let's create triggers that will keep data in this column always up-to-date. To create these triggers:

1. In the Database Explorer, make sure that the connection to the server containing the base ("Demobase") is active.
2. Navigate to the node of the table demobase.emp and expand it.
3. Right-click the 'Triggers' node and choose New Trigger from the shortcut menu. A trigger editor document will appear.
4. Type 'SalsumIns' in the Name field.
5. Type following text in the Trigger body field:

UPDATE demobase.dept SET demobase.dept.salsum =
(SELECT SUM(demobase.emp.sal) FROM demobase.emp
WHERE demobase.emp.deptno = demobase.dept.deptno)

6. Switch to the Event tab.
7. Select After in Timing and Insert in Event.
8. Save the trigger.

The trigger for insert event is ready. Now create 'SalsumUpd' and 'SalsumDel' triggers with the same body with after update and after delete event. After that each data change in the 'emp' table will be reflected in the 'dept' table.

See Also

Walkthroughs

Working with Database Objects


Working with Search

This section describes how to work with dbForge Studio.

In This Section

How To: Search Database Objects
Describes how to quickly find an object in a database.

How to: Search Table ad View Data
Describes how to find da

How To: Manage Search Results
Describes how to review, sort, and filter search results.


How to: Search Database Objects

This topics discusses how to search for objects in a database using dbForge Studio.

Search

1. Click Find Object on the Database menu or press Ctrl+F, D.
2. Click [image] to switch to the Search objects by name and DDL mode.
3. In the Search text box, enter the search string.
4. Optionally, click [image] to select an additional find option from the drop-down list box. The available options are Match Case, Match Whole Word and Use WildCards. By default, the Use WildCards option is selected.
5. Optionally, click [image] to group results by the object type.
6. You can change the scope of search results by specifying the search parameters, such as an object type, database, and connection to search in.
· Object types. Select object types, in which the search will be performed. By default, all object types are selected.
· Database. Select a database to search in from a drop-down list. The database you are currently connected to is selected by default.
· Connection. Select a connection for search from a drop-down list. The connection you are currently using is selected by default.
7. To start the search, Click [image] in the Search text box. During the search, you will see the button with a binocular and a progress spinner indicating that the search is in progress. You can stop the search at any point by clicking the binocular button.

8. When the search is completed, the details of search results will be displayed in the Search Results grid.
9. Optionally, you can set a filter for each column in the Search Results grid.
10. When you select a result in the grid, the Preview window below the grid displays the DDL statements associated with the selected result.

See Also

How to: Search Table ad View Data

Working with Search for SQL Server


How to: Search Table ad View Data

How to: Search Table and View Data

This topics discusses how to search for data in database tables and views using dbForge Studio.

Data Search

1. Click Find Object on the Database menu or press Ctrl+F, D.
2. Click [image] to switch to the Search Table and View Data mode.
3. In the Search text box, enter the search string.
4. Optionally, click [image] to select an additional find option from the drop-down list box. The available options are Match Case, Match Whole Word and Use WildCards. By default, the Use WildCards option is selected.
5. Optionally, click [image] to group results by the object type.
6. You can change the scope of search results by specifying the search parameters, such as objects, a database, and a connection to search in.
· Objects. Select objects, in which the search will be performed. By default, all objects are selected.
· Database. Select a database to search in from a drop-down list. The database you are currently connected to is selected by default.
· Connection. Select a connection for search from a drop-down list. The connection you are currently using is selected by default.
7. To start the search, Click [image] in the Search text box. During the search, you will see the button with a binocular and a progress spinner indicating that the search is in progress. You can stop the search at any point by clicking the binocular button.

8. When the search is completed, the details of search results will be displayed in the Search Results grid.
9. Optionally, you can set a filter for each column in the Search Results grid.
10. When you select a result in the grid, the Preview window below the grid displays the records that match the search criteria.

See Also

How to: Manage Search Results

Working with Search for SQL Server


How to: Manage Search Results

This topic discusses how you can manage search results.

Sort and Filter Search Results

dbForge Studio allows you to quickly sort search results. You can sort records in each column by ascending or descending alphabetic order by clicking a column heading.

To apply filter to a column:

1. Hover a cursor over a column heading. The Filter button [image] will appear its upper right corner.

2. Click the Filter button and select an item from the drop-down list. All the records corresponding to this item will be displayed in the grid.
3. Optionally, select the "Custom" option from the drop-down list. The Custom AutoFilter window will appear, where you can fine tune the filter.

4. The filters currently applied to the search results may be edited in the Filter Editor. To evoke the editor, click the Edit Filter button in the lower right corner of the Search Results grid.

Find Object in Object Explorer

dbForge Studio can navigate you to an object in the Object Explorer directly from the dbForge Studio window.

1. Double-click the object in the Test Results grid; or
2. Right-click the object in the Test Results grid and select Find in Object Explorer from the context menu;
3. Select the object in the Test Results grid and click the Find in Object Explorer button [image] below the grid.

Word Wrap

Click the Word Wrap button [image] to set and clear the Word Wrap option for source code displayed in the Preview window. When the option is enabled, all the text shall fit the current width of the Preview window.

Line Numbers

Click the Show line numbers button [image] to set or clear numbers for lines of the source code displayed in the Preview window.

See Also

How to: Search Database Objects

Working with Search for SQL Server


Designing Databases

Database Designer allows you to view and edit a database in a convenient visual way. You can observe all database objects, see foreign key relations between tables, view database objects information, easily access database objects for editing, retrieving data, executing stored routines. Database object shortcut menu on the diagram provides access to the same actions as the shortcut menu of the database object in the Database Explorer. Shapes representing a database object can be moved (by dragging them with mouse or keyboard), resized, aligned to the diagram grid. Diagram can be saved for future use.

With Database Designer, you can also perform reverse engineering of databases to IDEF1X or IE diagrams, that can be easily printed.

In This Section

How To: Create a Database Diagram
The topic explains how to create a database diagram.

How To: Add Database Objects to a Diagram
Describes how to add existing database objects to the diagram, or create new ones, how to quickly add multiple existing objects, etc.

How To: Delete or Edit Database Object on a Diagram
Describes how to delete database objects from the diagram or edit them.

How To: Create a Many-to-Many Relationship Between Tables
The topic explains how to create many-to-many relationship between tables.

How To: Save and Restore a Diagram
The topic explains how to save and restore a diagram.

How To: Export a Diagram
This topic describes how to export database diagram to an image file.

How To: Quickly Print a Diagram
The topic describes how to print a diagram.

Searching Text on a Database Diagram
This topic contains information about searching database objects by text on the diagram.

Setting Diagram Options
This topic describes how to customize the diagram with the diagram options.

Why Relation Cannot Be Created?
Learn the cases when relations can not be created on the diagram.

Additional Elements on a Diagram
The topic describes supplementary elements that can be displayed on a diagram.

Working with Database Objects on the Diagram
This section contains information about working with the database objects on the diagram.


How To: Create a Database Diagram

To create a database diagram, perform the following steps:

1. On the File menu select New, and then click Database Diagram.
2. Drag database objects from Database Explorer to the diagram. Alternately, right-click a database object, point to Send to, and that click Database Diagram. You can also create new database objects on the diagram using the Diagram toolbar.
3. You may click the Layout Diagram button on the Layout toolbar to layout diagram for a more convenient view. (Or set the diagram layout manually by dragging shapes and moving the relations. You can also use containers to organize the diagram.)
4. Add a stamp to the diagram to display company and project names, diagram author, version, date, and copyright. To add a stamp, click the New Stamp button on the Diagram toolbar. To edit stamp fields, double-click them and enter values. You can also add notes to the diagram to describe its objects.
5. Save the diagram for future use.

Navigating the Diagram

To navigate the diagram:

· Use the scrollbars.
· Move the mouse while holding the middle mouse button.
· Use the Diagram Overview window. Drag square visible area on the Diagram Overview window with the mouse.

To display the Diagram Overview window, on the View menu, click Other Windows, and then click Diagram Overview, or press CTRL+V, W.

· Search diagram shapes.
· Use the Document Outline window. It contains nodes, representing all shapes on the diagram. They are grouped by containers and by object kinds. Stamps and notes are placed to the Notes kind. Table nodes contains their relations.

You can zoom in and out the diagram to simplify the navigating. To quickly move to the area you need, click the Fit button on the Diagram toolbar, then hold CTRL+SHIFT and select the area you need with mouse pointer.

See Also

Designing Databases with Database Designer

How To: Add Database Objects to a Diagram


How To: Add Database Objects to a Diagram

To add existing database objects to a diagram:

· Drag a database object from Database Explorer and drop it to the diagram document.

OR

· In Database Explorer, right-click a database object, point to Send to, and then click Database Diagram.

To create new database objects, use Diagram toolbar buttons.

Adding Existing Database Objects

To add an existing database object, drag it from the Database Explorer. Select multiple database objects in the Database Explorer with SHIFT or CTRL key to drag them to the diagram.

This way, you can add tables, views, stored procedures, and functions to the diagram. Events cannot be added to a database diagram. Triggers are added to the diagram automatically with their tables.

If you drag a database to the diagram, all its objects will be added to the diagram.

Note

You cannot add database objects from a different connection to the same diagram.

Foreign key relations are displayed on the diagram automatically when both of the connected tables are displayed on the diagram.

Creating New Database Objects

To create a new database object on the diagram, perform the following steps:

1. Click the corresponding button on the Diagram toolbar to create a corresponding database object, and then on the diagram sheet. A dialog box with the corresponding database object editor will appear.
2. Set all required database object settings in the editor and click OK to create the database object.

You can also open the database object editor dialog by right-clicking a diagram and choosing items from the New submenu of the shortcut menu.

To create a new foreign key relation between two diagram tables, you may perform the following steps:

1. Click the New Relation button on the Diagram toolbar.
2. Click the child table and move the mouse pointer, holding the mouse button pressed, to the parent table. Then release the mouse button. A partially initialized New Foreign Key Dialog Box will appear.
3. Specify the missing parameters in the dialog box and click OK.

See Also

Designing Databases with Database Designer

How To: Delete or Edit Database Object on the Diagram


How To: Delete or Edit Database Object on a Diagram

How to Delete Database Object from Diagram

To delete a shape from the diagram but keep a database object in the database, click the object and hit the DELETE key or right-click the object and select Remove from Diagram from the shortcut menu.

To remove database object from the database, click the object and press CTRL+DELETE or right-click the object and select Remove from Diagram from the shortcut menu.

Table columns, indexes, constraints, triggers, relations (foreign keys) can only be dropped from a database. Both DELETE and CTRL+DELETE keys invoke dropping. View columns and stored routine parameters cannot be deleted.

How to Edit Database Object on Diagram

To edit a database object, double-click it on the diagram. An object editor dialog will appear. The object editor dialog is the same as object editor document except for the bottom buttons. Reset discards all changes to the database object on any tab of the editor (but not the changes to the table or view data on the data view), OK button closes the dialog and saves all changes, Cancel button closes the dialog and discards all changes. You can edit database object in this dialog just like in the object editor document.

See Also

Designing Databases with Database Designer

How To: Create a Many-to-Many Relationship Between Tables


How To: Create a Many-to-Many Relationship Between Tables

Many-to-many relationships between tables are accommodated in databases by means of junction tables. A junction table contains primary key columns of the two tables you want to relate.

To create a many-to-many relationship between tables in dbForge Studio for MySQL you need to:

1. Create/Open a database diagram.
2. Add the tables that you want to create a many-to-many relationship between.
3. Create a third table by right-clicking within the database diagram, and then clicking New Table.

This will become a junction table.

4. In the table editor's dialog box, enter a name for the table.

For example, the junction table between the Customer table and the Supplier table is named CustomerSupplier.

5. Copy the primary key columns from each of the other two tables to the junction table.

You can add other columns to this table, just as you can to any other table.

6. In the junction table, set the primary key to include all primary key columns from the other two tables.
7. Define a one-to-many relationship between each of the two primary tables and the junction table.

Note

The creation of a junction table in a database diagram does not insert data from the related tables into the junction table. You can copy rows from one table to another or within a table using an Insert From query.

See Also

Designing Databases with Database Designer

How To: Save and Restore a Diagram


How To: Save and Restore a Diagram

Diagrams can be saved and restored just like any other document by using Save and Open buttons on the Standard toolbar.

Diagram does not store information about database object details offline. So, when you open the diagram, dbForge Studio will try to establish connection with MySQL database containing objects of the diagram. If the connection cannot be established, the diagram will not be opened.

Diagram stores the following information when saved to a file:

· layout information
· information about containers, notes, stamps
· connection information
· diagram database object names and owners
· names of the foreign keys, displayed on the diagram as relations
· diagram options

If the diagram database was modified after saving the diagram, diagram updates information about all database objects displayed on it, when opening. But the newly created objects in the database do not appear on the diagram. If the diagram object was deleted from the database, it is deleted from the diagram.

See Also

Designing Databases with Database Designer

How To: Export a Diagram


How To: Export a Diagram

Diagrams can be exported to various image formats. dbForge Studio supports the following formats for diagram export: bmp, jpg, gif, png, tif, emf.

To export a diagram to an image, perform the following steps:

1. Right-click the diagram and select Export to Image from the shortcut menu.
2. Specify the target file's name and image format.
3. Click the Save button.

Exporting Large Diagrams

Bitmap generating engine needs contiguous memory area for the bitmap. If the diagram is large, it is not always possible even if you have enough memory because of memory fragmentation. When such a problem occurs, you will get the following error: "The error occurred while diagram exporting. Probably the image is oversized. Try export to another format". This error occurs when exporting diagrams of about 10 000 x 10 000 pixels size and sometimes even with a smaller diagram.

What can be done:

1. Export the diagram to the vector format (emf).
2. Use third-party RAM defragmentation and applications optimization.
3. You may want to try to restart the application and export the diagram again.

See Also

Designing Databases with Database Designer

How To: Quickly Print a Diagram


How To: Quickly Print a Diagram

To print the diagram, perform the following steps:

1. Click the Display Print Markup button on the Diagram toolbar. The print markup grid will be displayed. Gray stripes show the page overlapping.
2. Layout a diagram for convenient view considering the print markup.
3. Select Print from the File menu.
4. After you have printed the diagram, you may turn off the print markup by choosing Print Markup from the diagram shortcut menu.

See Also

Designing Databases with Database Designer

Searching Text on the Database Diagram


Searching Text on the Database Diagram

dbForge Studio allows searching shapes by text. Database object shapes can be searched by their names and names of their members (columns, constraints, stored routine parameters). Search is also performed in stamp company name and project name fields, in notes, relation comments, container names.

To search for a database object, perform the following steps:

1. On the Edit menu, select Find and Replace, and then click Find in Files, or press CTRL+SHIFT+F.
2. Enter the text you search into the Find what field, and click the Find All button.
3. Double-click lines in the Find Results window to navigate to the found shapes.

See Also

Designing Databases with Database Designer

Setting Diagram Options


Setting Diagram Options

A database diagram can be tuned with a rich set of options. Options can be set either globally for all the diagram documents or separately for a particular one.

To set options for the current diagram, right-click it and choose Options from the shortcut menu to open the Diagram Options dialog box. You can reset options for the current diagram to default values (set globally) by using the Default button.

Changing Diagram Appearance

Database diagram supports three predefined skins which change its appearance. They are the Default skin, the Simple skin, and the IDEF1X skin. The Default skin uses the richest color palette. The Simple skin is optimized for printing and does not use gradients. The IDEF1X skin is mostly black-and-white to look like IDEF1X diagrams. To choose the skin, use the Skin Type drop-down list in the notations options.

You can use either IDEF1X or IE notation for relations. They can be switched by using the Relation Notation drop-down list.

With the notations options you can greatly customize the table shape look. You may hide its constraints, indexes, and triggers compartments, change its field detail level to display only column names, names with types or names with full types. Note that field detail level does not affect stored routines. Primary key columns may either be separated with horizontal line or placed with other columns.

On the General page of the Database Diagram section of Options Dialog Box you can customize diagram background color, shape shadows, and diagram grid.

Setting Diagram Printing Options

Page options allow you to set such page settings as orientation (portrait or landscape), paper size and source, printing margins and overlapping, header and footer text.

Print options allow setting parameters for positioning printed image in the center, diagram scale, and whether to print diagram grid. Diagram scale may be set either manually, using Scale field, or automatically to fit the desired number of pages. They also allow you to set up printing of the page markup that helps you to glue diagram pages together.

See Also

Designing Databases with Database Designer

Additional Elements on a Diagram


Why Relation Cannot Be Created?

Relations on the diagram correspond to existing foreign keys in a database. When you create a relation on the diagram, a foreign key constraint is created in the database. If the foreign key cannot be created in the database, the relation cannot be created on the diagram.

Possible reasons of this error are the following:

1. This version of MySQL server does not support foreign keys. MySQL supports foreign keys from version 3.23.44 and higher.
2. Table engine of one or both tables does not support foreign keys. dbForge Studio for MySQL supports foreign keys only if both tables are InnoDB type and they are not temporary tables.

Good to Know

· The column type of the column(s) in a parent table must be identical to the column type of the column(s) in the child table. You must manually create the index on the foreign key column(s).
· You do not need to name the constraint. InnoDB will assign a system name.
· You can enforce foreign key constraints across databases. It is possible to enforce a number of foreign key constraints in a single composite alter table statement.
· MySQL implements an enhanced form of the alter table statement to allow for the optimization migration scripts to large tables.
· The SHOW INNODB STATUS command contains much information about the enforcement of referential integrity.

See Also

Designing Databases with Database Designer

Additional Elements on a Diagram


Additional Elements on a Diagram

Notes

Notes are yellow boxes with text you can add to the diagram to explain some diagram parts. Notes can be moved, brought to front or sent to back, or resized like any other shapes on the diagram.

To add a note to a diagram, click the New Note button on the Database Diagram toolbar and click the diagram. After that you may type the note text.

To change a note text, click it and hit F2 key or right-click it and choose Edit text from the shortcut menu.

To remove a note from the diagram, click it and hit the DELETE key or right-click it and choose Remove from Diagram from the shortcut menu.

The note allows you to add a hyperlink to a file.

To add a hyperlink, right-click a note and select Hyperlink from the menu. The Hyperlink Properties dialog box opens where you can specify a file path or URL and a file description. The latter will be displayed under the note text and you can click on it to open the file in dbForge Studio. To open the file with a default program, use CTRL+click.

To edit a hyperlink, right-click it and select Hyperlink from the menu. The Hyperlink Properties dialog box opens where you can change the hyperlink properties.

To delete a hyperlink, clear the File path or URL field in the Hyperlink Properties dialog box.

To change a note color, right-click the note and select a required color from the Color menu.

Stamp

Diagram stamp enables you to specify the following information about diagram: diagram author, company, version, copyrights, project name, date. You can add an unlimited number of stamps to your diagram.

To add a stamp to diagram, click the New Stamp button on the Database Diagram toolbar and click the diagram.

To edit stamp fields, double-click them and enter values.

To remove a stamp from the diagram, click it and hit the DELETE key or right-click it and select Remove from Diagram from the shortcut menu.

Images

dbForge Studio allows adding images to diagram. Images can be moved, brought to front, sent to back, or resized like any other shapes on the diagram. You may use the following image formats:

· BMP
· JPEG
· TIFF
· PNG
· ICO
· EMF
· WMF

To add an image to the diagram, click the New Image button on the Database Diagram toolbar and click the diagram, then select an image file to add image from and click Open.

To remove an image from the diagram, click it and hit the DELETE key or right-click it and select Remove from Diagram from the shortcut menu.

See Also

Designing Databases with Database Designer

Working with Database Objects on a Diagram


Working with Database Objects on a Diagram

This section contains information about working with the database objects on the diagram.

In This Section

Editing Tables
Describes some aspects of editing tables on the diagram.

Displaying Database Objects on a Diagram
Describes how to work with other database objects on the diagram.

Working with Relations
Describes how to manage the relations on the diagram.

Relation Notations
Describes how relations are displayed in different notations.

Diagram Shapes and Layout
The topic describes how to manage a diagram shape and layout.

See Also

Designing Databases with Database Designer


Editing Tables

By default, tables on the diagram are presented as shapes. Their captions display the table icon, name and button for minimizing table. Then there is a list of columns and a collapsed lists of constraints, indexes, and triggers, if the table has ones.

Edit tables on a diagram either way:

· Open the Table Editor Dialog Box by double-clicking the table or choosing Edit Table from its shortcut menu. The Table Editor Dialog Box is the same as the Table Editor document with its views, except for the bottom buttons. Reset button discards all changes, OK button closes the dialog and saves all changes, Cancel button closes the dialog and discards all changes. You can edit table in this dialog just like in the table editor document.
· Edit, delete, and create table columns, indexes, and constraints in the diagram shape. You can open them for editing by double-clicking them, or delete them by right-clicking and choosing Drop from Database from the shortcut menu. To create a new column, right-click an existing one and choose New Column from the shortcut menu. To create a new index or constraint, right-click the Indexes or Constraints line and choose the corresponding item from the shortcut menu. If the corresponding compartment is not available, right-click the table caption and choose the corresponding item from the New sub-menu of the shortcut menu. Note that you can create, edit, and delete triggers the same way.

Note

Constraints, Indexes, and Triggers compartments are not displayed in two cases:

1. They are not displayed when there are no constraints, indexes, or triggers in the table.
2. They may be disabled in the diagram options.

See Also

Working with Database Objects on a Diagram

Displaying Database Objects on a Diagram


Displaying Database Objects on a Diagram

Diagram Objects Colors

Views and stored routines are presented as differently colored shapes on the diagram. You can manage these like table shapes, except for some differences. Unlike table shapes, these shapes have only two size handles, which allows you to resize the shape width. View shapes contain view columns, and stored routine shapes contain their parameters. They don't have any additional compartments.

Triggers are displayed on the diagram just like constraints and indexes - in their own compartments on the table shapes. You can work with them in the same way as with constraints and indexes.

Organizing Diagram Shapes with Containers

If you want to build a complex diagram with many shapes or make a diagram with tables from different schemas, you may use containers to group the shapes. Or you may use containers for storing only specific kinds of database objects.

Containers are resizable colored boxes with a caption, which you can use to place other diagram shapes into. Any diagram object can be placed into container, even another container. Relation between table shapes are kept when the shapes are in different containers. Container color can be customized and you can specify container caption, so you can group diagram shapes into several containers, each with its own name and color. So, when building diagram with objects of several schemas, you may create a container for each schema and name them after schemas, then place objects from each schema into the corresponding container.

Containers have their own grid inside of them for positioning shapes. If there are not enough place in the container, scroll bars appear, allowing you to scroll the container and to view all shapes in the container. Containers can be collapsed like any other shape by clicking the [image] button.

Working with Containers

To create a container:

· Right-click a diagram and select New, and then click Container from the shortcut menu.

or
· Click the New Container button on the Database Diagram toolbar and click the diagram.

When the container is added to the diagram, you may drag shapes to it. Note that when you are dragging the shape, if the mouse pointer was over the container, the dragged shapes will be dropped to the container, even if the most part of the dragged selection was not over the container. The same is about dragging shapes out of the containers.

To change the container color, right-click the container and choose a required color from the Color menu.

To rename the container, click it and hit F2 key or right-click it and choose Rename from the shortcut menu.

To drop the container from the diagram, click it and hit the DELETE key or right-click it and choose Remove from Diagram from the shortcut menu. Note that all shapes inside the container will be dropped from the diagram too, but the corresponding database objects will not be dropped from database.

See Also

Working with Database Objects on a Diagram

Working with Relations


Working with Relations

dbForge Studio allows creating two types of relations: physically existing foreign key relations and virtual relations.

Physical relations

They represent physically existing foreign key relations between tables. On the diagram, these relations are displayed as connecting lines. Their appearance depends on the selected notation.

Options available for managing physical relations are as follows:

· Move - click the relation and drag its bend handle.
· Bend - click the relation and drag its bend handle.
· Reroute - right-click the relation and choose Reroute from the shortcut menu. The relation will be rerouted to its default route.
· Drag a relation's parent end to another table - you may attach the parent edge to any edge of the table shape.

How to Delete a Relation

Click a relation and press the DELETE key, then click Yes in the appeared dialog.

Note

When you delete a relation from the diagram, the corresponding foreign key is deleted from the database.

How to Edit a Relation

1. Double-click a relation to invoke the Foreign Key Properties dialog box.
2. Make changes and click OK.

To change the relation's parent table, drag the parent end of the relation to another table. You cannot change the relation's child table.

Note

The relation's cardinality is determined automatically from the child table constraints and cannot be changed by a user except for editing child table constraints.

How to Create a Relation

1. Click the New Relation icon on the Database Diagram toolbar.
2. Click the child table and move the mouse pointer to the parent table while holding the mouse button, then release the mouse button. A partially initialized New Foreign Key dialog box will appear with a referenced table, a database, a constraint, and columns already set.
3. Specify the Constraint Columns in the dialog box and click OK.

Note

Relations on the diagram correspond to existing foreign keys in a database. When you create a relation on the diagram, a foreign key constraint is created in the database. If the foreign key cannot be created in the database, the relation cannot be created on the diagram.

Virtual relations

They allow you to create relations between tables if their storage engine does not support foreign keys. Virtual relations do not exist physically, but only stored on the diagram, however they can be converted to physical foreign keys. On the diagram they are displayed as thin dotted lines connecting tables.

You can move, bend, reroute virtual relations, drag a relation's parent end to another table the same way as you do with physical relations.

How to Create a Virtual Relation

1. Click the New Virtual Relation icon on the Database Diagram toolbar.
2. Click the child table and move the mouse pointer to the parent table. Click a required column in the child table and, holding the mouse button pressed, select a required column in the parent table, then release the mouse button. The virtual relation will appear on the diagram.

You can also select entire tables to create a virtual relation between them. In this case the Virtual Relation Properties dialog box will appear where you should select constraints and referenced columns.

How to Edit a Virtual Relation

1. Double-click it to invoke the Virtual Relation Properties dialog box.
2. Make changes and click OK.

How to Delete a Virtual Relation

Do either of these actions:

· Click it on the diagram and press the DELETE key.
· Select it in the Virtual Relation Manager window and press the DELETE key.

How to Manage Virtual Relations

Use the Virtual Relation Manager window to view, edit, remove virtual relations, generate their DDL, convert to Foreign keys, etc.

To open it, click the Virtual Relation Manager icon on the toolbar or, on the View menu, point to Other Windows, and click Virtual Relation Manager. Right-click a required relation in the grid and select a required command from the menu.

Relation Comments

Each relation has a comment - a yellow rectangle with a relation foreign key name. Select the Show Relation Comment check box in the diagram options or click Show Comments on the Diagram toolbar to display comments. By default, they are displayed near the child end of relations. You can drag them to any other place, and they will move with the relation. To hide a comment for a specific relation, click it and hit the DELETE key. To display it again, right-click the relation and select Show Comment from the shortcut menu.

See Also

Working with Database Objects on a Diagram

Relation Notations


Relation Notations

Foreign key relations are displayed as lines connecting tables. Appearance of the relation depends on the selected notation. dbForge Studio supports IE and IDEF1X notations for the diagrams.

IDEF1X Notation

IDEF1X (Integration Definition for Information Modeling) is a modeling language for developing a logical model of data. For detailed description of IDEF1X notation refer to FIPS Publication 184 Announcing the IDEF1X Standard December 1993 by the Computer Systems Laboratory of the National Institute of Standards and Technology (NIST).

Identifying relations are displayed as continuous lines with black circle on the child end. (Identifying relation means when all foreign key columns are included to the primary key of the child table). See example below.

Non-identifying relations are displayed as dotted lines with black circle on the child end. If this relation is an Optional Non-Identifying Relationship (child foreign key columns are nullable), white diamond is displayed on the parent end of the relation. See examples below.

Z letter at the child end of the relationship appears if there can be only zero or one child record. It depends on whether the foreign key columns in the child table are unique (belong to the primary key or unique index). Thus, identifying relations are always displayed with letter Z. Non-identifying relations can be displayed both with or without Z letter.

IE Notation

IE Notation is used by default. Relations are displayed as continuous lines. Ends of the lines depend on relation cardinality. Relation cardinality is determined automatically from the foreign key constraint, it cannot be specified by user (except for editing child table constraints).

In MySQL one record of the child table corresponds to 0..1 (zero or one) or 1 (exactly one) record from the parent table. It depends on the presence of the NOT NULL constraints on the foreign key columns in the child table.

One record of the parent table corresponds to 0..1 (zero or one) or 0..N (zero, one, or more) records from the child table. It depends on whether the foreign key columns in the child table are unique (belong to the primary key or unique index).

Parent record | Child record | Example
1 (exactly one) | 0..N (zero, one, or more) |
1 (exactly one) | 0..1 (zero or one) |
0..1 (zero or one) | 0..N (zero, one, or more) |
0..1 (zero or one) | 0..1 (zero or one) |

See Also

Working with Database Objects on a Diagram

Diagram Shapes and Layout


Diagram Shapes and Layout

Diagram Layout

Diagram layout can be controlled in a number of ways. Diagram shapes can be moved (by dragging them with mouse or by keyboard), resized, and aligned to the diagram grid.

dbForge Studio allows you to layout diagram automatically or manually. To resize diagram automatically just click the Layout Diagram button on the Diagram toolbar.

To change the shape order, right-click required shapes, point to Shape, and then click Bring to Front or Send to Back. Alternatively, use the corresponding buttons on the Layout toolbar.

Aligning Shapes

Each shape may be aligned to grid. To align shape to grid, select it and click the Align to Grid button on the Layout toolbar.

Several shapes can be aligned in a column or in a row.

· To align shapes in a row, click the Align Tops, Align Middles, or Align Bottoms button on the Layout toolbar to align the shapes by their top, center, or bottom of the primary selection respectively. Their horizontal position remains unchanged.
· To align shapes in a column, click the Align Rights, Align Lefts, or Align Centers button to align the shapes by their right side, left side, or center of the primary selection respectively. Their vertical position remains unchanged.

You can also use corresponding commands of the Align sub-menu of the Layout menu.

Changing Shape Size

To change shape size, select it and drag the size handles at the shape sides and corners. To fit shape size to grid, select it and click Size to Grid on the Layout toolbar or select Size to Grid from the Make Same Size sub-menu of the Layout menu. Shapes have minimal and maximal height and width. Minimal width and height and maximal height are constant. Maximal height depends on the table shape column count.

You can also fit the same size for multiple shapes. To do this, select the shapes and click Make Same Width or Make Same Height on the Layout toolbar. You may also use corresponding items of the Make Same Size sub-menu of the Layout menu. When using this feature, the size of the selected shapes will be aligned with the size of primary selection.

To improve the shape size in terms of the content representation, right-click the shape, point to Shape and click Best Fit.

Note

A primary selection is one of the selected shapes. Its size handles are blue, while size handles of other selected shapes are black. If a selected shape cannot have the same size as the primary selection, its size will be changed to become as close to the primary selection size as possible.

Controlling Spacing between Shapes

Diagram provides you flexible control over spacing between shapes on the diagram. You can proportionally increase and decrease horizontal and vertical spacing between the shapes, make it equal or remove it.

· To increase spacing between shapes, select shapes, which will be moved, and click Increase Horizontal Spacing or Increase Vertical Spacing on the Layout toolbar or select Increase from the Horizontal Spacing or Vertical Spacing sub-menus of the Layout menu.
· To decrease spacing between shapes, select shapes, which will be moved, and click Decrease Horizontal Spacing or Decrease Vertical Spacing on the Layout toolbar or select Decrease from the Horizontal Spacing or Vertical Spacing sub-menus of the Layout menu.
· To make spacing between shapes equal, select shapes, which will be moved, and click Make Horizontal Spacing Equal or Make Vertical Spacing Equal on the Layout toolbar or select Make Equal from the Horizontal Spacing or Vertical Spacing sub-menus of the Layout menu.
· To remove spacing between shapes, select shapes that will be moved, and click Remove Horizontal Spacing or Remove Vertical Spacing on the Layout toolbar or select Make Equal from the Horizontal Spacing or Vertical Spacing sub-menus of the Layout menu.

Note

Spacing is considered as distance between shape borders. When you remove, for example, vertical spacing, shapes will be arranged as follows: the top of the second shape will be located at the same height as the bottom of the highest shape, the top of the third one will be located at the same height as the bottom of the second shape and so on.

See Also

Working with Database Objects on a Diagram


Backup and Restore of MySQL Databases

This section describes databases backup and restore features provided in dbForge Studio for MySQL.

In This Section

Database Backup and Restore
Explains how to backup and restore databases to a SQL Script.

How To: Schedule Database Backup
Describes how to schedule a database backup.

Working with Command Line
Use the command line to back up or restore a database.


Database Backup and Restore

There are many reasons that can cause data loss. These are, for example, an operating system crash, power failure, hardware problem and many others. So it is necessary to back up databases periodically. With dbForge Studio for MySQL you can perform database backup easily using Database Backup Wizard. dbForge Studio backs a database up into a simple SQL script. You can read and correct this script.

With dbForge Studio you can perform full database backup or restoring only selected database objects. To call Database Backup Wizard select Backup Database... from the Database menu or from the shortcut menu of the database node of the Database Explorer window.

Backing Up an Entire Database

1. Select a database to back up, backup script file name and location, click the Next button.
2. Select Structure and Data, check Include all objects, click the Next button.
3. Set the backup options, click the Backup button.
4. Choose whether to open the backup script file in SQL Editor and wether to save the backup project for future use, and click the Finish button.

Backing Up Certain Database Objects

1. Choose a database to backup, script file name and location, click the Next button.
2. Select required information to backup.
3. Select database objects to backup their structure if you have chosen Structure or Data to backup on the Backup Content page, click the Next button.
4. Select tables to backup their data if you have chosen Data or Structure to backup on the Backup Content page, click the Next button.
5. Set backup options, click the Backup button.
6. Choose whether to open the backup script file in SQL Editor and wether to save the backup project for future use, and click the Finish button.

Restoring Database from Backup Script

To call Database Restore Wizard and restore the database from the backup script:

1. Select Restore Database... from the Database menu or from the shortcut menu of a database node of the Database Explorer window.
2. Select backup script file to restore and target database. If backup script file contains CREATE DATABASE statement, backup data will be restored to the created database instead of the selected database.
3. Check that the encoding for the restored file is selected correctly. The program automatically selects it basing on the restored file, if it fails, the default encoding (the current Windows encoding on the machine where dbForge Studio is running) is selected. You can always select a required encoding from the drop-down list.
4. Click the Restore button.

Note

If you backup and restore database in different MySQL versions, you may encounter errors.

See Also

Backup and Restore of MySQL Databases

How To: Schedule Database Backup


How To: Schedule Database Backup

You may need to schedule an automated database backup that will recur periodically. To do this, first of all, you will need to create a project file, containing backup settings. Once the project file is created, you have to schedule Windows task that will perform actions at a specific time or when a certain event occurs.

Creating a project file

1. In the Database menu, select Backup and Restore, and then click Backup Database.
2. Specify Connection, Database, Path, Output filename. Click Next.

3. Select backup content. Click Next.

4. Select detailed backup options. Click Next.
5. Set Errors handling and Log settings options. Click Save Project.

Scheduling Windows task

1. Start Task Scheduler for Windows.
2. Select Action -> Create Basic Task in the top menu.
3. Provide Name for the new task. Click Next.
4. Select one of the options when you want the task to be started. Click Next.
5. Select time and frequency for starting the task. Click Next.
6. Select Start a Program and click Next.
7. Enter path to the dbforgemysql.com file in Program/script. (The default path is C:\Program Files\Devart\dbForge Studio for MySQL\dbforgemysql.com.)

8. Also, make sure to specify arguments in the Add arguments field as follows:

/backup /connection:"User Id=root;Host=db;Port=3309;Database=sakila;Character Set=utf8;" /projectfile:"C:\Users\Documents\dbForge Studio for MySQL\Export\sakila.backup"
9. Click Next.
10. Check all specified settings once again and, if no changes are required, click Finish. Otherwise click Back and make the needed changes.

See Also

Backup and Restore of MySQL Databases


Working with Command Line

This section describes how to automate database backup and restore using the command line.

Note

The command line functionality is available only in certain editions of dbForge Studio. For the detailed information on features availability in the dbForge Studio editions, please refer to the Editions topic.

In This Section

/backup Arguments
This topic contains all command line arguments for /backup switch.

/restore Arguments
This topic contains all command line arguments for /restore switch.

See Also

Backup and Restore of MySQL Databases

Working with Command Line

© 2004-2018 Devart


/backup Arguments

This topic gives detailed description of command line switches, required to perform database backup with the help of command line.

Command Line Usage

dbforgemysql.com /backup [/switch1 [:value : [parameter1:value paprameter2: value..]]
/switch2..]

Arguments

To get more information on switches related to schema comparison in the command line interface, you can type:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com.com /backup /?

The following command line switches are available for backup operation:

Argument | Action and Usage
/connection | This switch is used to specify a connection string. Command usage looks like: /connection<connection_string>
/database | This switch is used to specify a database to backup. It overrides the database specified in backup project or in the connection string.
/outputfile | This switch is used to specify file name for storing the backup. It overrides the database specified in backup project.
/password | This switch is used to specify a server password. It overrides the password specified in the connection string. Command line usage looks like: /password:<pw>
/projectfile | This switch is used to specify a backup project to use. The project file is created in Database Backup Wizard and contains backup settings, some of which can be overridden by the switches above.

See Also

Working with Command Line

/restore Arguments


/restore Arguments

This topic gives detailed description of command line switches, required to perform database restore with the help of command line.

Command Line Usage

dbforgemysql /resore [/switch1 [:value : [parameter1:value paprameter2: value..]]
/switch2..]

Arguments

To get more information on switches related to schema comparison in the command line interface, you can type:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com.com /restore /?

The following command line switches are available for backup operation:

Argument | Action and Usage
/connection | This switch is used to specify a connection string. Command usage looks like: /connection<connection_string>
/createdatabase | This switch is used to specify that if the database specified in /database switch does not exist, it will be created.
/database | This switch is used to specify a database to backup. It overrides the database specified in backup project or in the connection string. Databases specified in a script will be ignored. Does not affect objects with fully qualified names.
/encoding | This switch is used to specify encoding which should be applied to open and execute the script. Command usage looks like: /encoding:<codepage | encoding name>
/inputfile | This switch is used to specify SQL ir ZIP file with a database script to restore.
/password | This switch is used to specify a server password. It overrides the password specified in the connection string. Command line usage looks like: /password:<pw>

See Also

Working with Command Line


Managing Users and Privileges

This section gives basic info about managing user accounts and privileges.

In This Section

Manipulating User Accounts
This topic tells how to create, edit or delete user account.

Manipulating Roles
This topic tells how to create, edit or delete roles.

Note

The Role Editor is available for the MariaDB connections only.

Granting and Revoking Roles
The topic describes how to assign roles to user accounts.

Granting and Revoking Global Privileges
The topic describes how to grant and revoke system privileges.

Granting Privileges on Database Objects
The topic describes granting privileges on database objects.

Working with Multiple Users
This topic tells how to work with several users in Security Manager.

Watermarks in Security Manager
The topic describes cases when Security Manager editor cannot be displayed.


Manipulating User Accounts

This topic describes how to manipulate user accounts with dbForge Studio Security Manager.

Security Manager provides an easy way to add, alter, or remove users visually without typing SQL code. To open the Security Manager, select [image] Security Manager from the Database menu.

Creating a User Account

1. Open the Security Manager.
2. Click [image] above the User List

-or-

right-click a user node and select [image] New User from the shortcut menu.
3. Fill in the Name, Host, Password, and Confirm Password fields.
4. If you want to create a proxy user account, fill in the Authentication and Authentication String fields as well. Also set up Proxied User for a proxy user account.
5. Grant necessary privileges to user (For information about granting privileges to user, see Granting and Revoking System Privileges, Granting Privileges on Database Objects, and Granting and Revokig Roles topics).
6. Optionally, set the server resources limit for the user.
7. Click the [image] Save button on the Security Manager toolbar.

Duplicating Users

dbForge Studio allows you to create a new user, based on the existing one. To do it, right-click the user in the Security Manager and select Duplicate Object in the shortcut menu. The right part of the editor will contain a new user, that is an exact copy of the existing one except its name. Make changes to the user if you need and save it. Note that no user will be created until you [image] Save the changes.

Editing a User Account

Open the Security Manager and select the required user account in the tree. After editing, click the [image] Save button on the Security Manager toolbar to apply changes. If you want to discard changes, click the [image] Undo button on the Security Manager toolbar. You can view SQL statements that should be executed to apply changes. To view them, click the [image] View Changes button on the Security Manager toolbar.

Deleting a User Account

Open the Security Manager, right-click the account you want to delete, and select Delete from the shortcut menu, or select the required user in the list and click the Delete button above the User List, or press DELETE.

See Also

Managing Users and Privileges

Manipulating Roles


Manipulating Roles

This topic tells you how to manipulate roles with dbForge Studio Security Manager.

Note

The Role Editor is available for the MariaDB connections only.

The Security Manager provides an easy way to add, alter or remove roles visually without code typing. To open the Security Manager, click [image] Security Manager on the Database menu,.

Creating a new role

1. Open Security Manager.
2. Click the Create Role button above the User List Alternatively, right-click a role, and then select New Role from the shortcut menu.
3. Fill the Name field.
4. Grant necessary roles and permissions to a role.
5. Click the Save button on the Security Manager toolbar.

Editing a role

To edit a role account, open Security Manager, expand the Roles node, and then select a required role in the tree. After editing, click the Save button on the Security Manager toolbar to apply changes. If you want to discard changes, click the Undo button on the Security Manager toolbar.

Deleting a role

Open Security Manager, expand the Roles node, and select Delete from the shortcut menu of a required role; or select a required role in the tree and press DELETE.

See Also

Managing Users and Privileges

Granting and Revokig Roles


Granting and Revokig Roles

Security Manager allows granting and revoking roles. To do this, you should:

1. Open Security Manager.
2. Expand the Users node for granting privileges to a user or the Roles node for granting privileges to a role.

Note

The Role Editor is available for the MariaDB connections only.
3. Select the required user or role.
4. Switch to the Roles tab.
5. Check the needed role or roles. Note that some roles can include other roles. You can determine this by the status of the check boxes near roles:

- checked. Privileges included in this role are added to the user privileges. Note that some roles can be checked, if the user already has the corresponding privileges.

- checked, but inactive. Some other role that is selected includes privileges of this role.

- unchecked. Privileges of this role are not granted to the user.

6. View the privileges granted by each selected role or roles on the [image] Global Privileges tab.

See Also

Managing Users and Privileges

Granting and Revoking Global Privileges


Granting and Revoking Global Privileges

Security Manager allows granting and revoking global and object privileges easily.

1. Open the Security Manager.
2. Select a user from the user account list in the left part of the Security Manager.
3. Switch to the Global Privileges tab.
4. Select checkboxes opposite the required privileges to grant them; clear checkboxes to revoke previously granted privileges.

5. Optionally, select the With Grant Option checkbox to grant a user privilege to grant options.
6. Click the [image] Save button on the Security Manager toolbar to apply changes.

See Also

Managing Users and Privileges

Granting Privileges on Database Objects


Granting Privileges on Database Objects

Privileges on database objects can be granted on the Object Privileges tab of the Security Manager. To open the Security Manager, select [image] Security Manager from the Database menu.

To give user some privileges on a database object, perform the following actions.

1. Open the Security Manager.
2. Select user account in the user account list in the left part of Security Manager and switch to the Object Privileges tab.

3. Select database object to grant privileges on in the Objects tree. After selecting an object you will see a list of available privileges.
4. Assign the privileges to user (account) by checking them in the available privileges list.
5. Click the [image] Save button on the Security Manager toolbar.

The grid below the Object Privileges tab of Security Manager contains the current privileges of the user (account). You can revoke a selected privilege by double-clicking it, clicking [image] Revoke Selected Privilege from their shortcut menu, by pressing CTRL+DELETE keys, or by clicking the [image] button next to the list.

To revoke all assigned privileges, select [image] Revoke All Privileges from their shortcut menu or click the [image] button near the list.

Available privileges for different database objects are listed at the table below:

Database objects | Privileges
Databases | Select, Insert, Update, Delete, Alter, Alter Routine, Create, Create Routine, Create Temporary Tables, Create View, Drop, Event, Execute, Grant Option, Index, Lock Tables, References, Show View, Trigger
Tables | Select, Insert, Update, Delete, Create, Drop, Grant Option, References, Index, Alter, Create View, Show View, Trigger
Columns | Select, Insert, Update, References
Stored procedures and functions | Alter Routine, Execute, Grant Option

See Also

Managing Users and Privileges

Working with Multiple Users


Working with Multiple Users

dbForge Studio allows to work with multiple users in Security Manager. This feature is useful if you need to add the same privileges or roles for several users.

To select multiple users, press CTRL and click the needed users, or if users are located one by one, select the first user, press SHIFT, and click the last user you need.

For several users, you can edit roles, global and object privileges on the corresponding Security Manager tabs. Note that the General and SSL tabs are unavailable in this case.

If you select a host, the "Cannot show editor because no users are selected or objects of different types are selected" message is displayed.

The following identifications define the state of privileges:

· for global privileges:

- the privilege is assigned to all selected users;

- the privilege is assigned not to all selected users;

- the privilege is not assigned to any of the selected users;

· for object privileges:

- the privilege is assigned to all selected users;

- the privilege is assigned not to all selected users.

See Also

Managing Users and Privileges

Watermarks in Security Manager


Watermarks in Security Manager

There are several situations in Security Manager when editor for managing users accounts is not available. In these cases, a message explaining why the editor cannot be displayed is shown in its place. Possible messages are as follows:

· To view the list of users select a connection from the drop-down list on the window toolbar or click Refresh

No connection is selected, and there are no objects in the user list (i.e. there is no user to select).

· You do not have enough privileges to view users. Select another connection or change connection settings and click Refresh

User has no rights to read security metadata.

· Cannot show editor because no users are selected or objects of different types are selected

Different types of objects are selected in the tree or if host is selected.

See Also

Managing Users and Privileges


Debugging stored routine

In This Section

Debugger Overview
Provides an overview of the dbForge Studio debugger.

How To: Debug a Stored Procedure
This example demonstrates how to debug a MySQL stored procedure.

How To: Debug a Stored Function
This example demonstrates how to debug a MySQL stored function.

How To: Debug a Trigger
This example demonstrates how to debug a MySQL trigger.

How To: Debug an SQL Script
Describes how to debug a MySQL stored procedure.

How To: Work with Breakpoints
Describes what breakpoints is and how to use them.

Execution Control
Describes different navigation techniques while debugging stored database objects.

Debug Engine
Describes the debug mechanism that is used in dbForge Studio.

Debug Shortcut Keys
Lists shortcut key combinations that may be used while debugging stored database objects.

Sample Script for Creating Database Tables
Use this script to create sample database tables for completing tutorials.


Debugger Overview

The dbForge Studio debugger is a powerful tool that allows you to observe the run-time behavior of your database object and locate logic errors. With the debugger, you can break, or suspend, execution of your program to examine your database object, evaluate and edit variables in your script.

The dbForge Studio debugger provides the Debug menu with access to debugger tools. Debugger windows and dialog boxes display information about your database object and enable you to enter additional information. You can call Help on any window or a dialog box by pressing F1.

The dbForge Studio debugger provides powerful commands for controlling the execution of your code. Here is the list of the tasks you can perform to control execution using debugger commands:

· Starting (or continuing) execution of procedures, functions, triggers, and SQL scripts
· Breaking execution of procedures, functions, triggers, and SQL scripts
· Stopping execution of procedures, functions, triggers, and SQL scripts
· Stepping through the procedures, functions, triggers, and SQL scripts
· Running to a specified location
· Setting the execution point

Debug Layout

dbForge Studio has two window layouts - default layout and debug layout. Debug layout is applied when you start debugging, the rest of the time you work in the default layout. Both layouts preserve their state when starting/stopping debugging or exiting from dbForge Studio. Watches and Call Stack windows are available only in debug layout.

See Also

Debugging stored routine

How To: Debug a Stored Procedure


How To: Debug a Stored Procedure

This example demonstrates how to debug MySQL stored procedure by stepping into the stored procedure. It also illustrates different debugging techniques such as setting breakpoints, viewing data items, and so on.

Creating a Sample Procedure

In this topic, some sample database objects are used for demonstrating how to work with the dbForge Studio Debugger. Use scripts specified in this topic to create necessary objects in your test database.

Database Tables

Use the script available in Sample Script to Create Database Tables to create necessary tables.

Database Procedure

Use the script below to create the procedure that takes two input parameters: DateFrom and DateTo. Based on these input parameters the schedule_list table fills up with data.

CREATE PROCEDURE FillSchedule (IN DateFrom date
, IN DateTo date
, IN ScheduleId int)
SQL SECURITY INVOKER
READS SQL DATA
BEGIN

DECLARE DateOut date;
DECLARE TemplateCount tinyint;
DECLARE RowNumber tinyint;
DECLARE TimeSheetDate date;

SET
TemplateCount = (SELECT
COUNT(*)
FROM `schedule` s
JOIN scheduletemplatedetail sdt
ON s.TemplateId = sdt.TemplateId
WHERE s.ScheduleId = ScheduleId), DateOut = DateFrom
, RowNumber = 0;
SET TimeSheetDate = GetFirstDayOfMonth(DateFrom);

DROP TABLE IF EXISTS enumdays;
CREATE TEMPORARY TABLE enumdays (
DayOrder tinyint,
DateOut date,
TimeSheetDate date
);

WHILE (DateOut <= DateTo) DO

IF RowNumber = TemplateCount
THEN
SET RowNumber = 1;
ELSE
SET RowNumber := RowNumber + 1;
END IF;

INSERT INTO enumdays (DateOut
, DayOrder
, TimeSheetDate)
SELECT
DateOut,
RowNumber,
TimeSheetDate;

SET DateOut := DATE_ADD(DateOut, INTERVAL 1 DAY);
SET TimeSheetDate = GetFirstDayOfMonth(DateOut);

END WHILE;

DELETE
FROM s
USING scheduledetail s
WHERE s.ScheduleId = ScheduleId
AND s.DateOut BETWEEN DateFrom AND DateTo;

INSERT INTO scheduledetail (DateOut
, TimeSheetDate
, ScheduleId
, AbsenceCode)
SELECT
d.DateOut,
d.TimeSheetDate,
ScheduleId,
s.AbsenceCode
FROM enumdays d
CROSS JOIN (SELECT
s.TemplateId
FROM `schedule` s
WHERE s.ScheduleId = ScheduleId) s2
JOIN scheduletemplatedetail s
ON d.DayOrder = s.DayOrder
AND s.TemplateId = s2.TemplateId;

END
$$

Debugging the Stored Procedure

Assume that you need to get Time Sheet for a specific time period. To do this, execute the FillSchedule procedure:

1. In the Database Explorer, choose your test database.
2. Click Procedures and then right-click the FillSchedule procedure, and click Execute from the shortcut menu.

3. Enter input parameters.

4. Click OK.

Suddenly we get the error message telling us that the TimeSheetDate column cannot be null.

Note

Actual document look may slightly vary from the above image, depending on the product you use.

A quick look through the code gives you nothing and you have no other choice but to start the debugger.

Debugging Procedure

To start debugging the stored procedure:

1. To compile the stored procedure for debugging, navigate to the required procedure in the Database Explorer, select Compile, and then click Compile Dependants for Debugging from the shortcut menu.
2. Click the [image] Start Debugging button on the Debug toolbar, or press CTRL+F5.
3. If you have not compiled the procedure, the dbForge Studio prompts you to compile it. Click Yes.

For more information about compiling, read the Compiling Stored Procedures, Functions, and Triggers for Debugging section from the Debug Engine topic.

4. Enter the stored procedure input parameters once again and click OK.

You can see that the yellow arrow identifies the stack frame where the execution pointer is currently located.

5. Add the TimeSheetDate variable to Watches. Right-click the TimeSheetDate variable in the source code and then select the [image] Add Watch option from the shortcut menu. Thus you will be able to track the TimeSheetDate value while debugging. Now you can see that the TimeSheetDate variable appears in the Watches window.
6. Insert a breakpoint in the place where you insert the TimeSheetDate variable in the enumdays temporary table.

7. Click the [image] Step Into button on the Debug toolbar, or press F11 for stepping through the code.
8. After several clicks you are hitting this breakpoint which means that the current code isn't ignored.

However, as you can see in the Watches window, the value of the TimeSheetDate variable is NULL. We know that the TimeSheetDate field cannot accept NULL values. So it can be concluded that the TimeSheetDate variable should be initialized.

9. Initialize the TimeSheetDate variable before inserting it into the table.

10. Now restart the debugging process. To do this, click the [image] Restart button on the Debug toolbar.
11. Repeat the steps 2-8.
12. Now, once you hit the breakpoint, you can see that the value of the TimeSheetDate variable is the date, which is absolutely correct.

13. To stop the debugging process, click the [image] Stop button.
14. Click [image] Execute to run the stored procedure.
15. You can see the message telling us that the stored procedure executed successfully. To verify this, you can retrieve the data from the table.
16. In the Database Explorer choose the required database.
17. Click Tables and then right-click the required table.
18. Click Retrieve Data from the shortcut menu.

19. dbForge Studio displays the result table.

As you see, the Debugger for MySQL is a very simple and powerful tool to use. You can use different debugging techniques to achieve successful results.

See Also

Debugging stored routine

Walkthrough: Debug a Stored Function


How To: Debug a Stored Function

This example shows how to debug a stored function in dbForge Studio for MySQL. Use provided scripts to create sample objects in your test database.

Creating a Sample Function

Database Tables

Use the script available in Sample Script to Create Database Tables to create necessary tables.

Procedure

Use the script available in How To: Debug a Stored Procedure to the procedure used in the sample below.

Function

Use the script below to create the GetFirstDayOfMonth function that returns the first day of a calendar month.

CREATE FUNCTION GetFirstDayOfMonth (`date` datetime)
RETURNS datetime
BEGIN

RETURN DATE_ADD(DATE_ADD(LAST_DAY(`date`), INTERVAL - 1 MONTH), INTERVAL 1 DAY);

END
$$

Debugging Function

To debug the MySQL function:

1. In the Database Explorer, choose a test database.
2. Click Procedures and then double-click the FillSchedule procedure to open it.
3. Left-click in the gray margin next to the SET TimeSheetDate statement to insert a breakpoint in the place where we call the GetFirstDayOfMonth stored function.

4. Click [image] Start Debugging, and enter the input parameters values for the procedure.
5. Add the CurrDate variable to the Watches window. This option allows you to track the value of the variable while stepping through the code. To add the variable to the Watches window, right-click the CurrDate variable, and then select [image] Add Watch from the shortcut menu. The variable will appear in the Watches window.

6. Step through the code using the F11 key or the [image] Step Into button, or press CTRL+F5 to move directly to the breakpoint.

Note, when you are at the SET TimeSheetDate statement, the CurrDate variable changes its value form NULL to DATE.

7. Press F11 or click [image] Step Into to get inside the GetFirstDayOfMonth stored function.

Note

You may ignore stepping through the function by clicking the [image] Step Over button. In this case you will continue stepping through the stored procedure.
8. Step through the GetFirstDayOfMonth function until you exit back to the stored procedure, and continue to the end.

Note

You may get back to the stored procedure code by clicking the [image] Step Out button. In this case you will continue stepping through the stored procedure.

Now the value of the CurrDate variable does not appear. The reason is that the variable is declared in the the FillSchedule procedure, and at the moment you are in a different context. You may add any variable to the Watches window from the current context to track its value.

You may click the FillSchedule procedure in the Call Stack window to get back to the parent code. Notice, that the date variable now is unidentified unlike the CurrDate one.

See Also

Debugging stored routine

Walkthrough: Debug a Trigger


How To: Debug a Trigger

This example shows how to debug a trigger in dbForge Studio for MySQL. Use provided scripts to create sample objects in your test database.

Creating a Sample Trigger

Database Tables

Use the script available in Sample Script to Create Database Tables to create necessary tables.

Procedure

Use the script available in How To: Debug a Stored Procedure to the procedure used in the sample below.

Trigger

Use the script below to create the ScheduleDetail trigger that generates an error message in case inserted data contains NULL.

CREATE TRIGGER scheduledetail
BEFORE INSERT
ON scheduledetail
FOR EACH ROW
BEGIN

SET @TimeSheetDate = new.TimeSheetDate;
SET new.AbsenceCode = 'sicklist';
IF @TimeSheetDate IS NULL
THEN
RESIGNAL SET MYSQL_ERRNO = 5;
END IF;

END

Debugging a Trigger

To debug the MySQL trigger:

1. In the Database Explorer, choose your test database.
2. Expand the Triggers folder, and then double click the ScheduleDetail trigger to open it.
3. Change the current view from Main to SQL.

Note

While opening a trigger the Main view is set as default. You are not able to insert a breakpoint in this view.
4. Set a breakpoint for the trigger. Left-click in the gray margin next to the SET statement to set a breakpoint in the trigger. This step is obligatory: if you do not set a breakpoint in the trigger, you will skip over its code when you try to step into it.
5. Expand the Procedures folder, and then double click the FillSchedule procedure to open it.
6. Set a breakpoint for the stored procedure that will fire the trigger. Left-click in the gray margin next to the INSERT INTO schedule_list statement.

7. Click [image] Start Debugging, and enter input parameters for the procedure.
8. Step through the code using the F11 key or the [image] Step Into button, or press CTRL+F5 to move directly to the breakpoint. At the INSERT INTO schedule_list statement, when you press F11 again, you will step into the trigger.

9. Step through the trigger until you exit back to the stored procedure, and continue to the end.

Call Stack Window

There are two database objects in the Call Stack window: the ScheduleDetail trigger and the FillSchedule procedure. You may notice the yellow arrow next to the ScheduleDetail trigger which identifies the stack frame where the execution pointer is currently located.

You can get back to the procedure source code by double-clicking the procedure in the Call Stack window.

A [image] green arrow indicates that you have stepped back to the parent code that has called the trigger.

See Also

Debugging stored routine

Debug an SQL Script


How To: Debug an SQL Script

This topic explains how to debug SQL scripts using debugger integrated into dbForge Studio for MySQL.

To debug an SQL script:

1. Open the required script in the SQL editor.
2. On the Debug menu, click [image] Start.
3. Set a breakpoint for your statement by clicking in the gray margin next to the SET statement.

If a statement is invalid, an error message appears in the error list, though debugging process continues. The debugging of an SQL script can be suspended by clicking the [image] Pause command. You can also use different step commands of the Debug menu to trace an SQL script.

To debug an SQL script, you don't need any special privileges, except for the privileges, required for execution of the script statements.

If an SQL script contains call of another script with SOURCE command, you can use the [image] Step Into command to step into the called script. If this script contains breakpoints, execution stops on these breakpoints. The Call Stack window shows stack of the script calls.

You can use the Watches window to view server and session variables during SQL script debugging.

See Also

Debugging stored routine

Execution Control


How To: Work with Breakpoints

A breakpoint tells the debugger that an application should break, or pause execution at a certain point. When a break occurs, you can use available tools to evaluate your variables. A breakpoint will stop your code on the line of the source code which will be executed next. When the debugger breaks program execution, the program is broken and it remains in the break mode until you click Step Into, Step Over, Step Out or Run to continue the execution.

Using Breakpoints

The Breakpoints window lists all breakpoints currently set in your program and displays their properties. Using the Breakpoints window, you can delete, enable or disable breakpoints, or go to the source code corresponding to a breakpoint. The debugger can't operate a breakpoint in the run mode. You can place a breakpoint in the run mode but it will be bound when the debugger enters the break mode.

Breakpoint Status

Breakpoint status is indicated by symbols that appear in the gray margin, at the left, in the source window. They are:

· Enabled: Execution will be suspended at this breakpoint.
· Disabled: The debugger ignores this breakpoint.
· Error: No breakpoint can be set at this location; the location is illegal and breakpoint cannot be bound. The debugger ignores this breakpoint.

Inserting Breakpoints

The dbForge Studio debugger provides many ways to set breakpoints:

Using the shortcut menu

1. In a source window, right-click a line of executable code where you want to set a breakpoint.
2. On the shortcut menu, click [image] Insert Breakpoint.

Using the Debug menu

1. In a source window, right-click a line of executable code where you want to set a breakpoint.
2. On the Debug menu, click Toggle Breakpoint.

Here are also two commonly used techniques to set a breakpoint in a source window:

1. Click in the gutter of the window at the line that you want to break at.
2. Select the line and press F9.

The breakpoint icon appears in the gutter.

Deleting Breakpoints

To delete a breakpoint, perform either of the following:

· Click the breakpoint in the Breakpoints window and then click the Delete button on the Breakpoints window toolbar.
· Right-click the breakpoint in the Breakpoints window and select Delete from the menu.
· Click the breakpoint on the indicator margin.
· Move the insertion point to the breakpoint and select Toggle Breakpoint from the Debug menu.
· Right-click the line of code with the breakpoint and choose Delete from the shortcut menu.

You can delete all breakpoints by choosing Delete All Breakpoints from the Debug menu or by clicking the corresponding button on the Breakpoints window toolbar.

Enabling or Disabling Breakpoint

You can enable or disable a breakpoint by selecting the check box at the appropriate line in the Breakpoints window. You can also click the Disable/Enable All Breakpoints button in the Breakpoints window to disable all breakpoints, if at least one breakpoint is enabled. Otherwise, it enables all breakpoints.

See Also

Debugging stored routine

Execution Control


Execution Control

This topic describes different navigation techniques while debugging stored database objects.

Stepping Through Code

One of the most common debugging procedures is stepping. Stepping is executing one line of a code at a time.

The Debug menu provides three commands for stepping through code:

· Step Into
· Step Over
· Step Out

Step Into

Step Into and Step Over differ in only one aspect, the way they handle function calls. Either command instructs the debugger to execute the next line of the code. If the line contains a function call, Step Into executes only the call itself, then halts at the first line of the code inside the function.

Step Over

Step Over executes the entire function, then halts at the first line outside the function. Use Step Into if you want to look inside the function call. Use Step Over if you want to avoid stepping into functions.

On a nested function call, Step Into steps into the most deeply nested function. If you use Step Into on a call like Func1(Func2()), the debugger steps into the function Func2.

Step Out

Use Step Out when you are inside a function call and want to return to the calling function. Step Out resumes execution of your code until the function returns, then breaks at the return point in the calling function.

Continue

The debugger breaks execution of the code when execution reaches a breakpoint. You can select [image] Continue, [image] Step Into, [image] Step Over, [image] Step Out on the Debug menu to continue the execution.

Stop Debugging

Stop debugging means terminating the debugging session. It should not be confused with breaking execution, which temporarily halts execution of the process you are debugging but leaves the debugging session active.

To stop debugging process, click [image] Stop Debugging on the Debug menu.

Note

If the module is compiled for debugging, the debug execution is paused at the last line of the code allowing you to investigate the state of the program variables in the Watches window. If the module was not complied for debugging, stored routine execution is not broken at the last line.

Restart

If you want to stop the run you are currently debugging and immediately begin a new run, you can use the [image] Restart command. Current debug session will be terminated and a new one will start.

Breaking Non-Responding Program

Stopping execution means terminating the program you are debugging and completing the debugging process. It differs from breaking execution, which temporarily halts debugging session but leaves it active.

Note

Stop Debugging does not always terminate the program. It stops the process, being in the break mode. Otherwise, it fulfills finalizing the program in the background mode, so that you can begin a new debugging session. Only two instances of the program can be started for debug and terminated in the background mode. The next debugging process will be available only after one of the programs, being terminated, stops running.

See Also

Debugging stored routine

How To: Work with Breakpoints


Debug Engine

This topic describes the debug mechanism that is used in dbForge Studio

Debug Engine Overview

To debug stored procedures, functions, and triggers, the debug engine should be deployed on the server. The debug engine is a server part of debugging technology. It is a set of stored procedures, functions, and tables, which are stored in cr_debug database.

If debug engine is not deployed to the server, you will be asked whether to deploy debug engine, when compiling stored routine with debug info. You can deploy or redeploy it at any time by selecting Deploy Debug Engine from the Debug menu.

To remove debug engine from the server, just remove the cr_debug database.

To deploy debug engine you need to have PROCESS global privilege and the following privileges on cr_debug database (or global ones):

· SELECT
· CREATE
· DROP
· CREATE ROUTINE

Compiling Stored Procedures, Functions, and Triggers for Debugging

To debug stored procedures, functions, and triggers you must compile it with debug information. To do it right-click the procedure, function or trigger in the Database Explorer and select Compile for Debugging. In case a procedure, function or trigger is not compiled for debugging, you will be prompted to compile it as soon as you run debugger.

To remove debug info from the stored procedure, function or trigger, right-click ones in the Database Explorer and select Compile from the shortcut menu.

Compiling with debug information adds additional statements, required for debug, to the procedure, function or trigger. dbForge Studio hides them when opening a procedure, function or trigger compiled with debug information. These statements don't affect stored routine logic. Compiling without debug information removes these statements from the stored routine.

See Also

Debugging stored routine


Debug Shortcut Keys

The following shortcut key combinations can be used while debugging stored routines and SQL scripts.

Icon | Command Name | Shortcut Keys | Action | Where is used
 | Breakpoints | CTRL+D, B | Reveal Breakpoints window | Global
 | Call Stack | CTRL+D, C | Reveal Call Stack window | Global (when debug session is started)
 | Watches | CTRL+D, W | Reveal Watches window | Global (when debug session is started)
 | Delete All Breakpoints | CTRL+SHIFT+F9 | Delete all breakpoints | Global (when debug session is started)
 | Toggle Breakpoint | F9 | Toggle breakpoint | SQL document or stored routine
 | Compile | CTRL+F7 | Compile stored routine or view | stored routine or view
 | Compile for Debugging | CTRL+ALT+F7 | Compile stored routine for Debugging | stored routine
 | Start/Continue | CTRL+F5 | Start/continue debugging | SQL document or stored routine
 | Stop | SHIFT+F5 | Stop debugging | Global (when debug session is started)
 | Restart | CTRL+SHIFT+F5 | Restart debugging | Global (when debug session is started)
 | Pause | CTRL+ALT+PAUSE | Pause | Global (when debug session is started)
 | Step Into | F11 | Step into | SQL document or stored procedure or function or Global when debug session is started
 | Step Over | F10 | Step over | SQL document or stored procedure or function or Global when debug session is started
 | Run To Cursor | CTRL+F10 | Run to cursor | SQL document or stored procedure or function
 | Step Out | SHIFT+F11 | Step out | Global (when debug session is started)

These shortcuts are default shortcuts. All shortcuts can be customized.

See Also

Debugging stored routine


Sample Script for Creating Database Tables

Use this script to create tables necessary for completing How To: Debug a Stored Procedure, How To: Debug a Stored Function, How To: Debug a Trigger topics.

CREATE TABLE scheduledetail (
ScheduleId int(11) NOT NULL,
DateOut date NOT NULL,
TimeSheetDate date NOT NULL,
AbsenceCode varchar(25) DEFAULT NULL,
PRIMARY KEY (ScheduleId, DateOut)
);

CREATE TABLE scheduletemplatedetail (
TemplateId int(11) NOT NULL,
DayOrder int(11) NOT NULL,
AbsenceCode varchar(25) DEFAULT NULL,
WorkShiftCd varchar(25) DEFAULT NULL,
PRIMARY KEY (TemplateId, DayOrder)
);

INSERT INTO scheduletemplatedetail (TemplateId, DayOrder, AbsenceCode, WorkShiftCd)
VALUES (1, 1, NULL, '1/10');
INSERT INTO scheduletemplatedetail (TemplateId, DayOrder, AbsenceCode, WorkShiftCd)
VALUES (1, 2, NULL, '1/11,5');
INSERT INTO scheduletemplatedetail (TemplateId, DayOrder, AbsenceCode, WorkShiftCd)
VALUES (1, 3, NULL, '1/10');
INSERT INTO scheduletemplatedetail (TemplateId, DayOrder, AbsenceCode, WorkShiftCd)
VALUES (1, 4, NULL, '1/11,5');
INSERT INTO scheduletemplatedetail (TemplateId, DayOrder, AbsenceCode, WorkShiftCd)
VALUES (1, 5, NULL, '1/10');
INSERT INTO scheduletemplatedetail (TemplateId, DayOrder, AbsenceCode, WorkShiftCd)
VALUES (1, 6, 'offdays', NULL);
INSERT INTO scheduletemplatedetail (TemplateId, DayOrder, AbsenceCode, WorkShiftCd)
VALUES (1, 7, 'offdays', NULL);
INSERT INTO scheduletemplatedetail (TemplateId, DayOrder, AbsenceCode, WorkShiftCd)
VALUES (2, 1, NULL, '2/11,5');
INSERT INTO scheduletemplatedetail (TemplateId, DayOrder, AbsenceCode, WorkShiftCd)
VALUES (2, 2, NULL, '1/11,5');
INSERT INTO scheduletemplatedetail (TemplateId, DayOrder, AbsenceCode, WorkShiftCd)
VALUES (2, 3, NULL, '2/11,5');
INSERT INTO scheduletemplatedetail (TemplateId, DayOrder, AbsenceCode, WorkShiftCd)
VALUES (2, 4, NULL, '1|11.5');
INSERT INTO scheduletemplatedetail (TemplateId, DayOrder, AbsenceCode, WorkShiftCd)
VALUES (2, 5, NULL, '1/11,5');
INSERT INTO scheduletemplatedetail (TemplateId, DayOrder, AbsenceCode, WorkShiftCd)
VALUES (2, 6, 'offdays', NULL);
INSERT INTO scheduletemplatedetail (TemplateId, DayOrder, AbsenceCode, WorkShiftCd)
VALUES (2, 7, 'offdays', NULL);
INSERT INTO scheduletemplatedetail (TemplateId, DayOrder, AbsenceCode, WorkShiftCd)
VALUES (3, 1, NULL, '1#8');
INSERT INTO scheduletemplatedetail (TemplateId, DayOrder, AbsenceCode, WorkShiftCd)
VALUES (3, 2, NULL, '1.0');
INSERT INTO scheduletemplatedetail (TemplateId, DayOrder, AbsenceCode, WorkShiftCd)
VALUES (3, 3, 'business_trip', NULL);

CREATE TABLE schedule (
ScheduleId int(11) NOT NULL AUTO_INCREMENT,
TemplateId int(11) DEFAULT NULL,
PRIMARY KEY (ScheduleId)
);

INSERT INTO schedule (ScheduleId, TemplateId)
VALUES (1, 5);
INSERT INTO schedule (ScheduleId, TemplateId)
VALUES (2, 1);
INSERT INTO schedule (ScheduleId, TemplateId)
VALUES (4, 2);
INSERT INTO schedule (ScheduleId, TemplateId)
VALUES (3, 3);
INSERT INTO schedule (ScheduleId, TemplateId)
VALUES (5, 4);

DELIMITER $$

See Also

Debugging stored routine


Optimizing SQL Queries

dbForge Studio for MySQL offers results of internal MySQL tools like SHOW PROFILE and EXPLAIN along with STATUS variables changes due to query execution in a convenient and clear GUI. To enter profiling mode, you can either turn it on by clicking the [image] Query Profiling Mode button or Generate Execution Plan Generate Execution Plan button on the SQL toolbar.

In This Section

How To: Get Query Profiling Results
Describes how to get query profiling results.

How To: Compare Query Profiling Results
Tells how to easily compare profiling results.


How To: Get Query Profiling Results

This topic explains how to obtain query profiling results using Query Profiler.

1. Open a query file and click the [image] Query Profiling Mode button on the SQL toolbar to activate the Query Profiler tool.
2. Execute the query by clicking the [image] Execute button or F5. The Profiler document view opens. See the query profiling results displayed on three tabs - Profile, Plan and Status.

3. After you have made changes in the query, click the [image] Get New Results button in the Profiler document view. New profiling results appear in the tree view as a new node with time and date of query execution. You can easily distinguish and navigate to them.

Note

When you save the query file after getting the query profiling results, the latter will be automatically stored in the .Design file.

See Also

Optimizing SQL Queries

How To: Compare Query Profiling Results


How To: Compare Query Profiling Results

Each time you get profiling results for the executed query, they appear in the tree view as a new node with time and date of query execution. When editing your query, you want to know whether your changes reduce query execution time or not. Query Profiler can quickly compare the profiling results. Do the following:

1. Select the nodes of the required query profiling results in the tree view by holding the CTRL key.
2. Click the [image] Compare Selected Results button on the toolbar or select the corresponding option from the shortcut menu. The compared results appear in the grid where differences are highlighted.

See Also

Optimizing SQL Queries


Comparing and Synchronizing Database Schemas

This section helps you quickly get started with comparing data in dbForge Studio for MySQL.

In This Section

Walkthrough
This section describes the main procedures you can meet while comparing the schemas.

Managing Comparison Results
This topic describes how to work with results of comparison.

How To: Synchronize Schemas
This topic describes how to synchronize schemas.

Working with Command Line
This section describes how to automate data comparison and synchronization using the command line.

Advanced Topics
This section gives information on advanced schema comparison tasks and issues you may encounter when performing them.


Walkthrough

This section describes the main procedures you can meet while comparing the schemas.

In This Section

How To: Quickly Synchronize Two Schemas
The topic explains how to compare two databases and create the database synchronization script.

How To: Save and Load Schema Comparison
The topic explains how to save a document that contains data comparison results.

How To: Set up Schema Comparison
This topic describes how to compare two schemas.

See Also

Managing Comparison Results


How To: Quickly Synchronize Two Schemas

This topic explains how to perform simple database schema comparison and synchronization.

Comparing Schemas

1. Click New Schema Comparison on the Database Design tab of the Start Page. Alternatively, click New Schema Comparison on the Comparison menu. The Schema Comparison wizard opens.

Note

Comparing projects is available only in dbForge Studio for MySQL. The actual appearance of the window in dbForge Studio may slightly vary.
2. Select the Source and Target connections. (You can edit selected connections or create a new one by either clicking the Edit button or the New button.) To quickly compare schemas, you can click the Compare button immediately after setting databases and skip step 3.
3. To adjust comparison process, set the comparison options.
4. To set up the object types you want to compare, switch to the Object Filter tab.

Synchronizing Schemas

1. Analyze comparison results, select the database objects you want to synchronize by checking the corresponding check boxes.
2. Select the data to synchronize in the grid with comparison results. (To do this, select check boxes next to tables (or views) in the top grid. You may also select check boxes next to individual records on the Only in Source, Only in Target, and Different Records tabs of the bottom grid).
3. Click the [image] Synchronize button on the Comparison toolbar to open the Schema Synchronization wizard.
4. Select where to output the synchronization script in the wizard and then click the Synchronize button.

See Also

Walkthrough

How To: Save and Load Schema Comparison


How To: Save and Load Schema Comparison

You can save the Schema Comparison document (the one that opens after comparison to show comparison results) for the future usage. The saved file has the '*.scomp' extension and stores schema comparison information, including:

· Source and target settings
· Selected values for comparison options
· Object filters
· Selected values for synchronization options
· Schema mapping settings

It does not contain schema comparison results or object DDL. When the file is opened, schemas are recompared. If target or source can not be found, the New Schema Comparison dialog opens, where you should set source or target options.

Saving Schema Comparison Document

To save:

· In the File menu, click Save (or Save As).
· Right-click the title of the document and select Save from the menu.
· Click [image] Save on the toolbar.

Opening Schema Comparison Document

· Drag it to the dbForge Studio for MySQL UI.
· Use the Open File button on the Standard toolbar.

Note

When opening the document where a schema and a project are compared, the project should be opened.

See Also

Managing Comparison Results


How To: Set up Schema Comparison

Comparing Two Schemas

1. Open the New Schema Comparison wizard by doing any of these actions:
· Highlight two schemas in the Database Explorer window, holding the CTRL key, and select the New Schema Comparison option from the shortcut menu.
· On the Comparison menu, click New Schema Comparison
· Open a project and in the Project Explorer window, right-click the top node of the project tree. Select the New Schema Comparison option from the menu.

2. Click the Type fields and select what you are going to compare (two schemas or a schema and a project) from the drop-down lists.
3. In the Connection fields, type or select the names of MySQL Server(s) connections required for comparison.

Note
· If no connections are found, click the New button to create new ones. When the Database Connection Properties window opens, specify the properties of the server you want to connect to.
· You can edit the selected Source and Target connections by clicking the Edit buttons.
· In the drop-down lists of the Connection fields you can click the <Manage...> link to open the Connection Manager dialog box. It will help you to create, edit, and delete database connections.)
4. In the Database fields, type or select the names of the required databases. Each Database field shows the list of all databases available on the selected MySQL server.
5. (Optional) If you want to ignore some schema options during comparison, go to the Options wizard page.
6. Click the Compare button to close the wizard and start the comparison.

Tip:

· To save your time while selecting Source and Target databases, you can copy the details from one side of the wizard to the other by clicking the Copy buttons: - to copy Source database details, [image] - to copy Target database details
· To swap the Source and Target databases, click the [image] Swap button.
· To close the wizard and cancel the comparison, click the Cancel button.

To compare a schema and a project:

1. Open a project to compare.
2. Select Comparison, and then click New Schema Comparison from the top menu.
3. In the Type field of Source or Target wizard part, select Project.
4. Perform steps 3-5 as described above in the "To Compare two schemas" procedure.
5. Click the OK button.

Note

A schema and a project can't be compared if a project build is not valid. Synchronization can't be done, if a project was modified after the beginning of comparison.

Note

The following statement from a project is ignored while comparing:

ALTER TABLE statement where more than one object is modified or where a column is modified.

See Also

Walkthrough

Managing Comparison Results


Managing Comparison Results

This section tells how to view and manage schema differences the best way.

In This Section

How To: Group and Filter Comparison Results
Describes how to group and filter comparison results by various criteria.

How To: Compare Objects' DDL
Tells how to compare DDL of two corresponding database objects.

How To: Preview Schema Synchronization Script
Teaches how to preview the synchronization script for any compared object.

How To: Generate Comparison Report
Tells how to generate a report after schema comparison is completed.


How To: Group and Filter Comparison Results

This topic explains how to group and filter comparison results in the result grid.

Grouping

Schema comparison results can be grouped either by schema object type or by operation (as shown in the screenshot). To change grouping, right-click in the document grid and select Object Type or Operation in the Group By sub-menu of the shortcut menu. By default, comparison results are always grouped by one of these items.

Filtering

Database objects can be filtered by status. You can select what objects to show: Different, Equal, Only in Source, Only in Target, Inconsistent, or Unknown. You can also filter objects by action to view excluded or included objects.

To filter objects, on the Compare toolbar click the down arrow near the Filter button and select the corresponding option in the appeared menu. Any select filter criterion becomes framed in the menu to help you quickly identify what criterion is applied. You can select one and then another criterion to apply together, so several criteria can be applied at the same time.

To discard filtering, select All from the menu.

See Also

Managing Comparison Results

How To: Compare Objects' DDL


How To: Compare Objects' DDL

dbForge Studio for MySQL allows you to compare DDL of the corresponding objects in the compared schemas.

1. In the Tools menu, click Options.
2. Click Schema Comparison and select General.

You can select one of the following text comparers:

· Internal - it is selected by default.
· Araxis Merge - before selecting this option, check that Araxis Merge 2001 or higher is installed on your PC.
· Custom - you can set and use any other text comparer, which can be used through the command line.

Using Internal Comparer

If this comparer is selected, under the grid, in the Schema Comparison window, two SQL editors show string and symbol differences of the selected Source and Target schema objects. It is a convenient option, as you can see the object and SQL differences at once without distraction and any inconvenience.

To see SQL differences of compared objects, select required objects in the grid and see the differences in two SQL editors under the grid. The corresponding blocks of text, but with any differences, are connected with lines. Differences in strings are marked with three colors:

· light green is for lines existing in the Source schema but missing in the Target one or for symbols that are different in the Source and Target schemas.
· light red - is for lines existing in the Target schema but missing in the Source one
· light blue - lines existing in the Source and Target schemas, but containing differences in some symbols. These symbols are displayed in the red font and highlighted with the light green color.

Corresponding blocks of text, but with any differences, are connected with lines. If required, you will copy text from the SQL editors and then edit or save it in a new SQL document.

See Also

Managing Comparison Results

How To: Preview Schema Synchronization Script


How To: Preview Schema Synchronization Script

When analyzing the comparison results, you can select any object and preview the synchronization script for it, which will be generated by dbForge Studio for MySQL. This option is very convenient as you can check the script and be sure that you will get the correct synchronization and the desired result after it.

To preview the synchronization script:

Select the required object (or several ones) in the grid and do either of these actions:

1. Click the [image] View Schema Update Script button on the Comparison toolbar.
2. Right-click the grid and select the View Schema Update Script option.

By default, the window with the script snippet opens under the SchemaComparison window with the comparison results. You can move the opened window to any place in the dbForge Studio for MySQL UI.

See Also

Managing Comparison Results

How To: Generate Comparison Report


How To: Generate Comparison Report

When schema comparison is completed, you can generate a comparison report to keep records of schema changes.

1. In the Comparison menu, click Generate Comparison Report. The Generate Comparison Report dialog opens.
2. Select the report format, its location and objects you want to report.
3. Click Generate.

Tip: If you want to open the comparison report after generation, select View a report on completion.

See Also

Managing Comparison Results

How To: Synchronize Schemas


How To: Synchronize Schemas

This topic explains how to synchronize two database schemas.

Note

Schema synchronization can not be rolled back! It may alter or drop schema objects in your Target schema. It is highly recommended to backup the Target database before synchronization.
1. Review the comparison results and select required objects for synchronization. Unselect the checkboxes next to the objects you do not want to be synchronized. You can also select an object and then click Exclude Selection in the shortcut menu to exclude one from the synchronization process.
2. Click the [image] View Schema Update Script button on the Comparison toolbar.
3. Click the [image] Synchronize button to open the synchronization wizard. You can select what do you want to do with the synchronization script (either open or save).
4. Click the Synchronize button to close the wizard and complete the synchronization process.
5. Review the sync script, and then execute it by clicking the Execute button on the SQL toolbar.

See Also

Working with Command Line


Working with Command Line

This section describes how to automate data comparison and synchronization using command line.

Note

The command line functionality is available only in certain editions of dbForge Studio. For the detailed information on features availability in the dbForge Studio editions, please refer to the Editions topic.

In This Section

How To: Compare and Synchronize Schemas through Command Line
This topic explains how to use the command line interface to run comparisons.

Additional /schemacompare Arguments
The topic contains information on command line switches and examples of their usage.

Command Line Options for /schemacompare Operation
Lists the comparison options to use in the command line.

Exit Codes Used in Command Line for /schemacompare
This topic describes exit codes for the /schemacompare switch.

See Also

Advanced Topics


How To: Compare and Synchronize Schemas through Command Line

You can automate schema comparison and synchronization using the command line.

1. Click Start, and type cmd in the Run line. Press ENTER. The Command Prompt opens.
2. Type a path to the dbforgemysql.com file, located in dbForge Studio for MySQL installation folder on your PC, and press the space bar.

3. Type all the arguments (actions you want to run) in the Command Prompt. You can do this in three ways:
1) Type all the arguments directly in the Command Prompt, for example:

/schemacompare /source host:<server_name> database:<database_name> [port:<port>] user:<user_name> [password:<password>]
[charset:<charset>] /target host:<server_name> database:<database_name> [port:<port>] user:<user_name> password:<password>
[charset:<charset>]

2) Specify a path to a previously saved comparison document to use the connection settings along with the comparison settings specified in the document.

/schemacompare /compfile:"D:\file_name.scomp"

3) Type the path to a previously generated file with required command line arguments (see below how to prepare the file), for example:

/argfile:"D:\file_name.txt"

Type additional parameters that are not specified in the file into the Command Prompt, for example:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /argfile:file_name.txt /schemacompare /sync

Tip: To see a quick help on the arguments available in the command line, type the following:

dbforgemysql.com /?

4. Press ENTER to run the process.

Preparing a file with command line arguments

1. Define what action you want to run, for example:

/schemacompare

2. Define Source and Target connection strings:

/schemacompare /source connection:"host:host_name;port:port;user:user_name;password:password;database:database_name" /target
connection:"host:host_name;port:port;user:user_name;password:password;database:database_name"

If you compare a database project, you should specify the path to its file on your PC. For example,

/schemacompare /source dbproject C:\MyProject.mydev
/schemacompare /target dbproject C:\MyProject1.mydev

You can also use the Schema Comparison Document that already contains Source and Target connection strings.

/schemacompare /compfile:"C:\MyComparison.scomp"

3. To generate and save a log file, specify the file name and location. For example:

/log:"C:\Log.log"

4. To generate and save a comparison report file, specify the file name and location. For example:

/report:"C:\Report.html"

5. To synchronize the schemas, i.e., update the Target schema, type the following:

/sync

6. To generate and save a synchronization script, specify the file location and name. For example:

/sync:"C:\sync_script_name.sql"

See Also

Working with Command Line

Additional /schemacompare Arguments


Additional /schemacompare Arguments

This topic gives detailed description of command line switches and examples of their usage.

Arguments

To get more information on switches related to schema comparison in the command line interface, you can type:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /schemacompare /?

Below all switches of this option are described, together with usage examples.

Argument

Action and Usage

/compfile

This switch is used to load command line settings from the comparison project file, *.scomp. Command usage looks like:

/compfile:<path>

Example of using a file with comparison settings, saved earlier:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /schemacompare /compfile:"D:\workDir\OSC1vsOSC2.scomp"

/groupby

This switch is used when generating comparison reports. use it to group objects in such report. Command usage looks like:

/groupby:<none/status/objecttype>

The following example shows how to compare schemas using settings from the file, generate comparison report, and group objects in the report by type:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /schemacompare /compfile:"OSC1vsOSC2.scomp" /report:"report.txt" /reportformat:HTML /groupby:objecttype

/log

Use this switch if you want to generate comparison log file in a specified directory. Command usage looks like:

/log:<filepath>

The following example shows how to compare schemas using settings from the file and write log to the specified file:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /schemacompare /compfile:"OSC1vsOSC2.scomp" /log:"D:\sync.log

options

You can specify some comparison and synchronization options directly in the command line interface. See the list of available options and learn how to use them in the Command Line Options for /schemacompare Operation topic.

/report and /reportformat

You can generate schema comparison report in .html or .xls format. If you specify file format in the output file name in the /report switch, it is not necessary to use the /reportformat switch. Commands usage looks like:

/report:<filepath>

/reportformat:<HTML|XLS>

The following example shows how to compare schemas using settings from a file, generate report to the specified file in the HTML format:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /schemacompare /compfile:"OSC1vsOSC2.scomp" /report:"report.txt" /reportformat:HTML

/source

You can specify source database for comparison and synchronization in the command line. It is possible to use several options for defining the schema.

To connect to a live database by specified parameters, type:

host:<name> database:<db> [port:<port>] user:<name> [password:<pw>] [charset:<charset>]

To specify full connection string with additional parameters, type:

connection:<connection_string>

To load database project to be compared, type:

dbproject:<projectpath>

/target

You can specify target database for comparison and synchronization in the command line. It is possible to use several options for defining the database.

To connect to a live database by specified parameters, type:

host:<name> database:<db> [port:<port>] user:<name> [password:<pw>] [charset:<charset>]

To specify full connection string with additional parameters, type:

connection:<connection_string>

To load database project to be compared, type:

dbproject:<projectpath>

/sync

You can perform schema synchronization from the command line interface. If you specify output file for synchronization, only synchronization script will be generated. Command usage looks like:

/sync[:path]

The following example shows how to compare schemas using settings from the file saved before, and save synchronization script:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /schemacompare /compfile:"OSC1vsOSC2.scomp" /sync:"D:\compare_result.sql"

See Also

Working with Command Line

Command Line Options for /schemacompare Operation


Command Line Options for /schemacompare Operation

By default, dbForge Studio for MySQL generates a file with command line arguments and writes all the comparison and synchronization options into it. Each option is written like the following:

/option_name: [Y/N]

You can edit the file to turn on/off required options. To turn on comparison and synchronization options, edit their values to "Yes", "Y", "True", "T", or "On". To turn off the options, change their values to "No", "N", "False", "F", or "Off".

Each option has a full and short name. You can type either name of a required option into Command Prompt instead of editing the file.

See the list of the options with their full and short command line names below.

Command line option name | Short name | Option
CheckObjectExistence | chkobjex | Check for object existence
DisableDependencyAnalysis | disdep | Disable dependency analysis
DropCreateOnly | dropcreateonly | Use DROP and CREATE instead of ALTER
DropCreateOnlyTables | dropcreateonlyt | Use DROP and CREATE instead of ALTER for tables
ExcludeComments | nocomments | Exclude comments
ForceColumnOrder | force | Force column order
IgnoreAutoIncrement | iautoinc | Ignores auto increment table property during comparison
IgnoreAvgRowLength | iavgrowlen | Ignores average row length property during comparison
IgnoreCase | icse | Ignore case during comparsion
IgnoreCheckConstraints | icheck | Ignore check constraints
IgnoreCollations | icollate | Ignore collations
IgnoreColumnDefaultValues | icolumndef | Ignores column default values during comparison
IgnoreColumnOrderInIndexes | icolumnordind | Ignore column order in indexes
IgnoreComments | icomm | Ignore comments
IgnoreCommentsOptions | icommopt | Ignore commnet options
IgnoreConstraintsNames | icnames | Ignore constraint names
IgnoreDataTypesInColumn | idtc | Ignore data types in column
IgnoreDefiner | idefiner | Ignores DEFINER and SQL SECURITY clauses during comparison
IgnoreDropIndexes | idropi | Ignore indexes present only in Target
IgnoreDropTriggers | idropt | Ignore DML and INSTEAD OF triggers present only in Target
IgnoreEndsClause | iends | Ignores ENDs clause in event definition
IgnoreForeignKeyActions | ifkacts | Ignore foreign keys actions ON UPDATE and ON DELETE
IgnoreForeignKeys | ifk | Ignores foreign keys during comparison
IgnoreFullTextIndexes | iftindex | Ignore full-text indexes
IgnoreIndexesNames | iinames | Ignode index names
IgnoreNotNullConstraints | inotnullc | Ignore NOT NULL constraints
IgnorePartitions | ipart | Ignore partitions
IgnorePermissions | iperm | Ignore permissions
IgnorePrimaryKeys | ipk | Ignore primary keys
IgnoreSpatialIndexes | ispindex | Ignore spatial indexes
IgnoreStartsClause | istarts | Ignores STARTS clause in event definition
IgnoreSynonymForFunctions | ifuncsyn | Ingore synonyms for functions
IgnoreTableDMLTriggers | itdmltrig | Ignore table DML triggers
IgnoreTableEngine | iengine | Ignores table engine types during comparison
IgnoreTriggerFireOrder | ifire | Ignore firing order for DML triggers
IgnoreWhiteSpace | ispace | Ignore differences in white spaces during comparison and synchdonization
IncludeComparisonSettings | incsettings | Includes comparison settings into your report
IncludeIdenticalObjects | incident | Includes identical objects into your report
IncludeUseDatabase | inud | Include USE <database_name> clause to the script
MappingIgnoreCase | micase | Ignore case in object names when mapping them
MappingIgnoreSpaces | mispace | Ignore spaces in object names when mapping them
MappingSimilar | msim | Associate column names having similar name options
SelectedObjectsOnly | selobjonly | Includes objects selected for synchronization into your report

See Also

Working with Command Line

Advanced Topics


Exit Codes Used in Command Line for /schemacompare

If schema comparison is run through the command-line interface, the following exit codes are returned depending on the execution result:

Error Code | Description | Additional Information
0 | Success | The operation been completed with no errors.
10 | Command line usage error | The command line was used incorrectly. For example, an incorrect flag, or incorrect syntax may have been used.
11 | Illegal argument duplication | Some arguments must not appear more that once.
20 | Trial expired | The trial period has expired, or dbForge Studio has not been activated.
30 | Project file corrupted | Project file corrupted.
40 | Server connection fail | Server connection failed.
100 | Databases identical | The compared databases are identical or no objects have been included. To suppress this error, use /Include:identical
101 | Databases not identical | This is returned when the /assertidentical switch is used and source and target are not identical.
105 | Resource unavailable | A file is missing.
107 | Failed to create report | The report has not been created.
108 | No objects | There are no objects for comparison.

See Also

Working with Command Line

Advanced Topics


Advanced Topics

This section gives advanced information on the schema comparison process and issues that you may encounter.

In This Section

Schema Comparison and Synchronization Overview
Provides general information on schema comparison and synchronization.

Viewing Schema Differences Overview
Explains how comparison results are presented and how to organize them for better understanding.

Comparing and Synchronizing Schemas on Different Server Versions
Describes peculiarities of schema comparison on servers with different versions.

Known Schema Comparison Problems
Lists known schema comparison problems.

See Also

Walkthrough


Schema Comparison and Synchronization Overview

dbForge Studio gives you a perfect opportunity to compare and synchronize schemas with many useful features. They include the following:

· Comparing and synchronizing of two schemas or a schema and a database project. Note, you can't compare and synchronize two projects.
· Schema comparison separates objects existing only in the Target or Source database, identical objects, and ones having the same name, but with different structure.
· Schema comparison results are displayed in a convenient document, easy for analysis and synchronization.
· Schema comparison is asynchronous. Based on your needs, you can stop it in any moment.
· Schema comparison includes object description. When any errors occur during description, error notifications are shown. You can either stop or retry comparison, or ignore the errors. In case of fatal errors, schema comparison is automatically stopped.
· You can quickly synchronize the Target schema with the Source one or export a schema synchronization script.

See Also

Advanced Topics

Viewing Schema Differences Overview


Viewing Schema Differences Overview

After comparing schemas, or a schema and a project, the differences are shown in the Schema Comparison document.

Object status

dbForge Studio for MySQL automatically sets different statuses for compared objects to help you quickly analyze the differences. Compared objects can have the following statuses:

· Only in Source - schema object exists in source schema and does not exist in target schema.
· Only in Target - schema object exists in target schema and does not exist in source schema.
· Different - schema objects with the same names exist in both schemas, but they have different DDL.
· Equal - identical objects exist in both schemas.
· Inconsistent - objects are different, but target object can not be created or updated due to incompatibility between the source and target MySQL servers. For example, if source table contains a BIT column and target MySQL server does not support BIT columns. Table status will be inconsistent. For more information see Comparing Schemas on Different DBMS Server Versions.
· Unknown - object metadata cannot be retrieved, so its status is unknown.

Note

If a Source table has partitioning and a Target MySQL server does not support partitioning, table comparison status depends on the table structure differences. If the table exists only in Source or has other differences than partitioning, it has Only in Source or Different status and it can be synchronized with Source except for partitioning. If the tables in Source and Target have the same structure except for partitioning, the partitioning is ignored and the table comparison status is Equal.

Update operation

For each compared object dbForge Studio automatically sets the operation in the Operation field to apply after synchronization. Based on your needs, you can change it and select the required one from the drop-down list in the field. The following operations are available:

· None - by default, it is set for identical objects, you can change it to Drop.
· Update - by default, it is set for objects with Different status and means the object will be moved to the Target schema. You can change it to Drop or None.
· Drop - by default, it is set for objects with Only in Target status and means the object will be dropped in the Target schema. You can change it to None.
· Create - by default, it is set for objects with Only in Source status and means the object will be created in the Target schema. You can change it to None.

Excluding objects from synchronization

If you don't want to synchronize some objects, clear required check boxes.

To exclude several objects from synchronization or include them, highlight these objects in the grid and select the Exclude Selection or Include Selection options from the right-click the menu or press the Space key to include/exclude selected objects.

By default all compared objects are included into synchronization.

Managing comparison results

To refresh schema comparison results, click the Refresh button on the Comparison toolbar.

To better understand comparison results, you can do the following:

· Filter them by comparison status
· Group by comparison status and object type

See Also

Advanced Topics

Comparing and Synchronizing Schemas on Different MySQL Server Versions


Comparing and Synchronizing Schemas on Different Server Versions

Comparing and Synchronizing Schemas on Different MySQL Server Versions

When comparing schemas on different MySQL servers, some incompatibilities can occur in schema objects. For example, when comparing schemas on MySQL 3.23 and 5.x. Schema on MySQL 5.x can have such objects as views, triggers, stored routines that are not supported on 3.23 server. This topic describes how dbForge Studio for MySQL treats such incompatibilities.

Not Supported Objects

If source schema contains objects that are not supported on the target MySQL server, they are not displayed in the Schema Comparison document and are not affected by synchronization.

If target schema contains objects that are not supported on the source MySQL server, they are displayed in the document. Their default operation is None and they will not be affected by synchronization. You may change their operation to Drop, so the object will be dropped from the target schema.

Partially Supported Objects

Sometimes there are some incompatibilities even if the type of the database object is supported on both source and target database. For example, tables are supported by both MySQL 3.23 and MySQL 5.x, but a table on one server may have a column of a type that is not supported on the other one.

When an object is supported on the source server but is not supported on the target server, it will have Inconsistent status and cannot participate in synchronization. When there is an object in the target that is not supported in the source, but source objects are supported on the target server, target schema can be synchronized and incompatible database objects have Different status.

Here are some examples of such incompatibilities:

· Unsupported column type (for example, MySQL 3.23 does not support BIT column type).
· Unsupported table engine.
· Unsupported ROW_FORMAT
· Usage of unsupported built-in functions in the DDL.

Partitioning

Partitioning is treated in another way than other incompatibilities. Let us examine several situations:

· The source and target tables have the same structure except for partitioning. In that case, the target table can be updated. If the target schema supports partitioning, the status is Different, otherwise it is Equal.
· Source partitioned table has another structure than corresponding target table or there are no corresponding target table (having the same name). In that case the table has Different status.

If target schema supports partitioning, partitioned tables are included into schema comparison results, otherwise they are ignored.

Syntax Incompatibility

In cases when equal schema objects have syntax differences, because they are placed on different server versions, the object DDL is generated according to target object DDL.

See Also

Advanced Topics

Known Schema Comparison Problems


Known Schema Comparison Problems

When comparing MySQL schemas you may face some problems caused by MySQL limitations. Here is the list of widely-known problems:

· If you compare schema on MySQL 6.0 with another schema on MySQL 4 or 5.0, and there are tables with TIMESTAMP column, status of such tables will always be different even if they have the same structure or they were synchronized.
· MySQL does not allow editing tables with EXAMPLE table engine, so synchronization of such tables will fail.
· On the MySQL 6.0 table, containing VARCHAR column can have ROW_FORMAT = FIXED. On the earlier MySQL version you may execute ALTER TABLE ... ROW_FORMAT = FIXED but it does not do anything. So, such tables will have Different comparison status even if after their synchronization.

See Also

Advanced Topics


Comparing and Synchronizing Data in Databases

This section helps you quickly get started with comparing data in dbForge Studio for MySQL.

In This Section

Comparing Data
This section describes how to setup the data comparison process and how to compare data.

Analyzing Comparison Results
This section describes how to analyze comparison results.

Synchronizing Data
This section describes how to synchronize data.

Working with Command Line
This section describes how to automate data comparison and synchronization using the command line.

Advanced Data Comparison Topics
This section contains advanced topics that describes data comparison and synchronization process.


Comparing Data

This section describes how to setup the data comparison process, how to compare data, and analyze comparison results.

In This Section

How To: Set up Data Comparison
The topic describes all steps that can be taken during data comparison process and alternative ways for accomplishing routine comparison tasks.

Mapping
This section describes automatic and manual object mapping.

Data Comparison Options
The topic describes options of comparison process.

Types Compatibility
This topic provides information about MySQL types compatibility.

See Also

Analyzing Comparison Results


How To: Set up Data Comparison

From this topic you will learn all steps that can be taken during data comparison process and alternative ways for accomplishing routine comparison tasks.

1. In the Data Comparison Wizard window, select source and target connection from the drop-down list. Also you can create new connection by clicking New or modify existing ones by clicking Edit.
2. Select the source and target database. You can easily swap source and target databases by clicking the [image] Swap button. (To immediately compare the data, click the Compare button. To tune the comparison, click the Next button to move to other wizard pages.).

3. Click Next.
4. On the Options page, you can customize your comparison by checking required options. Here you can generate a file with command line arguments. It will allow you to automate data comparison and synchronization using the command line and a task scheduler. Click Next.
5. On the Mapping page, you can customize mapping. Use this page if you want to change the default mapping or map tables with different names or columns with different names and structure. Read more about mapping in the Object Mapping section. Click Compare.
6. After the comparison process is completed, you can view the results in the data comparison document.

See Also

Comparing Data

Mapping


Mapping

This section describes dbForge Studio automatic and manual object mapping.

By default dbForge Studio maps tables that have the same name and owner and columns with the same names for comparison. Column order may be different. Unique or primary constrains with the same set of columns can be used as comparison keys.

You can change the default behavior to ignore differences in case, spaces, and underscores in object names by setting the corresponding options on the Options of the Data Comparison wizard. These settings apply to the names of tables, views, and columns. You can also map tables and columns manually. For more information visit other topics of this section.

In This Section

How To: Map Tables and Views
Describes how to map tables and views manually.

How To: Map Columns
Describes how to map columns manually.

How To: Set Comparison Key
Describes how to select constraints for the comparison key or create custom comparison key.

How To: Filter Rows Included into Comparison
Describes how to filter rows to compare specific ranges.

Mapping Warnings
Describes warnings you may encounter when mapping database objects.

See Also

Comparing Data

Data Comparison Options


How To: Map Tables and Views

By default, when you move to the Mapping tab of the Data Comparison wizard, dbForge Studio automatically maps all available objects of the selected databases.

Note

To remap already mapped objects, unmap them first. See the "How to unmap an object" section below.

Note

After objects are mapped for comparison and synchronization, you may encounter mapping warnings, displayed as [image] icons.

How to unmap an object:

1. Switch to the Mapping page of the Data Comparison wizard.
2. In the grid, select database objects to unmap. (To find a mapped database object quickly, use the Filter box. Type the string in this box to view only the objects, containing this string in their names. Click the arrow button to select a recent search. To clear the Filter box, click the x button.)
3. Click the [image] Unmap button on the toolbar. The unmapped objects disappear from the grid, but will be listed in the Object Mapping dialog.

How to map an object:

1. Switch to the Mapping page of the Data Comparison wizard.
2. Click the [image] Map Objects button on the toolbar. The Objects Mapping dialog will appear.

Note

Actual document look may slightly vary from the above image depending on the product you use.

3. Click the Map button and the mapped objects disappear from the Objects Mapping dialog and will be shown in the Mapping tab's grid.
4. Repeat steps 3-4 until you map all the objects you need. Click OK to close the dialog.

Tips:

Click the Cancel button to close the dialog and discard mapping.

Click the Reset button to restore the automatic mapping of objects.

See Also

Mapping

How To: Map Columns


How To: Map Columns

dbForge Studio allows you to map columns with non-equal names. You may map columns with different types, however this may result in data truncation, rounding, and errors during synchronization for certain types. If such a situation is possible, a warning icon [image] appears in the Target Column column of the Select columns for comparison grid. If the columns are not compatible and cannot be compared, the [image] icon appears near this column.

For customizing column mapping the Column Mapping dialog box is used. To open it, click the [image] button in the Columns in Comparison column on the Mapping page of the Data Comparison wizard.

Note

Actual document look may slightly vary from the above image depending on the product you use.

Note

If you want to remap already mapped columns, you should unmap them first.

How to unmap columns

Click the corresponding cell in the Target Column column and choose <None>.

How to map columns

Click the corresponding cell in the Target Column column and choose the column you need.

Excluding columns from comparison

To exclude a column pair from comparison, clear the Compare check box next to the corresponding column pair.

Excluding columns from synchronization

To exclude a column pair from synchronization, clear the Sync check box next to the corresponding column pair.

See Also

Mapping

How To: Set Comparison Key


How To: Set Comparison Key

Comparison key is used to determine which rows correspond to each other. You can choose suitable constraints for comparison or specify custom comparison keys. dbForge Studio can select comparison key automatically if tables have matching primary key or unique constraint.

To choose a constraint pair, click the [image] button in the Comparison Key column on the Mapping page of the Data Comparison wizard and select the constraint pair you need.

To set a custom comparison key, click the [image] button in the Comparison Key column on the Mapping page of the Data Comparison wizard and select <Custom>. Then in the appeared Column Mapping dialog box, select check boxes in the Key column to add columns to the comparison key.

Note that you can set custom comparison key or choose the needed constraint pair directly in the Comparison Key drop-down list of the Column Mapping dialog box.

Note

Actual document look may slightly vary from the above image depending on the product you use.

See Also

Mapping

How To: Filter Rows Included into Comparison


How To: Filter Rows Included into Comparison

By default, dbForge Studio compares all the rows in the selected tables or views. If they contain a large amount of data, the comparison can take a lot of time and even result in running out of disk space. You can simply avoid such things by filtering the rows to compare specific ranges.

1. Open the Data Comparison Wizard and specify Source and Target. Click Next.
2. On the Mapping wizard page, select a required object in the grid and click the Filter button. The WHERE Filter dialog opens. It is divided into Source section (on the left) and Target one (on the right). If you want to filter Source rows, use the left section. To filter Target rows, use the right section.
3. Right-click either Source or Target section and select Insert Column and a required column from the right-click menu. Type a filter expression.

4. If you want to apply the expression to both Source and Target rows, type the expression and select Use the same expression for source and target.
5. To apply the filtering expression, click OK. The filtered object will be marked with the ? icon in the Mapping wizard page grid.

See Also

Mapping

Mapping Warnings


Mapping Warnings

After objects are mapped for comparison and synchronization, you may encounter warnings on the Mapping page of the Data Comparison wizard. The warnings may be divided into two groups. They are table-level warnings and column level warnings.

Table-level warnings are displayed as [image] icon in the column with check boxes on the Mapping page of the Data Comparison Wizard. Object pairs with table-level warnings are not compared. They are displayed with [image] icon instead of check box in the Data Comparison document.

Column-level warnings are displayed as [image] icon in the Columns in Comparison column on the Mapping page of the Data Comparison wizard. They also appear in the Target column in the Column Mapping dialog box. Such warnings mean that some columns of a compared object pair cannot be compared because of type incompatibility or that you may encounter data loss when synchronizing data.

To read the warning messages, point to the warning icon. All warnings for this object will appear in the hint.

The following table contains information about table-level warnings and ways to remove them.

Warning | Description
No columns to compare. | It means, there are no columns with the same name in this pair of tables (views). To compare them you should map the columns manually. For more information about the column mapping, see How to: Map Columns.
Objects to compare have no key column. | It means that custom comparison key is used but is not set. You should mark at least one column pair as comparison key. For more information visit How to: Set Comparison Key.

The following table contains information about column-level warnings.

Warning | Description
Numeric columns have different precisions, migrating the data may cause overflows. | This warning appears when source numeric columns have larger precision than target column. In this case source may contain larger values than the target column can contain. Records containing such values cannot be synchronized.
Decimal columns have different precisions or scales, migrating the data may cause rounding or overflows. | This warning appears when Decimal columns in source have larger precision and/or scale than target columns. If the source column contains larger values than the target column can contain, such records cannot be synchronized. If the source records contain numbers with fractional part longer than target scale, such numbers will be rounded during synchronization.
Numeric columns have different precisions, migrating the data may cause rounding. | This warning appears when comparing float or integer columns and precision of source column is larger than the precision of target column. If the source float column contains data with larger precision, such data will be rounded when synchronizing. If the source integer column contains larger values than the target column can contain, such records cannot be synchronized.
Columns have different sizes, migrating the data may cause truncation. | This warning appears when comparing binary or text columns and source column has larger size than target column. If source contains records with longer data than target can contain, the data will be truncated in the target when synchronizing.
Types are incompatible. | These columns cannot be compared. Appears when data of the source column cannot be converted to the data type of the target column, for example TEXT and BINARY.
Source column allows Nulls which can not be stored in Target. | This warning appears when source column is nullable and target column is not. If source table contains data with nulls in this column, such data cannot be synchronized.
Timestamp column cannot be updated. | This warning appears when target column has a timestamp data type. Such columns cannot be updated, so their values will not be synchronized.
Xml columns have different storage types CONTENT or DOCUMENT. | This warning appears when Xml columns have different types - CONTENT or DOCUMENT. Data in such columns can not be synchronized.

Note

You may exclude columns from comparison and synchronization either by unmapping them or by clearing check boxes in the first column of Select columns for comparison grid on the Column Mapping dialog box.

See Also

Mapping

Data Comparison Options


Data Comparison Options

Data comparison and synchronization options are set in the Data Comparison Wizard. You can include views and tables to data comparison and set options for automatic object mapping on the Source and Target wizard page.

Other comparison options can be found at the Options page. Select Ignore Blobs to exclude BLOB columns from comparison, Ignore Case for case insensitive data comparison, and set paginal mode options for displaying data of compared tables or views. Records for comparison and synchronization can be selected on this page. You can select whether to view identical records, different records, records only in source, and only in target.

See Also

Comparing Data

Types Compatibility


Types Compatibility

Type Compatibility Table

The table below contains the information about MySQL type compatibility.

- Fully compatible.

- Depends on data.

- Different length can be truncated.

- Different length can be truncated and depends on data.

- Different precision can be overflown.

- Different precision and scale can be rounded or overflown

- Different precision can be rounded

- Different precision can be truncated.

- Different enums.

- Different enums and depends on data

- Can be truncated.

See Also

Comparing Data

Analyzing Comparison Results


Analyzing Comparison Results

This section tells how to perform data comparison analysis.

In This Section

How To: View Data Comparison Results
The topic describes a data comparison document interface and explains how to view comparison results.

How To: Generate Data Comparison Report
The topic explains how to view results of data comparison in the form of a report.

See Also

Synchronizing Data


How To: View Data Comparison Results

After you have compared data, a Data Comparison document will appear with Source and Target connections displayed in the upper part of the window and data comparison results displayed in two grids. The top grid lists all the compared tables and views with values indication the quantity of rows that are different, identical, existing only in Target or only in Source. The bottom grid contains the corresponding data records of the selected database object in the top grid. The records are grouped by their status and displayed on separate tabs. They are Different Records, Only in Source, Only in Target, Identical Records, and Conflict Records (it appears only in case any conflict records exist). The shortcut menu of the Data Comparison document and its top menu provide a number of options to manage the comparison results. The status bar in the bottom of the grid shows the number of differences per a column.

Database objects can be filtered by differences. You can select what objects to show: objects with different, identical records, only in source or only in target records.

To view the specific kind of tables:

1. Click the down arrow near the Filter button on the Comparison toolbar.
2. Select the corresponding option in the appeared menu. Several options can be selected at the same time.

Note

In case a table has both different and identical records, it will be visible, independently of the selected options (Different or Identical).

You can also filter Incorrectly mapped objects and Correctly mapped objects.

To clear filtering:

1. Click the down arrow near the Filter button on theComparison toolbar.
2. Select All from the appeared menu.

The bottom grid allows you to view data differences between the corresponding tables or views. Select a table in the compared database object grid, and the data of these tables appears in the tabs below.

The Identical Records tab contains a grid with data rows that are identical and there is no need to update such records in target. Other tabs contain an additional column with check boxes in the grid. This column is named as action, that will be executed when synchronizing data - Update, Delete, or Insert. By selecting or clearing these check boxes you can control which rows will be affected with data synchronization. This column will not hide when scrolling grid.

Note

Incorrectly mapped objects are displayed with [image] icon instead of check box in the Data Comparison document. The data of such database objects are not compared. Zero count will be displayed for all kinds of records. Objects with no data to synchronize (with only identical records or with no records at all) are displayed without check boxes.

Only in Source and Only in Target tabs contain grid with Insert and Delete columns respectively and data rows, that are stored only in the table of the source and of the target database respectively. Different Records tab contains grid with the following columns.

· Column with check boxes.
· Comparison key columns. Their value is the same for the compared tables.
· Other table columns. Source columns and target columns are grouped in pairs and marked as (Source) and (Target). When the values of the corresponding columns are different, this pair is highlighted with bold.

If a non-unique custom comparison key was chosen for any table or view, the fifth column in main grid and the fifth tab, Conflict Records appear. The tab consists of two grids containing all records with non-unique values of the comparison key from the corresponding database. These records cannot be synchronized.

If you cleared Update, Delete, or Insert column check boxes in some tables, you may view only tables with selected records or only tables without selected records. To filter tables, click the down arrow near the Filter button on the Comparison toolbar and select the corresponding option in the appeared menu.

To refresh data comparison results, click the Refresh button on the Comparison toolbar. To view long text or binary fields, use the Data Viewer window.

See Also

Analyzing Comparison Results

How To: Generate Data Comparison Report


How To: Generate Data Comparison Report

dbForge Studio provides a possibility to view results of data comparison in the form of a report.

Generating Report

To generate a comparison report after comparison, perform the following steps:

1. Click Comparison on the menu bar and then click [image] Generate Comparison Report. The Comparison Report wizard will be opened.

Note

Actual document look may slightly vary from the above image, depending on the product you use.
2. On the Format page select the required report format (HTML or Excel).
3. Specify the name of the report file.
4. Specify the location of the report file.
5. Check the View the report on completion check box to view the report upon creation.
6. On the Options select required options.

7. Click Generate.

See Also

Analyzing Comparison Results

Synchronizing Data


Synchronizing Data

This section describes how to synchronize data.

In This Section

How To: Synchronize Data
The topic guides you through the process of establishing consistency among data from a source and a target data storage.

Synchronization Warnings
The topic describes warnings that may occur during the data synchronization process.

Synchronization Error Handling
The topic provides the information about synchronization error handling.

See Also

Working with Command Line


How To: Synchronize Data

Note

Data synchronization can not be rolled back! It may change or delete data in your target database. It is highly recommended to backup target database before synchronizing data.

Synchronizing databases

To start synchronizing data of two databases:

1. Select the data to synchronize. To do this, select check boxes in the column with check boxes for the tables (or views) you want to synchronize. You may also click a separate table and select check boxes in the column with check boxes on the Only in source, Only in target, and Different tabs for individual records to determine which records to synchronize. Use the check box in the header of the grid to apply settings to all the grid rows.

Note

Incorrectly mapped objects are displayed with [image] icon instead of check box in the Data Comparison document. Objects with no data to synchronize (with only identical records or with no records at all) are displayed without check boxes. You cannot select them for synchronization.
2. On the Comparison toolbar, click [image] Synchronize. The Data Synchronization Wizard will be opened.

3. Select whether to backup target database and backup files location. Then select whether to execute a script as a single transaction. You may click the Synchronize button and skip next steps to open the synchronization script in the editor, but this is not recommended if the script is too large. See the Executing Large Scripts topic to know ho to execute script without opening it in the editor. Click the Next button.
4. Select where to output synchronization script - open in the editor, save for the future execution, or immediately execute it.
5. You may either click the Synchronize button to generate the update script or click the Next button to set synchronization options and view the synchronization action plan and synchronization warnings if any exist, and then click the Synchronize button.

See Also

Synchronizing Data

Synchronization Warnings


Synchronization Warnings

Synchronization warnings are displayed at the Summary Page of the Data Synchronization wizard. These warnings are the same as column level Mapping Warnings. But mapping warnings appear regardless of real data differences, they are generated if there are column data type differences, which may cause errors or data loss in the tables to compare. Synchronization warnings appear only if there are data to be updated or inserted to the target table.

If you encountered synchronization warnings, than synchronization may fail or data loss may occur because of truncation or rounding. If the warning has the [image] icon, then the error will certainly occur when executing synchronization script. To avoid this error, exclude this table or corresponding records from synchronization by clearing the corresponding check boxes in the Data Comparison document.

See Also

Synchronizing Data

Working with Command Line


Synchronization Error Handling

When synchronizing databases, you may configure dbForge Studio behavior for synchronization script execution in case of error.

If you want to have consistent data in any case, select the Use single transaction check box on the General tab of the Data Synchronization Wizard. If this option was selected, all the synchronization script is executed as one single transaction. In case of any error or synchronization canceling, all changes are rolled back.

If you want, for example, debug the synchronization script, and you don't want changes to be rolled back, clear the Use single transaction check box. In such case script is executed till the batch, containing errors. All changes made by the statements before the batch, which caused error, are applied to the database, so you may see which changes were applied.

Note

To avoid errors when synchronizing data, pay attention to the Synchronization Warnings. Exclude database objects that can cause errors from the synchronization.

See Also

Synchronizing Data


Working with Command Line

This section describes how to automate data comparison and synchronization using the command line.

Note

The command line functionality is available only in certain editions of dbForge Studio. For the detailed information on features availability in the dbForge Studio editions, please refer to the Editions topic.

In This Section

How To: Compare and Synchronize Data through the Command Line
This chapter explains how to use the command line interface to run comparisons.

How To: Schedule Database Synchronization
The topic explains how to use the Windows Task Scheduler to run database synchronization automatically.

Additional /datacompare Arguments
This topic contains all additional command line arguments for /datacompare switch and shows how to use them.

Options Used in Command Line for /datacompare
Lists the comparison options to use in the command line.

Parameters Used in Connection string
This topic describes connection string parameters.

Exit Codes Used in Command Line for /datacompare
This topic describes exit codes for the /datacompare switch.

See Also

Advanced Data Comparison Topics


How To: Compare and Synchronize Data through the Command Line

You can automate data comparison and synchronization using the command line.

Running Comparisons from the Command Line

1. Click Start.
2. Type cmd in the Search programs and files text box and press the ENTER button.

Note

To run the Command Line in Windows 8:

From the Desktop Mode

· Move the mouse cursor to the exact lower left corner until the desktop shortcuts menu appears.
· Right-click to see the shortcut menu and than click Run.

From the Charms Bar

· Move your mouse to the upper right corner until the Charms Bar appears.
· Select Apps from the list and type “run” in the search box.
· Click Run from the search results.

Use Windows + R Shortcut Keys

· In desktop mode, press the Windows + R keys, to show the Run command line.
3. Type a path to the dbforgemysql.com file located in the dbForge Studio for MySQL installation folder on your PC, and press the SPACE.

C:\Program Files\Devart\dbForge Studio for MySQL\dbforgemysql.com

4. Specify command line arguments (connection strings and actions you want to run).

For example, specify the type of the operation.

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datacompare /?

5. Specify the objects that will be compared and synchronized.

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datacompare /compfile:"D:\mycompdoc.dcomp"

6. Synchronize data directly into the database and generate a synchronization script file.

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datacompare /compfile:"D:\mycompdoc.dcomp" /sync:"D:\mysync.sql"

Note

To synchronize data automatically, use /sync without file name specification:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datacompare /compfile:"D:\mycompdoc.dcomp" /sync
7. Generate a comparison and synchronization protocol into a file.

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datacompare /compfile:"D:\mycompdoc.dcomp" /sync:"D:\mysync.sql" /log:"D:\mylog.log"

8. Compose a comparison report.

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datacompare /compfile:"D:\mycompdoc.dcomp" /sync:"D:\mysync.sql" /log:"D:\mylog.log" /report:"D:\myreport.html"

9. Specify the report format. HTML and EXCEL formats are available.

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datacompare /compfile:"D:\mycompdoc.dcomp" /sync:"D:\mysync.sql" /log:"D:\mylog.log" /report:"D:\myreport.html" /reportformat:HTML

10. Press ENTER to run the process.

Tip: To execute the synchronization script, use the /execute switch:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /execute /connection:"User Id=root;Host=db;Port=3320;Database=test;Character Set=utf8" /inputfile:"D:\mysync.sql"

Generate File With Command Line Arguments

To generate a file with command line arguments, open the Data Comparison wizard.

To access the Data Comparison Wizard, on the Comparison menu, click

Select Source and Target for comparison. Go through other wizard pages to tune the data comparison.

On the Options tab, click Save settings to a command line arguments file and specify the file name and location to save the file. The selected Source and Target connection strings along with comparison options will be saved as command line arguments in the file. You can edit the values of comparison options in the file.

Note that the generated file does not contain password information for security purposes. You should edit the file and enter the passwords manually.

You can see available additional arguments and learn how to use them in the Additional /datacompare Arguments topic.

The command line string with /argfile parameter will be written as follows:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /argfile:file_name.txt

See Also

How To: Schedule Database Synchronization


How To: Schedule Database Synchronization

You can use Windows Task Scheduler to create and manage synchronization tasks that your computer will carry out automatically at the times you specify.

Create Synchronization Task

To create Windows task:

1. Run the Windows Task Scheduler.

Note

To run the Windows Task Scheduler:

1. Click Start and then click Control Panel.
2. Click Administrative Tools.

Note

If your current view is Category, click System and Security, and then click Administrative Tools
3. Click Task Scheduler.
3. Click the Action menu, and then click Create Basic Task.
4. Type a name for the task and an optional description, and then click Next.
5. Do one of the following:
· To select a schedule based on the calendar, click Daily, Weekly, Monthly, or One time, click Next; specify the schedule you want to use, and then click Next.
· To select a schedule based on common recurring events, click When the computer starts or When I log on, and then click Next.
· To select a schedule based on specific events, click When a specific event is logged, click Next; specify the event log and other information using the drop-down lists, and then click Next
6. To schedule a program to start automatically, click Start a program, and then click Next.
7. Click Browse to enter a path to the datacompare.com file in Program/script. (The default path is C:\Program Files\Devart\dbForge Studio for MySQL.)
8. Also, make sure to specify arguments in the Add arguments field.
9. Click Next.
10. Click Finish.

See Also

Additional /datacompare Arguments


Additional /datacompare Arguments

This topic gives detailed description of command line switches and examples of their usage.

You can select the required options while setting the comparison in the Data Comparison Wizard and generate a file with command line arguments by clicking Save settings to a

Arguments

To get more information on switches related to data comparison in the command line interface, you can type:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datacompare /?

Below all switches of this option are described, together with usage examples.

Argument

Action and usage

/compfile

This switch is used to load command line settings from the comparison project file, *.dcomp. Command usage looks like:

/compfile:<path>

Example of using a file with comparison settings, saved earlier:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datacompare /compfile:"D:\workDir\ODC1vsODC2.dcomp

/groupby

This switch groups objects in comparison report. Command usage looks like:

/groupby:<none/status/objecttype>

/log

Use this switch if you want to generate comparison log file in a specified directory. Command usage looks like:

/log:<filepath>

The following example shows how to compare schemas using settings from the file and write log to the specified file:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datacompare /compfile:"ODC1vsODC2.dcomp" /log:"D:\sync.log

/meobjmask

You can exclude objects from comparison if they match the given expression by using the /meobjmask argument and specifying the needed expression. To turn the option off, specify No, N, Off, False, F. Command usage looks like:

/meobjmask:<expression/N>

/micolmask

Use this switch to exclude columns from the comparison if they match the given expression. To exclude columns from the comparison, specify a mask expression. To turn off the option, specify No, N, Off, False, F. Command usage looks like:

/mimask<expression/N>

/miobjmask

You can include objects to comparison if they match the given expression by using the /miobjmask argument and specifying the needed mask expression. To turn the option off, specify No, N, Off, False, F. Command usage looks like:

/miobjmask:<expression/N>

options

You can specify some comparison and synchronization options directly in the command line interface. See the list of available options and learn how to use them in the Options Used in Command Line for /datacompare topic.

/report

/reportformat

You can generate schema comparison report in .html or .xls format. If you specify file format in the output file name in the /report switch, it is not necessary to use the /reportformat switch. Commands usage looks like:

/report:<filepath>

/reportformat:<HTML|XLS>

The following example shows how to compare data using settings from a file, generate report to the specified file in the HTML format:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datacompare /compfile:"ODC1vsODC2.dcomp" /report:"D:\report.txt" /reportformat:HTML

/source

You can specify source database for comparison and synchronization in the command line. It is possible to use several options for defining the database.

To connect to a live database by specified parameters, type:

host:<name> database:<db> [port:<port>] user:<name> [password:<pw>] [charset:<charset>]

To specify full connection string with additional parameters, type:

connection:<connection_string>

/sync

You can perform schema synchronization from the command line interface. If you specify output file for synchronization, only synchronization script will be generated. Command usage looks like:

/sync[:path]

The following example shows how to compare schemas using settings from the file saved before, and save synchronization script:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datacompare /compfile:"OSC1vsOSC2.dcomp" /sync:"D:\compare_result.sql"

/target

You can specify target database for comparison and synchronization in the command line. It is possible to use several options for defining the schema.

To connect to a live database by specified parameters, type:

host:<name> database:<db> [port:<port>] user:<name> [password:<pw>] [charset:<charset>]

To specify full connection string with additional parameters, type:

connection:<connection_string>

See Also

Working with Command Line

Options Used in Command Line for /datacompare


Options Used in Command Line for /datacompare

You can select the required options while setting the comparison in the Data Comparison wizard and generate a file with command line arguments by clicking Save settings to a command line arguments file on the Options wizard page. Also you can set comparison options by using the /option_name:[Y/N] switch in the Command Prompt. Specify either full or short names of the options. Here is the list of their names.

By default, dbForge Studio for MySQL generates a file with command line arguments and writes all comparison and synchronization options into it. Each option is written like the following: /option_name: [Y/N]

You can edit the file to turn on/off required options. To turn on comparison and synchronization options, edit their values to "Yes", "Y", "True", "T", or "On". To turn off the options, change their values to "No", "N", "False", "F", or "Off".

Each option has a full and short name. You can type either name of a required option into the Command Prompt instead of editing the file.

See below the list of options with their full and short command line names.

Options List

Full Name | Short Name | Option
BulkMaxSize | bulkms | Maximum size of bulk
CheckConcurrencyUpdates | concupd | Check for concurrency updates
CheckDifferent | chkdiff | Include different records into comparison results
CheckIdentical | chkequal | Include identical records into comparison results
CheckOnlyInSource | chksource | Include only in source records into comparison results
CheckOnlyInTarget | chktarget | Include only in target records into comparison results
CompareTables | tables | Include tables into comparison
CompareViews | views | Include views into comparison
ConvertFromArchiveEngine | convfromarc | Convert from archive engines
DisableDmlTrigger | nodml | Disable DML triggers
DisableForeignKeys | nofk | Disable foreign keys
DropKeys | dropkeys | Disable primary keys, indexes and unique constraints
ExcludeComments | nocomments | Exclude comments
ExcludeObjectsByMask | meobjmask | Exclude tables or views from comparison by specifying a custom wildcard expression
IgnoreBlobColumns | miblob | Ignore BLOB columns during comparison
IgnoreCase | icase | Ignore case in object names when mapping them
IgnoreColumnsByMask | micolmask | Exclude columns from comparison by specifying a custom wildcard expression for columns names
IgnoreComputedColumns | micomput | Ignore computed columns in tables during comparison
IgnoreEndOfLine | ieol | Ignore end of line characters during comparison and synchronization
IgnoreLeadingSpaces | ilspaces | Ignore leading spaces
IgnoreMicroseconds | imsec | Ignore microseconds for the following data types: TIME(n), DATETIME(n) and TIMESTAMP(n)
IgnoreTrailingSpaces | ispaces | Ignore whitespaces in the end of strings during comparison and synchronization
IncludeComparisonSettings | incsettings | Include comparison settings
IncludeDifferencesPerColumns | incdiffcols | Include differences per columns
IncludeIdenticalObjects | incident | Include identical objects
IncludeObjectsByMask | miobjmask | Include tables or views from comparison by specifying a custom wildcard expression
IncludeObjectsData | incdata | Include object data
IncludeOnlyColumnsWithChanges | inccolswchanges | Include only columns with changes
IncludeUseDatabase | inud | Include USE <database_name> clause to the script
IsEmptyStringEqualsNull | emptyeqnull | Treat NULL and EMPTY STRING as the same value for CHAR and VARCHAR values while comparing
IsIgnoreTime | itime | Ignore time for DATETIME fields and compare only DATE part
LimitBulk | limbulk | Limit size of bulk
MappingIgnoreCase | micase | Ignore case in object names when mapping them
MappingIgnoreSpaces | mispace | Ignore spaced in object names when mapping them
MappingIgnoreUnderscores | miunder | Ignore underscores in object names when mapping them.
RoundFloatTypes | round | Specify the count of digits after the decimal point. Option rounds float numeric, real and decimal data types
ToleranceInterval | tol | Tolerance interval
UseCommitMode | commit | Insert the commit statement after each commit page length statements

See Also

Working with Command Line

Parameters Used in Command Line


Parameters Used in Connection String

User Id
Gets or sets the name of the user to connect.

Password
Gets or sets the user's password to connect.

Host
Gets or sets name or IP address of host of MySQL database to which to connect.

Port
Gets or sets port of MySQL server to which to connect.

Database
Gets or sets the name of the database to be used once a connection is open.

Connection Timeout
Gets or sets the time to wait while trying to establish a connection before terminating the attempt and generating an error.

Default Command Timeout
Gets or sets the time in seconds to wait while trying to execute a command before terminating the attempt and generating an error.

Ping Interval
Gets or sets the interval (in seconds) between pinging MySQL server and reopening the connection if required.

Enlist
Gets or sets a Boolean value that indicates whether the connection is automatically enlisted in the current transaction context.

Transaction Scope Local
Enables support for non-distributed transactions in the Transaction Scope implementation.

Pipe Name
Gets or sets name of pipe to use when connecting with named pipe.

Direct
Gets or sets a value indicating whether the MySQL client library (libmysql.dll) will be used.

Compress
Gets or sets a value indicating whether to enable transferred data compression.

Unicode
Gets or sets a value indicating whether the UTF8 character set will be used.

Protocol
Gets or sets a MySQL Protocol of the MySQL Connection String Builder.

Persist Security Info
Gets or sets a value indicating whether password is stored in connection string after connection is opened.

Client Interactive
Determines the inactivity timeout before the server breaks the connection.

Pooling
Gets or sets pooling mode.

Min Pool Size
The minimum number of connections allowed in the pool.

Max Pool Size
The maximum number of connections allowed in the pool.

Connection Lifetime
Gets or sets time span in seconds for connection to live.

Server Parameters
Gets or sets parameters for launching MySQL embedded server.

Character Set
Gets or sets character set that will be used on the client side.

Binary As Guid
The provider should treat BINARY(16) columns as guid.

Tiny As Boolean
The provider should treat TINYINT(1) columns as Boolean.

Validate Connection
Indicates whether to validate connections that are being taken from the pool.

Initialization Command
Specifies a database-specific command that should be executed immediately after establishing the connection.

Found Rows
Specifies whether the provider will return the number of rows matched by the WHERE condition of the UPDATE statement instead of the rows actually changed as the number of changed rows.

Embedded
Specifies what server will be used to connect - MySQL server or Embedded MySQL server.

SSH Host
Gets or sets name or IP address of SSH server.

SSH Port
Gets or sets number of port on SSH server to connect.

SSH User
Gets or sets user id on SSH server.

SSH Password
Gets or sets user password on SSH server.

SSH Cipher List
Gets or sets list of ciphers that client agrees to use.

SSH Private Key
Gets or sets the location of the client private key.

SSH Passphrase
Gets or sets the client key passphrase.

SSH Authentication Type
Gets or sets the client authentication method.

SSH Host Key
Gets or sets the location of the public key on the client side to verify the server host key during establishing connection.

SSH Strict Host Key Checking
Indicates whether the host key is verified during establishing connection.

SSL Cipher List
Gets or sets list of ciphers that client agrees to use.

SSL CA Cert
Gets or sets location of authority certificate.

SSL Cert
Gets or sets location of client certificate.

SSL Key
Gets or sets location of user's private key.

Proxy Host
Gets or sets the host name or IP address of the proxy server to which to connect.

Proxy Port
Gets or sets the port number of the proxy server.

Proxy User
Gets or sets the proxy server account name.

Proxy Password
Gets or sets the password for the proxy server account.

Plugin Dir
Gets or sets the directory, where the plugin is located.

Default Auth Plugin
Gets or sets the name of the authentication plugin to be used.

HTTP Url
Gets or sets url of the tunneling PHP script. For example, if the script is in the server root, the url can be the following: http://localhost/tunnel.php.

HTTP User
Gets or sets the user name for HTTP authorization.

HTTP Password
Gets or sets the password for HTTP authorization.

HTTP Base64
Specifies whether to encode data to MIME base64 format before sending them with the POST Request.

HTTP Host
Gets or sets the host name or IP address of HTTP tunnel server.

HTTP Port
Gets or sets the port number of HTTP tunnel server.

HTTP Content Length
Gets or sets the Content Length HTTP header parameter. This is the size of message body in bytes for both client and server.

HTTP Strict Content Length
Gets or sets a value indicating whether data padding is enabled when message size is smaller than Content Length.

HTTP Max Connection Age
Gets or sets the maximum connection age in seconds after which the tunnel will be closed.

HTTP Keep Alive
Gets or sets the timeout in seconds to send Keep-Alive HTTP packets.

See Also

Working with Command Line

Exit Codes Used in Command Line for /datacompare


Exit Codes Used in Command Line for /datacompare

If data comparison is run through the command-line interface, the following exit codes are returned depending on the execution result:

Error Code | Description | Additional Information
0 | Success | The operation been completed with no errors.
10 | Command line usage error | The command line was used incorrectly. For example, an incorrect flag, or incorrect syntax may have been used.
11 | Illegal argument duplication | Some arguments must not appear more that once.
20 | Trial expired | The trial period has expired, or dbForge Studio has not been activated.
30 | Project file corrupted | Project file corrupted.
40 | Server connection fail | Server connection failed.
100 | Databases identical | The compared databases are identical or no objects have been included. To suppress this error, use /Include:identical
101 | Databases not identical | This is returned when the /assertidentical switch is used and source and target are not identical.
105 | Resource unavailable | A file is missing.
107 | Failed to create report | The report has not been created.
108 | No objects | There are no objects for comparison.

See Also

Working with Command Line

Advanced Data Comparison Topics


Advanced Topics

This section contains advanced topics that describes data comparison and synchronization process.

In This Section

Known Data Comparison Problems
The topic describes problems that can occur during comparison and synchronization process.

Data Comparison Process Overview
The topic gives basic information on data comparison and synchronization.

Data Synchronization Process Overview
The topic contains basic information on data comparison and synchronization.

See Also

Comparing Data


Known Data Comparison Problems

There are following problems when comparing MySQL databases. These problems are caused by MySQL or table engine limitations.

· Data inserted in the BLACKHOLE engine, are in fact not inserted anywhere, BLACKHOLE tables always don't contain any data. So, if you synchronize the data of the BLACKHOLE table with some other table it remains empty.
· Data can not be inserted in tables with the EXAMPLE table engine. If you try to synchronize the data of the EXAMPLE table with some other table, you get an error message.
· Tables with TIMESTAMP column, created without the NOT NULL option, will not be compared if one table is on the MySQL 6.0 server and another one is on earlier MySQL server.
· In some cases equal floating point values may be treated as different.
· If the first table column has TIMESTAMP type and it has no explicit default value, that differs from CURRENT_TIMESTAMP, when inserting or updating records, MySQL sets CURRENT_TIMESTAMP value to them. If this column has a primary or unique constraint, you cannot insert or update several records at the same time. When performing data synchronization, only the first record can be synchronized for such table at once. Other records violate the constraint.

See Also

Advanced Data Comparison Topics

Data Comparison Process Overview


Data Comparison Process Overview

dbForge Studio for MySQL gives you a perfect opportunity to compare data between different databases with many useful features. They include the following:

· Comparison of data between different databases
· Displaying of data comparison results in a convenient UI, easy for analysis and synchronization
· Quick data synchronization of target and source databases
· Asynchronous comparison and synchronization

By default data comparison is performed only for the objects with the same names and owners. Process of choosing corresponding database objects in source and target for comparison is called object mapping. You can use dbForge Studio automatic mapping or map database objects manually. dbForge Studio allows you to customize mapping of tables (views) and columns, so you can compare data of objects with non-equal names, owners, and structure. For more information, see Object Mapping.

The following tables and views cannot be compared:

· Invalid tables or views.
· Tables or views, metadata of which can not be retrieved.

By default, data is compared by a primary or unique key, but other key or custom column set can be defined. A comparison key is used to determine which rows correspond to each other. It is not recommended to use a non-unique comparison key. If the table does not have a suitable key, you should manually select a custom key for this table when comparing. You should always set a custom key for views when comparing data with the Compare Views check box selected.

Data comparison can be saved to the file and opened later.

See Also

Advanced Data Comparison Topics

Data Synchronization Process Overview


Data Synchronization Process Overview

After you have compared data, dbForge Studio gives you an easy and convenient way to synchronize data.

You may manually specify which tables and even which records to synchronize. Use the check boxes in the first column of the data comparison document grid to include or exclude objects to synchronization.

Note that it is highly recommended to backup target database before data synchronization.

If you synchronize data with different data type, you may encounter synchronization warnings. They are displayed at the Summary, Data Synchronization Wizard. If you have any synchronization warnings, that means that during synchronizing data you may encounter errors or data loss because of rounding, truncation, etc. For more information about synchronization warnings, read the Synchronization Warnings topic.

The Data Synchronization wizard allows you to either apply updates immediately or create an update script for the Target database and save it to a file. For more information, visit the How To: Synchronize Data topic.

Before start the synchronization, you may view Action Plan that contains all the actions that will be performed during synchronization. The action plan represents the synchronization script structure, so it is good to analyze it before this script will be generated or executed if you have chosen to execute the script immediately. The action Plan is displayed on the Summary page of the Data Synchronization wizard.

See Also

Advanced Data Comparison Topics

Comparing Data


Copy Databases

This section helps you quickly get started with copying databases with dbForge Studio for MySQL.

In This Section

Copying Databases
Desribes how to copy databases.

Copying Databases through the Command Line
Describes how to copy databases through the command-line interface.

Options Used in Command Line for /copydatabase
Describes options used in command line to customize database copying.


Copying Databases

With dbForge Studio, you can easily transfer both, multiple database schemas and data from one server to another.

To copy databases

1. Click Copy Databases on the Database menu. Alternatively, click Copy Databases on the Administration tab of Start Page. Also, the Copy Databases option is available in the Database Explorer shortcut menu. For instance, you can right-click several databases from the source connection and the target connection node, point to Tasks, and then click Copy Databases.

2. Select source and target connections. You can use the search text box to locate the required database.
3. Optionally, click [image] to change the default Copy Database Settings. For instance, you can change the maximum number of simultaneous database copings, include or exclude triggers, partition clause, etc.

4. In the Source column, select database (databases) you want to copy.
5. To copy data along with schema, select a check box in the Include Data column next to a database you want to copy.
6. Optionally, select the Drop if sexists on target to drop databases on the target connection if they duplicate the source databases.
7. Optionally, you can modify the name of the target database. For this, click the database name in the Target column of the window and type a new name.
8. Click [image] to start copying the selected databases to the target server, and wait till the progress is complete.

See Also

Copying Databases through the Command Line

Copy Databases


Copying Databases through the Command Line

You can automate datavase copying using the command line.

Note

The command-line interface is available only in certain editions of dbForge Studio. For detailed information on the features availability in the dbForge Studio editions, please refer to the Editions topic.

1. Click Start, type 'cmd' in the Search programs and files text box, and press ENTER. The Command Prompt opens.

2. Specify the operation you want to perform and the required parameters and arguments (actions you want to run) in the Command Prompt, for example as follows:

dbforgemysql.com /copydatabase [/switch1[:value | [parameter1:value parameter2:value ..]] /switch2 ..]

3. Press ENTER to run the process.

Select corresponding command line switches to perform the required operations:

Argument

Action and Usage

/data

This switch is used to copy data along with schema.

/recreate

This switch is used to recreate target database, if it exists on Target.

/source

This switch is used to specify source with the following options:

· Connecting to a live database according to the specified parameters:

host:<name> database:<db> [port:<port>] user:<name> [password:<pw>] [charset:<charset>]

· Specifying full connection string with additional parameters:

connection:<connection_string>

/sourcedatabase

This switch is used to specify a database to copy. Overrides the database specified in 'source' option

/target

This switch is used to specify Target with the following options:

· Connecting to a live database according to the specified parameters:

host:<name> database:<db> [port:<port>] user:<name> [password:<pw>] [charset:<charset>]

· Specifying full connection string with additional parameters:

connection:<connection_string>

/targetdatabase

This switch is used to specify a target database.

See Also

Options Used in Command Line for /copydatabase

Copy Databases


Options Used in Command Line for /copydatabase

You can set database copying options by using the /options switch.

To turn on the option, specify: Yes, Y, On, True, T. To turn off the option, specify: No, N, Off, False, F. You can use this switch as many times as many options you want to specify.

See below the list of options with their full and short command line names.

Options List

Full Name | Short Name | Option
BulkInsert | bulk | Use bulk insert
DisableForeignKeys | nofk | Disable foreign keys
FlushLogs | flush | Flush logs
IgnoreDefiner | nodef | Exclude DEFINER and SQL SECURITY clauses
IncludeNoAutoValueOnZero | noval | Include NO_AUTO_VALUE_ON_ZERO in script
IncludePartitionClause | partition | Include partition clause
IncludeTriggers | trigger | Include triggers
LockAllTablesForRead | lock | Lock all tables for read (Flush Read Locks)


Performing Administration Tasks

This section tells you how to perform some database administration tasks, such as server variables control, service management, etc.

In This Section

Controlling Server Variables
Explains how to view and edit MySQL server system and status variables.

Managing Services
Explains how to manage services.

Controlling Sessions
Describes how to view session information and control user sessions.

Performing Maintenance and Flush Operations
Explains how to perform table maintenance and flush operations.


Controlling Server Variables

dbForge Studio for MySQL allows you to view and modify MySQL system and status variables with Server Variables window. To call the Server Variables window, select Server Variables from the Database menu.

System variables indicate how the MySQL server is configured. Some of them can be changed dynamically when the MySQL server is running.

Status variables provide information about MySQL server operation. Their values cannot be changed.

To switch between system and status variables, click System or Status button on the Server Variables window toolbar.

To change variable value, click in the Value column for the required variable row and edit variable. Press ENTER to apply changes or ESC to discard them. Only values of variables with names, marked with bold font, can be changed. Variable can be copied to the clipboard with its name, value and description by right-clicking on it and selecting Copy from the shortcut menu.

Variables can be grouped by category and exported to an external file for viewing or editing with Data Export Wizard by clicking the corresponding button on the toolbar.

See Also

Performing Administration Tasks

Managing Services


Managing Services

dbForge Studio for MySQL allows you to manage MySQL services on local and remote computers. You can start, stop and restart services, associate connections with them. Use the Service Control window to perform these actions. To show Service Control window, select Service Control from the Database menu.

To manage services, you should add them to the Service Control list at first.

Adding Services to the Server Control List

To add services to the Server Control list perform the following actions.

1. Click Add Service button on the Service Control toolbar.
2. Specify required Host in the appeared dialog.
3. Select Show all services, if you need to add services with name that does not contain a string "MySQL".
4. Click the Scan button. If you have no enough privileges, you will get corresponding message.
5. Select required services and click the Add button.

Note

When opening the Add Services dialog box, last entered host will be automatically scanned for MySQL services. The host is also scanned for services when you select it in the Host box.

Associating Connections with a Service

Connections can be associated with a service. After associating, connection will close when the service is stopped. To associate connections with a service, perform following steps.

1. Click Associated Connections button on the Service Control toolbar.
2. In the appeared dialog select required connections.
3. Click OK.

Manipulating Services in the Server Control List

After you added required services to the Service Control list, you can start, stop and restart them by clicking the corresponding button on the Service Control toolbar.

To refresh the state of the services, use the Refresh button.

To remove a service from the Service Control list, select it and press the DELETE key or right-click it and select Remove service from the shortcut menu.

See Also

Performing Administration Tasks

Controlling Sessions


Controlling Sessions

The following walkthrough describes how to control user sessions. You will learn how to view session information, stop query execution and disconnect sessions.

Prerequisites

In order to complete this walkthrough, you will need to use access MySQL server 5.0.13 or higher.

Starting Session

Execute the following query.

SELECT * FROM
demobase.emp e1,
demobase.emp e2,
demobase.emp e3,
demobase.emp e4,
demobase.emp e5

To do it, perform the following steps:

1. Open an SQL editor by clicking New SQL button on Standard toolbar.
2. Type or paste this code to the document.
3. Execute the document by clicking the [image] button on the SQL toolbar.

Managing Sessions

Viewing Session Information

Launch another instance of the dbForge Studio for MySQL (don't close the previous one) and open the Session Manager window in it. To call the Session Manager, select Session Manager from the Database menu.

If you have the global PROCESS privilege, you will see all user sessions for the current connection. Otherwise, you will see only your own sessions.

Click on the Host column caption to order all data by host. Find your connections (from your host). Then click on the connection which has 'Query' in the Command column. In the bottom part of the Session Manager you can see the text of the executing queries. Find your connection executing the query above.

Killing Session and Query

Right-click the session with our query and choose Kill Query from the shortcut menu. Click Yes in the appeared dialog. Then switch back to the previous instance of dbForge Studio for MySQL and scroll down the data grid. You will get a message "Query execution was interrupted".

Switch to the dbForge Studio for MySQL with Session Manager open. Again right-click the session and choose Kill Session from the shortcut menu. Switch back to the previous instance of dbForge Studio for MySQL and click the Refresh button on the Database Explorer toolbar. You will get a message "Lost connection during query".

If you have the global SUPER privilege you can kill queries and sessions of all users, otherwise, only your own sessions and queries.

See Also

Performing Administration Tasks

Performing Maintenance and Flush Operations


Performing Maintenance and Flush Operations

dbForge Studio for MySQL Table Maintenance Wizard and Flush dialog box allow you to perform table maintenance and flush operations. To open Table Maintenance Wizard, select Table Maintenance from the Database menu. To open the Flush dialog box, select Flush from the Database menu.

Performing Analyze Operation

To analyze tables or views, perform the following actions.

1. Open the Table Maintenance Wizard.
2. You can optionally select Do not write binary log, if you don't want the analyze operation to be written to binary log.
3. Click Analyze and then click the Next button.
4. Select tables you want to analyze and click the Execute button.

Performing Check Operation

To check tables or views, perform the following actions.

1. Open the Table Maintenance Wizard.
2. Click Check and then click the Next button.
3. Select tables and views you want to check and click the Next button.
4. Select check mode and tables to check - all, changed, or tables, that have not been closed properly, and click the Execute button.

Performing Optimize Operation

To optimize tables or views, perform the following actions.

1. Open the Table Maintenance Wizard.
2. You can optionally select Do not write binary log, if you don't want the optimize operation to be written to binary log.
3. Click Optimize and then click the Next button.
4. Select tables you want to optimize and click the Execute button.

Performing Repair Operation

To repair tables or views, perform the following actions.

1. Open the Table Maintenance Wizard.
2. You can optionally select Do not write binary log, if you don't want the repair operation to be written to binary log.
3. Click Repair and then click the Next button.
4. Select tables you want to repair and click the Next button.
5. Select repair options and click the Execute button.

Performing Flush Operation

To perform flush operation, open the Flush dialog box, select items to flush, and click the OK button. To perform flush operation over a single table, right-click the table in the Database Explorer and select Flush from the shortcut menu.

See Also

Performing Administration Tasks


Developing Database Projects

dbForge Studio for MySQL provides you projects feature. Database projects have significantly improved database development, giving developers a number of great opportunities.

A database project is an offline representation of a database schema with extended opportunities for offline schema development. It is a collection of logically organized SQL scripts and query files, which are used both to create a new database and update the existing one.

Projects greatly facilitate database development. They organize your scripts in one logical structure, good for navigation and management, offers offline database development with a set of useful features, such as syntax check and code completion in SQL code, refactoring, etc. You can generate either a single SQL script file or a set of files (a batch script file) for deploying to the server. Deployment of only required project changes is one more benefit. Empower yourself with database projects, while developing databases, and feel difference.

In This Section

How To: Create and Open Projects
This topic describes how to create, save, open database projects, and import database objects into them.

How To: Manage Files in Projects
This topic describes how to work with files and folders in your projects.

How To: Work with Database Objects in Project
This topic will explain how to rename and delete database objects.

How To: Use Project Build Configurations
This topic describes how to use project build configuration.

How To: Build and Deploy Project
This topic describes how to build and deploy a project.

Working with Project
Describes how to create a sample project.

Comparing Schema and Project
This walkthrough describes how to edit a project and how to synchronize a schema and a project.

Sample Project
Describes the sakila database project sample.

Advanced Topics
This section contains advanced information on working with projects.


How To: Create and Open Projects

This topic explains how to create, save, open database projects, and import database objects into them.

Creating a Project

To create a project:

1. On the File menu, select New, and then click Project. The New Database Project Wizard opens.

Note

Actual document look may slightly vary from the above image, depending on the product you use.
2. Enter a name and a location of the project.
3. You can also select a connection to use for the project deployment. (By default, the current connection is selected.) Optionally deselect Create a folder for the project to store the project in the chosen path without creating a folder for a project.

Note

Actual document look may slightly vary from the above image, depending on the product you use.
4. Click the Create button to close the wizard and see the created project in the Project Explorer window. To save the project, click the Save button on the toolbar.

Creating an Empty Project

Follow the steps below to create a new blank project:

1. Go to the File menu.
2. Select New.
3. Click Blank Project.

Importing Database Objects into Project

To import database objects into a project:

1. Select the Import schema objects from the existing database check box in the wizard and click the Next button to specify a connection and a database where the imported database objects are located.

Note

Actual document look may slightly vary from the above image, depending on the product you use.
2. You can select only required database objects from the list of database objects on the next wizard page.

Note

Actual document look may slightly vary from the above image, depending on the product you use.
3. Click the Create button to close the wizard and see the created project with imported objects in the Project Explorer window. To save the project, click the Save button on the toolbar.

Saving a Database Project

To save project right-click on the project in Project Explorer and select Save Project from the shortcut menu or activate Project Explorer and click the Save button or select Save <project name> from the File menu.

Opening a Database Project

To open an existing project, on the File menu, click Open, and then click Project/Solution.

Note

When creating new project from existing database, object DDL is formatted according to formatting options.

Note

When you create a new project, opened project will be closed, and all opened documents will be closed too.

See Also

Developing Database Projects

How To: Manage Files in Projects


How To: Manage Files in Projects

This topic explains how to work with files and folders in your projects.

Working with Folders

If you are working with the project that contains many different queries and scripts, you can use folders to organize the related scripts and queries into groups. dbForge Studio for MySQL allows you to create folders and move or add items to them, to create nested folders for complex project organization, delete or rename folders.

To create a folder right-click the project or folder in Project Explorer and select Add Folder from the shortcut menu.

To delete a folder right-click on it in Project Explorer and select Delete from the shortcut menu. All the file shortcuts and subfolders of this folder will be removed from the project, but physical files will not be deleted.

You can move SQL scripts and queries to and from folders by dragging them from and dropping to the folders.

Note

Project folders are not real Windows folders, information about these folders is stored in the project file (.mydev). When you create or delete folders, corresponding Windows folders are not created or deleted and when you move file shortcuts and folders in Project Explorer from one folder to another, physical files stay at the same locations they were before.

Adding File to Project

To add a new file to the project right-click on the project or its folder node in Project Explorer and select Add New File from the shortcut menu

-or-

select Add New File from the Project menu.

Add New File window will appear. Choose the desired template of the file to create. Input the name of the file. Click Add to create the file with code template.

Note

Though the created file is automatically included into the project it is not saved anywhere on the disk. You are to save it by selecting the Save command from the File menu or the Standard toolbar.

To add an existing file to project right-click on the project or its folder node in Project Explorer and select Add Existing File from the shortcut menu.

Removing File from Project

To remove a file from the project right-click on it in Project Explorer, select Delete from the shortcut menu and click Remove in the appeared dialog. The physical file will not be deleted, these actions only remove the file link from project.

To delete a physical file from disc right-click on it in Project Explorer, select Delete from the shortcut menu and click Delete in the appeared dialog. The file link in project and the physical file itself will be deleted.

Editing files in Project

You can edit project's files in a convenient SQL editor, which provides a wide range of options for quick and efficient SQL code editing.

See Also

Developing Database Projects

How To: Work with Database Objects in Project


How To: Work with Database Objects in Project

This topic will explain how to rename and delete database objects.

Renaming Database Objects

To rename an object from a project perform the following steps:

1. Right-click the object in the Schema View window.
2. Choose Rename from the shortcut menu.
3. Enter a new name.
4. View and adjust changes, and click Apply.

Deleting Database Objects

To delete an object from a project perform the following steps:

1. Right-click the object in the Schema View window.
2. Choose Delete from the shortcut menu.
3. Click Yes in the appeared dialog.

Note

If the script file, containing the object, has the same name as the object, the whole file will be physically deleted. If the object is a table, and it has triggers, the triggers will also be deleted.

See Also

Developing Database Projects

How To: Use Project Build Configurations


How To: Use Project Build Configurations

Build configurations can be used for storing multiple versions of the project properties and multiple project connections. You can have several configurations - each one with its own options. For example, you can use one configuration for deploying database to the test sever and another one for deploying to the production server.

You can choose active configuration from the Configuration drop-down list on the Project toolbar. Each new project has one configuration named Default.

Configurations can be created, renamed, and deleted using the Configuration Manager.

Adding a Configuration

1. Open Configuration Manager by selecting Configuration Manager from the Configuration drop-down list on the Project toolbar.
2. Click the Add button. A New Project Configuration dialog will appear.
3. Enter the Name of the configuration and select a configuration to copy settings from if you need it.
4. Click OK.

Removing a Configuration

1. Open Configuration Manager by selecting Configuration Manager from the Configuration drop-down list on the Project toolbar.
2. Select the configuration you want to remove and click Remove.

Renaming a Configuration

1. Open Configuration Manager by selecting Configuration Manager from the Configuration drop-down list on the Project toolbar.
2. Select the required configuration in Configuration Manager and click the Rename button or press the F2 key.
3. Type the new name.
4. Press ENTER.

Changing Options for a Configuration

1. Open project options.
2. Select the configuration from the Configuration drop-down list in the upper part of the document.
3. Edit options. They will be applied for the selected configuration only. The same is about the project connection.

Note

To edit project options for the specific configuration, you should select it in the Configuration drop-down list on the project properties document, not on the Project toolbar.

See Also

Developing Database Projects

How To: Build and Deploy Project


How To: Build and Deploy Project

This topic explains how to build and deploy a project.

Building Project

After you have edited your database project, you should build it to create a script that will deploy all the project changes to the database on the server. A project can be built to a single ready-to-deploy script or a set of scripts with a batch to run it in the MySQL Command-Line Tool.

To build a project:

1. Choose a project configuration to build on the Build tab of the Project Properties window. (To open the window, click Properties on the Project menu).
2. Right-click in the Project Explorer window and select Build the Project from the shortcut menu.

Project building is enhanced with the following features:

· Syntax check in project scripts. (If any errors are found, the build is stopped.)
· Check of references to schema objects in all statements.
· Check of any object duplicates.

Project options to customize build results

Before building the project, you can set project options to customize build results.

1. Right-click in the Project Explorer window and select the Properties option, or on the Project menu, click Properties. The Project Properties window opens. It contains three tabs: Build, Build Order, and Database.
2. Use the Build tab to define the settings for the generated SQL file with project changes. For example, you can select whether to generate a single SQL script file or a batch script file, etc.
3. The Build Order tab lets you manage the order of files in the build script and deploy execution. You can manage dependencies between objects in different files using build order. For example, table film2 in film_text.Table.sql references table film1 in film_Table.sql, so you should move film_text.Table.sql to locate under film_Table.sql on the Build Order tab.

Note

Actual document look may slightly vary from the above image, depending on the product you use.
4. Move to the Database tab to manage target database settings. For example, you can set Server version to generate SQL statements, using syntax of this server version.

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Deploying Project to Server

You can deploy either the entire project or only the changes in the project to the database on your server.

Note

Project files can be deployed only if a connection was assigned to the project.

Deploying an entire project

To deploy an entire project, click Deploy the Project on the Build menu.

Use Always re-create a database option to guarantee database integrity.

Deploying changes from your project

When you want to deploy only the changes from your project to the server, you should compare your project with the database on the server and create a special schema synchronization script. The script will deploy only required changes to the server.

1. Right-click in the Project Explorer window and select the Synchronize Project with Server option. The document with comparison results opens.

Note

Actual document look may slightly vary from the above image, depending on the product you use.
2. By default, the synchronization actions are automatically selected for each compared object. You can change them, for example, by selecting the Skip action to prevent applying the change.
3. On the Comparison menu, click Synchronize to deploy the project's changes to the database.

Synchronizing changes from the database on the server with the project

To synchronize changes from the database on the server with your project, do the following:

1. Right-click the required database in the Database Explorer window, and select the New Schema Comparison. The wizard opens.
2. Select the database on the server as Source and your project as Target.

Note

Actual document look may slightly vary from the above image, depending on the product you use.
3. Click OK and see the comparison results in the opened window.
4. Analyze the differences. By default, the synchronization actions are automatically selected for each compared object, but you can change them, if required.
5. Click the Synchronize button on the toolbar to synchronize the database with the project.

While comparing, the project can be either Source or Target. Note, the project is automatically built during comparison, so if any errors occur during this process, the comparison fails.

See Also

Developing Database Projects

Comparing Schema and Project


Working with Project

The following walkthrough describes how to create a sample project, add folders and files to it, deploy the project and export it to a single script. A sample project contains scripts, that create database objects, that were created manually in previous walkthroughs.

To create a new project, on the File menu, select New, and then click Blank Project. A project will appear in the Project Explorer.

Prerequisites

In order to complete this walkthrough, you will need access to MySQL server 5.0.13 or higher.

You should have the following privileges:

· CREATE privilege on the demobase database
· DROP privilege on the demobase database
· INSERT privilege on the demobase database
· DELETE privilege on the demobase database
· UPDATE privilege on the demobase database
· SELECT global privilege
· CREATE USER global privilege
· GRANT OPTION

Creating Project

Creating Folder Structure

Folders help to organize related scripts and queries into groups, so, first of all, it's necessary to create a folder structure for the new project. The root folder will contain three folders: 'Security', 'Database objects', 'Data'. Folders for every database object type that is created in the project will be available in the 'Database objects' folder. To create such folder structure, perform the following steps.

1. Right-click the project node in the Project Explorer and choose Add Folder from the shortcut menu.
- or -
Select the project node in the Project Explorer and choose Add Folder from the Project menu.
2. Enter the new folder name ('Security').
3. Repeat steps 1 - 3 for creating 'Database objects' and 'Data' folders.
4. Right-click the Database objects folder node in the Project Explorer.
5. Select Add Folder from the shortcut menu.
6. Enter the new folder name ('Tables').
7. Repeat steps 4 - 6 for creating Views and Triggers folders.

Now you have a folder structure for our project. Note that project folders are not real Windows folders, information about these folders is stored in a project file. When you create or delete folders, corresponding Windows folders are not created or deleted.

Adding Scripts to the Project

Now it's necessary to create required SQL script files and add them to the project. You'll learn how to add existing files to the project first. Existing files can be added to a project in two ways. Perform the following actions to create files and add them to the project:

1. Click the [image] New SQL button on the Standard toolbar.
2. Type or paste following code into the SQL document:

CREATE TABLE dept (
DeptNo INT(11) NOT NULL default 0,
Dname VARCHAR(14)NOT NULL,
loc VARCHAR(13),
SALSUM FLOAT,
PRIMARY KEY (DeptNo)
)

3. Click the [image] Save button on the Standard toolbar.
4. Choose file location and enter file name (for example, 'Table Dept') in the Save As dialog that appeared.
5. Save the file.
6. Right-click on the 'Tables' folder in the Project Explorer and choose Add Existing File from the shortcut menu
- or -
Click on the 'Tables' folder in the Project Explorer and choose Add Existing File from the Project menu.
7. Choose the created file in the Open dialog.

Now the file is added to the project. Another way to add an existing file to a project is to open it. Then on the File menu, select Move <file name> into, and then click Project <project name>. Perform the following actions to do it:

1. Click the [image] New SQL button on the Standard toolbar.
2. Type or paste following code into the SQL document:

CREATE TABLE emp (
EmpNo INT(11) NOT NULL default 0,
EName VARCHAR(10),
Job VARCHAR(9),
MGR INT(11),
HireDate DATETIME,
Sal FLOAT,
Commission FLOAT,
DeptNo INT(11),
PRIMARY KEY (EmpNo),
UNIQUE INDEX index1 USING BTREE (EmpNo)
)

3. Click the [image] Save button on the Standard toolbar.
4. Choose file location and enter file name (for example, 'Table Emp') in the Save As dialog that appeared.
5. Save the file.
6. From the File menu, select Move Table emp.sql into Project , and then click New Project1.
7. Drag the file shortcut node in the Project Explorer to the 'Tables' folder node.

You can add not only existing files to the project, but also create new files, that will belong to the project, too. You can use file templates when adding a new file to the project. Perform the following actions to create an SQL file for creating the view STAFF.

1. Right-click the 'Views' folder node in the Project Explorer and select Add New File from the shortcut menu
- or -
Click the 'Views' folder node in the Project Explorer and select Add New File from the Project menu.
2. Select the View item in the Templates box and click Add.
3. Replace the view name 'Test.VIEW1' with 'staff' in the SQL document that appeared.
4. Type or paste the following query text after the AS keyword.

SELECT
emp.ename AS name,
emp.job,
emp.sal AS salary,
dept.dname AS department
FROM emp, dept
WHERE emp.deptno = dept.deptno

5. Save the document with the name 'View Staff'.

To complete the project, you should add some more scripts to it. Create and add the following scripts to the project in the same way as the previous ones:

· 'Emp data' to the 'Data' folder

INSERT INTO emp VALUES (7369, 'SMITH', 'CLERK', 7902, '1980-12-17', 800, 0, 20);
INSERT INTO emp VALUES (7499, 'ALLEN', 'SALESMAN', 7698, '1981-02-20', 1600, 300, 30);
INSERT INTO emp VALUES (7521, 'WARD', 'SALESMAN', 7698, '1981-02-22', 1250, 500, 30);
INSERT INTO emp VALUES (7566, 'JONES', 'MANAGER', 7839, '1981-04-15', 2975, 0, 20);
INSERT INTO emp VALUES (7654, 'MARTIN', 'SALESMAN', 7698, '1981-09-28', 1250, 1400, 30);
INSERT INTO emp VALUES (7698, 'BLAKE', 'MANAGER', 7839, '1981-05-01', 2850, 0, 30);
INSERT INTO emp VALUES (7782, 'CLARK', 'MANAGER', 7839, '1981-06-09', 2450, 0, 10);
INSERT INTO emp VALUES (7788, 'SCOTT', 'ANALYST', 7566, '1987-08-19', 3000, 0, 20);
INSERT INTO emp VALUES (7839, 'KING', 'PRESIDENT', NULL, '1981-11-17', 5000, 0, 10);
INSERT INTO emp VALUES (7844, 'TURNER', 'SALESMAN', 7698, '1981-09-08', 1500, 0, 30);
INSERT INTO emp VALUES (7876, 'ADAMS', 'CLERK', 7788, '1987-07-13', 1100, 0, 20);
INSERT INTO emp VALUES (7900, 'JAMES', 'CLERK', 7698, '1981-12-03', 950, 0, 30);
INSERT INTO emp VALUES (7902, 'FORD', 'ANALYST', 7566, '1981-12-03', 3000, 0, 20);
INSERT INTO emp VALUES (7934, 'MILLER', 'CLERK', 7782, '1982-01-23', 1300, 0, 10);

· 'Dept data' to the 'Data' folder

INSERT INTO dept(deptno, dname, loc) VALUES (10, 'ACCOUNTING', 'NEW YORK');
INSERT INTO dept(deptno, dname, loc) VALUES (20, 'RESEARCH', 'DALLAS');
INSERT INTO dept(deptno, dname, loc) VALUES (30, 'SALES', 'CHICAGO');

· 'Trigger SalsumIns' to the 'Triggers' folder

CREATE TRIGGER SalsumIns
AFTER INSERT
ON emp FOR EACH ROW
UPDATE DEPT
SET SALSUM = (
SELECT SUM(EMP.SAL)
FROM EMP
WHERE EMP.DEPTNO = DEPT.DEPTNO)

· 'Trigger SalsumUpd' to the 'Triggers' folder

CREATE TRIGGER SalsumUpd
AFTER UPDATE
ON emp FOR EACH ROW
UPDATE DEPT
SET SALSUM = (
SELECT SUM(EMP.SAL)
FROM EMP
WHERE EMP.DEPTNO = DEPT.DEPTNO)

· 'Trigger SalsumDel' to the 'Triggers' folder

CREATE TRIGGER SalsumDel
AFTER DELETE
ON emp FOR EACH ROW
UPDATE DEPT
SET SALSUM = (
SELECT SUM(EMP.SAL)
FROM EMP
WHERE EMP.DEPTNO = DEPT.DEPTNO)

· 'User Jones' to the 'Security' folder

CREATE USER `Jones`@`localhost`;
GRANT SELECT ON * TO `Jones`@`localhost`;
GRANT INSERT, UPDATE(Sal) ON emp TO `Jones`@`localhost`;

After you added these scripts to project, save the project and all unsaved files for future use. To do it, perform the following actions:

1. Right-click the project node in the Project Explorer and choose Save NewProject1 from the shortcut menu.
- or -
Select the project node in the Project Explorer and select Save NewProject1 or Save NewProject1 As from the File menu.
2. Type the project name 'Demobase project' and choose project location.
3. Click OK to save the project.

Working with Project

Setting Project Options

Let's set our project options for building and deploying project. To set project options, right-click the project in the Project Explorer and select Properties from the shortcut menu or select Demobase project Properties from the Project menu.

On the Build tab you can customize build results. In this walkthrough you don't need to change anything on this tab. Click Database to set the Target Database Options and perform the following actions.

1. Set Target database name to 'demobase'.
2. Specify your MySQL Server version.
3. Click Always re-create database.

Then switch to the Build order tab. When building project, project scripts will be processed and placed to result script according to build order. Build order should be the following: at first you should create tables, then triggers, then tables should be filled with data, after that user and view should be created.

So, the build order must be the following.

· Table Dept.sql
· Table Emp.sql
· Trigger SalsumIns.sql
· Trigger SalsumDel.sql
· Trigger SalsumUpd.sql
· Dept data.sql
· Emp data.sql
· User Jones.sql
· View Staff.sql

Use Move Up and Move Down buttons or drag-n-drop to change build order.

Creating Project Configuration

Suppose you should deploy the project on MySQL 5.0.13 or higher, and in some cases on older version of MySQL, such as 4.0 or 4.1. Let's use project configurations to build project in two different variants of result script. Default configuration will be used for MySQL 5 and OldServer configuration will be used for MySQL 4.

To create a configuration perform the following steps.

1. Select Configuration Manager from the Configuration drop-down list on the Project toolbar.
2. Click the Add button.
3. Enter the configuration name ('OldServer').
4. Select Default in the Copy settings from drop-down list.
5. Click OK to add the configuration.
6. Click OK to close the Configuration Manager.

Now you can set options for new project configuration. In the Project properties document (not on the Project toolbar) select OldServer from the Configuration drop-down list. Specify Server version on the Database tab and clear check boxes for view script and trigger scripts on the Build order tab.

Building and Deploying Project

Now our project is ready to build it. To start the build, click the Build [image] button. The project will be built to result script which will be located by default in the default subfolder of the project folder.

When deploying the project, the build result script will be executed using the project connection. If the project does not have a connection, it can not be deployed. So, you should assign a connection to the project. It must be a connection to account of a user that have administrative rights, because deploying this project creates a database. So, create such a connection or use the existing one. To assign a connection to a project perform one of the following.

· Right-click on the project in Project Explorer and select Assign connection from the shortcut menu, then select required connection from the list and click OK.
· Right-click on the connection in Database Explorer and select Assign to project from the shortcut menu.
· Drag the connection from the Database Explorer to the Project Explorer.

After performing this you can deploy project. To deploy the project select Deploy from the Project menu and click Yes in the appeared dialog. You will see deployment log in the General tab of the Output window. After deployment is finished, you can access demobase database and its objects.

After deploying project you can add database object shortcuts to it. To add a database object shortcut drag the database object from the project connection in the Database Explorer to the Project Explorer or select Add to Project Demobase from the shortcut menu of the object node in the Database Explorer. Database object shortcuts can be used for fast opening of object editors by double-clicking the shortcuts. You can also easily find the object in Database Explorer by right-clicking its shortcut in Project Explorer and selecting Find in Database Explorer from the shortcut menu.

See Also

Developing Database Projects

Comparing Schema and Project


Comparing Schema and Project

The following walkthrough describes how to edit project and how to synchronize a schema and a project. A project from the walkthrough will be used there.

Prerequisites

You should have the following privileges:

· CREATE privilege on the demobase database
· DROP privilege on the demobase database
· ALTER privilege on the demobase database
· SELECT global privilege

To complete this walkthrough, you must have completed the walkthrough.

Updating project

In the previous walkthrough the project 'Demobase' was created and deployed. Now you will add stored procedures to it. For this:

1. Right-click the 'Database objects' folder node in the Project Explorer.
2. Select Add Folder from the shortcut menu.
3. Enter the new folder name ('Procedures').
4. Click [image] on the Standard toolbar.
5. Type or paste the following code into the SQL document:

CREATE PROCEDURE demobase.addemp(IN EmpName CHAR(20), IN Salary INT)
BEGIN
DECLARE e_No INT;
DECLARE e_Name CHAR (20) DEFAULT 'Unnamed';
DECLARE e_Sal INT DEFAULT 1100;
IF EmpName IS NOT NULL THEN
SET e_Name = EmpName;
END IF;
IF Salary IS NOT NULL THEN
SET e_Sal = Salary;
END IF;
SELECT
MAX(empno)
INTO
e_No
FROM
demobase.emp;
INSERT INTO demobase.emp (empno, ename, sal, hiredate)
VALUES
(e_no + 10, e_name, e_sal, CURDATE());
END

1. Click the [image] Save button on the Standard toolbar.
2. Choose file location and enter file name (for example, 'Procedure Addemp') in the appeared Save As dialog.
3. Save the file.
4. Right-click on the 'Procedures' folder in the Project Explorer and choose Add Existing File from the shortcut menu
- or -
Click on the 'Procedures' folder in the Project Explorer and choose Add Existing File from the Project menu.
5. Choose the created file in the Open dialog.
6. Repeat steps 1-7 for the RaiseSalary procedure

CREATE PROCEDURE demobase.RaiseSalary(IN department VARCHAR(14), IN rate FLOAT)
COMMENT 'Raise salary of all employee working in this department'
BEGIN
DECLARE d_No INT DEFAULT 0;
SELECT DeptNo INTO d_No FROM Dept WHERE Dname=Department;
UPDATE Emp SET Sal=Sal*Rate WHERE DeptNo=d_No;
END

Now suppose you don't need to store sum of the employee salary for the departments. Delete salsum column in the dept table and all triggers, updating it.

1. Expand the 'Tables' folder in the Project Explorer and double-click the 'Table Dept.sql' file.
2. Delete the 'salsum FLOAT,' line and save the document.
3. Click on the 'Triggers' folder and press the DELETE key.
4. Click Yes in the appeared dialog.

Comparing the project and the schema

Now you'll compare your project with the schema. Perform the following steps to create new schema comparison document.

1. Select New Schema Comparison from the Comparison menu.
Click Project in source or in target, then choose the project in the field below.
2. Select connection for the compared schema. You can edit the selected connections or create a new one by clicking Edit Connection or New Connection buttons.
3. Select the compared database demobase.
4. Click the OK button.

The schema comparison document will open. You can see comparison status of all schema and project options here. Table emp has Equal status. It has the synchronization operation Skip and will not be affected when synchronizing schema and project. Table dept has Different status. Click on it to see differences in the DDL. It has the Update synchronization operation and will be updated during synchronization.

View staff also has Different status. That's because view select statement is stored in unformatted and single-line form. Views in project and in database will always have Different status, unless you use the same unformatted view form in the project. You don't need to synchronize view now, click on its operation and choose Skip from the drop-down list.

Procedures have Only in Source status. They exist only in project and will be created during synchronization. Triggers exist only in target and will be dropped during synchronization.

Click the [image] View Schema Update Script button on the Comparison toolbar to preview update script. To synchronize project, return back to the schema comparison document and click the [image] Synchronize button on the Comparison toolbar. Select what you want to do with the synchronization script in the displayed Schema synchronization wizard. Click the Synchronize button to close the wizard and complete the synchronization. Review the synchronization script (if you selected to view it in the editor) and then execute it by clicking the Execute button on the toolbar or selecting SQL -> Execute in the top menu.

See Also

Developing Database Projects

Sample Project


Sample Project

dbForge Studio for MySQL is installed with the Sakila sample project. This project is based on the Sakila MySQL sample database. The project can be found in the "My Documents\dbForge Studio for MySQL\Projects\" folder.

To open the Sakila project, in the top menu select File->Open Project and open the Sakila.mydev file. The Project Explorer window opens where you can see and work with the project objects.

You can find the description of the schema structure in http://dev.mysql.com/doc/sakila/en/index.html. Note that this project requires MySQL 5.0.13 or higher to deploy all the features.

See Also

Developing Database Projects

Advanced Topics


Advanced Topics in Developing Projects

This topic contains more detailed information on working with database projects.

In This Section

Database Project Overview
This topic describes useful opportunities, provided with projects feature.

Project Connection
This topic provides information about project connection.

Manipulating Database Object Shortcuts
This topic describes how to add or remove database object shortcuts from the project.

Project Build Overview
This topic describes project build process.

Synchronization of Project and Schema
This section describes comparison and synchronization of schema and project.


Database Project Overview

dbForge Studio for MySQL comes with an extensive project management system that allows you to create database projects and integrate related database development files.

dbForge Studio database projects greatly facilitate database development and allow offline database development. Database project can be created from the scratch or imported from an existing database.

Database development is clear and logical within a database project. It allows you to do the following:

1. Create a database project guided by the wizard, either empty or with database objects imported from a required database.
2. Manage SQL scripts and query files in the project and edit their contents.
3. Build ready project to create a script that will deploy all project changes to the database on the server.
4. Deploy either the entire project or only required changes to the server.

Project building allows you to create a single ready-to deploy script for deploying your database to the server. Building project includes the following:

· Checking SQL syntax of all files from the project.
· Checking references.
· Applying project options to the scripts if necessary.
· Combining project scripts to a single script or generating run script that executes project scripts in a certain order.

For more information about project building see How To: Build and Deploy Project.

Checking SQL syntax and checking references ensure that your project is valid without using the server connection.

Project allows you to manage such items as SQL and query files and database objects easily. It allows you to group scripts and queries into folders and provides fast access to selected database objects.

You can also work with schema objects, generated by the project scripts. These objects are displayed in the Schema View window. You can delete such object. For more information see How To: Work with Database Objects in Projects section.

When you work with project and exit dbForge Studio for MySQL, it remembers all opened documents, even files and database objects that do not belong to the project, and opens them next time when you open this project. Project remembers also all document bookmarks, breakpoints and watches that can help you to restore previous debug session. Note that when you close the project, all opened documents are closed too.

Project folder and file structure, connection and database object links, build order is stored in file with extension. Temporary information about opened documents, bookmarks, breakpoints, watches is stored in the file, having the same name and extension 'user'.

Benefits of database projects

It is recommended to use database projects as they fully meet modern database development standards. Projects allow using version control system for database team development, which is critical for efficient development.

As much work in database development accounts for working with SQL scripts, database projects offer a great number of features for quick and convenient SQL editing. You will appreciate automatic syntax check in SQL scripts, check of schema objects references in all statements, check of any object duplicates, etc.

Settings and syntax differences in various versions of servers can put obstacles in the phase of deploying the ready tested database to the server. Projects can have multiple configurations, they allow you to customize the database project for deploying to various versions of server. You should select the required connection and settings in a project configuration once, and next time just use the required configuration.

See Also

Advanced Topics

Project Connection


Project Connection

A connection can be associated with the project to perform project deployment through it. You can not deploy a project without connection. You can also add shortcuts to database objects from the project connection to project.

Associating a Connection with Project

To associate connection with the project, do the following:

1. Right-click on the project in Project Explorer and select Assign connection from the shortcut menu.
2. Select the required connection from the list and click OK.
-or-
Right-click on the connection in Database Explorer and select Assign to project from the shortcut menu.
-or-
Drag the connection from Database Explorer to the Project Explorer.

Deleting an Associated Connection

To delete associated connection shortcut from project, right-click on it in Project Explorer and select Delete from the shortcut menu or select connection shortcut in Project Explorer and press the Delete key.

Project connection is specific to project configuration. If you select another project configuration, the connection and database object shortcuts in Project Explorer will be loaded from the configuration data. For more information, read Project Build Configurations.

Note

When you delete connection shortcut from project, all database object shortcuts of this project will be also deleted.

See Also

Database Project Overview

Manipulating Database Object Shortcuts


Manipulating Database Object Shortcuts

dbForge Studio allows to add database object shortcuts to project for simplifying access to some database objects.

To add database object shortcut from the associated connection, you can either:

· drag them from the Database Explorer to the Project Explorer
· select Add to Project <project name> from the shortcut menu of the object node in the Database Explorer

If the project has no associated connection, database object connection will be assigned to project. Shortcut of database object can be added to the project only if this database object is from the connection, associated with the project.

Object editor can be opened by double-clicking the shortcut. You can also easily find the object in the Database Explorer by right-clicking its shortcut in Project Explorer and selecting Find in Database Explorer from the shortcut menu.

To delete a shortcut from project, right-click it in the Project Explorer and select Delete from the shortcut menu or select the shortcut in Project Explorer and press DELETE.

See Also

Advanced Topics

Project Build Overview


Project Build Overview

Building project is a complicated processing of project scripts which results in one ready-to-deploy result script or in several scripts with batch file.

At first, project script syntax is checked. If project scripts have syntax errors, the build is stopped.

If the declaration cannot be found, an error or warning is raised. Warning is raised in the following cases:

· Database object from schema, other than project schema, is referenced, and this object cannot be found in the schema.
· Unresolved reference is in the DROP statement.
· User is referenced.

In all other cases an error is raised and build is stopped. You may enforce build to ignore errors by selecting the Ignore errors check box in the Build options.

After this, project scripts are processed according to build order. You may forbid applying Depending on build options, either single result SQL script is formed or batch script, calling SQL scripts is generated.

Note

Project build will delete all SQL files having the same names as project files in the build output directory without user confirmation. dbForge Studio asks for confirmation before deleting any other SQL file. Non-SQL files in the build output directory are not affected by build. Build output path can be set in the Build options.

See Also

Advanced Topics

Synchronization of Project and Schema


Project and Schema Synchronization

This section describes comparison and synchronization of schema and project.

In This Section

Project and Schema Synchronization Overview
Contains basic information about comparison and synchronization of schema and project.

Comparing Schema and Project Peculiarities
Describes differences between comparison of schemas and comparison of schema and project.

Applying Project Options When Synchronizing a Project and a Schema
Contains information on applying project options when synchronizing schema and project.

See Also

Developing Database Projects

Project and Schema Synchronization Overview


Project and Schema Synchronization Overview

With synchronization of schema and project you can perform incremental project deployment. That means, if you change your project after deploying it, you don't need to redeploy the entire database or edit and apply the changes manually. You may compare schema and project and then synchronize schema with the project. Only necessary schema changes will be performed. You may preview these changes in the synchronization script. To quickly compare project with its schema in database, click the Synchronize <project> With Server button on the Project toolbar.

You also can synchronize a project with a schema. If you made changes to a database, and want to have them in project, you don't need to re-import the whole project from a database, use the schema synchronization for it.

Project can be the source or the target in comparison (but not both of them at the same time). To compare schema with a project, you should open this project first. And when opening the comparison document with schema and project comparison, the project should be opened. Project is built automatically when comparing with a schema, so if the project contains errors and cannot be built, it cannot be compared with a schema.

Note

When comparing project and schema, project build results are used for DDL comparison. If the file is not selected in the Build order, the objects from this file will not appear in the comparison. If you set MySQL version, that does not support some database objects from the project, in the Database options, unsupported objects will not appear in comparison, even if they are supported in the compared database.

See Also

Synchronization of Project and Schema

Comparing Schema and Project Peculiarities


Comparing Schema and Project Peculiarities

Comparing a schema and a project differs from comparing two schemas. This topic describes these differences.

When determining comparison status of tables, not just CREATE TABLE statements in project scripts are taken into account, but ALTER TABLE statements which add constraints and indexes are also considered. If project scripts contain such statements, they will be displayed when comparing objects' DDL.

Synchronization script for the project target will be the same as if a schema was the target. But if the target is a project, synchronization process is not the synchronization script execution. Synchronization performs the following:

· If the object action is Drop, all CREATE, ALTER, and DROP statements for this object are removed from the project scripts. If some script files become empty, they may be deleted.
· If the object action is Create, a new script file with object DDL is created and added to the project.
· If the object action is Update, its CREATE statement is replaced with a new one.

When comparing two schemas, server version and some default server parameters (e.g. default table engine) are taken from the schema connections. For projects, they are taken from the project options.

See Also

Synchronization of Project and Schema

Applying Project Options When Synchronizing a Project and a Schema


Applying Project Options When Synchronizing a Project and a Schema

When comparing two schemas, all database object parameters can be retrieved from the server. But some parameters in project DDL scripts may be skipped, for example, table engine for tables, collation, definer for stored routines and views. When comparing project and schema, values for these skipped parameters are taken from the project properties. Default table engine and collation (with its charset) are automatically placed to the object DDL when comparing. If default definer is specified and it is not the CURRENT_USER, it is also placed to the object DDL automatically.

See Also

Synchronization of Project and Schema


Writing Data Reports

This section contains detailed description of data reports implementation in dbForge Studio for MySQL. When studying this section, you will learn how to perform the simplest and the most difficult tasks with data reports.

In This Section

How To: Create a Static Report
The topic explains how to create an unbound data report.

How To: Create a Simple Data-Aware Report
The topic explains how to create a data-aware data report.

How To: Create a Master-Detail Report
The topic explains how to create a master-detail data report.

How To: Save and Load Reports
The topic explains how to save created data reports and load existing ones.

How To: Export Data Reports to Various Formats
The topic explains how to export data from your reports to one of the supported formats.

Working with Command Line
This section contains information on creating reports using command line.

Advanced Topics
This section contains more detailed information on data report kinds and tools used for creating them.


How To: Create a Static Report

This topic will guide you through the process of creating a simple report with dbForge Studio. You will learn how to create an empty report, add static text to the report, and preview it.

1. Open dbForge Studio.
2. On the File menu, point to New, then select Blank Data Report. In the document area designer for the newly created report will be shown:

Note

Actual document look may slightly vary from the above image depending on the product you use.
3. To proceed with report creation, open the Toolbox window by clicking the [image] icon on the Data Report toolbar.
Toolbox
4. In the Toolbox window, select the Label control and drop it onto the report's Detail Band.
5. Double-click the created label to invoke its in-place editor, which allows you to input text. For example, type the classic "Hello, World!" statement. Then use the Data Report toolbar to adjust the label's color and font options:

Note

Actual document look may slightly vary from the above image depending on the product you use.
6. Now switch to the Preview tab.

Note

Actual document look may slightly vary from the above image depending on the product you use.

The steps above demonstrate the basics of building and previewing reports.

Proceed to the How To: Create a Simple Data-Aware Report topic to learn how to bind a report to data.

See Also

Writing Data Reports

How To: Create a Simple Data-Aware Report


How To: Create a Simple Data-Aware Report

This topic will guide you through the process of creating a simple data-aware report with dbForge Studio for MySQL. You will learn how to bind a report to data, edit report bands, use the Data Source window to add report controls to the report and bind them to data, and also how to number pages in the report.

Note that it is recommended that you review the How To: Create a Static Report topic first. It will help you learn how to create a simple report with dbForge Studio.

1. In this example, a report will be bound to data from the address data table of the Sakila database. To add the table to the report, simply drag it from Database Explorer to the Data Source window.

Now your report is bound to data. The next steps show how to customize the report's layout, and to specify which data fields should be used to provide data for report controls.
2. Click the top-left corner of the report designer to invoke the report's smart tag. Choose the Edit and Reorder Bands... option in this list to edit the collection of report bands. For example, select the PageHeader band and remove it (it's unnecessary for this report) but add the ReportHeader band:

Report Smart Tag

Note that you can also use the Report Editor dialog to change any other report band settings (e.g. the height of the PageFooter band).
3. Drop a Label control from the Toolbox window onto the Report Header band (as you did in the How To: Create a Static Report topic) and set its Text to Customers' Address List.
4. Create two labels and set their Text properties to "Phone:" and "Address:" correspondingly.
5. Create two labels bound to the address and phone data fields. To do this, simply drag the necessary data field items from the Data Source tree and drop them onto the report's Detail band.
6. To add page numbers to the bottom of each page in the report, drag the PageInfo item from Toolbox, and then drop it onto the PageFooter band. To change the format of page numbers shown in the report, invoke the control's smart tag by clicking top-right corner of the control. For instance, set this property's value to "Current of Total" Page Numbers.
7. Now you have a data-aware report. Its structure is shown on the right side of the report document. Note that bound controls are marked with yellow database icons:

Document Outline
8. To use this report for creating a master-detail report by our tutorial, save this report by clicking Save Report1.rdb on the File menu.
9. Now switch to the Preview tab at the bottom of the document area:

Preview

In this topic, you've created a simple report which is bound to data. You can now proceed to the How To: Create a Master-Detail Report topic to learn how to use Detail Report bands to create master-detail relationship reports.

See Also

Writing Data Reports

How To: Create a Master-Detail Report


How To: Create a Master-Detail Report

This topic will guide you through the process of creating a master-detail report with dbForge Studio for MySQL.

Note that it is recommended that you review the How To: Create a Simple Data-Aware Report topic first. It will help you learn how to bind report to data with dbForge Studio.

1. Open the report definition created in the How To: Create a Simple Data-Aware Report topic by clicking Open file on the File menu.
2. To create a master-detail report, it's required to add the customer table to the report. This table will be the detail table. To add the table, drag it from Database Explorer to the Data Source window.
3. Make the master table active by right-clicking on the table name in the Data Source window and selecting Set Active Item on the shortcut menu:
Set Active

Note, that in the Data Source tree the fk_customer_address node should be available. If it is not, refresh data in the Data Source tree by clicking the Refresh Data Refresh Data button on the Data Source toolbar.
4. Right-click on your report in the document area to invoke its shortcut menu. In this menu, point to Insert Detail Report and click fk_customer_address option to add a new detail report. Detail Report band will appear:

Insert Detail Report
5. Right-click the detail report to invoke its shortcut menu, point to Insert Band and click Group Header. This will add the GroupHeaderBand to the detail report:

Insert GroupHeader Band

You can add the Label control to the added GroupHeader band and change text in it to "Customer details:".
6. Add the first_name, last_name, and email field from the fk_customer_address node of the Data Source tree to the Detail Report band of the report. Near each label with the bound field add labels with the text changed to "Customer first name:", "Customer last name:", "E-mail:". Also you can drag the active field by dragging it with right mouse button. When you drop the field on the document area, shortcut menu will appear. Select the CheckBox control in this menu. Change the CheckBox text to "Active".

Also drag the label with the "Phone" text in it and the one bound to the phone data field to the Detail band of the detail report to show the phone number as detailed information on customer.
7. Now switch to the Preview tab at the bottom of the Document area:

Master-detail Report Preview

In this topic you've created a master-detail report.

See Also

Writing Data Reports

How To: Save and Load Reports


How To: Save and Load Reports

Using dbForge Studio for MySQL, you can save a data report definition (its bands, controls and other settings) to an .rdb file, and later re-create a report instance from this file. This topic will describe how to save and load reports in dbForge Studio for MySQL.

Saving Data Reports

To save a report, click Save [Document Name].rdb on the File menu or press CTRL+S.

Also you can choose the Save [Document Name].rdb As... option or right-click the needed document tab in the document area and choose Save [Document Name].rdb.

These actions will invoke the Save File As dialog window.

Loading Data Reports

To load an existing report definition from an .rdb file, click Open File on the File main menu or press CTRL+O. Each of these actions will invoke the Open File dialog window. You may choose Reports (*.rdb) in the Files of type field to show only files with report definitions.

Connection Manager Window

If dbForge Studio can not find a connection by the connection string that is available when loading a report (for example, you try to load report samples, but MySQL server is not installed on your computer), then a message with the following options will be shown:

1. Create New - create a new connection using the available connection string.
2. Choose Existing - choose one of the existing connections.

If you choose this option, the Connection Manager window will be shown. In the Connections: field available connections are displayed, and the Connection string area below shows the connection string for the selected connection.

The image below shows the Connection Manager window:
Connection Manager

Note

Actual document look may slightly vary from the above image, depending on the product you use.
3. Cancel - click the button to cancel loading of the document.

See Also

Writing Data Reports

How to: Export Data Reports to Various Formats


How To: Export Data Reports to Various Formats

This topic explains how to export available data report to one of the supported formats.

After you created a data report, you can export it to PDF, HTML, MHT, RTF, XLS, XLSX, CSV, text file or image file. To do this, you should:

1. Click the [image] Preview button below the report. The report preview will be shown.
2. Click the down arrow on the [image] Export Document button on the document toolbar and choose the format you want to export your report to.
3. Define the needed settings in the window that appears (the settings vary depending on the format).
4. Save the file.

See Also

Writing Data Reports

Advanced Topics


Working with Command Line

This section explains how to work with data reports using command line interface. It provides comprehensive examples of the frequently used tasks that can be performed with data reports through command line.

Note

The command line functionality is available only in certain editions of dbForge Studio. For the detailed information on features availability in the dbForge Studio editions, please refer to the Editions topic.

In This Section

How To: Create a Report through Command Line
The topic explains how to create and work with data reports using command line interface, and holds a step-by-step instruction on saving a report to disk in the HTML format, sending it by email and FTP

Additional /datareport Arguments
The topic gives detailed description of command line switches and examples of their usage.

Exit Codes used in Command Line for /datareport
The topic describes exit codes for the /datareport switch.

See Also

Writing Data Reports

Advanced Topics


How To: Create a Report through Command Line

You can automate report creation process using command line. Such possibility can be very useful if you need to create a report using the same report file. For this, you will need to create a report template to use it afterwards in the command line. Note that some parameters can be specified directly in the command line. In this case values of these parameters specified in your template file will be overridden.

The walkthrough described further in this topic will show you how to use command line in order to automate the following data report routines: saving a report on disk in the HTML format, sending it by email and FTP.

Creating a Report Template

To create a report template, you should perform the following actions:

1. Click Design New Report on the Data Analysis tab of the product Start page. Data Report Wizard opens.
2. Follow the wizard pages to create a report template file with .rdb extension.
3. Compose the report template.
4. Save the file for future usage.

Prerequisites

To complete the following walkthrough, you need to have an already created report file with *.rdb extension. Refer to the corresponding tutorials to create and master-detail report files that can be used in command line as input files.

In this walkthrough Report1.rdb file, created in the How To: Create a Simple Data-Aware Report will be used.

Working with Data Reports

Suppose you need to send a data report containing customers' address and phone number list in HTML format to your authorities via e-mail and FTP every day. For this, you have a report template Report1.rdb (the file is located in C:\dbForge Studio\Reports\), the folder on disk to which the report should be saved is C:\dbForge Studio for MySQL\Reports\Output\, the e-mail address of your authorities is my_chief@company.com, the address of your FTP server is ftp://myftphost.net/reports/, login is send-report, and password is report.

To accomplish such task through command line, you need to perform the following steps:

1. Open Command Prompt by pressing Win+R and type cmd in the Open line.

Note

To run Command Line in Windows 8:

From the Desktop Mode

· Move the mouse cursor to the exact lower left corner until the desktop shortcuts menu appears
· Right-click to see the shortcut menu and than click Run

From the Charms Bar

· Move your mouse to the upper right corner until the Charms Bar appears
· Select Apps from the list and type “run” in the search box
· Click Run from the search results

Use Windows + R Shortcut Keys

· In the desktop mode, press Windows key + R to show the Run command line.
2. Change the path available in your Command Prompt window to the path where the dbforgemysql.com file is located (by default it's C:\Program Files\Devart\dbForge Studio for MySQL\). For this, use the cd operator:

C:\Users\User>cd C:\Program Files\Devart\dbForge Studio for MySQL\

Press Enter. You can see that the path has changed:

C:\Program Files\Devart\dbForge Studio for MySQL>

3. Now call the dbforgemysql.com file:

C:\Program Files\Devart\dbForge Studio for MySQL> dbforgemysql.com

4. Specify the /datareport operation switch:

C:\Program Files\Devart\dbForge Studio for MySQL> dbforgemysql.com /datareport

5. Specify the path to your Report1.rdb input file and the name of the file itself:

C:\Program Files\Devart\dbForge Studio for MySQL> dbforgemysql.com /datareport /reportfile:"C:\dbForge Studio for MySQL\Reports\Report1.rdb"

6. Specify the format you want to save your report in. In this case it's HTML:

C:\Program Files\Devart\dbForge Studio for MySQL> dbforgemysql.com /datareport /reportfile:"C:\dbForge Studio for MySQL\Reports\Report1.rdb" /format:HTML

7. (Optional) To include parameters declared in a query script to command line, you can use the /parameters operation. For example, the following query script:

SELECT
first_name,
last_name,
email
FROM customer
WHERE store_id = :store_id and active = :active

will look as follows:

C:\Program Files\Devart\dbForge Studio for MySQL> dbforgemysql.com /datareport /reportfile:"D:\Projects\Report1.rdb" /parameters store_id:2 active:0

8. To start working with the result file, type the /result operation.
· To save your report in the specified folder on disk, type the path to this folder:

C:\Program Files\Devart\dbForge Studio for MySQL> dbforgemysql.com /datareport /reportfile:"C:\dbForge Studio for MySQL\Reports\Report1.rdb" /format:HTML /result folder:"C:\dbForge Studio\Reports\Output\"

· To send your report by email, add the email address:

C:\Program Files\Devart\dbForge Studio for MySQL> dbforgemysql.com /datareport /reportfile:"C:\dbForge Studio for MySQL\Reports\Report1.rdb" /format:HTML /result email:"address@hostname.net"

· To send your report to multiple emails, add the email addresses as follows:

C:\Program Files\Devart\dbForge Studio for MySQL> dbforgemysql.com /datareport /reportfile:"C:\dbForge Studio for MySQL\Reports\DataReport1.rdb" /format:HTML /result email:"address1@hostname.net, address2@hostname.net"

· To send your report by FTP, specify the host, login, and password:

C:\Program Files\Devart\dbForge Studio for MySQL> dbforgemysql.com /datareport /reportfile:"C:\dbForge Studio for MySQL\Reports\Report1.rdb" /format:HTML /result folder:"ftp://myftphost.net/reports/ " ftplogin:send-report ftppassword:report

Note

If your report is in HTML format and consists of several files or folders, it is not possible to send such report by email or FTP using command line interface.

Note

You can perform two actions at a time with the result: save it on disk and send by e-mail, or send it by FTP and e-mail.

Note

If you need to create the same report and perform the same action with the result frequently, you can save the needed command line in a *.bat file and run it each time you need to create a report. In this case you will not have to type all necessary operators manually in Command Prompt any more.

Note

To see quick help on the arguments available in the command line, you can type /datareport /?

See Also

Working with Command Line

Additional /datareport Arguments


Additional /datareport Arguments

This topic gives detailed description of command line switches and examples of their usage.

Arguments

To get more information on switches related to data reports in the command line interface, you can type:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datareport /?

Below all switches of this option are described, together with usage examples.

Argument

Action and Usage

/connection

This switch is used to specify a connection string with additional parameters. Command usage is as follows:

/connection:<connection_string>

Example of using the /connection argument:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datareport /connection:"User Id=scott;Server=ORCL"

/format

This switch is used to specify report format. Note that the HTML report won't be sent by FTP or email if result contains several files or folders. Command usage is as follows:

/format:<PDF|HTML|MHT|RTF|TEXT|CSV|EXCEL|EXCEL2007|BMP|EMF|GIF|JPEG|PNG|TIFF|WMF>

Example of using the /format argument:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datareport /format:"PDF"

/parameters

The switch is used to specify values for parameters declared in a query script. Command usage is as follows:

<param_name1>:<param_value1>
<param_name2>:<param_value2>

Example of using the /parameters argument:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datareport /parameters param1:value1 param2:value2

/password

Use this switch if you want to specify a server password. This argument overrides the password specified in the connection string. Command usage is as follows:

/password:<pw>

Example of using the /password argument:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datareport /password:"tiger"

/reportfile

Use this switch to specify the input report file. Command usage is as follows:

/reportfile:<file name>

The following example shows how to specify the input report file:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datareport /reportfile:"sample_report.rdb"

/result

Use this switch to specify what should be done with the result: save the report to disk, or send it by email or FTP.

You can specify SMTP settings on the corresponding options page.

Command usage is as follows:

/result folder:<file path> | email:<email address> | ftplogin:<login> ftppassword:<password>

Usage examples:

1. Report is saved to the specified folder on disk in the CSV format:

/datareport /reportfile:"D:\workDir\dept.rdb" /format:CSV /result folder:"D:/output/"

2. Report is sent by email:

/datareport /reportfile:"D:\workDir\dept.rdb" /format:CSV /result email:"address@hostname.net"

3. Report is sent by FTP:

/datareport /reportfile:"D:\workDir\dept.rdb" /format:CSV /result folder:"ftp://hostname.net/output/" ftplogin:user_name ftppassword:user_password

4. Report is sent by email and FTP:

/datareport /reportfile:"D:\workDir\dept.rdb" /format

/resultfilename

The switch is used to specify a report name. Command usage is as follows:

/resultfilename:<document name>

Example of using the /resultfilename argument:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datareport /reportfile:"sample_report.rdb" /resultfilename:report1

See Also

Working with Command Line

Exit Codes used in Command Line for /datareport


Exit Codes used in Command Line for /datareport

If report creation is run through the command-line interface, the following exit codes are returned depending on the execution result:

Error Code | Description | Additional Information
0 | Success | The operation been completed with no errors.
10 | Command line usage error | The command line was used incorrectly. For example, an incorrect flag, or incorrect syntax may have been used.
11 | Illegal argument duplication | Some arguments must not appear more that once.
20 | Trial expired | The trial period has expired, or dbForge Studio has not been activated.
30 | Project file corrupted | Project file corrupted.
40 | Server connection fail | Server connection failed.
105 | Resource unavailable | A file is missing.
107 | Failed to create report | The report has not been created.

See Also

Working with Command Line

Advanced Topics


Advanced Topics

This section describes the fundamental concepts of working with reports in dbForge Studio for MySQL.

In This Section

Data Reports Overview
This topic describes what is data report and which types of data reports exist.

Report Building Basics
This topic describes basic concepts of the report building process.

Designer Elements
This topic describes the list of tool windows and tools that can be used when creating a report.

Measure Units
This topic describes the measure units used in dbForge Studio.

Report Bands
This topic gives the definition of report bands and describes the bands types available in dbForge Studio.

Report Controls
This topic gives the definition of report controls and describes their types available in dbForge Studio.

Smart Tags
This topic describes smart tags and how to use them when working with reports.

Context Links
This topics describes context links and how to use them when working with data reports.

Sample Reports
This topic gives description of sample reports available in dbForge Studio for MySQL.

See Also

Writing Data Reports


Data Reports Overview

dbForge Studio for MySQL offers the possibility of creating reports implemented in the well-known and user-friendly interface. With dbForge Studio, the routine of report creating is simplified to several clicks - that means you won't have to spend a lot of time and efforts for report producing any more.

What is Data Report?

Data report is a formatted representation of data that can be displayed on a screen, printed or saved to a file. Reports allow getting the needed data from a database and representing it in a human-readable form, and also providing a lot of capabilities for data generalization and analyzing.

When printing tables and query results data is presented in nearly the same form as it is stored. So, it is often necessary to present it in the form of a report that has traditional appearance and is easy to read. Such reports include all information from a table or returned by a query, but also contain headers, are repaginated etc.

Data Report Creation in dbForge Studio for MySQL

Of course, reports are used in bookkeeping. In fact, one can not imagine bookkeeping without reports. So, accountants usually need a report generator to automate the process of report creation and avoid any mistakes.

dbForge Studio provides easy-to-use and fast solution for this goal which includes fully-functional report designer, Data Report Wizard for creating different types of reports, and a lot of report examples.

Below is a list of the main features for report creation in dbForge Studio:

Binding Report to Data - it is possible to create a data source, fill it with data and supply it to a report.

Custom Query - you can upload an existing query or create a new one to use it in a report.

Relations Editor - a comprehensive relations editor allows you to create, change, and remove relations between tables and/or views, and queries.

Parametrized Queries - support for parametrized queries with the possibility to edit parameters in Parameter Editor. This editor allows you to add and remove parameters and edit their properties.

Easy Data Source List Population - data source list can be populated in many ways. To add a data source you can drag'n'drop tables or views from the Database Explorer, use the dialog window for adding tables and/or views, or create a custom query.

Mail Merge - it is possible to insert a data field name in brackets right into controls' text, and these fields will be populated from the specified data source when a document is created.

Data Filtering - data can be filtered at several levels data adapter, data set or data view levels.

Data Grouping - report bands serve for implementing grouping, making the process easier and faster.

Set of Controls - a wide range of available controls allows to display various kinds of information in a report.

Chart Control - a special control for adding charts to your report.

Enhanced RichText Control - it's possible to load data from *.txt and *.rtf files.

Large Number of Band Types - 10 different band types to display controls on any part of any page.

Master-Detail Reports - master-detail reports can be created quickly and easily by editing relations between data tables.

Data Source - drag fields from the Data Source window and drop them onto the designer area to create controls which will be automatically bound to an appropriate field. Drop necessary fields onto already created controls to bind them to the fields.

Document Outline - shows the report structure and is used to navigate within a report.

Data Report Toolbar - a toolbar with a set of buttons to operate text options and to call report designer windows, also contains a button to call Data Report Wizard.

Toolbox - the window holding controls available in dbForge Studio data reports.

Event Support - allows to create event handlers at the Report, Band and even Control levels.

Advanced Styles - styles provide the possibility to control the look of your report. Styles can be applied conditionally to reflect certain states. dbForge Studio provides a convenient Style Editor.

Summary Support - to create a summary for textbox or table cell set only two properties - Summary position and Summary type.

In-Place Editing - possibility to change the text properties of controls (label, RichText,TableCell) using in-place editing. To use in-place editing, just double-click the needed control.

Wide Range of Exporting Formats - possibility to export report documents to different formats like PDF, HTML, MHT, RTF, TXT, CSV, and MS Excel. Also a report can be exported to an image file types, like BMP, EMF, GIF, JPEG, PNG, TIFF, WMF.

Save and Load Report Definitions - possibility to save and load report definitions.

Scripting - possibility to use C#, Visual Basic .NET and JScript .NET scripts in reports.

Watermarks - a report can contain a collection of watermarks for all or specified report pages.

Search in Preview - the possibility to call a search dialog in the preview mode to search a report for specific text.

Bookmarks - support for bookmarks makes your report easier to navigate. This structure can also be exported along with the report to PDF, HTML and MHT file formats.

Report Wizard - easy to use, convenient, yet powerful wizard to reduce the time you spend on customizing report.

Measurement - support for imperial (inches) and metric (centimeters) units of measurement. Use the ReportUnit property to set the measuring system for your report.

See Also

Advanced Topics

Report Building Basics


Report Building Basics

This topic describes the main concepts of reports construction in dbForge Studio. It explains the basics of report creation, describe the structure of a simple report. To learn more on the report elements, see the Report Bands and Report Controls topics.

The following diagram illustrates the report's life cycle in dbForge Studio:

Every report in dbForge Studio consists of bands, and every band contains report controls inside it. Reports can be either bound to data, or unbound. Unbound reports may contain text, images etc. provided manually without using any data source.

Bound to data reports are used to present required information in an easy to read form, so this is the most important feature of all report generators. To create a data bound report, bind the report to a data source and then specify data binding options for report controls.

A report can be created using Data Report Wizard or Blank Data Report option. It is possible to save the created report to an RDB file (for more information refer to the Saving and Loading Reports topic). If a report uses stylesheets, they can be saved to an REPSS file. Also you can load styles from a created earlier REPSS file.

After a report was created you can preview, save, and print it.

See Also

Advanced Topics

Designer Elements


Designer Elements

This topic gives a brief overview of the main report designer elements.

The following image shows how typical Report Designer and its elements look like:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

The table below gives a brief description of each element marked on the image:

ID | Name | Description
1 | Document Outline Window | Provides quick and easy navigation through the report elements.
2 | Data Report Toolbar | Contains buttons to change font properties of the selected control, buttons to access the Toolbox, Data Source, and Group and Sort windows, and also provides capability to zoom in or out the Report Designer surface.
3 | Toolbox Window | Contains controls available in dbForge Studio for MySQL data reports.
4 | Smart Tag | With smart tags, report controls and bands are enabled to display context-sensitive information and commands.
5 | Band Strips | A strip with band name, band icon, and the Expand/Collapse button displayed on the top of every report band. Strips are not taken in account when generating a report document.
6 | In-Place Editor | To invoke this editor, double-click any text-aware control in Designer. To adjust font and color options use Data Report Toolbar (1).
7 | Shortcut Menu | Right-click any element when designing a report to invoke shortcut menu. It provides access to the most popular options depending on the context.
8 | Data Source Window | Displays the schema of the data source currently bound to a report.
9 | Group and Sort Window | Serves for applying grouping and sorting to a report.

See Also

Advanced Topics

Measure Units


Measure Units

This topic describes the measure units supported by dbForge Studio, and how to change the currently used system of measurement for a particular report.

Supported Measure Units

All sizes and locations of report controls, bands, and the report itself are measured in the same units of measurement within a report. This unit of measurement is specified by a report's ReportUnit property, and can be set to one of the following types:

· Hundredths of an Inch.

Used when the ReportUnit property is set to ReportUnit.HundredthsOfAnInch.

· Tenth of a Millimeter.

Used when the ReportUnit property is set to ReportUnit.TenthsOfAMillimeter.

The table below lists all properties that are measured in units, specified by the report's ReportUnit property.

Property | Description
Control.Height | Represents the control height.
Control.Width | Represents the control width.
Control.X | Represents the X coordinate of the control.
Control.Y | Represents the Y coordinate of the control.
Band.Height | Represents the band height.
Line.LineWidth | Represents the line width.
Shape.LineWidth | Represents the width of the line used to create a shape image.
BarCode.Module | Represents the width of the narrowest bar or space in the current BarCode instance.
CrossBandControl.StartPoint | Represents the X and Y coordinates of the starting point where the cross-band control starts drawing.
CrossBandControl.EndPoint | Represents the X and Y coordinates of the end point where the cross-band control ends drawing.
Report.PageHeight | Represents the height of the report pages.
Report.PageWidth | Represents the width of the report pages.
Report.Margins | Represents the margins of the report pages.
Report.Padding | Represents the padding of the report pages.
MultiColumn.ColumnWidth | Represents the widths of the columns when printing multi-column reports.
MultiColumn.ColumnSpacing | Represents the space between the columns when multi-column reports are printed.

Changing Current Measure Unit

By default the ReportUnit property of a new report is set to Hundredths of an Inch. The current unit of measurement may be easily changed in the Properties window by locating the ReportUnit property and changing it to Tenth of a Millimeter. Also you can change the value of the ReportUnit property in the report's smart tag (to invoke report's smart tag click in the top left corner of the report designer).

How to change the current measure unit using the Properties window is shown on the image below:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

See Also

Advanced Topics

Report Bands


Report Bands

Every report created in dbForge Studio for MySQL is a banded report. This means that every report consists of a number of bands, each one of which has a different type. Every band may contain report controls.

This topic describes the band types available in dbForge Studio, what they can be used for, and how to add, edit, and delete bands in a particular report. To learn more about basic principles of report creation, see the Report Building Basics topic.

What is Report Band?

Report band represents a specific area on a report page used to define the way report controls that belong to it should be rendered. Every band has a set of specific properties that define its behavior.

In the report designer report bands are represented by the parts of the design surface divided with band strips.

Band Types

When you create a new report, it is divided into three basic bands, as shown in the image below. PageHeader, Detail, and PageFooter bands provide space for placing different report controls on them:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Each band type defines how the controls located on this band will be rendered, their rendering order, and how many times they will be rendered (in case of data-bound report). Note that in the report designer, on some bands may be provided tips with information on bands rendering. For example, on the PageHeader and PageFooter bands the "[one band per page]" tip is displayed.

In the process of creating and working on any report you can add or remove these or any other bands. The band types available in dbForge Studio are listed in the table below.

Band Name | Description
TopMargin | Located at the top of every page above the ReportHeader band or PageHeader band.
ReportHeader | Located at the beginning of a report. This band usually displays introductory information, e.g. a report cover page.
PageHeader | Located at the top of every page of a report, below the TopMargin and/or ReportHeader band. This band can display page numbers or a table header, continued from the previous page.
GroupHeader | Located at the beginning of every group or at the top of the group if it is split across pages. It specifies grouping criteria and is used to display information at the beginning of a group of records.
Detail | Located on a page between all other bands. This band displays a single record from the bound data source at a time, or simply holds unbound controls if there is no a data source assigned to a report.
DetailReport | Located below the Detail band. It holds the detail report when creating a master-detail report.
GroupFooter | Located at the end of every group or on the bottom of the group if it is split across pages. This band is usually used to display summary information for a group.
ReportFooter | Located at the end of a report. This band is usually used to display final information, e.g. report totals.
PageFooter | Located at the bottom of every page below the BottomMargin or ReportFooter band. This band is usually used to display page numbers or a table footer, which has been continued on the following page.
BottomMargin | Located at the bottom of every page below the page footer band.

The following image illustrates the relative positions of different band types, and how many times they are rendered in a report.

The Page Header, Page Footer, Top Margin, and Bottom Margin bands are rendered in the report preview on every page.

The Report Header and Report Footer bands are rendered in the report preview only once.

The Group Header and Group Footer bands are rendered for every group of records in a report.

The number of times the Detail band is rendered in a report depends on the number of records returned from the bound data source - one band per record.

Editing Bands

A collection of bands of every particular report can be accessed by the report's Bands property. The collection of bands and its items can be modified in different ways:

· In the Properties window, select a report, and click the ellipsis button for the Bands property. This will invoke the Report Editor dialog, in which a hierarchical tree of report bands is be displayed. In this window, you can add or remove bands, and also edit their properties.

The Report Editor dialog window is shown on the image below:

Note

Actual document look may slightly vary from the above image, depending on the product you use.
· Another way to invoke the Report Editor dialog is to choose the Edit and Reorder Bands... option in a report's smart tag, as shown on the image below. Note that this smart tag is shown in the top left corner of the report designer.

Note

Actual document look may slightly vary from the above image, depending on the product you use.
· If you want to simply add a new band of a particular type, you may use the report's shortcut menu. Right-click a report's area at design time, as shown in the image below, and select the Insert Band option in the shortcut menu:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

See Also

Advanced Topics

Report Controls


Report Controls

This topic describes report controls, which are used to display various information in a report. There is the list of controls available in dbForge Studio for MySQL and some basic recommendations on their usage.

What is a Report Control?

A Report Control represents a specific report element (like text, picture, check box, etc.) which can be inserted into a report. Report controls can reside either inside report bands, or inside other report controls which may serve as control containers (like panel).

The appearance and behavior of a report control is defined by its type. See the section below to learn more about different report control types available in the current version of dbForge Studio.

Control Types

The table below represents report controls available in dbForge Studio:

Report Control

Description

Label Label

A label control, which allows inserting single-line or multi-line text into a report. This text may be either static, or dynamically populated from a report's data source.

CheckBox Check Box

A check box control, which is intended to display a True/False or Checked/Unchecked/Indeterminate state in a report.

RichText Rich Text

A rich text control, which is intended to display, enter and manipulate formatted text. You can enter and format its text at design time, load it from an external file, or bind this control to a data field.

PictureBox Picture Box

A picture box control, which is intended to display an image in a report. Use this control to insert images of different types into your reports.

Panel Panel

A panel control, which can contain other report controls. It is used for grouping controls together to make their manipulation easier.

Table Table

A table control, which inserts a table (containing rows and cells) in a report.

Note: to create a table that is identical to some table from data source, simply drag the needed table from the Data Source window onto Designer. Each cell of the table will be bound to a field of the source table.

Line Line

A line control, which draws vertical, horizontal or diagonal lines in a report.

Shape

A shape control, which allows to insert any simple graphics into a report.

BarCode Bar Code

A barcode control, which allows to insert many different barcode types into a report.

ZipCode Zip Code

A zipcode control, which allows the insertion of numbers representing a zipcode into a report.

Chart Chart

A chart control is used to represent data in a graphical view.

Note: if the Chart control is bound to data, set the Data Source option in the report smart tag to (none) to display it correctly.

PivotGrid Pivot Grid

A pivot grid control (also called as pivot table) represents data from an underlying data source in a cross-tabulated form to create cross-tab reports.

Note: if the PivotGrid control is bound to data, set the Data Source option in the report smart tag to (none) to display it correctly.

Page Info Page Info

A control, which displays some auxiliary information in a report. Used to display page numbers, the current date or user information in your reports.

Page Break Page Break

A page break control, which serves to mark the place where a report should start a new page.

CrossbandLine Cross-band Line

A line control, which draws itself through the bands, from the CrossBandControl.StartPoint to the CrossBandControl.EndPoint.

CrossBandBox Cross-band Box

A box control, which draws itself through the bands, from the CrossBandControl.StartPoint to the CrossBandControl.EndPoint.

Editing Report Controls

Report controls can be added to a report in different ways. For example, you may use one of the methods listed below:

· Drag an appropriate item from the Toolbox window, and drop it onto a report.
· Another way of adding report controls to a report is to use the Data Source window. When any data field is dragged and dropped onto a report, a new appropriate report control is added and automatically bound to the specified data field.

See Also

Advanced Topics

Smart Tags


Smart Tags

This topic gives a brief description of smart tags available in dbForge Studio for MySQL and the basic principles of working with them.

With the smart tag feature, report controls and bands are enabled to display context-sensitive information and commands.

To invoke a smart tag, select any report element and click on its smart tag icon ( Smart Tag). After that the smart tag panel is invoked, allowing you to adjust the properties of the selected report element or of the whole report if the report smart tag (top left corner of the report in the Designer) was invoked.

The smart tag feature is available for the report elements listed below.

Report

A report's smart tag icon is located at the top left corner of a report designer:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Note

Keep in mind, that in order to display the Chart and Pivot Grid controls correctly, you should set the Data Source option of the report smart tag to (none).

Report Bands

A band's smart tag icon is located on the band strip right next to the caption. For instance, the smart tag for the Detail band is shown in the image below:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Here is the smart tag for the Group Header band:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

On the following image the smart tag for the Report Header band is shown:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Report Controls

A control's smart tag icon is located at the top right corner of the control. For instance, the smart tag for the label is shown in the image below:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Note

The smart tag feature is available for all report controls. To learn more about report controls, refer to the Report Controls topic.

See Also

Advanced Topics

Context Links


Context Links

This topic gives a description of context links and their usage in dbForge Studio for MySQL.

The context links (the so-called "verbs") in dbForge Studio are shown in a smart tag of the currently selected control. For instance, the Edit text context link appears as shown in the image below:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Context links allow performing multistep tasks more quickly and easily. For example, with the Load File... context link you can load data from external RTF or TXT file to the RichText control with just several clicks. There are other context links that allow you to perform different tasks in dbForge Studio.

· Context links for the RichText control:

Note

Actual document look may slightly vary from the above image, depending on the product you use.
· Context links for a report object:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Also context links are available in the Properties window:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

See Also

Advanced Topics

Writing Data Reports


Sample Reports

There are sample reports demonstrating main concepts of creating reports in dbForge Studio for MySQL. This topic gives a brief overview of each sample.

All samples are based on dbForge Studio sample database Sakila. To view the sample reports you need to open the sample project installed with dbForge Studio in the "My Documents\dbForge Studio for MySQL\Projects\" folder.

To open the Sakila project, in the top menu select File -> Open Project and open the Sakila.mydev file. The reports are situated in the Data Reports folder of the project tree displayed in the Project Explorer window. Double-click each sample icon to view the sample report.

Sample reports available in dbForge Studio:

Sample

Description

ActorFilmLabelReport

Shows how to create a label report. For a more convenient label report creation dbForge Studio provides Data Report Wizard, that provides a large amount of predefined label types and lets you edit some label properties when completing the steps of the wizard.

CrossTabCustomerPaymentReport

Shows how create a cross-tab report. Demonstrates the PivotGrid control usage, shows how to bind it to a report's or its own data source to display data in a matrix form.

The sample shows the amount of money each customer spent during every month of a year, total sum each customer spent during this year, and the company gain for every month and for the whole year.

CustomerMailMergeReport

Shows how to implement mail merge. For this embedded fields should be used. An embedded field is a name of a column placed in brackets ("[" and "]") in the text of a control. Such field is recognized by the report builder automatically and the appropriate data values are inserted in the report when previewing or exporting it.

Mail Merge allows to insert data of any kind (text, date, picture). Note that embedded fields can be used only with the Label, RichText, and CheckBox controls.

CustomerMasterDetailReport

Shows how to create a master-detail report. For this, the DetailReport band instances are used.

The sample creates a master-detail report that represents data from the Sakila database. It consists of two levels of information on customers presented depending on countries and cities they live in.

FilmTableReport

Shows how to create a simple tabular report. Demonstrates the usage of the Table control instead of numerous labels. The Table control allows to draw a table and maintain its cells, text style, borders etc. at once.

This sample creates a report with each film's details.

MultiColumnReport

Shows how to create a multi-column report. In this report, table cells are used to display customer information.

SakilaChartsReport

Shows how to use Chart controls in a report.

This sample contains comparison charts showing gains depending on the film category, store, etc.

SakilaFilmsCatalogReport

Shows such features of dbForge Studio as grouping, using different report bands, and some other minor features.

This sample contains a detailed film list grouped by categories.

StaticReport

Shows how to use report controls, edit text in controls, add images to reports.

This sample creates a simple static report.

See Also

Advanced Topics


Documenting MySQL Databases

This section contains detailed description of documenting databases in dbForge Studio for MySQL.

In This Section

Generating Database Document
This topic describes how to create a MySQL database documentation.

Documenting Databases through the Command Line
This topic describes how to create a MySQL database documentation through the command line interface.

Exit Codes used in Command Line for /document
This topic describes exit codes for the /document switch.


Generating Database Document

This topic describes how to configure and generate the database documentation file.

To Generate a Database Document:

1. Click New Documenter... on the Start Page or on the Tools menu.
2. The Select Connections dialog box opens. Select one or several existing connections or create a new connection or select an existing one from the list. Click Select. The Database Documenter project opens.

3. Optionally, select a style for the document in the Style drop-down list box. By default, the Default style is used.
4. In the Structure pane, select Cover Page to setup the cover page of the generated document.

5. In the Structure pane, select databases, object groups and database objects for documenting.
6. Optionally, configure documentation by including/excluding sections and properties of documented databases and database objects. dbForge Studio for MySQL allows you to configure elements of documentation on several levels, including:
· Servers level
· Server level
· Databases level
· Database level
· Objects group level
· Database Object level
· Users level

Tip

You can save the Documenter project file at any time and then re-use it.

For this, click Save on the Main toolbar. The Documenter project files have the .ddoc extension.

To load the saved file, click Open File on the Start page, or just click its name in Recent Projects.
7. Click Generate to start generating the document. The Generate Documentation dialog box opens.

8. Select a format and a directory for the document file.
9. Optionally, click Save Command Line to create an executable .bat file for automation of database documentation. For more information, refer to the Creating Command Line Execution File topic.
10. Click Generate.

See Also

Documenting MySQL Databases

Documenting Databases through the Command Line


Documenting Databases through the Command Line

You can automate document generation using the command line.

1. Click Start, type 'cmd' in the Search programs and files text box, and press ENTER. The Command Prompt opens.

2. Specify the operation you want to perform and the required parameters and arguments (actions you want to run) in the Command Prompt, for example as follows:

dbforgemysql.com /document [/switch1[:value | [parameter1:value parameter2:value ..]] /switch2 ..]

3. Press ENTER to run the process.

Select corresponding command line switches to perform the required operations:

Argument | Action and Usage
/author | This switch is used to override authorship information. The command line looks like: /author:<author>
/breadcrumbs | This switch is used to generate breadcrumbs. Available values are: Y and N. Y is the default value. The command line looks like: /breadcrumbs:<Y|N>
/connection | This switch is used to specify a connection string. The command line looks like: /connection:<"User Id=root;Host=db;Port=3320;Database=test;Character Set=utf8">
/copyright | This switch is used to specify copyright information.
/created | This switch is used to override generation date format. The default format is: MM/DD/YYYY.
/database | This switch is used to specify the database name. The command line looks like: /database:<DB1>
/docdescription | This switch is used to override the default document description on the cover page. The command line looks like: /docdescription:<description>
/doclogo | This switch is used to override the document logo. The command line looks like: /doclogo:<"d:\mydoc\proj.png">
/doctitle | This switch is used to override the document title on the cover page. The command line looks like: /doctitle:<title>
/documentformat | This switch is used to specify the documentation format. Available formats are PDF|HTML. By default, the document format is HTML. The command line looks like: /documentformat:<PDF|HTML>
/outputfile | This switch is used to specify the output path for generated documentation.
/password | This switch is used to specify server password. Overrides password specified in the connection string. The command line looks like: /password:<pw>
/permissions | This switch is used to include permissions data into documentation. Available values are: Y|N. The default value is Y. The command line looks like: /permissions:<Y|N>
/projfile | This switch is used to sspecify a project file. The command line looks like: /projfile:<"D:\mydoc.ddoc">

See Also

Exit Codes used in Command Line for /document

Documenting MySQL Databases


Exit Codes used in Command Line for /document

If document generation is run through the command-line interface, the following exit codes are returned depending on the execution result:

Error Code | Description | Additional Information
0 | Success | The operation been completed with no errors.
10 | Command line usage error | The command line was used incorrectly. For example, an incorrect flag, or incorrect syntax may have been used.
11 | Illegal argument duplication | Some arguments must not appear more that once.
20 | Trial expired | The trial period has expired, or dbForge Studio has not been activated.
30 | Project file corrupted | Project file corrupted.
40 | Server connection fail | Server connection failed.
105 | Resource unavailable | A file is missing.
108 | No objects | There are no objects for documenting.

See Also

Documenting MySQL Databases


Creating Command Line Execution File

dbForge Studio for MySQL includes the Command Line Settings wizard that allows you to create command line execution files. The option is useful for performing routine tasks: you can simply run the created .bat file instead of configuring all options and parameters every time.

To create a command line execution file:

1. Run the Command Line Execution File Settings dialog box:
· For Data Comparison: click Save Command Line in the Data Synchronization wizard.
· For Schema Comparison: click Save Command Line in the Schema Synchronization Wizard.
· For Data Export: click Create Command Line in the Data Export Wizard.
· For Data Import: click Create Command Line in the Data Import Wizard.
· For Large Script Execution: click Save Command Line in the Execute Script Wizard.
· For Data Reports: click Save Command Line in the Data Report Wizard.
· For Data Generation: click Save Command Line in the Data Population Wizard.

2. In the dialog box, configure the command line settings. The settings range varies, and depends on the feature.

3. Optionally, click Validate to check the validity of the command line syntax.
4. Click Save to save the command line execution file.

See Also

User Interface Concepts


User Interface Concepts

In This Section

Using Documentation
The topic explains how to use the current manual.

User Interface Elements
This topic provides you with basic information about managing your environment workspace.

Manipulating Documents
The topic describes how to manipulate documents in dbForge Studio.

Customizing Environment
This topic contains information on customizing environment to simplify your work and save time.


Using Documentation

The application documentation is available from the official Devart website in the following formats:

· Online
· Offline CHM file (you can download it on the Download section of the product)

There are several ways to navigate through documentation:

· F1 Search
· Search
· Contents

F1 Search

F1 provides context help for the active window, dialog box. It always returns no more than one page.

Search

Use Search to return all documents that match any specified term or a set of terms.

Contents

The table of contents shows all documentation topics in a hierarchical tree view structure and provides a convenient way to browse help. If you opened topic from index or search or from the link and you want to know where this topic is located, use the Locate button or switch to the Contents tab.

See Also

Customizing Environments

User Interface Elements


User Interface Elements

This topic provides you basic information about managing your environment workspace. Environment workspace consists of toolbars, tool windows, menus and document area. To personalize menus and toolbars and to adjust their behavior to your needs, point to Toolbars in the View menu, and click Customize.

Toolbars

A toolbar is a container for a group of commands or controls that are typically related in their function.

dbForge Studio supports dockable toolbars. A dockable toolbar can be attached, or docked, to any side of its parent window, or it can be detached, or floated, in its own mini-frame window. This article explains how to use dockable toolbars in your applications.

Note

If you drag a toolbar to the right or left side of the window, toolbar drop-down lists or combo boxes will not be available. For example, if you drag the Connection toolbar to the right or left side of the window, the Connection box will not be available.

Menus

The environment has a set of toolbars where reside buttons, using which you can accomplish most frequent tasks. The toolbar you can access depends on kind of document currently active. If it is not visible, right-click on toolbars area and choose one from the shortcut menu.

You can control which toolbars are allowed to appear, and which must be always visible. By default, when you switch between views or documents, corresponding toolbars appear and disappear. When a toolbar is visible, right-click on toolbar area and deselect its item in the shortcut menu to prevent it from showing even if corresponding view is active. If you want to make a toolbar always visible, select it in the shortcut menu, when corresponding document or view is not active. To return a toolbar to its default state select it in the shortcut menu when corresponding document or view is active. You can edit any toolbar, delete, or add your own in Customization dialog box. To open it choose Customize from a toolbar shortcut menu.

Tool Windows

dbForge Studio tool windows are, in general, read-only windows that are not file-based. In this they differ from document windows, which display files in read-write mode. The Toolbox, Database Explorer, and Properties window are examples of tool windows. Tool windows can be docked, floating, or tabbed in the document frame. The tool windows are used to display information. The default size and location apply only when the tool window is first opened; after that the tool window state is persisted.

Placing Tool Windows to the Document Area

To place a tool window to the document area, activate it and choose Tabbed Document from the Window menu, or right-click its title and choose Tabbed Document from the shortcut menu. To make it dockable again, activate it and choose Dockable from the Window menu, or right-click its title and choose Dockable from the shortcut menu.

Document Area

Document area typically displays SQL code or diagrams. Document area size can be manipulated by resizing docked tool windows. To free more space for documents, you can put docked tool windows to auto-hide mode by clicking the pushpin icon on the title bar of the window.

You can arrange documents in tab groups in document area. To create a tab group or move document to another tab group just drag a document to a drop point. Dragging a document to an arrow drop point will create new tab group; dragging it to the tab group central drop point will move the document to this tab group.

Multiple documents can be organized into horizontal or vertical tab groups for organizing a workspace for working with several documents at the same time. New document tab group can be created either by dragging document to the required place or by selecting New Horizontal Tab Group or New Vertical Tab Group from the document header shortcut menu.

Documents can be moved between tab groups by dragging-n-dropping or by selecting required command from the shortcut menu. You can expand a tab group to the whole document area and restore document tab groups' sizes by selecting Prominent from the document header shortcut menu.

Switching Between Windows

This section contains information about how to switch between documents and tool windows.

To cycle through open documents, use CTRL+TAB or CTRL+SHIFT+TAB key combinations. Press CTRL+TAB to switch to previously used document. Pressing CTRL+TAB again will return you to current document. Hit TAB key while holding CTRL key to cycle through recent documents stack. You can also use CTRL+SHIFT+TAB combination to browse documents in another direction.

To navigate from the current document tab to the next tab, use CTRL+ALT+PGDOWN key combination. To navigate from the current document tab to the previous tab, use CTRL+ALT+PGUP key combination.

You can also switch between documents in the following ways.

· By clicking document titles.
· By clicking the down arrow near the right upper corner of the document area and selecting document name from the appeared menu.
· By selecting document from the Window menu.
· By selecting document in the Windows dialog and clicking the Activate button.

To activate a tool window, use its shortcut key.

Switching to another skin

dbForge Studio for MySQL provides you several types of a skin. To switch to another skin, on the Tools menu, choose Skin, and then click the skin name you like.

The following skins are available in dbForge Studio for MySQL:

· Visual Studio 2013 Blue
· Visual Studio 2013 Light
· Visual Studio 2013 Dark
· Visual Studio 2010
· Metropolis
· Metropolis Dark
· Office 2010 Silver
· Office 2010 Blue
· Office 2010 Black
· Office 2013
· Office 2013 Dark Gray
· Office 2013 Light Gray
· Windows 7

See Also

Using Documentation

Working with Text Editor


Manipulating Documents

The topic describes how to manipulate documents in dbForge Studio.

Managing Documents

The Windows Dialog Box allows you to switch between documents and manage them. To open it, select Windows from the Window menu. This dialog allows you to save and close multiple documents at once, and activate required document.

To save document(s) select required document(s) and click the Save button.

To close document(s) select required document(s) and click the Close Window(s) button.

Note

To close an opened document, click the document title with middle mouse button (mouse wheel).

To activate required document, select the document and click the Activate button.

Navigating through the Document Views

Each SQL document includes different representations of the content - document views.

To switch to a specific view, click a button with the view name on the bottom pane of the document. Alternatively, select the required view from the shortcut menu of the document bottom pane.

You can also cycle through available views with the F7 key.

Working with Document Tab Groups

Multiple documents can be organized into horizontal or vertical tab groups for organizing a workspace for working with several documents at the same time. New document tab group can be created either by dragging document to the required place or by selecting New Horizontal Tab Group or New Vertical Tab Group from the document header shortcut menu.

Documents can be moved between tab groups by dragging-n-dropping or by selecting required command from the shortcut menu.

Restoring Tabs

Document tabs can be saved to cash and eventually be restored after the application crush or accidental closing. To customize the tab restore options, on the Tools menu, select Options. In the Options dialog box, expand Environment, then expand Documents and select Restore. Set the time after which the data will be saved automatically and select restartable file types.

Document tabs will be restored automatically at the run of the application.

Document Header Shortcut Menu

The document header shortcut menu includes the following options:

Save <Name>.sql
Saves a current SQL document.

Close
Closes a current document.

Close All But This
Closes all documents excepting the selected one.

Copy Full Path
Copies the full path for the document.

Open Containing Folder
Opens the folder containing the document.

Float
Detaches the window.

New Horizontal Tab Group
Creates new horizontal tab group.

New Vertical Tab Group
Creates new vertical tab group.

See Also

Customizing Window Layout

Customizing Environment


Working with Text Editor

The text editor is the word processor of the dbForge Studio. When the text editor is used to edit text, it is referred to as the text editor. When it is used to edit SQL source code, which is its more common use, it is referred to as the code editor. You can open multiple code editors to view or/and edit code. A list of all documents open for editing in instances of the code editor is available on the Windows menu.

To open the Text editor:

1. On the File menu, click New, and then click File. (Alternatively, on the Standard toolbar, click the New File button.)

2. The New File dialog box opens.

3. Select either the Text file or the XML file form the General Files section.

The only difference between XML and text editors is that XML editor provides syntax highlighting for XML code. You can customize XML highlighting and coloring in Fonts and Colors, Text Editor, Options Dialog Box.

User Interface

Code pane
The area where code or text is displayed for editing. It provides SQL statement completion.

Indicator margin
A gray column on the left side of the code editor where indicators for breakpoints and bookmarks are displayed. Clicking this area sets a breakpoint on the adjacent line of code.

Selection margin
A column between the indicator margin and the editing window where you can click to select lines of code.

Horizontal and vertical scroll bars
Lets you scroll the code pane horizontally and vertically so that you can view the code that extends beyond the viewable edges of the pane.
Text Editor Toolbar

The Text Editor toolbar contains tools related to the code completion features, commenting and uncommenting of code, bookmarks, etc.

Display an Object Member List
Displays a list of valid databases, tables, columns, and other database objects. When a member from the list is selected, you can insert that member into your code by pressing TAB, or by typing a space or period.

Display Parameter Info
This feature opens the Parameters list to give you information about the number, names, and types of parameters required by a function or attribute. The Parameters list also displays parameter information for nested functions. If you type a function as a parameter to another function, the Parameters list displays the parameters for the inner function. Then, when the inner function Parameters list is complete, the Parameters list reverts to displaying the outer function parameters.

To view Parameter Info for functions:

1. After the name of a function, type an open parenthesis as you normally would to open the Parameters list.
2. dbForge Studio displays the complete declaration for the function in a pop-up window just under the insertion point. The first parameter in the list appears in bold.
3. As you type the function parameters, the bold changes to reflect the next parameter that you need to enter.
4. Press ESC at any time to close the list, or continue typing until you have completed the function.
5. Typing the closing parenthesis also closes the Parameters list.

Display Quick Info
This option displays the complete declaration for any identifier in your code.

You can manually invoke Quick Info feature as follows:

1. On the Edit menu, click Code Completion, and then click Quick Info.
2. Use the keyboard shortcut CTRL+K, CTRL+I.
3. Select the Quick Info toolbar button from the Text Editor toolbar.

Display Word Completion
Complete word types the rest of a variable, command, or function name once you have entered enough characters to disambiguate the term. Type the first few letters of the name, and then press ALT+RIGHT ARROW or CTRL+SPACEBAR.

Refresh Local Cache
If you are writing a query on a database while someone else is making changes to the structure of that database, the suggestions offered by dbForge Studio may become out of date. For instance, if someone has added several tables to a database while you have been connected to that database, these tables will not appear in the suggestions box. To reload the database objects, click Refresh Suggestions. Refreshing suggestions applies only to the database to which you are currently connected.

Reset Suggestions Cache
If you connect to a number of different databases during the same session, dbForge Studio will load all the objects for each database as required, without unloading any of the previously stored objects. This means that you can go back to previous queries and continue to see suggestions for any database to which you have previously connected.
dbForge Studio loads database objects into its memory whenever you connect to a database, in order to display suggestions from that database. If you connect to several databases with a large number of objects, this may eventually result in running out of memory. To reset the memory at any time, click Reset Suggestion Cache.

Decrease Line Indent
Removes a tab (or the equivalent spaces) from the selected lines or the current line.

Increase Line Indent
Adds a tab (or the equivalent spaces) to the selected lines or the current line.

Comment out the selected lines
Adds comment characters to the selection or the current line.

Uncomment the selected lines
Removes comment characters from the selection or the current line.

Toggle a bookmark on the current line
Adds or removes a bookmark on the selected line of the document in the active Editor. Does not alter the line of code bookmarked.

Move the caret to the previous bookmark
Selects the previous bookmark. When the first bookmark is reached, jumps ahead to the last one.

Move the caret to the next bookmark
Selects the next bookmark. When the last bookmark is reached, jumps back to the first one.

Clear all bookmarks in current document
Removes all the bookmarks in the current document.

Format Document
Automatically formats SQL code in the currently opened document.

Selecting text and code

You can quickly select a single word, line of text, or multiple paragraphs while you work with code in the editor. Keyboard shortcuts also let you select text starting from the cursor to any other point in your document.

To select text:

· To select any amount of text, just drag the mouse over the text.
· To select a word, either double-click a word or put your cursor next to word and press CTRL+SHIFT+ either RIGHT ARROW or LEFT ARROW.
· To select a line of text, drag the mouse over a line.
· To select text from the cursor to the start or end of the line, press SHIFT+ either HOME or END.

Editing text and code

The Editor allows you to manipulate text in the same ways as most word processing applications or text editors. For example, you can:

· Copy and Paste text or code inside the editor and between several Editors or between the Editor and other text editing applications.
· Put the Code Editor into the overstrike mode using the INSERT key
· Use the DELETE and BACKSPACE keys to remove text or code

Navigating text and code

There are various ways to move through text or code in the Code Editor using the mouse and navigation keys:

· Use the arrow keys to move one character at a time, or the arrow keys in combination with the CTRL key to move one word at a time. Arrow keys move one line at a time also.
· Click a location with the mouse.
· Use the scroll bars or scroll wheel on the mouse to move through the code.
· Use the HOME, END, PAGEUP, and PAGEDOWN keys.
· Use CTRL+PAGE UP and CTRL+PAGE DOWN to move the insertion point to the top or bottom of the window, respectively.
· Use CTRL+UP ARROW and CTRL+DOWN ARROW to scroll the view without moving the insertion point.

Go to Line command

Use the Go to Line command to a specific line number:

1. In the General, Text Editor, Options Dialog Box, select the Line Numbers option.
2. With a document open in the Editor, select Go to Line from the Edit menu.
3. Enter the line number you want to move to.

Change Text Case in the Editor

You can use menu commands or keyboard shortcuts to convert the case of selected text to all upper case or to all lower case.

To switch text to upper case:

1. Select the text you want to convert.
2. On the Edit menu, select Advanced.
3. To convert text to all upper case, choose Make Uppercase, or press CTRL+SHIFT+U.

To convert text to all lower case, choose Make Lowercase, or press CTRL+U.

Setting Bookmarks

As the name suggests, bookmarking accelerate your code navigation in the text editor.

There may be some piece of code where you need to move to very frequently. Generally, you scroll the page and move to that section, but dbForge Studio provides great features by which you can move to a particular section very quickly using some shortcut keys. This is called Bookmarking of Code.

You can place a bookmark by clicking on the bookmark icon or use CTRL + B, CTRL + T.

To create or remove a bookmark using the Text Editor toolbar:

1. Open a file in the Editor.
2. Place the insertion point on the line you want to bookmark.
3. Click the Toggle a bookmark on the current line button on the Text toolbar.

To move to a bookmarked line:

1. Scroll to the bookmarked line.
2. On the Text toolbar, the Move the caret to the previous bookmark and Move the caret to the next bookmark buttons are enabled.
3. Click these buttons to navigate to bookmarks in files within the current solution or project.

View White Space and Word Wrap

You can turn View White Space and Word Wrap modes on or off by selecting corresponding commands from the Advanced submenu of the Edit menu.

View White Space mode displays spaces and tab characters.

Word Wrap automatically displays any portion of a line that extends horizontally beyond the viewable editor area on the next line.

Text Indenting

The Editor provides text indenting functionality. You can set the indent at some line, thus when you press ENTER, this indent is set at the next line. To change line indenting use Increase Line Indent and Decrease Line Indent options.

To increase or decrease indenting perform the following actions:

1. Select the text you want to indent.
2. On the Edit menu, select Advanced.
3. Select Increase Line Indent or Decrease Line Indent to manage the indentation.

Code Outlining

SQL Editor allows you to hide parts of code. Outlining marks are shown left of the code editor window. Code blocks which belong to the same structural item can be collapsed by using the minus (-) symbol. Outlined code is not deleted, it is merely hidden from view.

You can then expand the outlined statement or user-defined region by clicking the plus sign (+) next to the symbol.

Outlining SQL Statements

The statement is outlined in the following cases:

· it spans over two or more lines
· it is a create statement

Nested SQL statement (for example, SELECT in CREATE VIEW) is outlined only if it starts from the new line.

Statement is not outlined if it is very short and takes only one line of code. Stored code condition and cycle operators are not outlined; the same is about nested BEGIN ... END blocks.

User-defined Outlining Regions

You can outline code block using Regions.

To create the region, type #region command at the start line of the region. No symbols except spaces are allowed at the same line before #region command. Region may have the name, so simply specify it after space at the same line. Each region statement has to be closed by the #endregion command. Type #endregion at the beginning of the line determining the region end.

You can create named regions using the #region <region name> and #endregion <region name> commands.

SQL code block, grouped by the specified region can be collapsed/expanded by user. You can create nested regions to operate several SQL code blocks.

See Also

User Interface Elements

Find and Replace Text and Code


Customizing Window Layout

This section provides information about window layouts and their customization.

Closing and Displaying Tool Windows

When a tool window is closed, it becomes invisible but preserves its content, that will be available when the window is opened again. Most tool windows are listed in the View menu and can be opened by selecting corresponding View menu command. Other tool windows are listed in Database menu. You can also use shortcut keys to display certain tool windows.

All layout changes are saved when you close the application and restored when you open it again.

Auto-hide Mode

Tool window auto-hide mode allows you to minimize tool windows along the edges of the application window, freeing more space for the document area.

To turn on auto-hide mode, perform one of the following.

· Activate the window and select Auto Hide from the Window menu
· Right-click the window title and select Auto Hide from the shortcut menu
· Click on the pushpin icon on the title bar of the window

When tool window is in auto-hide mode, it shows when you point on it and hides when you click somewhere out of the window. You can turn auto-hide mode on for all docked tool windows to free all the workspace for document area. To do it, select AutoHide All from the Window menu.

Layout Saving and Restoring

All layout changes are saved when you close the application and restored when you open it again. To restore layout to its default state select Reset Window Layout from the Windows menu.

See Also

User Interface Concepts

Manipulating Documents


Customizing Environment

The environment provides many useful shortcut key combinations to speed up your work. Default shortcut settings are similar to shortcuts in Visual Studio. Default keyboard mapping schema can be changed to the one similar to Visual C++ 6.0 or to Delphi. There are some more keyboard mapping schemas. Moreover, you can assign your own shortcut keys to every action.

Shortcuts can be changed on the Keyboard, Environment, Options dialog box.

To access this dialog box:

1. In the Tools menu, click Options. The dialog box appears.
2. Expand the Environment section, and click Keyboard.

Choosing a keyboard mapping schema

You can select a keyboard mapping schema from the Apply the following additional keyboard mapping scheme drop-down list on the Keyboard page of the Environment section in the Options dialog box.

Determining and removing the shortcut key combination for a command

To determine or remove the shortcut key combination for a command perform the following actions.

1. On the Keyboard, Environment, Options dialog box, enter the command name without spaces or a part of it in the Show commands containing box.
2. In the list, select the correct command.
3. Shortcuts for selected command drop-down list now contains the assigned key combination for the command if any combinations exist. You can view them in the list.
4. If you want to remove the combination, select a command in the list, and click the Remove button.

Assigning custom shortcut key combination for a command

To assign a shortcut key combination for a command:

1. On the Keyboard, Environment, Options dialog box, enter the command name without spaces or a part of it, in the Show commands containing text box.
2. In the list, select the correct command.
3. On the Use new shortcut in drop-down list, select the feature area where you want to use the shortcut.
4. Place the cursor in the Press shortcut keys box, and press the key combination to set for the selected command. The combination will be displayed in the box.
5. Click Assign.

See Also

Customizing Environment

© 2004-2018 Devart


Import and Export Settings

This section contains information about how to import, export, or reset settings.

In This Section

Import and Export Settings Overview
Contains basic information on import and export of settings.

How To: Import, Export, or Reset Settings
Describes how to import, export, or reset settings.

See Also

Customizing Environment

Find and Replace Text and Code


Import and Export Settings Overview

Settings are customizations of the integrated development environment (IDE). They include windows' visibility and layouts, shortcut key combinations, code templates, code formatting etc. Using the convenient wizard, you can save, export, and then import settings. If required, you can reset all your current settings to default ones.

The ability to export and import settings gives you several benefits - you can:

· quickly copy your settings and use them on another computer
· have the same settings within your development team
· migrate the settings to further versions of dbForge Studio

See Also

Import and Export Settings

How To: Import, Export, or Reset Settings


How To: Import, Export, or Reset Settings

Using the convenient Import and Export Settings Wizard, you can select specific categories of settings in dbForge Studio and export or import them, or reset all your settings to default ones.

To open the wizard, in the Tools menu, click Import and Export Settings.

To export dbForge Studio settings:

1. Open the Import and Export Settings Wizard.
2. Select the Export selected environment settings option and click Next.
3. Expand the Devart Tools node and select the check boxes next to the settings you want to export. To export all settings, select All Settings check box. (Clear the settings which should not be exported.)
4. Enter the name of the file that will contain the exported settings. Click the Browse button to select the file location.
5. Click Finish and see the result message.
6. Click Close to close the wizard.

To import dbForge Studio settings:

1. Open the Import and Export Settings Wizard.
2. Select the Import selected environment settings option and click Next.
3. Select whether to create a backup of your current settings before importing the new ones or not:
· To save your current settings before importing the new ones, select Yes, save my current settings and enter the name of the file that will contain the exported settings. Click the Browse button to select the file location. Then click Next.
· To import the new settings without saving the current ones, select No, just import new settings... Then click Next.
4. Click the Browse button to select the file with the imported settings.
5. Select the check boxes next to the settings you want to import. To import all settings, select All Settings check box. (Clear the settings which should not be imported.)
6. Click Finish and see the result message.
7. Click Close to close the wizard.

To reset dbForge Studio settings to default ones:

1. Open the Import and Export Settings Wizard.
2. Select the Reset all settings option and click Next.
3. Select whether to create a backup of your current settings before replacing them with the default settings or not:
· To save your current settings before replacing them, select the Yes, save my current settings option and enter the name of the file that will contain the exported settings. Click the Browse button to select the file location. Then click Finish and see the result message.
· To restore the default settings without saving the current ones, select the No, just reset all settings... option. Then click Finish and see the result message.
4. Click Close to close the wizard.

See Also

Import and Export Settings

Find and replace text and code


Find and Replace Text and Code

This section describes how to use Find and Replace utility.

In This Section

Finding and Replacing Text
The topic explains how to finding and replacing text in a file.

Searching and Replacing Text in Files
The topic describes searching and replacing text in files techniques.

Using Incremental Search
The topic explains how to use incremental search to find required text in a file.

Regular Expressions for Find and Replace
The topic explains how to use regular expressions while searching.

Wildcards for Find and Replace
The topic explains how to use wildcards while searching.


Finding and Replacing Text

You can find and replace text using Find and Replace window. To open this window press CTRL+F or CTRL+H. These techniques allow you to control the scope of find and replace and choose the method of reviewing search matches and replacements.

You should consider the following information when you search and replace text:

· Options set in the Find and Replace window are global; certain options selected in one dialog box are selected for all the dialogs. These options are Match case, Match whole word, Search all open documents, Search hidden text, Search up, Wildcards, and Regular Expressions.
· Undo is available only for documents left open after a replace operation.
· Undo for a Replace All operation rolls back all replacement changes in the current document.

You can search one or more open files or windows and move through the search matches one by one using the Find and Replace window. This technique allows you to review each individual search match in the context of the text around the match.

To search current document, current project, or all open documents:

1. Open the items you wish to search.
2. Press CTRL+F and switch to Find mode if necessary.
3. In the Look in box, select 'Current Document', 'Current Project' or 'All Open Documents'.
4. In the Find what text box, enter the text you intend to search for.
5. Select additional search options to increase the accuracy of the search.
6. Click Find Next to start the search and continue choosing Find Next until the last file has been searched.

Note

You may search in the Output or Data Viewer windows in the same way. Just select Current Window on the step 3. In the Data Viewer window you may search both hex code and text. Hex code can be searched only when no wildcards or regular expressions are used.

When the search passes the beginning or end of the document, a message is displayed in the status bar. A message box appears when the search reaches the starting point of the search.

To replace in the current document or in all open documents:

1. Open the items you wish to search.
2. Press CTRL+H and switch to Replace mode if necessary.
3. In the Look in box, select 'Current Document', 'Current Project' or 'All Open Documents'.
4. In the Find what text box, enter the text you intend to search for.
5. In the Replace with text box, enter the text with which you intend to replace the search text.
6. Click Replace and continue clicking Replace until the last match in the last file has been replaced. Use Find Next to skip a match you do not want to replace.

You may click Replace All to replace all matches. A message box appears, listing the total number of replacements. The Replace All command replaces all search matches, including those you have skipped with the Find Next button. To reverse Replace All, choose Undo from the Edit menu in each changed file before closing any of the files.

See Also

Find and replace text and code

Searching and Replacing Text in Files


Searching and Replacing Text in Files

You can use the Find and Replace in Files window to perform search and replace operations. To open this window press CTRL+F or CTRL+H, then switch to Find in Files or Replace in Files mode.

Searching and replacing text in files has following peculiarities:

· You can enter disc folder as search location or even create and use named folder sets.
· You can only find all occurrences, you cannot use Find Next.

To create a named folder set:

1. In the Find and Replace in Files window, click the [image] button next to the Look In box.
2. Enter the folder set name.
3. Edit the folder list with [image] and [image] buttons. To browse folders
4. Click the Apply button. Now you may use this folder set in the Look In box.

To delete named folder set, click the [image] button next to the Look In box, enter the folder set name, and click Delete button.

To search in files:

1. Press CTRL+F and switch to Find in Files mode if necessary.
2. In the Look in box, select needed location or enter folder path or name of the named folder set.
3. In the Find what text box, enter the text you intend to search for.
4. Select additional search options to increase the accuracy of the search.
5. You may specify the file mask for searching in the Look at these file types box.
6. If needed, customize the Result options.
7. Click the Find All button.

After search is finished, all results are displayed in the Find Results window. You may double-click on matches to navigate to them.

To replace in files

1. Press CTRL+H and switch to Replace in Files mode if necessary.
2. In the Look in box, select needed location or enter folder path or name of the named folder set.
3. In the Find what text box, enter the text you intend to search for.
4. Select additional search options to increase the accuracy of the search.
5. If needed, customize the Result options. Select the Keep modified files open after Replace All check box if you want to be able to undo changes.
6. You may specify the file mask for replacing in the Look at these file types box.
7. In the Replace with text box, enter the text with which you intend to replace the search text.
8. Click Replace and continue clicking Replace until the last match in the last file has been replaced. Use Find Next to skip a match you do not want to replace.

You may click Replace All to replace all matches. A message box appears, listing the total number of replacements. The Replace All command replaces all search matches, including those you have skipped with the Find Next button. To reverse Replace All, choose Undo from the Edit menu in each changed file before closing any of the files.

See Also

Find and replace text and code

Using Incremental Search


Using Incremental Search

You can search an individual document or window incrementally by entering a search string character by character, then observing the matches found as the search string lengthens. To activate an incremental search, choose Advanced from the Edit menu and choose Incremental Search.

An incremental search automatically searches the entire document or all text within a window, with the exception of text that has been collapsed or concealed. The editor highlights the first set of characters found in the document or window that match the search string entered.

Incremental searches are performed by default from the current location in the document downward, and from left to right. To move to the next match, press CTRL+I. To reverse the direction of the search, press CTRL+SHIFT+I.

To search incrementally:

1. Place the cursor in a blank section of the file or window you want to search.
2. From the Edit menu, choose Advanced, and then select Incremental Search.
3. The cursor icon changes to binoculars with an arrow indicating the search direction, and the status bar displays the text Incremental Search.
4. Begin typing the search string.
5. The status bar displays the search string you are entering, and the editor highlights the first match found for what you have typed so far.
6. Continue to add characters to the search string.

The editor searches again for a match of the augmented search string, and again highlights the first match found.

If no match is found, the status bar displays the following message: Incremental Search: <text> not found.

See Also

Find and replace text and code

Regular Expressions for Find and Replace


Regular Expressions for Find and Replace

The Find and Replace window contains a list of symbols and signs which you can use to quickly find and replace required patterns of text. They are called regular expressions.

To select a regular expression, do the following:

1. In the Find and Replace window, select the Use check box and choose Regular Expressions from the drop-down list. The [image] arrow button next to the Find what field becomes active.
2. Click the [image] arrow button and select a regular expression from the drop-down list. It is inserted into the Find what field.

The drop-down list contains the following regular expressions:

Syntax | Expression | Description
. | Any single character | Matches any single character except a line break.
* | Zero or more | Matches zero or more occurrences of the preceding expression, finding all possible matches.
+ | One or more | Matches at least one occurrence of the preceding expression.
^ | Beginning of line | Anchors the match string to the beginning of a line.
$ | End of line | Anchors the match string to the end of a line.
< | Beginning of word | Matches only when a word begins at this point in the text.
> | End of word | Matches only when a word ends at this point in the text.
\n | Line break | Matches a platform-independent line break. In a Replace expression, inserts a line break.
[] | Any one character in the set | Matches any one of the characters within the []. To specify a range of characters, list the starting and ending character separated by a dash (-), as in [a-z].
[^] | Any one character not in the set | Matches any character not in the set of characters following the ^.
| | Or | Matches either the expression before or the one after the OR symbol (|). Mostly used within a group. For example, (database|management)system matches "database system" and "management system".
\ | Escape Special Character | Matches the character that follows the backslash (\) as a literal. This allows you to find the characters used in regular expression notation, such as { and ^. For example, \^ Searches for the ^ character.
{} | Tagged Expression | Matches text tagged with the enclosed expression.
:i | SQL identifier | Matches the expression ([a-zA-Z_$][a-zA-Z0-9_$]*).
:q | Quoted string | Matches the expression (("[^"]*")|('[^']*')).
:b | Space or Tab | Matches either space or tab characters.
:z | Integer | Matches the expression ([0-9]+).

See Also

Find and replace text and code

Wildcards for Find and Replace


Wildcards for Find and Replace

The Find and Replace window contains a list of expressions to replace characters or digits in the Find what field. They are called Wildcards.

To select a required wildcard, do the following:

1. In the Find and Replace window, select the Use check box and choose Wildcards from the drop-down list. The [image] arrow button next to the Find what field becomes active.
2. Click the [image] arrow button and select a wildcard from the drop-down list. It is inserted into the Find what field.

The drop-down list contains the following wildcards:

Syntax | Expression | Description
? | Any single character | Matches any single character.
# | Any single digit | Matches any single digit. For example, 5# matches numbers that include 5 followed by another number, such as 51, but not 15.
[!] | Characters not in set | Matches any one character that is not specified in the set.
\ | Escape | Matches the character that follows the backslash (\) as a literal. This allows you to find the characters used in wildcard notation, such as * and #.
* | One or more characters | Matches any one or more characters. For example, test* matches any text that includes "test", such as testfile.txt.
[] | Set of characters | Matches any one of the characters specified in the set.

See Also

Find and Replace Text and Code

User Interface Concepts


Reference

In This Section

Backup and Restore
This section describes Backup and Restore user interface elements.

Code Snippets
This section describes Code Snippets user interface elements.

Copy Databases
This section describes Copy Databases user interface elements.

Database Explorer
This section describes Database Explorer user interface elements.

Data Compare
This section describes user interface elements of the windows concerned with data comparison.

Database Administration Tools
This section describes user interface elements of the Database Administration tools.

Database Connection
This section describes Data Connection user interface elements.

Database Designer
This section contains information on Database Designer user interface elements.

Database Projects
This section describes windows of the New Database Project wizard.

Data Editor
This sections provides information on data managing windows and dialogs.

Data Export Wizard
This section describes Data Export wizard.

Data Import Wizard
This section describes Data Import wizard.

Data Report
Describes Data Report Wizard usage.

Code Debugger
This section describes the wizards, windows, and other UI elements related to debug processes.

Execute Script Wizard
This section describes wizard for executing large scripts without opening them in editor.

Documenter
This section contains information on the Database Documenter user interface elements.

Find and Replace Window
The topic describes the Find and Replace window that allows you to search for text, expressions, or entity names within the code of your documents.

Import and Export Settings Wizard
The topic explains how to export, import, or restore dbForge Studio settings.

Master-Detail Browser
This section contains detailed information on all windows and dialog boxes related to Master-Detail Browser.

Object Editors
This section contains reference information on user interface. Visit following topics for detailed information.

Options
The topics in this section describe dialog boxes and wizards that are used in dbForge Studio for MySQL to perform commands and to configure pages and controls.

Query Profiling
This section gives description of Query Profiling interface elements.

Refactoring Windows
This section contains information on user interface elements used when performing refactoring.

Pivot Table
This section contains detailed information on all the windows and dialog boxes related to PivotGrid functionality.

Query Builder
This section contains information about main components of the query document - the diagram and the tabbed editor.

Object and Data Search
This section describes Search Database Objects user interface elements.

Security Manager
This section describes the Security Manager user interface elements.

Shortcut Keys
Describes available shortcut keys.

SQL Document
This section describes SQL Document user interface elements.

SQL Formatter Wizard
This section describes SQL Formatter Wizard user interface elements.

Schema Compare
This section describes all the wizards, documents, windows and other UI elements related to schema comparison and synchronization processes.

Command Line Execution File Settings Dialog Box
This section describes user interface elements of the Command Line Execution File Settings dialog box.

Service Windows
This section describes user interface elements of service windows and dialogs.


Backup and Restore

This section describes Backup and Restore user interface elements.

In This Section

Database Backup Wizard
Describes Database Backup Wizard fields and options.

Database Restore Wizard
Describes Database Restore Wizard fields and options.


Database Backup Wizard

Use Database Backup Wizard to backup your databases or single tables. You can access Database Backup Wizard by selecting Backup Database from the Database menu or by right-clicking on database in Database Explorer and choosing Backup Database from the Backup and Restore sub-menu of the shortcut menu.

In This Section

General, Database Backup Wizard
Choose a connection and a database to backup and a name for the output file on this page.

Backup Content, Database Backup Wizard
Choose information to backup on this page.

Options, Database Backup Wizard
Select database objects to back up their structure on this page.

Errors Handling, Database Backup Wizard
You can specify errors processing behavior and logging options on this page.

Progress, Database Backup Wizard
You can see database backup progress on this page.

Finish, Database Backup Wizard
You can see results of backup operation on this page.

See Also

Backup and Restore

Database Restore Wizard


General, Database Backup Wizard

Choose general backup options on this page.

Load a previously saved backup project:
Use these options to load an existing backup.

Open
Calls the Open dialog. Use this button to open an existing backup project.

Click this button to choose one of the previously opened backup projects.

If you load an existing project its name is displayed in a field near these buttons.

Connection
Choose a connection from the drop-down list.

Database
Choose a database from the drop-down list.

Path
Defines the path where output file will be saved. Click the [image] button to select another folder to store backup.

Output file name
Enter output file name here. The default name is the name of the database.

Append timestamp to the file name
Select it to include a timestamp to the name of the generated file. For example, if the file with the structure of sakila database is ready for generation on the 1st of November, 2009 at 12:30 a.m, the file name with the timestamp will be the following - sakila 20091101 1230.sql.

Auto delete old files
If the Append timestamp to the file name option is checked, you can choose to delete old output files automatically when generating new files.

Files older than
Set the number of days the files should be older to be deleted.
Quantity more than
Backups are auto deleted if their quantity is more than the number specified.

Use compression (ZIP)
Check this option to compress a database script to a ZIP file.

Note

If the size of the SQL file you want to compress is more than 4GB, the ZIP64 format will be used for compression. Otherwise the old format will be used.

Level
Select the level of compression here. You can select one of the following levels of compression: No Compression, Best Speed, Fast, Default, Good, Maximum.
Comment
Add a comment to the created archive.

See Also

Database Backup Wizard

Backup Content, Database Backup Wizard


Backup Content, Database Backup Wizard

Choose database objects to backup on this page.

Structure
Backup only objects' structure into DDL statements.

Data
Backup only tables' data into INSERT statements.

Include all objects
Check this to backup all database objects. If this option is not checked, select the objects you want to backup in the tree below.

See Also

Database Backup Wizard

Options, Database Backup Wizard


Options, Database Backup Wizard

Set database backup options on this page.

The Options wizard page contains the following details:

Find
Enter the first character of the option's name to show only the options that contain this part in their names.

Options Affecting Database

Options that affect database in the backup process.

Flush logs
Closes and reopens all log files before backup.

Lock all tables for read (Flush Read Locks)
All tables are locked with FLUSH READ LOCKS. This option is necessary for creating a consistent snapshot of MyISAM tables.

Use a single transaction
The backup will be executed in a single transaction. This option is necessary for creating a consistent snapshot of InnoDB tables.

General Script Options

General options that control backup script generation.

Format the script
Check this option to apply formatting to the script. Otherwise, source objects script will be formatted as in database, and the rest of objects will have default formatting.

Generate comments in the script
Check this option to insert comments to the script.

Include CREATE DATABASE
Check this option to include CREATE DATABASE statement.

Include DROP statement
Check this option to include DROP statements to the script.

Include IF EXISTS to DROP statements
Check this option to include IF EXISTS to DROP statements in the script. It depends on the Include DROP statement option.

Include IF NOT EXISTS in CREATE statements

Check this option to include IF NOT EXISTS in CREATE TABLE and CREATE DATABASE and CREATE USER (as of MySQL 5.7.6) statements in the script.

Include USE statement
Includes USE statement at the beginning of the export script. Depends on the Include CREATE DATABASE option.

Prefix object names with database name
Check this option to prefix object names with a schema name in the script.

Backup Structure

Set these options to control the content of the backup script.

Exclude column default values
Check this option to exclude column default values from script.

Exclude DEFINER and SQL SECURITY clauses
Check this option to exclude DEFINER and SQL SECURITY clauses from script generation.

Include additional object options
Check this option to include such options as row format, table autoincrement value etc.

Include constraints
Check this option to include constraints for tables in the script.

Include indexes
Check this option to include indexes for tables in the script.

Include object comments
Check this option to include object comments for objects in the script.

Include partition clause
Check this option to include PARTITION clause in the script.

Include partition ENGINE
Check this option to include partition engine in the script. The option depends on the Include partition clause option.

Include triggers
Check this option to include triggers for tables in the script.

List individual hash partitions
Check this option to list individual hash partitions in the script. The option depends on the Include partition clause option.

Reset timestamp to CURRENT_TIMESTAMP for events
Check this option to reset event start time to CURRENT_TIMESTAMP in the script.

Use CREATE OR REPLACE
Check this option to use CREATE OR REPLACE instead of CREATE for scripts of views.

Data Backup

Set these options to allow manipulating generation of DML statements.

Disable constraints
Check this option to determine whether to add ALTER TABLE ... DISABLE KEYS clause before INSERT statements.

Disable foreign keys
Check this option to disable foreign keys checks before table creation.

Include column names in INSERT statements
Check this option to include column names into INSERT statements.

Insert COMMIT after every X statements
Check this option to insert the COMMIT statement after each defined number of INSERT statements. This option depends on the Lock tables option. Use the [image] button to set custom numbers of statements.

Lock tables
Check this option to lock a table for writing before inserting data and unlock it when data was inserted. This option depends on the Insert COMMIT and Use INSERT DELAYED options.

Place data just after table definition
Check this option to place INSERT statements after CREATE statement for a table. Otherwise all INSERT statements will be placed after all CREATE statements.

Use bulk insert
Check this option to use INSERT statements that insert more than one table row per statement.

Use HEX for binary
Check this option to export BINARY data in hexadecimal form instead of text string.

Use INSERT DELAYED (only for MyISAM)
Check this option to use INSERT DELAYED instead of INSERT. This option depends on the Lock tables option.

Users

Set these options to setup script generation for users.

Include an encrypted password
Check this option to include an encrypted password in the script.

Include global grants
Check this option to include global grants for users in the script.

Include object grants
Check this option to include any object grants for users in the script.

Include user information
Check this option to include CREATE USER statements in the script.

Buttons

Save As My Defaults
Click this button to save current settings as your default settings.

Devart Defaults
Click this button to restore the application default comparison settings.

My Defaults
Click this button to restore your default database settings, previously saved with the Save As My Defaults button.

See Also

Database Backup Wizard

Errors Handling, Database Backup Wizard


Errors Handling, Database Backup Wizard

On this page, you can specify errors processing behavior and logging options.

Errors handling

Prompt a user for an action
If an error occurred, the application will show a message with the description of an error, its possible reason and possible actions to take:

Yes
The error is ignored and the process continues.

No
The error is not ignored and the process is aborted.

Retry
The application tries to perform an action that resulted in an error once more.

Ignore All
Ignores this error and all errors that may occur during this backup operation.

Ignore all errors
All errors that may occur during the process are written to the error list, and the process will be finished.

Abort at the first error
If an error occurs, the backup process is aborted.

Log settings

Write an import report to a log file
Check this option to write an backup report to a log file.

Log file
Choose the destination folder where the log file will be located.

See Also

Database Backup Wizard

Progress, Database Backup Wizard


Progress, Database Backup Wizard

You can see the progress of database backup process on this page. To minimize the application windows, click the Minimize Application button. To cancel the backup process, click the Cancel button.

See Also

Database Backup Wizard

Finish, Database Backup Wizard


Finish, Database Backup Wizard

You can see the results of database backup operation on this page.

If the process was completed successfully, the [image] icon indicates this status.

If the process failed, this status is indicated by the [image] icon.

In the results of backup process the number of errors, warnings and objects is stated.

Show log file...
This button is active if you chose to create a log file on the

Open script
Check this option to open the result file when the wizard is closed.

Save a backup project
Check this option to save a backup project for future use. After the wizard is closed the Save As dialog window is opened.

See Also

Database Backup Wizard

Database Restore Wizard


Database Restore Wizard

Database Restore Wizard serves to restore your databases or selected tables from script. You can access Database Restore Wizard by choosing Restore Database from the Database menu or by right-clicking on database in Database Explorer and selecting Restore Database from the Backup and Restore submenu of the shortcut menu.

To restore a database from script you should select an appropriate connection and the database script in the wizard window and click the Restore button.

In This Section

Database Script File, Database Restore Wizard
Choose connection and schema script file on this page.

Restore Progress, Database Restore Wizard
You can see database restore progress on this page.

Operation Complete, Database Restore Wizard
You can see results of database restore operation on this page.

See Also

Backup and Restore


Database Script File, Database Restore Wizard

Choose connection and database script file on this page.

Connection
Choose a connection from the connection list.

Database
Select the Target database from the list. If the export script file contains CREATE DATABASE statement, exported data will be imported to the created database, not to the selected database.

Create database if not exists
Select to create a new database during the restore process, if it didn't exist.

File name
Type a file name with the path here or use the Browse button to choose a file.

SQL file encoding
The encoding which is applied to open and execute the script with the restored database. The program automatically selects it basing on the imported file, if it fails, the default encoding (the current Windows encoding on the machine where dbForge Studio is running) is selected. You can always select a required encoding from the drop-down list.

To start the restore process, click the Restore button.

See Also

Database Restore Wizard

Restore Progress, Database Restore Wizard


Restore Progress, Database Restore Wizard

You can see a database restore progress on this page. To minimize the application windows, click the Minimize Application button. To cancel import, click the Cancel button.

See Also

Database Restore Wizard

Operation Complete, Database Restore Wizard


Operation Complete, Database Restore Wizard

You can see the results of database restore operation on this page.

If the process was completed successfully, the [image] icon indicates this status.

If the process failed, this status is indicated by the [image] icon. The Error count is stated in this window.

Open script
Check this option to open a source file when the wizard is closed.

Click Finish to exit the wizard.

See Also

Database Restore Wizard

Backup and Restore


Code Snippets

This section describes Code Snippets user interface elements.

In This Section

Code Snippets Window
This topic describes the Code Snippets window.

Snippets Manager
This topic describes the Snippets Manager window.

Edit Literal Window
This topic describes the Edit Literal window.


Code Snippets Window

In the Code Snippets window, you can find different code samples, organized in folders. You can drag samples from the window to SQL document to inset them to the text. To open the Code Snippets window, click [image] Code Snippets on the View menu. To get more information about using the Code Snippets window, read the Using Code Snippets topic.

The Code Snippets window has a preview pane at the bottom of the window. It displays the selected snippet. You can toggle it on or off using the corresponding toolbar button.

The Code Snippets window has the following toolbar buttons:

Refresh
Reloads snippets from the disk.

Delete
Deletes selected snippet or folder. Snippet file or all files in folder will be deleted!

New Folder
Creates new empty folder.

Toggle Preview
Toggles preview panel on or off.

Open Snippet Manager
Opens the Snippets Manager window.

See Also

Code Snippets

Snippets Manager


Snippets Manager

Use Snippets Manager to add, remove or edit snippets. To open Snippets Manager, click [image] Snippets Manager on the Tools menu.

Toolbar

New Snippet
Click it to create a new snippet.

New Folder
Click it to create a new empty folder.

Delete
Click it to remove existing snippets.

Save
Click it to save changes in existing snippets.

Cancel
Click it to cancel changes in existing snippets.

Share with Devart
Click it to send the new predefined snippet suggestion to Devart.

Reload Snippets
Click it to reload snippets.

Snippets

Snippets List
The list of existing snippets

Title
Use the field to sent a name for the snippet.

Shortcut
Use the field to set a shortcut for the snippet.

Description
Use the field to describe the snippet.

Text
Displays the snippet's body.

Literals

Predefined
Predefined literals that can not be removed or modified.

User
Literals created by a user.

Add
Click it to add a new literal using Edit Literal Window.

Edit
Click it to edit existing literals.

Remove
Click it to remove existing literals.

Location
A path to the snippet.

Browse
Click the button to browse for a snippet file location using the Browse For Folder dialog box.

See Also

Code Snippets

Edit Literal Window


Edit Literal Window

Use the Edit Literal window to create and modify literals. To open this window, you should perform the following steps:

1. Open Snippets Manager.
2. In Snippets Manager, choose one of the available snippets.
3. Click Add.

-or-

Select one of the user defined literals in the Literals field and click Edit.

Name
Specify the name of the literal in this field.

Default value
Specify the default value of the literal in this field.

Description
Specify the description of the literal in this field.

See Also

Code Snippets

Reference


Copy Databases

This section describes Copy Databases user interface elements.

In This Section

Copy Databases Window
This topic describes the Copy Databases window.

Copy Databases Settings Dialog Box
This topic describes the Copy Databases Setting dialog box .


Copy Databases Window

Use this window to copy databases from one server to another.

Source Connection
Select a source connection from the drop-down list box.

Start copying databases to the target server
Click to start copying selected databases from source server to target server.

Target Connection
Select a target connection from the drop-down list box.

Refresh
Click to refresh the Copy Databases window.

Settings
Click to configure copying settings with the Copy Databases Settings dialog box.

Search
Enter a search string in this box to locate a database.

Source
Shows the list of source databases.

Include Data
Select to copy data along with schema.

Drop if exists on target
Select to drop a database on the target server it it coincides with the source one, i.e. the target database will be replaced with the source one.

Target
Shows names of source databases with which they will be copied to the target server.

Progress
Displays the copying progress.

Elapsed Time
Displays time spent on the database copying.

See Also

Copy Databases

Copy Databases Settings Dialog Box


Copy Databases Settings Dialog Box

Use this dialog box to configure the copy databases settings.

Disable foreign keys
Select to disable foreign key checks before creating a table.

Exclude DEFINER and SQL SECURITY clauses
Select to exclude DEFINER and SQL SECURITY clauses from the script generation.

Flush logs
Select to close and reopen all log files before backup.

Include NO_AUTO_ VALUE_ON_ZERO in script
Select to include statements to set SQL_MODE to NO_AUTO_VALUE_ ON_ZERO and restore in the end of the script.

Include partition clause
Select to include the PARTITION clause to the script.

Include triggers
Select to include trigger for tables to the script.

Lock all table for read (Flush Reload Locks)
Select to lock all tables with FLUSH READ LOCKS. This option is necessary to create consistent snapshot of your MyISAM tables.

Use a single transaction
Select to execute the backup in a single transaction. This option is necessary to create a consistent snapshot of your InnoDB tables.

Use bulk insert
Uses INSERT statements that insert more than one table row per statement.

Maximum number of simultaneous database copyings
Indicates the maximum number of databases being copied simultaneously. Use up and down arrows to increase or decrease the database number.

See Also

Copy Databases

Database Explorer


Database Explorer

In This Section

Create New Database Dialog Box
Use this dialog box to create a new database or edit an existing one.

Duplicate Object Dialog Box
Use the dialog to make an exact copy of a database object in the same or another database of the server.

Filter Settings Dialog Box
Use the Filter Settings dialog to create a filter for database objects.

Object Viewer
Object Viewer displays information about objects selected in the Database Explorer.

Database Explorer Window
Database Explorer is a connection management console. Use the Database Explorer window to open data connections and to log on to servers and explore their databases.

Database Explorer Shortcut Keys
Use the shortcuts to speed up the work in the Database Explorer.

Database Explorer Nodes' Properties
This section describes what properties are owned by Database Explorer's nodes.


Create New Database Dialog Box

Use this dialog box to create a new database or edit an existing one. When editing the existing database, the dialog title will be "Edit Database". To open it, right-click the connection in the Database Explorer and choose Create New Database from the shortcut menu or right-click the database in Database Explorer and choose Edit Database from the shortcut menu.

Database name
Choose name for the new database.

Character set
Choose default character set.

Collation
Choose default collation.

OK
Click on this button to create the database after you have specified its parameters.

Cancel
Use this button to abort creation of new database.

Script Changes
to New SQL Window
Show script changes in the new SQL document.
to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

Update Database
Saves changes to the database. Clicking this button equal to clicking the Save button.

See Also

Database Explorer

Database Explorer Window


Duplicate Object Dialog Box

Use the Duplicate Object dialog to make an exact copy of a database object in the same or another database of the same server. To open the dialog, in the Database Explorer, select Duplicate Object from the shortcut menu of a required object.

Destination database
Select a destination database to create a copy of an object. The drop-down list contains all the schemas available on the server.

New object name
Change the new object's name.

Copy Data
Select to copy data from the source table to a table copy. Enabled only for tables. Note copying large bulks of data can take a lot of time, but dbForge Studio makes this procedure asynchronous. You can hide the Duplicate Object dialog by clicking the Hide button that appears along with the progress

See Also

Database Explorer

Filter Settings Dialog Box


Filter Settings Dialog Box

Use the Filter Settings dialog to create a filter for database objects in accordance with certain criteria. To open the dialog, right-click a required object category node in the Database Explorer and select Filter from the menu, or select an object category node and click Filter on the Database Explorer toolbar.

Server
Displays the server version.

Database
Displays the database.

Criteria

Property
Specify the statistics name, owner, or schema to be filtered.

Operator
Choose the operator for the filter.

Pattern
Specify the pattern which goes with the corresponding criteria.

All
If checked, the filtered object will comply with all criteria.

Any
If checked, the filtered object will comply with any criteria.

See Also

Database Explorer

Object Viewer


Object Viewer

Object Viewer displays information about objects selected in the Database Explorer. To open Object Viewer, do either of these actions:

· Choose [image] Object Viewer on the View menu.
· Select the required object in Database Explorer and click [image] Show Object Viewer on the Database Explorer window toolbar.
· Right-click the required object in Database Explorer and select [image] Show Details.

Object Viewer

Properties, DDL and Data of Selected Objects

Object Viewer has three views to display properties, DDL (text), and data of the selected object in Database Explorer. Note that the formatting settings used in the Text view of the window are the same as the ones used in the Text view of object editors. Text formatting settings in Object Viewer are not used only for procedures, functions, triggers, and events.

In Object Viewer, you can see information on connections, databases, and most database objects (e.g. tables, views, columns, stored routines, etc.). The easiest way to view information about the required item in Object Viewer is to double click it in the Database Explorer window. In this case the Object Viewer window will be opened automatically. But note that such way is not universal for all items displayed in Database Explorer, and it's just a tip.

If there is a list of items in the Properties view of Object Viewer, you can obtain details on a particular item by double clicking it in the list or selecting it and pressing ENTER.

Navigation in Object Viewer

Object Viewer provides easy navigation. Use the following buttons on the toolbar:

Back to display the summary of the previous object.

Forward - to display the summary of the next object in Database Explorer.

Up - to see the summary of the parent object.

Synchronize with Database Explorer - to synchronize the information in Object Viewer with Database Explorer.

Refresh - to refresh data in the Object Viewer window.

Stop Refresh - to stop refreshing data in the Object Viewer window.

See Also

Database Explorer

Database Explorer Window


Database Explorer Window

Database Explorer is a connection management console. Use the Database Explorer window to open data connections and to log on to servers and explore their databases.

To make the Database Explorer window close automatically when not in use, select Auto Hide from the Window menu.

Toolbar

You can find the following buttons on the toolbar in the Database Explorer window:

Refresh button Refresh - to synchronize the current view with changes that other users might be applying to the server.

Stop Refresh Stop Refresh - to stop refreshing when it takes too long.

New Connection - to Database Connection Properties dialog box.

Open Connection - open a connection selected in Database Explorer.

Close Connection - close a connection selected in Database Explorer.

Show All Objects - to show all the objects of the selected connection, otherwise dbForge Studio shows only the objects of the default database for the selected connection.

Filter - filter the child elements of selected node.

Object Viewer - show the Object Viewer window.

Note

The availability of the toolbar options depends on the product you use.

Shortcut Menu

The shortcut menu of the Database Explorer window provides a quick access to the database object options. The following table lists the options that do not have their own wizards:

Menu Item | Description
Flush | Flushes the selected table.
Truncate table | Removes all rows from a table without logging the individual row deletions.
Send to | Depending on the object type, adds the selected object to Query Builder, Master-Detail Browser, Database Diagram, Data Report, Chart Designer, Pivot Table.
Generate Script As | Generates DML and DDL statements for the selected object.

Note

The range of options differs depending on the selected database object.

See Also

Database Explorer

Node Icons


Database Explorer Shortcut Keys

Use following shortcut key combinations when working in Database Explorer to speed up your work.

Shortcut Keys | Action | Where is used
F4 | View properties of currently selected Database Explorer node. | Database Explorer
F2 | Rename currently selected Database Explorer node. | Database Explorer
F5 | Refresh selected node and its child nodes in the Database Explorer | Database Explorer
ENTER | Same as double-click. | Database Explorer

These shortcuts are default shortcuts. Most shortcuts can be customized.

See Also

Database Explorer Nodes' Properties

Database Explorer


Database Explorer Nodes' Properties

This section describes what properties are owned by Database Explorer's nodes.

In This Section

Database Properties
Lists properties of a database.

Connection Properties
Lists properties of a connection.

Table Properties
Lists properties of a table.

Column Properties
Lists properties of a column.

Index Properties
Lists properties of an index.

View Properties
Lists properties of a view.

Primary Key Properties
Lists properties of a primary key.

Foreign Key Properties
Lists properties of a foreign key.

Stored Procedure and Stored Function Properties
Lists properties of a stored procedure or stored function.

Stored Procedure Parameter Properties
Lists parameter properties of a stored procedure.

Trigger Properties
Lists properties of a trigger.

Event Properties
Lists properties of an event.

Node Icons
Lists icons you can see in Database Explorer and explains their meaning.

See Also

Database Explorer


Database Properties

This node represents MySQL database and has the following properties:

Name
The name of the database.

Charset
Shows default database charset.

Collation
Shows default database collation.

See Also

Database Explorer Nodes' Properties

Connection Properties


Connection Properties

This node represents a connection to MySQL and has the following properties:

Connection String
Represents connection parameters in a single string.

Database
The name of the master database.

Document Category
The name of the document category.

Open
Indicates if the connection is active.

Save Password
Shows whether the password should be saved.

Server Version
Displays version of the server connected.

See Also

Database Explorer Nodes' Properties

Table Properties


Table Properties

This node represents MySQL table and has the following properties:

Name
The name of the table.

Charset
Shows the character set of the table.

Collation
Shows table collation.

Comment
Shows a comment attached to the table.

Owner
Shows name of the database that contains the table.

Table Type
Shows type of the table. It could be one of following: BDB, HEAP (MEMORY in MySQL 5.0 and higher), FEDERATED (in MySQL 5.1 and higher), ISAM, InnoDb, MERGE, MyISAM, Maria (in MySQL 6.0.6 and higher), Aria (in MariaDB 5.1 and higher).

See Also

Database Explorer Nodes' Properties

Column Properties


Column Properties

This node represents table column and has the following properties:

Name
Name of the column.

Charset
Shows column charset.

Collation
Shows column collation.

Comment
This is a comment attached to the table.

Computed Expression
Generates totals that appear as additional summary columns at the end of the result set.

Data Type
This is type of the column.

Default Value
Shows default value for the column.

Is Auto Increment
Shows whether the column has autoincrement attribute.

Is Binary
Shows whether the column has BINARY attribute that causes sorting and comparisons to be case sensitive.

Is Persisted
Determines whether or not an event persists with its document.

Is Unique
Determines whether values in the column must be unique.

Is Unsigned
Shows whether numbers in the column are signed or not.

Length
Shows size of the column in bytes.

Nullable
Shows whether the column can be of NULL value.

Owner
Table that contains the column.

Precision
Displays precision for the column if set.

Scale
This property shows how many decimals are in the column.

Zero Fill
Shows how many of most significant bytes in the value are always 0 and are not stored.

See Also

Database Explorer Nodes' Properties

View Properties


Index Properties

These nodes represent MySQL indexes. Unique indexes are marked by blue key icon [image], non-unique indexes are rendered with icon [image]. Indexes have the following properties:

Name
Name of the index

Owner
Database object that contains the index.

Type
Shows an index type. Can be FullText (for CHAR, VARCHAR, and TEXT columns in MyISAM tables), BTree (Default), Hash (for MEMORY and HEAP tables), SPATIAL (for spatial columns in MyISAM tables), and RTREE (in MyISAM tables).

Unique
Shows whether the index is unique.

See Also

Database Explorer Nodes' Properties

Primary Key Properties


Primary Key Properties

This node represents primary key and has the following properties:

Name
Primary key constraint name. It is always 'PRIMARY'.

Index Name
Name of the bound index.

Key Type
Specified key type is displayed.

Owner
Table that contains the primary key.

See Also

Database Explorer Nodes' Properties

Foreign Key Properties


Foreign Key Properties

Represents a foreign key and has the following properties:

Name
Name of the constraint.

Delete Rule
Rule used when a row is deleted. Can be Cascade, No Action, Set Null, or Restrict.

Enabled

Full Referenced Name
Name of the table with the schema prefix name that the key references to.

Owner
Table that contains the key.

Referenced Table Database
Name of the database that the foreign key references to.

Referenced Table Name
Name of the table that the foreign key references to.

Update Rule
Rule used when a row is updated. Can be Cascade, No Action, Set Null, or Restrict.

See Also

Database Explorer Nodes' Properties

View Properties


View Properties

This node represents MySQL view and has the following properties:

Name
The name of the view.

Ansi Quotes
SQL Mode treat “"” as an identifier quote character (like the “`” quote character) and not as a string quote character.

Status
Indicates whether the view is valid.

See Also

Database Explorer Nodes' Properties

Node Icons


Stored Procedure and Stored Function Properties

These nodes represent a stored procedure or stored function and the have following properties:

Name
The name of the procedure.

Comment
Shows comments assigned for the procedure (function).

Created
Shows date and time of the stored routine creation.

Definer
Determines which MySQL account to use when checking access privileges for the execution of stored procedure or function.

Is Deterministic
Shows whether the function always returns the same result for the same input parameters.

Language
Shows used language.

Modified
Shows the date and time of the last procedure modification.

Owner
Database that contains the procedure or function.

Security
Specifies SQL security type.

Sql Data Access
Provides information about the nature of data. Among the characteristics are: CONTAINS SQL, NO SQL, READS SQL DATA, MODIFIES SQL DATA.

Sql Mode
The server SQL mode, that will be in effect for the stored procedure or function.

Type Name
Shows the name of the procedure type.

See Also

Database Explorer Nodes' Properties

Stored Procedure Parameter Properties


Stored Procedure Parameter Properties

These nodes represent parameter of a stored procedure and have the following properties:

Name
The name of the parameter.

Data Type
This parameter's data type.

Direction
Shows parameter's direction (in [image], out [image], or return value [image]).

Owner
The stored procedure that contains the parameter.

See Also

Database Explorer Nodes' Properties

Trigger Properties


Trigger Properties

This node represents MySQL trigger and has the following properties:

Name
The name of the trigger.

Definer
Indicates who defined the trigger.

Event
Shows the event that fires the trigger: INSERT, UPDATE or DELETE.

Owner
The database that contains the trigger.

Sql Mode
The server SQL mode, that will be in effect for the trigger.

Table Name
The name of the table, the trigger is associated with.

Table Owner
The database that contains the table the trigger is associated with.

Type
Indicates whether trigger fires after the event, or before it.

See Also

Database Explorer Nodes' Properties

Event Properties


Event Properties

This node represents MySQL trigger and has the following properties:

Name
The name of the event.

Comment
Shows comments assigned for the event.

Definer
Indicates who created the event.

Drop On Completion
Indicates whether the event will be dropped on completion.

End Time
Shows the end date and time when the recurrent event stops repeating.

Event State
Indicates whether the event is enabled.

Execute At
Shows the execution date and time for non-recurrent events.

Interval
Contains a number of time portions between recurrent event repeating.

Interval Quantity
Contains the time units of the interval between recurrent event repeating.

Owner
The database that contains the event.

Recurrent
Indicates whether the event repeats after specified intervals of time.

Sql Mode
The server SQL mode that will be in effect for the event.

Start Time
Shows the end date and time when the recurrent event starts executing.

See Also

Database Explorer Nodes' Properties

Node Icons


Node Icons

This table lists icons you can see in the Database Explorer and explains their meaning.

Icon | Description
 | A connection to a server
 | Invalid connection (connection to not supported database server other than MySQL).
 | A database on a server
 | A table
 | A partitioned table
 | A non-existent object - one that does not exist in the schema or the server any longer
 | An invalid object - one that is defined as invalid in the database or the program can't get all its properties
 | A column that is contained by a table or referenced by an index
 | A primary key column
 | A foreign key
 | A primary key
 | A unique index
 | An index (neither primary nor unique)
 | A view
 | A stored procedure
 | A stored function
 | A stored procedure parameter (IN)
 | A stored procedure parameter (OUT)
 | A stored function result value
 | A trigger
 | An event
 | A user-defined function
 | Depends On - lists database objects that must be present for an object to function properly
 | Used By - lists database objects that depend upon a database object

See Also

Database Explorer Nodes' Properties

Reference


Data Compare

This section describes user interface elements of the windows concerned with data comparison.

In This Section

Data Comparison Wizard
Describes Data Comparison wizard's fields and options.

Data Synchronization Wizard
The topic describes the Progress window that appears during comparison/synchronization.

Comparison and Synchronization Progress Info
This topic describes progress window for comparison and synchronization process.

Comparison Report
This section describes the Comparison Report wizard.

Data Comparison Document
Describes the details of the Data Comparison document.

See Also

Reference


Data Comparison Wizard

Data Comparison Wizard Description

The Data Comparison wizard provides a single access to perform the basic configuration steps to compare data stored in databases.

To access the Data Comparison Wizard, click New Data Comparison on the start page. Alternatively, on the File menu click [image].

The Main Tabs and Dialog Boxes of the Data Comparison Wizard

Source and Target, Data Comparison Wizard
Choose Source and Target connections, Databases, and select comparison options here.

Options, Data Comparison Wizard
Set data comparison options and records to view in comparison results on this page.

Edit Mask Dialog Box
Use this dialog box to specify a custom wildcard expression for tables (or views) to include them into comparison.

Objects Mapping Dialog Box
Use this dialog box to set custom mapping for tables and views.

Mapping, Data Comparison Wizard
Select objects and their columns to compare and set comparison keys for them.

Column Mapping Dialog Box
Use this dialog box to map columns and specify the comparison key.

Custom Queries Mapping Dialog Box
Use this dialog box to set custom query mapping for tables and views.

WHERE Filter Dialog Box
Use this dialog box to filter rows included into comparison.


Source and Target, Data Comparison Wizard

The tab consists of two sections. The first section, Source, is used to set the connection properties for the source database or to choose a backup file for comparison. The second section, Target, is used to set the connection properties for the target database respectively or to choose a backup file for comparison.

Database Comparison

Type
Select a database or a backup file you want to compare data with.

Connection
Select a connection here. Choose the <Manage...> option to call the Connection Manager window.

Edit...
Click to edit properties of the selected connection.

New...
Click to create a new connection.

Server Version
The version of the database server used in the connection is specified.

Database
Specify a database to compare.

Backup Comparison

Type
Select a database or a backup file you want to compare data with.

Add...
Click to add a backup file to compare.

Remove
Click to remove the selected backup file.

Clear
Click to remove all backup files from the grid.

Server Version
The version of the database server used in the connection is specified.

Database
A database which the backup was made from.

Date
A backup file creation date.

Server
The server version of a database which the backup was made from.

Type
The backup type.

File Name
A backup file name and its path.

See Also

Data Comparison Wizard

Options, Data Comparison Wizard


Options, Data Comparison Wizard

This tab allows you to set data comparison options and records to view in comparison results.

Options Wizard Page Content

Auto Mapping Options

A set of options that are used to adjust objects mapping.

Ignore case in object names
Select it to ignore case in object names when mapping them. For example, 'Customer' will be mapped to 'cuStomEr' when this option is set.

Ignore underscores in object names
Select it to ignore underscore in object names when mapping them. For example, 'CustomerBalance' will be mapped to 'Customer_Balance' when this option is set.

Ignore spaces in object names
Select it to ignore spaces in object names when mapping them. For example, 'CustomerBalance' will be mapped to 'Customer Balance' when this option is set.

Include tables or views by mask: *
Allows specifying a custom wildcard expression for tables (or views) to include them to comparison. For example, tables or views with such names as dept.Jobs, dept.Tmp_Jobs, Tmp_Job_History, sales.Departments, dept.Tmp_Departments, dept.Tmp_Departments2, will be included to mapping if "*jobs*, *Department*" is set for this option.

Exclude tables or views by mask. *Table*
Allows specifying a custom wildcard expression for tables (or views) names to exclude them from comparison. For example, tables or views with such names as hr.employees, hr.Temp_Employees, sales.Temp_Employees_Old, sales.REGIONS, customer.Tmp_Regions, sales.Tmp_RegionS_new will be excluded from mapping if "*employees*, *Regions*" is set for this option.

Ignore BLOB columns
Allows ignoring BLOB columns during comparison. The option can be applied to the following column types: BLOB, LONGBLOB, MEDIUMBLOB, TINYBLOB, TEXT, TINYTEXT, MEDIUMTEXT, LONGTEXT.

Ignore columns by mask: *ModifiedDate*, *CreatedOn*, *UpdatedBy*
Allows you to specify a custom wildcard expression for columns names to exclude columns from comparison. For example, columns with such names as UpdateByCustomer, NotUpdateByUser, RecordsCreatedOn, RecordCreatedOnDay, LastModifiedDate, and ProductModifiedDateTime will be excluded from mapping if *MadifiedData*, *CreatedOn*, *UpdatedBy* is set for this option.
To add/edit a wildcard expression, click the [image] button next to the option and enter a required expression.
The compare process usually involves some large tables with many fields. Most tables have system fields like date and timestamp or user name that updated a record. Although this information is useful, usually it is not a target of comparison. This option allows you to specify the columns to be ignored during comparison. To do this, a mask by which columns will be ignored should be set. To set such mask wildcards can be used. If this option is checked, column names are compared with the specified mask during comparison (register is not taken into account). If column name corresponds to the mask, the column is ignored. Columns that don't correspond to any masks are ignored during comparison. So if you do not want to compare columns with a specific name, use this option. This way the columns won't be compared and won't participate in comparison.

Ignore computed columns
Allows ignoring computed columns in tables during comparison.

Exclude newly added objects
When selected, only those tables and views that are explicitly included into the saved project (*.dcomp) will be compared.

Comparison Options

A set of options used to determine the objects and records that should be compared.

Compare tables
Includes tables into comparison.

Compare views
Includes views into comparison. Views can be synchronized only if the referenced rows are from a single table, and the IS_UPDATE option is selected.

Round float types up to 3 digits
Select it to specify the count of digits after the decimal point. Option rounds FLOAT, NUMERIC, REAL and DECIMAL data types.

Ignore leading spaces
When selected, whitespaces in the start of strings will be ingnored during comparison and synchronization. This option can be apllied only to (N)VARCHAR columns.

Ignore microseconds
When selected, microseconds will be ignored for the following data types: TIME(n), DATETIME(n), and TIMESTAMP(n). E.g. if option is selected, values '1995-09-29 12:34:56.987654' and '1995-09-29 12:34:56.123456' are considered equal

Ignore trailing spaces
This option allows you to ignore whitespaces in the end of strings during comparison and synchronization. This option can be applied to the VARCHAR, TEXT, TINYTEXT, MEDIUMTEXT AND LONGTEXT columns.

Note

This option recognizes only the Unicode code point 0x0020.

Ignore case
Ignores case in symbols for non-key columns of the following data types: TINYTEXT, MEDIUMTEXT, TEXT, LONGTEXT, VARCHAR, NVARCHAR, ENUM, SET.

Ignore end of line
Allows ignoring end of line characters during comparison and synchronization. This option can be applied to CHAR, VARCHAR, TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT columns.

Treat NULL and EMPTY STRING as the same value
Treats NULL and EMPTY STRING as the same value for CHAR and VARCHAR values while comparing.

Ignore time part in DATETIME data types
Ignores time for fields of the DATETIME types and compares only dates. For example, if you set this option values '1995-09-29 03:14:15.000' and '1995-09-29 22:14:06.540' will be considered equal.

Tolerance interval
Allows specifying the module of difference between the values of source and target. If it does not exceed the specified value, the values are considered equivalent.

Display Options

A set of options used to determine the set of results to be seen after comparison.

Different records
Select to include different records into comparison results. These records are displayed in the result grid and are available for synchronization. If this option is not selected, different records will not appear in to comparison results and will not be stored on disk.

Only in source records
Select to include records that are available only in source into comparison results. These records are displayed in the result grid and are available for synchronization. If this option is not selected, only in source records will not be stored on disk and will not appear in the comparison result.

Only in target records
Select to include records that are available only in target into comparison results. These records are displayed in the result grid and are available for synchronization. If this option is not selected, only in target records will not be stored on disk and will not appear in the comparison result.

Identical records
Select to include identical records into comparison results. These records are displayed in the result grid and are available for synchronization. If this option is not selected, identical records will not be stored on disk and will not appear in the comparison result.

Buttons

Save As My Defaults
Click this button to save current settings as your default settings.

Devart Defaults
Click this button to restore the application default comparison settings.

My Defaults
Click this button to restore your default comparison settings, previously saved with the Save As My Defaults button.

Other Elements

Find
Enter the first character of the option's name to show only the options that contain this part in their names.

Save settings to a command line arguments file
Click to save settings of options to use them in an arguments file when comparing databases through the command line or scheduling a task.

See Also

Data Comparison Wizard

Edit Mask Dialog Box


Edit Mask Dialog Box

This dialog allows you to specify a custom wildcard expression for tables (or views) to include them into comparison. For example, tables or views with such names as dept, Jobs, department.Tmp_Jobs, Tmp_Job_History, sales.Dept, job.Tmp, dept.Tmp_Departments2, will be excluded from mapping if "*job*,*dept*" is set for the Exclude tables or views by mask:* option.

To open this dialog, open the Data Comparison Wizard, navigate to the Include/Exclude tables or views by mask:* option and click the three-dotted button.

The Edit Mask dialog box contains a list of expressions to replace characters or digits in the Include/Exclude tables or views by mask:* field. They are called Wildcards.

To select the required wildcard, do the following:

1. In the Edit Mask dialog box, click the [image] arrow button next to the wildcard expression field.
2. Select a wildcard from the drop-down list. It is inserted into the wildcard expression field.

The drop-down list contains the following wildcards:

Syntax | Expression | Description
, | Next mask | Use comma to specify several masks.
* | Zero or more of any character | Matches any single or more characters. For example, test* matches any text that includes "test".
? | Any single character | Matches any single character.
# | Any single digit | Matches any single digit. For example, 5# matches numbers that include 5 followed by another number, such as 51, but not 15.
[] | Any single character in the set | Matches any of the characters that is specified in the set.
[!] | Any single character not in the set | Matches any of the characters that is not specified in the set.
\ | Escape Special Character | Matches the character that follows the backslash (\) as a literal. This allows you to find the characters used in wildcard notation, such as * and #.

See Also

Data Comparison Wizard

Objects Mapping Dialog Box


Mapping, Data Comparison Wizard

Select objects and their columns to compare and set comparison keys for them on this page.

This page displays the grid with compared tables and views, comparison keys and comparison columns. The grid contains the following columns:

Column with check boxes
Select check boxes to include objects to comparison.

Object Name
Displays object names.

Comparison Key
Select comparison key in this column. Use the button to choose another key or to select and edit custom key.

Columns in Comparison
See the quantity of columns (the first number) that are compared and the whole quantity of columns existing in the object (the second number). Click the button to open the Column Mapping Dialog Box and select columns to include into comparison and map them in this column.

Note

The [image] icon informs you about mapping warnings.

You may select several tables and views and include or exclude them from comparison together. To select several tables click them holding the CTRL key. To select all tables and views press CTRL+A.

Filter Text Box
Enter filter here to see only objects, containing the filter string in their names.

Mapping Toolbar

Icon | Name | Description
 | Filter | Allows using some predefined filters in addition to filtering by object name
 | Refresh | Click to refresh mapping
 | Map Objects | Click to call the Custom Object Mapping dialog box to customize the object mapping
 | Unmap | Click to unmap the object pairs, selected in the grid
 | Map Schemas | Click to call the Custom Schema Mapping dialog box to customize the schema mapping
 | Custom Query | Click to call the Custom Queries Mapping dialog box to customize mapping
 | Reset | Click to restore automatic mapping
 | Filter | Click to open the WHERE Filter dialog box to filter Source/Target rows included into comparison.

Predefined Filters

Name | Description
All | Shows all object pairs
Valid Mappings | Shows object pairs without table level warnings
Invalid Mappings | Shows object pairs with table level warnings
Auto Mapped Objects | Objects, that were mapped automatically by dbForge Data Compare
User Mapped Objects | Objects, that were mapped manually by user
Fully Mapped Objects | Objects that were fully mapped
Partially Mapped Objects | Objects that were fully mapped
Included Objects | Object pairs, included to comparison
Excluded Objects | Object pairs, excluded from comparison

Note
1. If not all the objects are mapped, an information link that shows the number of unmapped objects is displayed in the bottom right corner of the wizard page. Click this link to go to the Object Mapping dialog box.
2. If the primary key is not set for some object, the icon is displayed in the check boxes column.

See Also

Data Comparison Wizard

Column Mapping Dialog Box


Object Mapping Dialog Box

This dialog allows you to set custom mapping for tables and views.

Source objects
List of unmapped objects in the source database.

Target objects
List of unmapped objects in the target database.

OK
Click to map the selected source and target object and close the dialog.

Cancel
Click to close the dialog.

Map
Click to map the selected source and target object without closing the dialog.

See Also

Data Comparison Wizard

Column Mapping Dialog Box


Column Mapping Dialog Box

This dialog allows you to set custom mapping for columns.

Comparison Keys
Use this field to choose indexes, primary keys, unique keys from the drop-down list to select the key columns automatically depending on the columns that were included into the selected index or key.

Select columns for comparison
This grid allows controlling column mapping.

Check box column
Select check boxes to include column pairs to comparison.

Source column
Contains all source columns.

Target columns
Contains Target columns, mapped to the Source columns. Click to map or unmap a Target column. The icon shows the state of the pair - normal or warning.

Key
Select check boxes to include column pairs to a comparison key.

Compare
Select to compare the selected column pair. If the check box is cleared, the columns will be ignored during comparison

Sync
Select to synchronize the selected column pair. If the check box is cleared, the columns will be excluded from the UPDATE statement and will not be synchronized.

Column details
This grid displays properties of a Source and Target column from the selected column pair in the Select columns for comparison grid.

Reset
Click to restore the automatic mapping.

Cancel
Click to cancel changes and close the dialog.

OK
Click to apply changes and close the dialog.

See Also

Data Comparison Wizard

Custom Queries Mapping Dialog Box


Custom Queries Mapping Dialog Box

This dialog allows you to set custom mapping for tables and views.

Source Object

Table or view
Select this radio button to display the list of tables in the source database. If several schemas are being compared, tables are grouped by these schemas.

Search
To quickly find a required object, enter characters available in the required object's name. Only objects, names of which contain the required characters, will be shown in the list.

Hide mapped objects
Select this option to show only unmapped objects in the list.

Query
Select this radio button to create a custom query to compare custom results.

Name
Type the query name here.

Query text box
Type a query in this box.

Target Object

Table or view
Select this radio button to display the list of tables in the target database. If several schemas are being compared, tables are grouped by these schemas.

Search
To quickly find a required object, enter characters available in the required object's name. Only objects, names of which contain the required characters, will be shown in the list.

Hide mapped objects
Check this option to show only unmapped objects in the list.

Query
Select this radio button to create a custom query to compare custom results. Specify query name in the field below.

Name
Type the query name here.

Query text box
Type a query in this box.

Use the same query for Source and Target
Select this option to use the same query for source and target.

Buttons

Validate
Click to validate both queries one by one. To validate each query separately, choose the [image] Validate command from the Query text box shortcut menu.

OK
Click to map the selected source and target object and close the dialog.

Cancel
Click to close the dialog.

Map
Click to map the selected source and target object without closing the dialog.

Note

To start comparing queries, you should specify a key in the Key column of the Column Mapping window.

See Also

Data Comparison Wizard

WHERE Filter Dialog Box


WHERE Filter Dialog Box

In most cases comparing data in tables is performed on an entire data set. However, there are circumstances when it is necessary to limit the scope of data in a table and perform comparison and synchronization only for a limited data set. The WHERE Filter dialog box is used to enter and enforce row filtering utilizing a WHERE clause. To open it, click the [image] Filter button on the toolbar of the Mapping wizard page.

The WHERE Filter dialog box is divided into Source section (on the left) and Target one (on the right). If you want to filter Source rows, enter the filtering expression in the left section. To filter Target rows, specify the expression in the right section. The dialog contains the following details:

Source object name
It displays the name of the Source object selected in the grid on the Mapping wizard page.

Source expression
Enter a filtering expression to apply to Source rows. Right-click here and select Insert Column and a required column from the shortcut menu. Type the filter expression.

Target object name
It displays the name of the Target object selected in the grid on the Mapping wizard page.

Target expression
Enter a filtering expression to apply to Target rows here.

Use the same expression for source and target
You can enter the expression in one section and select this check box to apply it for both Source or Target. The expression will be copied to the opposite section.

Validate
Click this button to validate the entered expression.

See Also

Data Comparison Wizard


Data Synchronization Wizard

Data Synchronization Wizard Description

The Data Synchronization Wizard provides a single access to perform the basic configuration steps to synchronize compared data.

To access the Data Synchronization Wizard, click [image] Synchronize on the Comparison toolbar.

The Main Tabs and Dialog Boxes of the Data Synchronization Wizard

Output, Data Synchronization Wizard
Allows you to select general synchronization options including script execution.

Options, Data Synchronization Wizard
Allows you to select output options to manage synchronization script.

Summary, Data Synchronization Wizard
Allows you to review the synchronization actions and warnings.


Output, Data Synchronization Wizard

Synchronization Script Output

Specify output options concerning synchronization script.

Open the synchronization script in the internal editor
Select to output the synchronization script to the SQL document.

Save the script to a file
Select to output the synchronization script to file. Click the Browse button to specify the path to save this file.

Open in the internal editor
Select to open the script in dbForge Data Compare after creating.

Execute the script directly against the target database
Select to synchronize the target database immediately.

Refresh comparison results after successful synchronization
Select to refresh comparison results after synchronization if synchronization was executed successfully.

See Also

Data Synchronization Wizard

Options, Data Synchronization Wizard


Options, Data Synchronization Wizard

Data Synchronization Options

Check for concurrency updates
When selected, the UPDATE, DELETE commands will be supplemented with the non-key values in the WHERE condition and the IF NOT EXISTS statement will be added before the INSERT command. This will allow avoiding accidental data rewriting on live databases. For example, UPDATE PassTable SET code=N'New Value' WHERE ID = 1 AND Code=N'Original Value'.

Convert Archive Engine To InnoDB
Select to convert Archive Engine to InnoDB to enable the UPDATE/DELETE operations.

Include USE <database_name>
When selected, the USE <database_name> clause will be added to the script.

Limit Bulk Size (...kB)
Select to set the data size for the bulk insert according to a predefined value in kB. If the option is selected, the INSERT multirow will be used to increase the data insert performance. If the option is cleared, the single-row INSERT will be used.

Use Commit mode (Page Length=...)
Inserts the commit statement after each commit page length statements.

Disable Foreign Keys
Select to drop foreign keys in the beginning of the synchronization. After the synchronization foreign keys will be restored.

Disable Primary Keys and Indexes
Select to drop primary keys and indexes at the beginning of the synchronization process. The Primary keys and indexes will be restored after synchronization process. If either the primary key or the index is the comparison key, it cannot be dropped.

Disable check constraints
When selected, check and not null constraints will be dropped at the beginning of synchronization. After synchronization, check and not null constraints will be restored.

Disable DML Triggers
Select it to disable DML triggers in the beginning of the synchronization. After the synchronization they will be enabled.

Exclude Comments
Select to prevent comments generation in a synchronization script.

See Also

Data Synchronization Wizard

Summary, Data Synchronization Wizard


Summary, Data Synchronization Wizard

Summary Information

This tab contains summary information about synchronization. It consists of two subtabs:

Action Plan
This tab displays synchronization script plan. Statements in the script will be placed in the same order as actions in the action plan. You can copy the action plan using CTRL+C.

Search
Type filter string here. Use "_" symbol to substitute any character.

Expand All
Click to expand all synchronization actions.

Collapse All
Click to collapse all synchronization actions.

Warnings
This tab displays pairs of compared table which have synchronization warnings. Point to the table pairs to see column pairs which caused the warning and the warning text. You can copy the list of warnings using CTRL+C.

See Also

Data Comparison Wizard

Comparison and Synchronization Progress Info


Comparison and Synchronization Progress Info

When comparison or synchronization is in progress, the Progress window is shown. In this window, the following information is displayed:

· The action that is being performed. They are Describing objects and Comparing data for the comparison process, and Generating script for the synchronization process.
· The count of processed objects. The total number of objects and the number of objects already processed is displayed.
· Progress bar indicating the process progress.
· The name of the database object that is being processed.
· The count of records being processed.
· Elapsed time indicates the time used during comparison or synchronization. Remaining time indicates approximate time that will be used to complete the comparison or synchronization process. You should keep in mind that remaining time can be imprecise due to the peculiarities of its measurement. Below the most common situations when the time is measured inaccurately or is not available will be described:
· The measured time can be greater than the elapsed time for large data types (for example, TEXT). In case of large data types the maximum possible time is stated.

Note

If a table contains BLOB data the size of which is larger than 5Mb, the amount of the processed megabytes is displayed.
· The time will be greater, if WHERE filter is used.
· The measured time can be changed if server or network load is changed.
· The amount of the remaining time is n/a if data is retrieved from a table too slowly.
· The Skip button allows to skip comparison of a table that is being compared and starts to compare the next table. You can use this button if you don't want to compare a large table.
· The Cancel button stops the comparison or synchronization process.

See Also

Data Compare

Comparison Report


Comparison Report

This section describes the Comparison Report wizard.

In This Section

Format, Comparison Report
Select the report format and location on this page.

Options, Comparison Report
Set options for your report on this page.

See Also

Data Compare

Data Comparison Document


Format, Comparison Report

The Generating Comparison Report window will help to generate a comparison report for the comparison performed before.

To access the Comparison Report Window:

On the Comparison menu click Generate Comparison Report.

Available Options

In this window you can choose the following options for the report:

Format
Specify the format of the report file you want to generate.

HTML
Generate a report in the HTML format.

Excel
Generate a report in the Excel (XLS) format.

CSV
Generate a report in the CSV format.

Name
Specify the name of the report file.

Location
Specify where the report should be created. Click Browse... specify the location.

Create report for

All objects
Check this option to include all objects (except identical ones) into your report.

Identical objects
Check this option to include identical objects into your report.

Objects marked for synchronization
Include only objects marked for synchronization into your report.

View the report on completion
Check this option to view the generated report after it was completed.

See Also

Comparison Report

Options, Comparison Report


Options, Comparison Report

Available options

In this window you can choose the additional options for the report:

Show number of differences per column
Check this option to include the list with the number of differences in each column to your report. For each database table, a table with the list of columns and the number of differences in them will be created.

Include comparison settings
Check this option to include comparison options into your report. This option is available only for HTML reports.

Include actual data records for different objects
Check this option to include data records available in your database tables into your report. For HTML report, each tablename in the main part of the report will be turned into a link to the part of the report where all data records are listed. For Excel report, pages containing this information will be added.

Hide unmodified columns
Only data that contains differences will be added to the report.

See Also

Comparison Report

Data Comparison Document


Data Comparison Document

Use this document to see, analyze data comparison results and set up synchronization. It consists of the following:

Note

Actual document look may slightly vary from the image above, depending on the product you use.

Comparison Result Grid Shortcut Menu and Comparison Toolbar

The shortcut menu of the Comparison Result Grid of a Data Comparison document provides a number of options to manage the data comparison document:

Edit Comparison...
Calls Data Comparison Wizard where you can change options for the performed data comparison and perform new data comparison.

Refresh
Refreshes the opened comparison document.

Stop Execution
Terminates data comparison or synchronization operation.

Filter
Use it to filter the comparison results by their status. Click the down arrow near the Filter button and select the corresponding option in the appeared menu.

All
All rows are included into the grid.

With Different Rows
Only different rows are included into the grid.

With Identical Rows Only
Only identical rows are included into the grid.

With Conflict Rows
Only conflict rows are included into the grid.

Included Objects
Only rows with included objects are shown into the grid.

Excluded Objects
Only rows with excluded objects are shown into the grid.

Correctly Mapped Objects
Check this option to show correctly mapped objects.

Incorrectly Mapped Objects
Select show incorrectly mapped objects. Objects are considered as mapped incorrectly if there is no comparison key or source or target object was described with error.

Generate Comparison Report
Opens the Comparison Report wizard. Go through the wizard pages to generate a report.

Synchronize
Opens Data Synchronization Wizard.

Exclude Selected Objects
Excludes selection from the needed row, if available.

Include Selected Objects
Includes selection into the needed row, if available.

Change Synchronization Direction
Changes the synchronization direction, so you can synchronize both databases without re-comparing them.

Document Header

Document header shows:

· The search field that allows you to find an object.
· Source and Target databases with their connections.
· Number of selected objects.

Comparison Data Details Grid

The Comparison Data Details Grid displays all the records of each compared object that is selected in the Comparison Result Grid. The records are automatically grouped by status and displayed on separate tabs, and are easy to navigate.

Column with check boxes
Select a check box to include an object to data synchronization.

Owner
Shows an owner of a source object.

Source Object
The object of the Source database that will be compared with the corresponding object of the Target database.

Only in Source
Displays a quantity of records that exist only in source database.

Different Records
Displays a quantity of records, having the same comparison key value, but differing in other columns.

Only in Target
Displays a quantity of records that exist only in target database.

Identical Records
Displays a quantity of identical records. Note that this column is available only if the Identical records option of Data Comparison Wizard is turned on.

Conflict Records
Appears only if there are conflict records (records, having non-unique values of the custom comparison key). It displays numbers of different key values in the conflict records.

Target Object
The object of the Target database which contents you compare and synchronize with the Source one.

Owner
Shows an owner of a target object.

Comparison Data Details Grid Toolbar

Only in Source
Displays a quantity of records that exist only in source database.

Different Records
Displays a quantity of records, having the same comparison key value, but differing in other columns.

Only in Target
Displays a quantity of records that exist only in target database.

Identical Records
Displays a quantity of identical records. Note that this column is available only if the Identical records option of Data Comparison Wizard is turned on.

Conflict Records
Appears only if there are conflict records (records, having non-unique values of the custom comparison key). It consists of two grids, each containing conflict records from the corresponding database.

Go to the next difference
Points the next difference.

Go to the previous difference
Points the previous difference.

Go to the next difference for the selected column
Points the next difference in column.

Go to the previous difference for the selected column
Points the previous difference in column.

Find
Opens the Find and Replace Window. Use this option to start search in the grid.

Visible Columns
Opens the Visible Columns dialog box. Use it to display only the needed columns in the bottom grid.

Lock Key Columns
Allows to keep an area of a worksheet visible while you scroll to another area of the worksheet, you can lock key columns in one area by freezing or splitting panes.

Hide unmodified columns
If this checkbox is checked, only columns that contain differences are displayed in the grid.

Show comparison results in a detached window
Click to show Comparison Data Details Grid in a detached window.

Collapse Pane
Click to collapse Comparison Data Details Grid.

Expand Pane
Click to expand Comparison Data Details Grid. The button appears only if Comparison Data Details Grid was collapsed previously.

Shortcut Menu of the Comparison Data Details Grid

The shortcut menu of the Comparison Data Details Grid of a Data Compare document contains the following options (options identical to the ones available on the toolbar are omitted):

Best Fit
Fits the size of the selected column to the size of data available in it.

Best Fit (all columns)
Fits the size of each column displayed in the grid to the size of data available in it.

View Difference
Opens the Data Viewer window where differences between records can be viewed. If the Data Viewer window is already opened, it makes this window active.

The status bar in the bottom of the grid displays the number of differences in each column shown in it.

See Also

Data Compare


Database Administration Tools

dbForge Studio for MySQL provides you administrative tools, that allows to perform different database administration tasks.

In This Section

Server Variables Window
Describes user interface elements of Server Variables window.

Session Manager
Describes user interface elements of Session Manager.

Flush Dialog Box
Describes user interface elements of Flush dialog box.

Service Control Windows
Describes user interface elements of windows for service manipulation.

Table Maintenance Wizard
Describes Table Maintenance Wizard fields and options.

See Also

Performing Administration Tasks


Server Variables Window

Use Server Variables window to view and edit MySQL server variables. To call Server Variables window, select [image] Server Variables from Database menu.

Grid

Name
Contains variable names (marked with bold if the variable value can be changed).

Value
Contains variable values.

Description
Contains brief variable descriptions.

Toolbar

Connection
Choose the needed connection from the combobox.

System
Click to view system variables.

Status
Click to view status variables.

Refresh
Click to refresh variable values.

Group by category
Click to group variables by category for easier viewing.

Export
Click to export server variables grid with the Data Export Wizard.

See Also

Database Administration Tools

Session Manager


Session Manager

Use Session Manager to observe and manipulate sessions.

To call Session Manager, select [image] Session Manager from the Database menu.

The main part of the Session Manager is the grid displaying the list of current database sessions.

The rest of the Session Manager is a box, where query text is displayed, if the session is executing Query command.

Grid

Id
The connection identifier.

User
Name of the user associated with the session.

Host
The hostname and port (after the semicolon) of the client issuing the statement.

Database
Default database, if it was selected.

Command
Command, executing by the session.

Time
The time in seconds between the start of the statement or command and now.

State
Action, event, or state of the session.

Toolbar

Refresh Sessions
Refreshes information about sessions.

Kill Query
Aborts the statement that the connection is currently executing, but leaves the connection itself intact (on MySQL server 5.0 and higher).

Kill Session
Disconnects session. Currently running operation will be aborted.

Kill User Sessions
Disconnects all sessions of the user, whose session was selected in the Session Manager.

Customize Session Columns
Displays Visible Columns dialog box, where you can adjust session information column set and their order. Not available when Full Session Information is on. To show/hide the column select/deselect the corresponding check box left of the column name in the window. To change columns order drag the required column to the desired location. Click OK to apply changes.

See Also

Database Administration Tools

Flush Dialog Box


Flush Dialog Box

Use Flush dialog box to perform flush operation in MySQL. You need RELOAD privilege to use it. To show Flush dialog box, select [image] Flush from theDatabase menu.

Tables
Select to close all opened tables and flush query cache.

Logs
Select to flush MySQL logs.

Status
Select to reset some status variables to zero.

Privileges
Select to Reloads the privileges from the grant tables in the MySQL database.

Tables with read lock
Select to close all open tables and lock all tables for all databases with a read lock. You should execute UNLOCK TABLES manually later.

Note

Use this option at your own risk.

Query cache
Select to defragment the query cache to better utilize its memory.

DES keys
Select to reload the DES keys from the file that was specified with the --des-key-file option at MySQL server startup time.

Per-hour user resources
Select to reset all per-hour user resources to zero.

Hosts
Select to empty the host cache tables.

Do not write binary log
If selected, FLUSH statement will be not written to binary log.

See Also

Database Administration Tools

Service Control Windows


Service Control Windows

This section describes user interface elements of service management windows

In This Section

Service Control Window
Information about Service Control window.

Add Services Dialog Box
Describes dialog you can use to add services to Service Control list.

Associated Connections Dialog Box
Describes dialog you can use to associate connections with a service.

See Also

Database Administration Tools

Table Maintenance Wizard


Service Control Window

Service Control window allows you to manage MySQL services. To show Service Control window, select [image] Service Control from Database menu.

Service Control window lists added services of the local and remote computers. It has following toolbar buttons:

Add Service
Calls Add Services dialog box, that allows you to add services to the list.

Associated Connections
Calls Associated Connections dialog box, that allows you to associate services with connections.

Refresh
Refreshes state of services in the list.

Start Service
Starts selected service.

Stop Service
Stops selected service.

Restart Service
Restarts selected service.

See Also

Service Control Windows

Add Services Dialog Box


Add Services Dialog Box

Use Add Services dialog box to add services to the Service Control list. To show the dialog box, click the [image] Add service button on the Service Control window toolbar.

Host
Enter name of the host, to add its services.

Scan
Scans services on the specified host.

Available services
List of available services on the specified host.

Show all services
Select to show all services. Otherwise, only services with name, starting from the "MySQL".

Add
Adds selected services to the Service Control and closes the dialog.

See Also

Service Control Windows

Associated Connections Dialog Box


Associated Connections Dialog Box

Use Associated Connections dialog box to associate connections with a service. To show the dialog box, click the [image] Associated connections button on the Service Control window toolbar.

Service
Service to associate connections with.

Connections
List of connections. Select connections to be associated with the service here.

See Also

Service Control Windows

Table Maintenance Wizard


Table Maintenance Wizard

Use Table Maintenance Wizard to perform table maintenance operation (checking, analyzing, repairing and optimizing). You can access Table Maintenance Wizard by choosing [image] Table Maintenance from the Database menu. Wizard's pages are listed below.

In This Section

Source, Table Maintenance Wizard
Choose source objects for the maintenance on this page.

Options, Table Maintenance Wizard
Choose maintenance operation type and options on this page.

See Also

Database Administration Tools


Source, Table Maintenance Wizard

Choose tables to perform the maintenance operations for on this page.

Connection
Select a connection from the drop-down list box.

Database
Select a database from the drop-down list box.

Tables
Select tables for maintenance from the list.

Search
Type filter string here.

See Also

Table Maintenance Wizard

Check Operation Options, Table Maintenance Wizard


Options, Table Maintenance Wizard

Choose maintenance operation type on this page.

Analyze
Use this operation to analyze and store the key distribution for table(s). During the analysis, the table is locked with read for InnoDB and MyISAM,

Optimize
Use this operation to reorganize the physical storage of table data and associated index data, to reduce storage space and improve I/O efficiency when accessing the table.

Check
Use this operation to check a table for errors. For MyISAM tables, the key statistics are updated as well.

Checksum
Use this operation to check checksum for the contents of a table.

Repair
Use this operation to repair a possibly corrupted table.

Options for the Analyze Operation

Do not write to BINLOG (local)
If selected, table maintenance operation will be not written to binary log.

Options for the Optimize Operation

Optimize FULLTEXT only
Select to optimize only columns that are parts of the FULLTEXT indexes in InnoDB tables.

Number of words to optimize per run
Specify the number of words to optimize per run.

Do not write to BINLOG (local)
If selected, table maintenance operation will be not written to binary log.

Options for the Check Operation

Check Mode
Select a check mode from the drop-down list box. There are three modes available:

Extended
Select to perform a full key lookup for all keys for each row. This ensures that the table is 100% consistent, but takes a long time. Applies only to MyISAM tables and views; ignored for InnoDB.

Medium
Select to scan rows to verify that deleted links are valid. This also calculates a key checksum for the rows and verifies this with a calculated checksum for the keys. Applies only to MyISAM tables and views; ignored for InnoDB.

Quick
Select to skip scanning the rows to check for incorrect links. Applies to InnoDB and MyISAM tables and views.

Fast
Select to check only tables that have not been closed properly.

Changed
Select to check only tables that have changed since the last check.

Options for the Checksum Operation

Quick (if supported)
Select to return the "live" table checksum. Applies to the MyISAM tables created with the CHECKSUM=1 clause, or with CHECKSUM TABLE. If the table does not meet the criteria, the Quick method returns NULL.

Options for the Repair Operation

Do not write to BINLOG (local)
If selected, table maintenance operation will be not written to binary log.

Quick
Repairs only the index tree.

Extended
Creates the index row by row.

Use information from the .frm file
Re-creates the .MYI file using information from the .frm file.

See Also

Database Administration Tools

Reference


Database Connection

This section describes Data Connection user interface elements.

In This Section

Database Connection Properties Dialog Box
Information about connection parameters.

Connect to MySQL Database Dialog Box
Describes the dialog you can see when connecting to the server without having specified a password.

Connection Manager Dialog Box
Describes the dialog that allows you to manage database connections.

Connect to Server Dialog Box
Describes the dialog that allows you to establish a connection to a server


Database Connection Properties Dialog Box

Use this dialog box to setup or change database connection parameters. You can access it by clicking the New Connection button on the Database Explorer window toolbar or selecting the appropriate item from the tree view shortcut menu. Tabs of this dialog box are described below.

Note

The Database Explorer is not available in the dbForge Data Compare for MySQL, dbForge Schema Compare for MySQL, and dbForge Data Generator for MySQL.

In This Section

General, Database Connection Properties Dialog Box
You can set login information required to connect to the MySQL Server here.

Advanced, Database Connection Properties Dialog Box
You can set additional options to tune and better manage database connections here.

Security, Database Connection Properties Dialog Box
You can set SSL and SSH protocol parameters here.

HTTP, Database Connection Properties Dialog Box
You can set HTTP tunneling parameters here.

Embedded, Database Connection Properties Dialog Box
You can set parameters to connect to an embedded server.

See Also

Database Connection

Connect to MySQL Database Dialog Box


General, Database Connection Properties Dialog Box

Use the General tab of the Database Connection Properties dialog box to enter the following parameters to establish the connection to the MySQL Server:

Connection Type
Select an appropriate connection type from the drop-down list. The following connection types are available:

TC/IP
Select to connect the the MySQL server via TC/IP.

Named pipe
Select to connect to the Oracle Server via a named pipe.

Host
The name or IP address of the MySQL Server host to which to connect. Leaving this field empty means using localhost. For example, you may specify localhost in the following ways:

· by leaving this field empty
· by specifying host name localhost
· or by specifying its IP address - 127.0.0.1 or its real IP.

Note

You can try using the IP address of the MySQL Server host rather than its domain name, if the domain name contains a subdomain and you are getting the following error: 'Can't connect to MySQL server on '*****.******.**' (10061)'.

Port
Specify MySQL Server connection port; default value is 3306. TC/IP connection only.

Pipe
Specify the pipe name in this box. Named pipe connection only.

User
The name of the user account on the MySQL Server. (The default MySQL user is 'root').

Password
The password of the user account on the MySQL Server (optional).

Allow saving password
Select to save the password among the other connection parameters.

Database
Use the drop-down list to select the name of the MySQL database you want to connect to, or enter it manually. The list is available only if other viable connection parameters are specified.

Note

It is recommended to set a default database. It will be used in statements that reference database objects without specifying their owner. Without the default database you cannot turn off Show All Objects mode for the connection, some stored routines cannot be created or edited, and statements that reference database objects without specifying their owner cannot be executed.

Show all databases
If checked (by default), you will see in the Database Explorer all databases available on the MySQL Server. The database you select from the list will be considered as default. If this option is unchecked, you will see only the default database.

Note

The Database Explorer is not available in the dbForge Data Compare for MySQL, dbForge Schema Compare for MySQL, and Data Generator for MySQL

Connection Name
Enter a user-friendly connection name. If you do not specify the name, it is auto-generated like this: [selected database].[MySQL Server host]:[MySQL Server port]. Connection name does not affect SQL statement syntax or execution. It cannot be used as your database alias.

Document Category
You can assign a category for a document to associate it with a specific connection.

Test connection
Click this button to verify that you have correctly specified all required parameters and connection can be established.

See Also

MySQL Database Connection Properties Dialog Box

Advanced, Database Connection Properties Dialog Box


Advanced, Database Connection Properties Dialog Box

dbForge Studio for MySQL offers a number of useful features to tune and better manage database connections.

Connection timeout
You can specify the required time period after which dbForge Studio for MySQL stops its attempts to get response from the MySQL Server to open a connection. Note, zero means to wait infinitively.

Execute timeout
You can specify the required time period after which dbForge Studio for MySQL stops its attempts to execute a query. Note zero means to wait infinitely.

Encoding
By default, the client connection character set is UTF-8. You can select the required encoding from the drop-down list.

Detect MySQL character set
When selected, dbForge Studio for MySQL automatically identifies the character set used by the MySQL Server after the connection is created.

Use compression
If selected, dbForge Studio for MySQL will use compression when exchanging data with the MySQL Server to reduce the traffic.

Keep connection alive
If selected, dbForge Studio for MySQL will ping the MySQL Server to validate the status of the open connection. This will save your time when reconnection is required.

Ping timeout
The time period after which dbForge Studio for MySQL will ping the MySQL Server to validate the status of the open connection.

See Also

MySQL Database Connection Properties Dialog Box

Security, Database Connection Properties Dialog Box


Security, Database Connection Properties Dialog Box

If you want to protect your information, transmitted between the MySQL Server and the client application, you need to encrypt the communication. dbForge Studio for MySQL offers two types of secure network connections: using SSL and SSH protocols.

On the Security tab of the Database Connection Properties dialog box, you can enter the following parameters to establish secure connections to the MySQL Server:

Use Security Protocol
Turns on/off using security protocols - either SSL or SSH.

SSL
Select it to use SSL (Secure Sockets Layer) protocol to connect to a MySQL Server.

SSH
Select it to use SSH (Secure Shell) protocol to connect to a MySQL Server.

SSL Connection

The following parameters are available:

Client key
The location of the client private key. Click the button to specify the location or enter it manually.

Client certificate
The location of the client certificate. Click the button to specify the location or enter it manually.

Authority certificate
The location of the authority certificate. Click the button to specify the location or enter it manually.

Cipher
The list of allowed ciphers. The following ciphers are allowed in dbForge Studio for MySQL:

· DES(40)
· DES(56)
· 3DES(168)
· AES(128)
· AES(256)
· RC4(40)
· RC4(128)
· RC2(40)

SSH Connection

The following parameters are available:

Password authentication
Select it to enable the SSH Server and MySQL Server to use a password of a user account on the SSH Server as the authentication method. This will enable you to enter the following parameters:

Host
The name or IP address of the SSH server.

Port
The TCP/IP port to connect to the SSH Server. By default, it is 22.

User
The user name on the machine where the SSH Server is running. It is a Windows user, not a user of the MySQL Server.

Password
The password of a user account on the SSH Server.

Save password
Check it to save the password for the next time.

Keyboard Interactive Mode
If this option is checked, when connecting to the server for the first time user gets a request to set some options that are being processed afterwards and the second connection attempt is made.

Public key authentication
Select it to enable the SSH Server and MySQL Server to use a pair of public and private keys as the authentication method. (You can generate the keys by a key generator tool, for example, PuTTygen.) This will enable you to enter the following parameters:

Host
The name or IP address of the SSH Server.

Port
The TCP/IP port to connect to the SSH Server. By default, it is 22.

User
The user name on the machine where the SSH Server is running. It is a Windows user, not a user of the MySQL Server.

Passphrase
The passphrase for a private key file located on your machine. You can set it while generating public and private key files through a key generator tool, for example PuTTygen.

Save passphrase
Check it to save the passphrase for the next time.

Private key
The private key file location on your local machine. Click the button in the field to specify the location or enter it manually.

See Also

MySQL Database Connection Properties Dialog Box

HTTP, Database Connection Properties Dialog Box


HTTP, Database Connection Properties Dialog Box

When you can't connect to the MySQL Server directly, for example a firewall blocks access from all network protocols, except HTTP, you can use HTTP tunneling. HTTP tunneling is a method of connecting to a MySQL Server through HTTP/HTTPS protocol and using port 80, which is used by a web browser.

On the HTTP tab of the Database Connection Properties dialog box, you can enter the following parameters to use HTTP tunneling for connecting to the MySQL Server:

Use HTTP tunnel
Turns on/off the usage of HTTP tunnel to connect to the MySQL Server.

URL
Enter the URL of the tunnel.php script uploaded to the web server.

Keep connection alive
Select this check box to make the web server preserve the created connection open between requests.

Use Base64
Specifies whether to encode data to the MIME base64 format before sending them with the POST Request.
Some proxy servers process ROW data in the POST request incorrectly because they process some characters as HTTP protocol control characters. Base64 encoding is used to avoid such situations. Note that Base64-encoded data take about 33% more space than original data. Use this parameter only if necessary.

Use credentials
Select this check box if the tunneling script is located on the password-protected server and you need to enter the login information to connect to it.

User
Enter the name of the web server user account.

Password
Enter the password used by the user account on the web server.

Save password
Select this check box to save the password for the next time.

Use proxy server
Select this check box if you can not access the web server directly, but only through a proxy server. This will allow you to enter proxy settings.

Address
Specify the proxy server address.

Port
Enter the port used by proxy server.

User
Enter the name of the proxy user account.

Password
Enter the password used by the proxy user account.

Save password
Select this check box to save the password for the next time.

See Also

MySQL Database Connection Properties Dialog Box

Embedded, Database Connection Properties Dialog Box


Embedded, Database Connection Properties Dialog Box

On the Embedded Server tab of the Database Connection Properties dialog box you can enter the following parameters to establish a connection to the embedded server:

Use embedded server
Select it to use the embedded server library, instead of connecting to the server application.

Use my.ini file
If selected, my.ini settings are used for the embedded server, otherwise base and data directory should be set.

Base folder
Specify a location of the base folder for the embedded server. Click the button or enter it manually.

Data folder
Specify a location of the folder where embedded server stores its databases. Click the button or enter it manually.

See Also

MySQL Database Connection Properties Dialog Box

Database Connection


Connect to MySQL Database Dialog Box

The dialog box appears when you connect to the server without having specified a password.

Host
The host name of the MySQL server.

Port
The TCP/IP port to connect to the MySQL server.

MySQL login

User
The MySQL login account.

Password
The password for the MySQL login account.

See Also

Database Connection

Connection Manager Dialog Box


Connection Manager Dialog Box

Connection Manager dialog box allows you to create, edit, and delete database connections.

Dialog Box Controls

Dialog box contains the following controls:

Connections
The list of the existing database server connections.

New
Click to open Database Connection Properties dialog box for creating a new connection.

Edit
Click to open Database Connection Properties dialog box for editing a connection.

Delete
Click to delete the connection.

Connection String
Displays a connection string, containing the connection parameters, for the selected connection.

See Also

Database Connection

Connect to Server Dialog Box


Connect to Server Dialog Box

This dialog allows you to establish a connection to a server. The dialog displays connections' server, database, user and name.

Dialog Box Controls

Dialog box contains the following controls:

Connections
The list of the existing database server connections.

Connect
Click this button to establish a connection to the selected server.

New Connection
Click this button to create a new connection using the Database Connection Properties dialog box.

See Also

Database Connection


Database Designer

This section contains information on Database Designer user interface elements.

In This Section

Diagram Document
Describes elements available on diagram document.

Diagram Shapes
Describes interface elements of diagram shapes.

Diagram Overview Window
Describes the Diagram Overview window.

Virtual Relation Properties Dialog Box
Describes properties of the Virtual Relation Properties dialog box.

Virtual Relation Manager Window
Describes how to manage virtual relations using this window.

Create New Unique Index Message
Describes how to answer the prompt to add a unique index to a referencing table.

Hyperlink Properties Dialog Box
Describes properties of added hyperlinks.


Diagram Document

Diagram document is used to manage database diagrams. You can view and add different objects, foreign keys, and call editors to modify them. The saved diagram document has the '*.dbd' extension.

Database diagram document interface elements are listed below.

Diagram toolbar

New Selection
Enables to manage diagram elements.

New Table
Enables to create a new table on a diagram. Tables are displayed on the diagram as blue rectangular shapes.

New View
Enables to create a new view on a diagram. Views are displayed on the diagram as green rectangular shapes.

New Procedure
Enables to create a new procedure on a diagram. Procedures are displayed on the diagram as green rectangular shapes.

New Function
Enables to create a new function on a diagram. Functions are displayed on the diagram as violet rectangular shapes.

New Relation
Enables to create a new relation between diagram elements.

New Virtual Relation
Enables to create a new virtual relation between diagram elements.

New Container
Enables to create a new container on a diagram. Containers are displayed on the diagram as orange rectangular shapes. You can place various diagram objects onto the container.

New Note
Enables to create a new note on a diagram. Notes on the diagram contain additional information.

New Stamp
Enables to create a new stamp on a diagram. On the stamp, you can specify essential information about the diagram (e.g. date, company name, author, etc.)

New Image
Images can be added to the diagram from external sources.

Show Comments
Shows diagram elements' comments.

Virtual Relation Manager
Opens Virtual Relation Manager.

Refresh
Refreshes data of a diagram document.

Stop Refresh
Stops refreshing data.

Diagram shortcut menu

New
Point to New to create any diagram object: table, view, procedure, function, etc.

Zoom
Zoom your diagram in or out.

Preserve Routing
Select it to preserve the routing of relation links on the diagram.

Layout Diagram
The application adjusts diagram layout as it considers best.

Export to Image
Saves your diagram as an image.

Select All
Selects all shapes on the diagram.

Synchronize Document Outline
Synchronizes Document Outline tree with diagram objects.

Options
Calls Options window to specify diagram options.

See Also

Database Designer


Diagram Shapes

Diagram may contain different kinds of shapes. They are database object shapes, containers, notes, and stamp. Most shapes have caption with shape name and the [image] button, that allows collapsing and restoring shapes. When you select a shapes, the size handles (small squares at the shape edges) are displayed. You may use size handles to change the shape size. Some shapes have eight size handles, allowing you to change both height and width of the shape, and some shapes have only two size handles, allowing you to change only width of the shape.

In This Section

Table Shapes
The topic describes table shapes.

Relations
The topic describes foreign key relations.

Database Object Shapes

Diagram displays the following database objects as shapes:

· Tables
· Views
· Stored procedures
· Stored functions

View shapes are light green dotted rounded rectangles. They consist of the caption and the list of columns.

Note

Nullable view columns have grey color, and non-nullable view columns have black color in the column list.

Stored procedures are displayed as pink colored rounded rectangles with caption and parameter list. Stored functions are rectangles with caption and parameter list having light purple color.

View and stored routine shapes have only two size handles. Only their width can be resized.

Note that selected skin affect shape colors.

Containers

Containers are large rounded rectangles with caption. They can contain any other shapes including other containers.

Notes

Notes are just yellow rectangles with text that you can edit. They don't have caption or other user interface elements.

Stamp

Stamp is a rounded rectangle with several changeable fields. You can change any field value by double-clicking the field and entering the needed value.

See Also

Database Designer

Diagram Shapes

© 2004-2018 Devart


Table Shapes

Table shape represents database table on a diagram. Table shape is rectangular if its primary key does not contain foreign key columns. Otherwise table shape is a rounded rectangle. It consists of the following parts:

Caption
Table name with the [image] button, allowing you to collapse and expand table shape.

Column list
Contains table columns. By default column list consists of two parts, separated with a horizontal line - the first part contains primary key columns, and the second part contains other columns. You can turn this separation off in the Notation Options.

Note

Nullable table columns have grey color, and non-nullable table columns have black color in the column list.

The icons near the column name have the following meaning:

- Foreign key column.

- Primary key column.

- This column belongs to both primary and foreign key.

Compartments
There are some expandable compartments with table indexes, constraints, and triggers (if the table has any) below the column list. You may disable their display in the diagram options. You may expand and collapse these compartments with + and - buttons correspondingly.

See Also

Table Shapes

Database Designer


Relations

Foreign key relations are displayed as lines connecting tables. Their appearance depends on the selected notation and relation cardinality.

See Also

Diagram Shapes

Database Designer


Diagram Overview Window

Use this window to get a better overview of large diagrams while working with them. You can quickly zoom in and out the diagram to see where the required diagram items are, move to them, and grasp the whole picture.

To open the Diagram Overview window, click the [image] Diagram Overview icon on the Diagram toolbar, or, in the View menu, click Other Windows, and then click Diagram Overview. Alternatively, you can use the Ctrl+W,V hot key combination to call this window.By default, the window will be docked to the right corner of dbForge Studio, but you can move or dock it the same way as you do with other windows in dbForge Studio.

The Diagram Overview window has a blue selection box that highlights the area currently displayed on the diagram. Use this box to move to a required item on the diagram. To move in a strictly horizontal or vertical direction, move the blue selection box holding down the Shift key. You can re-size the box to change the zooming level on the diagram.

To zoom in and out the diagram, you can hold down the Ctrl key and roll the mouse wheel forward to zoom in the diagram or backward to zoom out.

See Also

Database Designer


Virtual Relation Properties Dialog Box

The Virtual Relation Properties dialog box contains the same properties as the Foreign Key Properties dialog box does.

The difference between these two dialog boxes is that the Foreign Key Properties dialog box contains properties of a physically existing foreign key and the Virtual Relation Properties dialog box contains properties of a virtual relation that can be converted into a physical foreign key.

See Also

Database Designer


Virtual Relation Manager Window

Use this window to view, edit, remove virtual relations, generate their DDL, convert to Foreign keys, etc.

To open the Virtual Relation Manager window, click the Virtual Relation Manager icon on the toolbar or point to Other Windows on the View menu, and click Virtual Relation Manager. The window contains the following virtual relation details:

Name
The name of the foreign key.

Table
The name of the referencing table.

Columns
The name of the referencing column(s).

Referenced Table
The name of the referenced table.

Referenced Columns
The name of the referenced column(s).

Delete Rule
The selected action that must happen on a row deletion. It can be Cascade, No Action, Set Null, or Restrict.

Update Rule
The selected action that must happen on a row update. It can be Cascade, No Action, Set Null, or Restrict.

To edit the virtual relation properties, do either of these actions:

· Double-click the required relation in the grid.
· Select the required relation in the grid and click the Edit Virtual Relation icon on the toolbar.

The Virtual Relation Properties dialog box will appear where you can edit the properties. It is the same as Foreign Key Properties dialog box.

To delete the virtual relation, do either of these actions:

· Select the required relation in the grid and click Remove from the Diagram icon on the toolbar.
· Right-click the required relation in the grid and select Remove from Diagram in the menu.

To convert a virtual relation to a foreign key, do either of these actions:

· Select the required relation in the grid and click the Convert to Foreign Key icon on the toolbar.
· Right-click the required relation in the grid and select Convert to Foreign Key in the menu. Click Yes in the appeared dialog box.

Note, to create a foreign key, the referenced table should have a unique index, otherwise dbForge Studio will prompt you to create it. Click Yes in the appeared dialog and the unique index will be added. For more information go to Create New Unique Index Message topic.

To generate schema script for a virtual relation, do either of these actions:

· Select the required relation in the grid and click the Generate Schema Script icon on the toolbar.
· Right-click the required relation in the grid and select Generate Schema Script in the menu.

The SQL document will open with the generated script. You can save it or execute immediately.

To group virtual relations, click the following icons:

- to group by a table

- to group by a referenced table

See Also

Database Designer


Create New Unique Index Message

Yes
Click it to automatically create a unique index in a referencing table. If dbForge Studio fails to create a unique index due to some error, you should change foreign key properties (or properties of a virtual relation if you are converting it into a foreign key) and try again.

No
Click it if you don't need to add a unique index. Note, in this case dbForge Studio will fail to create a foreign key. You should manually create a unique index and try creating again.

Don't show this message again
If you select this check box, next time during creating a foreign key, if a referencing table has no unique index, a new one will be added automatically without any notification.

Help
Click it to see quick information of this topic.

See Also

Database Designer


Hyperlink Properties Dialog Box

Use this dialog box to edit the hyperlink properties. To open it, right-click a note and select Hyperlink from the menu. In the dialog box you can specify the following details:

Specify the file path or URL
Enter a path or URL to a file location to create a link to it. Click the Browse button to select the path in the Open window. To delete a hyperlink from the note, clear this field.

Specify the link description
By default the link description is created based on the file name, but you can enter a required name. It will be displayed under the note text and you can click on it to open in dbForge Studio.

See Also

Database Designer


Database Projects

dbForge Studio for MySQL provides you projects feature. Project contains items that represent SQL scripts, query files and database object shortcuts. You can use Project Explorer to manage dbForge Studio project.

In This Section

New Database Project Wizard
This section describes windows of the New Database Project wizard.

Project Options
This section describes pages on which you can set project options.

Project Management Windows
This section describes user interface elements of the tool windows and dialogs concerned with project management.

See Also

Reference


New Database Project Wizard

Use New Database Project Wizard to create new database project or to import existing database objects to a new database project. You can access New Database Project Wizard by choosing New -> Project from the File menu. Wizard's pages are listed below.

In This Section

Name and Location, New Database Project Wizard
Choose project name and location and whether on this page.

Import Options, New Database Project Wizard
Specify connection and database to import database objects from and set additional import options on this page.

Import Objects, New Database Project Wizard
Select database objects to import on this page.

Options, New Database Project Wizard
Set options for DDL generation on this page.

Project Options, New Database Project Wizard
Select a project connection and whether to create virtual project folders for database object types for the project on this page.

Database Import Progress, New Database Project Wizard
You can see a database object import progress on this page.


Name and Location, New Database Project Wizard

Choose project name and location and whether on this page.

Name
Enter or select the name of the project.

Location
Enter or select a directory, in which project file will be stored.

Create a folder for the project
Indicates whether to create a separate folder, having the project name, in the selected location.

Import schema objects from the existing database
Select to import schema objects from existing database. Your project will contain selected schema objects from the selected database in either single script, or in separate files.

See Also

New Database Project Wizard

Import Options, New Database Project Wizard


Import Options, New Database Project Wizard

Specify connection and database to import database objects from and set additional import options on this page. This page is available only if user selected Import schema objects from existing database on the first wizard page.

Connection
Select a connection to import database objects from.

Database
Select a database to import database objects from.

Include all objects
Select to import all objects from the specified database. If selected, the Import Objects page will not be displayed.

Import all objects into a single file
Indicates whether to import all objects into a single file or create a separate file for each database object.

Create a physical folder on the disk for each object type
Indicates whether to create physical folder on the disk for each object type or store all files together in the project folder.

See Also

New Database Project Wizard

Import Objects, New Database Project Wizard


Import Objects, New Database Project Wizard

Select database objects to import on this page. This page is available only if user selected Import schema objects from existing database on the first wizard page and if the Include all objects option is not checked on the Import options page.

Database objects tree
Check database objects here to export their structure.

Selected objects list
Selected database objects to export structure are listed here. You can remove them from this list by double-clicking them.

Moves all database objects to the Selected objects list.

Moves database objects that are highlighted in the Database objects tree to the Selected objects list.

Removes the highlighted item from the Selected objects list.

Clears the Selected objects list.

See Also

New Database Project Wizard

Options, New Database Project Wizard


Options, New Database Project Wizard

Set options for DDL generation on this page.

General

Contains general settings for script generation.

Exclude DEFINER and SQL SECURITY clauses
Select to exclude DEFINER and SQL SECURITY clauses from the DDL generation.

Format the script
Select to format script. Otherwise, source objects script will have the same formatting as in database, the rest of objects will have default formatting.

Generate comments in the script
Select to insert comments in the script.

Include CREATE DATABASE statement
Includes CREATE DATABASE statement at the beginning of the export script.

Include DROP statement
Select to include DROP statements in the script.

Include IF EXISTS in DROP statement
Select to include IF EXISTS in DROP statements in the script. Depends on the Include DROP Statement option.

Include IF NOT EXISTS in CREATE statement
Select to include IF NOT EXISTS in CREATE TABLE, CREATE DATABASE, and CREATE USER (as of MySQL 5.7.6) statements in the script.

Include USE statement
Includes USE DATABASE statement at the beginning of the export script. Depends in Include CREATE DATABASE option.

Prefix object names with database name
Select to prefix object names with database name in the script.

Reset timestamp to CURRENT_TIMESTAMP for events
Select to reset event start time to CURRENT_TIMESTAMP in the script.

Use CREATE OR REPLACE
Select to use CREATE OR REPLACE instead of CREATE statement for objects' script generation.

Tables/Views

Options to control script generation for tables and views.

Disable constraints
Determines whether to add ALTER TABLE ... DISABLE statement before INSERT statements.

Disable foreign keys
Select to disable foreign key checks before creating a table.

Exclude column default values
Select to exclude column default values from the script.

Include additional object options
Select to include such options as row format, table autoincrement value, etc.

Include constraints
Select to include constraints fro tables in the script.

Include indexes
Select to include indexes for tables in the script.

Include object comments
Select to include comments of objects in the script.

Include triggers
Select to include triggers for tables in the script.

Partitioning

Contains options to control script generation for partitions.

Include partition clause
Select to include PARTITION clause in the script.

Include partition ENGINE
Select to include partition engine in the script. Depends on the Include Partition Clause option.

List individual hash partitions
Select to list individual hash partitions in the script. Depends on the Include Partition Clause option.

Users

Contains options of script generation for users.

Include an encrypted password
Select to include an encrypted password in the script.

Include global grants
Select to include global grants for users in the script.

Include object grants
Select to include any object grants for users in the script.

See Also

New Database Project Wizard

Project Options, New Database Project Wizard


Project Options, New Database Project Wizard

Select a project connection and whether to create virtual project folders for database object types for the project on this page.

Select a connection to use for the project deployment
Select project connection.

Create a virtual folder in the project for each object type
Select whether to create virtual project folders for database object types for the project. If you have selected the Create physical folder on the disk for each object type check box on the Import Options page, virtual project folders will be created and you cannot clear this check box.

See Also

New Database Project Wizard

Database Import Progress, New Database Project Wizard


Database Import Progress, New Database Project Wizard

You can see a database object import progress on this page. To cancel the import click the Cancel button.

Minimize application
Click to minimize application while the project creation is in progress. The application window will be restored when the wizard finishes working.

See Also

New Database Project Wizard

Database Projects


Project Options

Use this document to set project options. To open it, right-click the project in the Project Explorer and choose Properties from the shortcut menu.

In This Section

Build, Project Options
Set project build options on this tab.

Build Order, Project Options
Set build order on this tab.

Database, Project Options
Set database project options on this tab.


Build, Project Options

Set build project options on this tab.

Configuration

Select a required configuration from the drop-down list. For a newly created project only Default configuration is available. To create and manage configurations, click the Configuration Manager button.

Configuration Manager
Click this button to open the Configuration Manager dialog where you can add, remove or rename project configurations.

Note

The configuration you select in the project options relies only to Project Options document. If you build or deploy project, the configuration, selected in the Project toolbar is used.

Source validation

Check references
If this option is selected, database object references will be checked when building a project. That means, dbForge Studio checks if database objects are created before they are referenced in project scripts.

Ignore errors
Select to ignore all errors when building project.

Output

Build output path
Specify the output path for the generated script file.

Target file name
Specify the generated script file name.

Note

Project build will delete all SQL files having the same names as project files in this directory without user confirmation. dbForge Studio asks for confirmation before deleting any other SQL file. Non-SQL files in the build output directory are not affected by build.

Generating single SQL file
Select to build the project into a single SQL script.

Include file contents into region
Select to include file contents into region.

Write full path in comments
Select to write full path in comments.

Generate batch script file
Select to build the project into a batch script file, that calls project script files.

Place all project files into one folder
Select to copy all project files to the Build output path folder.

Generate relative paths and keep project folders
Select to copy project files with subfolders to the Build output path folder.

Only create batch file with absolute paths
Select to generate only batch file with absolute paths to the project scripts.

See Also

Project Options

Build Order, Project Options


Build Order, Project Options

Build Order options allows you to specify what files have to be included in the build output script and to determine the include order of the scripts contained in the project to the result build script. It shows the list of files included into the project and the information about these files location.

Configuration

Select a required configuration from the drop-down list. For a newly created project only Default configuration is available. To create and manage configurations, click the Configuration Manager button.

Configuration Manager
Click this button to open the Configuration Manager dialog box where you can add, remove or rename project configurations.

Note

The configuration you select in the project options relies only to Project Options document. If you build or deploy project, the configuration, selected in the Project toolbar is used.

Grid columns

Select All Check Box
Selects all grid rows. To select separate rows, use row selection check boxes.

File name
Shows name of the file.

Project folder
Shows path to a file in the project (virtual project folders).

Disk folder
Shows path to the file.

Buttons

Move Up
Moves selected file one position up in the list.

Move Down
Moves selected file one position down in the list.

Duplicate
Creates a copy of the selected file entry (entries). You can also copy, cut and paste file entries to create their copies. You can use this button to include files to the build order several times.

Delete
Deletes the selected file entry (or entries) if the entry is not the last entry for a file. If the file is included to the build order only once, it can not be deleted from the build order. Clear its check box to avoid the file execution when deploying the project.

Restore Defaults
Restores default deployment order (all files selected, they have the same order as in project manager).

See Also

Project Options

Database Projects


Database, Project Options

Set database project options on this tab.

Configuration

Select a required configuration from the drop-down list. For a newly created project only Default configuration is available. To create and manage configurations, click the Configuration Manager button.

Configuration Manager
Click this button to open the Configuration Manager dialog where you can add, remove or rename project configurations.

Note

The configuration you select in the project options relies only to Project Options document. If you build or deploy project, the configuration, selected in the toolbar is used.

Connection

Select project connection here.

Target database name
Name of the target database.

Server version
Select MySQL server version for the project. When building, DDL for the selected server version will be generated.

Default storage engine
Select default table storage engine here. It will be set for the tables, that have no storage engine specified in their DDL.

Database collation
Determines target database collation.

Import settings
Click to import settings from a connection.

Convert table names to lowercase
Select to convert table names to lowercase when building.

Always re-create database
Select to replace the database with a new one while building the project. If the option is selected, the following statement will be generated: DROP DATABASE IF EXISTS ... CREATE DATABASE ...

Definer

Keep Original
Determines DEFINER clause for the stored routines and views, that does not have DEFINER clause in their DDL. Definer determines the user account, the view or stored routine that should be executed using the access rights of, unless they have SQL SECURITY INVOKER statement in their DDL.

Definer is specified in the following form: user@host, where user is a user account name (up to 16 characters), and host is a host, from which the user can connect to the server to use this account (either a host name or IP address). You may use '%' character to specify any host except localhost. The '%' character may be used in a host name or in IP. For example, '%.mydomain.com' in a host name means any host from domain 'mydomain.com'. '144.155.166.%' means any host from 144.155.166 class C subnet. You may also use CURRENT_USER function to specify a current user as a definer.

Remove Definer Clause
If selected, definer clauses will not appear in the project build output even if they exist in the project script.

Replace with
Replaces DEFINER clauses in SQL files with the clause, specified in this field.

Note

Some fields, such as Default storage engine, Keep original, Remove definer clause, Convert table names to lowercase, may be unavailable if you have selected the Keep original object scripts check box in the Build, Project Options.

See Also

Project Options

Database Projects


Project Management Windows

This section describes user interface elements of the tool windows and dialogs concerned with project management.

In This Section

Project Explorer Window
This window allows you to manipulate project items.

Schema View Window
This window provides you fast access to project database object DDL queries.

Configuration Manager
This dialog box allows you to add, remove, or rename project configurations.

Save New Project Dialog Box
This dialog box allows you to save a new project.

New Project Configuration Dialog Box
This dialog box is used for creating new project configurations.

Add New File Dialog Box
This dialog box is used for creating new files and adding them to project.

See Also

Database Projects


Project Explorer Window

Use the Project Explorer window to manipulate project items to organize your project. With the Project Explorer you can access project script files and queries, open selected database objects and find them in Database Explorer, organize project files into folders for convenient access.To access the Project Explorer window, choose Project Explorer from the View menu.

Project Explorer contains a tree with nodes, representing project, its folders and files, the project connection and database object shortcuts. Project Explorer allows you to do the following:

· See and quickly access all SQL and query files of the project, as they are accurately organized as a tree.
· Add new files to the project.
· Add existing SQL and query files to the project.
· Edit or delete files in the project.
· Drag-and-drop files to ensure their best location within the project tree.
· Create and then rename folders and subfolders in the project to neatly distribute multiple files into them.
· Delete folders and subfolders from the project.
· Move folders by drag-and-dropping them to include one into another, creating subfolders and getting the desired folder structure.

Note, you can right-click in Project Explorer and select the required option to manage project's files.

Shortcut Menu

Build <Project name>
Build the opened project.

Synchronize <Project name> with server
Compares project with server and opens comparison document to analyze and start synchronization.

Deploy <Project name>
Deploy your project.

Build order
Goes to the Build Order tab in project options.

Configuration manager
Opens Configuration Manager window.

New schema comparison
Opens New Schema Comparison wizard. Your project will be specified as Source.

Add new file
Lets you add a new file to the project.

Assign connection
Opens the Connection Manager window and lets you choose a connection fro your project.

Add existing file
Lets you add an existing file to your project.

Add folder
Adds new folder to your project.

Save <Project name>
Saves the project.

Close project
Closes the project.

Open
Opens the selected file in the editor.

Exclude from project
Removes the selected file from project.

Rename
Renames the selected object.

Delete
Deletes the chosen file permanently.

Refresh
Refreshes the project tree.

Properties
Opens the Properties window for the selected element of the tree.

Find in Database Explorer
Click to locate the connection available in project, in Database Explorer.

See Also

Project Management Windows

Schema View Window


Schema View Window

Schema View displays database objects created by the scripts available in the project you are developing. When defined in the script explicitly, the target schema is displayed in Schema View with all objects contained in it. If the name of the schema is not mentioned in the script, the database objects are shown in the node <user>. When fulfilling the deploy operation, these objects are created in the schema which was assigned to the project.

You can access Schema View by selecting Schema View from the View menu.

Toolbar

Back
Move the cursor back.

Forward
Move the cursor forward.

Object View Search
Enter search condition in this box.

Search
Starts search.

Clear Search Results
Clears search results and displays all objects.

Shortcut Menu

Go to definition
Opens the script containing each object's Create statement. The script opens with the carriage at the beginning of the required line.

View in Project Explorer
Locates the object in the Project Explorer window.

Sort alphabetically
Orders the objects by their names.

Sort by object type
Organizes the objects by their type.

Group by object type
Arranges items in a separate folder according to the object type

Delete
Deletes the selected object.

See Also

Project Management Windows

Configuration Manager


Configuration Manager

Use the Configuration Manager dialog box to add, remove or rename project configurations. To open Configuration Manager, select Configuration Manager from the Configuration drop-down list on the Project toolbar.

Configuration
List of available configurations.

Add
Create a new configuration.

Remove
Remove selected configuration.

Rename
Renames the selected configuration.

Set Active
Set the selected configuration as active configuration (configuration that will be applied for building or deploying).

See Also

Project Management Windows

Save New Project Dialog Box


Save New Project Dialog Box

Use the Save New Project dialog box to save a new project. To access this dialog box, create a new project, right-click it in the Project Explorer and select Save Project from the shortcut menu.

Name
Name of the project.

Location
Path to the project.

Create folder for project
Creates a directory with the same name as the project in the project path directory.

See Also

Project Management Windows

New Project Configuration Dialog Box


New Project Configuration Dialog Box

Use this dialog box to create a new configuration. It is displayed when clicking the Add button in Configuration Manager.

Name
Specify the name of a new configuration.

Copy Settings From
Select an existing configuration to copy settings from it to the new configuration.

See Also

Project Management Windows

Add New File Dialog Box


Add New File Dialog Box

Use the Add New File dialog box to add new file to the project.

At the upper right corner there are two buttons - Large Icons and Small Icons. They change templates appearance in the box below. You can choose file template in the Templates box to create file on predefined template.

A brief template description is provided in the box below when template is selected.

Enter file name into the Name field, then click the Add button to create the file and add it to the project or click the Cancel button to close the dialog.

See Also

Project Management Windows

Database Projects


Data Editor

This section provides information on data managing windows and dialogs.

In This Section

Data Viewer Window
Describes how to view large field values using the Data Viewer tool window.

Data Editor Window
Describes user interface elements of the Data Editor window.

Custom AutoFilter Dialog Box
Tells how to build a custom filter for a data column.

Filter Editor Dialog Box
Describes how to build complex filter conditions for table data.

Visible Columns Dialog Box
Tells how to filter data by hiding some columns.


Data Viewer Window

Data Viewer is a tool which allows simple viewing fields with the following data types: BINARY, CHAR, VARCHAR, BLOB, TINYBLOB, MEDIUMBLOB, LONGBLOB, TEXT, TINYTEXT, MEDIUMTEXT, LONGTEXT, VARBINARY.

The control automatically detects type of the content of the BLOB field and represents it as an image, text, rich text or hex dump. To open the window, click Data Viewer on the View menu. Then just select the text or BLOB field, and its content appears in the Data Viewer window.

Load Data
Replaces the cell content with the data from the file. It opens the Open File dialog where you can select a required file and specify the encoding which should be applied to open and save the file content.

Save Data
Opens the Save File As dialog to save data to a file.

Note

If you try to save more data than the selected column type can store, the data will be truncated.

Save Data at the Left
Saves data displayed in the left part of the window to a file.

Save Data at the Right
Saves data displayed in the right part of the window to a file.

Note

The Save Data at the Left and Save Data at the Right options are available for comparison results.

Null Data
Sets the cell value to NULL.

Apply Changes
Click to apply changes.

Cancel Changes
Click to cancel changes.

Copy Entire Cell Value
Copies the cell data into the clipboard.

Paste Entire Cell Value
Replaces the cell data with the data from the clipboard. The format of the pasted data is automatically detected and the required view is set.

Cut Entire Cell Value
Cut the cell data placing it to the clipboard.

Hexadecimal View
Shows cell data as hex dump.

Text View
Shows cell data as a text.

XML View
Shows the cell data as structured XML.

HTML View
Shows the cell data as HTML.

Rich Text View
Shows cell data as a rich text.

PDF View
Shows the cell data as PDF.

JSON View
Shows cell data as a JSON string.

Image View
Shows cell data as an image.

Spatial View - Geometry
Shows geometry data as an image. The image in the view can be moved with the mouse pointer. The image can be also zoomed in and out. To zoom the image in, hold down the Ctrl key and roll the mouse wheel forward. To zoom the image out, hold down the Ctrl key and roll the mouse wheel backward.

Fit Image
Fits an image to the size of the window.

View White Space
Shows each white space with a green character.

Word wrap
Displays any portion of a line that extends horizontally beyond the viewable editor area on the next line.

Note

You can copy all data in the cell by using the CTRL+SHIFT+C shortcut. Format of the copied data will depend on the selected view. For example, if the Hexadecimal view is selected, the data will be copied in hex order; data in the Text view, will be copied in text format, etc.

See Also

Data Editor

Custom AutoFilter Dialog Box


Data Editor Window

This topic describes the Data Editor window user interface elements.

Refresh Data
Use this option to refresh data.

Stop Refresh Data
Use this option to stop refresh operation.

Paginal Mode
Use the Paginal Mode to simplify data view by dividing it into parts.

Go To First Page
Click the Go To First Page button to open the first part page of data.

Go To Previous Page
Click the Go To Previous Page button to open the previous part page of data.

Go to Next Page
Click the Go to Next Page button to open the next part page of data.

Go To Last Page
Click the Go To Last Page button to open the last part page of data.

Switch To Grid View
Click the Switch To Grid View button on the data view toolbar to switch to the Grid View mode.

Switch To Card View
Click the Switch To Card View button to switch to the Card View mode.

Show Group By Box
Click the Show Group By Box button to group data by column.

Auto-search mode
Click the Auto-search mode button to switch to the Auto-search mode. You can also switch to the Auto-search mode by pressing CTRL+I keys.

Export Data
Click the Export Data button to export data from the grid.

Table
To make data editable, choose the table name from the Table drop-down list on the data view toolbar

Data Editor Grid
Contains editable data. It could be represented as a table in the Grid View mode as well as cards in the Card View mode.

First
Click the First button to switch to the first record field.

Previous
Click the Previous button to switch to the previous record field.

Next
Click the Next button to switch to the next record field.

Last
Click the Last button to switch to the last record field.

Append
Click the Append button to insert more records.

Delete
Click this button to delete the records.

End Edit
Click this button to confirm the changes.

Cancel Edit
Click the Cancel Edit button to discard the changes.

See Also

Data Editor


Custom AutoFilter Dialog Box

Custom AutoFilter dialog is used to create custom filter for data grid column. It is displayed when choosing Custom in the grid drop-down filter list.

Using this dialog, you can build a custom data filter with two conditions for the column. Condition relation can be selected from the drop-down list in the left box and value for relation can be entered in the right box. Select And or Or option and click OK to apply the filter.

See Also

Data Editor

Filter Editor Dialog Box


Filter Editor Dialog Box

Use the Filter Editor dialog to create complex filter conditions to filter data in the data grid. To open this dialog, right-click a required column and select the [image] Condition item from the Quick Filter sub-menu.

Filter conditions in the Filter Editor dialog box are displayed as a tree with condition and group nodes. A group consists of several conditions or subgroups, united with a logical operator.

Condition Tree

The upper part of the Filter Editor dialog is a condition tree. Its nodes are red-colored condition groups and conditions, started with blue-colored column name.

Condition Group

It is displayed as a red-colored logical operator and a [image] button. Clicking the [image] button adds a new condition to group. Clicking the logical operator displays the following menu:

And
Sets And logical operator for the group. All group conditions must be true.

Or
Sets And logical operator for the group. At least one condition from the group must be true.

Not And
Sets Not And logical operator for the group. At least one condition from the group must be false.

Not Or
Sets Not Or logical operator for the group. All group conditions must be false.

Add Condition
Adds a new condition to the group.

Add Group
Adds a new condition group to the current group.

Clear All
This command is available for the top-level condition group only. Removes all conditions and subgroups, leaving only the top-level group node.

Remove Group
This command is available for the non-top-level condition group only. Removes the condition group.

Condition

It consists of the following parts:

Condition column
Blue-colored name of the grid column, to which condition will be applied. You can set another column for the condition by clicking the column name and choosing the column from the appeared menu.

Criteria operator
Green-colored criteria operator. You can set another operator for the condition by clicking the operator name and choosing the operator from the appeared menu.

Operand value
Click and enter the operand value here. Some operators have no operand values (for example Is blank operator), some may have several values.

This button appears for operators that can have one or more operand values. Click it to add one more operand value.

Click this button to delete the condition. You can also navigate to the condition and press the DELETE or MINUS SIGN key

To navigate between conditions and groups, use the UP ARROW and DOWN ARROW keys. To navigate between a condition column, a criteria operator and a operand value, use the LEFT ARROW and RIGHT ARROW keys.

Buttons

OK
Apply the filter and close Filter Builder dialog.

Cancel
Close Filter Builder dialog and cancel all filter changes.

Apply
Apply the filter and without closing the Filter Builder dialog.

See Also

Data Editor

Visible Columns Dialog Box


Visible Columns Dialog Box

Use the Visible Columns dialog to simplify data analysis and filter the data by hiding some columns in the grid. To open this dialog, select Visible Columns from the shortcut menu. The Visible Columns dialog contains the following:

List of columns
Clear the check box next to a column to hide the column data in the grid. Select a check box to show the column data again.

Select / Deselect All
Select this check box to show all the columns at once. Clear the check box to select the required columns manually.

Sort alphabetically
Select it to show the columns in alphabetical order.

See Also

Data Editor

Data Editor Window


Data Export Wizard

Make your data export quick and convenient using the Data Export wizard. You can access the Data Export wizard by doing either of these actions:

· On the Start Page, click Data Analysis, and then click Export Data.
· In Database Explorer, right click the required table or view (or Ctrl+click several tables and/or views) you want to export data from and select Export Data from the shortcut menu.
· In Data Editor Window, select Export Data from the shortcut menu, or click the [image] Export Data button on the Data Editor Window toolbar.
· On the Database menu , select Export Data.

See the list of the wizard's pages with their options below.

In This Section

Source, Data Export wizard
Select a required MySQL server connection, a database, and a table where the data you want to export is located.

Export Format, Data Export wizard
Choose a required data export format on this page.

Options, Data Export wizard
Tells how to set options to customize data export into any of 10 available export formats.

Table columns, Data Export Wizard
Choose columns and specify the key for export.

Table, Data Export wizard
Choose a table for data export. Available only for MS Access and ODBC formats.

Data Formats, Data Export wizard
Choose columns for export, change their name and data type, and customize formats for data representation (if available) on this page.

Output Settings, Data Exprot Wizard
Set output settings for exported data on this page. Available for the JSON, XML, TXT and CSV formats only.

Page Print Settings, Data Export wizard
Choose a page size and orientation, set margins, and enter a text for a table's header and footer on this page. Available only for MS Excel, RTF, and PDF formats.

Exported Rows, Data Export wizard
Specify a range of exported rows on this page.

Errors handling, Data Export wizard
Specify the errors handling behavior.

Export Progress, Data Export wizard
See the export progress on this page.

Finish, Data Export wizard
See the result of export process and select whether to open the exported file after the export on this page.


Export Format, Data Export Wizard

Use this wizard page to select an export format, load a user template, and specify a destination file or table. The page contains the following items:

Categories

All Items
Select it to see both export formats and user templates in the Templates section.

Formats
Select it to see only the list of export formats in the Templates section.

User Templates
Select it to see only the list of user templates in the Templates section.
Templates allow to view and select the items of the selected category. Click an export format or a saved template to use them. To load a user template, double-click the Load Template... icon.

Note

To export data into MS Access, ensure that Microsoft Data Access Components (MDAC) version 2.6 or later is installed on your PC. If you don't have MDAC, click here to download

Large icons
Click it to see the items marked with large icons in the Templates section.

Small icons
Click it to see the items marked with small icons in the Templates section.

See Also

Options, Data Export Wizard

Data Export Wizard


Source, Data Export Wizard

Use this wizard page to select a required MySQL server connection, a database, and a table/view where the data you want to export is located. The page contains the following details:

Connection

Click the field to select a required MySQL server connection from the drop-down list. By default the connection highlighted in the Database Explorer is selected. In the drop-down list you can click the <Manage...> link to open the Connection Manager dialog box. It will help you to create, edit, and delete database connections.

Edit
Click to edit the properties of the selected connection. The Database Connection Properties dialog box opens. For more information, go to How To: Manage Database Connections topic.

New
Click to create a new MySQL server connection. The Database Connection Properties dialog box opens. For more information, go to How To: Manage Database Connections topic.

Database

Select a database located on the selected MySQL server. In the drop-down list you can click the <Refresh...> link to refresh the list of databases available on the selected MySQL server, if any changes were made.

Tables and Views
Select a table or view you want to export the data from. The list shows all the tables of the selected database.

Filter
Type the filter criteria in this field, and tables and views answering this criteria will be displayed in the Tables and Views field of this page.

File name
Click the Browse button to specify a name and a path of the destination file (the one where the exported data will be saved.) This field is not available for ODBC and MS Access destination formats.

Folder name
Click the Browse button to specify the path to store the destination files (the one where the exported data will be saved.) This field is available more than one table is selected.

Export selected tables into single file
Check this option to export selected tables into a single file. This option is available for SQL destination format only.

Google Spreadsheet ID/URL
Specify a Google Spreadsheet ID/URL to export data into. This option is available for Google Spreadsheet format only.

Save Template
Click it to save the settings as a template for future uses. For more information, refer to the Saving and Using Templates topic.

See Also

Export Format, Data Export Wizard

Data Export Wizard


Options, Data Export Wizard

Find how to set options to customize data export into any available export format in this section.

In This Section

HTML Format Options, Data Export wizard
Customize a header, borders, and rows for the exported data. Choose colors for a table's text and background, set a font, and preview the results on this pages.

Text Document Options, Data Export wizard
Choose a text alignment and a column length, include or hide a table's header and a grid, and set Unicode support on this page.

Microsoft Excel Format Options, Data Export wizard
Customize a header, borders, and rows for the exported data. Choose colors for a table's text and background, set a font, and preview the results on this page.

Google Sheets Options, Data Export Wizard
Customize a start cell and a sheet for the exported data.

Microsoft Access Database Options, Data Export wizard
Enter a table's name and password on this page.

Rich Text Format Options, Data Export wizard
Customize a header, borders, and rows for the exported data. Choose colors for a table's text and background, set a font, and preview the results on this page.

Portable Document Format Options, Data Export wizard
Customize a header, borders, and rows for the exported data. Choose colors for a text and a background, set a font, and preview the results on this page.

XML Document Options, Data Export wizard
Set Unicode support for the exported data and select whether to export information about a table on this page.

CSV Document Options, Data Export wizard
Choose values for a column separator and a quoted string. Set Unicode support for the exported data on this page.

ODBC Data Providers Options, Data Export wizard
Specify a system data source name or customize a connection string on this page. Provide login information if your data source requires.

dBase, FoxPro Database Options, Data Export wizard
Specify a number of digits after the decimal point on this page.

SQL Document Options, Data Export Wizard
Specify a table name and select a statement type for exported data.

See Also

Data Export Wizard

Table columns, Data Export Wizard


HTML Format Options, Data Export Wizard

Use this wizard page to specify options for data export into HTML format and preview the results in the Preview section. The Options page contains the following details:

Header

Customize a header's text and background choosing a required color from the drop-down lists.

1. Click the arrow button in the field to open the drop-down list.
2. Switch to either the Custom, or Web, or System tab to select a required color. You can see the selected color in the Preview section at the bottom of the page.

Click the Font button to change the font settings. Select a font, a style, a size, and a script; add font effects and click OK. The selected font is shown next to the Font button.

Borders

Choose a width and color of borders and preview the results.

Rows

Choose required colors for the text and background of rows and change font settings as was described in Header section. See any changes in the Preview section.

Preview
Here you can look at the sample data with applied format options before exporting.

Save Template
Click it to save the settings as a template for future uses.

See Also

Text Document Options, Data Export Wizard

Data Export Wizard


Text Document Options, Data Export Wizard

Use this wizard page to specify options for data export into Text format and preview the results in the Sample section. The Options page contains the following details:

Use Unicode
Select this check box to ensure the exported data will support Unicode.

Tab
Choose either to keep tabs or insert spaces.

Text alignment
Select a text alignment from the drop-down list. Preview your changes in the Sample section.

Column length
Use the arrow buttons in the field to choose a column length.

Show a table header
Clear the check box to hide a table header. See the result in the Sample section.

Show a grid
Clear the check box to hide a table grid. See the result in the Sample section.

Horizontal header
If required, change the default character for horizontal header border. Preview your changes in the Sample section.

Vertical header
If required, change the default character for vertical header cell border. Preview your changes in the Sample section.

Horizontal
If required, change the default character for horizontal cell border. Preview your changes in the Sample section.

Vertical
If required, change the default character for vertical cell border. Preview your changes in the Sample section.

Sample
Here you can look at the sample data with applied format options before exporting.

Save Template
Click it to save the settings as a template for future uses. For more information, go to the Saving and Using Templates topic.

See Also

Microsoft Excel Format Options, Data Export Wizard

Options, Data Export Wizard


Microsoft Excel Format Options, Data Export Wizard

Use this wizard page to specify options for data export into Microsoft Excel format and preview the results in the Preview section. The Options page contains the following details:

Header

Select to include header to the export file.

Text
Select the text color from the drop-down list. Switch to either Custom, or Web, or System tab to select a required color. You can see the selected color in the Preview section at the bottom of the page.

Background
Select the background color from the drop-down list. Switch to either Custom, or Web, or System tab to select a required color. You can see the selected color in the Preview section at the bottom of the page.

Font
Click the button to to change the font settings. Select a font, a style, a size, and a script; add font effects and click OK. The selected font is shown next to the Font button.

Borders

Choose a width and color of borders and preview the results.

Rows

Choose required colors for a text and a background of rows and change font settings as was described in Header section. See any changes in the Preview section.

Preview

Here you can look at the sample data with applied format options before exporting.

Save Template
Click it to save the settings as a template for future uses.

See Also

Google Sheets Options, Data Export Wizard

Options, Data Export Wizard


Google Sheets Options, Data Export Wizard

Use this wizard page to specify options for data export into Google Sheets format. The Options page contains the following details:

Start Cell
Specify a start cell to insert data to be exported.

Sheet
Specify a sheet to export data into.

Show a table header
Select to show a table header.

See Also

Microsoft Access Database Options, Data Export Wizard

Options, Data Export Wizard


Microsoft Access Database Options, Data Export Wizard

Use this wizard page to specify a file name and a password for a database here. The Options page contains the following details:

Password
Enter a password for a database.

Save Template
Click it to save the settings as a template for future uses. For more information, go to the Saving and Using Templates topic.

See Also

Rich Text Format Options, Data Export Wizard

Options, Data Export Wizard


Rich Text Format Options, Data Export Wizard

Use this wizard page to specify options for data export into RTF format and preview the results in the Preview section. The Options page contains the following details:

Header

Select to include header to the export file.

Text
Select the text color from the drop-down list. Switch to either Custom, or Web, or System tab to select a required color. You can see the selected color in the Preview section at the bottom of the page.

Background
Select the background color from the drop-down list. Switch to either Custom, or Web, or System tab to select a required color. You can see the selected color in the Preview section at the bottom of the page.

Font
Click the button to to change the font settings. Select a font, a style, a size, and a script; add font effects and click OK. The selected font is shown next to the Font button.

Borders

Choose a width and color of borders and preview the results.

Rows

Choose required colors for a text and a background of rows and change font settings as was described in Header section. See any changes in the Preview section.

Use Unicode
Select this check box to ensure the exported data will support Unicode.

Preview

Here you can look at the sample data with applied format options before exporting.

Save Template
Click it to save the settings as a template for future uses.

See Also

Portable Document Format Options, Data Export Wizard

Options, Data Export Wizard


Portable Document Format Options, Data Export Wizard

Use this wizard page to specify options for data export into portable document format (PDF) and preview the results in the Preview section. The Options page contains the following details:

Header

Select to include header to the export file.

Text
Select the text color from the drop-down list. Switch to either Custom, or Web, or System tab to select a required color. You can see the selected color in the Preview section at the bottom of the page.

Background
Select the background color from the drop-down list. Switch to either Custom, or Web, or System tab to select a required color. You can see the selected color in the Preview section at the bottom of the page.

Font
Click the button to to change the font settings. Select a font, a style, a size, and a script; add font effects and click OK. The selected font is shown next to the Font button.

Borders

Choose a width and color of borders and preview the results.

Rows

Choose required colors for a text and a background of rows and change font settings as was described in Header section. See any changes in the Preview section.

Preview
Here you can look at the sample data with applied format options before exporting.

Save Template
Click it to save the settings as a template for future uses. For more information, go to the Saving and Using Templates topic.

See Also

XML Document Options, Data Export Wizard

Options, Data Export Wizard


XML Document Options, Data Export Wizard

Use this wizard page to specify options for data export into XML format here. The Options page contains the following details:

Use Unicode
Select this check box to ensure your data will support Unicode.

Save Template
Click it to save the settings as a template for future uses. For more information, go to the Saving and Using Templates topic.

See Also

Options, Data Export Wizard

CSV Document Options, Data Export Wizard


CSV Document Options, Data Export Wizard

Use this wizard page to set format options for export data to a CSV file here. The Options page contains the following details:

Use Unicode
Select this check box to ensure your data will support Unicode.

Show a table header
Select or clear this check box to show/hide a table's header.

Quote string
Specify a character to be used for quotation.

Force quote
If selected, all the data will be quoted (not only text).

Field Separator
Select how to separate fields: Tab, Space, Comma, or Custom.

Save Template
Click it to save the settings as a template for future uses. For more information, go to the Saving and Using Templates topic.

See Also

ODBC Data Providers Options, Data Export Wizard

Options, Data Export Wizard


ODBC Data Providers Options, Data Export Wizard

Use this wizard page to set options for ODBC data source. You can set the following:

Data source specification

Set the ODBC connection first. Select either a system data source name or a user data source name from the drop-down list. Click the Refresh button to refresh the list.

Use system or user data source name
You can choose any data source created in the operation system. Click the Refresh button to refresh the list available data sources.

Use a connection string
Click the Build button to customize a connection string.

Login information

Based on the selected data source name, you should enter a user name and a password.

Test connection
Click this button to ensure your connection is successfully set.

Save Template
Click it to save the settings as a template for future uses.

See Also

dBase, FoxPro Database Options, Data Export Wizard

Options, Data Export Wizard


dBase, FoxPro Database Options, Data Export Wizard

Use this wizard page to specify the number of digits after the decimal point from 0 to 18. You can see the following:

Decimal scale
Click the arrows to specify the number of digits.

Encoding
Select a required encoding from the drop-down list box. By default, the current Windows encoding is selected.

Save Template
Click it to save the settings as a template for future uses. For more information, go to the Saving and Using Templates topic.

See Also

SQL Document Options, Data Export Wizard

Options, Data Export Wizard


SQL Document Options, Data Export Wizard

Use this wizard page to specify options for data export into SQL format. The Options page contains the following details:

Destination table name
Specify a table name that will be generated in the SQL file. This field is disabled when more than one table are selected.

Statement type
Choose a type of the statements that will be generated in the SQL file.

INSERT
Select it to export data as INSERT statements. Insert data into the table.

UPDATE
Select it to export data as UPDATE statements. Update data into the table.

DELETE
Select it to export data as MERGE statements. Delete data from the table.

MERGE
Select it to export data as MERGE statements. Merge data with the table.

Use Bulk Insert
Select to use Bulk Insert when exporting data as INSERT statements

Bulk Size (KB)
Specify the bulk size in kilobytes.

Include database name in script
Select to include database name into script. The option is available only when exporting multiple tables.

Save Template
Click it to save the settings as a template for future uses. For more information, go to the Saving and Using Templates topic.

Note

The Include database name in script check box appears instead of a text box, while selecting several objects for export.

See Also

Table columns, Data Export Wizard

Options, Data Export Wizard


Table columns, Data Export Wizard

Use this wizard page to select columns for export. The tab is available for SQL destination format only.

Column
Select or clear the check boxes next to columns to include them into export or exclude.

Key
Select or clear the check boxes next to columns to include them into the key for export or exclude.

Destination Column
Specify the destination column names that will be generated in the SQL file.

See Also

Data Formats, Data Export Wizard

Data Export Wizard


Table, Data Export Wizard

This page is available only for MS Access and ODBC formats and if only one object for export is selected. You can choose a destination table for data export here.

Existing table
Choose a table to export data to from the list of existing tables.

New table
Create a new table to export data to.

Filter
Type the filter criteria in this field, and objects answering this criteria will be displayed in the list of existing tables.

Save Template
Click it to save the settings as a template for future uses. For more information, go to the Saving and Using Templates topic.

See Also

Page print settings, Data Export Wizard

Data Export Wizard


Data Formats, Data Export Wizard

Columns

On the Columns tab select columns for export. You can see the grid with the following details:

Field
Select or clear the check boxes next to columns to include them into export or exclude.

Alias
To export a column with another name, click the Alias field and enter a new column name.

Data Type
You can select the required type from the drop-down list. (This field is editable only for Text, HTML, PDF, RTF, and CSV formats. For Excel and Excel 2007 formats, the field is editable only for binary columns and includes only two data types (HexString and String) in the drop-down list).

Formats

This tab is available only for Excel, Excel 2007, HTML, Text, RTF, PDF, CSV and JSON export formats. On the Formats tab specify data representation formats for the exported data.

If necessary, change the default types of data representation. Enter new values into the fields.

For more detailed information about how to customize formats, see the Custom Numeric Strings article.

Save Template
Click it to save the settings as a template for future uses. For more information, go to the Saving and Using Templates topic.

See Also

Table, Data Export Wizard

Data Export Wizard


Output Settings, Data Exprot Wizard

Use this page to set output settings for exported data. This page is available for the JSON, XML, TXT and CSV formats only.

Folder
Specify a name and a path of the destination file (the one where the exported data will be saved).

Export data into a single file
Select this option to export selected data into a single file.

Export data into separate files
Select this option to export selected tables and views into a separate files.

Append timestamp to the file name
Select it to include a timestamp to the name of the generated file.

Auto delete old files
If the Append timestamp to the file name option is checked, you can choose to delete old output files automatically when generating new files.

Files older than
Set the number of days the files should be older to be deleted.

Quantity more than
Backups are auto deleted if their quantity is more than the number specified.

Use compression (ZIP)
Check this option to compress the exported data to a ZIP file.

Level
Select the level of compression here. You can select one of the following levels of compression: No Compression, Best Speed, Fast, Default, Good, Maximum.

Comment
Add a comment to the created archive.

Encryption
Select encryption type from the drop-down list

Password
Enter a desired password into the text box.

Exported files preview
Allows to preview the exported files.

Save Template
Click it to save the settings as a template for future uses. For more information, go to the Saving and Using Templates topic.

See Also

Table, Data Export Wizard

Data Export Wizard


Page Print Settings, Data Export Wizard

Use this wizard page to specify page print options and preview the results in the Preview section. These options are available only for the MS Excel, RTF, and PDF formats. You can see the following details:

Page size
Select a required page size from the drop-down list. Preview the result.

Repeat a table header
Select it to print a table header on each page.

Orientation
Specify a page orientation, either a portrait or landscape one. Preview the result.

Margins
Set margins using the arrow buttons. Preview your changes.

Footer/Header
Enter a text for a table's footer and header. If required, select the check box at the top of the window to repeat a table's header on each page.

Preview
Here you can look at the sample data with applied settings before exporting.

Save Template
Click it to save the settings as a template for future uses. For more information, go to the Saving and Using Templates topic.

See Also

Exported rows, Data Export Wizard

Data Export Wizard


Exported Rows, Data Export Wizard

Choose options for exported rows here.

Export all rows
Select this option to export all rows. Both selected and not selected rows in the grid will be included into export.

Export selected rows only
If you select several rows in a table and then click Export Data, this option will be selected automatically. All applied filters (if any) will be saved in the output file.

Export a range of rows
Select a range of exported rows.

Start from
Specify the row's number to start exporting from.

Count
Specify the quantity of rows for export. (Note: The specified quantity will include the starting exported row.). If 0 is specified, all rows after the Start from value are exported.

Save Template
Click it to save the settings as a template for future uses. For more information, go to the Saving and Using Templates topic.

See Also

Errors Handling, Data Export Wizard

Data Export Wizard


Errors Handling, Data Export Wizard

On this page, you can specify the application behaviour when an error is encountered during data export and logging options.

Errors handling

Prompt a user for an action
Select it to be prompted by dbForge Studio for MySQL in case of any errors. You will be able to ignore the errors and continue exporting data or cancel the process.

Ignore all errors
Select it to make dbForge Studio for MySQL ignore all errors during export.

Abort at the first error
Select it to cancel export if any error occurs.

Log settings

Write a report to a log file
Select it to get a log file with details about the export session. This will allow you to see the information about the errors appeared during the export session and their causes.

Log file
Click the Browse button and specify the path to the log file or enter it manually.

See Also

Export progress, Data Export Wizard

Data Export Wizard


Export Progress, Data Export Wizard

You can see the export progress on this page. To cancel the export, click the Cancel button.

See Also

Finish, Data Export Wizard

Data Export Wizard


Finish, Data Export Wizard

You can see data export results on this page.

Errors count
Displays the total number of errors.

Rows exported
Displays the total number of exported rows.

Show log file
Click to open the log file. This button appears only if you selected Write a report to a log file on the Errors Handling wizard page.

Open result file
Click to open the result file. The option is disabled if several objects are selected for import.

Open result folder
Click to open the result folder that contains result file. This option is not available when exporting to the ODBC format.

Export more
Click this button to perform export data process once more. When you click this button, you are redirected to the Export Format page of the wizard. To select new tables and/or views to export data from, go to the Source page of the wizard.

If an error occurred during the export process, its text will be displayed in the upper part of the page.

See Also

Data Export Wizard


Data Import Wizard

Import your data quickly and conveniently using the Data Import wizard. To open it, do either of these actions:

· (to import to a new table) Select Database, and then click Import Data in the top menu.
· (to import to an existing table) Right-click a table in Database Explorer and select Import Data from the menu. The Data Import wizard opens with predefined parameters: a MySQL connection, a database, and a table to import the data to.

See the list of wizard's pages with their options below.

In This Section

Source File, Data Import Wizard
Specify an import format and a file for the import here.

Destination (for DBF, CSV, Excel, XML, Text formats), Data Import Wizard
Select a MySQL connection, a database, and a table to import the data to here.

Destination (for Access and ODBC formats), Data Import Wizard
Select a Source and a Target table for the import here.

Source query dialog
Use this dialog to create a query for a partial data import.

Options, Data Import Wizard
Set options to customize import of the selected import format here.

Data Formats, Data Import Wizard
Specify data format values and column settings for import here.

Mapping, Data Import Wizard
Set correspondence between a file content and a Target table here.

Mapping for Text data, Data Import Wizard
Set correspondence between a Text file content and a Target table here.

Modes, Data Import Wizard
Define how dbForge Studio for MySQL should import the data.

Output, Data Import Wizard
Select output options to manage the data import script.

Errors Handling, Data Import Wizard
Select how dbForge Studio should handle errors during import and whether to write a log file.

Import Progress, Data Import Wizard
See the import progress on this page.

Finish, Data Import Wizard
See whether the import completed successfully or failed, open a log file on this page.

Open MS Access database Dialog Box
Appears only if selected for import MS Access data is password-protected.


Source File, Data Import Wizard

Use this wizard page to select an import format, load a user template, and specify a location of Source data. The page contains the following elements:

Categories

All Items
Select it to see both import formats and user templates in the Templates section.

Formats
Select it to see only the list of import formats in the Templates section.

Templates
Select it to see only the list of user templates in the Templates section.

Templates

Allows you to view and select the items of the selected category. Click an import format or a saved template in the list to use them. To load a user template, double-click the Load a template icon.

File name
Enter the path to the Source data or click the Browse button to select the path in the Open dialog.

Large icons
Click it to see the items marked with large icons in the Templates section.

Small icons
Click it to see the items marked with small icons in the Templates section.

See Also

Destination Table, Data Import Wizard

Data Import Wizard


Destination, Data Import Wizard

Use this wizard page to select a required MySQL connection, a database, and a table where you want to import the data. The page contains the following elements:

Target

Connection
Click the field to select a required MySQL connection from the drop-down list. By default, the connection highlighted in Database Explorer is selected. In the drop-down list, you can click the <Manage...> link to open the Connection Manager dialog box. It will help you to create, edit, and delete database connections.

Edit
Click to edit the properties of the selected connection. The Database Connection Properties dialog box opens. For more information, go to the How To: Manage Database Connections topic.

New
Click to create a new MySQL server connection. The Database Connection Properties dialog box opens. For more information, go to the How To: Create Database Connection topic.

Database
Select a database located on the selected MySQL server. In the drop-down list you can click the <Refresh...> link to refresh the list of databases available on the selected MySQL server, if any changes were made.

New table
Enter a name of a new table to import the data to.

Existing table
Select a table to import the data to. The list shows all the tables of the selected database.

Filter
To quickly find a required Target table or view in the list, enter characters of a required name. The list will be filtered to show only those that contain such characters in their names.

See Also

Destination Table (for Access and ODBC formats), Data Import Wizard

Data Import Wizard


Destination (for Access and ODBC formats), Data Import Wizard

Use this wizard page to select a Source table/view and a Target connection, a database, and a table where you want to import the data. The page contains the following details:

Source

Select a table or a view
Lists all the tables and views of the selected data source. Select a required table or view to import the data from.

Filter
To quickly find a required Source table or view in the list, enter characters of a required name. The list will be filtered to show only those that contain such characters in their names.

Custom Query
You can use a query to import the Source data partially. Click this button and edit a query in the Source query editor. Click OK to save the changes. To discard the changes, click Cancel.

Target

Connection
Click the field to select a required MySQL connection from the drop-down list. By default, the connection highlighted in Database Explorer is selected. In the drop-down list, you can click the <Manage...> link to open the Connection Manager dialog box. It will help you to create, edit, and delete database connections.

Edit
Click to edit the properties of the selected connection. The Database Connection Properties dialog box opens.

New
Click to create a new MySQL connection. The Database Connection Properties dialog box opens.

Database
Select a database located on the selected MySQL. In the drop-down list, you can click the <Refresh...> link to refresh the list of databases available on the selected server, if any changes were made.

Existing table
Select a table to import the data to. The list shows all the tables of the selected database.

Filter
To quickly find a required Target table or view in the list, enter characters of a required name. The list will be filtered to show only those that contain such characters in their names.

New table
Enter a name of a new table to import the data to.

See Also

Source Query Dialog Box

Data Import Wizard


Source Query Dialog Box

You can use a query for partial data import. Click the Custom Query button and edit the query in the editor. Click OK to save the changes.

See Also

Options, Data Import Wizard

Data Import Wizard


Options, Data Import Wizard

Use the Options wizard page to customize import of the selected import format.

In This Section

Text Options
Set options for Text import format on this page

MS Excel Options
Set options for MS Excel import format on this page.

XML Options
Set options for XML import format on this page.

JSON Options, Data Import Wizard
Set options for JSON import format on this page.

CSV Options
Set options for CSV import format on this page.

ODBC Options
Set options for ODBC import format on this page.

DBF Options
Set options for DBF import format on this page.

.

See Also

Data Import Wizard

Mapping, Data Import Wizard


Text Options, Data Import Wizard

Use this wizard page to customize import of text files. You can set the following options:

Encoding
Shows the automatically-detected encoding of the Source data. If the file encoding cannot be detected, dbForge Studio for MySQL sets the current Windows encoding. You can select a required encoding from the drop-down list.

Quote string
Set a symbol to define quoted data in the Source text file during import. The default value is double quotes. The mechanism of importing quoted data is based on the following rules:

· Data is delimited into fields according to found delimiters.
· Data between quotation marks will be imported and the quotation marks will be ignored. Any single quotation mark will be imported. For example, the data from these two fields "text"1text" "text"2text" will be imported like text"1text text"2text.

Skip lines
Set a quantity of lines to skip during import. For example, if you set 3, dbForge Studio for MySQL will import the data starting from the 4th line. The selected line range will be highlighted with pink in the Preview section.

Header position
Select a line number where the table header is located. The selected line will be highlighted with blue in the Preview section.

Import even lines only
Select it to make dbForge Studio for MySQL import only even lines. It is useful when, for example, each line with data is delimited by a line containing horizontal delimiters and you need only the lines with data.

Splitting

Manual
Select it for manual splitting of Source data into columns. In the Preview section double-click on desired positions to set column bounds. The markers will appear. Read how to manage markers in Preview description.

Fixed width
Select it to split Source data into columns with fixed width. Specify a width value and see how the columns are splitted in the Preview section.

Delimiter
Select it if you want to specify a column delimiter. Specify the delimiter type and see the result in the Preview section. The following options are available:

Tab - will delimit the Source columns by tab.

Space - will delimit the Source columns by space.

Custom - will delimit the Source columns by a custom symbol, which you should enter.

Preview

Highlights the skipped lines and the header position, shows splitting of the Source columns. Allows you to preview how the options change the data display. You can set columns bounds manually by double-clicking on desired positions in the Preview section. The markers will appear. To remove them, double-click them again. You can move the markers forward or backward to change the column length. The changes are displayed in the Length field of the mapped Target column in the top grid.

Save Template
Click it to save the settings as a template for future uses. For more information, go to the Saving and Using Templates topic.

See Also

Options, Data Import Wizard

XML Options, Data Import Wizard


Excel and Google Sheet Options, Data Import Wizard

Use this wizard page to customize import of Excel and Google Sheet files. You can set the following options:

Data location

Sheet
Allows you to specify which sheet of the Source to choose for import. Click the field to select a required sheet from the drop-down list.

Start/End cell
Clear the Detect a range automatically check box to activate the fields. Enter the starting and ending cells to specify Source data range you want to import.

- click this button to specify the Source data range by double-clicking the starting and ending cells in the Preview section. The number of the selected cells will appear in the Start cell and End cell fields and the data range will be highlighted with green in the Preview section.

Detect a range automatically
Clear the check box to specify a data range for import manually. Enter the number of the start cell and end cells in the corresponding fields.

Data in

Rows - select it to import the data in rows. See the result in the Preview section on the Mapping wizard page.

Columns - select it to import the data in columns. See the result in the Preview section on the Mapping wizard page.

Header

No header
Select it if the Source has no header.

First row in a range
Select it to indicate that the header is in the first row of the selected data range.

Position
Select it to set the header position manually. Enter the position of the row or cell that contain the header, it will be highlighted with blue in the Preview section. If you don't specify the header position, the imported columns will get default names - column1, column2, etc.

- click it to specify the header position by double-clicking a required field in the Preview section. The number of the selected field will appear in the Position field and the header will be highlighted with blue.

Preview
Highlights the data range for import and the header position in the Source. Allows you to preview how the options change the data display. You can select the data range for import by clicking the [image] buttons and double-clicking a required start or end cell in the grid. Do the same to indicate the header position.

Save Template
Click it to save the settings as a template for future uses.

See Also

Data Import Wizard

ODBC Options, Data Import Wizard


XML Options, Data Import Wizard

Use this wizard page to customize import of XML files. You can set the following options:

Encoding
Shows the automatically-detected encoding of the imported file. If the file encoding cannot be detected, dbForge Studio for MySQL sets the current Windows encoding. You can select a required encoding from the drop-down list.

Tag that identifies a table row
Select a tag from the drop-down list to consider as a Source table row during import.

Consider tag attributes as table fields
Select it to consider tag attributes in the Source as table fields, otherwise only the values of the tag selected in the prior field will be considered.

Preview
Shows the Source data.

Save Template
Click it to save the settings as a template for future uses. For more information, go to the Saving and Using Templates topic.

See Also

Options, Data Import Wizard

Mapping, Data Import Wizard


JSON Options, Data Import Wizard

Use this wizard page to customize import of JSON files. You can set the following options:

Encoding
Shows the automatically-detected encoding of the imported file. If the file encoding cannot be detected, dbForge Studio for MySQL sets the current Windows encoding. You can select a required encoding from the drop-down list.

Preview
Shows the Source data.

Save Template
Click it to save the settings as a template for future uses. For more information, go to the Saving and Using Templates topic.

See Also

Options, Data Import Wizard

Mapping, Data Import Wizard


CSV Options, Data Import Wizard

Use this wizard page to customize import of CSV files. You can set the following options:

Encoding
Shows the automatically-detected encoding of the imported file. If the file encoding cannot be detected, dbForge Studio for MySQL sets the current Windows encoding. You can select a required encoding from the drop-down list.

Quote
Set a symbol to mark quoted data in Source during import. The default value is double quotes.

Skip lines
Set a quantity of lines to skip during import. For example, if you set 3, dbForge Studio for MySQL will import the data starting from the 4th line. The selected line range will be highlighted with pink in the Preview section.

Header position
Select the line number where the table header is located. The selected line will be highlighted with blue in the Preview section.

Delimiter
Select it if you want to specify a column delimiter. Specify the delimiter type and see the result in the Preview section. The following options are available:

· Tab - will delimit the Source columns by a tab.
· Space - will delimit the Source columns by a space.
· Comma - will delimit the Source columns by a comma.
· Custom - will delimit the Source columns by a custom symbol, which you should enter.

Preview
Highlights the skipped lines and the header position, shows splitting of the Source columns. Allows you to preview how the options change the data display.

Save Template
Click it to save the settings as a template for future uses. For more information, go to the Saving and Using Templates topic.

See Also

Options, Data Import Wizard

DBF Options, Data Import Wizard


ODBC Options, Data Import Wizard

Use this wizard page to set options for ODBC data source. You can set the following:

Data source specification
Set the ODBC connection first. Select either a system data source name or a user data source name from the drop-down list.

Refresh
Click it to refresh the data sources list.

Use a connection string
Click the Build button to customize a connection string.

Login information
Based on the selected data source name, you should enter a user name and a password.

Test connection
Click this button to ensure your connection is successfully set.

Save Template
Click it to save the settings as a template for future uses.

See Also

Options, Data Import Wizard

Text Options, Data Import Wizard


DBF Options, Data Import Wizard

Use this wizard page to customize import of DBF files. You can set the following options:

Encoding
Allows you to select the encoding of the Source data. Click the field and select a required encoding from the drop-down list. By default, the current Windows encoding is selected.

Read deleted rows
Select it to preview and import rows marked as deleted in Source.

Preview
Allows you to preview first 50 rows of the Source data. When the Read deleted rows check box is selected, the Preview section will display rows marked as deleted in Source.

Save Template
Click it to save the settings as a template for future uses. For more information, go to the Saving and Using Templates topic.

See Also

Excel Options, Data Import Wizard

Options, Data Import Wizard


Data Formats, Data Import Wizard

Use this wizard page to set required data formats and column settings for Source data. The page contains the following details:

Common Formats
If it is required, enter required values for data representation in Source data.

Null String
Enter a text representing Null values in the Source records.

Thousand Separator
Enter a character representing a thousand separator in the Source data.

Decimal Separator
Enter a character representing a decimal separator in the Source data.

Boolean
Enter a text representing boolean true and false values in the Source data.

Date and Time
If you want to specify a required date and time format for the Source data, clear the Autodetect Date and Time format check box and enter a format or select it from the drop-down list.

Autodetect Date and Time format
Select it to turn on automatic detecting data and time format of the imported data.

Column Settings
Switch to this tab to set required values for data representation in each Source column. In the left part you will see the list of table columns selected for import and those columns where a default value is not specified. For columns without a default value, you must specify a value that will be inserted during import. Note, for NOT NULL columns with string data type, i.e., Char, Varchar, NChar, NVarchar, an empty string will be set by default.

To specify column settings, select a required column in the left part and enter the following values in the right part:

Null String
Enter a text representing Null values in the Source records of the selected column.

Left Quote
Enter a value to use as a left quote mark in the data of the selected Source column.

Right Quote
Enter a value to use as a right quote mark in the data of the selected Source column.

Date and Time
It is active only for columns with DATE, DATETIME, and TIMESTAMP data types. If you want to specify a required date and time format for records in a separate Source column, enter a format or select it from the drop-down list.

Note

If a format mask is not set, the program itself will try to identify date and time values.

Save Template
Click it to save the settings as a template for future uses. For more information, go to the Saving and Using Templates topic.

See Also

Data Import Wizard

Modes, Data Import Wizard


Mapping, Data Import Wizard

Use this wizard page to set a correspondence between the Source data and a Target table.

New column
Allows you to create a new column in a Target table. It is active only when you import data to a new table. Click this button and specify the column properties in the Column Properties dialog box. Click OK to save the changes and see the created column in the top grid.

Delete
Allows you to delete columns in a Target table. It is active only when you import the data to a new table. Select a required column in the top grid and click this button. The column will be removed from the top grid.

Edit
Allows you to edit column properties in a Target table. It is active only when you import the data to a new table. Select a required column in the top grid and click this button. Specify the column properties in the Column Properties dialog box. Click OK to save the changes and see the result in the top grid.

View
It appears if you import the data to an existing table. Click it to view the Target column properties.

Use the arrows to change a column order. They are active only when you import the data to a new table. Select a required column in the top grid and click the arrows to move it up or down.

Fill Mapping
By default, dbForge Studio automatically maps Source and Target columns, but if you clicked Clear Mappings to cancel mapping of all the columns and now want to automatically fill the Target table with the Source columns, click Fill Mapping.

Clear Mappings
Click it to cancel mapping. The columns in the top grid will lose bold highlight, and the Source column fields will contain None values. You should click the fields to select a required Source column from the drop-down list.

Note

For a new table you can delete all the Target columns and click Fill Mapping. In this case dbForge Studio will automatically create and map the columns taking into account specific Source data types.

Top grid (for the Target table)

Key
Select the Key check box next to a required column with a primary key. If you are importing to an existing table, you can select any of existing key columns (they are marked with the [image] icon). You should select at least one column with a primary key, otherwise some of import modes on the Modes wizard page will be disabled.

Note

This column is not available while importing to a new table.

Column
Shows the names of the Target table columns. Click any column to view and edit its properties.

Type
Shows the types of the Target table columns. Click any column type to view and edit it.

Source column
Shows the Source columns mapped to the Target columns. If you click Clear Mappings to cancel mapping for all columns, the Source column fields will contain None values. To change mapping, click a Source column field and select a required column from the drop-down list.

Default Value
Enter a value to use as a default value in the selected Source column. All null values in the records of the selected Source column will be replaced with the default value if it is specified.

Preview (for the Source table)

Shows the Source data.

Save Template
Click it to save the settings as a template for future uses.

See Also

Data Import Wizard

Mapping for Text Data, Data Import Wizard


Column Properties Dialog Box

Use this dialog to configure column properties.

Column Name
Enter the column name

Data Type
Indicates column data type.

Note

It is not allowed to edit data type of Identity columns that are already created. Data type of such columns can be edited using the T-SQL editor only.

Length
Shows a number of characters allowed for character-based data types. It is available for character-based data types only.

Precision
Shows the maximum number of digits for values in this column.

Scale
Shows the maximum number of digits that can appear to the right of the decimal point for values of this column.

Allow nulls
Indicates whether column is nullable or not.

Computed
Indicates whether column is computed.

Unique
Indicates whether column is unique

Primary
Indicates whether column is primary.

Identity
Shows properties for identity columns.

Identity
The value of this property indicates whether this column is identity one or not.

Seed
Shows the seed value specified during the creation of this identity column.

Increment
Indicates whether a column is increment or not.

Not for Replication
Indicates whether original identity values are preserved during replication.

Computed Expression

Store computed values in a table
Select to store computed values in a table.

Expression
Shows the expression for the computed column.

Collation
Displays the collating sequence that SQL Server applies by default to the column whenever the column values are used to sort rows of a query result.

Default value
Displays the default for this column whenever no value is specified for this column. The value of this field can be either the value of an SQL Server default constraint or the name of a global constraint to which the column is bound. The drop-down list contains all global defaults defined in the database. To bind the column to a global default, select from the drop-down list.

Description
Displays the text describing this column. If description consists of more than one line, only the first line, followed with dots.

See Also

Data Import Wizard

Mapping for Text Data, Data Import Wizard


Mapping for Text Data, Data Import Wizard

Use this wizard page to set a correspondence between the Source data in text format and columns of a Target table.

New column
Allows you to create a new column in a Target table. It is active only when you import data to a new table. Click this button and specify the column properties in the Column Properties dialog box. Click OK to save the changes and see the created column in the top grid.

Delete
Allows you to delete columns in a Target table. It is active only when you import the data to a new table. Select a required column in the top grid and click this button. The column will be removed from the top grid.

Edit
Allows you to edit column properties in a Target table. It is active only when you import the data to a new table. Select a required column in the top grid and click this button. Specify the column properties in the Column Properties dialog box. Click OK to save the changes and see the result in the top grid.

View
It appears if you import the data to an existing table. Click it to view properties of Target columns.

They are active only when you import the data to a new table. Use the arrows to change a column order. Select a required column in the top grid and click arrows to move it up or down.

Fill Mapping
By default, dbForge Studio automatically maps Source and Target columns, but if you clicked Clear Mappings to cancel mapping of all the columns and now want to automatically fill the Target table with the Source columns, click Fill Mapping.

Clear Mappings
Click it to cancel mapping. The columns in the top grid will lose bold highlight, and the Source column fields will contain None value. You should click the fields to select a required Source column from the drop-down list.

Top grid (for the Target table)

Key
Select the Key check box next to a required column with a Primary key. If you are importing to an existing table, you can select any of existing key columns (they are marked with the [image] icon). You should select at least one column with a primary key, otherwise some of import modes on the Modes wizard page will be disabled.

Column
Shows the names of the Target table columns. Click any column to view and edit its properties.

Type
Shows the types of the Target table columns. Click any column type to view and edit it.

Position
Indicates the starting position of the Source table column.

Length
Indicates the length of a Source column. If this Source column is mapped to a Target one, you can click the Length field to see the highlighted Source column range in the bottom grid. To change the column length, enter the value manually or move the markers indicating the column range to the right or left.

Default Value
Enter a value to use as a default value in the selected Source column. All null values in the records of the selected Source column will be replaced with the default value if it is specified.

Map
Use this button to change mapping of Source and Target columns. Select a required Target column in the top grid and click the Unmap button. Click a required Source column in the Preview section to map it to the Target column and click the Map button. Now when you select the Target column in the top grid, the mapped Source column will be highlighted in the Preview section.

Unmap
Click it to change mapping of Source and Target columns. Select a required Target column in the top grid and click the Unmap button.

Preview (for the Source table)

Ruler
Shows ranges of the Source columns with the help of markers. To add a marker, double-click on a required place in the Preview section. To delete the marker, double-click it again. You can move them forward or backward to change the column length. The changes are displayed in the Length and Position fields in the top grid. You can select a range between markers to map it to a Target column by clicking any place between these markers. The range will be highlighted with green.

Save Template
Click it to save the settings as a template for future uses.

See Also

Data Import Wizard

Data Formats, Data Import Wizard


Modes, Data Import Wizard

Use this wizard page to select how dbForge Studio for MySQL should import the data. You can select the following modes:

Append
Select it to insert records from the Source into the Target table.

Update
Select it to replace records in the Target table with ones from the Source.

Append/Update
Select it if you want to replace existing records in the Target table and add new ones.

In this mode, dbForge Studio will ignore keys selected on the Mapping wizard page if they differ from Primary and Unique Keys of the table. This happens because INSERT statement and ON DUPLICATE KEY UPDATE clause, applied in Append/Update mode, use Primary and Unique Keys of the table.

Delete
Select it to delete existing records in the Target table that match records in the Source.

Note

Update, Append/Update, Delete are disabled while importing to a new table.

Repopulate
Select it to delete all the records in the Target table and insert all the records from the Source.

Use a single transaction
Select it to import data as a single transaction, i.e., if any error occurs, all the data imported before this error will be rolled back.

Note

Note, if you are importing to a new table, only Append mode is available, as it's no need to use other import modes with a new table.

If you are importing to an existing table and did not selected any Target column as one containing a Primary key (to do this, select the Key check box for a column on the Mapping wizard page), some of the import modes will be disabled and the wizard will show a warning.

Use bulk insert
Select this option to reduce the quantity of statements and speed up import. Be careful, this can affect error handling mechanism.

Save Template
Click it to save the settings as a template for future uses. For more information, go to the Saving and Using Templates topic.

See Also

Data Import Wizard

Output, Data Import Wizard


Output, Data Import Wizard

Select output options to manage the data import script on this page.

Open the data export script in the internal editor
Select the check box to open the data export script in an SQL document. The file name is generated automatically.

Save the data import script to a file
Select the check box to output your script to a file.

Browse
Click the button to specify the path to save a file.

Add timestamp to the file name
Select to add date and time of the script creation to its name.

Open in the internal editor
Select the check box to open the script in dbForge Studio for MySQL. The file name is generated by a user. If not selected, the script will not open.

Import data directly to the database
Select the check box to synchronize the target database immediately without generating a synchronization script.

See Also

Data Import Wizard

Errors Handling, Data Import Wizard


Errors Handling, Data Import Wizard

Use this wizard page to select how dbForge Studio for MySQL should handle errors during import and whether you want to get a log file with details about the import session.

The page contains the following details:

Errors handling

Prompt a user for an action
Select it to be prompted by dbForge Studio for MySQL in case of any errors. You will be able to ignore the errors and continue importing or cancel the process.

Ignore all errors
Select it to make dbForge Studio for MySQL ignore all errors during import.

Abort at the first error
Select it to cancel import if any error occurs.

Log settings

Write a report to a log file
Select it to get a log file with details about the import session. This will allow you to see the information about the errors appeared during the import session and their causes.

Log file
Click the Browse button and specify the path to the log file or enter it manually.

Save Template
Click it to save the settings as a template for future uses. For more information, go to the Saving and Using Templates topic.

See Also

Data Import Wizard

Import, Data Import Wizard


Import Progress, Data Import Wizard

See the import progress on this page. To cancel the import, click the Cancel button.

Minimize Application
Click this button to minimize the application and start doing other tasks until the import is finished.

See Also

Data Import Wizard

Finish, Data Import Wizard


Finish, Data Import Wizard

Use this wizard page to see whether the import completed successfully or failed.

Errors count
Displays the total number of errors.

Warnings
Displays the total number of warnings.

Rows imported
Displays the total number of imported rows.

Show log file
Click the Show log file button to open the log file. This button appears only if you selected Write a report to a log file on the Errors Handling wizard page.

Import more
Allows you to select a new source file and continue importing data.

See Also

Data Import Wizard

Open MS Access Database Dialog Box


Open MS Access Database Dialog Box

When selected for import MS Access data is password-protected, the Open MS Access database dialog box appears prompting you to enter the password.

Enter a password and click Connect to connect to the source data and move to other wizard's pages.

If you don't want to proceed, click Cancel.

See Also

Data Import Wizard

Open MS Access Database Dialog Box

© 2004-2018 Devart


Data Generator

This section describes wizards and windows, related to the Data Generator tool.

In This Section

Data Generator Properties Window
Describes the Data Generator Properties wizard user interface elements.

Data Generation Document
Describes the details of the Data Generation document.

Data Generator Types
Describes types of available data generators.

Data Population Wizard
Describes the Data Population wizard user interface elements.

Data Type-Specific Column Generation Settings
Describes data type-specific column generation settings.


Data Generator Properties Window

This section describes the Data Generator Properties wizard user interface elements.

In This Section

Connection, Data Generator Properties Window

Options, Data Generator Properties Window


Connection, Data Generator Properties Window

This window allows you to set up a connection to MySQL, and select a database you want to generate data for.

Connection
Select the server instance to connect to. The server instance last connected to is displayed by default.

Edit
Click to open the Database Connection Properties dialog box to view and manage MySQL connection properties.

New
Click to open the Database Connection Properties dialog and create a new MySQL instance connection.

Database
Select a name of a MySQL database you want to generate data for.

Server Version
Shows the version of the selected server instance. The phrase "not available" is shown when no version is available.

Help
Click to open dbForge Studio for MySQL help.

Next
Click to go to the Options page.

Open
Click to run Data Generator.

Cancel
Click to close the Data Generator wizard.

See Also

Data Generator Properties Window

Options, Data Generator Properties Window


Options, Data Generator Properties Window

This window allows you to set up options for generating data.

Number of rows to generate
Specify the number of rows you want to generate.

Include NULLs
Check this option and specify the percentage of NULL values for the field, if necessary.

Set values to unique
Select to set unique values.

Truncate data from table before generation
Select to truncate data from table before generation. To make the option effective, ensure to select the Disable foreign keys option on the Options, Data Generator Wizard page.

Value distribution mode

Random by timestamp
Select to randomize values by timestamp. The option allows you to generate miscellaneous random data every time you run data population. It is useful when you need to populate database with miscellaneous non-recurrent data.

Random by seed
Enter a seed value (between -2147483648 and 2147483647). The option allows you to generate recurrent random data, i.e. every time you run data population, the generated random data will be the same as with the previous data generation.

Sequential
Select for sequential values.

Country-specific data
Select a country from the drop-down list to generate for real localized values, such as first names (female and male), last names, addresses, streets, cities, phones etc.

Help
Click to open dbForge Studio for MySQL help.

Back
Click to go to the Connection page.

Open
Click to run Data Generator.

Cancel
Click to close the Data Generator wizard.

See Also

Data Generator Properties Window

Data Generation Document


Data Generation Document

The Data Generation document allows you to select fields for generating data and set various data generation parameters. The saved Data Generation file has the '*.dgen' extension.

The top-left side of the window displays tables of the selected database. Table fields and their types are listed in the grid of the Preview of data to be generated area below.

When you select a table in the tree, you can set data generation parameters for each of its fields within the Column generation settings for area, at the right side of the window.

Note

Generation parameters vary according to the data type of the selected field. For more detailed information, read the Data Type-Specific Column Generation Settings topic.

Tables and columns to populate

Lists tables and columns, that were selected for test data population.

Expand All
Click to expand all tables and columns.

Collapse All
Click to collapse all tables and columns.

Table generation Settings

Number of rows to generate
Specify or modify the number of rows you want to generate.

Truncate data from table before generation
Select to truncate data from table before generation. To make the option effective, ensure to select the Disable foreign keys option on the Options, Data Generator Wizard page.

Related tables
Lists child and parent tables, that are related to the selected table.

Parent tables
Lists parent tables, that are related to the selected table. To include or exclude a parent table from data generation, click the check-box next to its name.

Child tables
Lists child tables, that are related to the selected table. To include or exclude a child table from data generation, click the check-box next to its name.

Column Generation Settings

Select required settings for the selected column. The set of settings depends on the column data type and selected generator. For more information on the settings, refer to the Data Generator Types section.

See Also

Data Generator Properties Window

Data Generator Types


Data Generator Types

In This Section

Basic Settings
Describes basic settings shared by all types of the data generators.

Basic Generators
Describes basic generators.

Advanced Generators
Describes advanced generators.


Basic Settings

The dialog box for each type of the data generators contains basic settings and custom settings. You can customize the data generators by changing the basic and custom settings.

The basic settings common to all the data generators are:

Generator
Displays information on a selected data generator. dbForge Studio for MySQL automatically selects a generator for each column based on column data type and related constraints. You can select a desired type of generator from the list of available data generators. Different generators create different types of data for the table to be populated.

Set values to be unique
Select to make the values generated for a column unique. If the column schema has a uniqueness constraint (such as a unique index or primary key), the check box is selected by default.

Include NULL values
Selected by default. Includes NULL values into random fields of a column to be populated. In the percent box, type or select the percentage of NULL values to be included into the column.

Include empty values
Includes empty values into random fields of a column to be populated. In the percent box, type or select the percentage of empty values to be included into the column.

Value distribution mode
This group of settings defines how the generated values are distributed in the column.

Random by timestamp
Selected by default. Generates values randomized by a timestamp.

Random by seed
Generates values in a random order using a specified seed value.

Sequential
Generates values from a list in a sequential order.

Loop data
Selected by default. Available in all modes. Select to cyclically read data from a file.

Repeat each value
Select to repeat values and specify the number of repetitions.

Notes Text Box
Type your notes on generator in this box.

The custom settings are separately described for each data generator in the corresponding topics.

See Also

Data Generator Types

Constant Generator


Basic Generators

In This Section

Constant Generator
Describes the Constant Generator and its custom settings.

Datetime Generator
Describes the Datetime Generator and its custom settings.

Files Folder Generator
Describes the Files Folder Generator and its custom settings.

Foreign Key (auto assigned) Generator
Describes the Foreign Key Generator and its custom settings.

Foreign Key (manually assigned) Generator
Describes the Foreign Key Generator and its custom settings.

JSON Generator
Describes the JSON Generator and its custom settings.

Lorem Ipsum Generator
Describes the Lorem Ipsum Generator and its custom settings.

Python Generator
Describes the Python Generator and its custom settings.

Regular Expression Generator
Describes the Regular Expression Generator and its custom settings.

Shuffled Text Generator
Describes the Shuffled Text Generator and its custom settings.

SQL Query Generator
Describes the SQL Query Generator and its custom settings.

String Generator
Describes the String Generator and its custom settings.

Table or View Generator
Describes the Table or Veiw Generator and its custom settings.

Text File Generator
Describes the Text File Generator and its custom settings.

Twaddle Generator
Describes the Twaddle Generator and its custom settings.

Uniqueidentifier Generator
Describes the Uniqueidentifier Generator and its custom settings.

Weighted List Generators
Describes the types of Weighted List Generators and their custom settings.


Constant Generator

The Constant Generator generates constants or column default values.

The dialog box of the Constant Generator contains Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

User defined constant
Type or select a value of a constant.

Column default constraint
Specify a constraint for a column, where applicable.

See Also

Basic Generators

Datetime Generator


Datetime Generator

The Datetime Generator generates dates and times with fractional seconds values.

The dialog box of the Datetime Generator contains Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

The settings depend on the range type selected.

Range: Min ... Max

Date
Specify the minimum and maximum date values.

Time
Specify the minimum and maximum time values.

Fraction
Select the minimum and maximum seconds values.

Random
Select to generate random values, where necessary.

Range: Offset from column

Column
Select a column as a time reference-point.

Use offset details
Select to configure offset details.

Days
Specify the minimum and maximum days to be added to the reference point.

Time
Specify the minimum and maximum timestamp to be added to the reference point.

Range: Offset from Now

Use offset details
Select to configure offset details.

Days
Specify the minimum and maximum days to be added to the reference point.

Time
Specify the minimum and maximum timestamp to be added to the reference point.

See Also

Basic Generators

Files Folder Generator


Files Folder Generator

The Files Folder Generator imports the contents of files located in a specified folder. For example, use the generator to import images from a folder containing a number of images. Each image is imported into a new field.

The dialog box of the Files Folder Generator contains Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

Folder to load data from
Select a folder to load files from.

Include subfolders
Select to include subfolders of the specified folder.

File pattern
Select a file mask for the files to be uploaded, for example *.png, *.jpg, *.bmp or *.txt (*.* is set by default).

See Also

Basic Generators

Foreign Key (auto assigned) Generator


Foreign Key (auto assigned) Generator

The Foreign Key (auto assigned) Generator can be automatically assigned to a column for which a FOREIGN KEY constraint is defined. The Foreign Key (auto assigned) Generator generates foreign key values for a child table column based on the values contained in a parent table column.

The dialog box of the Foreign Key (auto assigned) Generator contains Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

Foreign Key
Specifies the name of the generated foreign key and a link to a parent table column.

Setting up parent table

You can generate specific values for the parent table column referenced by the child table column:

1. Click the link (mentioned above) to jump to the parent table column.

2. Select the check-box next to the column.

3. Select the required generator from the list of available generators;

4. Configure settings of the generator using Basic Settings and custom settings specific to this generator.

See Also

Basic Generators

Foreign Key (manually assigned) Generator


JSON Generator

The JSON Generator generates data using JSON template.

The dialog box of the JSON Generator contains Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

Template
Shows JSON template

Preview
Shows preview of data to be generated

Generator
Click to insert one of Advanced Generators into JSON template.

See Also

Basic Generators

Lorem Ipsum Generator


Lorem Ipsum Generator

The Lorem Ipsum Generator is a dummy text filler with some characteristics of a real written text. The generated text includes punctuation marks, each new sentence starts with an uppercase letter.

The dialog box of the Lorem Ipsum Generator contains Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings. The dialog box of the Lorem Ipsum Generator also contains a text editor window, in which you can either manually type text or load it from a file. By default, the text editor window contains a sample Lorem Ipsum text.

Custom Settings

Length
Set minimum and maximum string length in a field.

Paragraphs
Set minimum and maximum number of paragraphs in a field.

Sentences
Set minimum and maximum number of sentences in a field.

Words
Set minimum and maximum number of words in a field.

Start paragraph with indent
Select to add indents to paragraphs.

Add paragraph tags
Select to present text as a paragraph.

Add italic tags
Select to make 5% of words italic.

Add bold tags
Select to make 3% of words bold.

Load text from a file
Click to import a Lorem Ipsum text from a file.

See Also

Basic Generators

Python Generator


Python Generator

The Python Generator generates data using an IronPython script.

The dialog box of the Python Generator contains Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

IronPython script text box
Specify your script in the text box.

Using IronPython Script

You can use an IronPython script to generate data.

A script must define a main() function that takes a single config argument.

config is a dictionary containing keys you can use in your scripts.

You can specify values for the following keys:

· config["column_type"] - is the column datatype
· config["column_size"] - is the column size
· config["n_rows"] - is the number of rows
· config["seed"] - is the current random seed
· config["config_path"] - is the path to the meaningful generators folder
· column_name - is the column name. Specifying the config argument before column_name is not obligatory. It can be called directly.

Using Regular Expressions

The Python Generator supports the usage of the RegexGenerator inner class. Therefore, you can use regular expressions within the Python Generator.

You can create the RegexGenerator in the following three ways:

mygen = RegexGenerator(regular expression)

mygen = RegexGenerator(regular expression, is unique data, data length)

mygen = RegexGenerator(regular expression, is unique data, data length, seed)

WHERE:

· regular expression - an actual regular expression, e.g. "[0-9A-Z]+"
· is unique data - defines whether to generate unique data. Available parameters are False and True
· data length - specifies the length of the largest value to be generated. It can be a digit value or an expression set in the following way: config["column_size"]
· seed: - a seed value. It can be a digit value or an expression set in the following way: config["seed"]

Usage Example

mygen = RegexGenerator("[0-9A-Z]+",False, 30)

def main():
i = 0
while i <= config["n_rows"]:
i = i + 1
varData = mygen.Generate();
yield varData

main()

Examples of Python Scripts

1. Sequential read of rows from a text file:

# Read a txt file sequentially
def getColors():
fileName = config["config_path"] +'\\'+ r"Colors.txt"
with open(fileName) as f:
content = f.readlines()
for row in content:
yield row

def main(config):
return getColors()

2. Random read from a text file:

# Read a txt file randomly
import random

# Uncomment the line below to use a seed if needed
#random.seed(config["seed"])

def getColors():
fileName = config["config_path"] +'\\'+ r"Colors.txt"
with open(fileName) as f:
content = f.readlines()
for row in content:
yield row

def main(config):
colors = list(getColors())
while True:
yield colors[random.randint(0, len(colors)-1)]

3. Sequential read of data for a column from a CSV file:

# Read a csv file sequentially
import csv
def getCountryCodes():
columnName = 'ISO3166-1-Alpha-2'
fileName = config["config_path"] +'\\'+ r"CountryCodes.csv"
with open(fileName,"rb") as file:
reader = csv.DictReader(file, delimiter=';', quotechar='"')
for row in reader:
yield str(row[columnName]).upper()

def main(config):
return getCountryCodes()

4. Random read of data for a column from a CSV file:

# Read a csv file sequentially
import csv
import random

# Uncomment the line below to use a seed if needed
#random.seed(config["seed"])

def getCountryCodes():
columnName = 'ISO3166-1-Alpha-2'
fileName = config["config_path"] +'\\'+ r"CountryCodes.csv"
with open(fileName,"rb") as file:
reader = csv.DictReader(file, delimiter=';', quotechar='"')
for row in reader:
yield str(row[columnName]).upper()

def main(config):
codes = list(getCountryCodes())
while True:
yield codes[random.randint(0, len(codes)-1)]

5. Sequential read of rows from a XML file:

# Read an XML file
# Use the CLR XML libraries

import clr
clr.AddReference("System.Xml")
from System.Xml.XPath import XPathDocument, XPathNavigator

def getTitles(column_size=50):
filename = r"D:\books.xml"
doc = XPathDocument(filename)
nav = doc.CreateNavigator()
expr = nav.Compile("/catalog/book/title")
titles = nav.Select(expr)
for title in titles:
yield str(title)[:column_size]

def main(config):
# Truncate titles to the column size
return list(getTitles(column_size=config["column_size"]))

6. Generation of male and female names from files depending on a flag:

# Select a name depending on a flag
import random

# Uncomment the line below to use a seed if needed
#random.seed(config["seed"])

def getPersonNames(fileName):
fileName = config["config_path"] +'\\'+ fileName
with open(fileName) as f:
content = f.readlines()
for row in content:
yield row

def main(config):
males = list(getPersonNames(r"FirstNamesMale.txt"))
famels= list(getPersonNames(r"FirstNamesFemale.txt" ))
while True:
# is_male - is a flag field
if is_male:
yield males[random.randint(0, len(males)-1)]
else:
yield famels[random.randint(0, len(famels)-1)]

7. Running a certain generator depending on a flag:

# Select a generator depending on a flag

def main(config):
maleGen = RegexGenerator("Automotive|Computers|Crafts|Tools")
femaleGen = RegexGenerator("Furniture|Pharmacy|Garden|Gifts")
while True:
# is_male - is a flag field
if is_male:
yield maleGen.Generate()
else:
yield femaleGen.Generate()

8. Calculating a new date basing on a date value from other field.

# Calculate a date based on another date
import random

# Uncomment the line below to use a seed if needed
#random.seed(config["seed"])

def main(config):

# StartDate - is a column name
if str(StartDate) == '':
return DBNull.Value

# Add number of days to a StartDate
return StartDate.AddDays(random.randint(1, 1000));

9. Addition of random number of days to the current date:

import random
import clr

random.seed(config["seed"])
startDate = DateTime(1910,1,1)

def main(config):
while True:
# Add number of days to a startDate
yield startDate.AddDays(random.randint(1, 100000)).ToString('yyyy-MM-dd');

10. Display of random date from the specified range:

import random
import clr

random.seed(config["seed"])
startDate = DateTime(1910, 1, 1)
endDate = DateTime(2018, 1, 1)
daysToAdd = (endDate - startDate).Days

def main(config):
while True:
#Add number of days to a startDate
yield startDate.AddDays(random.randint(1, daysToAdd)).ToString('yyyy-MM-dd')

See Also

Basic Generators

Regular Expression Generator


Regular Expression Generator

The Regular Expression Generator generates data based on a regular expression.

The dialog box of the Regular Expression Generator contains Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

Insert snippet
Select a snippet to be inserted into the expression.

Insert counter
Select a counter to be inserted into the expression.

Insert file
Select a file to be inserted into the expression.

Insert column
Select a column to be inserted into the expression.

Insert generator
Select a generator to be inserted into the expression.

Below are the tables of syntax elements.

Basic:

Description | Usage | Generates (examples)
ordinary chars | John | "John"
individual chars | [dB] | "d" or "B"
[star-end] range | [0-9] | "2" or "5"
[chars] character set | [a-z0-9] | "7" or "q"
[exclude chars] character set | [^B-E] | "A" or "D"
initial ] in char set | []] | "]"
(regexp) grouping | (xwz)*y | "xwzxwzy" or "y"
* zero or more | xwz* | "xwzzzz" or "zw"
+1 or more | xwz+ | "xwzzzz" or "xwz"
? include or not | xwz? | "xw" or "xwz"
{num} repeat | z{4} | "zzzz"
{min,} at least min repeats | z{4,} | "zzzz" or "zzzzzzzzzz"
{,max} not more than max repeats | z{,4} | "zz" or "zzzz"
{min, max} repeat | z{3,4} | "zzz" or "zzzz"
() | empty string |
| alternatives | True|False | "True" or "False"
empty alternative | (|dark|light)gray | "darkgray" or "gray"
numeric counter | ${counter([0-9]{4}) or ${counter(\d{4})} } | 0000, 0001, 0002, ..., 9997, 9998, 9999
numeric counter decrement order | ${counter([9876543210]{4}) | 9999, 9998, 9997, ..., 0002, 0001, 0000
char counter | ${counter([A-Z]{2})} or ${counter(\C{2})} | AA, AB, AC, ..., ZX, ZY, ZZ
char counter decrement order | ${counter([ZYXWVUTSRQPONMLKJIHGFEDCBA]{2})} | ZZ, ZY, ZX, ..., AC, AB, AA
hex counter | ${counter([0-9a-f]{5})} or ${counter(\h{5})} | 00000, 00001, 00002, ..., ffffd, ffffe, fffff
hex counter decrement order | ${counter([FEDCBA9876543210]{5})} | FFFFF, FFFFE, FFFFD, ..., 00002, 00001, 00000
custom IDs | (ID(${counter([1-9]{3})})) | ID111, ID112, ID113, ..., ID997, ID998, ID999
loading TXT file content from the default folder | $"FirstNamesMale.txt" | John or Alan or Glen
loading TXT file content from a user folder | $"D:\folder_name\FirstNamesMale.txt" | John or Alan or Glen
loading CSV file content from the default folder [csv_second_column] | $"USStates.csv[1]" | Ohio or Iowa or Texas
loading CSV file content from a user folder [csv_first_column] | $"D:\folder_name\USStates.csv[0]" | OH or IA or TX
loading column content from the same table | $"[Gender]" | F or M
loading column content from other table | $"[sakila].[customer].[gender]" | F or M
loading column content from other database | $"[sakila].[customer].[gender]" | F or M
loading column content from other connection | $"[connection_name].[sakila].[customer].[gender]" | F or M
loading column content from query | $"[SELECT * FROM [customer] WHERE [active] = 1].[gender]" | F or M
loading column content from query of other connection | $"[connection_name].[SELECT * FROM [customer] WHERE [active] = 1].[gender]" | F or M
generating values according to their weight ratio | Ohio$"10"|Iowa$"50"|Texas$"90" | Texas or Texas or Texas or Iowa or Texas
generating values from predefined generator | $"IPv4 Address" | 10.0.0.4 or 192.168.1.2

Escapes:

Description | Usage | Generates (examples)
backslash | \\ | \
dollar sign | \$ | $
ordinary chars | \{ | {
right brace | \} | }
left square bracket | \[ | [
right square bracket | \] | ]
left parenthesis | \( | (
right parenthesis | \) | )
right parenthesis | \| | |
asterisk | \* | *
plus mark | \+ | +
question mark | \? | ?
lower-case letter | \c | [a-z]
upper-case letter | \C | [A-Z]
upper or lower-case letter | \A | [a-zA-Z]
upper or lower-case letter or underscore or digit | \w | [a-zA-Z_0-9]
all ASCII printable characters | \W | [ -~]
digit | \d | [0-9]
digit without a zero | \D | [1-9]
bit | \b | [0-1]
hexadecimal character | \h | [0-9a-f]
HEXADECIMAL character | \H | [0-9A-F]
carriage return | \r |
line feed | \l |
tab character | \t |
space characters | \s | [ \t]
unicode (UTF-16) escapes | \u20ac | €
hexadecimal escapes | \xA3 | ₤

Additionally, you can use the Insert Snippet button to add the following snippets:

Snippets | Description
[a-z] | lower case letter
[A-Z] | UPPER case letter
[0-9] | digit
\D | digit without a zero
\h | hexadecimal character
[ ] | space
\w | UPPER or lower-case letter or underscore or digit
\W | all ASCII printable characters
| | alternative
( ) | group
* | 0 or more repeats
+ | 1 or more repeats
{5} | 5 repeats
{5,9} | 5 to 9 repeats
{5,} | 5 or more repeats

See Also

Basic Generators

Shuffled Text Generator


Shuffled Text Generator

The Shuffled Text Generator randomly shuffles words in a selected text excluding punctuation marks.

The dialog box of the Shuffled Text Generator contains Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

The dialog box of the Shuffled Text Generator also contains a text editor window, in which you can either manually type the text or load it from a text file.

Custom Settings

Min length
Set minimum string length of a field.

Max length
Set maximum string length of a field.

Load text from a file
Click to import text from a text file (*.txt). All files filter (*.*) is available.

See Also

Basic Generators

SQL Query Generator


SQL Query Generator

The SQL Query Generator retrieves column data of a compatible type from an external database by using a custom query.

The dialog box of the SQL Query Generator contains Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

Connection
Select a server connection.

Database
Select a database you want to retrieve data from.

SQL Query
Type an SQL statement that returns a single column with a compatible data type. If your query returns multiple columns, choose the required one in the Column box.

Column
Select a column you want to retrieve data from.

See Also

Basic Generators

String Generator


String Generator

The String Generator generates character string values.

The dialog box of the String Generator contains Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

Min
Select a server connection.

Max
Select a database you want to retrieve data from.

Character set
This group of settings defines two character sets for selection.

ASCII
Select to apply ASCII.

Unicode
Select to apply unicode.

See Also

Basic Generators

Table or View Generator


Table or View Generator

The Table or View Generator retrieves column data of a compatible type from a table or view.

The dialog box of the Table or View Generator contains Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

Connection
Specify a server connection.

Database
Select a database you want to retrieve data from.

Table
Select the table you want to retrieve data from. When the Table option is selected, the View option is disabled.

View
Select the view you want to retrieve data from. When the View option is selected, the Table option is disabled.

WHERE filter
To filter data being retrieved from a column, type an SQL expression and click Validate.

Column
Select the column you want to retrieve data from.

See Also

Basic Generators

Text File Generator


Text File Generator

The Text File Generator loads values from a specified text file. Select a text file with a list of values, in which each separate string is a single value.

The dialog box of the Text File Generator contains Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

File to load data from
Click [...] to select a file to load data from. After the file is selected, the full path and file name of the specified file are shown.

Trim left trailing spaces
Removes spaces, tabs and other non-printing characters on the LEFT of each string.

Trim right trailing spaces
Removes spaces, tabs and other non-printing characters on the RIGHT of each string (does not remove line breaks).

See Also

Basic Generators

Twaddle Generator


Twaddle Generator

The Twaddle Generator randomly generates sentences.

The dialog box of the Twaddle Generator contains Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

First name
Click [...] to select a file to load data from. After the file is selected, the full path and file name of the specified file are shown.

Last Name
Click [...] to select a file to load data from. After the file is selected, the full path and file name of the specified file are shown.

Min
Select the minimum number of paragraphs in the range of 1 to 10.

Max
Select the maximum number of paragraphs in the range of 1 to 10.

Include heading tags
Select to include heading tags.

Include HTML tags
Select to include HTML tags.

Twaddle dictionaries can be modified here: C:\Users\Public\Documents\Devart\dbForge Studio for MySQL\Data Generators\Twaddle Dictionary.

See Also

Basic Generators

Uniqueidentifier Generator


Uniqueidentifier Generator

The Uniqueidentifier Generator generates 16-byte GUID values. These values may be used as primary keys for a table to ensure uniqueness between database servers.

The dialog box of the Uniqueidentifier Generator contains Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

The following screenshot demonstrates a preview of the GUID values to be generated.

See Also

Basic Generators

Weighted List Generators


Weighted List Generators

dbForge Studio provides the following types of weighted list generators:

· Weighted List Generator (simple) - generates flat values according to a specified ratio.
· Weighted List Generator (nested) - generates values from nested value lists according to a specified ratio.
· Weighted List Generator (ranged) - generates values in a specified range.
· Weighted List Generator (regexp) - generates regexp data according to a specified ratio.

The dialog box for each type of the Weighted List Generators contains Basic Settings, custom settings, and a data grid. You can customize the generator by changing the basic and custom settings.

Custom Settings

Buttons

Load values from File
Opens a dialog box to select a file and retrieve data from the file into the data grid.

Load values from Table or Veiw
Opens a dialog box to select the connection, database, table or view, and column to retrieve data from. In the WHERE filter box, type or paste a statement to filter the data being retrieved and click Validate.

Load Values from SQL Query
Opens a dialog box to select the connection, database, and column to retrieve data from. In the SQL Query box, type or paste a statement to filter the data being retrieved. Choose the column with the correct data type.

Save Values to File
Specify the directory to save the file.

Add a Value
Adds a new empty line in the Value field and a default weight value 10.

Delete Current Value
Deletes a line and navigates a focus to a subsequent line.

Clear values list
Clears all values from the data grid.

Data Grid

A data grid represents a table of data to be populated. The data grid of each weighted list generator includes the following columns: Order Number, Value, Weight, and Percentage (%). The Value column contains generated values. The Weight column contains weight ratios of the values. The Percentage (%) column shows the percentage of occurrences of each value in the column with respect to the rest of the values.

Weighted List Generator (nested)

The nested Weighted List Generator contains two data grids: a main data grid and a nested data grid. The main data grid is non-editable except for the Weight column. Upon clicking the Value column of the main data grid, the nested data grid appears. In the nested data grid, columns Value and Weight are editable. The Percentage (%) column is a calculated column.

At the bottom of the nested data grid, buttons Load values from File, Save values to File, Add a Value, Delete current value, Clear values list are placed. The buttons function similar to those described above.

Weighted List Generator (ranged)

The data grid in the ranged Weighted List Generator contains five columns: Order Number, From, To, Weight, and Percentage (%). The From column includes initial values of a value range and the To column includes end values of the value range. For date values, on clicking the From and To columns, a calendar window appears.

See Also

Basic Generators

Advanced Generators


Advanced Generators

In This Section

ABA Routing Transit Number
Describes the ABA Routing Transit Number Generator and its settings.

Birth Date
Describes the Birth Date Generator and its settings.

Canadian Social Insurance Number
Describes the Canadian Social Insurance Number Generator and its settings.

CODEN
Describes the CODEN Generator and its settings.

Credit Card Number
Describes the Credit Card Number Generator and its settings.

Credit Cart Type
Describes the Credit Card Type Generator and its settings.

CUSIP Number
Describes the CUSIP Number Generator and its settings.

Employment Term
Describes the Employment Term Generator and its settings.

International Article Number
Describes the International Article Number Generator and its settings.

International Bank Account Number
Describes the International Bank Account Number Generator and its settings.

International Maritime Organization Number
Describes the International Maritime Organization Number Generator and its settings.

International Mobile Station Equipment Identity Code
Describes the International Mobile Station Equipment Identity Code Generator and its settings.

International Mobile Station Equipment Identity Code Software Version
Describes the International Mobile Station Equipment Identity Code Software Version Generator and its settings.

International Securities Identification Number
Describes the International Securities Identification Number Generator and its settings.

International Standard Book Number
Describes the International Standard Book Number Generator and its settings.

International Standard Music Number
Describes the International Standard Music Number Generator and its settings.

International Standard Serial Number
Describes the International Standard Serial Number Generator and its settings.

IPv4 Address
Describes the IPv4 Generator and its settings.

Password Hash
Describes the Password Hash Generator and its settings.

Post Tracking Number
Describes the Post Tracking Number Generator and its settings.

United Kingdom NHS Number
Describes the United Kingdom NHS Number Generator and its settings.

United Kingdom Stock Exchange Daily Official List Number
Describes the United Kingdom Stock Exchange Daily Official List Number Generator and its settings.

Universal Product Code
Describes the Universal Product Code Generator and its settings.

Federal Employer Identification Number
Describes the Federal Employer Identification Number Generator and its settings.

Vehicle Identification Number
Describes the Vehicle Identification Number Generator and its settings.


ABA Routing Transit Number

An ABA routing transit number (ABA RTN) is a code that directs electronic ACH deposits to the proper bank institution in the United State.

The ABA RTN Generator generates nine-digit codes. The code is of the form XXXXYYYYC, where XXXX is Federal Reserve Routing Symbol, YYYY is ABA Institution Identifier, and C is the check digit.

The dialog box of the ABA RTN Generator contains some of the Basic Settings. You can customize the generator by changing the basic settings.


Birth Date

The Birth Date Generator generates with dates of birth for different age groups, such as retired persons, adults, students, teenagers, etc.

The dialog box of the Birth Date Generator contains some of the Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

Data grid

Category column
Specifies age categories of persons

Age range column
Specifies age for each category of persons

Weight column
Specifies weight ratios of the values

Percentage (%) column
Specifies the percentage of occurrences of each value in the column with respect to the rest of the values.


Canadian Social Insurance Number

A social insurance number (SIN) is a number issued in Canada to administer various government programs.

The CA Social Insurance Number generator provides nine-digit numbers formatted as three groups of three digits, the groups being separated by spaces.

The dialog box of the CA Social Insurance Number Generator contains some of the Basic Settings. You can customize the generator by changing the basic settings.

Custom Settings

Separator
Specify a separator to be included between the groups of digits. By default, digits are separated by spaces.


CODEN

A bibliographic code (CODEN) is a six-character code that identifies the titles of periodicals and non-serial publications, and is used as a search tool in many bibliographic catalogues.

The first four characters of the six-character CODEN are taken from the initial letters of the words from a title, followed by a fifth letter- one of the first six letters (A-F) of the alphabet. The sixth character is an alphanumeric check character calculated from the preceding letters. CODEN always uses capital letters.

The CODEN Generator generates six-character, alphanumeric bibliographic codes.

The dialog box of the CODEN Generator contains some of the Basic Settings. You can customize the generator by changing the basic settings.

Custom Settings

Separator
Specify a separator to be included between the groups of digits. By default, digits are separated by hyphens.


Credit Card Number

The Credit Card Number Generator generates numbers that comply to the ISO/IEC 7812 numbering standard. It contains a six-digit issuer identification number (IIN), an individual account identification number and a single digit checksum.

The dialog box of the Credit Card Number Generator contains some of the Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

Data grid

Name
Specifies the names of financial companies issuing credit cards.

Code
Specifies code templates for generating

Weight column
Specifies weight ratios of the values

Percentage (%) column
Specifies the percentage of occurrences of each value in the column with respect to the rest of the values.


Credit Cart Type

The Credit Card Type Generator generates types of credit cards.

The dialog box of the Credit Card Number Generator contains some of the Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

Credit Card Number column
Select the column containing credit cart numbers from the drop-down list (if any). This setting will help you to link the credit card types with credit card numbers.

Text box
Specify the predefined regular expression to customize the generated credit card types.

Insert snippet
Select a snippet to be inserted into the expression.

Insert counter
Select a counter to be inserted into the expression.

Insert file
Select a file to be inserted into the expression.

Insert column
Select a column to be inserted into the expression.


CUSIP Number

A CUSIP is a alphanumeric code that identifies securities, specifically U.S. and Canadian registered stocks, and U.S. government and municipal bonds. The CUSIP stands for US Committee on Uniform Security Identification Procedures Code (CUSIP).

The CUSIP number consists of nine characters. The first six characters identify the issuer and are assigned in an alphabetical fashion. The seventh and eighth character identify the type of issue, and the last digit is used as a check digit.

The CUSIP Number Generator generates nine-character alphanumeric codes consisting of three groups of characters separated by hyphens.

The dialog box of the CA Social Insurance Number Generator contains some of the Basic Settings. You can customize the generator by changing the basic settings.

Custom Settings

Separator
Specify a separator to be included between the groups of digits. By default, digits are separated by hyphens.


Employment Term

The Employment Term Generator generates hire date values.

The dialog box of the Employment Term Generator contains some of the Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

Data grid

Checkbox column
Clear the checkbox next to the category you want to exclude from the generation.

Category
Contains the employee categories.

Age range column
Contains age ranges specific to each category of employees

Weight column
Specify the weight of each category of employees

Percentage (%) column
Shows the percentage of occurrences of each value in the column with respect to the rest of the values (based on the relevant weights).


International Article Number

An International Article Number (originally European Article Number - EAN-13) is a 13 digit barcoding standard used worldwide for marking products.

The EAN number consists of four groups of digits:

· the first group contains three digits usually identify the national GS1 member organization, to which a manufacturer is registered;
· the second group consists of three to eight digits identifying a company number;
· the third group consists of two to six digits identifying an item reference;
· the forth group is a single checksum digit.

The International Article Number Generator generates 13-digit numbers separated by hyphens.

The dialog box of the CA Social Insurance Number Generator contains some of the Basic Settings. You can customize the generator by changing the basic settings.

Custom Settings

Separator
Specify a separator to be included between the groups of digits. By default, digits are separated by hyphens.


International Bank Account Number

The International Bank Account Number Generator generates IBAN codes. An IBAN code comprises a country code, check digits and a bank account number.

The dialog box of the International Bank Account Number Generator contains some of the Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

Separator
Specify a separator to be included between the groups of digits. By default, digits are separated by a space.

Data grid

Checkbox column
Clear the checkbox next to the country you want to exclude from generation.

Country column
Non-editable. Contains the list of countries for generating a country code.

Weight column
Specify a weight value for each record in the column.

Percentage column
Non-editable. Calculated automatically depending of the weight value.

Generating IBAN

The following image demonstrates the IBAN generation algorithm.


International Maritime Organization Number

The International Maritime Organization (IMO) number is a reference for ships and for registered ship owners and management companies. The IMO number is formed of the three letters "IMO" followed by a seven-digit number consisting of a six-digit sequential unique number and a check digit.

The International Maritime Organization Number Generator generates a seven-digit number with the last digit separated by a hyphen.

The dialog box of the International Maritime Organization Number Generator contains some of the Basic Settings. You can customize the generator by changing the basic settings.

Custom Settings

Separator
Specify a separator to be included between the groups of digits. By default, digits are separated by a hyphen.


International Mobile Station Equipment Identity Code

The International Mobile Station Equipment Identity (IMEI) is a unique number given to every single mobile phone. The IMEI is a 15 digit number that includes information on the origin, model, and serial number of the device.

The International Mobile Station Equipment Identity Code (IMEI) Generator generates 15 decimal digits separated by hyphens.

The dialog box of the IMEI Generator contains some of the Basic Settings. You can customize the generator by changing the basic settings.

Custom Settings

Separator
Specify a separator to be included between the groups of digits. By default, digits are separated by a hyphen.


International Mobile Station Equipment Identity Code Software Version

The International Mobile Station Equipment Identity Software Version (IMEISV) is a unique number given to every single mobile phone. The IMEISV is a 16 digit number (15 digits plus a check digit) that includes information on the origin, model, and serial number of the device.

The International Mobile Station Equipment Identity Code Software Version (IMEISV) Generator generates 16 decimal digits separated by hyphens.

The dialog box of the IMEISV Generator contains some of the Basic Settings. You can customize the generator by changing the basic settings.

Custom Settings

Separator
Specify a separator to be included between the groups of digits. By default, digits are separated by a hyphen.


International Securities Identification Number

An International Securities Identification Number (ISIN) identifies a security, including bonds, commercial papers, stocks and warrants.

The ISIN number is a 12-character alpha-numerical code consisting of three parts: a two-letter country code, a nine-character alpha-numeric national security identifier, and a single check digit.

The International Securities Identification Number (ISIN, ISO 6166) Generator generates 12-character alpha-numerical codes consisting of three groups of characters separated by hyphens.

The dialog box of the ISIN Generator contains some of the Basic Settings. You can customize the generator by changing the basic settings.

Custom Settings

Separator
Specify a separator to be included between the groups of digits. By default, digits are separated by a hyphen.

Checkbox column
Clear the checkbox next to the country you want to exclude from the generation.

Country
Contains names of the countries.

Weight column
Specify the weight of each category of countries.

Percentage (%) column
Shows the percentage of occurrences of each value in the column with respect to the rest of the values (based on the relevant weights).


International Standard Book Number

The International Standard Book Number (ISBN) is a unique number that identifies each edition and variation of a book. The ISBN is a 10 digit number, though the number of digits vary depending on the country of issuance.

The International Standard Book Number (ISBN) Generator generates numbers of 10 digits separated by hyphens.

Note

You can also generate ISBNs in the 13-digit format. For this, select the International Standard Book Number (ISBN-13) generator.

The dialog box of the ISBN Generator contains some of the Basic Settings. You can customize the generator by changing the basic settings.

Custom Settings

Separator
Specify a separator to be included between the groups of digits. By default, digits are separated by a hyphen.


International Standard Music Number

The International Standard Music Number (ISMN) is a unique alphanumeric identifier for printed music developed by ISO.

The International Standard Music Number (ISMN-13) Generator generates a 9-digit number divided by hyphens with a distinguishing prefix M.

Note

You can also generate ISMNs in the 13-digit format. For this, select the International Standard Music Number (ISMN-13) generator.

The dialog box of the ISMN-13 Generator contains some of the Basic Settings. You can customize the generator by changing the basic settings.

Custom Settings

Separator
Specify a separator to be included between the groups of digits. By default, digits are separated by a hyphen.


International Standard Serial Number

An International Standard Serial Number (ISSN) is a number that identifies a serial publication and is used in orders, catalogues, libraries, and other matters relating to serial literature.

The International Standard serial Number (ISSN) Generator generates eight-digit codes divided by a hyphen into two four-digit numbers.

Note

You can also generate ISSNs in the 13-digit format. For this, select the International Standard Serial Number (ISSN-13) generator.

The dialog box of the ISSN Generator contains some of the Basic Settings. You can customize the generator by changing the basic settings.

Custom Settings

Separator
Specify a separator to be included between the groups of digits. By default, digits are separated by a hyphen.


IPv4 Address

IPv4 (Internet Protocol Version 4) is the fourth revision of the Internet Protocol (IP) used to identify devices on a network through an addressing system.

The IPv4 Address Generator generates Ipv4 addresses in the form of a dot-decimal notation, which consists of four octets of the address expressed individually in decimal numbers and separated by periods.

The dialog box of the IPv4 Address Generator contains some of the Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

IP Address
Select the required IP address: remote or local.

Addresses to include
Select the addresses you want to include in the generation (for example, Loopback and/or Multicast Address). Class A, Class B, and Class C are selected by default.

Integer IP
Select to generate Integer IP addresses.


Password Hash

The Password Hash generator generates passwords encrypted with optional salt using MD5, SHA1, SHA256, SHA256, SHA384 or SHA512.

The dialog box of the Password Hash generator contains some of the Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

Salt column
Optionally, select a column containing salts from the drop-down list box. If you do not want to use salts, select the No salt option.

Password column
Optionally, select a column containing passwords from the drop-down list box. If you do not want to use a certain column as a source for passwords, select the Random password string option.

Encryption type
Select an encryption type from the drop-down list box. The following encryption types are available: MD5, SHA1, SHA256, SHA256, SHA384, SHA512.

Salt combining method
Select a salt combining method from the drop-down list box. There are two methods available:

Append the salt to the password
Select to add the salt in the end of the password.

Prepend the salt to the password
Select to add the salt in the beginning of the password.

Password text encoding
Select a password text encoding type from the drop-down list box. The following encodings are available: UTF7, UTF8, UNICODE, BigEndianUnicode, UTF32, ASCII.


Post Tracking Number

The Post Tracking Number Generator generates 13-character identifiers to items for tracking them during shipping. An identifier consists of a two letter service indicator code, an eight digit number, a check-digit, and a two-letter ISO country code.

The dialog box of the Post Tracking Number Generator contains some of the Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

Separator
Specify a separator to be included between the groups of digits. By default, digits are separated by a space.


United Kingdom NHS Number

The UK National Health Service Number (NHS Number, ISB 0149) Generator generates ten-digit numbers in a 3-3-4 format. The numbers are allocated to registered users of the three public health services in England, Wales and the Isle of Man.

The dialog box of the UK National Health Service Number (NHS Number, ISB 0149) Generator contains some of the Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

Separator
Specify a separator to be included between the groups of digits. By default, digits are separated by a hyphen.


United Kingdom Stock Exchange Daily Official List Number

The Stock Exchange Daily Official List (SEDOL) is a list of security identifiers used in the United Kingdom and Ireland for clearing purposes.

The UK Stock Exchange Daily Official List Number Generator generates seven characters identifiers consisting of two-parts: a six-place alphanumeric code and a trailing check digit.

The dialog box of the UK Stock Exchange Daily Official List Number Generator contains some of the Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

Separator
Specify a separator to be included between the groups of digits. By default, digits are separated by a hyphen.


Universal Product Code

The Universal Product Code (UPC) is a specific type of barcode that is widely used in the United Sates, Canada, the United Kingdom, Australia, New Zealand, and in other countries for tracking trade items in stores.

The Universal Product Code (UPC-A) Generator generates sequences of 12 numerical digits.

The dialog box of the Universal Product Code (UPC-A) Generator contains some of the Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

Separator
Specify a separator to be included between the groups of digits. By default, digits are separated by a hyphen.


Federal Employer Identification Number

An Federal Employer Identification Number (FEIN) (applicable to the United States) is the corporate equivalent to a Social Security number. The FEIN is issued to individuals and to entities, such as states, government agencies, corporations for tax administration.

The US Federal Employer Identification Number (FEIN) Generator generates nine-digit numbers with two first digits separated from the rest digits by a hyphen.

The dialog box of the FEIN Generator contains some of the Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

Text box
Specify the predefined regular expression to customize the generated numbers.

Insert snippet
Select a snippet to be inserted into the expression.

Insert counter
Select a counter to be inserted into the expression.

Insert file
Select a file to be inserted into the expression.

Insert column
Select a column to be inserted into the expression.


Vehicle Identification Number

A vehicle identification number (VIN) is a unique code used by automotive manufacturers to identify all vehicle on the road.

The Vehicle Identification Number Generator generates a 17-character VINs, which do not include the letters I (i), O (o), or Q (q) (to avoid confusion with numerals 0 and 1).

The dialog box of the VIN Generator contains some of the Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

Data grid

Checkbox column
Clear the checkbox next to the car manufacturer you want to exclude from the generation.

CarMaker column
Contains a list of car manufacturing companies.

Weight column
Specify the weight of each car manufacturer.

Percentage (%) column
Shows the percentage of occurrences of each value in the column with respect to the rest of the values (based on the relevant weights).


Data Population Wizard

This section describes the Data Population wizard user interface elements.

In This Section

Output, Data Population Wizard
Select output options to manage the data population script on this page.

Options, Data Population Wizard
Select general data population options on this page.

Summary, Data Population Wizard
Review the data population actions and warnings on this page.


Output, Data Population Wizard

Select output options to manage a synchronization script.

Open the data population script in the internal editor
Select the check box to open the data population script in an SQL document. The file name is generated automatically.

Save the script to a file
Select the check box to output your script to a file.

Browse
Click the button to specify the path to save a file.
Open in the internal editor
Select the check box to open the synchronization script in dbForge Studio for MySQL. The file name is generated by a user. If not selected, the synchronization script will not open.

Execute the data population script against the database
Select the check box to synchronize the target database immediately without generating a synchronization script.

Buttons

Next
Click to proceed to the next page.

Generate
Click to start the data population process.

Cancel
Click to cancel data generation.

See Also

Data Population Wizard

Options, Data Population Wizard


Options, Data Population Wizard

On this page, you can set data population options specified below.

Search
Type an option name into the box to apply filtering.

Options

Convert Archive Engine to InnoDB
Select to convert Archive Engine to InnoDB to enable the UPDATE/DELETE operations.

Disable check constraints
When selected, check constraints will be dropped at the beginning of data population. After data population, check constraints will be restored with the WITH NOCHECK parameter.

Include USE <database_name>
When selected, the USE <database_clause> will be added to the script.

Use Commit Mode (Page Length = 200)
When selected, the COMMIT statement will be inserted after each commit page length statement. Click "..." to modify the default page length.

Limit Bulk Size (300kB)
Select to set the data size of the bulk insert according to a predefined value in KB. If the option is selected, the multirow INSERT. Click "..." to modify the default bulk size value.

Disable foreign keys
Select to drop foreign keys in the beginning of data population. After data population, foreign keys will be restored.

Disable primary keys, indexes and unique constraints
Select to drop primary keys, indexes and unique constraints in the beginning of data population. After data population, primary keys, indexes and unique constraints will be restored.

Disable DML triggers
Select to disable DML triggers in the beginning of data population. After data population, they will be enabled. This option applies to tables and views.

Exclude comments
Select to prevent comments generation in the data population script.

Buttons

Save As My Defaults
Click this button to save current settings as your default data population settings.

Devart Defaults
Click this button to restore the application default data population settings.

My Defaults
Click this button to restore your default data population settings, previously saved with the Save As My Defaults button.

Back
Click to return to the previous page.

Next
Click to proceed to the next page.

Generate
Click to start the data generation process.

Close
Click to cancel data generation.

Help
Click to open online context help page.

See Also

Data Population Wizard

Summary, Data Population Wizard


Summary, Data Population Wizard

This window provides you detailed information about the data insertion.

Action Plan
Lists the actions that will be implemented.

Search
Use the Search option to look for an action.

Expand All
Click to expand all actions.

Collapse All
Click to collapse all actions.

Warnings
Lists warnings that may affect the data population process.

Buttons

Back
Click to return to the previous page.

Generate
Click to start the data generation process.

Cancel
Click to cancel data generation.

See Also

Data Population Wizard

Data Generator


Data Type-Specific Column Generation Settings

In MySQL, table columns, local variables, expressions, and parameters have a related data type. A data type is an attribute that specifies the type of data that the object can hold. In this regards, generation parameters vary according to the data type of the selected field.

NUMBER data types

Type

Minimum Value

Maximum Value

Minimum Value
(Unsigned)

Maximum Value
(Unsigned)

BIGINT(n)

-9223372036854775808

9223372036854775807

0

18446744073709551615

INT(n)

-2147483648

2147483647

0

4294967295

MEDIUMINT(n)

-8388608

8388607

0

16777215

SMALLINT(n)

-32768

32767

0

65535

TINYINT(n)

-128

127

0

255

FLOAT(n,d)

A small number with a floating decimal point, n - the maximum number of digits, d - the maximum number of digits to the right of the decimal point.

-3.402823466E+38

-1.175494351E-38

0, and 1.175494351E-38

3.402823466E+38

DOUBLE(n,d)

A large number with a floating decimal point, n - the maximum number of digits, d - the maximum number of digits to the right of the decimal point.

-1.7976931348623157E+308

-2.2250738585072014E-308

0, and 2.2250738585072014E-308

1.7976931348623157E+308

DECIMAL(n,d)

A DOUBLE stored as a string, allowing for a fixed decimal point, n - the maximum number of digits, d - the maximum number of digits to the right of the decimal point.

BIT(n)

A bit-field type, n - indicates the number of bits per value, from 1 to 64. The default is 1 if n is omitted.

BOOL, BOOLEAN

The values TRUE and FALSE are merely aliases for 1 and 0.

Column generation settings for NUMBER data types
BIGINT(n), INT(n), MEDIUMINT(n) SMALLINT(n), TINYINT(n), FLOAT, DOUBLE(n,d), DECIMAL, BIT, BOOLEAN

Min value
Enter the minimum value

Max value
Enter the maximum value

STRING data types

Data type

Description

CHAR(n)

Contains a fixed-length string (can contain letters, numbers, and special characters). The maximum length is 255 characters.

VARCHAR(n)

Contains a variable length string (can contain letters, numbers, and special characters). The maximum length is 255 characters.

TINYTEXT

Contains a string with a maximum length of 255 characters.

TEXT

Contains a string with a maximum length of 65535 characters.

MEDIUMTEXT

Contains a string with a maximum length of 16777215 characters.

LONGTEXT

Contains a string with a maximum length of 4294967295 characters.

TINYBLOB

Large binary object that holds a maximum length of 255 (28 − 1) bytes. Each TINYBLOB value is stored using a 1-byte length prefix that indicates the number of bytes in the value.

BLOB

Large binary object that holds a variable amount of data. Contains up to 65535 bytes of data.

MEDIUMBLOB

Large binary object that holds a variable amount of data. Contains up to 16777215 bytes of data.

LONGBLOB

Large binary object that holds a variable amount of data. Contains up to 4294967295 bytes of data.

BINARY(n)

The BINARY type is similar to the CHAR type, but stores binary byte strings rather than nonbinary character strings; n represents the column length in bytes.

VARBINARY(n)

The VARBINARY type is similar to the VARCHAR type, but stores binary byte strings rather than nonbinary character strings; n represents the maximum column length in bytes.

ENUM ('X', 'Y', 'Z', etc.)

An enumeration (a list). Lets you enter a list of possible values. Contains up to 65535 values. If a value is inserted that is not in the list, a blank value will be inserted.

SET

Similar to ENUM except that SET may contain up to 64 list items and can store more than one choice.

Column generation settings for STRING data types
CHAR(n), VARCHAR(n), TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT

Min string length
Enter the minimum string length

Max string length
Enter the maximum string length

Character set
Select either US-ASCII or Unicode (UTF-8)

BINARY(n), VARBINARY (n), TINYBLOB, BLOB, MEDIUMBLOB, LONGBLOB, ENUM, SET

Mix length
Enter the minimum length

Max length
Enter the maximum length

DATE and TIME data types

Data type

Description

DATE

Contains values of date. The supported value range is from 1000-01-01 to 9999-12-31

TIME

Contains values of time. The supported value range is from -838:59:59 to 838:59:59

DATETIME

Contains values of both date and time. The supported value range is from 1000-01-01 00:00:00 to 9999-12-31 23:59:59

TIMESTAMP

Contains values of both date and time parts. The supported value range is from 1970-01-01 00:00:01 UTC to 2038-01-09 03:14:07 UTC.

Values are converted from the current time zone to UTC while storing, and converted back from UTC to the current time zone when retrieved.

YEAR

Contains values of a year in two-digit or four-digit format. The supported value range in four-digit format is from 1901 to 2155. The supported value range in two-digit format is from 70 to 69 representing years from 1970 to 2069.

Column generation settings for DATE and TIME data types
TIME, DATE, DATETIME, TIMESTAMP

Range: Min ... Max

Date
Enter the minimum and maximum date values.

Time
Enter the minimum and maximum time values.

Fraction
Enter the minimum and maximum seconds values.

Random
Select to generate random values, where necessary.

Range: Offset from column

Column
Select a column as a time reference-point.

Days
Enter the minimum and maximum days to be added to the reference point.

Time
Enter the minimum and maximum time values to be added to the reference point

Range: Now
Generates the current date and time.

YEAR

Min value
Enter the minimum value.

Max value
Enter the maximum value.

SPATIAL data types

Data type

Properties

GEOMETRY

Geometry is a point or a set of points representing an object in the world that has a location.

· A geometry belongs to one of the instantiable classes.
· The SRID (Spatial Reference Identifier) value is the identifier of a geometry's associated Spatial Reference System.
· Coordinates (related to the SRID).
· Interior, boundary, and exterior.
· MBR (minimum bounding rectangle), or Envelope ((MINX MINY, MAXX MAXY, MAXX MAXY, MINX MAXY, MINX MINY)).
· Simple or non-simple.
· Closed or not closed.
· Empty or not empty.
· Dimension:

-1 for empty geometries.

0 for a geometry with no length and no area. Points and MultiPoints.

1 for a geometry with nonzero length and zero area. LineStrings and MultiLineStrings

2 for a geometry with nonzero area. Plygons and MultiPolygons.

POINT

Point is a geometry that represents a single location in coordinate space.

· X-coordinate value.
· Y-coordinate value.
· A zero-dimensional geometry.
· The boundary of a Point is an empty set.

LINESTRING

LineString is a Curve with linear interpolation between points.

· A LineString has coordinates of segments, defined by each consecutive pair of points.
· A LineString consisting of exactly two points is a Line.
· A closed simple LineString is a LinearRing.

POLYGON

Polygon is s planar surface representing a multisided geometry.

· The boundary of a Polygon is a set of LinearRings.
· A Polygon has no rings that cross. Not cut lines, spikes or punctures.
· A Polygon has an interior that is a connected point set.
· Polygons are simple geometries.

MULTIPOINT

MultiPoint is a collection of Points.

· A MultiPoint is a zero-dimensional geometry.
· A MultiPoint is simple if no two Points are equal (have identical coordinate values).
· The boundary is an empty set.

MULTILINESTRING

MultiLineString is a collection of zero or more geometry or geography LineString instances.

· All instances comprising the MultiLineString instance must be valid LineString instances.
· No two LineString instances comprising the MultiLineString instance may overlap over an interval. The LineString instances can only intersect or touch themselves or other LineString instances at a finite number of points.

MULTIPOLYGON

MultiPolygon is a MultiSurface whose elements are Polygons.

· A MultiPolygon is defined as a two-dimensional geometry.
· A MultiPolygon boundary is a set of closed LineString values corresponding to the boundaries of its Polygon elements.
· Each Curve in the boundary of the MultiPolygon is in the boundary of exactly one Polygon element.
· Every Curve in the boundary of an Polygon element is in the boundary of the MultiPolygon.

GEOMETRYCOLLECTION

GeometryCollection is a collection of one or more geometries of any class.

· All elements must be of the same type.
· Dimension restrictions.
· Other constraints (the degree of spatial overlap between elements, etc.).

Column generation settings for spatial data types

GEOMETRY

Tab window
Specify parameters for each Geometry values in the Point, LineString, Polygon, MultiPoint, MultiLineString, and MultiPolygon tabs.

GEOMETRYCOLLECTION

Geometry objects
Enter the minimum and maximum number of geometry objects.

Tab window
Specify parameters for each GeometryCollection values in the Point, LineString, Polygon, MultiPoint, MultiLineString, and MultiPolygon tabs.

POINT

X-axis
Enter the minimum and maximum x-axis values.

Y-axis
Enter the minimum and maximum y-axis values.

LINESTRING, MULTIPOINT

X-axis
Enter the minimum and maximum x-axis values.

Y-axis
Enter the minimum and maximum y-axis values.

Point
Enter the minimum and maximum number of points.

POLYGON

X-axis
Enter the minimum and maximum x-axis values.

Y-axis
Enter the minimum and maximum y-axis values.

Vertex
Enter the minimum and maximum number of vertexes.

MULTILINESTRING

X-axis
Enter the minimum and maximum x-axis values.

Y-axis
Enter the minimum and maximum y-axis values.

Point
Enter the minimum and maximum number of points.

Line
Enter the minimum and maximum number of lines.

MULTIPOLYGON

X-axis
Enter the minimum and maximum x-axis values.

Y-axis
Enter the minimum and maximum y-axis values.

Vertex
Enter the minimum and maximum number of vertexes.

Polygon
Enter the minimum and maximum number of polygons.

See Also

Basic Generators

Advanced Generators


Data Report

This section contains detailed description of data reports implementation in dbForge Studio. When studying this section, you will learn how to perform the simplest and the most difficult tasks with data reports.

In This Section

Report Designer
Describes elements of the designer area.

Report Wizard
Describes Data Report Wizard usage.


Report Designer

This section describes the the elements of Report Designer in dbForge Studio for MySQL.

In This Section

Data Report Document
Describes user interface elements of blank data report document.

Data Report Document Outline Window
Describes the Document Outline window and its usage.

Data Source Window for Data Reports
Describes the Data Source window and its usage.

CalculatedField Collection Editor Dialog Box
Describes the CalculatedField Collection Editor dialog box and its usage.

Parameter Collection Editor Dialog Box
Describes the Parameter Collection Editor dialog box and its usage.

Toolbox Window
Describes the Toolbox window and its usage.

Group and Sort Window
Describes the Group and Sort window and its usage.

Add Table(s)/View(s)
Describes the Add Table(s)/View(s) window and its usage.

Scripts Errors Window
Describes the Scripts Errors window and its usage.

Relations
Describes the Relations window and its usage.

See Also

Data Report

Report Wizard


Data Report Document

This topic provides a quick overview of the user interface elements that assist you in the process of creating and customizing reports.

Report Editing Surface
The editing surface becomes available after you switch to the Designer tab in a report tray. (This is the default tab shown after you add a report to your application.) Its user interface includes the following principal elements.

Band Headlines
In the Report Designer, each report band carries a headline, the title, icon and color, which depends on the band kind. These headlines are not printed in the resultant report document and are only visible during design time. You can expand or collapse a band's content at design time, by clicking the triangle at the left of the band's headline. To access the properties of a band, select the band by clicking its headline, and then switch to the Properties window or click the band's smart tag.

Smart tag
With smart tag, report controls and bands are enabled to display context-sensitive information and commands.

Rulers
The horizontal and vertical rulers display tickmarks in the measure units specified for your report. Click an element to evaluate its size and location using the rulers. The horizontal ruler also allows you to modify a report's side margins, by moving the left and right sliders on the ruler. The vertical ruler shows resizing rectangles for every report band, which you can move to change the band height.

Report Tray
This tray is located below the report editing surface and provides the following elements.

Report View Tabs
Allow you to quickly switch between design and preview modes, as well as evaluate scripts in a report.

Designer
Loads the Report Designer, which provides an editing surface to customize the report's layout.

Preview
Loads a print preview that displays a generated report document for evaluating its layout at design time. (Runtime customization of a report, such as the customization provided by handling report events, is not reflected in the design-time preview.)

HTML View
Shows a report document converted to HTML and published on a sample webpage. (A runtime customization of a report, like the one provided by handling report events, is not reflected during the design-time preview.)

Scripts
Opens the script editor, where you can manage and validate report scripts.

Report Status Bar
Displays the name of a selected report or its element, and provides information about its current location and size (for report controls) or paper kind (for a report).

Report Zoom Panel
Allows you to change the current zoom factor value applied to a report's design surface.

Shortcut Menu
This menu provides quick access to the most commonly used actions that depend on the element for which it is invoked. To invoke this menu, right-click a report element or the report editing surface.

See Also

Report Designer

Data Report Document Outline Window


Data Report Document Outline Window

This topic provides a description of the Document Outline window. To learn more about other report designer elements, refer to the Report Designer topic.

If the Document Outline window is not available among the tool windows, go to the View menu Document Outline.

The Document Outline window provides quick and easy navigation through the report elements. It can be used while building a report to access all report's elements and to see the whole report's structure:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Created report's structure is displayed as a tree in the Document Outline window. The report elements in the tree are displayed in vertical order corresponding to their vertical position in a report. When you choose a report element in the Document Outline tree, the selected element gets focus in the document area, so that you can edit this element and its properties.

Usually a standard report consists of several report bands with report controls on them. In the tree view of the Document Outline window, corresponding parent nodes contain all child nodes. As the Document Outline shows the report structure, note that there are special rules for report building (for instance, Band objects should contain Control objects, not vice versa). These relations are illustrated on the image above.

If you right-click any item of the Document Outline tree, the shortcut menu for this report element will appear (the same one as in the Document area). Use this menu to perform commonly used functions for a report element.

In the Document Outline tree, you can use elements' drag-and-drop operation between different nodes. This means that items representing report controls can be dragged onto band or panel instances. As a result, the corresponding report control will be moved.

If any controls of the report are data-bound, they will be marked with the yellow database icon. If a pointer hovers over such an item, a tooltip displaying the binding information will be shown:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

The Document Outline window can be moved, resized, docked, or auto-hidden like other tool windows in dbForge Studio.

See Also

Report Designer

Data Source Window for Data Reports


Data Source Window for Data Reports

The Data Source window displays the schema of the data source currently bound to a report. This window is also used to bind report to data, add tables and/or views to a report, create new or add existing queries, add or edit relations, bind existing report controls to data, and create new bound report controls.

Usually it has the following look:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

To bind report to data, simply drag the needed data source from the Database Explorer window to the Data Source window. After binding a report to data, the structure of the data source will be shown in Data Source.

Note

You can add one table or view to the Data Source window by selecting the needed table or view in Database Explorer and clicking Send to, Data Report option in the shortcut menu. In this case the table or view will be added to the report data source as a query.

The same will happen if you choose Send to, Chart Designer from the shortcut menu of a table or view in Database Explorer, but in this case the Chart control will be added to the report and Chart Wizard will be opened.

You can use the Data Source window for the following purposes:

Add Table(s)/View(s) Add Table(s)/View(s)
Opens the Add Table(s)/View(s) window to add tables and/or views to the report.

Add an Empty Query Add a Query
Use this option to add an empty query to your report. Click this button to create an empty query.

Open Existing Query Open an Existing Query
Use this option to open an existing query. When you click this button, a dialog window to open a file will appear.

Edit Relations Edit Relations
By clicking this button the Relations window will be opened. Using this window, you can add new relations or edit existing ones.

Refresh Data Refresh Data
Use this option to refresh data in the elements of the Data Source tree. Note that Refresh Data does not refresh elements in Data Source, but only data in them.

Calculated Field Add and Edit Calculated Fields
Through the shortcut menu of any element available in the Data Source window you can add and edit Calculated Fields. Right-click any element in the tree and select the Add Calculated Field option. A calculated field will be added (such fields can be distinguished by the Calculated Field icon in the Data Source element tree).

With the help of calculated fields, you can set a logical or arithmetical expression for the elements of Data Source or an output parameter.

To edit calculated fields, select Edit Calculated Fields... from the shortcut menu. The CalculatedField Collection Editor will appear. In the editor, you can add or remove calculated fields, navigate between them, and edit their properties.

Expression Editor

To edit an expression in a calculated field, right-click the needed calculated field and select the Edit Expression... option from the shortcut menu. The Expression Editor, shown on the image below, will appear:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

In the editor, you will be able to create or edit the expression of your calculated field.

In Expression Editor you can choose functions, operators, fields, constants, and parameters to add to your expression:

· Functions. If you want to add a function to your expression, select this item in Expression Editor. In the second field of the editor the list of available functions will appear. To add a function to your expression, just double-click it.
To find the needed function faster, you can choose the group it belongs to in the drop-down list above the complete list of functions. There are Date-time, Logical, Math, and String groups available.
In the third field of Expression Editor you can see the description of any function you choose. To learn the description of a function, just click it in the list.
· Operators. If you want to add an operator to your expression, select this item in Expression Editor. In the second field of the editor the list of available operators will appear. To add an operator to your expression, just double-click it.
In the third field of Expression Editor you can see the description of any operator you choose. To learn the description of an operator, just click it in the list.
Also some operators are available as icons below the area where expressions are written.
· Fields. If you want to add a field to your expression, select this item in Expression Editor. In the second field of the editor the list of fields available in the table the calculated field belongs to will appear. To add a field to your expression, just double-click it. To add a data field into the expression field manually, type its name in [square brackets].
In the third field of Expression Editor you can see the type of any field you choose. To learn the type of a field, just click it in the list.
· Constants. If you want to add a constant to your expression, select this item in Expression Editor. In the second field of the editor the list of available constants will appear. To add a constant to your expression, just double-click it.
In the third field of Expression Editor you can see the description of any constant you choose. To learn the description of a constant, just click it in the list.
· Parameters. If you want to add a parameter to your expression, select this item in Expression Editor. In the second field of the editor the list of available parameters will appear. To add a parameter to your expression, just double-click it. To add a parameter to the expression text manually, type its name in [square brackets] with the "Parameters." prefix before it.
In the third field of Expression Editor you can see the type of any parameter you choose. To learn the type of a parameter, just click it in the list.

Working with Parameters

In dbForge Studio data reports, you can add parameters to the Data Source element tree. Parameters can be used, for example, when building expressions for calculated fields (to learn more about their usage in calculated fields, see the previous paragraph) or bound to report controls.

Adding and Editing Parameters

To add a new parameter, right click on the parameter node icon ( Parameters) in the element tree, and select Add Parameter or Edit Parameters... from the shortcut menu:

· Add Parameter
If you select this option, a new parameter will be added automatically to the Data Source element tree. Its default type is string.
· Edit Parameters...
If you select this option, Parameter Collection Editor will open. Using this editor, you can add new or remove existing parameters with the Add and Remove buttons, and also edit parameter properties. To navigate between parameters, use up and down arrow buttons.

Passing Parameters

Passing a parameter implies assigning a particular value to the Value property of an object, contained in a report's Parameters collection. There are different ways of passing parameters, and your selection depends upon the specifics of your application.

Note

Note that although you can change the parameter value during report generation, this appears to be a bad report design, since parameters can be used to filter a report's data, as well as in calculated fields and data binding. So, changing report parameters upon report generation may lead to unpredictable results in a report.

In Preview, the Parameters dock panel appears. Its visibility is toggled by the Parameters button on the Preview toolbar.

The Parameters UI prompts an end-user to fill in values for all report parameters the Visible property of which is set to Yes. If a parameter already has any value assigned to its Value property, then this value is used as an initial value to display in the parameter's editor. To help an end-user better understand the purpose of a parameter, you can provide an informative description for it via the Description property.

Note

The Parameters UI collects all the parameters which should be filled in during generation of the current report. So, if a report contains detail report bands, all their parameters will be also embedded to a single Parameters UI. This means that a parameter will use only one value, if a detail report band is printed several times.

If you have any parameters in your report, when you switch to the preview, a window with parameters will be shown and you will have to enter their values and click Submit. Then only data with these values will be shown.

Note that parameter icon is changed when its type is changed.

Using Parameters

After a parameter was created, added to a report's Parameters collection, and its value was assigned, it can be used in different ways during report generation:

· Filtering
Filtering is one of the most common scenarios of using parameters in a report. The easiest way to filter a report's data according to the current parameter value is to build a report's FilterString using FilterString Editor with this parameter:

Note

Actual document look may slightly vary from the above image, depending on the product you use.
· Data Binding
You can show a parameter value in a report in the same way as you bind report controls to any standard data fields. Just drag and drop a parameter from the Data Source window, and you'll get a label displaying a parameter value.
· Calculated Fields
Parameters can participate in constructing expressions for calculated fields, as well as standard data fields.

Binding Existing Controls to Fields in Data Source

To bind an existing control to any field available in the data source, drag the needed data field from the Data Source window and drop it onto the report control.

Adding a New Report Control Bound to Data

To add a new report control bound to data, you can use one of the following ways:

· Drag the needed data field from the Data Report window and drop it onto any report band. In the result an appropriate control bound to this data field should appear.
· Right-click a Data Source item, and drag and drop it onto the report designer area. Shortcut menu will appear. Choose the item you need from the list, and the selected control bound to the needed data field will be created and added to the report.

See Also

Report Designer

CalculatedField Collection Editor Dialog Box


CalculatedField Collection Editor Dialog Box

Use this dialog box to add or remove calculated fields, navigate between them, and edit their properties. To open it, select Edit Calculated Fields... from the shortcut menu.

Members
Lists available calculated fields.

Up Arrow
Click to move the calculated field up in the list.

Down Arrow
Clock to move the calculated filed down in the list.

Add
Click to add a new calculated field.

Remove
Click to remove the calculated filed.

Properties
Lists properties for the selected calculated field.

Categorized
Click to view properties of the calculated field grouped by categories.

Alphabetical
Click to view properties of the calculated field in alphabetical order.

Behavior
Lists the behavior properties of the calculated field.

Scripts
Provides access to an object that contains calculated field-specific scripts to handle its events.

Data
Lists the data properties of the calculated field.

Data Member
Specifies the data member of the calculated field.

Data Source
Specifies the data source, associated with the calculated field.

Expression
Specifies the expression of the calculated field.

Filed Type
Specifies the type of the value returned by the calculated field.

Design
Lists the design properties of the calculated field.

(Name)
Gets or sets the name of the calculated field.

See Also

Report Designer

Parameter Collection Editor Dialog Box


Parameter Collection Editor Dialog Box

Use this dialog box to add or remove parameters, navigate between them, and edit their properties. To open it, select Edit Parameters... from the shortcut menu.

Members
Lists available parameters.

Up Arrow
Click to move the parameter up in the list.

Down Arrow
Clock to move the parameter down in the list.

Add
Click to add a new parameter.

Remove
Click to remove the parameter.

Properties
Lists properties for the selected parameter.

Categorized
Click to view properties of the parameter grouped by categories.

Alphabetical
Click to view properties of the parameter in alphabetical order.

Behavior
Lists the behavior properties of the parameter.

Visible
Indicates, whether the parameter is visibly displayed or it is hidden.

Data
Lists the data properties of the calculated field.

Description
Specifies the description of the parameter.

Look-Up Settings
Specifies the look-up editor settings of the parameter.

Type
Specifies the parameter's type.

Value
Specifies the parameter's value.

Design
Lists the design properties of the calculated field.

(Name)
Gets or sets the name of the parameter.

See Also

Report Designer

Toolbox Window


Toolbox Window

This topic provides a description of the Toolbox window.

The Toolbox window contains controls available in dbForge Studio for MySQL data reports.

The Toolbox window can be moved, resized, docked, or auto-hidden like other tool windows in dbForge Studio. If the Toolbox window is not available among the tool windows, in the View menu, click Other Windows, and then select Toolbox click its icon on the Data Report toolbar. The Toolbox window has the following look:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

To add a control to the report, simply drag it from the Toolbox window and drop it onto Designer.

See Also

Report Designer

Group and Sort Window


Group and Sort Window

This topic provides a description of the Group and Sort window. To learn more about other report designer elements, refer to the Report Designer topic.

With the help of the Group and Sort window you can easily apply grouping and sorting to your report. Using this panel, you don't need to manually add group header and footer bands, invoke their Group Fields editor dialog, create grouping fields and define their properties. With the Group and Sort panel you can do it in several clicks.

The Group and Sort window can be moved, resized, docked, or auto-hidden like other tool windows in dbForge Studio for MySQL. If the Group and Sort window is not available among the tool windows, go to the View, Other Windows, Group and Sort item of the main menu or click its icon on the Data Report toolbar. Usually it has the following look:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

See Also

Report Designer

Add Table(s)/View(s) Window


Add Table(s)/View(s) Window

You can choose tables and/or views to add to the report here.

To call the Add Table(s)/View(s) window, click Add Table in the Data Source window.

To add a table or a view to the report, just check it, or select it and click [image]. To add all tables and views available in the database, click [image]. To remove tables and/or views, click the left-arrow button.

Clear the Show all objects check box to hide unnecessary objects and show only tables and views available in the selected database.

Note

Actual document look may slightly vary from the above image, depending on the product you use.

See Also

Report Designer

Scripts Errors Window


Scripts Errors Window

The Scripts Errors window displays errors discovered during script syntax validation, if any.

To call this window, on the View menu, point to Other Windows, and click Script Errors.

Scripts Error List Columns

Description
Displays error text.

Line
Displays the line in the document, where the problem occurs.

Column
Shows the column on the indicated line where the problem begins.

Shortcut Menu Commands of the Scripts Errors Window

Sort Ascending
Sorts data in the ascending order.

Sort Descending
Sorts data in the descending order.

Column Chooser
Calls the Customization window designed for column layout customization.

Best Fit
Fits the size of the selected column to the size of data available in it.

Best Fit (all columns)
Fits the size of each column displayed in the grid to the size of data available in it.

See Also

Report Designer

Relations


Relations

If you have two or more tables bound to your report, you can establish relations between them. For this the Relations window can be used.

To call the Relations window, click its icon Relations in the Data Source window.

The following image demonstrates how the Relations window looks like:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Add Relation

To add a relation, follow such steps:

1. Open the Relations window by clicking the Relations button;
2. Click the Add Relation button. In the field in the left part of the window and in the Name: field you will see the default name of the relation. The default name consists of the FK characters and the names of the parent and child table separated by underscores;
3. In the Name: field specify the name of the relation you want to add. If you want, you can leave the default relation name.
4. Specify the Parent and Child tables of your report;
5. Specify Key Columns and Foreign Key Columns;
6. Click OK.

Remove Relation

To remove a relation, simply open the Relations window, select the relation you want to remove, and click Remove Relation.

To remove all added relations, click Remove All Relations.

See Also

Report Designer

Report Wizard


Report Wizard

This section describes the essentials of using Data Report Wizard tool.

In This Section

Welcome to the Data Report Wizard
Choose the type of the report you are going to create.

Standard Report
This section describes steps to create a standard report using a wizard.

Label Report
This section describes steps to create a label report.

With the Data Report Wizard tool, you can create standard, label or blank reports quickly and easily. To access Data Report Wizard perform either of these actions:

· Click File, point to New, and select the Create Data Report Data Report.
· Click Database, and select Create Data Report Report Designer.
· Click the Create Data Report Design in Report Wizard button on the Data Report toolbar.

Note

This button is active only if a report was created already.
· Invoke the report's smart tag and click the Design in Report Wizard context link, as shown on the image below.

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Note that in this case new report is not created and the current one is used. The step of assigning the data source for the report is omitted because the available one is used. So, if your report is not a data-aware one yet, you won't be able to use the Standard Report option of the wizard. Also, the current report layout will be lost after finishing the wizard.

If you choose the Blank Report option, the current report will be replaced by a blank one, so be careful not to lose your data.

· Click the Create Data Report Send Query to Report button on the SQL toolbar.
· Point to Send to, and then click Create Data Report Data Report in the shortcut menu of the Data window or in the shortcut menu of the Data tab of any SQL document.


Welcome to the Data Report Wizard

Welcome page of Data Report Wizard lets you choose the type of the report you are going to create.

Standard Report
Data-aware report based on the specified dataset will be created. You can choose different options concerning report data source, layout, style, etc.

Label Report
Report containing labels of the specified type will be created. Data Report Wizard leads you through a set of steps to customize the layout of your report.

Blank Report
Empty data report will be created. You can create a new report from scratch.

See Also

Report Wizard

Standard Report


Standard Report

This section describes steps to create a standard report using a wizard.

To create a standard report, invoke Data Report Wizard and select the Standard Report option on the Welcome page.

The Standard Report option allows to create a data-aware report based on the specified dataset. Data Report Wizard leads you through a set of steps that allow you to choose different options concerning report data source, layout, style, etc.

Here is the list of steps you are offered to complete while creating Standard Report with Data Report Wizard:

In This Section

Select Data Connection
Select data connection and data type to use the report.

Create a Custom Query
Write a custom query for your report to be based on.

Select Table or View
Choose data table or data view to use in the report.

Select Columns
Choose columns to display in the report.

Add Grouping Levels
Specify how the report's data should be grouped.

Summary Options
Specify summary options for numeric fields.

Choose Report Layout
Choose the report layout.

Choose Report Style
Choose the report style.

Enter Report Title
Enter the title of the report.

See Also

Report Wizard

Label Report


Select Data Connection

Select the data connection which specifies the path to the needed data source and specify the data type you want to use for the report construction here.

On this page you can select one of the available connections from the drop-down list. The data connection specifies how to find and log into a specific server and database.

The following image demonstrates how this step of Data Report Wizard looks like:

Standard Report - Choose Connection

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Also on this page you can choose the data type for your report construction. There are two data types available:

· Simple Table/View - offers a set of steps to create a standard report based on one table.
· Custom Query - offers an option to create a report based on a custom query.

Click Next to proceed to the next step and select a table or view to present in the report if you've chosen the Simple Table/View option or create a custom query if you've chosen the Custom Query option.

See Also

Standard Report

Select Table or View


Create a Custom Query

Write a custom query that will be used to define the tables, views, and columns in them to add to your report here.

The custom query should be based on the tables and views available in the databases that you can access using the connection selected earlier. Result set of the created query contains columns which will be available in your report.

The following image demonstrates how this step of Data Report Wizard looks like:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Note

You can select only one table or view to be bound to the report. It's impossible to create a master-detail report with this wizard.

You can create a custom query in several ways here:

· Load from a *.sql file using the Load button. After you've selected and opened a file to load a SQL statement from, the statement will appear in the Sql: field of the window.
· You can write a query manually in the Sql: field.
· You can design a query in the Query Builder. To do this, click the Design button and the Query Builder window will appear. After you've created a query, click OK. The query you've just written will appear in the Sql: field of the window.

Click Next to proceed to the next step and select columns to display in the report.

See Also

Standard Report

Select Columns


Select Table or View

Select a data table or a data view fields of which should be presented in the report here.

On this page you should select one of the available tables or views. The table or view you choose determines the columns that will be available in your report.

Add the needed table or view by clicking the [image] button:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Note

You can select only one table or view to be bound to the report. It's impossible to create a master-detail report with this wizard.

Click Next to proceed to the next step and select columns to display in the report.

See Also

Standard Report

Create a Custom Query


Select Columns

Select columns to display in your report here.

Choose one or several columns from the list on the left and place them to the right using arrow buttons, as shown on the image below. Note that your report can display any of the columns available in the dataset.

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Note

You can select only one table or view to be bound to the report. It's impossible to create a master-detail report with this wizard.

Note

On this step, you can click Finish to complete report creation and omit the following steps.

Click Next to proceed to the next step and add grouping levels.

See Also

Standard Report

Add Grouping Levels


Add Grouping Levels

Specify the way the report's data should be grouped here.

You can use this option to group data in your report. For example, on the image below the report's data, based on the EMPLOYEES table of the sample database HR, will be grouped depending on the hire date of each employee.

In this window, you can select some of the available columns from the list on the left, and click ">" to create a new grouping level against the selected data column. Also you can specify several grouping fields at the same level using the "+>" button. To reorder the created grouping levels, use the up and down arrow buttons.

The following image demonstrates how this step of Data Report Wizard looks like:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Note

On this step, you can click Finish to complete report creation and omit the following steps.

Click Next to proceed to the next step and choose the report layout.

See Also

Standard Report

Summary Options


Summary Options

Specify summary options here.

If you have added grouping levels to your report and some data fields in your report are numeric fields, you will be able to apply summary options to such fields. In the Field Name column the numeric fields names are specified. Check the checkboxes near the field names corresponding to the operations you need to perform with your data. Check the Ignore NULL values checkbox to ignore records with NULL values when performing selected operations.

The following image demonstrates how this step of Data Report Wizard looks like:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Summary options include:

· Sum - the sum of the data in numeric field;
· Avg - counts the average value;
· Min - defines the smallest value in numeric field;
· Max - defines the biggest value in numeric field;
· Count - counts the number of records in numeric field.

See Also

Standard Report

Choose Report Layout


Choose Report Layout

Choose the layout of your report here.

On this page you can choose one of the report layout templates. Note that the list of suggested templates depends on whether you added grouping levels to your report or not.

The templates specify the way the selected data fields should be arranged in your report. Click the radio buttons for each template to see the suggested layout in the preview part of the wizard window.

Also you can define the page orientation of your report - Portrait or Landscape. Uncheck or check the checkbox in the bottom of the window to disable or enable adjusting the field width so all fields fit on page.

Refer to the following topics to learn more about the available layouts depending on the grouping levels:

· Ungrouped Report Layout
· Grouped Report Layout

See Also

Standard Report

Choose Report Style


Choose Ungrouped Report Layout

If you have not added any grouping levels to your report, the layout templates stated on the following image will be suggested:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Note

On this step, you can click Finish to complete report creation and omit the following steps.

Click Next to proceed to the next step and choose the report style.

See Also

Choose Report Layout

Choose Grouped Report Layout


Choose Grouped Report Layout

If you've added any grouping levels to your report, the layout templates stated on the following image will be suggested:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Note

On this step, you can click Finish to complete report creation and omit the following steps.

Click Next to proceed to the next step and apply summary options to your report or choose the report style.

See Also

Choose Report Layout

Choose Report Style


Choose Report Style

Choose the style of your report here.

On this page you can choose one of the predefined styles for your report. They define foreground and background text colors, font options, borders style of the report elements.

The following image demonstrates how this step of Data Report Wizard looks like:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Note

On this step, you can click Finish to complete report creation and omit the following steps.

Click Next to proceed to the next step and enter a report title.

See Also

Standard Report

Enter Report Title


Enter Report Title

Type the header of your report here.

Click Finish to complete the report creation process.

See Also

Standard Report

Label Report


Label Report

This section describes steps to create a label report.

To create a label report, invoke Data Report Wizard and select the Label Report option on the Welcome page.

The Label Report option allows to create reports containing labels of the specified type. Data Report Wizard leads you through a set of steps to customize the layout of your report.

Here is the list of steps you are offered to complete while creating Label Report with Data Report Wizard:

In This Section

Select Label Type
Select the label type of the report.

Customize Label Options
Set the layout parameters of the label.

See Also

Report Wizard


Select Label Type

Select a label type for your report from a number of predefined types here.

Here you can select one of the predefined label types by specifying the product from the Label Products list and its ID from the Product Number drop-down list. The selected type defines the label's size and the page type.

The following image demonstrates how this step of Data Report Wizard looks like:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Click Next to proceed to the next step and customize label options.

See Also

Label Report

Customize Label Options


Customize Label Options

Customize the label's options here.

If required, you can set the layout parameters of the label and choose the page size from the Page Size drop-down list.

The following image demonstrates how this step of Data Report Wizard looks like:

Note

Actual document look may slightly vary from the above image, depending on the product you use.

Click Finish to complete the report creation process.

See Also

Label Report

Data Report


Code Debugger

This section describes the wizards, windows, and other user interface elements related to debug processes.

In This Section

Debug Windows
This section describes user interface elements of the debug windows.

Debug Wizard
This section describes the debug wizard interface for debugging stored procedures and functions.


Debug Windows

This section describes user interface elements of the debug windows.

In This Section

Breakpoints Window
This window allows to control breakpoints.

Call Stack Window
This window displays call stack of function calls.

Watches Window
This window allows to watch and edit stored procedure variables.

Unable to Apply Code Changes Dialog Box
This dialog box appears if you edit a stored procedure or SQL script while debugging it and then try to step or continue execution.

See Also

Code Debugger

Debug Wizard


Breakpoints Window

The Breakpoints window contains a toolbar and a list of breakpoints currently set in your program. To open the Breakpoints window, on the Debug menu, point to Windows, and then click Breakpoints.

Window toolbar

Delete
Removes the breakpoint that is currently selected. You cannot undo this operation.

Delete All Breakpoints
Removes all breakpoints that are currently set. You cannot undo this operation.

Disable/Enable All Breakpoints
Disables all breakpoints that are currently set. You can enable the breakpoints (undo the operation) by clicking the button again.

Go To Source Code
Opens a source window, if necessary, and shows you the location where the breakpoint is set.

Breakpoint list

Name
A descriptive name of the breakpoint created by the debugger based on the breakpoint's location. The Name allows you to distinguish breakpoints and select the one you are interested in.

A check box appears before the name. You can use this check box to enable or disable the breakpoint.

Line
Contains the line where the breakpoint is situated.

Character
Contains the position of the breakpoint in a line.

See Also

Debug Windows

Call Stack Window


Call Stack Window

The Call Stack window enables you to view the names of functions on the call stack. To open the Call Stack window, the debugging process must be running. On the Debug menu, point to Windows and click Call Stack. Call stack information is shown only when the program being debugged is in a break state.

The Call Stack window contains the following information:

Name
Shows the name of each function or procedure on the call stack. An indicator appears before the name. The yellow arrow identifies the stack frame where the execution pointer is currently located. green arrow indicates that you have stepped back to the parent code.

Line
Contains the line number that is being executed.

See Also

Code Debugger

Watches Window


Watches Window

You can use the Watches window to evaluate variables and keep the results. To open the Watches window, the debugger must be running or in break mode. On the Debug menu, point to Windows, then click Watches.

The Watches window contains the following information:

Name
Shows the name of each added variable. An indicator appears before the name. red circle indicates that a variable is not declared in the current context, therefore cannot be traced. Another indicator, [image] , tells that a variable exists in the current context and is traced.

Value
Shows the value of each added variable.

Type
Shows the type of each added variable.

See Also

Code Debugger

Unable to Apply Code Changes Dialog Box


Unable to Apply Code Changes Dialog Box

This dialog box appears if you edit a stored procedure or SQL script, while debugging, and then try to step or continue execution. Changes cannot be applied to the object that is being debugged. If you continue execution, the debugger will continue to execute the original SQL or stored procedure code (without the changes you have just made).

Always restart without prompting
When selected, disables this dialog box in the future. Instead, the debugger will automatically restart stored procedure or SQL script. If you want to show this dialog box again, select the Warn me if I make changes option on the General tab of the Debugging Options dialog box.

Always continue without prompting
When selected, disables this dialog box in the future. Instead, the debugger will automatically continue, without applying the changes, when you try to step or continue. If you want to show this dialog box again, select the Warn me if I make changes option on the General tab of the Debugging Options dialog box.

Restart
Stops execution of the stored procedure or SQL script, saves changes, and restarts it.

Continue
Continues or steps, depending on the last command you have chosen.

Cancel
Cancels the Continue or Step command you have chosen.

See Also

Code Debugger

Debug Wizard


Debug Wizard

Use this wizard for debugging stored procedures and functions. To access the wizard, click Debug Stored Procedure on the product Start page. The wizard pages are listed below.

In This Section

Procedures and Functions, Debug Wizard
Choose script location and connection parameters on this page.

Compilation Process, Debug Wizard
See script compilation process on this page.

See Also

Code Debugger


Procedures and Functions, Debug Wizard

Use this page to choose a location and connection parameters of a stored procedure or function to debug it.

You can set the following options on this page:

Connection
Click the field to select a connection to the required MySQL server where the stored procedure is placed. In the drop-down list, you can click the <Manage...> link to open the Connection Manager dialog box. It will help you to create, edit, and delete existing connections.

Edit
Click to open the Database Connection Properties dialog box and edit the existing connection.

New
Click to open the Database Connection Properties dialog box and create a new connection.

Database
Click the field to select the required database from the list of all databases available on the selected MySQL server.

Procedures and Functions
Select the procedure/function to debug.

Filter
Use the field to quickly find the needed procedure/function.

Debug
Click to start debugging the selected procedure/function.

Cancel
Click to close the wizard and discard debugging the procedure/function.

See Also

Debug Wizard

Compilation Process, Debug Wizard


Compilation Process, Debug Wizard

To debug stored procedure, function, or trigger, it must be compiled with debug information. To access compile options, right-click the procedure, function or trigger in Database Explorer and select the required one:

Compiling for Debugging
Compile a stored procedure, function, or a trigger with debug information.

Compile
Delete debug information from specified stored procedure, function, or trigger.

Compile References for Debugging
Compile a stored procedure, function, or a trigger and all its references with debug information.

Compile References
Delete debug information from the specified stored procedure, function, or trigger, and also from all its references.

Compile Dependants for Debugging
Compile a stored procedure, function, or a trigger and all its dependants with debug information.

Compile Dependants
Delete debug information from the specified stored procedure, function, or trigger, and also from all its dependants.

See Also

Debug Wizard


Execute Script Wizard

Use this wizard for executing large scripts without opening them in the editor. To access the Execute Script Wizard, on the Database menu, click [image] Execute Large Script. The wizard pages are listed below.

Script Location, Execute Script Wizard

Use this page to choose a location and connection parameters of a large script to execute it without opening in the text editor. This will significantly save your time while working with large scripts.

Options

Connection
Click the field to select a connection to a required server where you want to execute your script. In the drop-down list of the field you can click the <Manage...> link to open the Connection Manager dialog box. It will help you to create, edit, and delete existing connections.

Database
Click the field to select a required database from the list of all databases available on the selected MySQL.

File Name
Enter the path to a script you want to execute or click the Browse button to select the path in the Open dialog.

SQL file encoding
Select the encoding which should be applied to open and execute the script. The program automatically selects it based on the script, if it fails, the default encoding (the current Windows encoding on the machine where dbForge Studio for MySQL is running) is selected.

Execute
Click it to execute the selected script.

Cancel
Click it to close the wizard and discard the script execution.

Execution Progress, Execute Script Wizard

See script execution progress on this page. To stop the script execution, click the Cancel button.

Operation Complete, Execute Script Wizard

See the results of script execution on this page.

See Also

Reference


Documenter

This section describes the Documenter user interface elements.

In This Section

Select Connections Dialog Box
Use this dialog box to add connections to the the Documenter project.

Documenter Project
Use it to setup the generated database document.

Generate Documentation Dialog Box
Use this dialog box to generate a database documentation file.


Select Connections Dialog Box

Use this dialog box to add connections to the the Documenter project.

Connections List
Select required connection(s) from the list.

New Connection
Opens Database Connection Properties Dialog Box.

Select
Click to confirm connection selection and to close the dialog box.

Cancel
Click to cancel connection selection.

See Also

Documenter

Database Documenter Project


Documenter Project

Use the Database Documenter Project to setup the generated database document.

Document Structure pane

Represents structure of the generated database document. Use it to include/exclude database connections, databases and database instances into/from documentation file.

Search
Type the search string into the field to find database objects.

Clear
Click to clear the search string.

Expand All
Click to expand all structure items.

Collapse All
Click to collapse all structure items.

Database Documenter Project pane

Add Connection
Opens the Select Connections dialog box.

Refresh
Click to refresh the project.

Generate
Opens the Generate Documentation dialog box.

Style
Select the requited documentation style from the drop-down list box. The following styles are available: Default, Bootstrap, Cerulean, Flatly, Journal, Paper, Yeti.

See Also

Documenter

Cover Page, Documenter Project


Cover Page, Database Documenter Project

Cover Page, Documenter Project

Use this page to configure the cover page of the generated database document. To open the page, click Cover Page on the Document Structure pane.

Breadcrumbs
Click the on/off switch to enable/disable breadcrumb navigation links.

Header
Type the documentation header that will appear on every documentation page.

Logo
Logo for documentation. To change the default logo image, hover the mouse pointer on it and click Browse.

Title
Type the documentation title in this box.

Project description
Type the documentation description in this box.

Author
Type an author name of the documentation file in this box. This information will appear in the footer of every page of documentation file.

Copyright
If required, modify the default copyright disclaimer. This information will appear in the footer of every page of documentation file.

Created
Select a required format for documentation creation date from the drop-down list box. This information will appear in the footer of every page of documentation file.

See Also

Documenter Project

Server, Documenter Project


Servers, Documenter Project

Use this page to configure the generated document file on the level of Servers. To open the page, click Servers on the Document Structure pane.

View options

Expand All
Click to expand all sections of the page.

Collapse All
Click to expand all sections of the page.

Include All
Click to include all properties and settings into the generated document.

Exclude All
Click to exclude all properties and settings into the generated document.

Servers

Lists names and quantity of servers to be described in the generated document.

Sections To Include

Lists sections that will be included into generated document. This block will not be shown in the generated document.

Databases
Use the on/off switch to include/exclude databases to/from the generated document.

Users
Use the on/off switch to include/exclude users to/from the generated document.

Properties
Use the on/off switch to include/exclude properties to/from the generated document.

See Also

Documenter Project

Server, Documenter Project


Server, Documenter Project

Use this page to configure the generated document file on the level of the SQL Server instance. To open the page, click an SQL Server Instance on the Document Structure pane.

View options

Expand All
Click to expand all sections of the page.

Collapse All
Click to expand all sections of the page.

Include All
Click to include all properties and settings into the generated document.

Exclude All
Click to exclude all properties and settings from the generated document.

Databases

Lists quantity and names of databases to be described into generated document. Use the on/off switch to include/exclude this section.

Users

Lists quantity and names of users to be described into generated document. Use the on/off switch to include/exclude this section.

Properties

Lists server properties.

Name
Shows name of the property.

Value
Shows the property value.

Include
Use the on/off switch to include/exclude the property.

Settings

Lists server settings.

Name
Shows name of the setting.

Value
Shows value of the setting

Include
Use the on/off switch to include/exclude the setting.

Sections To Include

Lists sections that will be included into generated document. This block will not be shown in the generated document.

Description
Use the on/off switch to include/exclude description of the server to/from the generated document.

SQL Script
Use the on/off switch to include/exclude SQL Script of the server to/from the generated document.

Sections List
Lists sections of the SQL server (tables, views, triggers etc). Expand a section to include/exclude its objects and properties.

See Also

Documenter Project

Databases, Documenter Project


Databases, Documenter Project

Use this page to configure the generated document file on the levels of system databases and user databases. To view the page, click System databases or User databases on the Document Structure pane.

View options

Expand All
Click to expand all sections of the page.

Collapse All
Click to expand all sections of the page.

Include All
Click to include all properties and settings into the generated document.

Exclude All
Click to exclude all properties and settings from the generated document.

Objects
Lists names of databases that are included into the generated document file. The database names will appear in the generated document as hyperlinks referring to the corresponding database pages of the document.

Databases

Lists names and quantity of databases to be described in the generated document. Use the on/off switch to include/exclude this data.

Sections To Include

Lists sections that will be included into generated document. This block will not be shown in the generated document.

Description
Use the on/off switch to include/exclude descriptions of database objects p to/from the generated document.

SQL Script
Use the on/off switch to include/exclude SQL scripts of database objects.

Sections List
Lists sections of the SQL instance (tables, views, triggers etc). Expand a section to include/exclude its objects and properties.

See Also

Documenter Project

Database, Documenter Project


Database, Documenter Project

Use this page to configure the generated document file on the database level. To view the page, click a database on the Document Structure pane.

View options

Expand All
Click to expand all sections of the page.

Collapse All
Click to expand all sections of the page.

Include All
Click to include all properties and settings into the generated document.

Exclude All
Click to exclude all properties and settings from the generated document.

Description
Type a description for the database in this box. Use the on/off switch to include/exclude this filed into/from the generated document.

Object Types
Lists names and quantity of object types that are included into the generated document file. The names of object types will appear in the generated document as hyperlinks referring to the corresponding object type pages of the document.

Database Name

Shows the database name.

Properties

Lists database properties.

Name
Shows name of the property.

Value
Shows the property value.

Include
Use the on/off switch to include/exclude the property.

Objects

Lists names and quantity of object types to be described in the generated document.

Sections To Include

Lists sections that will be included into generated document. This block will not be shown in the generated document.

SQL Script
Use the on/off switch to include/exclude SQL scripts of database objects.

Properties
Allows to select which properties of database objects will be included into the generated document. Select an object type from the list, and then use the on/off switch to include/exclude properties of database objects.

Groups
Allows to select which groups of information will be included into the generated document. Select an object type from the list, and then use the on/off switch to include/exclude groups of information.

See Also

Documenter Project

Group of Objects, Documenter Project


Group of Objects, Documenter Project

Use this page to configure the generated document file on the level of group of objects. To view the page, click a database object group on the Document Structure pane.

View options

Expand All
Click to expand all sections of the page.

Collapse All
Click to expand all sections of the page.

Include All
Click to include all properties and settings into the generated document.

Exclude All
Click to exclude all properties and settings from the generated document.

Objects
Lists names and quantity of database objects to be described in the document.

Name
Name of the database object. The names of object types will appear in the generated document as hyperlinks referring to the corresponding object type pages of the document.

Description
Description of the database object. The description text is editable.

Sections To Include

Lists sections that will be included into generated document. This block will not be shown in the generated document.

Description
Use the on/off switch to include/exclude descriptions of database objects into/from the generated document.

SQL Script
Use the on/off switch to include/exclude SQL scripts of database objects into/from the generated document.

Properties
Allows to select which properties of database objects will be included into the generated document. Select an object type from the list, and then use the on/off switch to include/exclude properties of database objects into/from the generated document.

Groups
Allows to select which groups of information will be included into the generated document. Select an object type from the list, and then use the on/off switch to include/exclude groups of information into/from the generated document.

See Also

Documenter Project

Database Object, Documenter Project


Database Object, Documenter Project

Use this page to configure the generated document file on the database object level. To view the page, click a database object on the Document Structure pane.

View options

Expand All
Click to expand all sections of the page.

Collapse All
Click to expand all sections of the page.

Include All
Click to include all properties and settings into the generated document.

Exclude All
Click to exclude all properties and settings from the generated document.

Description
Description of the database object. The description text is editable.

Description

Contains description of the database object. Click anywhere in the field to modify it. Use the on/off switch to include/exclude the description.

Properties

Lists properties of the database object.

Name
Shows name of the property.

Value
Shows the property value.

Include
Use the on/off switch to include/exclude the property.

Sections
Shows sections of information about the database object. Sections are specific for each database object type. Use the on/off switch to include/exclude a section into/from the generated document.

See Also

Documenter Project

Users, Documenter Project


Users, Documenter Project

Use this page to configure the generated document file on the level of users. To view the page, click Users on the Document Structure pane.

View options

Expand All
Click to expand all sections of the page.

Collapse All
Click to expand all sections of the page.

Include All
Click to include all properties and settings into the generated document.

Exclude All
Click to exclude all properties and settings from the generated document.

Objects
Lists names of databases that are included into the generated document file. The database names will appear in the generated document as hyperlinks referring to the corresponding database pages of the document.

Object

Lists names and quantity of users to be described in the generated document. Use the on/off switch to include/exclude this data.

Sections To Include

Lists sections that will be included into generated document. This block will not be shown in the generated document.

SQL Script
Use the on/off switch to include/exclude SQL scripts that create users into/from the generated document.

Properties
Allows selecting user properties to be included into the generated document. Use the on/off switch to include/exclude user propertie into/from the generated document.

Groups
Allows selecting groups of information to be included into the generated document.

Global Privileges
Use the on/off switch to include/exclude global privileges into/from the generated document.

Object Level Permissions
Use the on/off switch to include/exclude object level permissions into/from the generated document.

See Also

Documenter Project

User, Documenter Project

Generate Documentation Dialog Box


User, Documenter Project

Use this page to configure the generated document file on the user level. To view the page, click a user on the Document Structure pane.

View options

Expand All
Click to expand all sections of the page.

Collapse All
Click to expand all sections of the page.

Include All
Click to include all properties and settings into the generated document.

Exclude All
Click to exclude all properties and settings from the generated document.

Description
Description of the database object. The description text is editable.

Properties

Lists properties of the user.

Name
Shows name of the property.

Value
Shows the property value.

Include
Use the on/off switch to include/exclude the property.

Global Permissions

Lists global permissions granted to the user.

Type
Shows the permission type.

Action
Shows the action associated with the permission.

Object Level Permissions

Lists object level permissions granted to the user.

Type
Shows the object level permission type.

Action
Shows the action associated with the permission.

Object name
Shows name of the object associated with the permission.

Object type
Shows type of the object associated with the permission.

SQL Script

Shows SQL script that creates a user.

See Also

Documenter Project

Generate Documentation Dialog Box


Generate Documentation Dialog Box

Use this dialog box to generate a database documentation file. To open the dialog box, click Generate on the Database Documenter Project pane.

HTML
Click to generate database documentation file in the HTML format.

Pdf
Click to generate database documentation file in the Pdf format.

Markdown
Click to generate database documentation file in the Markdown format.

Directory
Select the directory where generated documentation file will be saved.

Append timestamp to the directory name
Select to append timestamp to the directory name.

Open documentation after generation
Select to open documentation file after generation.

Generate
Click to start generation process.

Cancel
Click to cancel document generation and close the Generate Documentation dialog box.

See Also

Documenter

Database, Database Documenter Project


Find and Replace Window

You can use the Find and Replace window to search for text, expressions, or entity names within the code of your documents. To access this window, from the Edit menu, click Find and Replace, and then select one of the options listed.

The Find and Replace window contains a toolbar with two drop-downs, one for find operations and one for replace operations. When you select an operation, the corresponding options for the operation are displayed. You can search and replace in one or more files or an entire project for text, SQL code, or symbols.

In This Section

Find, Find and Replace Window
Used to search the active file for a string or expression. Jumps from match to match within each document.

Find in Files, Find and Replace Window
Used to search for a string or expression in files stored within a set of search folders, or across the active solution. Displays matches in the Find Results windows.

Choose Search Folders Dialog Box
The topic describes Choose Search Folders dialog box that allows you to create your own set of search folders, and to specify the order in which they are searched.

Find Results Window
The topic describes the Find Results window that allows you to navigate text search results


Find, Find and Replace Window

Use Find and Replace dialog box for searching and replacing text in the code editor.

Note

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition.

To access the Find and Replace dialog box:

1. In the Edit menu, click Find and Replace.
2. Select required option from the list.

An alternative way to access the Find and Replace window is by pressing CTRL+F shortcut key.

Menus

Find
Allows to select Find or Find in Files dialog.

Find
The search will be executed in an open document.

Find in Files
The search will be executed in the selected files or a project. If this option is selected, the Find and Replace window provides additional options. You can create a set of selected folders, specify search file types, and set result options.

Replace
Allows to select Replace or Replace in Files dialog.

Replace
The search will be executed in the document. The occurrences will be replaced with the replacement string.

Replace in Files
The search will be executed in the files or a project. The occurrences will be replaced with the replacement string.

General Options

Find what
To search for a new text string or expression, specify it in the box. To search for any of the strings that you searched for most recently, open the list, and select the string for which you want to search. You can also:

· Reuse the search strings by selecting any from the drop-down list in the field
· Enter a new search string into the field
· Use regular expressions as search strings
· Use wildcards in your search strings

Replace with
Replacement string.

Look in
Select search location here.

Current Document
Search will be executed in current document only.

Current Window
Search will be executed in current tool window. It can be either the Output window or the Data Viewer window.

All Open Documents
Search will be executed in all open documents.

Selection
Search will be executed in the selected text.

Current Project
Search will be executed in the opened project.

Find Options

Match case
Case sensitive search.

Match whole word
The string will not be found/replaced if it is not a whole word.

Search up
Search will be performed in reverse direction.

Search hidden text
Search in collapsed text areas (such as regions, definitions and others) will be also performed.

Use
Use regular expressions or wildcards in search.

Regular expressions
A regular expression is a pattern of text that consists of ordinary characters (for example, letters a through z) and special characters, known as metacharacters. The pattern describes one or more strings to match when searching text. If this option is selected, the arrow button next to the Find what field becomes active. You can click the button and select a required regular expression to add to the Find what field.

Wildcards
This is a list of expressions to replace characters or digits in the Find what field.

Buttons

Find Next
Searches the next occurrence in document.

Bookmark All
Sets bookmarks for the lines, that contain occurrences in the scope. Available for the Find mode.

Replace
Searches the next occurrence in document or replaces the selected one if on replace dialog, shows replace dialog if on search dialog. Available for the Replace mode.

Replace All
Replaces all occurrences in search location. Available for the Replace mode.

See Also

Find and Replace Window

Find in Files, Find and Replace Window


Find in Files, Find and Replace Window

Use the Find and Replace window to find and replace text in the selected files.

Note

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition.

To access the Find in Files, Find and Replace dialog box:

1. In the Edit menu, click Find and Replace.
2. Select required option from the list.

An alternative way to access the Find in Files, Find and Replace window is by pressing CTRL+F shortcut key, and then select Find in Files from the Find menu.

Menus

Find
Allows to select Find or Find in Files dialog.

Find
The search will be executed in the opened document.

Find in Files
The search will be executed in the selected files or a project. If this option is selected, the Find and Replace window provides additional options. You can create a set of selected folders, specify search file types, and set result options.

Replace
Allows to select Replace or Replace in Files dialog.

Replace
The search will be executed in the document. The occurrences will be replaced with the replacement string.

Replace in Files
The search will be executed in the files or a project. The occurrences will be replaced with the replacement string.

General Options

Find what
String that will be searched. This field allows you to use a string or a regular expression that will be matched. You can do the following:

· Reuse the search strings by selecting any from the drop-down list in the field
· Enter a new search string into the field
· Use regular expressions as search strings
· Use wildcards in your search strings

Replace with
Replacement string.

Look in
Select a search location here, either selecting options from the drop-down list or creating a new set of folders in the Choose Search Folders window. The drop-down list contains the following options:

Current document
Search will be executed in the current document only.

All open documents
Search will be executed in all open documents.

Current Project
Search will be executed in the opened project.

Click to open the Choose Search Folders dialog box for creating custom named folder list.

Include sub-folders
Select this check-box to include the sub-folders within the selected folder set in the Look in field.

Find Options

Match case
Case sensitive search.

Match whole word
The string will not be found/replaced if it is not a whole word.

Use
Select this check-box to activate the use of regular expressions or wildcards in search strings.

Regular expressions
A regular expression is a pattern of text that consists of ordinary characters (for example, letters a through z) and special characters, known as metacharacters. The pattern describes one or more strings to match when searching text. If this option is selected, the arrow button next to the Find what field becomes active. You can click the button and select a required regular expression to add to the Find what field.

Wildcards
This is a list of expressions to replace characters or digits in the Find what field.

Look at these file types
Select the required file types from the drop-down list. The search will be executed only in files of the selected type.

Result Options

Display file names only
Select this check-box to show one entry per a file containing a search match.

Keep modified files open after Replace All
Select this check-box to leave all modified files open after Replace All is performed. It will allow you to undo or save the changes in the files.

Buttons

Find Next
Searches the next occurrence in document.

Find All
Searches for all occurrences in the scope. Available for the Find in Files mode.

Replace
Searches the next occurrence in document or replaces the selected one if on replace dialog, shows replace dialog if on search dialog. Available for the Replace in Files mode.

Replace All
Replaces all occurrences in search location. Available for the Replace in Files mode.

See Also

Find and Replace Window

Choose Search Folders Dialog Box


Choose Search Folders Dialog Box

This dialog allows you to create, save, and revise your own set of search folders, and to specify the order in which they are searched. To open this dialog, click the [image] button, next to the Look in field.

Folder set
Shows the folders available for search. To create a new folder set, enter a name, add a set of search folders to the Selected folders list, and then click the Apply button.

Apply
Saves the set of search folders in the Selected folders list as a named folder set. This folder set then can be chosen in the Look in field on all tabs of the Find and Replace window. Leaves the Choose Search Folders dialog box open.

Delete
Removes the selected folder set from the Folder set field, and from the Look in field on all tabs of the Find and Replace window.

Available folders
Select a previously selected folder from the drop-down list to populate the Selected folders list.

List of Folders
Shows the drives and folders available within the folder selected in the Available folders drop-down list. Double-click to expand any drive or folder listed. Select a folder, or hold down the SHIFT or CTRL key to select multiple folders. To add a selected folder to the Selected folders list, click the [image] right-arrow button. To remove a selected folder, click the [image] the left-arrow button.

Up
Moves the selection in the Available folders list one level higher in the folder hierarchy.

Selected folders
Lists folders added from the Available folders list. These folders will be included in the named folder set.

Arrow buttons
- Moves folders to the Selected folders list.

- Selects folders from the Selected folders list.

- Moves the selected folder to one position higher in the Selected folders list so that the folder will be searched earlier.

- Shifts the selected folder to one position down in the Selected folders list so that the folder will be searched later.

OK
Saves the set of search folders listed in Selected folders list as a named folder set. This folder set then can be chosen in the Look in field on all tabs of the Find and Replace window. Closes the Choose Search Folders window.

Cancel
Discards all changes and closes the Choose Search Folders window.

See Also

Find and Replace Window

Find Results Window


Find Results Window

Find Results window allows you to navigate text search results. It provides you following search results: file name, line number and part of the text, containing the match. You may double-click on matches to navigate to them. Find Results window has following toolbar buttons.

Go to the location on the current line
Moves caret to the selected line location of the match found.

Go to the previous location in the list
Moves caret to the selected line location of the previous match found.

Go to the next location In the list
Moves caret to the selected line location of the next match found.

Clear All
Clears Find Results window.

See Also

Find and Replace Window


Import and Export Settings Wizard

Export, import, or restore dbForge Studio settings using convenient Import and Export Settings wizard.

To access this wizard, in the Tools menu, click Import and Export Settings.

In This Section

See the list of Wizard's pages with their options below.

Welcome to the Import and Export Settings Wizard, Import and Export Settings Wizard
Choose a required action (export, import, or resetting) to apply to dbForge Studio settings on this page.

Choose Settings to Export, Import and Export Settings Wizard
Select categories of settings that you want to export on this page.

Save Current Settings, Import and Export Settings Wizard
Choose a file name and a location for the file which will contain the current settings on this page.

Export Finish, Import and Export Settings Wizard
See the result message to know whether the export is performed successfully and close the wizard on this page.

Save Current Settings While Importing, Import and Export Settings Wizard
Save your current settings while importing new ones on this page.

Choose Settings To Import, Import and Export Settings Wizard
Select categories of settings that you want to import on this page.

Reset Finish, Import and Export Settings Wizard
See the result message to know whether the resetting is performed successfully and close the wizard on this page.

Import Finish, Import and Export Settings Wizard
See the result message to know whether the import is performed successfully and close the wizard on this page.

Save Current Settings While Resetting, Import and Export Settings Wizard
Save your current settings while restoring default settings on this page.


Welcome to the Import and Export Settings Wizard, Import and Export Settings Wizard

Select the required action to export, or import the settings, or reset all settings to default ones here.

Export selected environment settings
Select this option to save your current settings to a file. Further you can import them at any time.

Import selected environment settings
Select this option to import settings from a file and apply to the environment.

Reset all settings
Select this option to replace your current settings with the default ones.

See Also

Import and Export Settings Wizard

Welcome to the Import and Export Settings Wizard, Import and Export Settings Wizard

© 2004-2018 Devart


Choose Settings to Export, Import and Export Settings Wizard

Select categories of settings which you want to export here.

Select the check boxes next to the settings you want to export. (To export all settings, select All Settings check box.)

Clear the settings which should not be exported.

Note

The similarly-named connections are being imported with an index, while importing connections options.

See Also

Import and Export Settings Wizard

Save Current Settings, Import and Export Settings Wizard


Save Current Settings, Import and Export Settings Wizard

Specify the name and location of the file that will contain exported settings here.

Settings file name
Change the default name of the file with exported settings.

Store my settings in this directory
Click the Browse button to change the default location for the file with exported settings.

See Also

Import and Export Settings Wizard

Export Finish, Import and Export Settings Wizard


Export Finish, Import and Export Settings Wizard

See the result message on this page to know whether the export is performed successfully. Click the Close button to close the wizard.

See Also

Import and Export Settings Wizard

Save Current Settings While Importing, Import and Export Settings Wizard


Save Current Settings While Importing, Import and Export Settings Wizard

Save your current settings while importing new ones on this page.

Yes, save my current settings
Select this option to save your current settings before importing the new ones. Enter the name of the file that will contain the exported settings.

Browse
Click the Browse button to change the default location of the file that will contain the exported settings.

No, just import new settings, overwriting my current settings
Select this option to import the new settings without saving the current ones.

See Also

Import and Export Settings Wizard

Choose Settings To Import, Import and Export Settings Wizard


Choose Settings To Import, Import and Export Settings Wizard

Select the categories of settings that you want to import here.

Browse
Click the Browse button to select the file with imported settings. Select the check boxes next to the settings you want to export. (To export all settings, select All Settings check box.)

Clear the settings which should not be exported.

See Also

Import and Export Settings Wizard

Reset Finish, Import and Export Settings Wizard


Reset Finish, Import and Export Settings Wizard

See the result message on this page to know whether the resetting is performed successfully. Click the Close button to close the wizard.

See Also

Import and Export Settings Wizard

Import Finish, Import and Export Settings Wizard


Import Finish, Import and Export Settings Wizard

See the result message on this page to know whether the import is performed successfully. Click the Close button to close the wizard.

See Also

Import and Export Settings Wizard

Save Current Settings While Resetting to Default Ones, Import and Export Settings Wizard


Save Current Settings While Resetting to Default Ones, Import and Export Settings Wizard

Save your current settings while resetting your settings to the default ones on this page.

Yes, save my current settings
Select this option to save your current settings before before replacing them with the default ones. Enter the name of the file that will contain the exported settings.

Browse
Click the Browse button to change the default location of the file that will contain the exported settings.

No, just import new settings, overwriting my current settings
Select this option to restore the default settings without saving the current ones.

See Also

Import and Export Settings Wizard


Master-Detail Browser

Master-Detail Browser is a utility for viewing data in parent tables or views as well as in related child tables or views, and also in self-referencing tables. This section describes Master-Detail Browser user interface elements.

In This Section

Design View, Master-Detail Browser
Describes the Design view of the Master-Detail Browser document.

Data View, Master-Detail Browser
Describes the Design view of the Master-Detail Browser document.


Design View, Master-Detail Browser

In this window you can view relations between tables.

Toolbar

Browse Data
Click to open Data View of the browser.

Set Table as Master
Makes the table selected on the diagram, master table.

Select All Columns
Click to select all columns in the selected table.

Unselect All Columns
Click to cancel all columns selection in the selected table.

Sort Ascending
Apply ascending data sorting in this column.

Sort Descending
Apply descending data sorting in this column.

Send to Query
Create new query using tables and settings available in the Master-Detail Browser document.

Diagram shapes

Master table
Master table shape, it's marked pink.

Table
Shape(s) of child table(s).

Relations
Arrows indicate relations between tables.

Diagram shortcut menu

Zoom
Zoom in or zoom out the diagram.

Select All
Select all shapes on the diagram.

Export to Image
Save your diagram as an image.

Layout Diagram
Apply automatic diagram layout.

Send to Query
Create new query using tables and settings available in the Master-Detail Browser document.

Paste
Pastes objects on the diagram.

Options
Opens master-detail options.

Status bar

Message
Specifies name of the table selected on the diagram.

Fetch Limit
Specify the number of rows that should be displayed in the Data view.

Where Condition
Specify an additional condition for performing data selection from tables.

See Also

Master-Detail Browser

Data View, Master-Detail Browser


Data View, Master-Detail Browser

You can view data from related tables here.

Refresh
Refreshes data. Apply whenever you make changes in the Design view.

Stop Refresh
Stops refreshing data.

Show (Hide) Design
Click to return to the Design view. The Hide option appears if you are using split window layout.

Upper grid
Contains data of the master table.

Lower grid
Contains data of child table(s).

See Also

Viewing Data in Master-Detail Tables

How To: View Data in Related Tables


Object Editors

This section contains reference information on user interface. Visit following topics for detailed information.

In This Section

Database Editor
Describes what elements database editor has.

Table Editor
Describes what elements table editor has.

View Editor
Describes what elements view editor has.

Procedure and Function Editor
Describes what elements procedure and function editor has.

Trigger Editor
Describes what elements trigger editor has.

Event Editor
Describes what elements event editor has.

New Object Dialog Box
Information about dialog box where you can create a new MySQL schema object.


Database Editor

Use this editor to create or modify database properties. To modify an existing database, right-click it in Database Explorer and select Edit Database from the shortcut menu. To create a new database, right-click a connection in Database Explorer, and then select New Database from the shortcut menu.

Name
Name of the database

Charset
Select a charset to be used by the database from the drop-down menu.

Collation
Select a collation to be used by the database from the drop-down menu.

Body
Contains the text of the database. It is possible to edit the database text in this section of the Designer window, and the changes will be reflected in the Text window and vice versa.

Refresh Object
Click to refresh the edited database object.

Update Database
Saves changes to the database. Clicking this button equal to clicking the Save button.

Script Changes

to New SQL Window
Show script changes in the new SQL document.

to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Object Editors

Table Editor


Table Editor

Use table editor to modify table structure together with indexes.

In This Section

Columns, Table Editor
Information on what parameters are provided at the Columns tab.

Merge Options, Table Editor
Information on what parameters are provided at the Merge Options tab.

Constraints, Table Editor
Information on what parameters are provided at the Constraints tab.s

Indexes, Table Editor
Information on what parameters are provided at the Indexes tab.

Options, Table Editor
Information on what parameters are provided at the Options tab.

Triggers, Table Editor
Information on what parameters are provided at the Triggers tab.

Partitioning, Table Editor
Information on setting table partition parameters.

Data, Table Editor
Information on what parameters are provided at the Data tab.

Column Properties
Describes the Column Properties grid of the Columns tab of the Table Editor.

Constraint Properties
Describes the Constraint Properties grid of the Constraints tab of the Table Editor.

Index Properties
Describes the Index Properties grid of the Indexes tab of the Table Editor.

Values Editor Dialog Box
Describes what you can do in Values Editor dialog box.

See Also

Object Editors

View Editor


Columns, Table Editor

Use this tab to set up table, its name and columns. To see this tab double-click a table in Database Explorer.

Note

The options listed below are changed depending on the server.

Name
Name of the table.

Database
Contains the name of the database the table belongs to.

Comment
Table comment. If it consists of more than one line, only the first line, followed with dots is displayed in the field. Click the [image] button of this field to view and edit multiline comment.

Engine
Specify table type. It could be one of following: BDB, HEAP (MEMORY in MySQL 5.0 and higher), FEDERATED (in MySQL 5.1 and higher), ISAM, InnoDb, MERGE, MyISAM, Maria (in MySQL 6.0.6 and higher), Aria (in MariaDB 5.1 and higher). If an engine is not available on the server, it is not shown in the list.

Column grid

Main tab of the table editor allows you to edit column collection. Grid lists all the table columns and contains following information about them.

Primary
Indicates whether column is included in primary index.

Name
Column name.

Data Type
Column type.

Unsigned
Set column attribute indicating whether column accepts negative values, affects numeric data types only.

Auto Increment
Specifies whether the column is autoincrement.

Not Null
Indicates whether column is nullable or not.

Default
Default column value.

Collation
Column collation.

Virtuality
Specify the way of how to determine a column value. Select VIRTUAL to generate a column value on the fly, or STORED to take a column value stored physically in a table.

Expression
Specified expression for a column is displayed here.

Comment
Comment string for the table.

Column Grid Shortcut Menu

Columns grid shortcut menu appears when editing table in a document and right-clicking on grid in General tab. The menu contains following items.

New Column
Opens a dialog where you can set up a column and add it.

Insert Column
Inserts a new column. The column will be added before the currently selected column.

Find Column
To quickly find a column, enter characters available in the required event filter's name. Only columns, names of which contain the required characters, will be shown in the list.

Search Box
Type the search string in this box.

Clear
Click to clear the search string.

Move Column Up
Moves a column up.

Move Column Down
Moves a column down.

Delete Column
Deletes a currently selected column.

Column Properties Grid

The grid shows detailed properties of the column that is currently selected in the Column List grid. For detailed description of column properties, see Column Properties.

Body
Contains the text of the table. It is possible to edit the table text in this section of the Designer window, and the changes will be reflected in the Text window and vice versa.

Refresh Object
Click to refresh the edited database object.

Update Database
Saves changes to the database. Clicking this button equal to clicking the Save button.

Script Changes

to New SQL Window
Show script changes in the new SQL document.

to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Table Editor

Merge Options, Table Editor


Merge Options, Table Editor

This tab is available for MERGE tables only. It allows you to set merge table parameters. To see it, double-click a MERGE table in Database Explorer, then switch to the Merge Options tab.

Insert method
Specify the underlying table to insert rows, when rows are inserted into the MERGE table. You may choose the FIRST or the LAST table from the tables list. Choosing NO means that rows cannot be inserted into the MERGE table.

Table List

Remove
Click to remove the selected table from the list.

Move Up
Click to move the selected table up the list

Move Down
Click to move the selected table down the list.

Import
Click to import the MERGE table structure from the selected table in the Underlying tables list.

Database
Select a database from the drop-down list box.

Table
Select a table from the drop-down list box.s

Refresh Object
Click to refresh the edited database object.

Update Database
Saves changes to the database. Clicking this button equal to clicking the Save button.

Script Changes

to New SQL Window
Show script changes in the new SQL document.

to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need..

See Also

Table Editor

Constraints, Table Editor


Constraints, Table Editor

On Constraints tab of the table editor you can edit constraints of the specific table. Grid lists all table constraints and contains following information about them.

Name
Name of a constraint.

Columns
Name of a column.

Constraint Type
Constraint type. Can be Check, Unique, Primary or Foreign.

Constraints List Grid Shortcut Menu

Constraints tab shortcut menu appears when editing table in a document and right-clicking anywhere on Constraints tab. The menu contains the following items.

Edit Constraint
Opens a dialog where you can set up currently selected key.

Add Foreign Key
Opens a dialog where you can set up a foreign key and add it.

Add Primary Key
Opens a dialog where you can set up a primary key and add it.

Delete Constraint
Deletes currently selected key.

Constraint Properties

The grid shows detailed properties of the constraint that is currently selected in the Constraint List grid. For detailed description of constraint properties, see Constraint Properties.

Refresh Object
Click to refresh the edited database object.

Update Database
Saves changes to the database. Clicking this button equal to clicking the Save button.

Script Chnages

to New SQL Window
Show script changes in the new SQL document.

to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Table Editor

Indexes, Table Editor


Indexes, Table Editor

On the Indexes tab of the table editor, you can edit indexes of the specific table. Grid lists all the table indexes and contains following information about them.

Name
Name of an index.

Columns
List of columns that index includes, separated by commas.

Unique
Flag showing whether index is unique or not. Use double-click or shortcut menu to edit certain index.

Indexes Grid Shortcut Menu

Indexes tab shortcut menu appears when editing table in a document and right-clicking anywhere on Indexes tab. The menu contains following items.

Add Index
Opens a dialog where you can setup an index and add it.

Delete Index
Deletes currently selected index.

Index Properties

The grid shows detailed properties of the index that is currently selected in the Index List grid. For detailed description of index properties, see Index Properties.

Refresh Object
Click to refresh the edited database object.

Update Database
Saves changes to the database. Clicking this button equal to clicking the Save button.

Script Changes

to New SQL Window
Show script changes in the new SQL document.

to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Table Editor

Options, Table Editor


Options, Table Editor

Use this tab to set up table options. To see this dialog, double-click on a table at Database Explorer, then switch to Options tab.

Charset
Choose charset to be used by table.

Collation
Choose collation to be used by table.

Auto increment
Specify initial value for auto increment column.

Row format
Specifies the format for the data file. Possible values are engine-dependent. For MyISAM formats are: FIXED, DYNAMIC. For Aria formats are: PAGE, FIXED, DYNAMIC. For InnoDB, formats are: COMPACT, REDUNDANT, COMPRESSED, DYNAMIC. Other storage engines do not support this option.

Min rows
Specify the minimum number of rows you plan to store in the table.

Max rows
Specify the maximum number of rows you plan to store in the table.

Average row length
Specify an approximation of the average row length for your table. You need to set this only for large tables with variable size records.

Transactional
Transactional means crash-safe for Aria. Currently transactional tables cannot handle SPATIAL or FULLTEXT indexes.

Page checksum
Set this option to true if you want the index and data should use page checksums for extra safety. Is only applicable to Aria tables, and determines whether index and data should use page checksums for extra safety.

Checksum
Set this option to true if you want MySQL to maintain a checksum for all rows.

Pack keys
Set this option to true if you want to have smaller indexes. This usually makes updates slower and reads faster.

Delay key write
Set this option to true if you want to delay key updates for the table until the table is closed (MyISAM only).

Refresh Object
Click to refresh the edited database object.

Update Database
Saves changes to the database. Clicking this button equal to clicking the Save button.

Script Changes

to New SQL Window
Show script changes in the new SQL document.

to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Table Editor

Triggers, Table Editor


Triggers, Table Editor

On the Triggers tab of the table editor, you can view and configure indexes of the specific table. Grid lists all the table rtiggers and contains following information about them.

Name
Name of the trigger.

Type
Shows the trigger type

Event
Shows events that fire the trigger.

Triggers List Shortcut Menu

Edit Trigger
Opens the Trigger Editor where you can modify the selected trigger.

New Trigger
Opens the Trigger Editor where you can setup an index and add it.

Delete
Deletes the currently selected trigger.

Refresh Object
Click to refresh the edited database object.

Update Database
Saves changes to the database. Clicking this button equal to clicking the Save button.

Script Changes

to New SQL Window
Show script changes in the new SQL document.

to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Table Editor

Partitioning, Table Editor


Partitioning, Table Editor

Use this tab to set up table partitioning parameters. To see it double-click on a partitioned table at Database Explorer, then switch to Partitioning tab. This tab is available only for MySQL servers, that supports partitioning.

Partition type
Set partitioning method here.

Subpartition type
Set subpartitioning method here for composite partitioning. Available only when range, range columns, list or list columns partition type is set.

Partition columns
Select columns of partitioning key here. Only one column can be selected for list partitioning. Available only for key, list columns, range columns partitioning.

Subpartition columns
Select columns of subpartitioning here. Only one column can be selected for range-list partitioning. Available only for key, list columns, range columns partitioning.

Partitioning Expression
Specify the partitioning expression here. Not available for key partitioning. Enter an integer (or any integer subtype) column or expression that returns integer value. Expression should be varying but not random.

Subpartitioning Expression
Specify the subpartitioning expression here. Not available for key subpartitioning. Enter an integer (or any integer subtype) column or expression that returns integer value. Expression should be varying but not random.

Partitions

Partitions
Shows table partitions and their subpartitions.

Add
Click to add partition, subpartition or subpartition template.

Remove
Click to remove selected item in the Partitions tree.

Name
Input selected partition or subpartition name here.

Value
Set selected partition or subpartition values here.

Type
Select table engine for the selected partition or subpartition here.

Quantity of subpartitions
Shows quantity of subpartitions for the selected partition or quantity of partitions when using hash partitioning method.

Comment
You may specify a comment for the selected partition or subpartition here.

Refresh Object
Click to refresh the edited database object.

Update Database
Saves changes to the database. Clicking this button equal to clicking the Save button.

Script Changes

to New SQL Window
Show script changes in the new SQL document.

to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Table Editor

Data, Table Editor


Data, Table Editor

This tab contains data available in the table.

Data Editor
Allows to view and quickly edit table data. For information on user interface elements of the grid, refer to Data Editor Window.

Refresh Object
Click to refresh the edited object from the database.

Update Database
Saves changes to the database. Clicking this button equal to clicking the Save button.

Script Changes

to New SQL Window
Show script changes in the new SQL document.

to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Table Editor

Column Properties


Constraint Properties

This section contains reference information on constraint properties.

In This Section

Primary Key Properties
Information on what properties of a primary key you can alter in the grid.

Foreign Key Properties
Information on what properties of a foreign key you can alter in the grid.

See Also

Table Editor

Index Properties


Primary Key Properties

Use this grid to modify the primary key properties. To view the grid, double-click a table in Database Explorer, switch to the Constraints tab of the Table editor and select a primary key in the Constraint list.

Name
Name of a primary key. Note that you can't change name of primary key constraint in MySQL. It is always 'PRIMARY'.

Constraint Columns
List of columns in the table that are included in key. To specify the order of index columns, use Up and the Down arrow buttons.

Name
Specifies names of the columns.

Data type
Specifies data types of the columns.

Not Null
Indicates whether the column accepts null value.

Key Length
Specify maximum amount of bytes of column value that are indexed. Required for BLOB or TEXT column types only.

See Also

Constraints

Foreign Key Properties Dialog Box


Foreign Key Properties

Use this grid to modify the foreign key properties. To view the grid, double-click a table in Database Explorer, switch to the Constraints tab of the Table editor and select a foreign key in the Constraint list.

Name
Name of a foreign key. Uniqueness of the name is checked when you click OK.

Delete rule
Specify action that must take place on row deletion. This can be Cascade, No Action, Set Null, or Restrict.

Update rule
Specify action that must take place on row update. This can be Cascade, No Action, Set Null, or Restrict.

Table Name
Contains the table name. Below is the list of columns in the table that are not included in key.

Constraint Columns
List of columns in the table that are included in key.

Referenced Database
Database, that contains referenced constraint.

Referenced Table
Name of the table the key references to. Below is the name of the constraint the key references to.

Referenced Columns
Columns involved in referenced constraint.

See Also

Constraint Properties

Object Editors


Edit Values Dialog Box

dbForge Studio provides you with a handy interface to create enumeration used in MySQL types ENUM and SET. The window consists of two parts: currently enumerated values and dialog elements designed to manipulate the list. New enumeration elements are entered in the single-line text box.

Replace
Use this button to replace currently highlighted element in the list with the new item.

Add
Click on this button to add a new list element that is entered in the single-line text box. The new item will be the last in the list.

Delete
This button deletes currently highlighted element from the list.

OK
After making changes to the enumeration click OK to apply changes and close the dialog.

Cancel
Click on Cancel button to discard all changes made to the enumeration.

Refresh Object
Click to refresh the edited database object.

Update Database
Saves changes to the database. Clicking this button equal to clicking the Save button.

Script Changes

to New SQL Window
Show script changes in the new SQL document.

to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Table Editor

Object Editors


View Editor

Use this editor to modify a view. To invoke it, right-click a view in Database Explorer and choose Edit View. View Editor tabs are listed below.

In This Section

Query Text, View Editor
Describes the Query Text tab of the View editor.

Query Design, View Editor
Describes the Query Design tab of the View editor.

SQL, View Editor
Describes the SQL tab of the View editor.

Data, View Editor
Describes the Data tab of the View editor.

See Also

Object Editors

Procedure and Function Editor


Query Text, View Editor

Use this tab to set up main view properties:

Name
Name of a view.

Database
Indicates which database the view belongs to. Read-only after the view was created.

Query Text
Place here query text that must represent the view. You do not have to type "CREATE OR REPLACE VIEW ... AS" because dbForge Studio for MySQL adds this clause for you.

Options

With check option
The WITH CHECK OPTION clause can be given for an updatable view to prevent inserts or updates to rows except those for which the WHERE clause in the select statement is true of the view query.

Cascaded
CASCADED keyword causes the checks for underlying views to be evaluated.

Local
LOCAL keyword restricts the CHECK OPTION only to the view being defined.

Security

Definer
The view should be executed using the access rights of the user who creates the view (if the definer is CURRENT_USER) or the specified definer. You can specify other user account as definer only if you have the SUPER privilege.

Definer is specified in the following form: user@host, where user is user account name (up to 16 characters), and host is host, from which user can connect to server to use this account (either host name or IP address). You may use '%' character to specify any host except localhost. The '%' charcacter may be used in a host name or in IP. For example, '%.mydomain.com' in a hostname means any host from domain 'mydomain.com'. '144.155.166.%' means any host from 144.155.166 class C subnet. You may also use CURRENT_USER function to specify current user as definer.

Invoker
The view should be executed using the access rights of the user who invokes the view.

Refresh Object
Click to refresh the edited database object.

Update Database
Saves changes to the database. Clicking this button equal to clicking the Save button.

Script Changes

to New SQL Window
Show script changes in the new SQL document.

to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

View Editor

Query Design, View Editor


Query Design, View Editor

Use the Query Design tab of View Editor to edit query of the view with help of query document.

For description of user interface elements of the tab, refer to the Query Builder section.

Refresh Object
Updates current view in case an object was updated in a database by someone else.

Update Database
Saves changes to the database. Clicking this button is equal to clicking the Save button.

Script Changes

to New SQL Window
Show script changes in the new SQL document.

to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

View Editor

SQL, View Editor


SQL, View Editor

Use the SQL tab of View Editor to edit SQL script of the view.

For description of user interface elements of the tab, refer to the SQL Editor section.

Refresh Object
Click to refresh the edited object from the database.

Update Database
Saves changes to the database. Clicking this button equal to clicking the Save button.

Script Changes

to New SQL Window
Show script changes in the new SQL document.

to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

View Editor

Data, View Editor


Data, View Editor

This tab contains data available in the view.

Data Editor
Allows to view and quickly edit table data. For information on user interface elements of the grid, refer to Data Editor Window.

Refresh Object
Click to refresh the edited object from the database.

Update Database
Saves changes to the database. Clicking this button equal to clicking the Save button.

Script Changes

to New SQL Window
Show script changes in the new SQL document.

to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

View Editor

Object Editors


Procedure and Function Editor

Use this editor to create and edit stored procedures and functions. To open the editor, right-click a stored procedure in the Database Explorer and select Open from the shortcut menu.

Name
Name of the stored procedure/function.

Database
Name of a database this procedure/function belongs to.

Comment
Enter comment string for a stored procedure/function. If comment consists of more than one line, only the first line, followed with dots is displayed in the field. Click the [image] button of this field to view and edit multiline comment.

Parameters

Using the Parameters editor, you can edit parameters used in the stored routine. In the editor, you can change parameter name, type, and direction, add new parameters and remove existing ones. Using the arrows, you can navigate between existing parameters.

Add
Click to add a new parameter.

Remove
Removes a current parameter from the list.

Move Up
Click to move a current parameter up in the list order.

Move Down
Click to move a current parameter down in the list order.

Options

Invoker
The routine should be executed using the permissions of the user who invokes the routine.

Definer
The routine should be executed using the permissions of the user who creates the routine (if the definer is CURRENT_USER) or the specified definer. You can specify other user account as definer only if you have the SUPER privilege.

Definer is specified in the following form: user@host, where user is user account name (up to 16 characters), and host is host, from which user can connect to server to use this account (either host name or IP address). You may use '%' character to specify any host except localhost. The '%' charcacter may be used in a host name or in IP. For example, '%.mydomain.com' in a hostname means any host from domain 'mydomain.com'. '144.155.166.%' means any host from 144.155.166 class C subnet. You may also use CURRENT_USER function to specify current user as definer.

SQL Access
Provides information about the nature of data use by the routine. These characteristics are advisory only. The server does not use them to constrain what kinds of statements a routine will be allowed to execute.

CONTAINS SQL
Indicates that the routine does not contain statements that read or write data. The default value.

NO SQL
Indicates that the routine contains no SQL statements.

READS SQL DATA
Indicates that the routine contains statements that read data, but not statements that write data.

MODIFIES SQL DATA
Indicates that the routine contains statements that may write data.

Deterministic
A deterministic procedure returns the same result for the same input parameters. Otherwise a procedure is considered not deterministic.

Body
Contains the text of the procedure/function. It is possible to edit the procedure text in this section of the Designer window, and the changes will be reflected in the Text window and vice versa.

Note

You can achieve the same purposes using the Text View of a document except changing a stored procedure name. You can change stored procedure name only in the Design View.

Refresh Object
Click to refresh the edited database object.

Update Database
Saves changes to the database. Clicking this button equal to clicking the Save button.

Script Changes

to New SQL Window
Show script changes in the new SQL document.

to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Object Editors

Trigger Editor


Trigger Editor

Use trigger editor to modify triggers.

In This Section

Main, Trigger Editor
Describes the Main tab of the Trigger editor.

SQL, Trigger Editor
Describes the SQL tab of the Trigger editor.

See Also

Object Editors

Event Editor


Main, Trigger Editor

Use this tab to setup trigger name, body and a table it will be associated with. To see this tab double-click on a trigger at Database Explorer.

Name
Name of a trigger.

Database
Contains the name of the database the trigger belongs to.

Owner
Shows the dbForge Studio the trigger belongs to.

Trigger Body
You can edit trigger body text here.

Table
The table trigger is associated with.

Definer
The name of the user who created the trigger. Select a required name from the drop-down list.

Timing

Choose the time for trigger to fire. This can be Before or After an event.

Before
The trigger will be fired before the statement that caused it to fire will be executed.

After
The trigger will be fired after execution of the statement.

Event

This section defines which events have to fire the trigger.

Insert
The trigger will be fired when a new row is being inserted into a table.

Delete
The trigger will be fired when a row is being deleted from a table.

Update
The trigger will be fired when a row is being updated in a table.

Order

Follows trigger
Select a trigger that will follow the trigger in the triggers list.

Precedes trigger
Select a trigger that will precede the trigger in the triggers list.

Refresh Object
Click to refresh the edited database object.

Update Database
Saves changes to the database. Clicking this button equal to clicking the Save button.

Script Changes

to New SQL Window
Show script changes in the new SQL document.

to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Trigger Editor

SQL, Trigger Editor


SQL, Trigger Editor

Use the SQL tab of View Editor to edit SQL script of the trigger.

For description of user interface elements of the tab, refer to the SQL Editor section.

Refresh Object
Click to refresh the edited object from the database.

Update Database
Saves changes to the database. Clicking this button equal to clicking the Save button.

Script Changes

to New SQL Window
Show script changes in the new SQL document.

to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Trigger Editor

Object Editors


Event Editor

Use Event editor to modify MySQL events.

In This Section

Main, Event Editor
Describes the Main tab of the Event editor.

SQL, Event Editor
Describes the SQL tab of the Event editor.

Edit Intervals Dialog Box
Use this dialog box to edit intervals.

See Also

Object Editors

New Object Dialog Box


Main, Event Editor

Use this tab to set up main event properties:

Name
Name of an event.

Database
Shows the database the event belongs to.

Comment
Event comment. If comment consists of more than one line, only the first line, followed with dots is displayed in the field. Click the [image] button of this field to view and edit multiline comment.

Event body
SQL statement to be executed by an event.

Status
Shows event status. You can select the required status for an event from the drop-down list box. There are three options available: ENABLE, DISABLE, DISABLE ON SLAVE.

Definer
The name of the user who created the event. Select a required name from the drop-down list.

Recurrent
If selected, event will occur every specified interval of time.

Drop On Completion
If selected, the event will be dropped after it's expired.

Start

Immediately
Event will be executed immediately after creation.

At time
Specify the date and time the event will be executed at.

End

No end date
Event will never expire.

After interval
Specify an interval, after which event will expire.

At time
Specify the date and time of event expiration.

Recurrence

Daily
Specify the number of days between event executions.

Weekly
Specify the number of weeks between event executions and a week day to execute the event on.

Monthly
Specify the number of months between event executions and a day to execute the event on.

Yearly
Specify the month and day the event will be executed on every year.

Custom
Specify type and value of an interval between the event execution.

Refresh Object
Click to refresh the edited database object.

Update Database
Saves changes to the database. Clicking this button equal to clicking the Save button.

Script Changes

to New SQL Window
Show script changes in the new SQL document.

to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Event Editor

SQL, Event Editor


SQL, Event Editor

Use the SQL tab of View Editor to edit SQL script of the event.

For description of user interface elements of the tab, refer to the SQL Editor section.

Refresh Object
Click to refresh the edited object from the database.

Update Database
Saves changes to the database. Clicking this button equal to clicking the Save button.

Script Changes

to New SQL Window
Show script changes in the new SQL document.

to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Event Editor

Edit Intervals Dialog Box


Edit Intervals Dialog Box

Edit Intervals dialog allows you to enter intervals. The window consists of two parts: currently entered values and dialog elements designed to manipulate the list.

Interval
Enter time interval value in the specified format here.

Format
Select time interval format here.

Add
Click on this button to add a new entered list element. The new item will be the last in the list.

Replace
Use this button to replace currently highlighted element in the list with the new item.

Delete
This button deletes currently highlighted element from the list.

OK
After making changes to the enumeration click OK to apply changes and close the dialog.

Cancel
Click on Cancel button to discard all changes made to the enumeration.

Refresh Object
Click to refresh the edited database object.

Update Database
Saves changes to the database. Clicking this button equal to clicking the Save button.

Script Changes

to New SQL Window
Show script changes in the new SQL document.

to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Event Editor

Object Editors


New Object Dialog Box

Use this dialog box to create a new database object. To open it, click [image] New Database Object on the Standard toolbar.

Location
Lists available databases on specific MySQL server instance. You may choose specific database to place your object there. If you can not find required database in the list, try to refresh it by pressing F5 or selecting Refresh from the connection node shortcut menu.

Type
Lists available object types to create. Choose required object type to create, e.g. table, view etc.

Name
Name of a database object.

Create
Click on this button to create an object after you have specified its parameters.

Cancel
Use this button to abort creation of new object.

See Also

Object Editors


Options

This section describes different options that are available in dbForge Studio.

In This Section

Environment
This section describes Eenvironment options which determine how certain elements of the dbForge Studio display and behave.

Schema Comparison Options
This section describes schema comparison options.

Text Editor
This section describes Text Editor options that provide a variety of ways to customize the performance and appearance of the editor.

Data Comparison
This section describes options that allows you to change the default behavior of the Data Comparison.

Data Editor
This section describes the Data Editor options.

Generate Schema Script Options
This section describes the DDL generation options.

Copy Databases Options
This section describes the Copy Databases options.

Data Generation Options
This section describes the Data Generation options.

Database Explorer Options
This section describes Database Explorer options.

Query Builder Options
This section describes options for Query Builder's diagram.

Database Diagram Options
This section describes options that help to customize a database diagram.

Debugging Options
This section describes debugging options.

Master-detail Options
This section describes the available Master-detail options.

Query Profiler Options
This section explains code formatting options provided in the Options window.


Environment Options

You can use the pages in the Environment folder in the Options dialog box to set how certain elements of the dbForge Studio display and behave. You can access the Environment pages by clicking Options on the Tools menu, and then clicking Environment.

In This Section

General, Environment, Options Dialog Box
Lists general environment preferences and explains them.

Keyboard, Environment, Options Dialog Box
Describes the tab where you can customize shortcut keys.

Output, Environment Options Dialog Box
Describes the tab where you can customize application output.

Documents, Environment, Options Dialog Box
Describes the tab where you can customize the document view layout.

Projects, Environment, Options Dialog Box
Describes the tab where you can specify the default projects location.

SMTP, Environment, Options Dialog Box
Lists options available at the SMTP options tab.

Web Browser, Environment, Options Dialog Box
Describes the tab where you can set dbForge Studio web browser options.

See Also

Schema Comparison Options

Options


General, Environment, Options Dialog Box

Use this page of the Options dialog box to change settings for the dbForge Studio. You can access the Options dialog box by clicking Options on the Tools menu and then selecting the General page in the Environment folder.

Visual Settings
Choose the skin you like the most.

· Office 2010 Silver
· Office 2010 Blue
· Office 2010 Black
· Office 2013
· Office 2013 Light Gray
· Office 2013 Dark Gray
· Windows 7
· Metropolis
· Metropolis Dark
· Visual Studio 2010
· Visual Studio 2013 Light
· Visual Studio 2013 Dark
· Visual Studio 2013 Blue

Enable main form skin
When checked, the chosen skin type is applied to the main form of the application either.

Environment Settings

At startup
Select what to do when dbForge Studio starts up.

Show Startup page
A Start Up page will be opened at startup.

Load Last Opened Project
Last opened project will be loaded at startup.

Create New SQL Document
A new empty SQL document will be created at startup.

Show Empty Environment
No documents or projects will be opened or created at startup.

Check updates on startup once a week
Select this option so that dbForge Studio for MySQL will check if any updates are available for the product every week.

Show splash screen on startup
Clear to turn off splash screen displaying.

Show status bar
Determines whether status bar should be visible.

Display X items in Window menu
Customizes the number of windows that appear in the Windows list of the Window menu. Type a number between 1 and 24. By default, the number is 10.

Display X items in recently used list
Customizes the number of most recently used projects and files that appear on the File menu. Type a number between 1 and 24. By default, the number is 10. This is an easy way to retrieve recently used projects and files.

See Also

Environment Options

Keyboard, Environment, Options Dialog Box


Keyboard, Environment, Options Dialog Box

The Keyboard page of the Options dialog box allows you to customize the keyboard scheme for the dbForge Studio. Use this option to set shortcut keys for frequently used commands or to establish your favorite binding for a particular command. To access this dialog box, select Options from the Tools menu and choosing the Keyboard page from the Environment folder.

Options

Keyboard mapping scheme
Lists the set of all available collections of shortcut keys. To load a specific scheme, select it from the list. When you are ready to leave the options dialog box, click OK. Your selected scheme will be loaded.

· Eclipse
· Embarcadero RAD Studio
· Microsoft SQL Server Management Studio
· Microsoft Visual Studio
· Oracle SQL Developer
· Quest Software SQL Navigator
· Quest Software Toad

Reset
Resets all shortcuts to the defaults of the selected keyboard mapping scheme.

Show commands containing
Specifies which command is selected and shows a list of all commands available in the dbForge Studio that contain the specified characters, or all commands if this edit box is empty. As you type a complete word, the result list displays all entries containing the typed word. For example, you can enter save, locate the command, File.Save, and see that the associated shortcut is CTRL+S.

Shortcut(s) for selected command
Lists mapped shortcuts for the command selected in the Show commands containing list. Some commands have more than one mapped shortcut.

Remove
Removes the selected shortcut key combination.

Use new shortcut in
Specifies the scope of the shortcut key. For example, you can use the shortcut key globally in the dbForge Studio or only within a specific context (or window); Global is the default setting. If you choose a specific context, the shortcut key remains in effect only while the context is active. If you choose Global, the shortcut key works in any active window in the dbForge Studio, unless the same shortcut is mapped in another editor, in which case the editor overrides the shortcut.

Press shortcut key(s)
Allows you to press a key combination to be used for the currently selected command. You must use one or more modifier keys such as CTRL, ALT, or SHIFT. The modifier keys appear in the order in which you press them. For example, pressing CTRL, then SHIFT, and then F2 creates the shortcut key, CTRL+SHIFT+F2. You can enter one or two key combinations that include a modifier key. For example, you can enter CTRL+Y, or enter CTRL+Y, CTRL+W. Use BACKSPACE to delete the whole shortcut key combination at one time.

Note

The following keys cannot be assigned: ALT, SHIFT, or CTRL without another key; ESC, PRINT SCRN/SYS RQ, SCROLL LOCK, PAUSE/BREAK, TAB, CAPS LOCK, INSERT, HOME, END, PAGE UP, PAGE DOWN, Windows logo keys, Application key, any of the ARROW keys, or ENTER; NUM LOCK, DEL, or CLEAR on the numeric keypad; or CTRL+ALT+DELETE.

Assign
Binds the new key combination to the selected command in the Keyboard mapping scheme displayed. The new assignment is added to the Shortcut(s) for selected command list and you can specify multiple key combinations for one command. This button is active after you type a key combination in the Press shortcut key(s) box. If you attempt to bind a key in the [Default Settings] scheme, you are prompted to make a copy of the scheme and give it a name.

Note

Changes made using the Assign button are not canceled if you click the Cancel button.

Shortcut currently used by
Displays the command to which the key combination is currently assigned. Appears only when you assign a key or key combination that is already assigned. To replace the shortcut with a custom shortcut key combination you must define a new Keyboard mapping scheme.

See Also

Environment Options

Output, Environment, Options Dialog Box


Shortcuts Table, Keyboad Options

Use this window to view all shortcuts applied to the commands within the selected keyboard mapping scheme.

Search box
To quickly find a required command or shortcut, enter characters available in the required command or shortcut. Only commands or shortcuts, which names contain the enered characters, will be shown in the list.

Group by context
Click to group commands by context.

Print
Click to print out the shortcuts table.

Command
Lists all available commands.

Shortcut
Lists command shortcuts.

Context
Lists command contexts.

See Also

Keyboard, Environment, Options Dialog Box

Environment Options


Output, Environment, Options Dialog Box

Use Options window to adjust dbForge Studio behavior to your needs. To access this dialog box, select Options from the Tools menu and choosing the Output page from the Environment folder.

Settings

Show time for output events
If selected, the time stamp is added at the beginning of every line in the Output window.

SQL Log

Write queries sent by program to the SQL Log
Allows to log all the queries sent by program to a database.

Event Tracing

Log application errors
Check this option to write all errors and processes that took place during the application work to a file. This file is placed in the directory with the application executable file.
It can help a user to provide more detailed information on the encountered problem to the developers so that they are able to reproduce and fix the problem faster. If you have encountered an error and are going to send us an error report, this file will be attached to the letter with the error report.

Delete application log after closing
Clear this check box if you want the application log be available after application closing.

See Also

Environment Options

Documents, Environment, Options Dialog Box


Documents, Environment, Options Dialog Box

Use the Options window to adjust the dbForge Studio behavior to your needs.

In This Section

SQL Documents Dialog Box
Describes options available for SQL document view.

Object Editors Dialog Box
Describes options available for Object editors view.

Categories
Describes options available for window coloring.

Restore
Describes options available for automatic files saving.

Execution History
Describes options available for query execution history.

Execution Warnings
Describes options available for execution warnings.

Notifications
Describes options available for query execution notifications.

See Also

Environment Options

Project, Environment Options Dialog Box


SQL Documents Dialog Box

The SQL Documents subsection of Environment Documents of the Options window contains the following options:

Default SQL Document View Layout

One main document view
All views corresponding to the opened SQL document are visible. You can activate the needed view by clicking the corresponding tabs.

All views tabbed
Only one view corresponding to the document is visible, all others are tabbed. Click the needed tab for the corresponding view to be shown on the screen.

Note

You can also change the document view layout from the shortcut menu that can be called from the lower part of the document view.

Show Data view for every SQL document
Check this option for the Data View tab to be displayed for every opened or newly created SQL document.

Activate Data editor after query execution
Check this option to focus on the Data editor after a query is executed. If this option is unchecked, focus stays in the Text view.

Redirect data to Data window if Data view is closed
If this option is checked, data returned after query execution is displayed into the Data window if the Data view is closed.

See Also

Documents, Environment, Options Dialog Box

Object Editors Dialog Box


Categories

The Categories subsection of Environment Documents of the Options window contains the following options:

Document categories
Displays the list of available document categories.

Name
Category name.

Shape
Category shape.

Color
Category color.

New Category
Adds a new category to the list.

Delete Category
Deletes a selected category.

Reset to Default
Resets all changes to defaults.

See Also

Environment Options

SMTP, Environment, Options Dialog Box


Restore

Use this window to customize the automatic file saving.

Settings

Save restore information every ... min
Set the time after which the data will be saved automatically.

Restorable file types

SQL files (*.sql)
If checked, the *.sql files will be saved automatically.

Text files
If checked, the text files will be saved automatically.

XML files
If checked, the XML files will be saved automatically.

Master-Detail files
If checked, the master-detail files will be saved automatically.

Reports
If checked, the report files will be saved automatically.

Database diagrams
If checked, the database diagrams will be saved automatically.

Data comparison files
If checked, the data comparison files will be saved automatically.

Schema comparison files
If checked, the schema comparison files will be saved automatically.

See Also

Documents, Environment, Options Dialog Box

SMTP, Environment, Options Dialog Box


Execution History

Use the window customize saving of the query execution history.

Enable history
Select to start collecting query execution history.

Store executed queries within XX days
Select the check box to start sorting executed queries. Use the spin box to type or select the number of days to store executed queries.

Max script size, KB
Specify the maximum script size in kilobytes.

Show history at startup from:
Select the time frame to show query execution history at startup of the Execution History window. Available values are: the last day, the last week, the last month, the last quarter.

Folder to store
Specify path to folder to store database of executed queries.

Clear execution history
Click to clear the execution history.

Reset Page Defaults
Click this button to reset settings on this page to the default ones.

See Also

Documents, Environment, Options Dialog Box

Advanced


Execution Warnings

Use this window to customize execution warnings.

Max script size to analyze: XX KB
Configure the maximum script size (in kilobytes) in this text box.

Category
Lists categories to customize the notification rules. The categories can be customized on the Categories dialog box.

TRUNCATE
Select under the requited category to check TRUNCATE statements for errors.

DELETE
Select under the requited category to check DELETE statements for errors.

UPDATE
Select under the requited category to check UPDATE statements for errors.

See Also

Notifications

Documents, Environment, Options Dialog Box


Notifications

Use the dialog box to customize query execution notifications.

Notify if query execution exceeds XX sec|
Select this box to enable query execution notifications if the query execution exceeds a preset amount of time in seconds. Use up and down arrows to configure the desired amount of time in seconds

Notify if execution contains open transactions
Select this box to enable notifications if query execution contains open transactions.

Notification duration
Use up and down arrows to configure the amount of time in seconds during which the notification message will be shown.

See Also

Projects, Environment Options Dialog Box

Documents, Environment, Options Dialog Box


Projects, Environment Options Dialog Box

Use the Options window to adjust dbForge Studio behavior to your needs. To open it, select Options from the Tools menu.

Options

Project location
Set default folder for storing your projects here.

See Also

Environment Options

SMTP, Environment, Options Dialog Box


SMTP, Environment, Options Dialog Box

Use the Options window to adjust dbForge Studio behavior to your needs. To open it, select Options from the Tools menu.

Options

From address
Specify the sender address in this field.

SMTP server
Specify the SMTP server in this field.

Port
Specify the port here.

Timeout (seconds)
Specify the timeout in seconds.

Enable SSL
Check to enable SSL.

Requires authentication
Check to enable authentication process.

Name
Specify the name for authentication here.

Password
Specify the password here.

See Also

Environment Options

Web Browser, Environment, Options Dialog Box


Web Browser, Environment, Options Dialog Box

Use the Options window to adjust dbForge Studio behavior to your needs. To access this dialog box, select Options from the Tools menu and choosing the Web Browser page from the Environment folder.

Settings

Home page
Set here a home page for dbForge Studio web browser. It opens when you call dbForge Studio web browser window or click Home button on Web toolbar.

Use default
Use the product home page.

Search page
Set here a search page for dbForge Studio web browser. It opens when you click Online Search button on Web toolbar.

Use default
Use Google as a search page.

See Also

Environment Options

Options


Schema Comparison Options

This section describes schema comparison options.

In This Section

General, Schema Comparison Options Dialog Box
Describes the tab where you can customize text comparer settings for schema comparison.

See Also

Text Editor Options

Options


General, Schema Comparison Options Dialog Box

Use the Options window to adjust dbForge Studio behavior to your needs. To open it, go to the Tools menu, and then select Options... Then go to the Schema Comparison node.

The General section of the Schema Comparison node contains the following options:

Text Comparer

Internal
Use internal dbForge Studio comparer. Text comparer will be displayed at the bottom of the Schema Comparison Document.

Araxis Merge
Use Araxis Merge. This option is available only if Araxis Merge 2001 or higher is installed.

Custom
Use a custom comparer. You should set Comparer Location and Command Line Arguments to use this option.

Comparer Location
Specify the comparer executable file here.

Command Line Arguments
Specify command line arguments for the comparer call. You may use the following predefined arguments:

· %file1% - full name with a path of the first file to compare.
· %file2% - full name with a path of the second file to compare.
· %title1% - title for the first comparison pane.
· %title2% - title for the second comparison pane.

Enable 'Sort columns and constraints alphabetically'
Click the option to sort columns and constraints in alphabetical order.

See Also

Schema Comparison Options

Options


Text Editor Options

The Text Editor options in the Options dialog box provide a variety of ways to customize the performance and appearance of the editor.

In This Section

General, Text Editor, Options Dialog Box
This dialog box lets you change global settings for the dbForge Studio.

Tabs, Text Editor, Options Dialog Box
This dialog box allows you to change the default behavior of the Code Editor.

Advanced, Text Editor, Options Dialog Box
This dialog box describes how to set up tabulation and indenting editor preferences.

Font & Colors, Text Editor, Options Dialog Box
This dialog box allows you to change the default setting for a custom font and color scheme for various user interface elements.

Code Completion
This section describes statement completion options available in dbForge Studio.

Print, Text Editor, Options Dialog Box
This dialog box allows you to change default printing options.

Formatting
This section describes code formatting options available in dbForge Studio.

See Also

Data Comparison Options

Options


General, Text Editor, Options Dialog Box

This dialog box lets you change global settings for the Code and Text. To display this dialog box, click Options on the Tools menu, expand the Text Editor node, and then click General.

Settings

Virtual whitespace
When selected, it allows you to move the cursor beyond the physical end of a line of text into character spaces that do not exist. If you move your cursor out into this area and begin typing, the void between your current position and the end of the last word is automatically filled with space characters. When this setting is not selected, you cannot move the cursor beyond the last character in a line.

Bracket matching
If selected, dbForge Studio for MySQL finds a corresponding bracket for the one that is currently near the cursor.

Display

Line numbers
Displays line numbers in the left of Text view of a document.

Indicator margin
Reveals the indicator margin on the left of Text view of a document.

Vertical scroll bar
Shows or hides a vertical scrollbar in Text view of a document.

Horizontal scrollbar
Shows or hides horizontal scrollbar in Text view of a document.

Navigation bar
Check this option to enable a navigation bar. It can be useful if you have a large amount of CREATE TABLE instances in your script and you need to navigate between columns and tables in it.

Hide if empty
Check this option to show navigation bar only when two or more objects are created. If only one object is created in a SQL statement the bar remains hidden as it is not needed.

See Also

Tabs, Text Editor, Options Dialog Box


Tabs, Text Editor, Options Dialog Box

This dialog box allows you to change the default behavior of the Code Editor. To display this dialog box, click Options on the Tools menu, expand the Text Editor node, and then click Tabs.

Indenting

None
When selected, no automatic indenting occurs when you press ENTER to move to a new line of text, and the cursor is placed at the first column of the next line.

Block
When selected and you press ENTER, the new line of text is automatically indented to the same tab stop as the line preceding it.

Smart
When selected, new lines of text are automatically indented taking into account selecting formatting options.

Tabs

Tab size
Sets the distance in spaces between tab stops. The default is 2 spaces.

Indent size
Sets the size in spaces of an automatic indentation. The default is 2 spaces. Tab characters, space characters, or both will be inserted to fill the specified size.

Insert spaces
When selected, indent operations insert only space characters, not TAB characters. If the Indent size is set to 5, for example, then five space characters are inserted whenever you press the TAB key or the Increase Indent button on the Formatting toolbar.

Keep tabs
When selected, indent operations insert as many TAB characters as possible. Each TAB character fills the number of spaces specified in Tab size. If the Indent size is not an even multiple of the Tab size, space characters are added to fill in the difference.

See Also

Text Editor Options

Font & Colors, Text Editor, Options Dialog Box


Advanced, Text Editor, Options Dialog Box

Use the Options window to adjust dbForge Studio behavior to your needs. To open it, select Options from the Tools menu.

The Advanced section of the Text Editor options allows you to setup outlining and SELECT statement highlighting. You can use the following options:

Outlining

Enter outlining mode when files open

If selected, outlining is enabled when you open a file.

Collapse --region blocks when files open

If selected, --region blocks in an opened file will be collapsed.

Syntax highlighting

Highlight SELECT statements

If selected, a frame will be drawn around SELECT statements.

Underline errors in the editor

If selected, syntax errors will be underlined with a red curved line.

See Also

Code Completion Options


Font & Colors, Text Editor, Options Dialog Box

The Fonts and Colors page of the Options dialog box lets you establish a custom font and color scheme for various user interface elements in the dbForge Studio. To access this dialog box, click Options on the Tools menu, and then select the Font &Colors page in the Text Editor folder.

Font (bold type indicates fixed-width fonts)
Lists all the fonts installed on your system. Fixed fonts appear in bold.

Size
Specify the size of the font for the selected display item here.

Use Defaults
Resets text editor font and color settings to the default values.

Display items
Select a display item here to change its font and color settings.

Brace Matching
Matching braces, for example ().

Breakpoint
Breakpoint when it is enabled.

Breakpoint (Disabled)
Breakpoint when it is disabled.

Breakpoint (Error)
Breakpoint when an error occurs.

Built-in Data Type
Built-in data type, for example, INT or VARCHAR.

Built-in Function
Built-in function, for example, COUNT.

Call Return
Source statement that indicates call return points when context is switched to a non-top stack frame when debugging.

Comment
Code comment.

Current Statement
Current code line when debugging.

Delimiter
Delimiter.

Highlight References
References.

Identifier
Identifier, such as database object name, stored procedure parameter, etc.

Keyword
SQL keyword.

Line numbers
Number for a line.

Number
Number.

Operator
Operators and separators (, ;: * + = / - . (<>!~&^%\|{})).

Plain Text
Text, when editing a file as text.

Program Block Label
Labels.

Region
Region or endregion command.

Select Marker
Frame around the select statements.

Selected Line
Line, selected in the Find Results window.

String
SQL string constant.

Variable
Variables.

Visible Whitespace
White space characters when View White Space is turned on.

XML Attribute Name
Tag attribute in XML editor.

XML Comment
Comment in XML editor.

XML Delimiter
Delimiter in XML editor.

XML String
String constant in XML editor.

XML Tag Name
XML attribute name.

XML Whitespace
White space characters in XML.

Bold
Select it to display the text of selected display items in bold.

Italic
Select it to display the text of selected display items in italic.

Item foreground
Font color of a selected display item.

Item background
Background color of a selected display item.

Sample
Sample of a display item appearance.

See Also

Text Editor Options

Printing, Text Editor, Options Dialog Box


Code Completion Options

Code Completion

This section explains statement completion options provided in the Options window.

The Code Completion section of the Text Editor options contains the following subsections:

In This Section

General, Code Completion Text Editor Options Dialog Box
Lists general code completion preferences and explains them.

Advanced, Code Completion Text Editor Options Dialog Box
Describes advanced code completion options.

Alias, Code Completion Text Editor Options Dialog Box
Describes options for aliases.

List Members, Code Completion Text Editor Options Dialog Box
Describes options for list members.

Suggestions, Code Completion, Text Editor, Options Dialog Box
Describes options for code completion.

See Also

Text Editor Options

Formatting Options


General, Code Completion Text Editor Options Dialog Box

Use the Options window to adjust dbForge Studio behavior to your needs. To open it, select Options from the Tools menu.

The General subsection of the Code Completion section of the Text Editor options allows you to setup options for automatic code formatting when typing code. Use the following options:

Settings

Enable Code Completion
Select to toggle automatic code completion. Selected by default.

Auto-list members
Toggles the display of valid databases, tables, columns, and other database objects in the suggestion box when you are typing. Selected by default.

Auto Parameter Info
Toggles the display of the Parameter Info hint when the left bracket is typed after the procedure or object method name. Selected by default.

Highlight Occurrences
Toggles identifier occurrence highlighting.

Automatically trigger after ... millisec
Defines a delay used by Code Complete to show the suggestion box after you stop typing. To change the default value, use the arrow buttons in the field or enter the value.

Refresh

Automatically refresh suggestions cache every ... minute(s)
Select this check box to enable automatic refresh within the specified interval.

See Also

Code Completion Options

Advanced, Code Completion Text Editor Options


Advanced, Code Completion Text Editor Options

Use the Options window to adjust dbForge Studio behavior to your needs. To open it, select Options from the Tools menu.

The Advanced subsection of the Code Completion section of the Text Editor options allows you to setup options for automatic code completion when typing code. The following options are available:

Qualify column name with table alias
Defines that column names should be committed with table alias.

Qualify column name (no table alias)
Defines how column names should be committed.

With table name
The name of the table the column belongs to is specified before the column name: TableName.ColumnName.
With schema name and table name
The name of the table the column belongs to and the schema name are specified before the column name: SchemaName.TableName.ColumnName.

Reverse order in 'JOIN'-condition
Applies reverse order in JOIN conditions.

Add parentheses when inserting a function
If the option is checked, parentheses are added when you insert functions.

Quote identifiers
Choose the way of identifying a quote here.

Always
If the option is enabled, all the identifiers, aliases, and database objects will be enclosed in parentheses.
If an identifier concurs with a keyword
If the option is enabled, all the identifiers, aliases, and database objects will be enclosed in parentheses, in case their names concur with reserved keywords or system objects.
If quotes are required
If the option is enabled, all the identifiers, aliases, and database objects will be enclosed in parentheses, if required. For instance, if a column name is declared with white spaces.

See Also

Code Completion Options

List Members, Code Completion Text Editor Options


Alias, Code Completion Text Editor Options Dialog Box

Use the Options window to adjust dbForge Studio behavior to your needs. To open it, select Options from the Tools menu.

The Alias subsection of the Code Completion section of the Text Editor options allows you to setup options for automatic code completion when typing code.

Note

The functionality is available in dbForge Studio for MySQL only.

You can adjust the following settings:

Generate alias on commit
Alias is generated when a table object name is committed. If this option is unchecked, all other options are disabled.

Generate aliases in UPPER case
Alias is generated using upper case characters.

Automatically generate AS clause
Alias is added using the AS clause.

Exclude following names
Check to create a list of table object names for which aliases should not be created. If this option is unchecked, the Exclude names box is disabled.

Exclude names
Add the names of table objects aliases for which should not be created to this box. You can remove a name by selecting it in the list and clicking the [image] button.

Exclude following name prefixes
Check to create a list of prefixes that should be ignored when generating aliases for table object names. If this option is unchecked, the Exclude name prefixes box is disabled.

Exclude name prefixes
Add prefixes that should be ignored when generating aliases for table object names. You can remove a prefix by selecting it in the list and clicking the [image] button.

See Also

Code Completion Options

Formatting Options


List Members, Code Completion Text Editor Options

Use the Options window to adjust dbForge Studio behavior to your needs. To open it, select Options from the Tools menu.

The List Members subsection of the Code Completion section of the Text Editor options allows you to set up options for automatic code completion when typing code. The following options are available:

Settings

Sort keywords by relevance
When selected, keywords in the suggestion box will be sorted to display the most relevant at the top of the list. It is selected by default.

Cyclic movement through the suggestion list
Check the option to scroll data through the suggestion list.

Filtering Rule

These options define how to filter the list of suggestions in the suggestion box. If neither of them is selected, dbForge Studio will display only suggestions that start with the typed character(s).

By Matching
When selected, dbForge Studio filters the list of suggestions to display those that start with the typed character(s) or contain it in the top of the list.

Camel Case
When selected, dbForge Studio filters the list of suggestions to display those that are compound word which elements are joined without spaces and start with the typed characters.

Commit selection in completion list by typing

When you type any of the symbols specified below, dbForge Studio will insert a highlighted suggestion from the suggestion box into code.

Tab
The highlighted suggestion will be inserted when you press the TAB key.

Whitespace
The highlighted suggestion will be inserted when you press the SPACE key.

Following characters
Enter characters here, and the highlighted suggestion will be inserted when you type any of the specified characters.

Add new line on enter at end of fully typed word
Cursor will be moved to the new line if you type a word completely and press ENTER.

Select items in the list even if a user input is expected
Check the option to select items from the suggestion list.

See Also

Suggestions, Code Completion, Text Editor, Options Dialog Box

Code Completion Options


Suggestions, Code Completion, Text Editor, Options Dialog Box

Use the Options window to adjust dbForge Studio behavior to your needs. To open it, select Options from the Tools menu.

General

Do not load suggestions for these databases
Select this option to exclude certain databases from the suggestion list. Specify the database names in the text box below. If you want to exclude several databases, use semicolons to separate their names.

Keep connection open
Select to keep the current connection open.

Refresh

Automatically refresh local cache every xx minute(s)
Select to automatically refresh local cache in a particular period of time. Use the up and down arrows to specify the required period of time in minutes.

See Also

Code Completion Options

Alias, Code Completion Text Editor Options Dialog Box


Print, Text Editor, Options Dialog Box

This dialog box allows you to change default printing options. To access this dialog box, click Options on the Tools menu, and then select the Printing page in the Text Editor folder.

Settings

Print header
Check it to print the document name.

Print line numbers
Check it to print line numbers in the document.

Print white space
Check it to print white space symbols, tabulation symbols, and symbols of line breaks.

See Also

Text Editor Options

Advanced, Text Editor Options Dialog Box


Formatting Options

This section explains code formatting options provided in the Options window. The Formatting section of the Text Editor options contains the following subsections:

In This Section

General, Formatting, Text Editor Options Dialog Box
Lists general code formatting preferences and explains them.

Profiles, Formatting, Text Editor Options Dialog Box
Describes options to customize case formatting profiles.

See Also

Text Editor Options

Data Editor Options


General, Formatting, Text Editor Options Dialog Box

Use the Options window to adjust dbForge Studio behavior to your needs. To open it, select Options from the Tools menu, expand the Text Editor node, and in the Formatting node click General.

Settings

The General subsection of the Text Editor Formatting section allows you to setup options for automatic code formatting when typing code. You can use the following options:

Automatically format on paste
If checked, pasted code will be automatically formatted. Selected by default.

Automatically format completed statement on delimiter
If checked, code will be automatically formatted when the delimiter is entered (semicolon or backslash). Selected by default.

Automatically format while typing
If the option is checked, code formatting while typing statement elements in SQL editor is supported. Start typing first letters for the required statement, and press TAB or a space to see the result. All objects and keywords are formatted in correspondence with formatting active profile settings. By default, the option is selected.

Right Margin
Line breaks will be inserted automatically after the Right Margin number of characters on a line. 80 is by default.

Put syntax errors to Output window
Select it if you want syntax errors to be redirected to the Output window.

Show syntax error notification window
Select it if you want the syntax error notification window to appear upon formatting a document.

Dictionary file
Specify file with dictionary to adjust formatting to your needs. You can use default dictionary or create a new one. Also you can modify the existing dictionary. This dictionary is used to format identifiers when the Text Case -> Identifier Case option is set to Initial Caps each word.

Available prefixes
Specify prefixes here. If one of the prefixes is used in a word, the application looks in the dictionary for the word that is used after the prefix. If the word is found, its first letter is written in uppercase. These prefixes can be used to format identifiers when the Text Case -> Identifier Case option is set to Initial Caps each word.

Reset Page Defaults
Resets all options on this page to their default values.

See Also

Formatting Options

Profiles, Formatting, Text Editor Options Dialog Box


Profiles, Formatting, Text Editor Options Dialog Box

Use the Profiles option to customize code formatting provided by dbForge Studio. To access it, go to Tools menu, select Options, and then click Text Editor. Navigating to Formatting, click Profiles.

Formatting Profiles

Select a profile from the table.

Name
Profile name.

File
Profile file name.

Edit Profile
Opens the Edit Profile Options window that allows editing options available in the profile.

New Profile
Opens the New Profile window to create a new formatting profile.

Activate
Click to activate the selected profile.

Show in Folder
Opens folder containing the selected profile.

Shortcut Menu

Edit Profile
Click to open the Edit Profile window.

Reset To Defaults
Click to reset settings to the default values.

Activate
Activates the selected profile.

Rename
Click to change the profile name.

Show In Folder
Opens folder containing the file in Windows Explorer.

Copy File Path
Copies file path to the clipboard.

Delete
Click to delete selected formatting profile.

See Also

Formatting Options

Data Editor Options


Edit Profile, Formatting Options

Use this window to edit formatting options in the selected formatting profile.

Edit Profile Window

Filter
Allows to quick search the needed options/option groups.

Collapse/Expand all option groups
Click to expand/collapse the option groups tree.

Show white spaces button
Click to toggle white spaces in the formatting profile editor.

Show Original Sample
Click to restore the code sample to its original state.

Format Text
Formats code according to the selected options.

Options tree
Includes various code formatting options. Allows customizing default text formatting options the way user likes.

Code field
Shows how the code looks like after choosing the corresponding text formatting options.

Edit Profile Shortcut Menu

Format Selection
Formats selected code according to the chosen options.

Cut
Cuts selected text and places it to the clipboard.

Copy
Copies selected text to the clipboard.

Paste
Pastes the clipboard content into the cursor position.

See Also

Profiles, Formatting, Text Editor Options Dialog Box

New Profile, Formatting Options


New Profile, Formatting Options

Use this window to create and add new formatting profile to the list of profiles.

New Profile Window

Name
Specify the new profile name here.

Copy settings from
Select an existing profile to copy settings from.

File Path
Set the path to save your new formatting profile.

Set Active
Activate this profile in the Profiles, Options Dialog Box.

See Also

Profiles, Formatting, Text Editor Options Dialog Box

Data Editor Options


Data Comparison Options

In This Section

General, Data Comparison, Options Dialog Box
This dialog box allows you to change the default behavior of the Data Comparison.

See Also

Data Editor Options

Options


General, Data Comparison, Options Dialog Box

This dialog box lets you change global settings for the Data Comparison. To display this dialog box, click Options on the Tools menu, expand the Data Comparison node, and then click General.

Settings

The Data Comparison General section of the Options window contains the following options:

Cache Folder
Allows selecting a directory to store temporary data needed during the comparison process.

Windows Temporary Folder
Check to store temporary files to the windows temporary folder.

Custom Folder
Check this option to store temporary files in a custom folder. To choose a folder, click the Browse... button.

See Also

Data Comparison

Options


Data Editor Options

The Data Editor options in the Options dialog box provide a variety of ways to customize the performance and appearance of the editor.

In This Section

General, Data Editor, Options Dialog Box
Use the Options window to adjust the products behavior to your needs.

Font & Colors, Data Editor, Options Dialog Box
The Fonts and Colors page of the Options dialog box lets you establish a custom font and color scheme for Data Editor.

Printing, Data Editor, Options Dialog Box
This dialog box allows you to change default printing options.

Formatting, Data Editor, Options Dialog Box
Use the Options window to adjust the products behavior to your needs.

See Also

Generate Schema Script Options

Options


General, Data Editor, Options Dialog Box

Use the Options window to adjust the products behavior to your needs. To access this dialog box, select Options from the Tools menu and choosing the General page from the Data Editor folder.

The Data Editor General section of the Options window contains the following options:

Settings

Automatically adjust column width
Automatically adjusts column width for every data grid.

Use cached updates mode by default
If selected, cached updates mode will be enabled by default in data view of every SQL document created.

Use paginal mode by default
If selected, paginal mode will be enabled by default in data view of every SQL document created.

Initial page size
Default page record count for paginal mode for data view.

Use auto-search mode by default
Activates auto-search in Data view by default.

Show row numbers
Adds a column with row numbers (#) to the data editor grid.

Data Editing

Open Data Editor in the editing mode
Select to open the Data Editor is opened in the editing mode by default.

Open Data Editor in the read-only mode
Select to open the Data Editor is opened in the read-only mode by default.

Show a dialog window to choose a mode
Select to invoke a dialog window asking to choose the mode in which Data Editor should be opened (editing or read-only).

See Also

Data Editor

Font & Colors, Data Editor, Options Dialog Box


Font & Colors, Data Editor, Options Dialog Box

The Fonts and Colors page of the Options dialog box lets you establish a custom font and color scheme for Data Editor. You can access this dialog box by clicking Options on the Tools menu, and then selecting the Font &Colors page in the Data Editor folder.

Options

Data Editor Font & Colors section of the Options window contains the following options:

Font
Select a font for the selected display item here.

Size
Specify a font size for the selected display item here.

Use Defaults
Click this button to reset specified font and color settings to the default values.

Display items
Select a display item here to change its background and foreground color settings.

Item foreground
Select a font color for the selected display item.

Item background
Select a background color for the selected display item.

Enable style for even rows
Check the option to apply the style settings for all even rows.

Enable style for odd rows
Check the option to apply the style settings for all odd rows.

Sample
Preview the display item appearance here.

See Also

Data Editor

Printing, Data Editor, Options Dialog Box


Printing, Data Editor, Options Dialog Box

This dialog box allows you to change default printing options. You can access this dialog box by clicking Options on the Tools menu, and then selecting the Printing page in the Data Editor folder.

General

Auto width
Select to fit the printed data to the page width.

Grid

Print horizontal lines
Select to print grid horizontal lines.

Print vertical lines
Select to print grid vertical lines.

Card

Print card captions
Select to prints card captions.

Print empty fields
Select to prints card empty fields.

See Also

Data Editor

Formatting, Data Editor, Options Dialog Box


Formatting, Data Editor, Options Dialog Box

Use the Options window to adjust the products behavior to your needs. You can access this dialog box by clicking Options on the Tools menu, and then selecting the Formatting page in the Data Editor folder.

DateTime Format

Data type
Select either Date or DateTime format here.

Edit format
Set the datetime format here. It can be one of the predefined formats or custom format. Predefined formats are described below. The following table contains all available format specifiers and their description.

Format Specifier

Description

d

A placeholder for the day of the month. If the day is a single digit only (1-9), then it's displayed as a single digit.

Note that if the 'd' specifier is used alone, without other custom specifiers, it's interpreted as the standard mask (short date pattern). If the 'd' specifier is passed with other custom specifiers or the '%' character, it's interpreted as a custom mask specifier.

dd

A placeholder for the day of the month. If the day is a single digit only (1-9), it is formatted with a preceding 0 (01-09).

ddd

Displays the abbreviated name of the current day.

The value represented by this specifier cannot be edited.

dddd (plus any number of additional "d" characters)

Displays the full name of the current day.

The value represented by this specifier cannot be edited.

f

A placeholder for seconds fractions represented in one digit.

Note that if the 'f' specifier is used alone without other custom specifiers, it's interpreted as the standard mask (full date/time pattern ). If the 'f' specifier is passed with other custom specifiers or the '%' character, it's interpreted as a custom mask specifier.

ff

A placeholder for seconds fractions represented in two digits.

fff

A placeholder for seconds fractions represented in three digits.

ffff

Displays seconds fractions represented in four digits.

The value represented by this specifier cannot be edited.

fffff

Displays seconds fractions represented in five digits.

The value represented by this specifier cannot be edited.

ffffff

Displays seconds fractions represented in six digits.

The value represented by this specifier cannot be edited.

fffffff

Displays seconds fractions represented in seven digits.

The value represented by this specifier cannot be edited.

g

Displays the era (A.D. for example) for the current date/time value.

The value represented by this specifier cannot be edited.

h

A placeholder for the hour part of the date/time value in the range 1-12.

hh

A placeholder for the hour part of the date/time value in the range 1-12. This pattern inserts two placeholders to enter a value. If a single digit is entered it is preceded with a '0'.

H

A placeholder for the hour part of the date/time value in the range 0-23.

HH

A placeholder for the hour part of the date/time value in the range 0-23. This pattern inserts two placeholders to enter a value. If a single digit is entered it is preceded with a '0'.

m

A placeholder for the minutes of the date/time value in the range 0-59.

mm

A placeholder for the minutes of the date/time value in the range 0-59. This pattern inserts two placeholders to enter a value. If a single digit is entered it is preceded with a '0'.

M

A placeholder for the month in this position, measured as a number in the range 1-12.

MM

A placeholder for the month in this position, measured as a number in the range 1-12. This pattern inserts two placeholders to enter a value. If a single digit is entered it is preceded with a '0'.

MMM

A placeholder for the abbreviated name of the month.

MMMM

A placeholder for the full name of the month.

s

A placeholder for the seconds part of the date/time value in the range 0-59.

Note that if the 's' specifier is used alone without other custom specifiers it's interpreted as the standard mask (sortable date/time pattern). If the 's' specifier is passed with other custom specifiers or the '%' character, it's interpreted as a custom mask specifier.

ss

A placeholder for the seconds part of the date/time value in the range 0-59. This pattern inserts two placeholders to enter a value. If a single digit is entered it's preceded with a '0'.

t

A placeholder for the first character of the A.M./P.M. designator of the date/time value.

Note that if the 't' specifier is used alone without other custom specifiers it's interpreted as the standard mask (short time pattern). If the 't' specifier is passed with other custom specifiers or the '%' character, it's interpreted as a custom mask specifier.

tt

A placeholder for the A.M./P.M. designator of the date/time value.

y

A placeholder for entering the last two digits of the year of the date/time value.

Note that if the 'y' specifier is used alone without other custom specifiers, it's interpreted as the standard mask (year month pattern). If the 'y' specifier is passed with other custom specifiers or the '%' character it's interpreted as a custom mask specifier.

yy

A placeholder for entering the last two digits of the year of the date/time value. This pattern inserts two placeholders to enter a value. If a single digit is entered it is preceded with a '0'.

yyyy

A placeholder for entering the year part of the date/time value including the century.

z

Displays the time zone offset for the system's current time zone in whole hours only. The offset is always displayed with a leading sign (zero is displayed as "+0"), indicating how many hours ahead of Greenwich mean time (+) or hours behind Greenwich mean time (-) the current time zone is. The range of values is -12 to +13. If the offset is a single digit (0-9), it's displayed as a single digit with an appropriate leading sign.

The value represented by this specifier cannot be edited.

zz

Displays the time zone offset for the system's current time zone in whole hours only. The offset is always displayed with a leading or trailing sign (zero is displayed as "+00"), indicating how many hours ahead of Greenwich mean time (+) or hours behind Greenwich mean time (-) the current time zone is. The range of values is -12 to +13. If the offset is a single digit (0-9), it's formatted with a preceding 0 (01-09) with an appropriate leading sign.

The value represented by this specifier cannot be edited.

zzz

Displays the time zone offset for the system's current time zone in hours and minutes. The offset is always displayed with a leading or trailing sign (zero is displayed as "+00:00"), indicating how many hours ahead of Greenwich mean time (+) or hours behind Greenwich mean time (-) the current time zone is. The range of values is -12:00 to +13:00. If the offset is a single digit (0-9), it's formatted with a preceding 0 (01-09) with an appropriate leading sign.

The value represented by this specifier cannot be edited.

:

Time separator.

/

Date separator. The actual date separator is determined by the DateTimeFormatInfo.DateSeparator property of the current culture.

"abc" or 'abc'

Quoted string. Inserts the string enclosed with single or double quotes literally to the edit box. The string cannot be edited.

%c

Where c is one of the standard mask specifiers, makes the specifier be interpreted as a custom mask specifier.

Note that if a mask specifier is used alone as a single character, it's interpreted as a standard mask specifier. Only mask specifiers consisting of two or more characters are interpreted as custom specifiers. In order to use a custom specifier on its own which matches one of the standard specifiers it should be preceded with the % character.

\c

The backslash is used as the escape character. It inserts the following character literally to the edit box.

Any other characters

The other characters are inserted to the edit box literally.

Predefined Formats
You can choose one of the predefined datetime formats here. The following table contains their descriptions and samples.

Standard Mask | Name | Sample. Culture: English (USA)
d | Short date | 8/20/2007
D | Long date | Monday, August 20, 2007
t | Short time | 10:23 AM
T | Long time | 10:23:35 AM
f | Full date/time (short time) | Monday, August 20, 2007 10:23 AM
F | Full date/time (long time) | Monday, August 20, 2007 10:23:35 AM
g | General date/time (short time) | 8/20/2007 10:23 AM
G | General date/time (long time) | 8/20/2007 10:23:35 AM
M or m | Month day | August 20
R or r | RFC1123 | Mon, 20 Aug 2007 10:23:35 GMT
s | Sortable date/time | 2007-08-20T10:23:35
u | Universal sortable date/time | 2007-08-20 10:23:35Z
Y or y | Year month | August, 2007

Test Input
The last date of test input is displayed.

See Also

Data Editor

Options


Generate Schema Script Options

This section describes DDL generation options.

In This Section

General, Generate Schema Script Options Dialog Box
Describes general options for the DDL generation.

CRUD
Describes options for the CRUD generation.

See Also

Copy Databases Options

Options


General, Generate Schema Script Options Dialog Box

Use the Options window to adjust dbForge Studio behavior to your needs. To open it, select Options from the Tools menu. Then go to the Generate Schema Script node.

The General subsection of the Generate Schema Script node contains the following options:

Settings

Database Backup Wizard
Select to set options for Database Backup wizard.

Generate Script Wizard
Select to set options for Generate Script wizard.

New Project Wizard
Select to set options for New Project wizard.

Options affecting a database

Options to affect a database in the backup process.

Flush logs
Closes and reopens all log files before backup.

Lock all tables for read (Flush Read Locks)
All tables are locked with FLUSH READ LOCKS. This option is necessary to create a consistent snapshot of your MyISAM tables.

Use a single transaction
The backup will be executed in a single transaction. This option is necessary to create a consistent snapshot of your InnoDB tables.

General

Contains general settings for DDL generating.

Exclude DEFINER and SQL SECURITY clauses
Select to exclude DEFINER and SQL SECURITY clauses from the DDL generation.

Format the script
Select to format any DDL text. Otherwise, DDL text will have the same formatting as in database.

Generate comments in the script
Select to insert comments in the DDL.

Include CASCADE CONSTRAINTS option
Select to include CASCADE CONSTRAINTS option.

Include CREATE DATABASE statement
Includes CREATE DATABASE statement at the beginning of the export script.

Include DROP statement
Select to include DROP statements in the DDL.

Include IF EXISTS in DROP statement
Select to include IF EXISTS in DROP statements in the DDL.

Include IF NOT EXISTS in CREATE statement
Select to include IF NOT EXISTS in CREATE TABLE, CREATE DATABASE, and CREATE USER (as of MySQL 5.7.6) statements in the DDL.

Include PURGE option
Select to include PURGE option in the script.

Include USE statement
Includes USE DATABASE statement at the beginning of the export script. Depends on "Include CREATE DATABASE" option.

Prefix object names with a database name
Select to prefix object names with a schema name in the script.

Reset timestamp to CURRENT_TIMESTAMP for events
Select to reset event start time to CURRENT_TIMESTAMP in DDL.

Use CREATE OR REPLACE
Select to use CREATE OR REPLACE instead of create for DDL of views.

Tables/Views

Contains settings for generating DDL of tables and views.

Disable constraints
Determines whether to add ALTER TABLE ... DISABLE KEYS statement before INSERT statements.

Disable foreign keys
Select to disable foreign key checks before creating a table.

Exclude column default values
Select to exclude column default values from the DDL.

Include additional object options
Select to include such options as row format, table autoincrement value etc.

Include constraints
Select to include constraints for the tables in the DDL.

Include indexes
Select to include indexes for the tables in the DDL.

Include object comments
Select to include comments for objects in the script.

Include triggers
Select to include triggers for the tables in the DDL.

Partitioning

Contains settings for generating DDL of partitioned database objects.

Include partition clause
Select to include PARTITION clause in DDL.

Include partition ENGINE
Select to include partition engine in DDL.

List individual hash partitions
Select to list individual hash partitions in DDL.

Backup structure

Options to control content of backup script.

Exclude column default values
Select to exclude column default values from the DDL.

Exclude DEFINER and SQL SECURITY clauses
Select to exclude DEFINER and SQL SECURITY clauses from the DDL generation.

Include additional object options
Select to include such options as row format, table autoincrement value etc.

Include constraints
Select to include constraints for the tables in the DDL.

Include indexes
Select to include indexes for the tables in the DDL.

Include object comments
Select to include comments for objects in the script.

Include partition clause
Select to include PARTITION clause in DDL.

Include partition ENGINE
Select to include partition engine in DDL.

Include triggers
Select to include triggers for the tables in the DDL.

List individual hash partitions
Select to list individual hash partitions in DDL.

Reset timestamp to CURRENT_TIMESTAMP for events
Select to reset event start time to CURRENT_TIMESTAMP in DDL.

Use CREATE OR REPLACE
Select to use CREATE OR REPLACE instead of create for DDL of views.

Data backup

These options are available for Database Backup Wizard setting only and allow manipulating generation of DML statements.

Disable constraints
Determines whether to add ALTER TABLE ... DISABLE KEYS clause before INSERT statements.

Disable foreign keys
Select to disable foreign key checks before creating a table.

Include column names into INSERT statements
Includes column names into INSERT statements.

Insert COMMIT after every <x> statements
Inserts the COMMIT statement after each defined number of INSERT statements. You can set this number by clicking [image] button and entering the number.

Lock tables
Locks a table for write before inserting data and unlocks it when the data inserted.

Place data just after table definition
Places INSERT statements for the table data after CREATE statement for this table. Otherwise, all INSERT statements will be placed after all DDL statements.

Use bulk insert
Uses INSERT statements that insert more than one table row per statement.

Use HEX for binary
Exports BINARY data in hexadecimal form instead of text string.

Use INSERT DELAYED
Uses INSERT DELAYED instead of INSERT.

Users

Contains settings for generating DDL of users.

Include an encrypted password
Select to include an encrypted password in the script.

Include global grants
Select to include global grants for users in the DDL.

Include object grants
Select to include any object grants for users in the DDL.

Include user information
Select to include CREATE USER statements in the DDL. This option is available for Database Backup Wizard profile only.

See Also

CRUD

Generate Schema Script Options


CRUD

This section describes the CRUD generation options.

In This Section

General, CRUD, Generate Schema Script, Options Dialog Box
Describes general options for the CRUD generation.

Select, CRUD, Generate Schema Script, Options Dialog Box
Describes options for the Select part of the CRUD operation.

Insert, CRUD, Generate Schema Script, Options Dialog Box
Describes options for the Insert part of the CRUD operation.

Update, CRUD, Generate Schema Script, Options Dialog Box
Describes options for the Update part of the CRUD operation.

Delete, CRUD, Generate Schema Script, Options Dialog Box
Describes options for the Delete part of the CRUD operation.

See Also

Master-Detail Options

Generate Schema Script Options


General, CRUD, Generate Schema Script, Options Dialog Box

Use this window to adjust database diagram behavior to your needs. To open it, select Options from the Tools menu. Then, expand the Generate Schema Script node, and go to the CRUD node.

The General section of the CRUD node allows you to customize general CRUD generation settings. It contains the following options:

Include Insert Procedure
Select to include the Insert procedure into the CRUD generation.

Include Select Procedure
Select to include the Select procedure into the CRUD generation.

Include Update Procedure
Select to include the Update procedure into the CRUD generation.

Include Delete Procedure
Select to include the Delete procedure into the CRUD generation.

Columns Order

By Ordinal Number
Select to group columns by ordinal number.

Alphabetically
Select to group columns alphabetically.

See Also

Select, CRUD, Generate Schema Script, Options Dialog Box

CRUD


Select, CRUD, Generate Schema Script, Options Dialog Box

Use this window to adjust database diagram behavior to your needs. To open it, select Options from the Tools menu. Then, expand the Generate Schema Script node, and go to the CRUD node.

The Select section of the CRUD node allows you to customize the Select part of the CRUD operation. It contains the following options:

Select procedure name template
Configure name template of the Select procedure in this text box.

Select procedure code template
Configure code template of the Select procedure in this text box.

Return all data if input parameters are null
Select to return all data if input parameters are null.

See Also

Insert, CRUD, Generate Schema Script, Options Dialog Box

CRUD


Insert, CRUD, Generate Schema Script, Options Dialog Box

Use this window to adjust database diagram behavior to your needs. To open it, select Options from the Tools menu. Then, expand the Generate Schema Script node, and go to the CRUD node.

The Insert section of the CRUD node allows you to customize the Insert part of the CRUD operation. It contains the following options:

Insert procedure name template
Configure name template of the Inset procedure in this text box.

Insert procedure code template
Configure code template of the Insert procedure in this text box.

Return inserted row
Select to return inserted row.

See Also

Update, CRUD, Generate Schema Script, Options Dialog Box

CRUD


Update, CRUD, Generate Schema Script, Options Dialog Box

Use this window to adjust database diagram behavior to your needs. To open it, select Options from the Tools menu. Then, expand the Generate Schema Script node, and go to the CRUD node.

The Update section of the CRUD node allows you to customize the Update part of the CRUD operation. It contains the following options:

Update procedure name template
Configure name template of the Update procedure in this text box.

Insert procedure code template
Configure code template of the Update procedure in this text box.

Return inserted row
Select to return inserted row.

See Also

Delete, CRUD, Generate Schema Script, Options Dialog Box

CRUD


Delete, CRUD, Generate Schema Script, Options Dialog Box

Use this window to adjust database diagram behavior to your needs. To open it, select Options from the Tools menu. Then, expand the Generate Schema Script node, and go to the CRUD node.

The Delete section of the CRUD node allows you to customize the Update part of the CRUD operation. It contains the following options:

Delete procedure name template
Configure name template of the Delete procedure in this text box.

Delete procedure code template
Configure code template of the Delete procedure in this text box.

See Also

CRUD

Generate Schema Script Options


Copy Databases Options

This section describes the available Copy Databases options.

In This Section

General, Copy Databases Options
Describes options to customize the Copy Databases behavior.

See Also

Data Generation Options

Options


General, Copy Databases Options

Use the Options window to adjust the dbForge Studio behavior to your needs. To open it, select Options from the Tools menu. Then go to the Copy Databases node.

The General section of the Copy Databases node contains the following options:

Disable foreign keys
Select to disable foreign key checks before creating a table.

Exclude DEFINER and SQL SECURITY clauses
Select to exclude DEFINER and SQL SECURITY clauses from the script generation.

Flush logs
Select to close and reopen all log files before backup.

Include NO_AUTO_ VALUE_ON_ZERO in script
Select to include statements to set SQL_MODE to NO_AUTO_VALUE_ ON_ZERO and restore in the end of the script.

Include partition clause
Select to include the PARTITION clause to the script.

Include triggers
Select to include trigger for tables to the script.

Lock all table for read (Flush Reload Locks)
Select to lock all tables with FLUSH READ LOCKS. This option is necessary to create consistent snapshot of your MyISAM tables.

Use a single transaction
Select to execute the backup in a single transaction. This option is necessary to create a consistent snapshot of your InnoDB tables.

Use bulk insert
Uses INSERT statements that insert more than one table row per statement.

Maximum number of simultaneous database copyings
Indicates the maximum number of databases being copied simultaneously. Use up and down arrows to increase or decrease the database number.

See Also

Copy Databases Options

Options


Data Generation Options

This section describes Data Generation options.

In This Section

General, Data Generation Options
Describes general options for data generation.

Formatting, Data Generation Options
Describes formatting options for data generation.

See Also

Database Explorer Options

Options


General, Data Generation Options

Use the General tab of the Data Generation Options dialog box to configure the data generation behavior. To open it, select Options from the Tools menu. Then go to the Data Generation node.

The General section of the Data Generation Options window contains the following options:

Cache Folder:

Windows Temporary Folder
Select to use windows temporary folder as a cache folder.

Custom Folder
Select to use a custom folder as a cache folder. Click Browse to specify pat to the folder.

See Also

Formatting, Data Generation Options

Data Generation Options


Formatting, Data Generation Options

Use the Options window to adjust the products behavior to your needs. You can access this dialog box by clicking Options on the Tools menu, and then selecting the Formatting page in the Data Generation folder.

The Formatting section of the Data Generation Options window contains the following options:

Data type
Select a data type from the drop-down list. The following data types are available: Date, DateTime, DateTimeOffset.

Preview Format
Shows a preview for the selected data type.

Predefined Formats
Select one of the predefined formats for the selected data type from the drop-down list box.

Test Input
Displays the last date of test input.

See Also

Data Generation Options

Options


Database Explorer Options

This section describes Database Explorer options.

In This Section

General, Database Explorer Options Dialog Box
Describes the tab, where you can customize Database Explorer behavior.

See Also

Query Builder Options

Options


General, Database Explorer Options Dialog Box

Use the Options window to adjust dbForge Studio behavior to your needs. To open it, select Options from the Tools menu. Then go to the Database Explorer node.

The General section of the Database Explorer node contains following options.

Settings

Show detailed column name in tree
Shows column type, and whether it is not null in the tree.

Table and View

Customize dbForge Studio default behavior when double-clicking on table or view node in Database Explorer.

Open object editor
Opens object editor for the table or view.

Retrieve data
Opens document with data of the table or view.

Procedure and Function

Customize dbForge Studio default behavior when double-clicking on procedure or function node in Database Explorer.

Open object editor
Opens object editor for the procedure or function.

Execute
Executes the procedure or function.

See Also

Database Explorer Options

Options


Query Builder Options

This section describes options for Query Builder's diagram.

In This Section

General, Query Builder Options Dialog Box
Describes options to tune Query Builder's diagram.

See Also

Database Diagram Options

Options


General, Query Builder Options Dialog Box

Use the Options window to adjust dbForge Studio behavior to your needs. To open it, select Options from the Tools menu. Then go to the Query Builder node.

The General section of the Query Builder node allows you to customize diagram appearance and diagram grid options. You can use the following options:

Enable shadows
Select to enable shadows for diagram table shapes.

Enable grid
Select to enable grid on the diagram.

Grid size
Set grid size in pixels.

Snap to grid
Select to enable snapping shapes to grid when dragging them.

Background color
Set the diagram background color.

Skin type
Choose Default or Classic skin type to adjust the diagram appearance to your needs.

Use Defaults
Click to reset options on this page to their default values.

See Also

Query Builder Options

Options


Database Diagram Options

This section describes options that help customize a database diagram. Options can be set either globally for all the diagram documents or separately for a particular one.

To set default options for new diagram documents, select Options from the Tools menu to open the Options dialog box. Then go to the Database Diagram node. To set options for the current diagram, right-click the diagram and choose Options from the shortcut menu.

This dialog allows you to customize options for a diagram. It contains the same options as the Options dialog box, but options in this dialog are applied only to the current diagram document.

Diagram Options tabs have the Default button instead of the Reset button on the corresponding pages of the Options dialog box. This button resets settings for the current diagram to the values currently set in the Options dialog box.

In This Section

General, Database Diagram, Options Dialog Box
Describes general diagram options.

Notation, Database Diagram, Options Dialog Box
Describes options for adjusting default settings for new diagram documents.

Page, Database Diagram, Options Dialog Box
Describes how to set page settings for diagram printing.

Print, Database Diagram, Options Dialog Box
Describes how to set options for diagram printing.

See Also

Debugging Options

Options


General, Database Diagram, Options Dialog Box

Use the Options window to adjust database diagram behavior to your needs. To open it, select Options from the Tools menu.

Options can be set either globally for all the diagram documents or separately for a particular one.

The General section of the Database Diagram node contains the following options:

General

Background Color
Choose the background color for the diagram.

Auto Scale on Drop
Select to scale diagram automatically to fit all its shapes when dropping database objects to the diagram.

Preserve routing
Select to preserve routing of relation links on the diagram.

Wheel Scale
Select it to zoom the diagram in and out with the scroll wheel. When the option is selected, hold the CTRL button and use the wheel to scroll; when cleared, use CTRL+SCROLL to zoom the diagram in and out.

Grid

Show Grid
Select to enable grid on the diagram.

Enable Grid Snap
Select to enable snapping shapes to grid when dragging them.

Grid Step
Set size for the grid cells in pixels.

Shadow

Enable Shadows
Select to enable shadows for diagram shapes.

X Offset
Set horizontal offset for the shape shadow.

Y Offset
Set vertical offset for the shape shadow.

Reset

Resets all options on this page to their default values.

Note

You can access the aforementioned options (except the Reset button) if you right-click a diagram and select Options from the menu. Instead of the Reset button in the options, you will see Default. The difference between these buttons is the following:

Reset restores all the options to the Devart predefined values. The Default button restores options to those specified in the Database Diagram General section of the Options window.

See Also

Database Diagram Options

Notation, Database Diagram, Options Dialog Box


Notation, Database Diagram, Options Dialog Box

Use the Options window to adjust database diagram behavior to your needs. To open it, select Options from the Tools menu.

Options can be set either globally for all the diagram documents or separately for a particular one.

The Notation section of the Database Diagram node allows you to customize notations. It contains the following options:

Skin

Skin Type
Choose the diagram skin type. The Default, Simple, and IDEF1X skins are available.

Relations

Relation Notation
Allows you to choose relation notation, that determines its look on the diagram. IE and IDEF1X notation.

Show Relation Comments
Select to display foreign key names near the relation child ends.

Tables

Table Compartments
Select table compartments to display.

Separate Primary Keys
Select to separate primary key columns with horizontal line.

Field Details Level
Select detail level for displaying table and view columns. You may choose to display only their names, names and data type, or names and detailed datatype with size (or precision and scale).

Reset

Resets all options on this page to their default values.

Note

You can access the aforementioned options (except the Reset button) if you right-click a diagram and select Options from the menu. Instead of the Reset button in the options, you will see Default. The difference between these buttons is the following:

Reset restores all the options to the Devart predefined values. The Default button restores options to those specified in the Database Diagram General section of the Options window.

See Also

Database Diagram Options

Page, Database Diagram, Options Dialog Box


Page, Database Diagram, Options Dialog Box

Use the Options window to adjust database diagram behavior to your needs. To open it, select Options from the Tools menu.

Options can be set either globally for all the diagram documents or separately for a particular one.

The Page section of the Database Diagram node allows you to customize page settings for diagram printing. It contains the following options:

Paper

Size
Set the size of paper for printing.

Source
Specify where the paper you want to use is located in the printer.

Orientation

Specify how the document is positioned on the page.

Margins

Specify margins to set the printing area of the page.

Overlap

Set the percentage of the printing area which will be overlapped on the adjacent pages.

Header and Footer

Header text
Specify the text to print at the top of each page. Use the following letter and character combinations to print specific information in the page header.

· &f - Insert the file name.
· &d - Insert the current date.
· &t - Insert the current time.
· &p - Insert page numbers.
· &P - Insert the page count

Footer text
Specify the text to print at the bottom of each page. Use the following letter and character combinations to print specific information in the page header.

· &f - Insert the file name.
· &d - Insert the current date.
· &t - Insert the current time.
· &p - Insert page numbers.
· &P - Insert the page count

Reset

Resets all options on this page to their default values.

Note

You can access the aforementioned options (except the Reset button) if you right-click a diagram and select Options from the menu. Instead of the Reset button in the options, you will see Default. The difference between these buttons is the following:

Reset restores all the options to the Devart predefined values. The Default button restores options to those specified in the Database Diagram General section of the Options window.

See Also

Diagram Options

Print, Database Diagram, Options Dialog Box


Print, Database Diagram, Options Dialog Box

Use the Options window to adjust database diagram behavior to your needs. To open it, select Options from the Tools menu.

Options can be set either globally for all the diagram documents or separately for a particular one.

The Print section of the Database Diagram node allows you to customize diagram printing settings. It contains the following options:

Printer

Note

This section is available only if you open the Options window by right-clicking the diagram and selecting Options in the menu.

Name
Select a required printer from the list.

Properties
Click to set up a printer in the Printer Properties dialog box.

Scaling

Center Image
Select to center the image on the page.

Scale
Specify scale for printing.

Fit to Pages
Select to use automatic scaling to fit to the specific number of pages.

Pages Across
Specify the number of pages to fit the diagram width to.

Pages Down
Specify the number of pages to fit the diagram height to.

Print Elements

Print Grid
Select to print the diagram grid.

Print Markup Mode
Specify whether to print the markup which helps to cut and glue together the diagram that is printed several sheets.

None
No markup is printed.

Page Margins
Page margin borders are printed as a dotted line. Only borders of margins, that should be cut off are printed. For example, for top left page only right and bottom borders are printed.

Full Markup
Overlapping borders markup is printed where needed to help you to glue diagram pages together.

Reset

Resets all options on this page to their default values.

Note

You can access the aforementioned options (except the Reset button) if you right-click a diagram and select Options from the menu. Instead of the Reset button in the options, you will see Default. The difference between these buttons is the following:

Reset restores all the options to the Devart predefined values. The Default button restores options to those specified in the Database Diagram General section of the Options window.

See Also

Diagram Options

Options


Debugging Options

This section describes debugging options.

In This Section

General, Debugger, Options Dialog Box
Describes the tab where you can setup debugging behavior when you debug a stored procedure or SQL script, make changes to it and then try to continue or step execution.

See Also

Master-Detail Options

Options


General, Debugging, Options Dialog Box

Use the Options window to adjust dbForge Studio behavior to your needs. To open it, select Options from the Tools menu. Then go to the Debugging node.

The General section of the Debugging node contains the following options:

Warn me if I make changes
Select to invoke the Unable to Apply Code Changes dialog box each time you debug a stored procedure or SQL script, make changes to it and then try to continue or step execution.

Always restart the debugging after I make changes
When selected, disables the Unable to Apply Code Changes dialog box. Instead, the debugger will automatically save changes and restart the stored procedure or SQL script.

Always ignore changes and continue debugging
When selected, disables the Unable to Apply Code Changes dialog box. Instead, the debugger will automatically continue, without applying the changes, when you try to step or continue.

Timeout
Specify the timeout here.

See Also

Debugging Options

Options


Master-Detail Options

This section describes the available Master-detail options.

In This Section

Page, Master-detail, Options Dialog Box
Describes options available for Master-detail page setup.

Print, Master-detail, Options Dialog Box
Describes how to set options for Master-detail printing.

See Also

Query Builder Options

Options


Page, Master-Detail, Options Dialog Box

Use the Options window to adjust database diagram behavior to your needs. To open it, select Options from the Tools menu. Then go to the Master-detail node.

The Page section of the Master-detail node allows you to customize page settings for diagram printing. It contains the following options:

Paper

Size
Set the size of paper for printing.

Source
Specify where the paper you want to use is located in the printer.

Orientation

Specify the way the document is positioned on the page.

Margins

Specify margins to set the printing area of the page.

Overlap

Set the percentage of the printing area which will be overlapped on the adjacent pages.

Header and Footer

Header text
Specify the text to print at the top of each page. Use the following letter and character combinations to print specific information in the page header.

· &f - Insert the file name.
· &d - Insert the current date.
· &t - Insert the current time.
· &p - Insert page numbers.
· &P - Insert the page count

Footer text
Specify the text to print at the bottom of each page. Use the following letter and character combinations to print specific information in the page header.

· &f - Insert the file name.
· &d - Insert the current date.
· &t - Insert the current time.
· &p - Insert page numbers.
· &P - Insert the page count

Reset

Resets all options on this page to their default values.

Note

You can access the aforementioned options (except the Reset button) if you right-click a diagram and select Options from the menu. Instead of the Reset button in the options, you will see Default. The difference between these buttons is the following:

Reset restores all the options to the Devart predefined values. The Default button restores options to those specified in the Database Diagram General section of the Options window.

See Also

Master-detail Options

Print, Master-detail, Options Dialog Box


Print, Master-Detail, Options Dialog Box

Use the Options window to adjust database diagram behavior to your needs. To open it, select Options from the Tools menu. Then go to the Master-detail node.

The Print section of the Master-detail node allows you to customize diagram printing settings. It contains the following options:

Scaling

Center Image
Select to center the image on the page.

Scale
Specify scale for printing.

Fit to Pages
Select to use automatic scaling to fit to the specific number of pages.

Pages Across
Specify the number of pages to fit the diagram width to.

Pages Down
Specify the number of pages to fit the diagram height to.

Print Elements

Print Grid
Select to print the diagram grid.

Print Markup Mode
Specify whether to print the markup which helps to cut and glue together the diagram that is printed several sheets.

None
No markup is printed.

Page Margins
Page margin borders are printed as a dotted line. Only borders of margins, that should be cut off are printed. For example, for top left page only right and bottom borders are printed.

Full Markup
Overlapping borders markup is printed where needed to help you to glue diagram pages together.

Reset

Resets all options on this page to their default values.

Note

You can access the aforementioned options (except the Reset button) if you right-click a diagram and select Options from the menu. Instead of the Reset button in the options, you will see Default. The difference between these buttons is the following:

Reset restores all the options to the Devart predefined values. The Default button restores options to those specified in the Database Diagram General section of the Options window.

See Also

Master-detail Options

Viewing Data in Master-Detail Tables


Query Profiler Options

This section explains code formatting options provided in the Options window.

In This Section

General, Query Profiler Options Dialog Box
Describes the options to customize Query Profiler behavior.

See Also

Schema Comparison Options

Options


General, Query Profiler Options Dialog Box

Use the Options window to adjust the dbForge Studio behavior to your needs. To open it, select Options from the Tools menu. Then go to the Query Profiler node.

The General section of the Query Profiler node contains the following options:

Maximum history size
Set the number of query profiling results that can be stored on the Profiler tab.

Do not highlight differences less than X.xxx s. during comparison
Set the difference in time between performing actions when they should be highlighted.

Display SQL query while printing profiling results
Select it to print the SQL query text with the query profiling results.

Free the query plan cache
Select it to empty query plan cache.

Remove all clean buffers from the buffer pool
Select it to remove all clean buffers from the buffer pool.

Show information panel
If selected, an information panel appears underneath of the Query Profiler window.

Profile a query without caching (use SQL_NO_CACHE option)
Select to force not using cache, for more reliable profiling results.

See Also

Query Profiler Options

Options


Query Profiling

Use the Profiler document view to see the results of SHOW PROFILE and EXPLAIN commands along with STATUS variables changes related to the executed query. Each time you get profiling results for the executed query, they appear in the tree view as a new node with time and date of query execution. You can easily distinguish and navigate to them. Besides execution date and time, they contain the connection properties, duration of execution in seconds and the server version used.

The query profiling results are displayed on three tabs:

Profile

Shows the SHOW PROFILE results for the executed query. Query Profiler sums time information about all the operations MySQL server does for query execution and lists the results along with the total value in the grid. You can see State, Summed duration and Percentage columns.

Plan

Shows the EXPLAIN results returned by the executed query. Use Plan tab to obtain information about how MySQL executes a SELECT statement. It shows when you need to add an index to a table to increase SELECT performance, optimize joining between tables, etc.

Session statistics

Shows statistics for each query execution.

See Also

Reference


Refactoring Windows

This section contains information on user interface elements used when performing refactoring.

In This Section

Database Refactoring
Describes windows used for database refactoring.

Code Refactoring
Describes windows used to refactor code.


Database Refactoring

This section contains information on user interface elements used when performing database refactoring.

In This Section

Rename Dialog Box
Describes the Rename window.

Preview Changes Dialog Box
Describes the Rename window.

Renaming Objects Message Box (from Database Explorer)
Describes the Renaming Objects message box that appears when renaming objects from Database Explorer.

Renaming Objects Message Box (from Object Editor)
Describes the Renaming Objects message box that appears when renaming objects from object editor.

See Also

Refactoring Windows

Code Refactoring


Rename Dialog Box (Database)

Use this dialog box to rename database object with updating all objects that reference the renamed object. It is displayed when right-clicking the object in Database Explorer, pointing to Refactoring in the shortcut menu, and clicking Rename.

New Name
Enter the new name of the object here.

Location
Full path to the file containing definition of the renamed object.

Search dependencies in all databases
Check to look for objects that reference the renamed object in all available databases.

See Also

Database Refactoring

Preview Changes Dialog Box (Database)


Preview Changes Dialog Box (Database)

Use this dialog box to see the changes that will be applied to database after renaming the database object.

The following objects will be renamed: <OldName> to <NewName>
This tree represents all changes that will be applied to the database objects referencing the object that is being renamed. Check or clear the corresponding checkboxes to apply changes to the listed objects or not.

Preview code changes
This box displays code changes. Change selected in the tree is highlighted with green. Other changes in this file have dotted frame.

Generate script without updating database
Select to generate an update script and view it before applying changes to the database. The generated script will be opened in the SQL editor, you can view it and execute to apply changes.

Apply
Click to apply changes.

Cancel
Click to cancel changes.

See Also

Database Refactoring

Renaming Objects Message Box (from Database Explorer)


Renaming Objects Message Box (from Database Explorer)

This window is shown when renaming a database object directly from the Database Explorer tree. In this window you are asked to choose one of the ways to rename the object:

Rename
Click this button to simply rename the object.

Refactor
Click this button to rename the object with dependency check. Refactoring allows you to keep all dependencies in the database, on contrary to simple renaming that will make all such dependencies invalid.

Cancel
Click this button to cancel renaming.

See Also

Database Refactoring

Renaming Objects Message Box


Renaming Objects Message Box (from Object Editor)

This message box is shown when renaming a database object from object editor. In this message box, you have to choose one of the ways to rename the object:

Yes
Click this button to rename the object with dependency check. Refactoring allows you to keep all dependencies in the database, on contrary to simple renaming that will make all such dependencies invalid.

No
Click this button to simply rename the object.

Cancel
Click this button to cancel renaming.

See Also

Database Refactoring

Code Refactoring


Code Refactoring

This section contains information on user interface elements used when performing code refactoring.

In This Section

Rename Dialog Box
Describes the Rename window.

Preview Changes Dialog Box
Describes the Preview Changes window.


Rename Dialog Box (Code)

Use this dialog box to rename project object with updating all scripts that reference the renamed object. It is displayed when right-clicking the project object in the Schema View window or in the SQL editor and choosing [image] Rename from the shortcut menu.

New Name
Enter the new name of the object here.

Location
Full path to the file, containing definition of the renamed object.

Preview reference changes
Select to preview changes before applying them.

Search in comments
Select to replace object name in comments.

Search in strings
Select to replace object name in text strings.

See Also

Code Refactoring

Preview Changes Dialog Box (Code)


Preview Changes Dialog Box (Code)

Use this dialog box to preview refactoring changes to project and to control these changes. Preview Changes dialog box displays all project changes in the Rename <OldName> to <NewName> tree. The changes are grouped in three root nodes: node representing database object and all references, node representing found entries in text strings, and node representing found entries in comments. The second level nodes represent project script files that will be changed. Third level nodes represent the changes. Click them and they will be displayed in the Preview code changes box. If the change check box is cleared, this change will not be performed.

The following objects will be renamed: <OldName> to <NewName>
This tree represents project script changes.

Strings to update
In this tree node, strings that contain references to the object being renamed are displayed.

Comments to update
In this tree node, comments that contain references to the object being renamed are displayed.

Preview code changes
This box displays changes in code. Change selected in the tree is highlighted with green. Other changes in this file have dotted frame.

Apply
Click to apply changes.

Cancel
Click to cancel changes.

See Also

Code Refactoring

Refactoring Windows


Pivot Table

This section contains detailed information on all the windows and dialog boxes related to PivotGrid functionality.

In This Section

Pivot Table View
Describes how to create and manage pivot tables using the Pivot Grid view of the SQL document.

PivotGrid Prefilter Dialog Box
Shows how to apply various filter criteria using the PivotGrid Prefilter dialog box.

Conditional Styles Dialog Box
Teaches how to customize a pivot table appearance with the help of the Conditional Styles dialog box.

Collection Editor Dialog Box
Shows how to create a custom group mode using the Collection Editor dialog box.

Data Source View
Tells how to use the Data Source view to create pivot tables.

Chart View
Describes the Chart view of the Pivot Table document.


Pivot Table View

Use this document view to convert your data into compact and informative summaries - pivot tables. To open an empty Pivot Table document view, do either of the following:

· On the File menu, click New and then click [image] Pivot Table in the top menu.
· On the Database menu click [image] Pivot Table
· Open an SQL document or a query document, right-click its bottom part and select [image] Pivot Table from the shortcut menu.

To create a pivot table, drag-and-drop fields from the Data Source view to required areas in the Pivot Table view. You can rearrange (or pivot) your fields by a simple drag of a mouse until you get the layout best for understanding the data relations and dependencies.

Pivot Table Toolbar

The Pivot Table view contains the following toolbar buttons:

Refresh
Use this option to refresh data.

Edit SQL Text
Contains SQL code of the created pivot table. Changes you make in the visual part of the editor are immediately available in the SQL Text editor

Show Data Source
Opens Data Source View.

Prefilter
Opens Prefilter Dialog Box.

Conditional Styles
Opens Collection Editor Dialog Box.

Show Chart
Opens Chart View.

Pivot Table Visual UI Elements

The Pivot Table view contains the following areas:

Filter area
Place the data source field(s) here to filter all the data in a pivot table by applying custom filtering criteria.

Data area
Place the data source field here to get custom totals and grand totals.

Row area
Place the data source field(s) here to display the data in rows in a pivot table. The field(s) will consist of a row header and values. The header will display a row name and will allow you to sort and filter the row data, move the field to any area in the PivotGrid window to rearrange the data.

Column area
Place the data source field(s) here to display the data in columns in a pivot table. The field(s) will consist of a column header and values. The header will display a column name and will allow you to sort and filter the column data, move the field to any area in the PivotGrid window to rearrange the data.

Grand Total
When you add any data fields to the Row Field, Column Field, and Data areas in the PivotGrid window, grand total values are automatically calculated and displayed in the Data area highlighted with the light yellow color.

Custom Total
Total values are calculated based on selected summary functions. The default function calculates the sum of all values in rows and columns. You can cancel the default function or apply other functions besides the default one using the Summary drop-down list in the Properties window.

For more information about the Pivot Table document view, go to the Pivot Table Components topic.

See Also

Pivot Table

PivotGrid Prefilter Dialog Box


Prefilter Dialog Box

Use this dialog box to apply advanced filtering conditions to filter data in a pivot table. To open the dialog box, click the [image] Prefilter icon on the toolbar or right-clock the pivot table header and select Prefilter from the menu. The Prefilter dialog box contains the following details:

Condition group

It is displayed as a red-colored logical operator and the [image] button to add a new condition to a group. Clicking the logical operator displays the following menu:

And
Sets And logical operator for the group. All group conditions must be true.

Or
Sets Or logical operator for the current group. At least one condition from the group must be true.

Not And
Sets Not And logical operator for the current group. At least one condition from the group must be false.

Not Or
Sets Not Or logical operator for the current group. All group conditions must be false.

Add Condition
Adds a new condition to the current group.

Add Group
Adds a new condition group to the current group.

Clear All
Removes all conditions and sub-groups, leaving only the top-level group node. This command is available for the top-level condition group only.

Remove Group
Removes the condition group. This command is available for all the condition groups except a top-level one.

Condition

A condition consists of the following details:

Operand
An editable field containing the list of data source fields. Click the operand and select a required field from the drop-down list.

Criteria operator
A green-colored criteria operator, e.g., [image]. To set another operator for a condition, click the operator and choose another from the appeared menu.

Click it to add a new condition.

Click it to remove a condition.

See Also

Pivot Table

Conditional Styles Dialog Box


Conditional Styles Dialog Box

Use this dialog box to change the pivot table appearance based on specific conditions. To open this dialog box, click the [image] Conditional Styles icon on the toolbar or right-click the pivot table header and select Conditional Styles from the menu. The dialog box contains the following:

Add Condition
Click it to create a new condition for customizing a pivot table.

Up and Down
Click these arrows to change the order of conditional styles in the Conditions list.

Remove
Click it to remove the selected conditional style from the Conditions list and the pivot table.

Clear All
Click it to remove all the conditional styles from the Conditions list and the pivot table at once.

Conditions list

Contains the list of created conditions. Select a required condition in the list and see its properties displayed on the right part of the Conditional Styles dialog box. You can change the order of conditions or remove them by using the corresponding buttons on the toolbar.

Condition properties

Set properties of a condition here. For example, you want to highlight values from some field that are in 100-1000 range. You need to select a required field from the drop-down list and go to the Condition field to select Between value. Then enter 100 and 1000 into Value1 and Value2 fields to specify the required range. In the Apply To section you should clear all the check boxes except the Cell one, as you don't need to apply this condition for all the cell types in the pivot table. The last thing is to select a required background color in the Appearance section. The style is ready and will be applied when you click OK in the dialog box.

Field
Contains the list of data source fields, which you can select for applying the conditional styles.

Condition
Contains the list of logical operators (e.g., Equal, Less, Greater, etc) to apply to the values of the selected data source field.

Value1 and Value2
Enter values for the specified condition. Value2 field is required when you specify the range of values.

Apply To
Allows you to select the cell types to apply the created style. You can select the following types:

Cell - to apply for all the cells in the pivot table.

Total Cell - to apply for cells containing automatically calculated sum of row or column field values. By default such sells are highlighted with the grey color in the pivot table.

Grand Total Cell - to apply for cells containing automatically calculated sum of row or column field totals. By default such sells are highlighted with the light yellow color in the pivot table.

Custom Total Cell - to apply for cells containing values calculated based on selected summary functions. By default such sells are highlighted with the grey color in the pivot table.

Appearance
In this section you can set the following properties to change the pivot table appearance:

BackColor
Select a required background color to apply for the selected cells.

BackColor2
The color selected in this field is applied only if some color is selected in the BackColor field. Both colors will be displayed as gradient.

Font
Expand the node and select a font and its properties to use in the selected cell(s).

ForeColor
Select a font color to use in the selected cell(s).

GradientMode
Select a required gradient mode from the field. The selected mode will be applied only if BackColor and BackColor2 values are set.

Image
Click this field and select a required image in the Open dialog box to set as a background in the pivot table cells.

See Also

Pivot Table

Collection Editor Dialog Box


Collection Editor Dialog Box

Use this dialog box to specify a range to group numeric values in a pivot table. To open the dialog box, right-click a required field in the Data Source view and select Custom from the menu. Collection Editor contains the following details:

Add Value
Click it to add a value to set a range for a created custom group mode.

Remove
Click it to remove the custom group mode from the Collection Editor window and a pivot table.

Clear All
Click it to remove all the custom group modes from the Collection Editor window and a pivot table at once.

Value
Enter value to set a range for a created custom group mode.

See Also

Pivot Table

Data Source View


Data Source View

When you are creating a pivot table in the Pivot Table view of the SQL or query document, use the Data Source view to see and manage a list of data source fields bound to a pivot table.

To bound some fields to the pivot table, place required fields to the Data Source view. Use either of these ways:

· Compose the query on the Query Builder diagram and switch to the PivotGrid mode.
· Drag-and-drop a required table from Database Explorer either to the Data Source view or the PivotGrid window.

Using the Data Source view you can manage the fields in the following ways:

· Add them to required pivot table areas or remove with a single drag of a mouse.
· Apply predefined group modes and create custom ones using the shortcut menu.
· Switch to the Properties window to apply summary functions to calculated custom totals for the field values.

Note

You can add one table or view to the Data Source view. To do this, select the needed table or view in Database Explorer and clicking Send to Pivot Table option from the shortcut menu or click the same option in the Data view of Object Viewer or the Data window shortcut menu.

If you click Send to and select Pivot Table on the Data tab of any SQL document, the Pivot Table tab will be opened for this document

The Data Source view contains the following details:

Top root of the data fields tree
It contains a name of the opened SQL document for which you are creating a pivot table.

Data fields
The tree of data fields specified in the opened SQL document which is a data source for a pivot table. You can select any field and drag it to a required pivot table area in the Pivot Table view to add to a pivot table. If you double-click a field it will be added to the pivot table area that is currently selected in the Destination area. If any field is already added to the area, the newly added field will be placed to the left of it.

You can right-click a field in the tree and select a predefined group mode or create a custom one to group the field values in a pivot table.

Add To
Use this button to place data source fields to required pivot table areas in the Pivot Table view. Do the following:

1. Select a field in the tree.
2. Select a required pivot table area from the Destination area drop-down list at the bottom of the Data Source view.
3. Click the Add To button. Also instead of clicking the button you can just press ENTER.

Tip: As dealing with a composite field (one that consists of a group of fields), you can add the group of fileds to a required pivot table area at once if you select the top field.

Destination area
It contains the list of pivot table areas which you can select to add data source fields. The list includes the following areas: Filter, Row, Column, and Data.

See Also

Pivot Table

Chart View


Chart View

dbForge Studio provides possibility to create 3D and 2D charts for pivot data easier than ever before. So, you can build a chart basing on data of a pivot table. With a wide feature set it takes really a little effort to design a smart professional-looking chart.

What is a chart?

A chart is simply a graphical representation of a series of numeric values.

Displaying data in a well-conceived chart can make your numbers more understandable. Because a chart presents a picture, charts are particularly useful for summarizing a series of numbers and their interrelationships. Making a chart can often help you spot trends and patterns that may otherwise go unnoticed.

Chart Wizard

The Chart Wizard is a powerful tool for quickly building charts of any complexity from scratch, and customizing existing charts. To open the wizard, right-click the required table in the Database Explorer window, select Send To, and click Chart Designer from the shortcut menu. The Chart Wizard opens.

Chart View Usage

Use the Chart document view to present data displayed in the pivot table view as a chart.

To open the Chart view, click the [image] Show Chart button on the Pivot Table View of the document.

To create a chart, simply select the data you want to be presented as a chart, on the Pivot Table View. To learn the exact steps to create a chart, refer to the How To: Create a Chart in Pivot Table topic.

Chart View Options

Use the Chart view options to optimize the appearance of the created chart.

Type
Choose the type of your chart from the drop-down list.

Open Chart Designer
Open Chart Designer to adjust the chart to your needs. You can choose chart type here, adjust the appearance of the whole chart, of its diagram, add such elements as strips, constant lines, scale breaks, chart titles, etc.

Show All Data
Click this button to show all data available in the table as a chart. If this button is on, all data available in the pivot table is shown in the chart independently of any selections made in the grid. If the button if off, only selected data is shown in the chart.

Chart Options
Click this button to view the list of available options that may help you to adjust chart appearance.

Point Labels
Check to show point labels that are used to identify particular series points within a series.

Generate Series From Columns
Check this option to generate series from the columns of the resulting pivot table.

Show Column Totals
Show column totals on the chart.

Show Row Totals
Show row totals on the chart.

Show Column Grand Totals
Check to show grand total of each column on the chart.

Show Row Grand Totals
Check to show grand total of each row on the chart.

Rotated
Check this option to rotate the chart relatively the X-axis.

Chart Layout
Check to specify the chart layout.

Vertical
Check to display the Chart view vertically in relation to the Pivot Table view.

Horizontal
Check to display the Chart view horizontally in relation to the Pivot Table view.

Chart Elements

· Data point is the most fundamental element of a chart. A group of data points makes a single series. Each data point must have one argument and at least one value specified. Argument and its value are generally represented on a diagram's axes as their X and Y coordinates respectively.
· A group of data points represents a series, which isn't displayed until it has at least one point specified. The view type of the first visible series determines the diagram type of the chart, that means all other series should have a compatible view type. A series point represents data point's argument and value in a diagram as the X and Y coordinates respectively.
· A diagram is a main area of chart where most of the chart's data and graphical elements are displayed. A chart diagram can be zoomed, scrolled, and rotated.
· Axes provide coordinates for the series points' arguments and values. Most charts use axis of arguments (X-axis) and axis of values (Y-axis). Besides primary axes, secondary axes may be added to the chart for its usability.
· A strip is a highlighted area on a chart diagram within the defined range of values of an axis to which it belongs. Generally strips are used to represent a range of values behind series.
· A constant line visually represents an axis value as a line perpendicular to the axis to which it belongs.
· A scale break is an area across an axis shown instead of a section of the axis' range. Usually it's used if a chart has useless space, for example, if the chart's series represent data with great leaps in range.
· A pane is a rectangular area on the diagram where series and their associate axes are displayed.
· The legend is a component that accompanies a chart's diagram and has an explanatory meaning. The legend identifies the most important visual elements of the diagram such as series, series points, constant lines, and strips.

Note

Only one legend can be created in a diagram.
· Chart titles can accompany charts with text headers and explanations.

See Also

Pivot Table


Query Builder

This section contains information about main components of the query document - the diagram and the tabbed editor.

In This Section

Query diagram
Describes what you can see on the query diagram.

Selection Tab
Explains the details of the Selection tab of the tabbed editor.

Joins Tab
Explains the details of the Joins tab of the tabbed editor.

Where And Having Tabs
Explains the details of the Where and Having tabs of the tabbed editor.

Group By Tab
Explains the details of the Group By tab of the tabbed editor.

Order By Tab
Explains the details of the Order By tab of the tabbed editor.

Select To Tab
Explains the details of the Select To tab of the tabbed editor.

Insert Tab
Explains the details of the Insert tab of the tabbed editor.

Update Tab
Explains the details of the Update tab of the tabbed editor.

Operand Editor, Query Builder
Explains how to specify operand parameters using the operand editor.

Choose Target Table
Describes the Choose Target Table window.


Query Diagram, Query Builder

Query diagram is the main part of Query Builder that introduces visual query representation. The query diagram contains tables, views, and subqueries participating in a query and connections between them.

The [image] icon in the diagram shows what type of a query is executing now. To change the current type, right click the icon, select Change Type, and then click the type you need from the shortcut menu. Select, Insert Results, Insert Values, Update, Delete types are available.

To add a table or a view to the query, just drag-and-drop a required one from the Database Explorer.

You can see two kinds of controls on the diagram:

Table Shape

Represents a database table, view, or subquery that is included to FROM clause. It contains the list of fields that you can include to SELECT clause as well as grouping and sorting marks, and marks of the constraints. You can drag a table shape anywhere on the query diagram.

A table shape caption contains an object type icon, a name (alias), an object type, and a button that allows you to minimize table shape and restore it back.

For more information on working with table shapes, visit the Adding Tables to Diagram and the Removing Tables from Diagram topics.

Connector

Represents a join relation between two tables. To establish a connection, drag a column from one table shape to another. To make it any kind of OUTER JOIN, right-click on a connector and setup the relation. Visit the Making Joins Between Tables topic for details.

See Also

Query Builder

Selection, Query Builder


Selection, Query Builder

Use this tab to edit the select list of the query. The Selection tab contains the following details:

Unique records

Defines whether records in a result set are unique, same as DISTINCT modifier.

Column

Represents a column (columns) in the select list. This can be either column from a table or an arbitrary expression. You can choose it from the Operand Editor or enter manually.

Alias

Specify an alias for the selected column.

Table

Represents a table or a subquery from which the column is selected. Not applicable for arbitrary expressions in the select list.

Aggregate

Specifies grouping function to apply to the selected column in the select list.

Sort

Defines whether a column is sorted and specifies sorting direction.

Filter

Allows adding a simple condition on the column to the WHERE clause. Filter should have the following form: <operator> <value>. Operator can be the following: >, <, =, <>, >=, <=, IS NULL , IS NOT NULL. Value must be a constant value with the same type as the column.

Icon | Description
 | Moves the selected column up in the select list and changes accordingly the order of columns' names in the query.
 | Moves the selected column down in the select list and changes accordingly the order of columns' names in the query.
 | Removes the selected column both from the select list and the query.

See Also

Query Builder

Joins, Query Builder


Joins, Query Builder

Joins Tab

Use this tab to establish, edit or remove joins between tables. Joins tab contains a tree with [image] button root node, joins as second level nodes and conditions and condition groups as further level nodes.

These buttons are in a root node. Use the [image] button to add joins. The template will be inserted to help you create your join. To remove the join, click the [image] button.

Join

Joins are the second level nodes. They consist of the following parts:

Table name

Black colored names of the joined tables, views, or subqueries, located on both sides of the join kind.

Condition kind

Red-colored condition kind, for example, [image]. You can set another condition kind for the condition by clicking the operator name and choosing the condition kind from the appeared menu. The following kinds are available: Left Outer, Right Outer, Inner, Cross, Full Outer.

Icon | Description
 | Click this button to add a condition to the join.
 | Click this button to remove the join.

Condition Group

You may add a condition group if you need to add several conditions.

A condition group is displayed as a red-colored logical operator, for example, [image] and a [image] button. To add a group, click the red-colored condition and select Add Group from the menu. Besides, the menu offers the following options: clicking the [image] button adds a new condition to the group. Clicking the logical operator displays the following menu:

And

Sets the And logical operator for the group. All group conditions must be true.

Or

Sets the Or logical operator for the group. At least one condition from the group must be true.

Not And

Sets the Not And logical operator for the group. At least one condition from the group must be false.

Not Or

Sets the Not Or logical operator for the group. All group conditions must be false.

Add Condition

Adds a new condition to the group.

Add Group

Adds a new condition group to the current group.

Clear All

This command is available for the top-level condition group only. Removes all conditions and subgroups, leaving only the top-level group node.

Remove Group

This command is available for the non-top-level condition group only. Removes the condition group.

Condition

Condition consists of the following parts:

Operand

Click the operand and enter a column name as the value or select it from the drop-down list. To edit the operand values, move to the required operand and press F2.

(function)

Click and select function for operand from the appeared menu. If function is already selected, it is marked with blue. To change function, click the function and select the function you need again.

Criteria operator

Green-colored criteria operator, for example [image]. To select another operator for the condition, click the operator name and choose the operator from the appeared menu.

Icon | Description
 | This button appears for operators that can have a variable number of operands. Click it to add one more operand value.
 | If this button is located at the end of the condition, clicking this button deletes the condition. If this is an operator that can have variable number of operands and the button is after the operand value, clicking this button deletes this operand value.

See Also

Query Builder

Where, Having, Query Builder


Where, Having, Query Builder

Where and Having tabs contain the same controls. The only difference between them is that they edit criteria in WHERE and HAVING clauses appropriately. You may use Where and Having tabs to build very complex conditions almost without typing.

Condition group

Condition group is displayed as a red-colored logical operator and the [image] button. Clicking the [image] button adds a new condition to a group. Clicking the logical operator displays the following menu:

And
Sets And logical operator for the group. All group conditions must be true.

Or
Sets Or logical operator for the group. At least one condition from the group must be true.

Xor
Sets Xor logical operator for the group. At least one condition from the group must be true, and at least one condition must be false.

Not And
Sets Not And logical operator for the group. At least one condition from the group must be false.

Not Or
Sets Not Or logical operator for the group. All group conditions must be false.

Add Condition
Adds a new condition to the group.

Add Group
Adds a new condition group to the current group.

Clear All
This command is available for the top-level condition group only. Removes all conditions and subgroups, leaving only the top-level group node.

Condition

Condition consists of the following parts:

Operand
Click the operand and enter a column name as the value or select it from the drop-down list. To edit the operand values, move to the required operand and press F2.

(function)
Click and select function for operand from the appeared menu. If function is already selected, it is marked with blue. To change function, click the function and select the function you need again.

Criteria operator
Green-colored criteria operator, for example [image]. To select another operator for the condition, click the operator name and choose the operator from the appeared menu.

Icon | Description
 | This button appears for operators that can have a variable number of operands. Click it to add one more operand value.
 | If this button is located at the end of the condition, clicking this button deletes the condition. If this is an operator that can have variable number of operands and the button is after the operand value, clicking this button deletes this operand value.

See Also

Query Builder

Group By, Query Builder


Group By, Query Builder

Use this tab to edit GROUP BY clause.

Columns
Lists all columns that are not grouped.

Grouped By
Lists all grouped columns and grouping expressions.

Expression
Type grouping expression and click the button near the edit box to add expression to GROUP BY clause.

Add Expression
Click to add the expression to GROUP BY clause.

Adds a column to GROUP BY clause.

Removes a column or grouping expression from the list.

Moves grouping expression up in the list.

Moves grouping expression down in the list.

See Also

Query Builder

Order By, Query Builder


Order By, Query Builder

Use this tab to edit ORDER BY clause.

Columns
Lists all columns that do not participate in sorting.

Grouped By
Lists all columns and expressions that participate in sorting.

Expression
Type expression and click the button near the edit box to add expression to ORDER BY clause.

Add Expression
Click to add the expression to ORDER BY clause.

Button
Adds column to ORDER BY clause.

Button
Removes column or expression from ORDER BY clause.

Button
Moves ordering expression up in the list.

Button
Moves ordering expression down in the list.

Sorting direction button
Toggles sorting direction of the ORDER BY item.

See Also

Query Builder

Select to, Query Builder


Select to, Query Builder

Use this tab to edit the insert into list of the query. The Select to tab contains the following details:

Insert to
Represents a list of columns into which results should be inserted.

Column
Represents a column (columns) in the select list. This can be either column from a table or an arbitrary expression. You can choose it from the Operand Editor or enter manually.

Alias
Specify an alias for the selected column.

Table
Represents a table or a subquery from which the column is selected. Not applicable for arbitrary expressions in the select list.

Aggregate
Specifies grouping function to apply to the selected column in the select list.

Sort
Defines whether a column is sorted and specifies sorting direction.

Filter
Allows adding a simple condition on the column to the WHERE clause. Filter should have the following form: <operator> <value>. Operator can be the following: >, <, =, <>, >=, <=, IS NULL , IS NOT NULL. Value must be a constant value with the same type as the column.

Button
Moves the selected column up in the select list and changes accordingly the order of columns' names in the query.

Button
Moves the selected column down in the select list and changes accordingly the order of columns' names in the query.

Button
Removes the selected column both from the select list and the query.

See Also

Query Builder

Insert, Query Builder


Insert, Query Builder

Use this tab to edit the insert into statement in the query. The Insert tab contains the following details:

Name
Represents a list of columns to insert values into.

Value
Represents values to be inserted.

Default
Indicates that the value that is being inserted is default.

See Also

Query Builder

Update, Query Builder


Update, Query Builder

Use this tab to edit the update statement in the query. The Update tab contains the following details:

Name
Represents a list of columns to insert values into.

Value
Represents values to be inserted.

Default
Indicates that the value that is being inserted is default.

Filter
Allows adding a simple condition on the column to the WHERE clause. Filter should have the following form: <operator> <value>. Operator can be the following: >, <, =, <>, >=, <=, IS NULL , IS NOT NULL. Value must be a constant value with the same type as the column.

See Also

Query Builder

Operand Editor, Query Builder


Operand Editor, Query Builder

Use this operand editor to add the operands to your query. To open the editor, go to the Joins, Where or Having tabs of the tabbed editor and click the operands fields in the template. The operand editor contains the following elements:

Hides/Collapses the operand editor.

Creates a subquery and opens the subquery tab of the query document.

Table

<All Tables>
The list of tables added to the diagram. Click the button and select a required table from the drop-down list. See the columns of the selected table under the field.

Columns
Columns of tables added to the diagram. To select a column, double-click it in the list.

Function

<All Functions>
The list of function categories to add to your query. Click the button and select a required category from the drop-down list. See the functions related to the selected category under the field.

Functions
Functions related to the selected category. To add a function to your query, double-click it in the list.

Operators

The list of operators such as (), +, -, to add to your query. Double-click a required operator in the list to add to your query.

Note

The appearance of the Operand Editor may slightly vary depending on a product you use.

See Also

Query Builder

Choose Target Table, Query Builder


Choose Target Table, Query Builder

This window appears when you are selecting different query types and you need to select a table to insert results, values, update or delete records.

Database
Choose the database to select a table from.

Tables and Views
Choose the needed table from the list.

Filter
Specify a filter for tables, if needed.

Click OK if you selected the table or Cancel to cancel the operation.

See Also

Query Builder


Object and Data Search

This section describes the windows that allow you to process database object search.

In This Section

dbForge Search Window
This topic describes the elements of the Search window.

Custom AutoFilter Window
This topic describes the elements of the AutoFilter window.

Filter Editor Window
This topic describes the elements of the Filter Editor window..


Search Window

Use the Search window to search for database objects and data.

Window Elements

Search objects by name and DDL
Click to start searching for database objects by name and DDL.

Search table and view data
Click to start searching for table and view data.

Search
Enter a search string in this box.

Find Options
Click to select an additional find option from the drop-down list box. The available options are Match Case, Match Whole Word and Use WildCards. By default, the Use WildCards option is selected.

Group results by object type
Click to group search results by type.

Object types/Objects
Select required object types/objects, in which the search will be performed.

Databases for search
Select a database to search in.

Connection for search
Select a connection for the search.

Search Results Grid

Name
Contains found objects.

Schema
Contains schemas with found objects.

Database
Contains databases with found objects.

Object type
Contains types of the found objects.

Found In
Contains either Name or Body values meaning that the object is searched either in object names or object DDL. The column is only available during the Search objects by name and DDL mode.

Matches Count
Contains the number of the search string matches in the table or view. The column is only available during the Search table and view data mode.

Buttons

Start Search
Click to initiate the search.

Stop Search
Click to stop the search.

Find in Object Explorer
Click to find a selected object in the Object Explorer.

Word Wrap
Click to set or clear the Word Wrap option for the object DDL in the Preview window. When the option is enabled, all the text shall fit the current width of the Preview window. The button is only available during the Search objects by name and DDL mode.

Show line numbers
Click to set or clear numbers for lines of the object DDL in the Preview window. The button is only available during the Search objects by name and DDL mode.

Edit Filter
Click to open the Filter Editor window, where you can fine tune filters for the search results.

Collapse Pane
Click to minimize the Preview window.

See Also

Custom AutoFilter Window

Object and Data Search


Custom AutoFilter Window

This topic describes the options of the Custom AutoFilter window.

Window Elements

Select an operator (1)
Select a first operator for the filter from the drop-down list.

Enter a value (1)
Enter a first value associated with the first operator.

And
Select to add a second operator to the filter.

Or
Select to add an alternative second operator to the filter.

Select an operator (2)
Select a second operator for the filter from the drop-down list.

Enter a value (2)
Enter a second value associated with the second operator.

OK
Click to apply the filter and quit the window.

Cancel
Click to quit the window without applying the filter.

See Also

Filter Editor Window

Object and Data Search


Filter Editor Window

This topic describes the options of the Filter Editor window. The window displays current filter conditions, which may be fine tuned with help of drop-down context menus and text boxed that appear when you click a parameter of the condition.

Buttons

Add
Click to add a condition

Delete
Click to remove the condition

OK
Click to apply changes and quit the window.

Cancel
Click to quit the window without changes.

Apply
Click to apply the filter conditions.

See Also

Object and Data Search

Custom AutoFilter Window


Security Manager

Use Security Manager to add, edit or delete user accounts, grant and revoke privileges. To call Security Manager, select [image] Security Manager from the Database menu.

The left part of Security Manager is a list of the user accounts. If an existing user account is selected in the list or a new one is being created, the right part of the Security Manager contains several tabs, that allow you to set up user account parameters.

In This Section

Security Manager Window
Describes the Security Manager toolbar options.

User Editor
Allows editing user account information. Appears when user node is selected.

Role Editor
Allows editing roles. Appears when role node is selected.

See Also

Managing Users and Privileges


Security Manager Window

The topic describes the options available in the Security Manager window.

Connection
Select the needed connection from the drop down list.

Group Users by Host
Groups users available in the user list by hosts.

Refresh
Refreshes user information.

Stop Refresh
Stops the refresh operation.

Save
Saves changes made to the user account that is being edited.

Undo
Cancels changes made to the user account that is being edited.

Script Changes
Generates SQL statements that will be executed to apply changes to the user account that is being edited.

Create User/Role
Creates a new user or role.

Delete
Deletes an existing user or role.

Note

The Role Editor is available for the MariaDB connections only.

Shortcut Menu Items

New User/Role
Opens editor for a new object.

Duplicate Object
Creates copy of the user account.

Generate Schema Script...
Generates user DDL.

Generate Script As

CREATE
A script to create the selected user will be generated.

DROP
A script to drop the selected user will be generated.

DROP and CREATE
A script to drop and create the selected user will be generated.

Delete
Deletes a user or users selected in the list.

Refresh
Refreshes user information.

Properties
Shows user properties in the Properties window.

See Also

Security Manager

User Editor, Security Manager


User Editor, Security Manager

Use User Editor to edit user account, to grant and revoke privileges and roles to or from it. User Editor has the following tabs:

In This Section

General, User Editor, Security Manager
Use General tab to set up general user account parameters.

Proxy, User Editor, Security Manager
Use the Proxy tab to set up parameters for a proxy user account.

Roles, User Editor, Security Manager
Use Roles tab to assign roles to a MySQL user account.

Global Privileges, User Editor, Security Manager
Grant or revoke system privileges to user account on this tab.

Object Privileges, User Editor, Security Manager
Grant or revoke object privileges to user account on this tab.

SSL, User Editor, Security Manager
Use SSL tab to set SSL-related options for a MySQL account..


General, User Editor, Security Manager

Use the General tab to set up general user account parameters.

Name
User name. It can be up to 16 characters long.

Host
Host, from which user can connect to server to use this account. Type '%' in host field or leave it empty to let the user connect from any host. You should make a separate account for user if it is necessary to connect from localhost. Set host with hostname (such as myserver.com) or by IP address. Use the special character "%" in a host name or in IP. For example, '%.mydomain.com' in a hostname means any host from domain 'mydomain.com'. '144.155.166.%' means any host from 144.155.166 class C subnet.

Authentication
Select the required plugin here for a proxy user account.

Authentication String
Fill in the proper authentication string for the plugin employed (if applicable).

Password
Input account password here.

Confirm Password
Repeat the password here to be sure it is correct.

Password Expire

Never
Select to disable password expiration for the account.

Interval
Select to set the password lifetime from the available options in the drop-down list.

Expire Date
Shows the date of password expiration.

Max. connections per hour
The number of times the account can connect to the server per hour.

Max. queries per hour
The number of queries that the account can issue per hour.

Max. updates per hour
The number of updates (statements that modify databases or tables) that the account can issue per hour.

Max. User's connections
The maximum allowed number of simultaneous connections for this account.

Account lock
Select to lock the account.

Note

The Password Expire and Account lock options are available only for server version 5.7.6 or higher.

See Also

Security Manager

Proxy, Security Manager


Proxy, User Editor, Security Manager

This tab is only available for managing proxy users.

Use the Proxy tab to set up parameters for a proxy user account.

Proxied User
Select proxy user(s) here.

With Grant Option
Tick the check mark here to entitle a proxied user with the Grant option.

See Also

Security Manager

Roles, Security Manager


Roles, User Editor, Security Manager

To make the process of assigning privileges to MySQL server users easier, the [image] Roles tab of Security Manager can be used.

A role is a set of privileges that can be granted to users. To assign a role, click on the user account you want to modify, go to the [image] Roles tab, and select the needed role or roles. To view the privileges available for each role, go to the [image] Global Privileges tab or click Selected privileges can be viewed on the Global Privileges link in the lower part of the tab.

Select All Checkbox
Check this check box to select all roles (in this case only the DBA role is active, as it includes all other roles). Clear it to clear all selections made.

Name
The name of the role.

Description
Description of the privileges the role grants.

Roles

· DBA - all rights are granted;
· DbManager - rights to perform any tasks at database level are granted;
· DbDesigner - rights to create and reverse engineer any database schema are granted;
· MaintenanceAdmin - rights required to maintain server are granted;
· BackupAdmin - minimal rights to backup any database are granted;
· SecurityAdmin - rights required to manage logins, grant and revoke privileges of server and database level are granted;
· ReplicationAdmin - rights required for setting up and managing replication are granted;
· ProcessAdmin - rights required to access, monitor, and kill any user process running on the server are granted;
· UserAdmin - rights required to create user logins and reset passwords are granted;
· MonitorAdmin - minimal set of rights required to monitor server are granted.

Note

Roles cannot be edited.

Selected privileges can be viewed on the Global Privileges link
Click to go to the Global Privileges tab to view assigned privileges or to view exact privileges assigned by a definite role (if you are sure that no privileges were granted to this user except this role).

See Also

Security Manager

Global Privileges, Security Manager


Global Privileges, User Editor, Security Manager

Grant or revoke system privileges to user account on this tab.

If multiple users are selected in the user list, privileges are marked as:

- granted to all users;

- granted to some of the selected users;

- granted to none of the users.

With Grant Option

Allows user to grant privileges to other users.

Global Privileges Grid

Name
The column holds the list of all global privileges.

Granted
Check or uncheck to grant or revoke all global privileges except With Grant Option. The status of the checkbox defines if any privileges are granted to the selected user.

Global Privileges

Alter
Allows use of ALTER TABLE.

Alter Routine
Alter or drop stored routines.

Create
Allows use of CREATE TABLE and CREATE DATABASE.

Create Routine
Allows user to create stored routines.

Create Tablespace
Allows user to create, alter, or drop tablespaces and log file groups.

Create Temporary Tables
Allows use of CREATE TEMPORARY TABLE.

Create User
Allows use of CREATE USER, DROP USER, RENAME USER, and REVOKE ALL PRIVILEGES.

Create View
Allows use of CREATE VIEW.

Delete
Allows use of DELETE.

Drop
Allows use of DROP TABLE.

Event
Allows to create events.

Execute
Allows the user to run stored routines

File
Allows use of SELECT ... INTO OUTFILE and LOAD DATA INFILE.

Index
Allows use of CREATE INDEX and DROP INDEX.

Insert
Allows use of INSERT.

Lock Tables
Allows use of LOCK TABLES on tables for which you have the SELECT privilege.

Process
Allows use of SHOW FULL PROCESSLIST.

References
Not implemented.

Reload
Allows use of FLUSH.

Replication Client
Allows the user to ask where slave or master servers are.

Replication Slave
Required for replication slaves (to read binary log events from the master).

Select
Allows use of SELECT.

Show Databases
Allows show all databases.

Show View
Allows use of SHOW CREATE VIEW.

Shutdown
Allows use of mysqladmin shutdown.

Super
Allows use of CHANGE MASTER, KILL, PURGE MASTER LOGS, and SET GLOBAL statements, the mysqladmin debug command; allows you to connect (once) even if max_connections is reached.

Trigger
Allows to create and drop triggers.

Update
Allows use of UPDATE.

See Also

Security Manager

Object Privileges, Security Manager


Object Privileges, User Editor, Security Manager

Grant or revoke object privileges to user account on this tab.

Show All
Show all databases of the current server.

Objects
Tree that contains database objects.

Available Privileges
List of available privileges for the selected database object.

(All Privileges)
Check to grant all available privileges or uncheck to revoke privileges.

Granted Privileges Grid
Grid, where the privileges granted to the selected user are listed. In the grid, privileges are marked with [image] if they belong to all selected users, and with [image] , if they don't belong to all selected users.

Revoke Selected Privilege
Click this button to revoke selected privilege from all selected users.

Revoke All Privileges
Click this button to revoke all privileges from the selected users.

See Also

Security Manager

SSL, Security Manager


SSL, User Editor, Security Manager

Use SSL tab to set SSL-related options for a MySQL account.

Authentication
Select the specific authentication method if it is required.

Not Required
Unencrypted connections are allowed if the username and password are valid.

SSL
Only SSL-encrypted connections for the account are allowed.

X509
The client must have a valid X509 certificate but that the exact certificate, issuer, and subject do not matter.

Specified
Specify required certificate issuer and subject and set required cipher. To connect to the server, client must have valid certificate, containing the specified subject and issued by the specified issuer, and specified cipher method should be used.

Issuer
Specify required certificate issuer here.

Subject
Specify required certificate subject here.

Cipher
Specify required cipher method here.

See Also

Security Manager

User List


Role Editor, Security Manager

Use the section to create and edit roles.

Note

The Role Editor is available for the MariaDB connections only.

In This Section

General, Role Editor, Security Manager
Set general role parameters on this tab.

Roles, Role Editor, Security Manager
Grant other roles to the selected role on this tab.

Global Privileges, Role Editor, Security Manager
Grant global privileges to role on this tab.

Object Privileges, Role Editor, Security Manager
Grant object privileges to role on this tab.


General, Role Editor, Security Manager

Use the General tab to configure the role name.

Name
Type the role name into this text box.

See Also

Role Editor, Security Manager

Roles, Role Editor


Roles, Role Editor, Security Manager

Use this tab to grant roles to the current role.

Grid with available roles contains the following columns.

Name
Role name.

Granted
Select to grant role to the current role.

Admin option
Select to grant role with admin option. It means that user can grant and revoke this role to or from any user or other role with or without admin option. The user can also alter or drop the role.

See Also

Role Editor, Security Manager

Global Privileges, Role Editor


Global Privileges, Role Editor, Security Manager

Use this tab to grant or revoke global privileges to the role.

With Grant Option

Allows granting privileges to other users.

Global Privileges Grid

Name
The column holds the list of all global privileges.

Granted
Check or uncheck to grant or revoke all global privileges except With Grant Option. The status of the checkbox defines if any privileges are granted to the selected role.

Global Privileges

Alter
Allows use of ALTER TABLE.

Alter Routine
Alter or drop stored routines.

Create
Allows use of CREATE TABLE and CREATE DATABASE.

Create Routine
Allows user to create stored routines.

Create Tablespace
Allows user to create, alter, or drop tablespaces and log file groups.

Create Temporary Tables
Allows use of CREATE TEMPORARY TABLE.

Create User
Allows use of CREATE USER, DROP USER, RENAME USER, and REVOKE ALL PRIVILEGES.

Create View
Allows use of CREATE VIEW.

Delete
Allows use of DELETE.

Drop
Allows use of DROP TABLE.

Event
Allows to create events.

Execute
Allows the user to run stored routines

File
Allows use of SELECT ... INTO OUTFILE and LOAD DATA INFILE.

Index
Allows use of CREATE INDEX and DROP INDEX.

Insert
Allows use of INSERT.

Lock Tables
Allows use of LOCK TABLES on tables for which you have the SELECT privilege.

Process
Allows use of SHOW FULL PROCESSLIST.

References
Not implemented.

Reload
Allows use of FLUSH.

Replication Client
Allows the user to ask where slave or master servers are.

Replication Slave
Required for replication slaves (to read binary log events from the master).

Select
Allows use of SELECT.

Show Databases
Allows show all databases.

Show View
Allows use of SHOW CREATE VIEW.

Shutdown
Allows use of mysqladmin shutdown.

Super
Allows use of CHANGE MASTER, KILL, PURGE MASTER LOGS, and SET GLOBAL statements, the mysqladmin debug command; allows you to connect (once) even if max_connections is reached.

Trigger
Allows to create and drop triggers.

Update
Allows use of UPDATE.

See Also

Role Editor, Security Manager

Object Privileges, Role Editor


Object Privileges, Role Editor, Security Manager

Grant or revoke object privileges to the role on this tab.

Show All
Shows all databases of the current server.

Objects
Tree that contains database objects.

Available Privileges
List of available privileges for the selected database object.

(All Privileges)
Select to grant all available privileges or clear to revoke privileges.

Granted Privileges Grid
Lists the granted privileges. In the grid, privileges are marked with [image] if they belong to all selected users, and with [image] , if they don't belong to all selected users.

Revoke Selected Privilege
Click this button to revoke the selected privilege.

Revoke All Privileges
Click this button to revoke all privileges.

See Also

Role Editor, Security Manager

Security Manager


Shortcut Keys

Several pre-defined keyboard shortcut collections are included in dbForge Studio. All shortcuts can be customized.

Global Shortcut Keys

The following shortcut key combinations can be used in any dbForge Studio document or tool window.

Icon | Command Name | Shortcut Keys | Description | Where is used
 | Database Explorer | CTRL+W, L | Open Database Explorer window | Global
 | Data Window | CTRL+W, D | Open Data window | Global
 | Properties Window | CTRL+W, P | Open Properties window | Global
 | Project Explorer | CTRL+W, S | Open Project Explorer window | Global
 | Output | CTRL+W, O | Open the Output window | Global
 | Error List | CTRL+W, E | Open Error List window | Global
 | Document Outline | CTRL+W, U | Open Document Outline window | Global
 | Schema View | CTRL+W, C | Open Schema View window | Global
 | Code Snippets | CTRL+W, T | Open Code Snippets window | Global
 | Data Viewer | CTRL+W, R | Open Data Viewer window | Global
 | Generate DDL | CTRL+D, D | Open Generate DDL wizard | Global
 | Find Object | CTRL+D, F | Open Find Object window | Global
 | Flush | CTRL+D, L | Open Flush dialog box | Global
 | Service Control | CTRL+D, R | Open Service Control window | Global
 | Session Manager | CTRL+D, S | Open Session Manager window | Global
 | Server Variables | CTRL+D, V | Open Server Variables window | Global
 | Security Manager | CTRL+D, Q | Open Security Manager window | Global
 | New Connection | CTRL+D, N | Show Database Connection Properties dialog box for a new connection | Global
 | Diagram Overview | CTRL+W, V | Open Diagram Overview window | Global
Document Management Shortcut Keys

These are default shortcuts. All shortcuts can be customized.

Icon | Command Name | Shortcut Keys | Action | Where is used
 |  | CTRL+TAB | Switch to last used document | Global
 |  | CTRL+SHIFT+TAB | Cycle through all open documents | Global
 |  | F7 | Cycle through document views | Global
 |  | SHIFT+F7 | Cycle through document views backwards | Global
 | Save | CTRL+S | Save current document | Global
 | Save All | CTRL+SHIFT+S | Save all documents | Global
 | Open | CTRL+O | Open document | Global
 | Close Document | CTRL+F4 | Close current document | Global
 | SQL | CTRL+N | New SQL document | Global
 | Pin Document/ Unpin Document | CTRL+ALT+P | Pin/unpin document | SQL document or database object editor
 | Print | CTRL+P | Print | Text or data view of a document Data window
 |  | CTRL+Mouse Wheel | Zoom font size in or out | Global
 |  | CTRL+PLUS SIGN (+) key | Zoom font size in | Global
 |  | CTRL+MINUS SIGN (-) key | Zoom font size out | Global
 |  | CTRL+0 | Reset font size to the default value | Global

Project Management Shortcut Keys

These are default shortcuts. All shortcuts can be customized.

Icon | Command Name | Shortcut Keys | Action | Where is used
 | Project | CTRL+SHIFT+N | New project | Global
 | Open Project | CTRL+SHIFT+O | Open a project | Global
 |  | F2 | Rename a project (refactoring) | Global

See Also

Reference


SQL Document

This section describes SQL Document user interface elements.

In This Section

SQL Editor
This topic holds information on what is SQL Editor and how to open it.

Edit Parameters Dialog Box
This topic describes content of dialog box where you can edit query parameters.

Execution History Window
This topic describes what elements are available in the Execution History window.


SQL Editor

The SQL editor is a word processing utility where you enter and edit SQL statements. The statements are colorized so you can easily read them.

You can open multiple SQL editors to view SQL code and copy and paste among them. A list of all open SQL editors is available in the Windows menu.

Every dbForge Studio document has Text View that is shown in SQL editor. You can use autocompletion and SQL history to speed up your work.

You can start SQL editor in several ways. For example:

1. Click File, point to New, and then click [image] SQL in the application main menu.
2. Click [image] New SQL on the Standard toolbar.
3. Switch to the Text View in Query Builder.

You can always save a SQL document for future use.

SQL Editor Interface Elements

Code Pane
An area where SQL code is displayed and edited.

Margin Indicator Bar
A gray area at the left of the editor. Margin indicators, such as breakpoints, bookmarks, current location of the execution point and others, are displayed there.

Selection Margin
White area between the margin bar and code. Click here to select the line.

Horizontal and Vertical Scroll Bars
Allows scrolling the code.

Navigation Bar
A bar with two boxes at the top of the editor. Allows navigating through DDL statements. Select database objects in the left box and subobjects of the selected object in the left box to navigate through DDL statements.

See Also

SQL Document

Edit Parameters Dialog Box


Edit Parameters Dialog Box

This window allows you to add, delete, or modify existing parameters in the query. Click [image] Edit Parameters button on the SQL toolbar to invoke this window.

Name
Displays the list of parameters that are currently used. Click on a parameter to select it and fill the fields to the right of the list with values that correspond to the selected parameter. Click it again to rename the parameter.

The following fields are specific for every parameter. Their content depends on what parameter is currently selected.

Type
Lets you choose the data type of the parameter.

Direction
Indicates whether the parameter is input, output, or bidirectional.

Null value
Specifies whether the value of this parameter is NULL. Checking this option clears the Value field.

Value
Value of the parameter. Note that character or date and time values should not be quoted. If you want to set value sample text you should just enter sample text without quotes.

See Also

Execution History Window

SQL Document


Execution History Window

Use the Execution History window to locate, edit and reuse queries executed within the preset period of time. To open the window, point to Other Windows in the View menu, and then click Execution History. Alternatively, press CTRL+Alt+H.

Search Pane

Search
Enter a search string in this box.

From
Specify search start date and time.

To
Specify search end date and time.

Executed Queries List

Status
Shows query execution status.

Query Text
Shows the first line of the query.

Executed On
Shows query execution date.

Duration
Shows query execution duration/

File
Shows name of the query file.

Server
Show name of the severs against which the query was executed.

Database
Show name of the database against which the query was executed.

User
Shows name of the user who executed the query.

Query Text

Shows the query DDL.

Buttons

Edit
Click to open query in a new SQL window for editing.

Word Wrap
Click to set or clear the Word Wrap option for the query DDL. When the option is enabled, all the text shall fit the current width of the window.

Show line numbers
Click to set or clear numbers for lines of the query DDL.

See Also

SQL Document

Reference


SQL Formatter Wizard

Use SQL Formatting wizard to format SQL code in multiple files or folders. To access SQL Formatter wizard, on the Tools menu, click SQL Formatter. Wizard pages are listed below.

In This Section

Formatting Mode, SQL Formatter Wizard
Select formatting mode on this page.

File List, SQL Formatter Wizard
Specify files to format on this page.

Folder List, SQL Formatter Wizard
Specify folders to format files in on this page.

Formatting Progress, SQL Formatter Wizard
You can see formatting progress on this page.


Formatting Mode, SQL Formatter Wizard

Select formatting mode on this page.

Files
Select to format the specified files.

Directories
Select to format the specified directories.

See Also

SQL Formatter Wizard

File List, SQL Formatter Wizard


File List, SQL Formatter Wizard

Specify files to format on this page. This page is available if you have selected Files on the previous page.

Selected folders
Files to format.

Add
Click to add files to format.

Remove
Click to remove the selected files from the Selected files list.

Keep modified files open after format
Select to open modified files before formatting. If selected, you may undo formatting changes in the opened documents.

See Also

Formatting Mode, SQL Formatter Wizard

Folder List, SQL Formatter Wizard


Folder List, SQL Formatter Wizard

Specify folders to format files in on this page. This page is available if you have selected folders on the previous page.

Selected folders
Folders to format SQL files in.

Add
Click to add folders to format files in.

Remove
Click to remove the selected folders from the Selected folders list.

Look at these file types
Specify the type of files for formatting to look for in the folder.

Keep modified files open after format
Select to open modified files before formatting. If selected, you may undo formatting changes in the opened documents.

Include sub-folders
Select to format files in sub-folders of the specified folders.

See Also

File List, SQL Formatter Wizard

Formatting Progress, SQL Formatter Wizard


Formatting Progress, SQL Formatter Wizard

You can see a formatting progress on this page. To cancel formatting, click the Cancel button.

See Also

Folder List, SQL Formatter Wizard


Schema Compare

This section describes all the wizards, documents, windows and other UI elements related to schema comparison and synchronization processes.

In This Section

Schema Comparison Wizard
Explains the elements of the Schema Comparison wizard and how to use them.

Schema Comparison Document
Describes how to manage object and DDL differences in the Schema Comparison document.

Schema Update Script Window
Describes how to preview synchronization script excerpts for any compared objects.

Generate Comparison Report Dialog Box
Describes how to generate comparison reports.

Schema Synchronization Wizard
Describes features of the Schema Synchronization wizard.


Schema Comparison Wizard

This section describes the pages of the Schema Comparison wizard and how to use them.

To open the Schema Comparison Wizard, on the Start page, click [image] Database Design, and then click [image] New Schema Comparison, or in the Database Explorer right click a required database, and then click New Schema Comparison from the shortcut menu.

In This Section

Source and Target, Schema Comparison Wizard
Tells how to select source and target schemas for comparison.

Options, Schema Comparison Wizard
Explains the options available to tune schema comparison.

Object Filter, Schema Comparison Wizard
Describes object types filter.

See Also

Schema Compare

Schema Comparison Document


Source and Target, Schema Comparison Wizard

Use the Source and Target wizard page to select source and target connections and databases for comparison. The page contains the following details:

Type
Select the type of comparison you want to implement: database, project.

Connection
Select a Source MySQL server connection in the left part of the wizard and a Target MySQL server connection in the right part. In the drop-down lists of the fields you can click the <Manage...> link to open the Connection Manager dialog box. It will help you to create, edit, and delete database connections.

Edit
Click to edit the selected connection. The Database Connection Properties dialog box opens.

New
Click to create a new connection for MySQL server. The Database Connection Properties dialog box opens.

Server version
Indicates the version of the selected server.

Database
Select a Source database located on the selected MySQL Server in the left part of the wizard and a Target database located on the selected MySQL Server in the right part. In the drop-down lists of these fields you can click the <Refresh...> link to refresh the list of databases available on MySQL Servers, if any changes were made.

Swaps the Source and Target settings.

Click to copy the Source settings to the Target.

Click to copy the Target settings to the Source.

See Also

Schema Comparison Wizard

Schema Comparison Document


Options, Schema Comparison Wizard

Use the Options wizard page to tune schema comparison.

General

Disable dependency analysis
FAST COMPARISON. When selected, the dependency building algorithms will be disabled. Only object types selected in the Object filter will be described. The synchronization script will not be generated.

Ignore auto increment table option
Select it to ignore auto increment table property during comparison.

Ignore average row length
Select it to ignore average row length property during comparison.

Ignore collations
When selected, column collations will be ignored during comparison and synchronization. Collations will be canceled if data type in the column was changed to a non-text one, regardless of whether you selected the Ignore collations option, or not.

Ignore column default values
When selected, default values in tables columns will be ignored during comparison and synchronization.

Ignore column data types
When selected, column data types will be ignored during comparison and synchronization. The column data types in the target tables will be preserved if possible.

Ignore DEFINER and SQL SECURITY clauses
Select it to ignore DEFINER and SQL SECURITY clauses for procedures, triggers, views and events.

Ignore ENDS clause
Select to ignore ENDS clause in event definition.

Ignore foreign keys
Select it to ignore foreign keys during comparison and synchronization. Foreign keys won't be restored after synchronization, for example, if a referenced column has no primary key.

Ignore permissions
When selected, security permissions will be ignored during comparison and synchronization. Target database permissions will be preserved if possible.

Ignore STARTS clause
Select to ignore STARTS or AT clause in event definition.

Ignore table engine
Select it to ignore table engine types during comparison. When this option is selected, the Ignore average row length and Ignore foreign keys are applied by default.

Auto Mapping

Associate column names having similar name options, XX%
When selected, similar column names (for example, 'column1' and 'column1a') will be considered equal. Click the '...' button to configure the similarity percent.

Ignore case in object names
When selected, cases in object names will be ignored during mapping and comparison.

Ignore spaces in object names
When selected, spaces in object names will be ignored during mapping and comparison.

Tables

Force column order
When selected, the column order will be preserved, and counts in tables difference. Otherwise difference in columns order will be ignored and objects will be equal.

Ignore NOT NULL constraints
When selected, NOT NULL constraints in tables will be ignored during comparison and synchronization, except cases when columns are included in PRIMARY KEY or SPATIAL INDEXES.

Ignore partitions
When selected, partitions will be ignored during comparison. During synchronization, an attempt to save existing partitions will be made.

Script Objects

Ignore case
When selected, any case differences in object body are ignored during comparison. For example, objects with case differences will have Equal status in the comparison results.

Ignore COMMENT objects
When selected, the COMMENT objects will be ignored during comparison. During synchronization, an attempt to save existing comments for different objects will be made.

Ignore comments
When selected, comments will be ignored during comparison of views, stored procedures, functions, etc. During synchronization, comments will be preserved in the body of script object.

Ignore synonyms for functions in source objects
When selected, the difference between the function names and the names of their synonyms will be ignored. Such functions as UPPER and UCASE, SUBSTRING and MID, CEILING and CEIL, CURDATE and CURRENT_DATE etc. will be considered identical.

Ignore white spaces
When selected, any differences in white spaces (new lines, tabs, spaces, etc.) will be ignored during comparison and synchronization. Original white spaces in the body of script object will be preserved during synchronization.

Triggers

Ignore table DML triggers
When selected, table DML triggers will be ignored during comparison and synchronization. If they prevent synchronization, triggers will be dropped and then restored. If a table is dropped, its triggers will be dropped regardless whether this option was selected or not.

Ignore firing order for DML triggers
When selected, the firing order for DML triggers will be ignored during comparison and synchronization.

Indexes and constraints

Ignore check constraints
When selected, check constraints will be ignored during comparison and synchronization. Check constraints won't be restored after synchronization. For example, if the data type of a column to which check constraints is related was changed, the check constraint condition may become invalid.

Ignore column order in indexes
When selected, the column order for the included columns will be ignored during comparison and synchronization.

Ignore constraint names
When selected, constraint names will be ignored during comparison and synchronization. Check constraints will be preserved in Target.

Ignore foreign key actions ON UPDATE and ON DELETE
When selected, the cascading referential integrity constraints for foreign keys will be ignored during comparison and synchronization.

Ignore fulltext indexes
When selected, fulltext indexes will be ignored during comparison and synchronization. If fulltext indexes are altered or deleted during synchronization, they will be restored, if possible.

Ignore indexes
When selected, indexes in tables and views will be ignored during comparison and synchronization. Indexes will not be restored after synchronization if, for example, one of their columns was dropped.

Ignore index names
When selected, index names in tables and views will be ignored during comparison and synchronization. Index names will be preserved in Target.

Ignore primary keys
When selected, differences in primary keys will be ignored during comparison and synchronization. Primary keys will not be restored after synchronization if, for example, one of their columns does not have the NOT NULL property.

Ignore spatial indexes
When selected, spatial indexes will be ignored during comparison and synchronization. If spatial indexes are altered or deleted during synchronization, they will be restored, if possible.

Keep objects in Target

Ignore indexes present only in Target
When selected, indexes that were dropped in Target will be ignored during comparison and synchronization of tables and views.

Ignore triggers present only in Target
When selected, triggers that were dropped in Target will be ignored during comparison and synchronization of tables and views.

Buttons

Save As My Defaults
Click this button to save current settings as your default settings.

Devart Defaults
Click this button to restore the application default comparison settings.

My Defaults
Click this button to restore your default comparison settings, previously saved with the Save As My Defaults button.

Other Elements

Save settings to a command line arguments file
Click to save settings of options to use them in an arguments file when comparing databases through the command line or scheduling a task.

See Also

Schema Comparison Wizard

Source and Target, Schema Comparison Wizard


Object Filter, Schema Comparison Wizard

Select check boxes next to required object types to include them in the comparison.

Select All
Allows you to select all the database object types.

Group by Server Version
Select the check box to group the list of supported object types by MySQL versions.

Note

In MySQL server versions 4.1 and lower, only tables are available. The rest of database objects are available in MySQL 5.0 and higher.

See Also

Schema Comparison Wizard

Schema Comparison Document


Schema Comparison Document

Use this document to see, analyze schema comparison results, and set up synchronization. It contains the following:

Comparison toolbar

The Comparison toolbar appears automatically when the Schema Comparison document opens. The toolbar contains the following buttons to help you manage comparison results:

Edit Comparison
Click it to change the Source and Target connections and databases. The Change Schema Comparison Properties wizard opens. Click the down arrow near the Group by field and select the corresponding option in the appeared menu.

Refresh
Click it to restart the comparison and refresh the comparison results.

Stop Execution
Click it to stop the comparison.

Group by:
Use it to filter the comparison results by their status, operation, object type, or cancel grouping.

Filter
Use it to filter the comparison results by their status. Click the down arrow near the Filter button and select the corresponding option in the appeared menu, e.g., to show only in Source objects.

View Schema Update Script
Click it to preview the synchronization script, generated by dbForge Studio, for any compared object. The Schema Update Script window opens.

Generate Comparison Report
Click it to preview the comparison report, generated by dbForge Studio. The Generate Comparison Report window opens.

Show Synchronization Wizard
Click it when you have reviewed the comparison results and want to synchronize them. The Schema Synchronization wizard opens.

Document Header
Document header shows:

1. The search field that allows you to find an object.
2. Source and Target databases with their connections.
3. Number of selected objects.

Grid
The grid shows the following details:

Type
Shows objects type that is being compared.

Source Object
The object of the Source database that will be compared with the corresponding object of the Target database.

Check box
Select the check boxes to include compared objects into synchronization. If you don't want to synchronize some objects, clear the check boxes for them.

Operation
The operation related to a compared object that will be executed during synchronization. You can click the Operation field and select other operation from the drop-down list. To avoid changing of the Target object during synchronization, you can select the None operation.

Target Object
The object of the Target database which contents you compare and synchronize with the Source one.

Text Comparer

Text comparer displays DDL differences of Source and Target objects. You can use the following buttons to customize the view of Text Comparer:

- click to show Text Comparer in a detached window.

- click to collapse Text Comparer

- click to expand Text Comparer. The button appears only if Text Comparer was collapsed previously.

- click it to turn on/off word wrap.

- click it to show or hide line numbers.

- click to view white spaces.

- click to switch to the hexadecimal view.

- click it to sort columns and constraints in alphabetical order.

- click to format the database object script.

Tip: To better understand comparison results, you can filter them by their status or name and group by their status, operation, and object type.

See Also

Schema Update Script Window

Schema Compare


Schema Update Script Window

Use the Schema Update Script window to preview a synchronization script for any compared object. To open the window, select any object (or several ones) in the grid and do either of these actions:

· Right-click the grid with comparison results and select View Schema Update Script from the shortcut menu
· Click the [image] View Schema Update Script button on the toolbar
· Click the View Schema Update Script button from the Comparison menu.

Also you can copy the synchronization script in the Schema Update Script window and paste into the SQL editor or other file for further editing or saving.

See Also

Generate Comparison Report Dialog Box


Generate Comparison Report Dialog Box

Use this dialog box to generate a report after schema comparison is completed. Select Generate Comparison Report from the Comparison menu to open the Generate Comparison Report dialog box. It contains the following details:

Format
Select what format you need for a comparison report. HTML and Excel are available.

Name
Change the default name for the comparison report file. Enter a required one.

Location
Change the default location to store the comparison report file. You can specify the location either manually or click the [image] button to select a required folder in the Browse for Folder dialog box.

Include
Select what objects to include into the comparison report, either objects with differences or all the objects selected for comparison. Besides you can include or exclude identical objects.

Group objects by
Select how to group objects to display in the comparison report.

View a report on completion
Select this check box if you want to see a generated comparison report opened.

See Also

Schema Synchronization Wizard


Schema Synchronization Wizard

Use Schema Synchronization Wizard to synchronize database differences. To access the wizard, click the Synchronize button on the Comparison toolbar. The wizard pages are listed below.

To switch between the wizard pages, either use the Next and the Back buttons or click page names on the left side of the wizard.

In This Section

Output, Schema Synchronization Wizard
Learn how to manage the synchronization script.

Options, Schema Comparison Wizard
Use the topic to specify general synchronization options.

Issues, Schema Synchronization Wizard
Learn how to resolve issues for synchronization actions.

Summary, Schema Synchronization Wizard
Use the topic to review the synchronization actions and warnings.

See Also

Schema Compare

Reference


Output, Schema Synchronization Wizard

Select output options to manage a synchronization script.

Open the synchronization script in the internal editor
Select the check box to open the synchronization script in an SQL document. The file name is generated automatically.

Save the script to a file
Select the check box to output your script to a file.

Browse
Click the button to specify the path to save a file.
Open in the internal editor
Select the check box to open the synchronization script in dbForge Studio for MySQL. The file name is generated by a user. If not selected, the synchronization script will not open.

Execute the script directly against the target database
Select the check box to synchronize the target database immediately without generating a synchronization script.

Refresh comparison results after synchronization
Select the check box to refresh comparison results after synchronization if synchronization was executed successfully.

See Also

Schema Synchronization Wizard

Options, Schema Synchronization Wizard


Options, Schema Synchronization Wizard

Select schema synchronization options.

Common

Check for object existence
When selected, an additional check will be added into synchronization script (into each object DDL) to verify the object existence in the target database.

Include USE <database_name>
When selected, the USE <database_name> clause will be added to the script.

Use DROP and CREATE instead of ALTER for tables
When selected, the ALTER statements will be replaced with the DROP and CREATE statements in synchronization script for tables. Data will be transferred to a new table.

Use DROP and CREATE instead of ALTER for views, procedures, and functions
When selected, the ALTER statements will be replaced with the DROP and CREATE statements in synchronization script for views, procedures, and functions.

Script comments

Exclude comments
When selected, comments generation will be prevented in synchronization script.

See Also

Schema Synchronization Wizard

Summary, Schema Synchronization Wizard


Issues, Schema Synchronization Wizard

Resolve issues for synchronization actions.

Column
A column that has a conflict with the specified constraint.

Action
To make the synchronization successful, specify the action to do with a conflict column.

Value
Specify a new column value.

Warning
Learn the messages of conflicts that can occur while synchronization.

See Also

Schema Synchronization Wizard

Summary, Schema Synchronization Wizard


Summary, Schema Synchronization Wizard

Review the synchronization actions and warnings.

Action Plan
Displays synchronization actions in the order in which they occur.

Search
Type filter string here. Use "_" symbol to substitute any character.

Expand All
Click to expand all synchronization actions.

Collapse All
Click to collapse all synchronization actions.

Warnings
Displays conflict messages.

See Also

Schema Synchronization Wizard

Schema Compare


Command Line Execution File Settings Dialog Box

Use this wizard to set up and create a command line execution file.

Command Line File Settings

The set of the available settings depends on the feature.

Data Comparison

Comparison Project
Select to load command line settings from the data comparison project file. Click "..." to specify path to the file.

Comparison Options
Select to include data comparison options into the command line execution file. Click "..." to configure the options with the Options Wizard. The set of options is identical to the one available in Options, Data Comparison Wizard.

Report
Select to compose a data comparison report. Click "..." to specify path to save the report.

Report format
Select format of the data comparison report.

Group by
Select grouping type for objects in the data comparison report.

Source
Select to include source connection into the command line execution file. Click "..." to configure a source connection with the Comparison Destination Wizard. The elements of the wizard are identical to the Source section of Source and Target, Data Comparison Wizard.

Target
Select to include target connection into the into the command line execution file. Click "..." to configure a target connection with the Comparison Destination Wizard. The elements of the wizard are identical to the Target section of Source and Target, Data Comparison Wizard.

Synchronization file
Select to generate a data synchronization file. Click "..." to specify the file location and name.

Synchronization Options
Select to include data synchronization options into the command line execution file. Click "..." to configure the options with the Options Wizard. The set of options is identical to the one available in Options, Data Synchronization Wizard.

Log file
Select to save data comparison results to a log file. Click "..." to specify the file location and name.

Arguments file
Select to load the arguments file. Click "..." to specify the file location.

Include Echo OFF
Select to enable the echoing option.

Schema Comparison

Comparison Project
Select to load command line settings from the schema comparison project file. Click "..." to specify path to the file.

Comparison Options
Select to include schema comparison options into the command line execution file. Click "..." to configure the options with the Options Wizard. The set of options is identical to the one available in Options, Schema Comparison Wizard.

Report
Select to compose a schema comparison report. Click "..." to specify path to save the report.

Report format
Select format of the schema comparison report.

Group by
Select grouping type for objects in the schema comparison report.

Source
Select to include source connection into the into the command line execution file. Click "..." to configure a source connection with the Comparison Destination Wizard. The elements of the wizard are identical to the Source section of Source and Target, Schema Comparison Wizard.

Target
Select to include target connection into the into the command line execution file. Click "..." to configure a target connection with the Comparison Destination Wizard. The elements of the wizard are identical to the Target section of Source and Target, Schema Comparison Wizard.

Synchronization file
Select to generate a schema synchronization file. Click "..." to specify the file location and name.

Synchronization Options
Select to include schema synchronization options into the command line execution file. Click "..." to configure the options with the Options Wizard. The set of options is identical to the one available in Options, Schema Synchronization Wizard.

Log file
Select to save schema comparison results to a log file. Click "..." to specify the file location and name.

Arguments file
Select to load the arguments file. Click "..." to specify the file location.

Include Echo OFF
Select to enable the echoing option.

Data Export

Connection
Select to include connection into the command line execution file. Click "..." to configure connection with Connection Manager Dialog Box.

Error mode
Select to enable the error mode. Select an error mode from the drop-down list box.

Output file
Select to specify the output file. Click "..." to specify the destination file, or directory for multiple export. The option is not available for the ODBC format.

Output table
Select to specify the output table.. Click "..." to specify destination table name. The option is not available for the SQL, ODBC and Access formats.

Range
Select to include the /range argument into the command line execution file. Specify value for the range of exported rows in the text field.

Single file
Select to make all data be exported into a single file, event if there are several source tables. The option is available for SQL export only.

Template file
Select to use a template file in the command line execution file. Click "..." to specify path to the template file.

Include Echo OFF
Select to enable the echoing option.

Data Import

Connection
Select to include connection into the command line execution file. Click "..." to configure connection with Connection Manager Dialog Box.

Error mode
Select to enable the error mode. Select an error mode from the drop-down list box.

Input file
Select to specify the the file with data you want to import. Click "..." to specify the file desitnation. The option is not available for the ODBC format.

Input table
Select to specify a table or view to import data from (for the Access and ODBC formats). Click "..." to specify the table destination and name.

Table
Select to specify a target table (a table where you want to insert the imported data).

Template file
Select to use a template file in the command line execution file. Click "..." to specify path to the template file.

Include Echo OFF
Select to enable the echoing option.

Data Report

Connection
Select to specify a connection. Click "..." to configure connection with Connection Manager Dialog Box.

Format
Select to specify the data report format. Click "..." to select the format from the drop-down list box.

Report parameters
Select to specify values for parameters declared in query script.

Report file
Select to specify input report file. Click "..." to specify the file path.

Result
Select to specify what to do with the result - save the report to disc, send it by email or FTP.

Result file
Select to specify name and destination path for the result file. Click "..." to specify the file path.

Execute Script

Database
Select to include a database connection into the command line execution file. Click "..." to configure connection with Connection Manager Dialog Box.

File
Select to specify an SQL or ZIP file with script to execute. Click "..." to specify the file location.

Encoding
Select to specify the encoding which should be applied to open and execute the script. Select the required encoding from the drop-down list box.

SQL Formatting

Connection
Select to specify a connection. Click "..." to configure connection with Connection Manager Dialog Box.

Encoding
Select to specify the encoding which should be applied to open and save files. Select the required encoding from the drop-down list box.

Profile
Select to select a file with formatting options. Click "..." to specify path to the file. If this option is not selected, default formatting options will be applied.

Log file
Select to save formatting log log file. Click "..." to specify the file path.

Source file
Select to specify a source SQL file. Click "..." to specify the file path.

Output file
Select to specify an output file where formatting results of a source file will be saved. Click "..." to specify the file path. If the option is selected, a source file is saved without changing. If the option is not selected, formatting results will be saved in the source file.

Data Generation

Project File
Select to load command line settings from the script generation project file. Click "..." to specify path to the file.

Connection
Select to specify a connection. Click "..." to configure connection with Connection Manager Dialog Box.

Password
Select to specify server password. It will override the password specified in the connection string.

Error Mode
Select to specify the application behavior when an error is encountered. To ignore all errors during data population specify 'ignore' To cancel the data population if any error occurs, specify 'abort'.

Echo OFF
If this option is enabled, all the text the the .bat file will be enclosed in the @Echo OFF...@Echo ON construct. This will disable the display of the commands being entered on the screen.

Keep opened
If this option is enabled, the pause will be paced at the end of the .bat file text. This will leave the command window open.

PowerShell
If this option is enabled, the "&" symbol will be generated at the beginning of the .bat file text. This will ensure the PowerShell compatibility.

Command Line Execution File Preview
Displays the editable preview of the command line execution file.

Validate
Click to check the validity of the command line syntax.

Save Parameters
Click to save parameters as an .xml file.

Save
Click to save command line execution file.

See Also

Reference


Service Windows

This section describes user interface elements of service windows and dialogs.

In This Section

New File Dialog Box
The topic describes the New File dialog box.

Error List
The topic describes the Error List that helps you speed application development.

Output Window
The topic describes the Output window that displays status messages for various features.

Properties Window
The topic describes the Properties window.

Edit Value Dialog Box
The topic describes the Edit Value dialog box.

Save of Read-Only File Dialog Box
The topic describes the Save Prompt dialog box.

Save Prompt Dialog Box
The topic describes the Save of Read-Only File dialog box.

Windows Dialog Box
This topic describes the dialog box that allows you to display, close, and arrange documents that are open in editors and designers.

Product Update Manager
This topic describes the dialog box that allows you to see the update information of dbForge Studio for MySQL.

Document Outline Window
Use the topic to navigate through an opened SQL document outline.

See Also

Reference


New File Dialog Box

Use this dialog box to add an item to the currently selected project. When you select an item from the Categories list, the appropriate files and references are added to your project.

To access this dialog box, choose New on the File menu, and then click File.

Categories
Lists the project item hierarchy.

Large Icons
Displays large icons for items in the templates pane.

Small Icons
Displays small icons for items in the templates pane.

Name
Enter the name of the file you want to create.

Create
Use this button to add the item to the current project.

Cancel
Click this button to close the New File dialog box.

Help
Click this button to invoke help.

See Also

Service Windows

Error List


Error List

The Error List contains errors, warnings, and messages with their location. To display the Error List, click the Error List button in the View menu. You can double-click error messages to locate errors quickly in multiple files.

The Error List window allows you to:

· Display the Errors, Warnings, and Messages produced as you edit and compile code.
· Find syntax errors
· Double-click any error message entry to open the file where the problem occurs, and move to the error location.
· Filter which entries are displayed, and which columns of information appear for each entry.

Error List Columns

Icon
Displays error or warning icon for the message.

Description
Display text of error or warning.

Location
Contains name of the document where the error occurred.

Line
Displays the line in the document, where the problem occurs.

Column
Shows the column on the indicated line where the problem begins.

Error List Shortcut Menu Commands

Goto Error
Opens the document on the place, where the error have occurred.

Copy
Copies the message to the clipboard.

Word Wrap
Enables or disables word wrap in the Description column of Error List.

Clear All
Clears Error List.

Error List Toolbar

Use the Errors, Warnings, and Messages buttons to select which entries to display.

Errors
Indicates the number of errors in the list. Click to toggle whether errors are displayed.

Warnings
Indicates the number of warnings in the list. Click to toggle whether warnings are displayed.

Messages
Indicates the number of messages in the list. Click to toggle whether messages are displayed.

In Active Document
Allows to review the errors, warnings, and messages either in the current document or in other opened documents.

See Also

Service Windows

Output Window


Output Window

This window can display status messages for various features. To display the Output window, select Output from the View menu.

Output messages can be divided into several categories. To view messages of the certain category click on its name on the Output window toolbar. If there is no such a name on the toolbar, right-click on the toolbar and select a required name from the shortcut menu.

General
Displays message statuses on general operations.

SQL Log
Displays all SQL queries executed by the application during the current session.

Debug
Displays output messages on debugging.

See Also

Service Windows

Properties Window


Properties Window

Properties window reflects properties of currently selected item in Database Explorer or Table Editor. Its content changes while you navigate through Database Explorer, switch between Table Editor views, alter objects.

To open it, click Properties on the View menu or press F4.

All properties in the grid are read-only. To modify a property of a database object, double-click it in Database Explorer. The changes are applied and rendered in the Properties window once you save the modified document.

See Also

Service Windows

Edit Value Dialog Box


Edit Value Dialog Box

Use this dialog box to enter the option value. This dialog can be opened by clicking the [image] button for corresponding option.

See Also

Service Windows

Save of Read-Only File Dialog Box


Save of Read-Only File Dialog Box

When an attempt is made to save a read-only file, Save of Read-Only File dialog box appears. It contains following buttons.

Save As
Click to save the file to a different location.

Overwrite
Click to remove file's read-only attribute and replace original file with the changed one.

Cancel
Click to cancel save operation.

See Also

Service Windows

Save Prompt Dialog Box


Save Prompt Dialog Box

When an attempt is made to close a document or project that is modified and not saved, Save Prompt dialog box appears. It comprises of list, containing modified project and documents, and buttons you can use to proceed. Documents are grouped by project and miscellaneous files.

Yes
Click Yes button to save selected documents and project. If a document is not implicitly named, a Save dialog will appear where you can give a name to the document.

No
Click No to discard all changes made to the documents you are closing.

Cancel
Click Cancel button to return to IDE without closing any of the documents.

See Also

Service Windows

Windows Dialog Box


Windows Dialog Box

Use this dialog box to activate, save, and close documents. To access this dialog box, in the Window menu, click Windows. Note that you must have at least one document open for this option to be available.

The Windows dialog box allows you to manipulate several documents at single click. The dialog is not closed when you apply any actions, so it is extremely useful when you have many documents currently open.

Windows list
All documents currently open are enumerated in the list. Click on a document's line to select or deselect it. Use Ctrl and Shift keys to perform group operations.

Activate
Click this button to view the selected document without closing the dialog. Available only when single document is selected in the list.

Save
Save selected documents.

Close Window(s)
Close selected documents. If some are not saved, a dialog appears where you can save them if you need.

Close
Close the current dialog.

See Also

Service Windows

Product Update Manager


Product Update Manager

Use this dialog to see the update information of dbForge Studio for MySQL.

To open the Product Update Manager dialog window, click the Check for Updates button in the Help menu.

To make dbForge Studio check for updates automatically:

1. In the Tools menu, click Options.
2. Expand the Environment folder in the Options window.
3. Check the Check updates on startup once a week check box.

The Product Update Manager window contains the following details:

Product information
This section shows the product's name, version, and file size.

Refresh
Click it to update the product information.

View revision history
Click it to view the history file of dbForge Studio for MySQL.

Devart authentication
Contains the Login, and the Password text boxes. Allows registered users to pre-save the login credentials.

Save downloaded installation
Check it if you want to save an installation file. Then you should specify the file location in the File name field.

File name
Enter the location of the installation file or click the Browse button to select it in the Browse for Folder dialog.

Browse
Click it to select the installation file location in the Browse for Folder dialog.

Just download a file (do not start installation)
Select it to download the installation file without starting it.

Update
Click it to start downloading the installation file.

Cancel
Click it to close the dialog. Note, this won't stop installation download. To stop downloading, close dbForge Studio for MySQL.

See Also

Service Windows

Reference


Document Outline Window

The Document Outline window shows a logical structure of an opened SQL document. To open the window, select Document Outline from the View menu.

You can use the Document Outline window to view and navigate through the following items:

· statements in SQL documents.
· queries in Query Builder.
· table shapes and their connections on a database diagram.
· elements of data reports.

See Also

Service Windows

Reference


Foreign Key (manually assigned) Generator

The Foreign Key (manually assigned) Generator generates foreign key values for a child table column based on the values contained in a parent table column. You can generate specific values for the parent table column referenced by the child table column. To do this, find the parent table column in the tree view, select the required generator and configure its settings.

The dialog box of the Foreign Key (manually assigned) Generator contains Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

Table
Choose a parent table.

Column
Choose a column in the parent table. Make sure that the child table column and the parent table column have compatible types.

See Also

Basic Generators

Lorem Ipsum Generator


Include Columns in Query

To use a column in a query, you must add it to the query. You may add a column to display it in query output, to use it for sorting, to search the contents of the column, or to summarize its contents.

To add an individual column

· In the Diagram Pane, select the check box next to the column that you want to include.

Alternatively

· In the Tabbed Editor, move to the first blank grid row, click the field in the Column column, and select a table and a column name from the drop-down list.

To add all columns for one table or table-valued object

· In the Diagram Pane, select the check box next to *(All Columns).

To add all columns for all tables and table-structured objects

1. In the Design Pane, select all tables.
2. Make sure no join lines in the Design Pane are selected.
3. Right-click any table and select Select all columns from the shortcut menu.

See Also

Building Queries with Query Builder

How To: Make Joins Between Tables


Join Tables Automatically

When you add two or more tables to a query, the Query Builder attempts to determine whether they are related. If they are, the Query Builder automatically adds join lines between the rectangles representing the tables or table-structured objects.

The Query Builder recognizes tables as joined in the following cases:

1. The database contains information that specifies that the tables are related.
2. If two columns, one in each table, have the same name and data type. The column must be a primary key in at least one of the tables. For example, if you add person and password tables, if the password_id column is the primary key in the password table, and if each table has a column called password_id with the same data type, the Query Builder will automatically join the tables.
3. The Query Builder detects that a search condition (e.g. the WHERE clause) is actually a join condition. For example, you might add the tables person and password, then create a search condition that searches for the same value in the password_id column of both tables. When you do, the Query Builder detects that the search condition results in a join, and then creates a join condition based on the search condition.

If the Query Builder has created a join that is not suitable to your query, you can modify the join or remove it. If the tool does not automatically join the tables in your query, you can create a join yourself.

Note

The Query Builder will create only one join based on columns with the same name and data type. If more than one join is possible, the Query Builder stops after creating a join based on the first set of matching columns that it finds.

See Also

Query with Joins

Join Tables Automatically

© 2004-2018 Devart


Join Tables Manually

When you add two (or more) tables to a query, the Query Builder attempts to join them based on common data or on information stored in the database about how tables are related. However, if the Query Builder has not joined the tables automatically, or if you want to create additional join conditions between tables, you can join tables manually.

You can create joins based on comparisons between any two columns, not just columns that contain the same information.

Note

Joins work fastest if the columns in the join condition have been indexed. In some cases, joining on unindexed columns can result in a slow query. it finds.

To manually join tables or table-structured objects:

1. Add to the Design Pane the objects you want to join.
2. Drag the name of the join column in the first table or table-structured object and drop it onto the related column in the second table or table-structured object. You cannot base a join on text, ntext, or image columns.

Note

The join columns must be of the same (or compatible) data types. For example, if the join column in the first table is a date, you must relate it to a date column in the second table. On the other hand, if the first join column is an integer, the related join column must also be of an integer data type, but it can be a different size. The Query and View Designer will not check the data types of the columns you use to create a join, but when you execute the query, the database will display an error if the data types are not compatible.


Object Editors Dialog Box

The Object Editors subsection of Environment Documents of the Options window contains the following options:

Options

One main document view
All views corresponding to the opened SQL document are visible. You can activate the needed view by clicking the corresponding tabs.

All views tabbed
Only one view corresponding to the document is visible, all others are tabbed. Click the needed tab for the corresponding view to be shown on the screen.

Show Data view for every Table and View editor
Check this option to show or hide the Data tab when editing tables or views.

Use transactions
Check this option to use transactions in object editors.

Show output parameters after procedure/function execution
Click the option to display the output parameters after execution of a procedure or a function. The option is checked by default.

Stop script execution on the first error
Check the option to stop the execution of a script when the first error occurs.

Open object editors in the same window
If selected, all new object editors will be opened "unpinned". That means, when opening a database object with already opened database object of the same type, object editor of already opened object will be replaced with object editor of the opening object. This option doesn't work with stored procedures and functions.

Open source objects in the same window
If selected, all new source object editors will be opened "unpinned". This option works with stored procedures and functions.

See Also

Documents, Environment, Options Dialog Box

Projects, Environment Options Dialog Box


Query with Joins

A query result can include data from multiple tables or table-valued objects. To combine data from multiple table-valued objects, you use the JOIN operation from SQL.

In This Section

Join Tables Automatically
Describes automatic table join.

Join Tables Manually
Describes how to join tables manually.


Welcome to dbForge Studio for MySQL

Thank you for choosing dbForge Studio for MySQL!

dbForge Studio for MySQL Overview

dbForge Studio is a powerful and comprehensive MySQL GUI tool that provides a complete set of instruments for server management and administration. It offers tools for database development, administration tools, and SQL query tools. Combination of the very best features of existing MySQL front ends and MySQL GUI tools makes dbForge Studio the perfect choice for a database developer and administrator as well as for a novice user.

Where to start

To start using dbForge Studio for MySQL, see Getting Started section. The guide helps you get started quickly by describing how to setup a new database connection, and provides an explanation of the key steps for basic database operations.

See Also

Getting Started