Welcome to dbForge Studio for SQL Server

Thank you for choosing dbForge Studio for SQL Server!

dbForge Studio for SQL Server Overview

dbForge Studio for SQL Server is a powerful IDE for SQL Server administration, development, data reporting and analysis. The tool will help SQL developers to manipulate databases, speed up routine tasks, as well, as to make complex database changes.

Where to start

To start using dbForge Studio for SQL Server, 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-2017 Devart


What's New in dbForge Studio for SQL Server, v5.5

SQL Server support

· SQL Server 2016 Service Pack 1 (SP1) new syntax support
· SQL Server 2017 CTP2.0 new syntax support
· Azure SQL Data Warehouse connectivity support

Code Completion

· Column match highlighting in the INSERT statement
· Database element dropping from the prompt in Completion List
· Possibility to exclude a scheme in the ON condition of the JOIN statement
· Possibility to connect/disconnect when describing/pre-describing objects of the same database
· Query surfing
· CASE END highlighting
· Extended prompting in the PIVOT/UNPIVOT queries
· Extended support for CTE
· Prompt and QI of variables in named transactions
· Support for CREATE OR ALTER

SQL Document

· Query execution history

Data Compare

· Static Data comparison in Script Folder
· Support for MASKED columns
· Option to automatically select a key for comparing objects without a suitable unique key
· Added option to turn ON\OFF Generation of IF NOT EXISTS on inserting
· Possibility to open the comparison wizard instead of the comparison autorun when opening the dcomp files

Schema Compare

· Support for External Objects
· Support for MASKED columns
· Azure v.12 Extended Support
· Support for SECURITY POLICY object
· Support for Column Encryption Keys
· Support for Column Master Keys
· Extended support for comparison of SQL Server 2014-2016 backup files
· New Database creation through Schema Comparison Master
· Redesigned logging in command line
· Possibility to open the comparison wizard instead of the comparison autorun when opening the scomp files

Documenter

· Generation of documentation in the Markdown format.

Data Generator

· Storing custom generators
· Generating data by time
· Generating data to already available data
· Generating data by a linked table
· Pre and Post Script Execution

Source Control

· Added authentication capability for VS Online
· TFS 2017 support
· SourceGear Vault v9.1 support
· SourceGear Vault v10.0 support
· Surround SCM support

Index Manager

· The Command Prompt provides scan results of index analysis including index name, reason, and fragmentation.

Connectivity

· Each file creates its own connection
· Password change on expiry
· Keyboard shortcut for selecting connection and database assigned

Activity Monitor

· Possibility to monitor CPU and memory utilization
· Table of data IO
· Displays information about waits, including its type, resource, a number of waits on this wait type, and more
· Database metrics
· Query profiling with top operations and plan in XML format
· Information about active sessions and database backups

Other improvements

· Command-Line Master
· Generate Script As redesigned
· Express Edition extended with ability to manage table partition

See Also

Welcome to dbForge Studio for SQL Server

Editions


Editions

dbForge Studio for SQL Server comes in four editions: Enterprise, Professional, Standard and Express.

Enterprise is the ultimate edition that, in addition to all essential features of the Professional edition, includes Source Control and Unit Test tools, support for version control during schema comparison and support for script folder during schema comparison.

Professional is a fully-featured edition that provides additional functionality such as: Source Control, Database Synchronization, Data Reports, Pivot Table Designer, and advanced SQL Coding Assistance. This edition also includes support for command-line interface for some components that allows you to automate routine operations.

Standard edition extends the Express edition's functionality with T-SQL Debugger, Query Profiler, advanced SQL Coding Assistance features, and database search options. Moreover, this edition includes enhanced Query Builder and data Export/Import features.

Express is a free edition that provides basic functionality for database development. It includes database Object Editor, security configuration tools, advanced Data Editor, and Export/Import from CSV and ODBC. Also this edition has basic support for SQL Coding Assistance and limited Query Builder features.

The table below represents comparative data of available editions of dbForge Studio for SQL Server.

Features | Enterprise | Professional | Standard | Express
SQL Coding Assistance
Code Completion |  |  |  |
Code Formatter |  |  |  |
Command-line interface for SQL formatting |  |  |  |
Code Formatter Profiles |  |  |  |
Syntax Check |  |  |  |
SQL Snippets |  |  |  |
Quick database object information |  |  |  |
"Go to definition" for database objects |  |  |  |
SQL Refactoring |  |  |  |
Phrase Completion |  |  |  |
Custom Alias Mapping |  |  |  |
Semicolon insertion |  |  |  |
Pair highlighting |  |  |  |
T-SQL Code Analyzer |  |  |  |
Database Design
Visual Database Editor |  |  |  |
Database Diagram tool |  |  |  |
Visual Table Editor |  |  |  |
Visual View Editor |  |  |  |
Table DDL instant editing in T-SQL view of Visual table designer |  |  |  |
Object Dependencies Viewer |  |  |  |
Database Synchronization
Database Schema Snapshot Creation |  |  |  |
Database Schema Script Folder Creation |  |  |  |
Schema Comparison Tool |  |  |  |
Command-Line Interface for Schema Comparison |  |  |  |
Schema Comparison Custom Object Mapping |  |  |  |
Schema Comparison Schema Snapshot Support |  |  |  |
Schema Comparison Backup Support |  |  |  |
Schema Comparison Script Folder Support |  |  |  |
Schema Comparison Version Control Support |  |  |  |
Data Comparison Tool |  |  |  |
Command-Line Interface for Data Comparison |  |  |  |
Data Comparison Backup Support |  |  |  |
Source Control
Source Control Manager |  |  |  |
View Objects History |  |  |  |
SVN, TFS, P4, Vault, GIT, Mercurial support |  |  |  |
Support for version control command-line client |  |  |  |
Plastic SCM predefined template |  |  |  |
Undo Local Changes |  |  |  |
Debugging and Diagnostics
T-SQL Debugger |  |  |  |
T-SQL Profiler |  |  |  |
T-SQL Unit Test |  |  |  |
Data Manipulation and Reporting
Data Editor with in-place filtering, grouping, and sorting |  |  |  |
Data Report Tool |  |  |  |
Command-line interface for Data Report |  |  |  |
Pivot Table Designer |  |  |  |
Master-Detail Browser |  |  |  |
Visual Query Builder |  |  |  |
Administration
Copy Database wizard |  |  |  |
Database Backup/Restore wizard |  |  |  |
Database Attach/Detach wizard |  |  |  |
Server Event Profiler |  |  |  |
Index Manager |  |  |  |
Command-line interface for index management |  |  |  |
Data Pump
Data Export/Import wizard |  |  |  |
Command-line interface for Data Export/Import |  |  |  |
Generate Scripts wizard |  |  |  |
Command-line interface for script generation |  |  |  |
Data Generation
Generate Random Data with inter-column dependency support |  |  |  |
Generate Data with RegExp and Python support |  |  |  |
Generate JSON data on the basis of template |  |  |  |
Check Constraint generator |  |  |  |
Generate Meaningful Data with 200+ predefined generators |  |  |  |
Create User Defined Data Generators |  |  |  |
Command-line interface for data generation |  |  |  |
Security Manager
Visual editors for logins, users and roles |  |  |  |
Visual editor for schemas |  |  |  |
Visual tool for object permissions setup |  |  |  |
Batch setup of permissions and role membership |  |  |  |
Other Features
Database Explorer window with multi-selection tree |  |  |  |
Filter settings in Database Explorer |  |  |  |
Object Viewer for browsing of schema object properties |  |  |  |
Search |  |  |  |
Opened tabs restore when application starts |  |  |  |
Connection coloring |  |  |  |
General
SQL Server 2014, 2012, 2008, 2005 support |  |  |  |
SQL Server 2016 support |  |  |  |
SQL Server 2000 support |  |  |  |
SQL Azure support |  |  |  |
Amazon RDS support |  |  |  |
Support for command-line interface |  |  |  |
Full shortcut customization |  |  |  |
Wizards for exporting/importing user settings |  |  |  |
Support of multiple monitors |  |  |  |

1 Context-sensitive object suggestions available only for the SELECT, DML, DROP, EXEC, SET, and USE statements.

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

3 Only basic information about an object is shown.

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

5 The number of tables is limited to 3, sub-queries are not supported.

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 Limited functionality.

8 The number of formatting options is limited.

See Also:

Welcome to dbForge Studio for SQL Server

Requirements


Requirements

dbForge Studio for SQL Server requires the following:

· Microsoft Windows 7/8/8.1/10, and Windows Server 2008/2012
· .NET Framework 4.5.2* or higher.
· 2 GHz or higher processor
· 1024 MB RAM
· 150 MB of free hard disk space

*You can download .NET Framework here.

Note

.NET Framework is pre-installed in Microsoft Windows 8/8.1, and Windows 10.

See Also

Welcome to dbForge Studio for SQL Server

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-2017 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 SQL Server

Previous Releases


Previous Releases

In This Section

What's New in dbForge Studio for SQL Server, v5.4

What's New in dbForge Studio for SQL Server, v5.3

What's New in dbForge Studio for SQL Server, v5.2

What's New in dbForge Studio for SQL Server, v5.1

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

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

What's New in dbForge Studio for SQL Server, v4.0

What's New in dbForge Studio for SQL Server, v3.8

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

What's new in dbForge Studio for SQL Server, v3.0

What's New in dbForge Studio for SQL Server, v2.0


What's New in dbForge Studio for SQL Server, v5.4

Schema and Data Comparison

· New comparison options
· Comparison and synchronization of memory-optimized tables
· Command-line interface for the scripts folder comparison
· Database creation right in the Schema Comparison Wizard
· Extended comparison reports functionality
· Support for SECURITY POLICY objects
· Data comparison and synchronization of system-visioned tables

Query Profiler

· Live query statistics
· Wait Stats tab
· Saving/Opening execution plan files
· Table I/O
· Highlighting potentially resource-intensive statements
· Displaying clustered columnstore indexes in execution plan

Data Export/Import

· Dramatically improved data import performance
· Export/import of JSON data
· Redesigned export/import of XML data
· Preview of the generated UPDATE script in the wizard
· Detection of column types when importing data from the Excel format
· Execution of SET IDENTITY_INSERT ON when the Repopulate option is enabled during data import

Data Generator

· Generation of country-specific data
· The ISJSON function in Check Constraint generator
· 10+ new generators, including ICD-10 Codes
· Data generation for databases already filled with data
· Improved DateTime generators

Database Documenter

· Support for the command-line interface

Source Control

· Defining object file name format in Source Control and Scripts Folder creation
· Creation of the script folder via the command-line interface

Data Viewer and Editor

· Spatial View - Geometry

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
· Showing the connection color in the status bar

Other Improvements

· Support for Power Shell
· Trial product activation
· Greatly improved visual style of the application
· Specific exit codes are added
· Compliance with FIPS
· Support for Azure Active Directory Authentication

See Also

Previous Releases

What's New in dbForge Studio for SQL Server, v5.3


What's New in dbForge Studio for SQL Server, v5.3

Documenter

· Obtain an overview of the database schema
· Include self-documenting SQL objects
· View inter-object and inter-database dependencies
· Customize documentation styles
· Generate documents in HTML and PDF files

Data Generator

· Improved XML Generator
· Improved Foreign Key Generator
· Improved Check Constraint Generator
· 15+ new and improved meaningful generators

Data Editor and Viewer Window

· Improved XML View
· New JSON View

Other improvements

· Vault 9 is supported for Source Control
· Styled icons are used by default

See Also

Previous Releases

What's New in dbForge Studio for SQL Server, v5.2


What's New in dbForge Studio for SQL Server, v5.2
· SQL Server 2016 support
· Totally redesigned Database Search (objects and data)
· Redesigned Visual Table Editor
· Visual View Editor
· Improved SQL Completion:
o Objects suggestions in CROSS/OUTER APPLY statement
o Suggestion of compound phrases
o Improved suggestion performance
o Several Formatter options and profiles
· Improved and enhanced Schema Comparison Tool
· Improved Source Control:
o Support for version control command-line client
o Plastic SCM predefined template
o Undo Local Changes
· Improved Data Generation:
o Updated RegExp and Python generators
o JSON generator
o Check Constraint generator
o 15+ new meaningful generators
· Command-line interface for index management

See Also

Previous Releases

What's New in dbForge Studio for SQL Server, v5.1


What's New in dbForge Studio for SQL Server, v5.1

Index Manager

The tool allows you to quickly collect index fragmentation statistics and detect databases that require maintenance.

· Multiple database scan
· Export of scan results
· Customizable index fragmentation thresholds
· T-SQL script generation

Unit Test

The tool is based on the open-source tSQLt framework, so SQL developers can benefit from writing unit tests in regular T-SQL.

· T-SQL for implementing tests
· No affect on actual database
· In-isolation testing
· Run multiple tests in less time

See Also

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

Previous Releases


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

Source Control

· Support for Subversion (SVN), Team Foundation Server (including TFS Cloud), Git (including GitHub), Perforce (P4), Mercurial, SourceGear Vault systems
· Source-controlling a working folder
· Source Control Manager
· View Changes History Window
· Resolve Conflicts

Data Generator

· 180+ meaningful generators
· Enhanced RegExp and Python generators
· Constant generator, Files Folder generator, Foreign Key generator, Lorem Ipsum generator, Shuffled Text generator, Twaddle generator, SQL Query generator, Table or View generator, Text File generator, Uniqueidentifier generator, Weighted List generators
· Creating user-defined generators
· Support of composite foreign keys
· Matching for more intelligent table mapping
· Command-line interface

Code Completion

· New snippets
· UPDATE statement expansion
· Custom alias mapping
· Pair highlighting
· SQL refactoring
· Semicolon insertion
· Phrase completion
· Support of the following statements: MERGE, CREATE DATABASE, ALTER DATABASE, DROP DATABASE, BACKUP DATABASE, EXEC sp_attach_db, EXEC sp_detach_db, CREATE STATISTICS, UPDATE STATISTICS, DROP STATISTICS, CREATE INDEX, ALTER INDEX, DROP INDEX, ENABLE TRIGGER, DISABLE TRIGGER

Database Synchronization

· Database script folder - create, compare & sync
· Comparison with database script folder in version control

See Also

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

Previous Releases


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

SQL Server Data Generator

· Fast generation of large volumes of test data
· Parameters customization for each column data type
· Preview of test data to be generated
· Generated data can be executed against a database or exported to an SQL script

Schema Compare and Sync

· Improved text comparer
· Option to show text comparer in a detached window
· Preview tooltip for previewing differences in statements with a large number of lines
· Information pane for indication of comparison and synchronization source and target
· Redesigned display of database objects in grid

Data Compare and Sync

· Information pane for indication of comparison and synchronization source and target
· Redesigned display of database objects in grid

Data Export and Import

· Displaying progress bar for data import/export process

SQL Document

· Updated query execution pane

See Also

Previous Releases

What's New in dbForge Studio for SQL Server, v4.0


What's New in dbForge Studio for SQL Server, v4.0

Administration

· Profile Server Events Wizard

SQL Editing and Execution

· T-SQL Analyzer
· Command line interface for SQL formatting
· Changing a snippets folder location
· Query execution pane
· Easy way to hide results
· Encoding switch in the /execute command line operation
· MERGE statement support (syntax checking, formatting)
· Phrase completion
· Updated Find&Replace feature in documents and files
· Completion list support
· Statements formatting support

Database Explorer

· Alternative ways to create a new object
· Generate Script As shortcut menu item for check and default constraints
· Sending objects to a database diagram
· Renaming columns and indexes
· Displaying the objects number

Security Manager

· Creating new schemas and displaying all existing ones

Object Editors

· Completely redesigned Index Editor
· Updated Check Constraint Editor
· Updated Database Editor
· Support of user types when working with tables

Schema Compare

· Custom mapping for objects by their names
· Updated Synchronization Wizard
· sp_refreshview option

Data Compare

· Ignore difference in end_of_string option
· Show white spaces option
· Ignore computed columns option

Data Report

· Support of command line interface

Query Profiler

· Diagram printing options for a Query Profiler Plan Diagram

Data Editor

· Data Viewer and Data Editor are in one control

Data Export and Import

· Updated Import and Export Wizard

Generate Script

· SQL Azure support

Other Features and Improvements

· Online documentation
· Support of multiple monitors
· Modeless Create Schema Snapshot and Data Report Wizard windows
· Improved application performance when executing a query, opening a table, designing a diagram, and building a query in the Query Builder

See Also

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

What's New in dbForge Studio for SQL Server, v3.8


What's New in dbForge Studio for SQL Server, v3.8

SQL Server 2014 is supported

Database

· Generate Script As shortcut menu option is added
· Database Visual Editor is added
· Database Backup and Restore features are added
· Possibility to attach and detach a database is added
· Take Offline and Bring Online database states are added
· Copying a database from one server to another using the MS Agent is possible now

Generate Schema Script

· Saving the options setting for future use
· Support of command line interface
· Automatic archiving of schema export scripts
· Writing a report about the process into a log file
· Automatic removing old files based on date or quantity

Database Explorer

· Filter settings are available now
· Objects' dependencies view is supported
· Possibility to duplicate an object is added
· Renaming a table through the Database Explorer is possible
· Delete shortcut menu command is available for all objects' types
· Disable and enable trigger's menu options are added
· Each database state has its corresponding icon now
· Changing an object name is possible now

Object Editors

· Code preview when editing columns, indexes, etc. is possible now
· Index editor is improved
· Database editor is added

Code Completion

· New CREATE COLUMNSTORE INDEX statement syntax is supported
· New keywords in the CREATE TABLE statement are supported
· New keywords in the CREATE INDEX statement are supported
· New keywords in the CREATE PROCEDURE statement are supported
· Members prompt for user-defined table type is supported
· Refactoring aliases is possible now

Data Compare/Schema Compare

· Columnstore index is supported
· Check for object existence option is added to the synchronization wizard
· Ignore column order in indexes option is added
· ALTER SCHEMA feature for objects transferring between the schemas is supported
· Include print comments option is added
· Exclude comments option is added

SQL Profiler

· Query plans can be saved visually
· Results comparison is executed when the required elements are selected
· Various queries plans can be shown vertically in one view when comparing
· Buffer and plans cache refresh options are added
· Zoom menu in the Profiler diagram is available

User Interface

· Switching tabs by the CTRL+ALT+PAGE UP and CTRL+ALT+PAGE DOWN keys combination
· SSMS shortcut schema availability

Other Features and Improvements

· Coloring a database connection according to the document category is possible now
· Database connection properties are expanded
· SET connection options in query execution are added
· Possibility to switch from the wizard page to the main application window is added
· Find Objects feature is expanded
· Restoring the documents opened in the last session is possible now
· SQL document zooming by holding the CTRL key and rotating the mouse wheel is added

See Also

Previous Releases

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


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

Brand new SQL Formatter component

We have revised and improved this essential component. Pivotal new formatting features include:

Formatting profile introduced

· Formatting preferences stored in an individual file

Personalize SQL formatting settings and save them in a single .xml file for convenient handling.

· Multiple formatting profiles and profile import supported

Activate whichever profile that suits your needs best, import and export profiles.

· Single-profile for multiple workstations

Share your settings with colleagues to meet the company's code-formatting standards.

New formatting options editor

· Option quick search

Use quick search filter when editing formatting settings.

· Sample code displays formatting according to current formatting settings

Instant preview for introduced changes.

· Editable sample code formatting preview

Insert a piece of your own code into the preview field to see the way it looks like with applied SQL Complete formatting settings.

Enhanced formatting settings

· Any SQL-statement formatting can now be adjusted independently and more precisely

Get unique formatting for each statement type.

· Formatting settings for sub-queries added

Now sub-queries can be formatted separately from the queries and sub-queries of other query types.

Word recognition for different identifier cases

· Switch between UPPER, lower or CamelCase - individual words will still be recognized.

Independent built-in datatype case formatting settings

New SQL code refactoring features

With the new version, we are taking the product to a new level.

Code and database identifier case synchronization

If your database identifiers were created according to certain adopted rules, then you will have no problem transforming SQL script identifier case to that of the database.

Stored procedure call expansion

It takes a single click to transform EXECUTE statement into a code block containing the procedure body. Execution logic is preserved, which allows easier code debugging.

Refresh suggestions cache

· Automatic suggestions cache refresh by specified time is added
· New option: Refresh suggestions cache on detecting changes on a server

New code completion features

· SET IDENTITY INSERT tables suggestion is added
· XML variables suggestion in the FROM statement is added
· Column suggestion in the VALUES statement is added
· Object suggestion for linked servers on SQL Azure is added
· Table order in ON condition of suggested JOIN clause can now be reversed. Behavior can be toggled in the options menu
· Inserted columns in SELECTs are now automatically qualified with a table alias. Behavior can be toggled in the options menu
· Functions are now inserted from suggestion list with braces
· 'Refresh Local Cache' and 'Refresh Suggestions' commands now use the same shortcut
· ALTER TABLE statement now has context-sensitive identifier suggestion
· 'Run Current Statement' command usability slightly improved
· The Express edition has been enhanced with code completion for temporary tables

New code formatter features

· New Option: Add empty line after GO
· New Option: Enclose identifiers within square brackets []New Option: Add parentheses when inserting functions
· New Option: Enable autoformat words while typing
· New Option: Alias Text Case - As in declaration
· Code formatter functionality is available even if SQL Complete is disabled
· Do not format tag is implemented. Now it is possible to format a whole SQL document in the editor ignoring selected code fragments which you do not want to be formatted.

Improvements

· Lots of snippets are added
· Objects describe performance is improved

See Also

Previous Releases

What's new in dbForge Studio for SQL Server, v3.0


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

dbForge Studio for SQL Server is renamed to dbForge Studio for SQL Server and incorporates such tools as SQL Complete, Data Studio, Schema Compare, Data Compare and Query Builder for SQL Server.

Product Editions

dbForge Studio for SQL Server comes in four editions:

· Free Express edition with basic functionality for database development
· Standard edition extends the Express edition's functionality with T-SQL Debugger, Query Profiler, advanced SQL Coding Assistance features, etc.
· Professional fully-featured edition that provides additional functionality
· Data edition includes all the functionality of the discontinued dbForge Data Studio for SQL Server

Major New features

· Table Designer:
· Visual editors for table properties
· Editor for table creation script
· Tables rebuild when complex changes are introduced
· Changes preview before modifying a database object
· Database Diagram:
· Visual editing, easy manipulation, and scaling
· Containers for grouping objects
· Printing large diagrams
· Virtual connections
· T-SQL Debugger integrated into the stored procedure editor allows starting debugging from the Database Explorer tree
· Query Profiler for locating bottlenecks and optimizing query execution time with advanced options unavailable in a standard tool
· Security Manager that incorporates visual editors for logins, users, and roles; batch object editing, etc.

Other features

· Generate Script As in Database Explorer feature is added
· Procedure, function, synonym, and sequence editors is added

See Also

Previous Releases

What's New in dbForge Studio for SQL Server, v2.0


What's New in dbForge Studio for SQL Server, v2.0

SQL Intellisense

Taking into account our users needs and expectations we have integrated the functionality of SQL Complete Express Edition into dbForge Data Studio for SQL Server. Owing to that, the new release introduces users to the following enhancements:

· Context-sensitive code completion and object suggestions for SELECT, DML, DROP, EXEC, SET, and USE statements
· Smart filtering of the suggestion list based on user input
· Parameter information for functions
· Quick object information available from SQL editor
· SQL formatting with rich options (limited to the set of statements mentioned above)
· A few other minor features

Query builder can now work with INSERT, UPDATE, and DELETE statements

Thanks to the Visual Query Builder users can create INSERT, UPDATE and DELETE statements. Together with extending the types of edited queries, we have improve general usability of the tool and fixed many bugs.

The updated query builder facilitates the process of creating queries and makes it even more intuitive.

Automated data report delivery

This feature enables users to set an automatic data report generation and delivery to a requester.

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

· A format for report generation can be chosen
· “Report delivery” method can be chosen: e-mail, ftp, shared folder

Data export to SQL statements

· Possibility to export data to INSERT, UPDATE, and MERGE statements
· Ability to export data from a table or data grid using a wizard
· Quick export from data grid without opening wizard

Data Compare

· New extended data reports
· Custom query result comparison ( the results of specific queries can be compared)
· “One-to-many” objects mapping when addressing columns that were separated as a table in the target database
· Possibility to include objects into comparison by mask, which is useful when comparing groups of tables
· Improved analysis of comparison results
· Improved data synchronization

Convenient work with result sets of several SELECT queries

If there is more than one SELECT statement in a document, query results will be displayed on separate tabs in the Data window after execution.

SQL Server 2012 and SQL Azure Support

New release of Data Studio includes full support for new version of SQL Server and functionality allowing users to work with Microsoft Cloud SQL services, knows as SQL Azure.

Other improvements

User interface skins support is added.

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

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

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

Activating dbForge Studio for SQL Server
This topic describes the activation procedure.

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: Transfer Tables from Different Schemas
The topic describes how to transfer a table from one schema to another.


dbForge Studio for SQL Server 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 dbForge Studio for SQL Server functionality. The Start page uses a multi-tab model that provides the relevant features and tools in a specific tab.

To access the Start page, in the View menu click Other Windows, and then click Start Page.

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 | The 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.
 | Link Database to Source Control | Click to quickly link a database to one of the supported source control systems with the Opens Link Database to Source Control wizard.
 | Unit Test | Click to create a new unit test with help of the tSQLt framework.
 | 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 Schema Comparison | This tool will help you to find differences in objects from two databases, view update script generated by the application, and perform synchronization of changes so that both databases are identical.
 | New Database Object | Click to create database objects in a visual editor.
 | 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.
 | Link Database to Source Control | Click to quickly link a database to one of the supported source control systems with the Opens Link Database to Source Control wizard.
 | New Documenter | Click to document your databases.
 | New Schema Comparison | The tool will help you perform database schemas comparison and synchronize schemas using easy step-by-step wizard instructions.
 | New Data Comparison | A comparison tool that will help you perform data comparison from two databases and then synchronize the databases.
 | Create Schema Snapshot | Opens the Create Schema Snapshot dialog box to show you the steps you should follow to create a schema snapshot file that is generated by dbForge Studio and contains information on database structure in XML format.
 | Create Scripts Folder | Click to generate a folder that contains scripts of a database with help of the Create Scripts Folder or Snapshot dialog box.
 | Copy Database | You can copy a database from one SQL Server database engine to another by using the attach-detach method through the SQL Agent.
 | Manage Server Security | A professional tool for convenient and easy management of SQL Server 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.
 | Generate Scripts | You can use the Generate Scripts Wizard to create scripts for transferring a database between instances of the SQL Server.
 | Attach Database | You can use this feature to copy, move, or upgrade a SQL Server database.
 | Copy Database | You can copy a database from one SQL Server database engine to another by using dbForge Studio for SQL Server.
 | Back Up | This feature helps you to create a full database backup in SQL Server by using dbForge Studio for SQL Server.
 | Profile Server Events | The tool enables to analyze server events for troubleshooting logic or performance problems.
 | Restore | By using this feature, you can restore a database backup by using dbForge Studio for SQL Server.
 | Manage Index Fragmentation | Click to find and fix database index fragmentation issues.
 | Export Data | This tool allows you to export your data. Select the Database objects to export, and configure the related options.
 | Generate Scripts | You can use the Generate Scripts Wizard to create scripts for transferring a database between instances of the SQL Server.
 | Import External Data | Fill 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.
 | 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 data comparisons using command line.
 | New Data Generation | This tool to create large volumes of meaningful test data and populate your database with it.
 | Copy Database | You can copy a database from one SQL Server database engine to another by using dbForge Studio for SQL Server.
 | 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 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 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 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


Installation Guide

In This Section

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

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


How To: Install dbForge Studio for SQL Server

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

To install dbForge Studio for SQL Server

1. Run dbforgesql.exe to begin installation.
2. On the Welcome to dbForge Studio for SQL Server page, click Install.
3. On the Select Destination page, select the directory where dbForge Studio for SQL Server 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 SQL Server. If you agree to the Devart dbForge Studio for SQL Server 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 SQL Server" option to start the application immediately after installation.

See Also

Installation Guide

How To: Uninstall dbForge Studio for SQL Server


How To: Uninstall dbForge Studio for SQL Server

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

To uninstall dbForge Studio for SQL Server

1. To begin the uninstall, go to Control Panel and then Programs and Features.
2. Right click dbForge Studio for SQL Server 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 SQL 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 and version control config
o Snippets
o Configuration files
o Format profiles
o Code analysis profiles
o Projects, scripts and exported data
5. Optionally, select Go to the product feedback page after uninstall 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

Installation Guide


Activating dbForge Studio for SQL Server

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

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

Online activation

This activation method requires an active Internet connection.

To activate dbForge Studio for SQL Server online:

1. If you have not purchased dbForge Studio for SQL Server, click Buy Now... on the pop-up window that appears at the start of dbForge Studio for SQL Server. 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 SQL Server right at the Devart web site. This activation method helps activating the product when the online activation fails.

To activate dbForge Studio for SQL Server 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 SQL Server and click the Load license... button. Specify the location of the downloaded .lic file and click Open.

See Also

Getting Started

How To: Connect to a Database


How To: Connect to a Database

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

To create a connection:

1. On the Start page click SQL Development and then click the New Connection button. The Database Connection Properties dialog box opens.
2. In the Server combo box, click <Browse...>. The Browse for Servers window opens.
3. On the Local Servers tab, select an SQL Server instance (if any). Otherwise, click the Network Servers tab to select an SQL Server instance in the network.
4. Select the Authentication type, either SQL Server authentication or Windows authentication.
5. Enter the login credentials in the User and Password fields.
6. In Database, type or click the name of the database to which you want to connect.
7. In the Connection Name text box, the connection name should be generated automatically from the host name. You can create a distinctive name for your new connection.
8. (optional) You can assign a document category to the new connection.
9. (optional) You can click Advanced to configure advanced connection properties.
10. Click OK to create the connection.

See Also

How To: Create and Edit a Query


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 or press CTRL+N. An empty SQL document opens.
3. Type a query to a database.
4. Click Execute or press CTRL+F5 to see the query results.

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.

Coding Technique Example:

To show you some dbForge Studio Intellisense features, let us perform a query where we need to display all the employees' addresses from the AdventureWorks2012 database who are registered in the Newton city.

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 use the select statement fragment. Enter the "ssf" letters, and then press the TAB button. In this case the SELECT * FROM statement appears in the SQL editor.

3. Specify the table you want to retrieve data from. Start typing the first letters of the table name, and dbForge Studio shows you a list of valid tables from the AdventureWorks2012 database. If you continue typing characters, the list is filtered to include only the tables that begin with those characters. After selecting an item, you can insert it into your code by pressing TAB or ENTER. dbForge Studio also shows a quick info for every highlighted item in the list. It allows you to see the object structure immediately.

The Address table comes the first in the list, so choose it and press TAB or ENTER to insert it into the SQL editor. dbForge Studio assigns the alias for the Address table automatically.

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

5. Use the WHERE statement to finish the query creating where we need to display the addresses from the Newton city only. Type the statement, use the prompt to choose the required item to put under the condition, and press ENTER.

Specify the condition where a.City = 'Newton'.

6. To format the query text, press CTRL + K, D combination, or choose the Advanced option, on the Edit menu, and click Format Document.

7. To expand the table columns, place the cursor after the asterisk character and press TAB.

There is no need to retrieve all the columns from the Address table, so we can leave only required ones.

8. Now we can execute the query to see results. To do so, click the Execute button on the Debug toolbar, or press F5.

We got what we wanted.

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

See Also

Getting Started

How To: Create a Query in Query Builder


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 by using visual query designer. We will use the AdventureWorks2012 database. Assume we need to display all the employees whose total sales result for the preceding year is greater than 2 000 000.

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.
3. Drag-and-drop tables from Database Explorer to the editor. Holding CTRL, select the Person table and the SalesPerson table, and drag-and-drop them over to the visual editor.

4. Select the FirstName and LastName check-boxes in the Person table, and the SalesLastYear check-box in the SalesPerson table.
5. Create a relationship between tables based on the BusinessEntityID primary key. To do this, select BusinessEntityID in the Person table and drag it over the BusinessEntityID in the SalesPerson table.

6. On the Where tab, insert the condition. Click the green plus icon.

7. Click enter value. In the Table drop-down list select the SalesPerson table, and then select the SalesLastYear column.

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

9. Click enter value and type 2 000 000.

10. On the Group By tab select columns you want to group by the output data.

11. On the Order By tab select the sort order.

12. Finally, the visual query will look as follows:

13. Press F5 to execute the query.

14. You can also view and edit (if needed) the generated automatically SQL code.

In this topic we reviewed quite simple query, however it demonstrates the convenience of the approach on creating queries visually.

Visual query editor will save a lot of your time in case of more complex queries to multiple tables and views.

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 section.

Editing Data

1. In Data Editor available in the Data view of an SQL document, Object Viewer, or in the Data window, 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, 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, press the Make Editable button, if you want the grid to be read-only, press Keep Read-Only. You can check the Don't show this message again checkbox, 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 from the shortcut menu, and then click NULL. Alternatively, press CTRL+0.

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

· 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 Delete button under the grid or press the 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 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

A table is the database object that contain all the data in a database. In tables, data is logically organized in a row-and-column format similar to a spreadsheet. You can create a table, name it, and add it to an existing database in an SQL Server instance by using dbForge Studio for SQL Server.

This topic demonstrates how to 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.

To create a table with Table Editor

1. In Database Explorer, connect to the instance of database engine that contains the database to be modified.
2. In Database Explorer, expand the connection node and then expand the database that will contain the new table.
3. In Database Explorer, right-click the Tables node of your database and then click New Table. The Table Editor opens.

4. In the Name text box, type the table name.
5. Optionally, add a description.
6. By default, the table is contained in the dbo schema. To specify a different schema for the table, from the Schema drop-down list, select the appropriate schema.
7. Type column names, choose data types, and choose whether to allow nulls for each column as shown in the following illustration. Optionally, add a description.
8. To specify a column as a primary key, click the check box next to the column name.

9. Click Update Database.

Note

In order to create a table, you must have the CREATE TABLE permission in the database and ALTER permission on the schema in which the table is being created.

See Also

Getting Started

How To: Transfer Tables from Different Schemas


How To: Transfer Tables from Different Schemas

The topic contains information on how to transfer a table from one schema to another.

To transfer a required object, follow the steps below:

1. Open the comparison wizard.
2. On the Source and Target tab specify the schema where you want to insert the table in.

3. Switch to the Mapping tab, and specify the schema you want to move.
4. Check Compare only mapped schemas.

5. Click the Compare button.
6. Having compared two schemas, click Synchronize, or press F8. The synchronization wizard opens.
7. Check the Use ALTER SCHEMA TRANSFER expression option on the Options tab of the synchronization wizard.

8. Click Synchronize.
9. The script example modifies the schema sc1 by transferring the table sc1.table1 from schema sc2 into the schema:

create schema sc1;
GO
create schema sc2;
GO
create table sc1.table1 (id int);
GO

10. The resultant script will be displayed as follows:

ALTER SCHEMA sc2 TRANSFER sc1.table1
GO

Note
· You can only transfer tables between schemas from the same database.
· All permissions associated with the table that is being transferred are dropped when it is moved.
· Only beginning with SQL Server 2005, the Transfer option is available.

See Also

Getting Started


Connecting to Databases

In This Section

How To: Manage Database Connections
Find out how to connect to a database.

Viewing Database Schema Information
The topic describes how to view the database schema and edit the database objects.


How To: Manage Database Connections

dbForge Studio for SQL Server offers you visual, quick, and simple way to manage database connections through Database Explorer.

By default, the Database Explorer window opens when you start dbForge Studio for SQL Server. To open the window manually, in the View menu, click Database Explorer. Alternatively, you can press: CTRL+W, L.

By default, Database Explorer displays recently used database connections. The list of available connections is empty, while opening the Database Explorer window for the first time.

Note

The Database Explorer window is not available in the dbForge Data Compare for SQL Server, dbForge Schema Compare for SQL Server products.

Use this window to open data connections and to log on to servers and explore their databases and system services.

Create a database connection

1. Open the Database Connection Properties dialog box:
· Click the [image] New Connection button on the Database Explorer toolbar.

or

· Right-click in the Database Explorer window and select New Connection from the shortcut menu.

2. Set up connection parameters.

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 the Database Explorer. The connection icon will be changed to [image] and the connection node will open to show database objects of the database assigned to the connection.

Close a database connection

Right-click a connection in the 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 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 database connection information

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

See Also

Connecting to Databases

Viewing Database Schema Information


Viewing Database Schema Information

You can view, edit, create and drop database objects by using the Database Explorer window.

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

To rename a database object:

1. Select a required object in the Database Explorer window.
2. Press the F2 key or click it again after a short pause.

To view a database object properties:

1. Select a required object in the Database Explorer window.
2. In the View menu, click Properties (or press F4).

To view additional schema information:

1. Select a required schema in the Database Explorer window.
2. In the View menu, click Object Viewer.

You can double-click tables, views, procedures, functions, triggers, events, UDFs folders in the Database Explorer and the Object Viewer window will open automatically.

See Also

Connecting to Databases


Database Tasks

This section provides information about the basic tasks related to working with databases.

In This Section

Database Detach and Attach
The topic describes how to detach and attach a database.

Create a Database
The topic describes how to create a database.

Copy a Database
This topic describes how to copy a database from one SQL Server database engine to another by using dbForge Studio for SQL Server.

Backup a Database
This topic describes how to create a database backup in SQL Server by using dbForge Studio for SQL Server.

Restore a Database
This topic describes how to restore a database backup by using dbForge Studio for SQL Server

Generate Scripts
The topic describes how you can use the Generate Scripts Wizard to create scripts for transferring a database between instances of the SQL Server.

Create Scripts Folder or Snapshot
This topic describes how to create scripts folder or schema snapshot file.

Take Offline
The topic describes how in the open connection to take at least one database offline.

Bring Online
The topic describes how to change a database status from offline to online.

Managing SQL Indexes
This section describes how to analyze and fix index fragmentation issues.


Database Detach and Attach

A database can be detached and then reattached to the same or another instance of SQL Server. Detaching and attaching a database is useful if you want to change the database to a different instance of SQL Server on the same computer or to move the database. This section describes how you can detach and attach databases using dbForge Studio for SQL Server.

In This Section

Detach a Database
The topic describes how to detach a database.

Attach a Database
The topic describes how to attach a database.


Detach a Database

This topic describes how to detach a database using dbForge Studio for SQL Server. The detached files remain and can be reattached by using CREATE DATABASE with the FOR ATTACH option. The files can be moved to another server and attached there.

Detaching a database

Detaching a database removes it from the instance of SQL Server but leaves the database intact within its data files and transaction log files. These files can then be used to attach the database to any instance of SQL Server, including the server from which the database was detached. However, there are several restrictions while detaching a database.

You can't detach a database in the following cases:

· The database is replicated and published. If replicated, the database must be unpublished. Before you can detach it, you must disable publishing.
· A database snapshot exists on the database. Before you can detach the database, you must drop all of its snapshots.
· The database is being mirrored in a database mirroring session. The database cannot be detached unless the session is terminated.
· The database is suspect. A suspect database cannot be detached; before you can detach it, you must put it into emergency mode. For more information about how to put a database into emergency mode.
· The database is a system database.

To detach a database:

1. Use Database Explorer to connect to the instance of the SQL Server database engine and then expand the instance.
2. Select the name of the database you want to detach.
3. Right-click the database name, and then click Detach Database. The Detach Database dialog box appears. You can detach several databases at once. For this, in the Database Explorer select several databases.
4. Optionally, you can disconnect connections to the specified database. Note, you cannot detach a database with active connections.
5. Optionally, you can update the existing optimization statistics. Note, by default, the detach operation retains any out-of-date optimization statistics when detaching the database.
6. Click OK.

If a failure occurs while detaching a database, you can read the error message. To do this, hover the mouse cursor to an error in the Status field.

See Also

Database Detach and Attach

Attach a Database


Attach a Database

This topic describes how to attach a database by using dbForge Studio for SQL Server. You can use this feature to copy, move, or upgrade a SQL Server database.

Attaching a database

You can attach a copied or detached SQL Server database. When you attach a database, all data files (MDF and NDF files) must be available. If any data file has a different path from when the database was first created or last attached, you must specify the current path of the file.

You can't attach a database in the following cases:

· A database created by a more recent version of SQL Server cannot be attached in earlier versions.
· Attempting to attach a database that has not been detached will return an error.
· Trying to select a database that is already attached generates an error.

To attach a database:

1. Use Database Explorer to connect to the instance of the SQL Server database engine and then expand the instance.
2. Right-click the instance, and then click Attach Database.
3. In the Attach Database dialog box, click the Add button to specify the database to be attached.
4. In the Browse For Folder dialog box, select the disk drive where the database resides and expand the directory tree to find and select the .mdf file of the database. Note, you can select several *.mdf files to attach.
5. Optionally, specify a different name for the database to attach as.
6. Optionally, you can select a different owner.
7. Optionally, you can remove the selected file from the databases to attach grid by clicking the Remove button.
8. Click OK.

See Also

Database Detach and Attach

Detach a Database


Create a Database

This topic describes how to create a database by using the Database Editor provided by dbForge Studio for SQL Server.

To create a database:

1. In Database Explorer, connect to an instance of the SQL Server and then expand that instance.
2. Right-click the instance of the SQL Server, and then click New Database.
3. In New Database, enter a database name.
4. To create the database by accepting all default values, click OK; otherwise, continue with the following optional steps.
5. To change the owner name, click <Default> to select another owner.
6. To change the default values of the primary data files, in the database files grid, click the appropriate cell and enter the new value.
7. To change the collation of the database, select the Options page, and then select a collation from the list.
8. To change the recovery model, select the Options page and select a recovery model from the list.
9. To change database options, select the Options page, and then modify the database options.
10. To add a new filegroup, click the Filegroups page. Click Add and then enter the values for the filegroup.
11. To create the database, click OK.

See Also

Working with Databases

Copy a Database


Copy a Database

This topic describes how to copy a database from one SQL Server database engine to another by using dbForge Studio for SQL Server. The Copy Database wizard allows you move, copy or override databases and their objects easily.

Limitations and Restrictions:

1. You can not copy or move the following databases:
· System databases
· Databases marked for replication.
· Databases marked Inaccessible, Loading, Offline, Recovering, Suspect.
2. If you select the Move option, the wizard deletes the source database automatically after moving the database. The Copy Database wizard does not delete a source database if you select the Copy option.
3. You cannot copy a database from the source SQL Server instance to the target, if there is exactly the same database hosted on the target SQL Server instance. In this case you must select the Override option. If the option is selected, the target database will be overridden.
4. You must be a member of the sysadmin server role on both the source and target servers.
5. SQL Agent should be run on SQL Server. For more information about SQL Agent, refer to the MDSN entry.

To Copy a Database:

1. In Database Explorer, expand the node for the instance containing the database to be scripted.
2. Point to Tasks, and then click Copy Database. The Copy Database wizard opens.
3. Optionally, you can click the Open button, to load a previously saved project file.
4. In the Source section, select the source SQL Server instance.
5. In the Target section, select the target SQL Server instance.

Note

SQL Server version on target must be the same or higher than that on the source.
6. On the Select databases page, select check boxes next to a database name you want to copy, move or overwrite. Optionally you can use the Filter tool for quick search.
7. Optionally, on the Target databases page, you can change the name of the target database, as well as the directory for the Data and Log files. By default, the Data and the Log files are saved to a folder of the target server. If you decide to change the directory for the files, make sure this folder is shared between the source and the target servers.
8. On the Transfer settings page, set the proxy settings for the transfer of selected database(s).
9. On the Copy logins page, select logins to copy.
10. On the Errors Handling page, specify errors processing behavior and logging options.
11. Click Execute.

See Also

Working with Databases

Backup a Database


Back up a Database

This topic describes how to create a database backup in SQL Server by using dbForge Studio for SQL Server.

To back up a database:

1. After connecting to a required instance of the Microsoft SQL Server Database Engine, in Database Explorer, click the server name to expand the server tree.
2. Either select a user database or expand the System Databases folder and select a system database.
3. Right-click the database, point to Tasks, and then click Back Up. The Back Up Database dialog box appears.
4. In the Connection list box, verify the connection name. You can optionally select a different connection from the list.
5. In the Backup type list box, select a backup type.
6. In the Database list box, verify the database name. You can optionally select a different database from the list.
7. Optionally, you can select Copy Only Backup to create a copy-only backup. A copy-only backup is a SQL Server backup that is independent of the sequence of conventional SQL Server backups.

Note

If the backup type is set to Differential, you cannot create a copy-only backup.
8. For Backup component, either click Database or Files and Filesgroups.
9. To select the paths, click Add. The selected paths are displayed in the Backup to disc box.

Note

To back up the database to a mapped network drive, create a path to a local drive, and then modify it manually.
10. To view or select the media options, click Media Options.
11. Select an Overwrite Media option, by clicking one of the following:
· Back up to the existing mediaset
For this option, click either Append to the existing backup set or Overwrite all existing backup sets.
· Back up to a new media set, and erase all existing backup sets
For this option, enter a name in the New media set name text box, and, optionally, describe the media set in the New media set description text box.
12. In the Reliability section, optionally select:
· Verify backup when finished
· Perform checksum before writing to media
· Continue on error
13. The options in the Transaction log section are inactive unless you are backing up a transaction log (as specified in the Backup type section of the General page).
14. To view or select the backup options, click Backup Options. The page allows to:
· Specify optional information about the backup set created by the back up operation
· Create an encrypted backup
15. Click Back Up.
16. When backup is already in progress, you can interrupt it by clicking the Cancel button.
17. The Finish tab displays whether the backup process has been finished successfully.
18. Click Finish to close the Backup wizard.

See Also

Database Tasks

How To: Restore a Database


Restore a Database

This topic describes how to restore a database backup by using dbForge Studio for SQL Server

To restore a database:

1. After connecting to a required instance of the Microsoft SQL Server Database Engine, in Database Explorer, click the server name to expand the server tree.
2. Either select a user database or expand the System Databases folder and select a system database.
3. Right-click the database, point to Tasks, and then click Restore. The Restore Database dialog box appears.
4. On the Source and Target page, use the Source for restore section to specify the source and location of the backup sets to restore. Select one of the following options:
· Database
Select the database to restore from the drop-down list.
· Files
Select to specify a path to a backup file.
5. In the Destination to restore section, the Database box is automatically populated with the name of the database to be restored. To change the name of the database, enter the new name in the Database box.
6. In the Restore to box, leave the default as To the last backup taken or click on Timeline to access the Backup Timeline dialog box to manually select a point in time to stop the recovery action.
7. In the Backup sets to restore grid, select the backups to restore. This grid displays the backups available for the specified location. By default, a recovery plan is suggested. To override the suggested recovery plan, you can change the selections in the grid. Backups that depend on the restoration of an earlier backup are automatically deselected when the earlier backup is deselected.
8. Optionally, click the Files page to access the Browse Files dialog box. From here, you can restore the database to a new location by specifying a new restore destination for each file in the Restore the database files as grid.
9. To view or select the advanced options, on the Options page, in the Restore options panel, you can select any of the following options, if appropriate for your situation:
· Overwrite the existing database (WITH REPLACE)
· Preserve the replication settings (WITH KEEP_REPLICATION)
· Restrict access to the restored database (WITH RESTRICTED_USER)
10. Select an option for the Recovery state box. This box determines the state of the database after the restore operation.
· RESTORE WITH RECOVERY is the default behavior which leaves the database ready for use by rolling back the uncommitted transactions. Additional transaction logs cannot be restored. Select this option if you are restoring all of the necessary backups now.
· RESTORE WITH NORECOVERY which leaves the database non-operational, and does not roll back the uncommitted transactions. Additional transaction logs can be restored. The database cannot be used until it is recovered.
· RESTORE WITH STANDBY which leaves the database in read-only mode. It undoes uncommitted transactions, but saves the undo actions in a standby file so that recovery effects can be reverted.
11. Take tail-log backup before restore will be selected if it is necessary for the point in time that you have selected.
12. If there are active connections to the database, restore operations may fail Check the Close existing connections to destination database option to ensure that all active connections between dbForge Studio for SQL Server and the database are closed.
13. Click Restore..

See Also

Database Tasks

Generate Scripts


Generate Scripts

You can use the Generate Scripts Wizard to create scripts for for a local database, a network database, and for a database on Windows Azure.

Generating a Script

1. In Database Explorer, expand the node for the instance containing the database to be scripted.
2. Point to Tasks, and then click Generate Scripts.
3. On the General page, in the Load a previously saved project section, click Open to select a previously saved *.backup file. If you do not have the project file, go to step 4.
4. In the Connection list box, select an SQL Server instance.
5. In the Database list box, select a database.
6. Click "..." next to the Path text box, to select a folder to store schema export.
7. In the Output file name text box, specify a name of the file.
8. Optionally, you can select the Append timestamp to the file name option to add date-time parameters to the file name.
9. Optionally, you can select the Use compression (ZIP) option to compress the script file.
10. On the Script content page, select what do you want to generate. You can also include or exclude specific database objects.
11. On the Options page, specify how you want this wizard to generate scripts. Many different options are available.
12. On the Error handling page, specify errors processing behavior and logging options.
13. Click Generate.

Scheduling a Windows Task

1. Start Task Scheduler for Windows.
2. On the Action menu, select Create Basic Task.
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 the dbforgesql.com file path in the Program/script field. (The default path is C:\Program Files\Devart\dbForge Studio for SQL Server\dbforgesql.com.)

8. Specify the arguments in the Add arguments field as follows:

/script /connection:"Data Source=DBMSSQL\MSSQL2012;Integrated Security=False;User ID=sa" /projectfile:"D:\Scripts\AdventureWorks.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.

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 script. It overrides the database specified in the template or in the connection string.
/outputfile | This switch is used to specify a file name for storing the database script. It overrides the file name specified in the template.
/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 script template to use. Some template options can be overridden by switches.

See Also

Database Tasks

Create Schema Snapshot


Create Scripts Folder or Snapshot

This topic describes how to create a scripts folder or a snapshot.

Creating Scripts Folder

A scripts folder is a set of scripts that represent a database schema. The scripts folder can be used for:

· Version-controlling databases.
· Comparing database schemas.

To create a new scripts folder:

1. On the Database menu, point to Tasks, and then click Create Scripts Folder or Snapshot. The Create Scripts Folder or Snapshot dialog box opens.
2. Select Source for the scripts folder creation. Scripts folder can be created on the basis of a database or a snapshot.
3. Depending on the selected Source type, specify:
· For Database: Connection and Database. Optionally, you can select Decrypt Encrypted Objects to decrypt encrypted objects.
· For Snapshot: path to the required snapshot.
4. In Destination, select Scrips Folder in the Type field.
5. Specify Path to store the scripts folder.
6. Click Create.

To create a scrips folder with help of 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:

dbforgesql.com /scriptsfolder [/switch1[:value | [parameter1:value parameter2:value ..]] /switch2 ..]

3. Press ENTER to run the process.
4. 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>
/database | This switch is used to specify a database to create a script folder to. Command usage looks like: /database:<database_name>
/decrypt | This switch is used to define if source objects should be decrypted during describing. To enable the option, specify any of the following values: Yes, Y, On, True, T. To disable the option, specify any of the following values: No, N, Off, False, F. The command line looks like: /decrypt:<value>
/password | This switch is used to specify the server password. The switch overrides the password specified in the connection string. The command line looks like: /password:<pw>
/path | This switch is used to specify the script folder path. The command line looks like: /path:<folder_path>

Creating Snapshot

Snapshot is a file that contains information about a database structure in XML format.

To create a new snapshot:

1. On the Database menu, point to Tasks, and then click Create Scripts Folder or Snapshot. The Create Scripts Folder or Snapshot dialog box opens.
2. Select Source for the snapshot creation. Snapshot can be created on the basis of a database or a scripts folder.
3. Depending on the selected Source type, specify:
· For Database: Connection and required Database. Optionally, select Decrypt Encrypted Objects if you want encrypted objects be decrypted.
· For Scripts Folder: path to the required scripts folder.
4. In Destination, select Snapshot in the Type field.
5. Specify Path to store the snapshot file.
6. Optionally, you can select the Compress check box to archive the created file.
7. Click Create.

To create a new snapshot with help of command line:

You can automate creation of target database snapshots using the command line.

To create a snapshot of target database through the command line, do the following:

1. Open Command Prompt by pressing Win+R, and typing 'cmd' in the Open line.

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.
2. Type a path to the datacompare.com file, located in dbForge Studio for SQL Server installation folder on your PC, and press the SPACE bar.

"C:\Program Files\Devart\dbForge Studio for SQL Server\dbforgesql.com"

3. Specify the action you want to perform:

"C:\Program Files\Devart\dbForge Studio for SQL Server\dbforgesql.com" /snapshot

4. Specify the connection string and schemas:

"C:\Program Files\Devart\dbForge Studio for SQL Server>dbforgesql.com /snapshot /connection:"User Id=hr;Server=SQL;Unicode=True" /s:"SH,SH"

5. Press ENTER to run the process.

Tip: To see a quick help on the switches available for the /snapshot operation, type the following:

"C:\Program Files\Devart\dbForge Studio for SQL Server\dbforgesql.com" /snapshot /?

Arguments Used in Command Line

Select a corresponding command line switch to perform a required operation:

Argument | Action and Usage
/alias | Use the switch to define a version control alias. Command usage looks like: /alias:<value>
/comment | Use the switch to write a comment. Command usage looks like: /comment:<value>
/compress | Use the switch to apply compression to a snapshot file. Command usage looks like: /compression:<value> To turn this option on, type Yes, Y, On, True, T. To turn this option off, type No, N, Off, False, F.
/connection | Use the switch to specify a full connection string with additional parameters. This argument is required. Command usage looks like: /connection:<connection_string>
/database | Use the switch to specify a target database name. Define this argument to override the database specified in the connection string. Command usage looks like: /database:<database_name>
/file | Use the switch to specify a file name and its path to save a created snapshot file. Command usage looks like: /file:<file_path> If a path is not specified, a snapshot file will be saved to a current directory.
/password | Use the switch to specify a server password. Define this argument to override the password specified in the connection string. Command usage looks like: /password:<pw>

Command line used to make a snapshot of a schema may look like:

"C:\Program Files\Devart\dbForge Studio for SQL Server\dbforgesql.com" /snapshot /connection:"User Id=hr;Server=SQL;Unicode=True;" /password:my_pass /schema:"HR" /file:"result.snap"

If you connect to the server in the Direct mode, the connection parameters will differ and the command line used to make a snapshot of a schema will look like:

"C:\Program Files\Devart\dbForge Studio for SQL Server\dbforgesql.com" /snapshot /connection:"User Id=hr;Server=dbSQL;Connect Mode=SysDba;Unicode=True;Direct=True;Service Name=SQL" /password:my_pass /schema:"HR" /file:"result.snap"

See Also

Database Tasks


Take Offline

The topic describes how in the open connection to take at least one database offline.

To take a database offline:

1. In the Database Explorer window, open the required connection.
2. Select the database to be ignored, and right click it.
3. Navigate to Tasks on the shortcut menu, and select Take Offline. The offline database folder has the [image] icon now.

Note

Taking a database offline causes all objects that depend on that database to be taken offline.

An offline database is not available in the Database list of the SQL toolbar.

See Also

Database Tasks

Bring Online


Bring Online

The topic describes how to change a database status from offline to online.

To bring a database online:

1. In the Database Explorer window, open the connection.
2. Select the required offline database, and right click it.
3. Navigate to Tasks on the shortcut menu, and select Bring Online. The database with all its objects and data is available now.

See Also

Database Tasks

Bring Online

© 2004-2017 Devart


Managing SQL Indexes

This section describes how to use functionality of dbForge Studio for SQL Server.

In This Section

Analyzing SQL Indexes
Describes how to start analyzing index fragmentation.

Viewing Scan Results
Describes how to view index scan results.

Exporting Scan Results
Describes how to export scan results to a CSV file.

Fixing Indexes
Describes how to fix inexes.

Analyzing SQL Indexes through the Command Line
Describes how to start analyzing index fragmentation though the command line.


Analyzing SQL Indexes

This topic describes how to start analyzing SQL indexes with help of dbForge Studio for SQL Server.

To start analyzing indexes:

1. In the Database menu, point to Tasks, and then click Manage Index Fragmentation. Alternatively, in Database Explorer, right-click a database or database instance, point to Tasks and then click Manage Index Fragmentation. The Index Manager document opens.
2. Choose a Connection and a Database.
3. Click Options to modify the default index fragmentation and index rebuild options. For more information, refer to the Options Dialog Box topic.
4. Click Reanalyze.

See Also

Viewing Scan Results

Managing SQL Indexes


Viewing Scan Results

When the index scan is over, all scanned indexes appear in the Index Manager document. The document is divided into two sections:

· Action required section lists all indexes that require maintenance according to the preset index analysis criteria.
· No action required section lists all indexes that do not require maintenance, according to the preset index analysis criteria.

Both sections provide exhaustive details for the scanned indexes, including index name, size and owner, fragmentation volume, reason for fragmentation etc. For more information, refer to the Index Manager Document topic.

Navigating through the document

Scan results can be easily grouped by a certain column and filtered with default or custom filters. Also, you can use the Search box for locating indexes that meet the search string.

To filter indexes:

1. Navigate to the Action required section of the document.
2. Click the filter glyph on a column header.
3. Select a filter from the list or create a custom filter.

Sorting indexes

To sort indexes in the document or to change the sort order, click the header of a column.

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 column header once again,.

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.

See Also

Exporting Scan Results

Managing SQL Indexes


Exporting Scan Results

dbForge Studio for SQL Server allows to save scan results to an output file in the CSV format for further index fragmentation analysis or for the sake of reporting.

To export scan results to a .csv filie:

1. Navitate to the Action required section of the document.
2. Click Export to SCV...
3. Specify the path to store the file.

See Also

Fixing Indexes

Managing SQL Indexes


Fixing Indexes

dbForge Studio for SQL Server allows to fix indexes visually as well as with help of T-SQL script.

To Fix Indexes Visually:

1. In Index Manager document, navigate to the Action required section.
2. Select indexes you want to fix.
3. Click Fix . The fix results are shown in the Result column of the Action required section of the document.

Script Generation

You can generate T-SQL and run it against database immediately, or save it for the future use.

1. In the Index Manager document, navigate to the Action required section.
2. Click Script Changes.
3. Select the action you what to do with the generated script from the drop-down list box:
· Copy the script to clipboard.
· Open the script in a new SQL window.

See Also

Managing SQL Indexes

Analyzing SQL Indexes through the Command Line


Analyzing SQL Indexes through the Command Line

You can automate index mamahement 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:

dbforgesql.com /analyzeindex [/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>
/database | This switch is used to specify a database to manage indexes in. The command line looks like: /database:<value>
/minindexsize | This switch is used to specify the minimum index size in pages. Overrides global option. The command line looks like: /minindexsize:<value>
/password | This switch is used to specify a password. Overrides password specified in the connection string. The command line looks like: /password:<pw>
/rebuildthreshold | Specifies rebuild the fragmentation threshold in %. Overrides global option. The command line looks like: /rebuildthreshold:<value>
/reorganizethreshold | Specifies reorganize the fragmentation threshold in %. Overrides global option. The command line looks like: /reorganizethreshold:<value>
/tempdbsort | This switch is used to override the "Sort in tempdb" global option. The command line looks like: /tempdbsort:<On|Off>

See Also

Managing SQL Indexes


Writing and Executing SQL Statements

In This Section

Writing SQL Statements with Code Completion
Describes autocompletion and formatting features of dbForge Studio.

Navigating through SQL documents
The topic shows how to navigate through a SQL document.

Formatting Code
The topic describes how to format SQL code.

Executing SQL Statements
Explains executing of SQL statements.

Working with Code Snippets
Explains how to use code snippets in dbForge Studio for SQL Server.

Working 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.

Using Parameters
Describes 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
Explains how to execute a large script without opening it in the editor.

Opening Large Scripts in SQL Editor
Describes opening large scripts in the editor.

Associating Windows with Connection
Explains 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.

Analyzing T-SQL Code
Learn how to analyze T-SQL code to find and fix code defects.

Executing Scripts through the Command Line
Learn how to automate executing the scripts through the command line.

Formatting Code through the Command Line
Learn how to automate code formatting through the command line.


Writing SQL Statements with Code Completion

This section describes autocompletion and formatting features of dbForge Studio.

In this Section

Automatic Suggestions
The topic describes autocompletion features provided by dbForge Studio.

Code Refactoring
The topic describes code refactoring using dbForge Studio.

Context-Based Prompts
The topic describes context-based prompts provided by dbForge Studio.

Inserting Suggestions
Describes how to insert suggestions.

Managing Aliases
Describes how SQL Complete generates aliases.

Objects Info
The topic provides objects info overview.

Parameter Info
The topic provides parameter info overview.

Phrase Completion
The topic describes the phrase completion feature provided by dbForge Studio.

Prompt List Supported Types
Describes the object types supported in the prompt list.

Statement Expansion
The topic describes how to expand SQL statements.

Writing SQL Queries with Code Completion
Provides examples to start using Code Completion features.


Automatic Suggestions

This topic describes autocompletion features provided by dbForge Studio.

Navigating Overview

Automatic displaying suggestions while typing

From the first characters that you are typing in the SQL editor, dbForge Studio determines the most relevant suggestions for the current context and displays them in a list. You can cancel the automatic display of suggestions or edit the delay time used to display them.

Word autocompletion

If you are typing first several characters of a database object name, and dbForge Studio finds only one match, it automatically inserts it to complete the word.

Automatic alias generation in SELECT statements*

dbForge Studio can assign an alias to each table object (table, view, function, synonym, sub-query) available in the FROM list of your SQL statement automatically.

Supporting queries to various databases

When typing statements within a database, you can get suggested objects of another database if you specify its name in the query text.

Usage of syntax highlight settings for the suggestions list

dbForge Studio highlights keywords, built-in functions and other objects in the suggestion list basing on corresponding settings of SSMS.

Highlight occurrences of an identifier*

The feature allows you to see all identifier occurrences. In a few moments after the pointer was placed over the identifier, all the identifier occurrences in the text will be highlighted.

Pair highlighting

dbForge Studio highlights both the opening and closing code elements to visually define separate code blocks. This feature allows you to determine whether element pairs are properly paired and determine mismatched or misspelled paired code elements.

To highlight a pair, click one element of the pair. For example, when you place a caret at the BEGIN or END keyword, dbForge Studio automatically highlights both matching keywords.

dbForge Studio recognizes the following sets of delimiters: IF...ELSE, BEGIN...END, BEGIN TRY...END TRY, etc.

Context-based sorting of suggestions in the list

dbForge Studio sorts names of database objects by type and displays most relevant suggestions at the top of the list.

Automatic object filtering the suggestion list

dbForge Studio automatically filters object names and keywords in the list depending on what you are typing. Filtering is sensitive to the typed characters, symbols, white space and CamelCase. For example, if you type SELECT * FROM PC, compound names which elements start with the P and C characters (CamelCase) will be suggested.

Suggesting methods for columns and variables*

dbForge Studio can suggest methods for columns and variables of the varchar(max), nvarchar(max), varbinary(max), and xml types.

For columns and variables of the varchar(max), nvarchar(max), and varbinary(max) data types, the WRITE method can be suggested.

For columns and variables of the xml data type, the query(), value(), exist(), modify(), and nodes() methods can be suggested.

All these methods can be suggested (except WRITE and nodes()) within calculated expressions and after column identifiers of these types with a point.

Notes
1. The WRITE method can be called in UPDATE and SET statements only.
2. The nodes() method can be called only in the FROM list.

Support of various query types**

dbForge Studio provides context-based suggestions and formatting in the following queries:

· SELECT, INSERT, UPDATE, DELETE, USE, MERGE
· CREATE (table, procedure, function, trigger, view. statistics, database)
· ALTER (table, procedure, function, trigger, view, schema, database)
· EXEC, DROP, GRANT, REVOKE, DENY, ENABLE TRIGGER, DISABLE TRIGGER
· control flow statements (IF, WHILE), BEGIN ... END blocks

Note

In all other statements, only context-based suggestions of keywords are supported.

Semi-transparent view of the suggestion box

When your code is overlapped by the suggestion box, hold Ctrl to make the suggestion box semi-transparent.

Sorting keywords by relevance*

Keywords in the suggestion list may be sorted by relevance. If the Sort keywords by relevance option is not selected, keywords are sorted in alphabetical order.

The feature allows grouping keywords in the suggestion list by the degree of keyword relevance to some specific context. This helps to determine the most appropriate keywords for commit.

The Sort keywords by relevance property is enabled (keywords are sorted by relevance)

List of keywords sorted by relevance

The Sort keywords by relevance property is disabled (keywords are sorted in alphabetical order)

List of keywords not sorted by relevance

Note

* These features are available in the Standard edition of dbForge Studio only.

** The Express edition of dbForge Studio offers partial support of these features. Full support is available in the Standard edition only.

See Also

Writing SQL Statements with Code Completion

Code Refactoring


Code Refactoring

This section describes how to perform code refactoring using dbForge Studio for SQL Server.

In This Section

Renaming Objects
This topic describes how to rename tables, temporary tables and columns, views, stored procedures, functions.

Renaming Variables
This topic describes how to rename local and SQLCMD variables.

See Also

Automatic Suggestions

Context-Based Prompts


Renaming Objects

The Rename functionality provides an easy way to change an object name for a new one that better reveals its purpose and automatically finds and corrects all references to it.

You can rename an object only in a script, and not in a database.

The Rename refactoring is available for:

· Tables
· Temporary tables and columns
· Views
· Stored procedures
· Functions

To rename an object in the SQL editor:

1. Right-click the required object and select the Rename command from the shortcut menu. Alternatively you can select the object, go to the SQL Complete menu and select the Rename command or select the object and press F2. The object will be highlighted.

2. Type a new name for the object in the SQL editor window.
As you type, a ToolTip appears instructing to Press F2 to preview changes or Enter/Tab to apply.

3. Press F2 to open the Preview Changes - Rename dialog window and preview code changes, to apply changes press the Apply button;

4. Alternatively, press Enter/Tab to apply changes in the code.

See Also

Code Refactoring

Renaming Variables


Renaming Variables

The Rename functionality provides an easy way to change all occurrences of variable names into new ones to improve code readability and automatically finds and corrects all references to them.

You can rename an object only in a script, and not in a database.

The Rename refactoring is available for:

· local variables
· SQLCMD variables

To rename an object in the SQL editor:

1. Right-click the required object and select the Rename command from the shortcut menu. Alternatively you can select the object, go to the SQL Complete menu and select the Rename command, or select the object and press F2. The object will be highlighted.

2. Type a new name for the object in the SQL editor window.
As you type, a ToolTip appears instructing to Press F2 to preview changes or Enter/Tab to apply.

3. Press F2 to open the Preview Changes - Rename dialog window and preview code changes, to apply changes press the Apply button;

4. Alternatively, press Enter/Tab to apply changes in the code.

See Also

Renaming Objects

Context-Based Prompts


Context-Based Prompts

dbForge Studio provides smart prompts for database objects and SQL statements.

Prompts Overview

Context-based prompt of different object types

When you type a query, dbForge Studio displays names of all valid databases. It also displays objects from the specified database or schema, or column names from the specified table. Object types have different icons, so you can easily recognize them. The complete list of the supported types is available in the Prompt List Supported Types topic.

Context-based prompt of keywords**

dbForge Studio provides a list of expected keywords to use in the current position of your code. For example, if you type SELECT *, the list shows all available keywords that match the context.

Context-based prompt of keywords

Context-based prompt of linked servers*

dbForge Studio displays names of the following linked servers:

· SQL Server 2000
· SQL Server 2005
· SQL Server 2008
· SQL Server 2012
· SQL Server 2014
· SQL Azure

Context-based prompt of function parameters

When calling any built-in or user-defined function in a query, a hint with information about the function and parameters it requires appears.

Context-based prompt of function parameters

Context-based prompt for JOIN clause*

For JOIN clauses, dbForge Studio can suggest a full JOIN clause that is based on foreign keys, or conditions that are based on column names and foreign keys. This suggestion is available after JOIN and ON keywords.

Determining a current database or schema

dbForge Studio displays a list of database objects from a current database or schema even when their names are not specified in a query. Also, the tool finds USE statements in code and changes the current database for subsequent SQL statements.

Determining a current database or schema

Code completion in SQLCMD mode

This feature ensures that values of variables are taken out from the document and object suggestions work as with an ordinary SQL script when scripts are executed with the help of the command line utility.

Column picker for quick list building

This feature allows defining column lists for selecting, grouping, sorting and inserting without typing any code at all.

Note

* These features are available in the Standard edition of dbForge Studio only.

** The Express edition of dbForge Studio offers partial support of these features. Full support is available in the Standard edition only.

Refresh Local Cache

If you are writing a query against a database while someone else is making changes to its structure, the suggestions offered by dbForge Studio for SQL Server may become out of date. For instance, if someone added several tables to a database while you were connected to that database, the tables will not appear in the suggestions box. To reload the database objects, click Refresh Local Cache on the SQL Complete menu. 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 for SQL Server 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 were connected previously.

dbForge Studio for SQL Server 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 on the SQL Complete menu.

See Also

Renaming Variables

Inserting Suggestions


Inserting Suggestions

When you are typing a query, dbForge Studio offers relevant suggestions to complete the typed words and speed up query typing. You can see a suggestion box with the list of suggestions, that are most relevant to the typed symbols and context. For example, if you type:

· USE(press Spacebar) - the list of available databases is displayed.

Suggestion list for USE statement

· SELECT * FROM AdventureWorks.Person - the list of tables and views of the selected schema is displayed.

Suggestion list for the SELECT * FROM statement

· SELECT ProductCategoryID, Name FROM Production.ProductCategory JOIN - a full JOIN statement that is based on foreign keys is suggested.

Suggestion list for JOIN

SELECT ProductCategoryID, Name FROM Production.ProductCategory JOIN ProductSubcategory ON - conditions that are related to column names are suggested.

Suggestion list for JOIN ON

Suggestions for JOIN statements are filtered by table names (for full statements) or by column names (for conditions).

Note
1. Suggestions for JOIN statements are shown in the beginning of the suggestion list, but they are not highlighted. Instead the first table or column with the name that matches what is being typed is highlighted. But if the suggested statement or condition is appropriate for you, you can select it by using the up and down arrow keys and insert it by pressing Enter.

To insert a suggestion into code:

Navigate to a required suggestion in the list and press Enter. To close the suggestions box without inserting any suggestion, press the Esc key.

To navigate to a required suggestion in the list:

Use the Up and Down arrow keys to move one item back or forward in the list of suggestions. To scroll the list one page at a time, use the Page Up and Page Down keys.

To re-size the suggestion box:

Drag the right bottom part of the suggestion box to re-size it. The suggestion box will keep the size during your session.

To turn on the semi-transparent mode for the suggestion box:

To see the query text without closing the suggestion box, press and hold CTRL to make it transparent.

See Also

Context-Based Prompts

Managing Aliases


Managing Aliases

dbForge Studio can automatically generate aliases for each table object (table, view, table-valued function, synonym) referenced in the FROM list of your SQL document. To disable automatic alias generation, clear the Generate alias on commit option. If there are prefixes in the names of your table objects, you can setup dbForge Studio so that it ignores those prefixes when assigning aliases.

The following rules are used when creating aliases:

· If possible, dbForge Studio generates aliases using the first letter of a table object name.
· For names with underscores:
for TBL_Address alias ta is assigned
· For names with hyphens:
for Tbl-address alias ta is assigned
· For names with CamelCase:
for TblAddress alias ta is assigned
· For names with numbers:
for 111 alias a is assigned
· If a generated alias name matches a keyword, the alias name is wrapped in square brackets. For example, if the table object name is GeneralObjects, the alias name will be [go].
· If a newly generated alias coincides with an existing one, dbForge Studio adds symbols 1, 2,...n to the newly generated alias to avoid ambiguity.

Alias Refactoring

To rename an alias:

1. Right-click the required alias and select the Rename command from the shortcut menu or select the alias and press F2 - the alias will be highlighted.

2. Type a new name for the alias in the SQL editor window.
As you type, a ToolTip appears instructing to Press F2 to preview changes or Enter/Tab to apply.

3. Press F2 to open the Preview Changes - Rename dialog window and preview code changes; to apply changes press the Apply button.

4. Alternatively, press Enter/Tab to apply changes in the code.

Custom Alias Mapping

dbForge Studio allows users to manually assign aliases to an identifier (table, view, table-valued function, synonym) referenced in an SQL document. Aliases can also be assigned to databases, servers, and linked servers.

To add a custom alias:

1. In the SQL Complete menu, click Options.

2. In the Options window, navigate to the Alias tab. The Alias page opens.

3. On the Alias page, in Settings, you can select one or more of the available options.

4. Define an identifier in the Condition column using one of the condition masks, as required.

5. Define an alias name in the Action column using one of the action masks.

6. Click OK.

When a custom alias is created, the SQL Complete assigns the alias name to an object that is referenced in an SQL statement according to a specified alias mask.

Note

Custom aliases have precedence over automatically created ones.

Alias Masks

dbForge Studio offers a number of alias masks for managing custom alias mapping. You can use the alias masks to specify conditions and actions when assigning aliases. For example, you can assign different aliases for same-named objects.

The following list demonstrates examples of the condition masks:

<product> - exact match;

<*product> - matches object names ending with "product"

<product*> - matches object names starting with "product"

<*product*> - matches object names including "product"

<*> - matches any valid object name

<schema>.<product> - exact match with the object name "product" using schema as a prefix

<schema*>.<product*> - matches object names starting with "product" with a prefix starting with "schema"

<database>.<schema>.<product> - matches the object name "product" with a database and schema in the prefix

The following list demonstrates examples of the action masks:

Id<1> - adds prefix Id to a generated alias

<1>.<2> - generates alias with a prefix

<[Dept]1> - excludes "Dept" from a generated alias

No Alias - when "No Alias" is specified in the Action column for a certain condition, no alias will be generated for that condition

Mask Prioritization

User-defined (custom) masks have precedence over the automated alias mapping.

Alias masks specified in the grid have top-down priority. For example, in the following table demonstrating an example custom alias mapping, the <*Person*> mask condition has a higher priority than <Product*>:

Condition | Action
<*Person*> | <alias1>
<Product*> | <alias2>
<Sales>.<Product*> | <alias3>

alias1 will be assigned to all objects including "Person";

alias2 will be assigned to all objects starting with "Product";

alias3 will be assigned to all objects starting with "Product" with parent "Sales".

See Also

Inserting Suggestions

Navigating through SQL documents


Objects Info

Thus topic provides objects info overview.

Quick Object Info Overview

A hint displays essential database object information, when the mouse pointer is placed over an identifier. For tables, you can see column names with data types, additional column properties (e.g., not null and identify attributes), primary, unique, and foreign keys. For other objects, the quick info includes object type and an available user description.

If you move the mouse pointer to the * symbol in SELECT statements, the hint with the column list is displayed.

If you move the mouse pointer to an alias in a FROM statement, the hint containing a table/expression with a column list is displayed (where possible).

If you select an item from the list, the hint containing quick database object information is displayed across the selected list item.

Note

The Express edition of dbForge Studio offers a partial support of this feature. Full support is available in the Standard edition only.

See Also

Parameter Info


Parameter Info

With the Parameter Info feature, you can quickly see the names and types of parameters, which are used in a function. All information is displayed in the Parameter Info tooltip. The parameter in bold is the next parameter that is required for the function.

To see information about function parameters, type the name of a function and open the left bracket. To see the tooltip again, press Ctrl+Shift+Space.

See Also

Phrase Completion


Phrase Completion

dbForge Studio for SQL Server suggests not only separate keywords and object names, but entire code phrases. The following code phrases are supported:

· BULK INSERT
· ORDER BY
· ORDER GROUP
· GROUP BY
· PRIMARY KEY
· BULK INSERT
· ENABLE TRIGGER
· DISABLE TRIGGER
· END CONVERSATION
· MOVE CONVERSATION
· TRUNCATE TABLE
· OUTER APPLY
· PARTITION BY
· FOREIGN KEY
· NOT NULL
· GET CONVERSATION GROUP
· SEND ON CONVERSATION
· APPLICATION ROLE
· ASYMMETRIC KEY
· SYMMETRIC KEY
· XML SCHEMA
· CONVERSATION TIMER
· ON NULL
· COLUMNSTORE INDEX
· ON PARTITIONS
· XML INDEX
· PRIMARY XML INDEX
· INNER JOIN
· OUTER JOIN
· CROSS JOIN

Examples

1. OUTER APPLY instead of APPLY and ORDER BY instead of ORDER are prompted in the SELECT query.

2. The ON NULL attribute of a created scalar-valued function is prompted.

See Also

Object Info

Prompt List Supported Types


Prompt List Supported Types

This topic lists the types that are supported by the prompt list of dbForge Studio.

Database Databases

Linked Server Linked Servers

Schema Schemas

Table Tables

View Views

Encrypted Views

Column Columns of table objects

Stored Function Scalar functions (including CLR), CLR aggregate functions

Table-Valued Function Table-valued (including CLR) functions

Built-in function Built-in functions

Table Level Trigger Table level trigger

Encrypted Table Level Trigger Encrypted table level trigger

Database Level Trigger Database level trigger

Encrypted Database Level Trigger Encrypted database level trigger

Server Level Trigger Server level trigger

Encrypted Server Level Trigger Encrypted server level trigger

Sequences

Synonym Synonyms for supported objects

XMLSchemaCollection XML Schema Collection

Alias Aliases for table objects (table, view, stored procedure, function, synonym, sub-query)

JOIN Suggested conditions for JOIN statements

Keyword Suggested keywords

Built-in data type Built-in data types

User data type User data types

@@ built-in function Built-in functions starting with @@

Variable Local and cursor variables

Function parameter Function and procedure in parameters

Out parameter Out parameters for procedures

Collation Collations

Cursor Cursors

Label Labels

Language Languages

Snippets

Procedures

Users

Roles

See Also

Phrase Completion

Query Formatting


Statement Expansion

The topic describes how to expand SQL statements.

Query Formatting Overview

Wildcard expansion

The feature allows you to replace the asterisk (*) symbol with the list of columns from the required table or view with help of the Tab key.

Inserting columns list on pressing Tab*

You can insert a list of columns available for required 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 pointer is placed after the * symbol.

Expand * in SELECT on Tab

Expanding stored procedures*

This feature allows to simplify debugging by replacing a call to a stored procedure with the stored procedure body - it takes the content of a stored procedure and substitutes the call in your query for it. To apply this feature to the required code, click the Convert EXEC to Script option on the shortcut menu.

Expanding INSERT, ALTER, EXEC, UPDATE statements**

This feature allows to type available table names, views, procedures, functions or triggers in ALTER, INSERT, EXEC, and UPDATE statements and then expand the statement to the full template by pressing the Tab key.

In UPDATE statements, a full list of columns from a specified table is inserted into the code you are typing.

Apart from the template, the type of column data will be generated in the comments along with the NOT NULL and ROWGUID properties. For datetime, a template for inserting time will be created. Also a DEFAULT clause is generated if a default value is created for a table.

Note

dbForge Studio for SQL Server will not offer to expand the ALTER statement for encrypted triggers, views, procedures and functions .

Execute current statement

You can execute the current SQL statement without selecting it. You just need to place the pointer over the statement and press Ctrl+Shift+E or Alt+Enter - and dbForge Studio for SQL Server will define statement boundaries itself.

Note

* These features are available in the Standard edition of dbForge Studio only.

** The Express edition of dbForge Studio offers partial support of these features. Full support is available in the Standard edition only.

See Also

Writing SQL Queries with Code Completion


Writing SQL Queries with Code Completion

dbForge Studio can save your time whether you write an SQL query or format your code. This topic briefly explains how to write SQL queries using dbForge Studio.

Writing a Query

For example, you need to write a SQL query like SELECT * FROM Production.Culture.

1. Open a new SQL document and select the AdventureWorks database from the Database list box on the SQL toolbar.
2. Start typing: se (press Enter) * fr (press Enter)

When you are typing, the suggestion box appears with the list of suggestions that are relevant to the typed symbols. The suggestions are filtered to display most relevant ones at the top of the list. To insert a suggestion into your code, navigate to a required one by using Up and Down arrow keys, and then press Enter.

dbForge SQL Complete suggestion box

Note

The first suggestion in the list is considered the most relevant, that is why it is highlighted to speed up the insertion.
3. Press the Space key and type cu (press Enter).

Inserting a table name

Formatting SQL Code

dbForge Studio can quickly format your SQL code depending on selected formatting options. To format your code, click Format Document on the SQL Complete menu.

You can format SQL code even if SQL Complete is disabled. Select a statement, and then click Format Document on the shortcut menu if you want to format the whole code, or click Format Selection if you want to format a required statement.

To disable code formatting for a specific part of the code, use the -- noformat -- endnoformat tags.

Inserting a Snippet

To insert a snippet to your SQL code, type first letter for a required statement in SQL editor. The statements prompt list appears. Select a statement itself, or insert a whole snippet. Snippets follow after the statements in the prompt list. Navigate a required snippet, and press ENTER. Alternatively, click Insert Snippet on the shortcut menu.

dbForge Studio for SQL Server allows navigating through the data input fields, where you can specify your own data. Use the TAB key to go forward and the TAB+SHIFT keys to go back.

See Also

Writing SQL Statements with Code Completion


Navigating through SQL documents

The topic explains how to navigate through an SQL document.

Document Outline window

The feature considerably simplifies navigation through large SQL documents. You can see the current document structure in the Document Outline Window. To synchronize structure with text straight from the code, click Synchronize Document Outline on the shortcut menu.

Go to definition

This feature allows navigating from Code Editor straight to Object Editor. If you press F12 or select the corresponding item from the shortcut menu when the pointer is over the object identifier, the program will find and open the object in corresponding Object Editor. Therefore, if you, for instance, need to modify an object, you can do it visually without altering the code.

See Also

Writing SQL Statements with Code Completion

Automatic Suggestions


Formatting Code

dbForge Studio can help you to format your SQL statements, paying attention to case, line breaks, whitespaces, indenting, wrapping, etc. Statements with errors are skipped and are not formatted.

Configuring Formatting Options

Before you format your code, you might want to configure formatting options and customize case formatting profiles. To tune formatting options:

1. On the Tools menu, point to Options. The Options dialog box opens.
2. On the Options dialog box, navigate to Text Editor, Formatting.
3. Apply required changes. For more information, refer to the Formatting topic.

Formatting Your Code

To format the whole code of a document do one of the following:

· On the Text toolbar, click Format Document.
· Press Ctrl+K,D.

To format current statement:, do one of the following:

· On the Text toolbar, click Format Current Statement.
· Click Format Current Statement on the SQL Editor shortcut menu.
· Press Ctrl+K,S.

To format a certain code fragment:

1. Highlight a required code fragment.
2. Click Format Selection on the SQL Editor shortcut menu. Alternatively, press Ctrl+K,F.

Semicolon Insertion

You can use dbForge Studio to insert missing semicolons after each statement in a query.

To insert semicolons, go to SQL Complete menu and click the Insert Semicolons option. Alternatively, hold Ctrl and press B and then C.

See Also

Writing SQL Statements with Code Completion

Statement Expansion


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


Working with Code Snippets

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

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 SQL Server\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 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


Query Execution History

The Execution History window allows you to view, search, edit the executed queries. To open the window, 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


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 Output window, but are also shown in Error List window.

Using Output Window

Output Panes

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

· General pane contains most of the output messages from a database server and from the application itself.
· SQL Log pane displays all SQL queries executed by an application during the current session. To see those queries, you need to turn on Write queries sent by the program to SQL Log option This enable the option, in the Tools menu, click Options. In the Options dialog box, click Environment, and then navigate to Output.
· Debug pane contains messages sent by the stored procedure debugger.

Searching Output Messages

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

1. Navigate to the Output window.
2. Open the Find and Replace window by pressing CTRL+F.
3. Enter search text and press ENTER or click the Search button.

Using Error List Window

Error List shows not only errors, warnings and informational messages which require user attention.

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

To navigate to an error in code editor, double click an error message in the Error List or right click an error message, and then click Go to Error in the shortcut menu.

How to View Errors from Current Document Only

Error List aggregates all error messages in the application. If you have multiple open documents with errors, the error processing may become awkward.

To view errors for an active document, click the In Active Document button.

See Also

Using Parameters

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

Parameters are declared using '@' prefix followed by name of the parameter. Prefix is included to the name of the parameter.

For example:

SELECT
Employee.*
FROM
HumanResources.Employee
WHERE
Employee.Title = @Job AND
Employee.VacationHours <= @Level

@Job and @Level are parameters in this query.

Modifying Parameter Values and Types

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

To set parameter values and types, select Edit Parameters on the SQL toolbar, or press F8. In the opened 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


Executing Large Scripts

dbForge Studio allows you to execute large scripts without opening 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 the help of the Execute Script Wizard.

To execute a large script:

1. On the Database menu, click [image] Execute Large Script.
2. In Connection, select a connection to a required database server against which you want to execute your script.
3. In Database, select a required database from the drop-down list/
4. In File name, specify the path to the script you want to execute.
5. In SQL file encoding, ensure 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 box.
6. Click Execute to execute the script.

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 a Connection

When several connections are established in Database Explorer, you can execute queries or perform another actions with either of them. SQL documents are associated with a connection which you can set on the Connection toolbar. The drop-down list box on the toolbar shows what connection is associated with an active document or tool window.

When creating or opening a SQL document, it is assigned to a default connection. If you create a 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 from the Document Connection drop-down list 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
 | Previous SQL | CTRL+SHIFT+ Up Arrow | Previous SQL statement from history | SQL Editor
 | Next SQL | CTRL+SHIFT+ Down Arrow | Next SQL statement from history | SQL Editor
 | SQL History | CTRL+ALT+H | Open SQL History dialog | SQL Editor
 | Edit Parameters | CTRL+SHIFT+P | Edit parameters | SQL Editor
 | Redirect Data To Output Window | CTRL+SHIFT+T | Show data as text in the Output window | 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 from the current document tab to the next tab. | SQL Editor
 |  | CTRL+PLUS SIGN (+) KEY | Zoom font size in | SQL Editor
 |  | CTRL+MINUS SIGN (-) KEY | Zoom font size out | SQL Editor
 |  | CTRL+0 | Reset font size to the default value | SQL Editor
 | Go To Definition | F12 | Go to definition | SQL Editor
 |  | CTRL+R | Hide/Show additional document views | SQL Editor
 | Analyze Code | CTRL+K,A | Runs T-SQL Analyzer | SQL Editor
 |  | CTRL+L | Delete current code line and copy it to clipboard | SQL Editor
 |  | CTRL+W | Close the currently opened tab | SQL Editor
 |  | CTRL+N | Open a new document tab with inherited server and database of the current document tab | SQL Editor

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

See Also

Writing and Executing SQL Statements

How to: Analyze T-SQL Code


Analyzing T-SQL Code

dbForge Studio provides a fast and automated way to ensure that your T-SQL code fits to your predefined design and style guidelines as well as best coding practices.

Before you analyze your code, you might want to configure the rules that will run as part of the analysis. To configure different sets of rules, run a smaller set of rules, or create your own rules, see Code Analysis Options.

To Analyze Code

1. Open the database instance, containing the code you want to analyze.
2. Right-click anywhere on the document, and then select Analyze Code from the shortcut menu. Alternatively, on the Text toolbar, click [image] Analyze Code.

The code in your database instance is analyzed, and any warnings and errors appear in the Error List.

To navigate to error or warning location within the code, right-click the error or warning, and then select Go to Error from the shortcut menu.

See Also

Writing and Executing SQL Statements

Executing Scripts through the Command Line


Executing Scripts through the Command Line

You can automate executing the scripts 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.
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 dbforgesql.com file located in the dbForge Studio for SQL Server installation folder on your PC, and then press the SPACE key.

C:\Program Files\Devart\dbForge Studio for SQL Server\dbforgesql.com

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

C:\Program Files\Devart\dbForge Studio for SQL Server>dbforgesql.com /execute /?

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

C:\Program Files\Devart\dbForge Studio for SQL Server>dbforgesql.com /execute
/connection:"Data Source=DBMSSQL\MSSQL2012;Integrated Security=False;User ID=sa"

6. Specify the script file.

C:\Program Files\Devart\dbForge Studio for SQL Server>dbforgesql.com /execute
/connection:"Data Source=DBMSSQL\MSSQL2012;Integrated Security=False;User ID=sa" /inputfile:"script.sql"

7. Specify the password.

C:\Program Files\Devart\dbForge Studio for SQL Server>dbforgesql.com /execute
/connection:"Data Source=DBMSSQL\MSSQL2012;Integrated Security=False;User ID=sa" /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 SQL Server>dbforgesql.com /execute
/connection:"Data Source=DBMSSQL\MSSQL2012;Integrated Security=False;User ID=sa" /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:"Data Source=DBMSSQL\MSSQL2012;Integrated Security=False;User ID=sa"

/inputfile:"script.sql"

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

C:\Program Files\Devart\dbForge Studio for SQL Server>dbforgesql.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


Formatting Code through the Command Line

You can automate code formatting 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.
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 dbforgesql.com file located in the dbForge Studio for SQL Server installation folder on your PC, and press the SPACE key.

C:\Program Files\Devart\dbForge Studio for SQL Server\dbforgesql.com

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

dbforgesql.com /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:
dbforgesql.com /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>
/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|...>
/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>
/includesubfolders | This switch is used to include the current directory and all subdirectories in search operation. Command usage looks like: /includesubfolders

See Also

Writing and Executing SQL Statements


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


Add Tables to Query

When you create a query, you are retrieving data from a table or other objects structured like tables — views and certain user-defined functions. To work with any of these objects in your query, you add them to the diagram pane.

To add a table or table-valued object to a query

1. On the Start page select SQL Development, and then click Query Builder.
2. In Database Explorer, select a required table or several tables (or table-valued objects) and drag-and-drop them to the diagram pane.

Alternatively you can

1. In Database Explorer, select a required table. You can select multiple tables by holding the CTRL button.
2. Right click selected tables, and point to Send to in the shortcut menu, and then click Query Builder.

Tables and views are automatically added to the query when you reference them in the statement in the SQL editor.

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.

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


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


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.


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-2017 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.


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. On the Start Page click [image] SQL Development, then click [image] Query Builder.
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 the [image] Execute button 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. The shortcut menu appears.
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 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 the [image] right arrow button. 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 the [image] Change Order button. 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 the the [image] Execute button.

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

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.


Viewing Data in Grid

This section describes features for viewing data in dbForge Studio for SQL Server.

In This Section

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

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

Grouping Data in Grid
Tells how to use data grouping.

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

Server-side and Client-side Sorting and Filtering Data in Grid
Explains 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
Teaches how to use paginal mode to limit row count in the grid.

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

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

See Also

Working with Data in Data Editor

Editing Data in Grid


Viewing Data in Grid Overview

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

To retrieve data, do any of the following:

· Click Results as Grid on the SQL toolbar before executing a query that returns data.
· Open a table or view editor and switch to the data view.
· In Database Explorer, right-click a table or a view, and then click Retrieve Data on 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: in Data Editor, right-click a table or a view, and then click Data View on the shortcut menu.
· Drag the table or view from the database explorer to the Data window.

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. By default, Paginal Mode is enabled in data view with 1000 records per page, so only 1000 records are displayed at once. For more information, see 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 and Editor

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.

Problems that may occur during server-side sorting and filtering:

In some cases the application can not modify the starting query to send it to the server and perform server-side sorting or filtering. These cases are the following:

· There is an expression without alias in a SELECT clause. Actually this is a restriction of MS SQL Server - one cannot modify a query that contains a statement without an alias in a SELECT clause. And if there is no alias for a column, one cannot sort or filter data in other columns as well, until all data is fetched or an alias is given.
· There is a query with an ORDER BY clause. In this case no server-side filtering can be performed, and it is a SQL Server restriction.

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 SQL Server.

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.

Foreign Key Lookup
The topic describes how to open table data using links available in a cell.

See Also

Working with Data in Data Editor

Data Shortcut Keys


Editing Data in Grid Overview

When dbForge Studio for SQL Server 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 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 for SQL Server, 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), select Set Value To, and then click 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 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

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

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.

Note

If you are using Devart Schema Compare or Data Compare tools, this functionality is not available.

See Also

Editing Data in Grid

Data Shortcut Keys


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


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.


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 Microsoft SQL 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

Working with Data Generator

Using Generators


Using Generators

dbForge Studio for SQL Server provides a collection of generators to create different column values for the tables you want to populate.

The following basic data generators are available:

· Check Constraint Generator
· Constant Generator
· Datetime Generator
· Files Folder Generator
· Foreign Key (auto assigned) Generator
· Foreign Key (manually assigned) Generator
· Lorem Ipsum Generator
· Python 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 15+ basic generators, dbForge Studio for SQL Server provides 190+ 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


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.

CustomerID column

Select the CustomerID column. The ID (sequential) generator is automatically assigned, which generates unique identifiers for the column. For this generator, along with the basic settings, you can specify the Min and Max values for the IDs to be generated.

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 provide 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.

Gender column

Select the Gender column. The Gender generator is automatically assigned to this column. The data grid in the settings pane is designed to show weight ratios and percentages of the male and female values to be generated. The weight ratios can be customized by manually altering the numbers in the data grid. The percentages will be automatically recalculated concurrently with the change of the weight ratios.

SSN column

Select the SSN column. The US Social Security Number (SSN) 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.

Avatar column

Select the Avatar column. The Avatar Images generator is automatically assigned to this column. The generator contains more than 150 different avatars. You can specify the fold and a subfolder to load images from, as well as select a file pattern.

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.

While selecting tables and customizing generators, the Preview window displays data to be generated in real-time.

See Also

Populating Database


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 actions and warnings.

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.

Click Generate to finish the process.

See Also

Creating Custom Generators


Creating Custom Generators

dbForge Studio for SQL Server 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.

You can create a custom generator in two ways - on the basis of a template or from scratch.

Creating a custom generator on the basis of a template

dbForge Studio for SQL Server is supplied with a wide collection of generator templates that can be easily used for creation of your own data generators.

To create a custom generator based on a template:

1. Open the Templates folder in C:\Users\Public\Public Documents\Devart\dbForge Studio for SQL Server\Data Generators.
2. Open a required template in an editor.
3. Modify the selected generator according to your needs. For more information, see the Explanation of tags and Mapping rules sections of this topic.
4. Put the generator file into the Data Generators folder.
5. Start (or restart) dbForge Studio.

Creating a custom generator from scratch:

The following example is based on the Regular Expression Generator, which is most frequently customized.

1. Open the Data Generators folder in C:\Users\Public\Public Documents\Devart\dbForge Studio for SQL Server\Data Generators.

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>SqlRegularExpressionGenerator</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. Start (or restart) 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

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 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 varchar(max), nvarchar(max), text, ntext, image, and varbinary(max))
maxlen="n" | the maximum length of a column (this parameter is optional; the parameter is ignored for varchar(max), nvarchar(max), text, ntext, image, and varbinary(max))

See Also

Working with Data Generator

How To: Generate Data through the Command Line


How To: Generate Data through the Command Line

You can automate data generation 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:

dbforgesql.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


Documenting SQL Databases

In This Section

Generating Database Document
This topic describes how to generate a database documentation file.

Documenting Databases though the Command Line
This topic describes how to generate database documentation file through the command line.


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 SQL Server 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

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 Database Documenter dialog box opens.

8. Select format and directory for the document file.
9. Click Generate.

See Also

Documenting SQL Databases

Documenting Databases though the Command Line


Documenting Databases though the Command Line

You can automate document generation 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:

dbforgesql.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:<"Data Source=DBMSSQL\MSSQL2012;Integrated Security=False;User ID=sa">
/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

Documenting SQL Databases


Creating and Running SQL Server Unit Tests

This section describes how to use the functionality of dbForge Studio for SQL Server.

In This Section

Installing Test Framework
This topic guides through the installation process of the test framework.

Uninstalling Test Framework
This topic describes a step-by-step algorithm on how to uninstall the test framework.

Installing Sample Database
This topic describes how to install a sample database.

Adding New Test
This topic describes how to add a new test for a database or database object.

Viewing Test List
This topic describes how to view the list of available tests.

Running All Tests
This topic describes how to run all tests in a class.

Fixing a Failed Test
This topic describes a failing test case and the way to fix it.


Installing Test Framework

To install a test framework:

1. In Database Explorer, right-click a connected database or a specific database object.

2. Navigate to Unit Test, and then click Install Test Framework on the shortcut menu.

Alternatively, go to Database in the main menu, navigate to Unit Test and select Install Test Framework.

3. The Install tSQLt Framework window opens. Choose a target database, for which the framework will be installed and click Install.

4. The window shows the installation progress. Click the Minimize Application button to minimize the window.

5. Upon successful installation, the window displays the message "tSQLt Framework installed successfully" and a version of tSQLt Framework installed.

6. Click Finish.

See Also

Uninstalling Test Framework

Creating and Running SQL Server Unit Tests


Uninstalling Test Framework

To uninstall a test framework:

1. In Database Explorer, right-click a connected database or a specific database object.

2. Navigate to Unit Test, and then click Uninstall Test Framework on the shortcut menu.

Alternatively, go to Database in the main menu, navigate to Unit Test and select Uninstall Test Framework.

3. A message appears asking if you are sure you want to delete the framework. Click Yes.

See Also

Installing Sample Database

Creating and Running SQL Server Unit Tests


Installing Sample Database

This topic describes how to install a sample database that comes with example tests.

To install a sample database:

1. Go to Database in the main menu, navigate to Unit Test and select Install Sample Database.

2. Select the server to install the sample database on and specify the name of the database.

3. After the successful installation, the sample database will be added to the list of databases in Database Explorer.

4. To see the list of example tests, in Database Explorer, navigate to the sample database, go to the Programmability folder, and then to Procedures.

5. To run an example test, right-click the test, navigate to Unit Test and select Run Test.

6. To run all tests, right-click the sample database (or the Programmability folder), navigate to Unit Test and select Run All Tests.

You can also manage the example tests in the Test List Manager. For more information see the topic Viewing Test List.

See Also

Adding New Test

Creating and Running SQL Server Unit Tests


Adding New Test

To add a new test:

1. In Database Explorer, right-click a connected database or a specific database object.

2. Navigate to Unit Test, and then click Add New Test on the shortcut menu.

Alternatively, go to Database in the main menu, navigate to Unit Test and select Add New Test.

3. The Add New Test dialog window opens.

4. Specify a connection and database for the test to be created on.

5. In the Test Name box, specify a name for the new test.

Note

If you want to create a new test with a name that already exists, dbForge Studio displays the Test creation failed warning message informing that there is already an object with such a name in the database.

6. In the Class Name box, specify a class, to which the new test should be added.

Note

A test class is a special schema configured to include one or more related tests.

7. Click Add Test.

8. The test has been created, and dbForge Studio displays opens a query template for you to fill up using regular T-SQL.

See Also

Viewing Test List

Creating and Running SQL Server Unit Tests


Viewing Test List

To view a test list:

1. In Database Explorer, right-click a connected database or a specific database object.

2. Navigate to Unit Test, and then click View Test List on the shortcut menu.

Alternatively, go to Database in the main menu, navigate to Unit Test and select View Test List.

3. The Test List Manager window opens.

4. There are several buttons on the Test List Manager toolbar for managing unit tests, in particular:

· The Run Checked Test(s) [image] button allows to run all the checked tests.
· The Refresh [image] button allows to update the test list.
· The Add New Test [image] button allows to create a new test for a required database.
· The Delete Test [image] button allows to delete the test being currently selected.
· The Delete Test Class [image] button allows to delete the test class being currently selected.

See Also

Running All Tests

Creating and Running SQL Server Unit Tests


Running All Tests

To run all tests against a database:

1. In Database Explorer, right-click a connected database or a specific database object.

2. Navigate to Unit Test, and then click Run All Tests on the shortcut menu.

3. After the tests are completed, the Test Results window appears. The window displays a grid containing details for each test. Specifically, it shows the status of a test (failed or succeeded), test name, class name, and error message (if any).

4. There are several buttons on the Test Results toolbar for managing the results of tests, in particular:

· The Run Checked Test(s) button [image] allows to rerun all the checked tests.
· The Run All Tests button [image] allows to rerun all the tests.
· The Stop button [image] allows to stop the current testing process.

See Also

Fixing a Failed Test

Creating and Running SQL Server Unit Tests


Fixing a Failed Test

This topic describes an example failing test and the way to fix it.

The following picture demonstrates a test case, which is implemented as the tSQLt.AssertLike stored procedure. The test compares the return result (N'Test') with an expected pattern N'Test%T'. The result of running the test is displayed in the Test Result window.

The test has failed, because the return result 'Test' does not match the expected pattern N'Test%T'.

The window also shows the error message "Fail". The message output is an optional feature, which can be realized by defining the Message parameter of the AssertLike procedure.

To fix the failed test:

1. Double-click the test or right-click the test and choose Open Test on the context menu. The source code for the AssertLike test will be displayed.

2. Modify the source code by writing N'Test%' instead of N'Test', as shown in the following picture, and run the test again.

As you can see, the test has succeeded, because now the return result matches the expected value.

See Also

Creating and Running SQL Server Unit Tests


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.
· 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.

dbForge Studio also includes the Export Data to SQL wizard that allows you to export data from tables to SQL.

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 Microsoft SQL Server server connection, a database, table(s), view(s), which you want to export, and then 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 SQL Server 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.


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.


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 SQL Server, 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 dbforgesql.com file, located in dbForge Studio for SQL Server installation folder on your PC, and press the SPACE key:

C:\Users\user>"C:\Program Files\Devart\dbForge Studio for SQL Server\dbforgesql.com"


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 SQL Server>dbforgesql.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 dbo.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 SQL Server\dbforgesql.com" /dataexport /templatefile:"c:\Users\User\Documents\dbForge Studio for SQL Server\Export\sample_template.det"

See Also

Working with Command Line

How To: Export Data through 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.

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.

Note

When executing SQL queries in batches errors handling may be performed not as a user may expect it to be performed, because such queries will be executed till the end of the batch in any case, even if execution should have been aborted because of some errors inside the batch, and that's default behavior of SQL server and cannot be changed.

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 Microsoft SQL Server 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 Microsoft SQL Server 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 Microsoft SQL Server 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.

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 Microsoft SQL Server 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 Microsoft SQL Server 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 Microsoft SQL Server 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 Microsoft SQL Server 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 Microsoft SQL Server 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 Microsoft SQL Server 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 Microsoft SQL Server 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 Microsoft SQL Server 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 Microsoft SQL Server 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 Microsoft SQL Server 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 Microsoft SQL Server 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 Microsoft SQL Serverconnections, 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 Microsoft SQL Server 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 Microsoft SQL Server 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 Microsoft SQL Serverconnections, 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 Microsoft SQL Server 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 Microsoft SQL Server 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 Microsoft SQL Serverconnections, 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


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 Microsoft SQL Server 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 Microsoft SQL Server 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 Microsoft SQL Server 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 Microsoft SQL Server 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


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 Microsoft SQL Server connection and a database, select New table, and enter a name of a table to import the data to. To create or edit Microsoft SQL Server 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


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.


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 [image] Export 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 SQL Server, 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 dbforgesql.com file, located in dbForge Studio for SQL Server installation folder on your PC, and press the SPACE key:

C:\Users\user>"C:\Program Files\Devart\dbForge Studio for SQL Server\dbforgesql.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 SQL Server>dbforgesql.com /dataimport /?


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.

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.

Pivot Table Components
Describes the components of a pivot grid and how to use them.

See Also

Data Analysis

Viewing Data in Master-Detail Tables


What is a Pivot Table?

Pivot Table is a data analysis tool that converts large amounts of data into a compact and informative summaries - pivot tables.

With the Pivot Table tool, established in dbForge Studio for SQL Server, you don't need to go into SQL subtleties to group and summarize your data. Visual Pivot Table Designer, advanced filtering, visual data presentation in a graph make your data easier to read, understand and analyze. You can create an SQL summary report, analyze statistic information on the basis of a certain criterion, see the graphic interpretation of an SQL Server report, to output the summary information etc.

The Pivot Table feature simplifies the aggregation process and the statistical information count. The obtained report can be printed out, exported to various document formats and e-mailed in the required format by one click.

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 the pivot table view of the SQL document.

Before creating a pivot table, note that:

· 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 the pivot table areas to add the data to the pivot table.

Creating Pivot Table

To create a pivot table:

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 a database and drag-and-drop them to the query document. They are displayed as shapes with columns. In table shapes, select check boxes next next to the required columns. We would like to analyze which film category had more rentals and brought the highest revenue in each particular month. Therefore, we select the following 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 the 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 clear 2006 in the dialog box.

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

Data Analysis

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 the 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 the Order options from the shortcut menu 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 clear the 2006 check box in the dialog box.

You can add the 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 data. To open the dialog box, click the [image] Prefilter icon on the toolbar or right-click the pivot table header and select Prefilter from the shortcut 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 shortcut 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 shortcut 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 shortcut 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 the Between value.
4. Enter 20 and 40 values into the Value1 and Value2 fields to specify the required range of values.
5. Clear 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 the 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

Data Analysis

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 the 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 the rows containing a calculated sum of row field values. Column totals are the columns containing a calculated sum of column field values.

Totals are calculated basing on the 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 basing on the selected summary functions.

See Also

Pivot Table Components

Viewing Data in Master-Detail Tables


Viewing Data in Master-Detail Tables

dbForge Studio for SQL Server 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:

· In the Database menu click [image] Master-Detail Browser
· Click New in the File menu, and then click [image] Master-Detail Browser
· Right-click a table(s) or view(s) in the Database Explorer window and click Send to then click [image] Master-Detail Browser.

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. In 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 Set Table as Master [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] Browse Data (F5) 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. Click [image] Master-Detail Browser on the Database Tools toolbar. 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 clear all 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


Working with Database Objects

In this section you can learn how to perform certain operations on database objects.

In This Section

How To: Create Copy of Database Object
This topic describes how to copy a database object.

How To: Create a Copy of Database Object
Describes the Duplicate Object feature.

How To: Delete Database Objects
This topic describes how to delete database objects.

How To: Dispaly the Number of Database Objects
This topic describes how to display the number of database objects.

How To: Filter Database Objects
This topic describes how to filter database objects.

Working with Tables
This topic provides information about table editing.

How To: Work with Views
Overview on working with views.

How To: Generate DDL Statements for Database Objects
This topic describes how to generate DDL script for database objects.

How To: Work with Stored Procedures
This topic describes how to create, edit, execute or delete stored procedures.

How To: Create a Trigger
This topic describes how to create, edit, or delete stored programs.

How To: View Object Dependencies
The topic describes the Objects Dependencies tree.


How To: Create a Database Object

dbForge Studio for SQL Server provides the New Object feature. You can start creating database objects right from the database shortcut menu.

The feature allows to create the following database objects:

· Table
· View
· Synonym
· Table-valued function
· Scalar function
· Aggregate function
· Procedure
· Sequence
· DDL trigger

To create a database object:

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.

See Also

Working with Database Objects

How To: Create a Copy of Database Object


How To: Create a Copy of Database Object

How To: Create a Copy of a Database Object

dbForge Studio for SQL Server provides the Duplicate Object feature. You can make the exact copy of a database object in the same or another database of the same server instance.

To copy an object:

1. After connecting to a required instance of the Microsoft SQL Server Database Engine, in Database Explorer, click the server name to expand the server tree.
2. Click on the arrow, next to the database icon, to expand it.
3. Expand a required database object folder.
4. Right click a required object and then click Duplicate Object in the shortcut menu. The Duplicate Object dialog box opens.
5. Optionally, in the Duplicate Object dialog box, change a destination database, destination schema, and object name.
6. Optionally, click Edit script, to view or edit the automatically generated T-SQL script.
7. Click OK.

See Also

Working with Database Objects

How To: Filter Database Objects


How To: Delete Database Objects

With dbForge Studio for SQL Server you can delete a database and/or any database object immediately from the Database Explorer window.

Deleting a Database

1. Right-click a database in Database Explorer and select Delete from the shortcut menu.

The Delete Database dialog box will appear.

· (Optional) To delete the backup and restore history for the subject database from the msdb database, select "Delete backup and restore history information for database".
· (Optional) To terminate connections to the subject database, select "Close existing connections".
· (Optional) To view script changes, click the Script Changes button.

2. Click OK to confirm the deletion, or Cancel to terminate it.

Deleting a Database Object

1. Right-click a database object in Database Explorer and select Delete from the shortcut menu.
2. In the new dialog box, click OK if you confirm the object's deletion, or No to terminate it.

See Also

Working with Database Objects

How To: Dispaly the Number of 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, right-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 (for example, Functions), the object number is not displayed. Instead, the object number for each sub-node is displayed separately.

See Also

Working with Database Objects

How To: Filter Database Objects


How To: Filter Database Objects

With dbForge Studio for SQL Server you can create a filter for database objects in accordance with a certain criteria.

Creating a Filter

1. To create a filter for an object category (for example, Tables), right-click its node and choose Filter from the shortcut menu. Alternatively, select an object category node and click Filter on the Database Explorer toolbar.

The Filter Settings dialog box will appear.

2. Specify parameters for a filter in Criteria:
· In the Property column, select the required property (Name, Schema or Owner).
· In the Operator column, select the matching type of the filter syntax (Equals, Not Equals, Contains, Starts With, Ends With).
· In the Pattern column, enter the full or partial syntax of the property or properties you want to apply to a filter.
3. Check All or Any to make a filtered object comply with all or any criteria.
4. Click OK.

When a filter is applied to a certain database object category, it is labeled as (filtered).

Deleting a Filter

To delete a filter, right-click an object category node, and then click Clear Filter on the shortcut menu.

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.

Altering Existing Table
Describes editing of existing tables.

Alternative Table Editing
Describes alterntate ways to edit tables.

Viewing and Editing Table Data
Describes how to view all data in a table and edit it quickly.

Woking with Constraints
Describes how to work with primary foreign keys in SQL Server..

See Also

Working with Database Objects

How To: Work with Views


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. In 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 Database Explorer.
2. Click Edit Table on 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.
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

How To: Define 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 a table or open existing one from Database Explorer. There are five tabs in Table editor: Main, Constraints, Indexes, Storage, Data.

Defining Columns

Switch to the Columns tab of Table Editor to define columns or rename the table.

To add a column to table, right-click the grid, and then click New Column on the shortcut menu. Alternatively, press the INSERT key.

To edit an existing column and its properties, double-click a column row.

To remove a column, right-click on it and select Delete Column from shortcut menu.

Defining Constraints

Switch to the Constraints tab of Table editor to add or alter foreign and primary keys.

To add a key to table, right-click the tab, and then click New Foreign Key or New Primary Key on the shortcut menu, then choose the type of key you want to create.

To edit an existing key, right-click it, and then click Edit Constraint on the shortcut menu. You can also double-click on a key row to accomplish this task.

To remove a key, right-click it and select Delete Constraint from 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 shortcut menu. Another way to do it is to press INSERT key.

To edit an existing index and its properties, double-click an index row to accomplish this task.

To remove an index, right-click it, and then click Delete Index on the shortcut menu.

See Also

Working with Tables

Altering Existing Table


Altering Existing Table

A table contains columns and indexes. Besides, a table has options such as table type, row format and so on. To alter a table means to edit its structure: changing, removing, or adding columns, indexes, modifying table options.

To view or edit structure of a table, right-click it in Database Explorer and select Edit Table from the shortcut menu. Editor tabs appear on the document window. On Main, Constraints, and Indexes tab you can open a dialog where you can modify item properties. Use right-click to add or remove columns, keys, and indexes. On the Storage tab, you can adjust specific settings for the table. See topic How To: Define Table Structure for detailed information.

If you want to undo all actions made since table document (or any another object editor) was opened or saved, click on 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

Alternative Table Editing


Alternative Table Editing

dbForge Studio enables to edit table structure in two ways. Use whichever method you like more.

· First, you can do it directly from Database Explorer. Expand table node, then expand Columns, Constraints, or Indexes node. You can double-click an item to open a dialog where all parameters of the item are accessible for editing. Once you close the dialog the changes are applied to object.
· The other way to alter table structure is to open a document for a table. To do this, right-click a table in Database Explorer and select Edit Table from the shortcut menu. Table structure appears in document area with available tabs. To edit a table element, switch to tab that contains it and double-click it. Corresponding dialog appears where you can make changes to item. To apply the changes, close the dialog and click Save button.

You can use these two ways of editing tables simultaneously.

Note

Changes made through Database Explorer are instantly applied and reflected in the document. When you alter a table using document area, changes are applied only when you save the document.

See Also

Working with Tables

Viewing and Editing Table Data


Viewing and Editing Table Data

dbForge Studio allows you to quickly retrieve data from a table and edit it using a grid-based editor. All SQL queries needed to accomplish these tasks are performed automatically. Moreover, data returned by SELECT queries can be edited in same way with the same comfort.

To retrieve all data from a table, do either of these ways:

1. In Database Explorer, right-click a table, and then click Retrieve Data on the shortcut menu. A new document appears with a grid and table's data in it. Now you can edit any cell of the grid simply by clicking on it and typing new values. Changes apply to the table once you press ENTER. Note, retrieving data is asynchronous, so it does not prevent you from doing other tasks while a large bulk of data is being retrieved.

2. Open the table in the editor and switch to the Data tab.
3. Right-click the table, and then click Show Details on the shortcut menu. The Object Viewer window opens. In this window, switch to the Data tab.

4. Double-click the table to open Table editor and switch to the Data tab.

To empty the table, i.e., remove all data but retain the table structure, click Truncate Table on the table's shortcut menu.

To edit data in the table, make it editable, chose the table in the Table combobox on the viewer toolbar.

dbForge Studio allows you to perform a rich set of operations with table data, such as sorting, filtering, modifying, caching, and controlling changes with transactions.

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

Unique and Primary Keys
Overview on working with unique and primary keys.

Primary Keys
Overview on working with primary keys.

Check Constraints
Overview on working with check constraints.

Foreign Keys
Overview on working with foreign keys.


Unique and Primary Keys

A unique constraint designates a column as a unique key. A composite unique key designates a combination of columns as the unique key.

To satisfy a unique constraint, no two rows in the table can have the same value for the unique key. However, the unique key made up of a single column can contain Nulls. To satisfy a composite unique key, no two rows in the table or view can have the same combination of values in the key columns. Any row that contains Nulls in all key columns automatically satisfies the constraint. However, two rows that contain Nulls for one or more key columns and the same combination of values for the other key columns violate the constraint.

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 a Null.

Certain restrictions must be obeyed when working with unique and primary keys:

· A table or view can have only one primary key.
· A composite key cannot have more than 32 columns.
· You cannot designate the same column or combination of columns as both a primary key and a unique key.
· Some column types such as LOB, LONG, VARRAY, NESTED TABLE, REF are not supported for unique or primary keys.

To Create a Key

Open the table you need and choose New Primary Key or New Unique Key from Table menu. Add required columns to the key and click OK. You can also switch to Constraints tab and create a key within the shortcut menu.
To Edit a Key

Navigate to the key in Database Explorer and double-click it or open the table that owns the key, switch to Constraints tab and click Edit Constraint on the shortcut menu.

To Drop a Key

Navigate to the key in Database Explorer and choose Delete from the shortcut menu or open the table that owns the key, switch to Constraints tab and choose Delete Constraint from key's shortcut menu.

See Also

Working with Constraints

Primary Keys


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 a Null. A table or view can have only one primary key.

To Create a Primary Key

Open the table you need and choose New Primary Key from Table menu. Add required columns to the key and click OK. You can also switch to Constraints tab and create the primary key within shortcut menu.

To Edit a Primary Key

Navigate to the key in Database Explorer and double-click it or open the table that owns the primary key, switch to Constraints tab and choose Edit Constraint from shortcut menu.

Note

The already created Primary key can be edited only on the Constraints page. The Primary check box is inactive on opening a column.

To Drop a Primary Key

Navigate to the key in Database Explorer and, and then click Delete on its shortcut menu. Alternatively, open the table that owns the primary key, switch to Constraints tab, and then click Delete Constraint on key's shortcut menu.

See Also

Working with Constraints

Check Constraints


Check Constraints

Check constraints enforce domain integrity by limiting the values that are accepted by one or more columns. The search condition must evaluate to a Boolean expression and cannot contain subqueries. A column-level check constraint can reference only the constrained column, and a table-level check constraint can reference only columns of the constrained table.

Multiple check constraints can be defined for a table. SQL Server can define only one column-level check constraint per column per CREATE TABLE statement (although each column constraint can have multiple conditions).

To Create a Check Constraint

Open the table you need, switch to Constraints tab, and select New Check Constraint in the shortcut menu.

To Edit a Check Constraint

Navigate to the constraint in Database Explorer and double-click it or open the table that owns the constraint, switch to Constraints tab and choose Edit Constraint from shortcut menu.

To Drop a Constraint

Navigate to the constraint in Database Explorer and choose Delete from shortcut menu or open the table that owns the constraint, switch to Constraints tab and choose Delete Constraint from its shortcut menu.

Example

Consider you need to ensure that all employees in table Emp have and will have salary that is more than 500. This can be implemented best with check constraint. Open the table and create the constraint as described above. In field Condition type "Sal>500" and save the document. At this moment all data in the table is checked for validity and, if it satisfies the condition, new constraint is applied to the table.

This example assumes you do not change some of constraint's options which are located at the bottom of constraint editor. These options add some flexibility to constraints both in the moments of creation and altering. For example, you can:

· Uncheck Enabled option to prevent constraint from activating. You can enable it later.
· Uncheck Validate option to avoid verification of data that table already contains. Newly added or modified data still will be checked for validity.
· Check Deferrable option to preserve opportunity of deferring check operation until after a transaction is committed.

See Also

Working with Tables

Foreign Keys


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 foreign key and the referenced key can be in the same table or view.

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:

To Create a Foreign Key

Open the table you need and choose New Foreign Key from Table menu. Add required columns, select referenced table and referenced constraint and click OK. You can also switch to Constraints tab and create the constraint within the shortcut menu.

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.

To Edit a Foreign Key

Navigate to the constraint in Database Explorer and double-click it or open the table that owns the constraint, switch to the Constraints tab and click Edit Constraint from the shortcut menu.

To Drop a Key

Navigate to the constraint in Database Explorer and choose Delete from shortcut menu or open the table that owns the key, switch to Constraints tab and choose Delete Constraint from its shortcut menu.

See Also

Working with Constraints

How To: Work with Views


How To: Work with Views

A view is a virtual table based on the result-set of an SQL statement. A view contains rows and columns, just like a real table. The fields in a view are fields from one or more real tables in the database.

dbForge Studio for SQL Server allows you to create, modify, and drop views, retrieve and alter data in underlying tables.

Prerequisites

In order to start creating a view, you should have the following privileges:

· CREATE VIEW on the proper database
· SELECT privilege on the proper tables

Creating a View

1. In Database Explorer, right-click the Views node and select [image] New View.
2. Input name of the view and type a query that will represent the view.
3. Save the document by clicking the [image] Update Database button on the bottom of the window, or the [image] Save button on the Standard toolbar. If there are any errors in the SQL syntax, you will be notified about it.
CREATE VIEW Syntax

CREATE VIEW HumanResources.vEmployeeDepartment
AS
SELECT
e.[BusinessEntityID]
,p.[Title]
,p.[FirstName]
,p.[MiddleName]
,p.[LastName]
,p.[Suffix]
,e.[JobTitle]
,d.[Name] AS [Department]
,d.[GroupName]
,edh.[StartDate]
FROM [HumanResources].[Employee] e
INNER JOIN [Person].[Person] p
ON p.[BusinessEntityID] = e.[BusinessEntityID]
INNER JOIN [HumanResources].[EmployeeDepartmentHistory] edh
ON e.[BusinessEntityID] = edh.[BusinessEntityID]
INNER JOIN [HumanResources].[Department] d
ON edh.[DepartmentID] = d.[DepartmentID]
WHERE edh.EndDate IS NULL

Note

A view always shows up-to-date data! The database engine recreates the data, using the view's SQL statement, every time a user queries a view.

Creating a View with the Help of Snippet

To simplify the process of a View creation, you may use the CreateView snippet.

1. Click the [image] New SQL button on the Standard toolbar.
2. Right-click anywhere in the SQL document, and then click Insert Snippet. The snippets list will appear.
3. Double click the CreateView snppet.
4. The following code will be inserted to the document.

5. Edit the code accordingly and save the view.

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 a view in Database Explorer, and then click Retrieve Data on the 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: Generate DDL Statements for Database Objects


How To: Generate DDL Statements for Database Objects

dbForge Studio for SQL Server allows you to generate DDL statements for database objects, such as: tables, views, stored procedures and functions, UDFs and triggers. Using this feature you can make scripts for recreating database objects or object groups.

Generating DDL Script

1. On the Database menu, click Generate Schema Script.
2. On the General tab, set up a database connection.
3. Check database objects for DDL script generation. (If you run the wizard from the shortcut menu of the single object node, this step will be skipped. You can return to it by clicking the Back button on the Script Generation Options page).
4. Click Next if the Script Generation Options page was not turned off and go to step 4, otherwise, go to step 5.
5. Select DDL generation options you want to tweak. You can set default values of these options in the Options dialog.
6. Click Generate.

You can turn off Generate Schema Script Wizard appearing when generating the DDL statement for the single object.

See Also

Working with Database Objects

How To: Work with Stored Procedures


How To: Work with Stored Procedures

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 Database Explorer, navigate to the Procedures node.
2. Select New Procedure from the shortcut menu.
3. Input name of the trigger and type a script that will represent the trigger.
4. Save the document by clicking the [image] Update Database button on the bottom of the window, or the [image] Save button on the Standard toolbar. If there are any errors in the SQL syntax, you will be notified about it. .

CREATE PROCEDURE Syntax

CREATE PROCEDURE dbo.uspGetManagerEmployees
@BusinessEntityID [int]
AS
BEGIN
SET NOCOUNT ON;
-- Use recursive query to list out all Employees required for a particular Manager
WITH [EMP_cte]([BusinessEntityID], [OrganizationNode], [FirstName], [LastName], [RecursionLevel]) -- CTE name and columns
AS (
SELECT e.[BusinessEntityID], e.[OrganizationNode], p.[FirstName], p.[LastName], 0 -- Get the initial list of Employees
for Manager n
FROM [HumanResources].[Employee] e
INNER JOIN [Person].[Person] p
ON p.[BusinessEntityID] = e.[BusinessEntityID]
WHERE e.[BusinessEntityID] = @BusinessEntityID
UNION ALL
SELECT e.[BusinessEntityID], e.[OrganizationNode], p.[FirstName], p.[LastName], [RecursionLevel] + 1 -- Join recursive member to anchor
FROM [HumanResources].[Employee] e
INNER JOIN [EMP_cte]
ON e.[OrganizationNode].GetAncestor(1) = [EMP_cte].[OrganizationNode]
INNER JOIN [Person].[Person] p
ON p.[BusinessEntityID] = e.[BusinessEntityID

Creating a Stored Procedure with the Help of Snippet

To simplify the process of a Stored Procedure creation, you may use the CreateProcedure snippet.

1. Click the [image] New SQL button on the Standard toolbar.
2. Right-click anywhere in the SQL document, and then click Insert Snippet. The snippets list will appear.
3. Double click the CreateProcedure snppet.
4. The following code will be inserted to the document.

5. Edit the code accordingly and save the trigger. If there are any errors in the SQL syntax, you will be notified about it.

Editing a Stored Procedure

To edit a stored procedure

1. In Database Explorer, navigate to the Procedures node and expand it.
2. Right-click a procedure and select Edit Procedure from shortcut menu.

- or -

double-click a procedure.

Executing a Stored Procedure

Right-click a stored procedure in Database Explorer and select [image] Execute.

The stored procedure editor opens if it was not opened before. If the procedure accepts parameters, you will see the parameters dialog 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 a Stored Procedure

Click [image] Stop Execution.

Deleting a Stored Procedure

Right-click a stored procedure in Database Explorer and select Delete.

See Also

Working with Database Objects

How To: Create a Trigger


How To: Create a Trigger

A trigger is a special kind of a store procedure that executes in response to certain action on the table like insertion, deletion or updation of data. It is a database object which is bound to a table and is executed automatically.

Prerequisites

You should have the following privileges:

· TRIGGER privilege on the proper database
· SELECT, INSERT, ALTER, UPDATE, SELECT and DELETE privileges on the proper table(s).

Creating a Trigger

1. In Database Explorer make sure that connection to your server containing the base is active
2. Navigate to the node of a certain table and expand it.
3. Right-click the Triggers node and choose New Trigger from the shortcut menu. A trigger editor document will appear.
4. Input name of the trigger and type a script that will represent the trigger.
5. Save the document by clicking the [image] Update Database button on the bottom of the window, or the [image] Save button on the Standard toolbar. If there are any errors in the SQL syntax, you will be notified about it.

CREATE TRIGGER Syntax

CREATE TRIGGER dEmployee ON HumanResources.Employee
INSTEAD OF DELETE NOT FOR REPLICATION AS
BEGIN
DECLARE @Count int;

SET @Count = @@ROWCOUNT;
IF @Count = 0
RETURN;

SET NOCOUNT ON;

BEGIN
RAISERROR
(N'Employees cannot be deleted. They can only be marked as not current.', -- Message
10, -- Severity.
1); -- State.

-- Rollback any active or uncommittable transactions
IF @@TRANCOUNT > 0
BEGIN
ROLLBACK TRANSACTION;
END
END;
END;

Creating a Trigger with the Help of Snippet

To simplify the process of a Trigger creation, you may use the CreateTrigger snippet.

1. Click the [image] New SQL button on the Standard toolbar.
2. Right-click anywhere in the SQL document, and then click Insert Snippet. The snippets list will appear.
3. Double click the CreateTrigger snppet.
4. The following code will be inserted to the document.

5. Edit the code accordingly and save the trigger. If there are any errors in the SQL syntax, you will be notified about it.

Editing a Trigger

Edit a view by selecting Edit Trigger from the Database Explorer node shortcut menu. In the opened document, you can alter the query text. Save the document to apply changes you've made to the query text.

Dropping a Trigger

To drop a trigger, click Delete on the Database Explorer node shortcut menu.

Enabling and Disabling Triggers

To enable or disable a trigger, click Enable or Disable on the Database Explorer node shortcut menu.

To enable or disable all triggers at once, select Enable All or Disable ALL from the Database Explorer node shortcut menu.

See Also

Working with Database Objects


How To: View Object Dependencies

The Objects Dependencies tree, introduced in dbForge Studio for SQL Server, 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 [image] Depends On and [image] 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 the object type).

See Also

Working with Database Objects

How To: Create a Trigger


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 Objects 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


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 Objects 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


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


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.

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. 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 SQL Server 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 Microsoft SQL Server 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


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 Microsoft SQL Server 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


Managing Users and Permissions

This section gives basic info on managing user accounts and permissions.

In This Section

Manipulating User Logins
This topic tells you how to manipulate user logins.

Manipulating User Accounts
This topic tells you how to manipulate user accounts.

Manipulating Roles
This topic tells you how to manipulate roles.

Manipulating Application Roles
This topic tells you how to manipulate application roles.

Granting Permissions on Database Objects
Learn the topic to grant object permissions to a user.

Using Roles in Security Manager
This topic provides a brief explanation on the roles usage in dbForge Studio.

Working with Multiple Users
Learn how to work with multiple logins, users, roles or application roles.

Watermarks in Security Manager
Learn situations when editors for managing users accounts are not available.


Manipulating User Logins

This topic tells you how to manipulate user logins with dbForge Studio Security Manager.

A login is a security principal, or an entity that can be authenticated by a secure system. Users need a login to connect to SQL Server.

Security Manager provides an easy way to add, alter or remove users visually without typing an SQL code. To open the Security Manager, on the Database menu, select [image] Security Manager.

Creating a new user login

1. Open the Security Manager.
2. Click the [image] Create User button above the User List. Alternatively, select the Logins node, right-click it, and then select New Login from the shortcut menu.
3. Fill the Name field, choose the User type, and fill the fields necessary for the chosen user type.
4. Click the Save button on the Security Manager toolbar.

Editing a user login

To edit a user login, open the Security Manager, expand the Logins node, and then select a required user login in the tree. After editing, click the Save button on the Security Manager toolbar to apply your changes. If you want to discard the changes, click the Undo button.

Deleting a user login

To delete a user login, open the Security Manager, expand the Logins node, and then click Delete from the shortcut menu of a required user login; or select a required user login in the tree and press Delete.

See Also

Managing Users and Permissions

Manipulating User Accounts


Manipulating User Accounts

This topic tells you 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 an SQL code. To open Security Manager, on the Database menu, select [image] Security Manager.

Creating a User Account

1. Open Security Manager.
2. Click the [image] Create User button above the User List

-or-

right-click a user and select [image] New User from the shortcut menu.

3. Fill in the Name, Database, Password, and Confirm Password fields.
4. Grant necessary privileges to a user (For information about granting privileges to user, see the Granting Privileges on Database Objects, and Using Roles in Security Manager topics).
5. Optionally, set the server resources limit for the user.
6. 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 a user in Security Manager, and then click Duplicate Object on 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] Script Changes button on the Security Manager toolbar.

Deleting a User Account

Open the Security Manager, right-click the account you want to delete, and then click Delete on the shortcut menu. Alternatively, select the required user in the list and click the Delete button above the user List, or press the DELETE key.

See Also

Managing Users and Permissions

Manipulating Roles


Manipulating Roles

This topic tells you how to manipulate roles with dbForge Studio Security Manager.

The Security Manager provides an easy way to add, alter or remove roles visually without typing an SQL code. To open the Security Manager, on the Database menu, select [image] Security Manager.

Creating a new role

1. Open the Security Manager.
2. Click the [image] Create Role button above the User List Alternatively, right-click a role, and then select [image] New Role from the shortcut menu.
3. Fill the Role name field.
4. Select the owner.
5. Grant necessary roles and permissions to a role.
6. Click the Save button on the Security Manager toolbar.

Editing a role

To edit a role account, open the 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 the 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 Permissions

Manipulating Application Roles


Manipulating Application Roles

This topic tells you how to manipulate application roles with dbForge Studio Security Manager.

The Security Manager provides an easy way to add, alter or remove application roles visually without typing an SQL code. To open the Security Manager, on the Database menu, select [image] Security Manager.

Creating a new role

1. Open the Security Manager.
2. Click the [image] Create Application Role button above the User List. Alternatively, right-click a role, and then select [image] New Application Role from the shortcut menu.
3. Fill the Name, Password, Confirm Password fields.
4. Specify a default schema.
5. Grant necessary permissions to an application role and specify owned schemas.
6. Click the Save button on the Security Manager toolbar.

Editing an Application Role

To edit an application role account, open the Security Manager, expand the Application Roles node, and select a required application role in the tree. After editing, click the Save button on the Security Manager toolbar to apply your changes. If you want to discard the changes, click the Undo button on the Security Manager toolbar.

Deleting an Application Role

Open the Security Manager, expand the Application Roles node, and then select Delete from the shortcut menu of a required application role; or select a required application role in the tree, and then press DELETE.

See Also

Managing Users and Permissions

Granting Permissions on Database Objects


Granting Permissions on Database Objects

Permissions on database objects can be granted on the Object Permissions tab of the Security Manager window. To call it, on the Database menu, select [image] Security Manager.

To give a user some privileges on a database object, perform the following actions.

1. Open the Security Manager.
2. Select a user account in the user account list in the left part of the Security Manager, and then switch to the Object Permissions tab.
3. Select a 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 a 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 Permissions tab of the 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 Permissions

Using Roles in Security Manager


Using Roles in Security Manager

This topic provides a brief explanation on the roles usage in dbForge Studio.

Roles are used to grant a set of privileges to a user at once, based on the work the user needs to carry out on the server, without checking each one in the list of available options. It is also possible to assign several roles to one user. Such approach simplifies the work of database administrators.

1. On the Database menu, select [image] Security Manager..
2. Select the user account you want to modify in the left part of the Security Manager window.
3. Go to the [image] Role Members tab in the right part of the Security Manager window.
4. Check the required roles. Note that some roles can include other roles. You can determine this by the status of the checkboxes 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.

See Also

Managing Users and Permissions

Working with Multiple Users


Working with Multiple Users

dbForge Studio provides possibility to work with multiple logins, users, roles or application roles in the Security Manager.

This feature is useful if you need to add the same privileges or roles for several logins, users, roles or application roles.

To select multiple logins, users, roles or application roles, press CTRL and click the required security objects, or if they are located one by one, select the first one, press SHIFT, and click the last security object you need.

For several logins, you can edit server roles and server permissions, for users - role membership and object permissions, for roles - role members and object permissions, and for application roles - object permissions.

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 Permissions

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 a database is selected.

See Also

Managing Users and Permissions


Debugging T-SQL Database Objects

This section provides information on debugging stored procedures and scripts.

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 Microsoft SQL Server stored procedure.

How To: Debug a Stored Function
This example demonstrates how to debug a Microsoft SQL Server stored function.

How To: Debug a Trigger
This example demonstrates how to debug a Microsoft SQL Server trigger.

How To: Debug an SQL Script
Describes how to debug a Microsoft SQL Server stored procedure.

Execution Control
Describes different navigation techniques while debugging stored database objects.

How To: Work with Breakpoints
Describes what breakpoints is and how to use them.

Debug Shortcut Keys
Lists shortcut key combinations that may be used while debugging stored database objects.


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

Requirements for Starting the Debugger

When you attempt to start the debugger, the following requirements should be fulfilled:

· Server support of the debugger. To learn more on how to configure the debugger, visit the Configure the Transact-SQL Debugger page.
· The Database Engine SQL document must be connected by using the Windows Authentication.
· The Database Engine SQL document must be connected to an instance of the Database Engine from SQL Server 2005 Service Pack 2 (SP2) or later.
· You cannot run the debugger when an SQL document is connected to an instance that is in the single-user mode.

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 T-SQL Database Objects

How To: Debug a Stored Procedure


How To: Debug a Stored Procedure

This example demonstrates how to debug Microsoft SQL Server 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 Procedure

Use the script below to create the procedure that takes two input parameters: DateFrom and DateTo. Based on these input parameters the table fills up with data.

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

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.
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. To stop the debugging process, click the [image] Stop button.
6. Click [image] Execute to run the stored procedure.
7. You can see the message telling us that the stored procedure executed successfully. To verify this, you can retrieve the data from the table.
8. In the Database Explorer choose the required database.
9. Click Tables and then right-click the required table.
10. Click Retrieve Data from the shortcut menu.

11. dbForge Studio displays the result table.

As you see, the Debugger for Microsoft SQL Server is a very simple and powerful tool to use. You can use different debugging techniques to achieve successful results.

See Also

Debugging T-SQL Database Objects

Walkthrough: Debug a Stored Function


How To: Debug a Stored Function

This example shows how to debug a stored function in dbForge Studio for SQL Server. Use provided scripts to create sample objects in your test database.

Creating a Sample Function

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.

Debugging Function

To debug the Microsoft SQL Server function:

1. In Database Explorer, choose a test database.
2. Click Procedures and then double-click the procedure to open it.
3. Left-click in the gray margin next to the 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 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 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.
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.

You may click the procedure in the Call Stack window to get back to the parent code.

See Also

Debugging T-SQL Database Objects

Walkthrough: Debug a Trigger


How To: Debug a Trigger

This example shows how to debug a trigger in dbForge Studio for SQL Server. Use provided scripts to create sample objects in your test database.

Creating a Sample Trigger

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 trigger that generates an error message in case.

Debugging a Trigger

To debug the Microsoft SQL Server trigger:

1. In Database Explorer, choose your test database.
2. Expand the Triggers folder, and then double click the 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 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 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 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 trigger and the procedure. You may notice the yellow arrow next to the 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 T-SQL Database Objects

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 SQL Server.

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 T-SQL Database Objects

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, T-SQL Database Objects 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 T-SQL Database Objects

How To: Work with Breakpoints


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 T-SQL Database Objects

Execution Control


Debug Shortcut Keys

The following shortcut key combinations can be used while debugging T-SQL Database Objectss 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 T-SQL Database Objects
 | Compile | CTRL+F7 | Compile T-SQL Database Objects or view | T-SQL Database Objects or view
 | Compile for Debugging | CTRL+ALT+F7 | Compile T-SQL Database Objects for Debugging | T-SQL Database Objects
 | Start/Continue | CTRL+F5 | Start/continue debugging | SQL document or T-SQL Database Objects
 | 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 T-SQL Database Objects


Optimizing SQL Queries

In This Section

Profiling SQL Queries
The topic describes how to troubleshoot, monitor, and measure your application's SQL statements and stored procedures.

Working with Plan Diagrams
The topic describes how to work with plan diagrams.


Profiling SQL Queries

You can use the Query Profiler tool to debug, troubleshoot, monitor, and measure your application's SQL statements and stored procedures. If your application has a performance problem that you think might be caused by a particularly long-running query, you can analyze query durations.

In this topic we will review how to profile a simple query. As an example we will use the AdventureWorks2012 test database from Microsoft.

Profiling an SQL statement

We are going to select all persons from the Person table where the first name is "Robin".

1. On the Start page, click Query Profiler. A new SQL document window opens.
2. In the text editor, type the following script:

SELECT
*
FROM AdventureWorks2012.Person.Person
WHERE FirstName = 'Robin'

3. Click Execute. The Plan Diagram window opens.

Note, the select icon contains the exclamation mark icon that warns about a shortcoming. A tooltip appears automatically, when you pause the mouse pointer over the Select icon. The bottom part of the tooltip contains the warning message, that tells us that the index is missing. To add the index

1. In Database Explorer, click [image] next to the Person table to expand it.
2. Right-click the Index folder, point to New Index, and then click Non-Clustered Index. The Indexes tab of the Table editor opens.
3. On the General tab of the Index Properties grid, navigate to Index columns.
4. In the Name column of Index key columns, select the FirstName column from the drop-down list box.
5. Click Update Database.

Now we can get back to the Query Profiler and click [image] the Get New Results button.

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. To compare results, hold the CTRL key and select both plan diagrams.

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

Working with Plan Diagrams


Working with Plan Diagrams

Query Profiler allows you to examine plans of different queries in a single view. For this, hold the CTRL key and select several plan diagrams in the query profiling tree.

You can set a number of plans that you want to compare with the most recent result. For this, click [image] and then select a required number.

The following picture demonstrates that the Compare last two results option is selected. In this case, when you modify a query and then click [image] the Get New Results button, the most recent result will be automatically compared with Plan #2.

Plan #1 does not participate in comparison.

To zoom in and out a pan diagram, right click the plan diagram and then click Zoom.


Profiling Server Events

This section provides information on profiling server events

In This Section

How To: Profile Server Events
This topic describes how to profile server events.

Filtering Trace Events
This topic describes how to filter trace events.

Sorting Trace Events
This topic describes how to sort trace events.


How To: Profile Server Events

Permissions Required to Run Event Profiler

To run Event Profiler, users must be granted the following permissions:

· ALTER TRACE
· ALTER ANY EVENT SESSION
· CONNECT SQL
· VIEW SERVER STATE TO login_name

To grant the permissions:

1. Open Security Manager, expand the Logins node, and then select a required user login in the tree.
2. Switch to the Server Permissions tab of the Logins Editor.
3. Select the Granted check-box next to the permissions.

For more information, refer to the Manipulating User Logins topic.

To create a new trace:

1. On the Start page, navigate to Administration, and then click Profile Server Events. The Profile Server Events wizard appears.
2. Specify the connection.
3. Optionally, select a profiling template, modify the trace file settings and the data storage settings. Click Next.

Note

If no template is selected the Standard template will be used by default.
4. On the Events to Capture page, select the events you want to capture. Click Next.

Note

By default, the wizard shows the events, that are included into the selected template. To add additional events, select the Show all check-mark.
5. Optionally, on the Actions page, select the actions you want to capture in the current events session. Click Next.
6. Optionally, on the Event Filters page, specify filter options to limit the tracing data.
7. Click Execute. The Trace will start and the Server Event Profiler Document opens.

See Also

Filtering Trace Events

Profiling Server Events


Filtering Trace Events

Filterting Trace Events

To filter trace events:

1. On the Profile Server Events toolbar, click Stop Trace.
2. Click the Filter glyph on a column header
3. Select a filter from the list.

Each data column has different filter criteria:

· Numeric and datetime columns have =,<>,>=, and <= filters
· String columns have LIKE and NOT LIKE filters
· String columns can use % character as a wildcard
· Datetime filters must use format YYY/MM/DD hh:mm:ss

Note, that not all data columns can be filtered in Trace: data has to exist for the filter to be applied. Event Profiler displays only available filter criteria for data columns. Filters are applied at the trace level to all events in the trace. Not all events populate the same kind of data in the same columns. Many columns have overloaded values based on the event being collected.

See Also

Sorting Trace Events

Profiling Server Events


Sorting Trace Events

To sort trace events

To enable sorting options, stop tracing server events - click Stop Trace on the Profile Server Events toolbar.

To sort trace events in the document 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 Clear Sorting on the column 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.

See Also

Profiling Server Events


Comparing and Synchronizing Database Schemas

This section helps you quickly get started with comparing data in dbForge Studio for SQL Server.

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

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.

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 schema comparison results.

How To: Synchronize Schemas
This topic describes how to synchronize schemas.


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 in the Database Design section of the Start Page.
The Schema Comparison wizard opens.
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 comparison options.

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 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 appears, 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 the [image] Save button on the toolbar.

Opening Schema Comparison Document

· Drag it to the dbForge Studio for SQL Server 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: 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. Clear the check boxes 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

How To: Compare and Synchronize Schemas through Command Line

Advanced Topics


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 submenu of the shortcut menu. By default, comparison results are always grouped by one of these items.

Note

Appearance of this window may vary depending on the product.

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.

Note

Appearance of this window may vary depending on the product.

See Also

Managing Comparison Results


How To: Compare Objects' DDL

dbForge Studio for SQL Server 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 SQL Server. 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 SQL Server 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 will open.
2. Select a report format (HTML, Excel, XML, or XML for Excel), 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


Working with Command Line

This section describes how to automate data comparison and synchronization using the command line.

In This Section

How To: Compare and Synchronize Schemas through Command Line
This chapter explains how to use the command line interface to run comparisons.

How To: Compare Database Snapshots through Command Line
The topic explains how to compare two database snapshots, or a snapshot with a database through command line.

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.

See Also

Comparing and Synchronizing Database Schemas


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 dbforgesql.com file, located in dbForge Studio for SQL Server 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 connection:"Data Source=source_name;Integrated Security=False;User ID=user_name;
Password=password;database=database_name" /target connection:"Data Source=tartget_name;
Integrated Security=False;User ID=user_name;Password=password;database=database_name"

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 SQL Server>dbforgesql.com /argfile:file_name.txt /schemacompare /sync

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

dbforgesql.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:"Data Source=DBMSSQL\MSSQL2012;Integrated Security=False;User ID=sa;
database=AdventureWorks" /target connection:"Data Source=DBMSSQL\MSSQL2012;Integrated Security=False;
User ID=sa;database=AdventureWorks"

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

Command Line Options for /schemacompare Operation


How To: Compare Database Snapshots through Command Line

This topic describes how to compare two snapshots, and a snapshot with a database using the command line.

Comparing two snapshots through the command line

To compare two database snapshots through the command line, do the following:

1. Open Command Prompt by pressing Win+R, and typing '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. Type a path to the dbforgesql.com file (note that the .com extension can be omitted in the command line), located in dbForge Studio for SQL Server installation folder on your PC, and press the space bar.

"C:\Program Files\Devart\dbForge Studio for SQL Server\dbforgesql.com"

3. Specify the snapshots you want to compare:

C:\Program Files\Devart\dbForge Studio for SQL Server>dbforgesql.com /schemacompare /source snapshot:"d:\test\source.snap" /target snapshot:"d:\test\target.snap"

4. Press ENTER to run the process.

Tip: To obtain information on switches, type the following in the command line:

C:\Program Files\Devart\dbForge Studio for SQL Server>dbforgesql.com

More examples can be obtained by typing the following:

C:\Program Files\Devart\dbForge Studio for SQL Server>dbforgesql.com /schemacompare /?

Comparing a snapshot with a database through the command line

To compare a snapshot with a database through the command line, do the following:

1. Open Command Prompt by pressing Win+R, and typing 'cmd' in the Open line.
1. Type a path to the dbforgesql.com file (note that the .com extension can be omitted in the command line), located in dbForge Studio for SQL Server installation folder on your PC, and press the space bar.

"C:\Program Files\Devart\dbForge Studio for SQL Server\dbforgesql.com"

2. Specify the snapshot and the database you want to compare:

C:\Program Files\Devart\dbForge Studio for SQL Server>dbforgesql.com /schemacompare /source snapshot:"D:\snapshot\snapname.snap"
/target connection:"Data Source=DBMSSQL\MSSQL2012;Integrated Security=False;User ID=sa;database=AdventureWorks"

See Also

Working with Command Line


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 SQL Server>dbforgesql.com /schemacompare /?

Below all switches of this option are described, together with usage examples.

Argument

Action and Usage

/backup

/backup[:dir]
If target is a live database: Makes a backup of a target database before the synchronization.
If the backup directory is not specified, the default server's backup directory is used.
If target is a scripts folder: Makes a copy of a target scripts folder before the synchronization. If the copy folder is not specified, the default user's backup directory is used.

/compfile

/compfile:<path>
This switch is used to load command line settings from the comparison project file, *.scomp.

Example of using a file with comparison settings, saved earlier:

C:\Program Files\Devart\dbForge Studio for SQL Server>dbforgesql.com /schemacompare /compfile:"D:\workDir\OSC1vsOSC2.scomp"

/groupby

/groupby:<none/status/objecttype>
This switch is used when generating comparison reports. Use it to group objects in such report.

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 SQL Server>dbforgesql.com /schemacompare /compfile:"OSC1vsOSC2.scomp" /report:"report.txt" /reportformat:HTML /groupby:objecttype

/log

/log:<filepath>
Use this switch if you want to generate comparison log file in a specified directory.

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 SQL Server>dbforgesql.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

/report:<filepath>

/reportformat:<HTML|XLS|XML|XMLFOREXCEL>
You can generate schema comparison report in .html, .xls, and .xml 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:

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 SQL Server>dbforgesql.com /schemacompare /compfile:"OSC1vsOSC2.scomp" /report:"report.txt" /reportformat:HTML

/source

Specifies source with the following options:

server:<name> database:<db> [user:<name>] [password:<pw>]
Connects to a live database by specified parameters. If 'user' is not specified, the system's integrated security is used.

connection:<connection_string>
Allows specifying the full connection string with additional parameters.

snapshot:<filepath>
Loads a database from the specified snapshot file.

backup:<filepath> setid:<GUID>
Loads a database backup from one or several files. To specify multiple backup files, you should specify the "backup:<path>" parameter as many times as many files you have. The "setid" parameter specifies unique backup set.

scriptsfolder:<folderpath>
Loads database objects from the specified scripts folder.

/target

Specifies target with the following options:

server:<name> database:<db> [user:<name>] [password:<pw>]
Connects to a live database by specified parameters. If 'user' is not specified, the system's integrated security is used.

connection:<connection_string>
Allows specifying the full connection string with additional parameters.

snapshot:<filepath>
Loads a database from the specified snapshot file.

backup:<filepath> setid:<GUID>
Loads a database backup from one or several files. To specify multiple backup files, you should specify the "backup:<path>" parameter as many times as many files you have. The "setid" parameter specifies unique backup set.

scriptsfolder:<folderpath>
Loads database objects from the specified scripts folder.

/sync

/sync[:path]
You can perform schema synchronization from the command line interface. If you specify output file for synchronization, only synchronization script will be generated.

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 SQL Server>dbforgesql.com /schemacompare /compfile:"OSC1vsOSC2.scomp" /sync:"D:\compare_result.sql"

Usage Examples

· Compare databases using settings from a file saved earlier:
/schemacompare /compfile:"D:\workDir\SC1vsSC2.scomp"
· Compare and synchronize schemas using connection through the client. Log will be written to the specified file:
/schemacompare /source server:SqlServer1 user:sa password:sa database:db1 /target server:SqlServer2 user:sa password:sa database:db2 /sync /log:"D:\sync.log"
· Compare specified databases and save the synchronization script to the D:\compare_result.sql file:
/schemacompare /source server:SqlServer1 user:sa password:sa database:db1 /target server:SqlServer2 user:sa password:sa database:db2 /sync:"D:\compare_result.sql"
· Compare and synchronize databases using settings from the file, ignore case and foreign keys during comparison; generate a report to the specified file in the html format:
/schemacompare /compfile:"SC1vsSC2.scomp" /icase:yes /IgnoreForeignKeys:yes /report:"report.txt" /reportformat:HTML /groupby:objecttype /incsettings:T /sync

See Also

Working with Command Line


Command Line Options for /schemacompare Operation

By default, dbForge Studio for SQL Server 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
CompareDatabaseProperties | cdbp | Compare database properties
DecryptEncryptedObjects | decrypt | Decrypt encrypted objects
ForceColumnOrder | force | Force column order
IgnoreAuthorization | iauth | Ignore authorization on schema objects
IgnoreBoundRulesDefaults | iboundruldef | Ignore bound rules and defaults
IgnoreCase | icase | Ignore case
IgnoreChangeTracking | itracking | Ignore CHANGE_TRACKING clauses and statements
IgnoreCheckConstraints | icheck | Ignore check constraints
IgnoreClrDataTypesInColumn | icdtc | Ignore CLR datatypes in columns
IgnoreCollations | icollate | Ignore collations
IgnoreColumnOrderInIndexes | mindcolorder | Ignore column order for the included columns in indexes
IgnoreComments | icomment | Ignore comments
IgnoreConstraintsNames | icnames | Ignore constraints' names
IgnoreConstraintSystemNames | icsn | Ignore constraints' system names
IgnoreDatabaseExtendedProperties | idbprop | Ignore database extended properties
IgnoreDatabaseInSynonyms | idbsyn | Ignore database and sever names in synonyms
IgnoreDatabaseObjectExtendedProperties | iobjprop | Ignore database object extended properties
IgnoreDataCompression | idatacompression | Ignore DATA COMPRESSION
IgnoreDataTypesInColumn | idtc | Ignore data types in column
IgnoreDDLTriggerState | iddltstate | Ignore state of DDL triggers
IgnoreDefaultCollations | idefcollate | Ignore default column collations
IgnoreDefaultConstraints | idefault | Ignore default constraints
IgnoreDMLTriggerState | idmltstate | Ignore state of DML triggers
IgnoreDropDMLTriggers | idropt | Ignore DML and INSTEAD OF triggers present only in Target
IgnoreDropIndexes | idropi | Ignore indexes present only in Target
IgnoreEventNotificationOnQueues | ievent | Ignore event notification on queues
IgnoreFilegroupsPartitionSchemes | istorage | Ignore filegroups and partitioned schemes/functions
IgnoreForeignKeyActions | ifkacts | Ignore foreign keys actions ON UPDATE and ON DELETE
IgnoreForeignKeys | ifk | Ignore foreign keys
IgnoreFullTextCatalogPath | iftpath | Ignore full-text catalog path
IgnoreFullTextSearch | isearch | Ignore full-text search
IgnoreIdentity | iidentity | Ignore identity on columns
IgnoreIdentitySeedIncrementValues | iseed | Ignore identity seed and increment values
IgnoreIndexColumnsSortOrder | iicso | Ignore sort direction (ASC/DESC) for index columns
IgnoreIndexes | iindex | Ignore indexes
IgnoreIndexesNames | iinames | Ignore indexes names
IgnoreIndexPageAndRowLock | iprlock | Ignore PAGE LOCKS and ROW LOCKS for indexes and constraints
IgnoreInsteadOfTriggers | iotrig | Ignore INSTEAD OF triggers
IgnoreKeywordReduction | ired | Ignore keyword reduction
IgnoreLockEscalation | ils | Ignore LOCK_ESCALATION
IgnoreLogins | ilogin | Ignore logins, certificates, asymmetric keys for users
IgnoreNextFilegroups | inextfg | Ignore next filegroups
IgnoreNocheck | inocheck | Ignore NOCHECK
IgnoreNotForReplication | ireplication | Ignore NOT FOR REPLICATION
IgnoreNotNullConstraints | inotnull | Ignore NOT NULL for a column
IgnoreObjectNamesInDefinitions | ion | Ignore object names in definintions
IgnorePadIndexAndFillfactor | ipiff | Ignore PAD INDEX and FILLFACTOR for indexes and constraints
IgnoreParserErrors | iparsererrors | Ignore parser errors
IgnorePermissions | iperm | Ignore permissions
IgnorePrimaryKeys | ipk | Ignore primary keys
IgnoreQuotedIdentifierAndANSINulls | iquotansi | Ignore QUOTED IDENTIFIERS and ANSI NULLS
IgnoreReplicatedProcedures | irproc | Ignore replication procedures
IgnoreReplicatedRoles | irrole | Ignore replication roles
IgnoreReplicatedSchemas | irschem | Ignore replication schemas
IgnoreReplicatedTables | irept | Ignore replicated tables
IgnoreReplicationTriggers | irtrig | Ignore replication triggers
IgnoreSemicolons | isc | Ignore semicolons
IgnoreSequenceMax | iseqmax | Ignore sequence max value
IgnoreSequenceMin | iseqmin | Ignore sequence min value
IgnoreSequenceStart | iseqstart | Ignore sequence start value
IgnoreSignatures | isign | Ignore signatures
IgnoreStatistics | istat | Ignore statistics
IgnoreStatisticsNorecompute | isnr | Ignore STATISTICS, NORECOMPUTE for indexes and constraints
IgnoreTableDMLTriggers | itdmltrig | Ignode table DML triggers
IgnoreTriggerFireOrder | ifire | Ignore firing order for DDL and DML triggers
IgnoreTSQLtFramework | itsqlt | Ignore tSQLt framework and unit tests
IgnoreUniqueKeys | iuk | Ignore unique keys
IgnoreUserDefaultLanguage | iudeflang | Ignore user DEFAULT_LANGUAGE
IgnoreUserDefaultSchema | iuds | Ignore user DEFAULT SCHEMA
IgnoreUserPermissions | iuperm | Ignore users' permissions
IgnoreWhiteSpace | ispace | Ignore white space
IgnoreWithEncryption | iwenc | Ignore WITH ENCRYPTION
IgnoreWithNocheck | iwnocheck | Ignore WITH NOCHECK state on constraints
IgnoreWithOptionOrder | iwith | Ignore WITH option order
MappingIgnoreCase | micase | Ignore case in object names when mapping them
MappingIgnoreSpaces | mispace | Ignore spaces in object names druing mapping and comparing
MappingSimilar | msim | Associate column names having similar name options
PopulateFullTextIndexes | populate | Populate full-text indexes
QuoteObjectNames | quote | Quote object names with square brackets
UserDataTypesToSystem | udttosys | Convert user data types into SQL Server system data types
AddBackupType | addbt | Add backup type
AddingErrorHandling | adderrorhandle | Add error handling statements
AddTransactionIsolationLevel | addtransiso | Set transaction isolation level
AddWithEncryption | addwithencr | Add WITH ENCRYPTION
AddWithNocheck | addnocheck | Add constraints and keys to tables using WITH NOCHECK
BackupExtension | extbackup | Extension for backup file
CheckObjectExistence | cexist | Check for object existence
CommentDdlForKeysCertificates | commentkeys | Comment DDL statements for signatures, certificates, asymmetric and symmetric keys
CreateBackupFolder | cbackupfolder |
BackupType | bt | Backup type
DeployDatabaseInSingleUserMode | depsingl | Synchronize database in the single user mode
DisableDdlTriggers | noddl | Disable DDL triggers during synchronization
DropCreateOnly | dropcreateonly | Use DROP and CREATE instead of ALTER
DropCreateOnlyAssemblies | dropcreateonlya | Use DROP and CREATE instead of ALTER for assemblies
DropCreateOnlyTables | dropcreateonlyt | Use DROP and CREATE instead of ALTER for tables
ExcludeComments | nocomments | Exclude comments
ExcludeDependencies | edep | Exclude dependencies
ExecuteAsSingleTransaction | tran | Execute a synchronization script as a single transaction
IncludePrintComments | iprint | Include print comments in the deployment script
IncludeUseDatabase | inud | Include USE <database_name> clause to the script
NeedCompressBackup | comprbackup | Use compression for backup
RefreshViews | rview | Exclude dependencies from a synchronization script
SynchronizeAsmViaFiles | asmviafiles | Synchronize assemblies via files
UseSchemaTransfer | ust | Use ALTER SCHEMA TRANSFER expression to transfer tables between schemas
VerifyTableData | verify | Verify table data using checksum
IncludeComparisonSettings | incsettings | Includes identical objects into your report
IncludeIdenticalObjects | incident | Includes comparison options into your report. This option is available only for HTML reports.
SelectedObjectsOnly | selobjonly | Includes objects selected for synchronization into your report

See Also

Working with Command Line


Advanced Schema Comparison 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 Schemas on Different Microsoft SQL Server Server Versions
Describes peculiarities of schema comparison on servers with different versions.

Known Schema Comparison Problems
Lists known schema comparison problems.


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. (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

Working with Command Line


Viewing Schema Differences Overview

After comparing schemas or a schema and a project, the differences are shown in the Schema Comparison document. In the upper part you will see the names of compared databases and their connections. Source schema objects are displayed in the left part and Target schema objects are in the right one.

Object status

dbForge Studio for SQL Server 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 Microsoft SQL Server servers. For example, if source table contains a BIT column and target Microsoft SQL Server server does not support BIT columns. Table status will be inconsistent.
· Unknown - object metadata cannot be retrieved, so its status is unknown.

Note

If a Source table has partitioning and a Target Microsoft SQL Server 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 check boxes for them in the grid.

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

Comparing and Synchronizing Schemas on Different Server Versions


Comparing and Synchronizing Schemas on Different Server Versions

Comparing and Synchronizing Schemas on Different Microsoft SQL Server Server Versions

When comparing schemas on different Microsoft SQL Server servers, some incompatibilities can occur in schema objects. For example, when comparing schemas on Microsoft SQL Server 3.23 and 5.x. Schema on Microsoft SQL Server 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 SQL Server treats such incompatibilities.

Not Supported Objects

If source schema contains objects that are not supported on the target Microsoft SQL Server 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 Microsoft SQL Server 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 Microsoft SQL Server 3.23 and Microsoft SQL Server 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, Microsoft SQL Server 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 Microsoft SQL Server schemas you may face some problems caused by Microsoft SQL Server limitations. Here is the list of widely-known problems:

· If you compare schema on Microsoft SQL Server 6.0 with another schema on Microsoft SQL Server 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.
· Microsoft SQL Server does not allow editing tables with EXAMPLE table engine, so synchronization of such tables will fail.
· On the Microsoft SQL Server 6.0 table, containing VARCHAR column can have ROW_FORMAT = FIXED. On the earlier Microsoft SQL Server 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 SQL Server.

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

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.

How To: Save and Load Data Comparison
The topic explains how to save a document that contains data comparison results.

Mapping
This section describes automatic and manual object mapping.

Data Comparison Options
The topic describes options of comparison process.

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. To start comparing data, you need to open Data Comparison Wizard. You can do this by:
1.1. Selecting Database Sync section on the Start page and selecting New Data Comparison;
1.2. Selecting [image] New Data Comparison from the Comparison menu.
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 comparison process is completed, you can view results in the Data Comparison Document.

See Also

Comparing Data

How To: Save and Load Data Comparison


How To: Save and Load Data Comparison

You can save the Data Comparison document (the one that opens after comparison to show comparison results) for the future usage. The saved file has the '*.dcomp' extension and contains data comparison information, including:

· Source and target settings
· Selected values for comparison options
· Selected values for synchronization options
· Schema mapping settings

It does not contain data comparison results or object DDL. When the file is opened, data are recompared. If target or source can not be found, the New Data Comparison dialog appears, where you should set source or target options.

Saving Data 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 the [image] Save button on the toolbar.

Opening Data Comparison Document

· Drag it to the dbForge Studio for SQL Server 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

Comparing and Synchronizing Data in Databases

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 schemas, 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: Map Schemas
Describes how to map schemas manually.

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. For more information about mapping warnings see the Mapping Warnings topic.

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. Select source and target objects in the corresponding boxes.
4. Click the Map button and the mapped objects disappear from the Objects Mapping dialog and will be shown in the Mapping tab's grid.
5. Repeat steps 3-4 until you map all the objects you need. Click OK to close the dialog.

How to map an object using custom queries

You can use this option to compare custom results received after query execution instead of comparing whole tables or views. For this, you should:

1. Click the [image] Custom Query button on the Mapping page of the wizard. The Custom Queries Mapping dialog box will open.

Note

Actual document look may slightly vary from the above image depending on the product you use.
2. Select Query or Table radiobuttons for Source and Target.
3. If you selected Table for both, refer to the How to map an object section of this topic. If you selected Query for Source, Target or both, write query name in the field (if the name assigned by default is not appropriate).
4. Type the needed query in the SQL field.
5. Click Validate to validate your queries, if necessary.
6. Click Map.
7. Click OK to close the dialog box.

Tips:

Click the Cancel button to close the dialog and discard mapping.

Click the [image] 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.

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: Map Schemas


How To: Map Schemas

dbForge Studio allows you to map tables or views with non-equal owners. It can be useful if schemas were renamed and you want to synchronize data between a database with new schema names and database with old schema names. Only one-to-one schema mapping is supported. If you need to synchronize data between one source schema and several target schemas or vice versa, you need to perform several comparison and synchronization operations.

Note

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

To map schemas, do the following:

1. Switch to the Mapping Page of the New Data Comparison Wizard.
2. Click the [image] Map Schemas button on the toolbar. The Map Schemas dialog box will appear.
3. The Map Schemas dialog displays all source schemas in the first column. To map source schema with unmapped target schema, click the [image] button in the corresponding Target column cell and select the required schema from the drop-down list. If the target schema is already mapped, it is absent in the list. You should unmap it before mapping with another source schema. To unmap the schema pair, click the [image] button in the corresponding Target column cell and select <None> from the drop-down list.
4. After you mapped all schemas you need, click OK. If you want to restore original mapping, click the [image] Reset button.

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 shortcut 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.

Note

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

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
Conversion is possible, but may fail in case of incompatible data. | This warning appears when source column may contain data, that are impossible to convert to target column data type. Such data cannot be synchronized. For example if the source character column is mapped to the numeric target column, character column may contain convertable data (e.g. '123') and inconvertible data like 'abc'.
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 comparing Decimal source column with Decimal target column and source column has larger precision and/or scale. If the source column contains larger values than the target column can contain, such records cannot be synchronized because of overflow. If the source column contains numbers with fractional part, such numbers will be rounded during synchronization.
Decimal and Integer columns have different precisions and scales, migrating the data may cause rounding or overflows. | This warning appears when comparing Decimal source column with Integer target column and source column has larger precision and/or scale. If the source column contains larger values than the target column can contain, such records cannot be synchronized because of overflow. If the source column contains numbers with fractional part, such numbers will be rounded during synchronization.
Date or time columns have different data format, migrating the data may cause truncation. | This warning appears when comparing Date or Time columns and source column has differed data format than target column. If source contains records with longer data than target can contain, the data will be truncated in the target when synchronizing.
Float and Integer columns have different precisions and scales. | This warning appears when comparing Float source column with Integer target column and source column has larger precision and/or scale. If the source column contains larger values than the target column can contain, such records cannot be synchronized because of overflow. If the source column contains numbers with fractional part, such numbers will be rounded during synchronization.
Computed column is not mapped as PERSISTED. | This warning appears when the target computed column, unlike source computed column, is not mapped as PERSISTED. Data in such columns can not be synchronized.
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.
Columns have different collations | This warning appears when columns in target and in source have different collations. Data in such columns can not be synchronized.
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.
Xml columns have different xml collection types. | This warning appears when Xml columns have different collection types. 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


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 opens.

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, Excel, or CSV).
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 page select required options.

7. Click Generate.

See Also

Analyzing Comparison Results

Synchronizing Data


Synchronizing 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 what may occur during data synchronization process.

Synchronization Error Handling
The topic helps you configure dbForge Studio behavior for synchronization script execution.


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.

Comparison results of SQL Servers databases

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. 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 datatype 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

Synchronization Error Handling


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 cancelling, 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.

In This Section

How To: Compare and Synchronize Data through 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.

See Also

Comparing and Synchronizing Data in Databases

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 dbforgesql.com file located in the dbForge Studio for SQL Server installation folder on your PC, and press the SPACE.

C:\Program Files\Devart\dbForge Studio for SQL Server\dbforgesql.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 SQL Server>dbforgesql.com /datacompare /?

5. Specify the objects that will be compared and synchronized.

C:\Program Files\Devart\dbForge Studio for SQL Server>dbforgesql.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 SQL Server>dbforgesql.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 SQL Server>dbforgesql.com /datacompare /compfile:"D:\mycompdoc.dcomp" /sync
7. Generate a comparison and synchronization protocol into a file.

C:\Program Files\Devart\dbForge Studio for SQL Server>dbforgesql.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 SQL Server>dbforgesql.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 SQL Server>dbforgesql.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 SQL Server>dbforgesql.com /execute /connection:"Data Source=DBMSSQL\MSSQL2012;Integrated Security=False;User ID=sa" /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 SQL Server>dbforgesql.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 SQL Server.)
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 SQL Server>dbforgesql.com /datacompare /?

Below all switches of this option are described, together with usage examples.

Action

Parameter

Backup the Target database before the synchronization, specify the file location and name. If the location and name are not specified, the file will be stored in the default server's backup directory.

/backup:"D:\backup_file.bak"

Load command line settings from comparison *.dcomp project file

/compfile:<path>

Group objects in comparison report:

· none - no grouping is applied
· status - objects are grouped by status
· object - object are grouped by object type.

/groupby:<none/status/object>

Save the comparison results to a log file, specify the file location and name.

/log:"D:\Log.log"

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.

/meobjmask:<expression/N>

Exclude columns from the comparison if they match the given expression. To turn off the option, specify: No, N, Off, False, F.

/mimask:<expression/N>

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.

/miobjmask:<expression/N>

Specify a path to the report file. Note, that in this case there is no need to specify the file format separately.

/report:"D:\report_file.html"

To generate and save a comparison report, specify the report format (HTML, XLS, CSV) along with the report location and name.

/reportformat:<HTML|XLS|CSV>

Generate and save a synchronization script, specify the file location and name. If an output file path is specified, the program will generate only a synchronization script.

/sync:"D:\sync_script.sql"

Usage Examples

To practice comparison and synchronization through the command line, try to generate a synchronization script for a database backup and a live database. To do this, you should first change the default path in the command line by typing cd <required path> (for example, C:\Program Files\Devart\dbForge Studio for SQL Server\datacompare.com) and pressing Enter. After the default directory has changed, type the following arguments into the Command Prompt:

"C:\Program Files\Devart\dbForge Data Compare for SQL Server\dbforgesql.com" /datacompare /source backup:"D:\backup_file.bak" /target server:mssql2014 database:db_name user:user_name password:"password" /CheckIdentical:Yes /sync:"D:\sync_script.sql"( /report:"D:\report_file.html")

1. Compare data using settings from a file saved earlier:

/datacompare /compfile:"D:\workDir\DC1vsDC2.dcomp"

2. Compare and synchronize data using connection string. Log will be written to the specified file: /datacompare /source connection:

"Connect Timeout=120;Data Source=SqlServer1;Initial Catalog=db1;Integrated Security=False;User ID=sa;Password=sa;Pooling=False" /target connection:"Connect Timeout=120;Data Source=SqlServer2;Initial Catalog=db2;Integrated Security=False;User ID=sa;Password=sa;Pooling=False" /sync /log:"D:\sync.log"

3. Compare data of the specified databases and save the synchronization script to the:

D:\compare_result.sql file: /datacompare /source server:SqlServer user:sa password:sa database:db1 /target server:SqlServer user:sa password:sa database:db2 /sync:"D:\compare_result.sql"

4. Compare and synchronize data using settings from the file, do not generate comments in the synchronization script, turn off dml triggers during synchronization; generate a report to the specified file in the HTML format:

/datacompare /compfile:"DC1vsDC2.dcomp" /nocomments:yes /nodml:yes /report:"report.txt" /reportformat:HTML /sync

5. Compare and synchronize data using settings from a file. Synchronize Lob columns using files:

/datacompare /compfile:"D:\workDir\DC1vsDC2.dcomp" /fspath:"\\SqlHost\Temp" /sync

6. Compare data and generate data report using settings from a file. Comparison and data writing settings of the different objects will be included into the report.

/datacompare /compfile:"DC1vsDC2.dcomp" /report:"report.html" /incdata:Yes /incs (settings:Yes)

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 SQL Server 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
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
CompareClrTypesAsBinary | clrasbin | Compare and synchornize CLR types as binary, otherwise as string
CompareColumnStoreTables | colstore | Compare tables with COLUMNSTORE indexes
CompareMemoryOptimizedTables | moptimize | Compare memory optimized tables
CompareTables | tables | Include tables into comparison
CompareViews | views | Include views into comparison
ExcludeObjectsByMask | meobjmask | Exclude tables or views by mask
IgnoreBlobColumns | miblob | Ignore blob columns during comparison
IgnoreCase | icase | Ignore case in symbols for non-key columns
IgnoreColumnsByMask | micolmask | Specify a custom wildcart expression for columns names to exclude columns from comparison
IgnoreComputedColumns | micomput | Ignore computed columns
IgnoreEndOfLine | ieol | Ignore end of line characters during comparison and synchronization
IgnoreIdentityColumns | miident | Ignore identity columns during comparison
IgnoreLeadingSpaces | ilspaces | Ignore leading spaces
IgnoreRowguidColumns | mirowguid | Ignore ROWGUID columns during comparison
IgnoreTemporalTableSysColumns | isyscol | Ignore coumn is SYSTEM_TIME for temporal tables
IgnoreTimestampColumns | mitime | Ignore TIMESTAMP columns during comparison
IgnoreTrailingSpaces | ispaces | Ignore whitespaces in the end of strings during comparison and synchronization
IncludeObjectsByMask | miobjmask | Include tables or views by mask
IsEmptyStringEqualsNull | emptyeqnull | Treat NULL and EMPTY STRING as the same value
IsIgnoreTime | itime | Ignore time for fileds of the DATETIME type and compare only dates
MappingIgnoreCase | micase | Ignore case in object names when mapping them
MappingIgnoreSpaces | mispace | Ignore spaces in object names when mapping them
MappingIgnoreUnderscores | miunder | Ignore underscore in object names when mapping them
RoundFloatTypes | round | Round float types up to 3 digits
BulkInsert | bi | Use bulk insert for data insertion
CheckConcurrencyUpdates | concupd | Check for the concurrecncy updates
CreateBackupFolder | cbackupfolder | Create folder for database backup
DisableDdlTriggers | noddl | Disable DDL triggers in the beginning of synchronization
DisableDmlTriggers | nodml | Disable DML triggers in the beginning of synchronization
DisableForeignKeys | nofk | Disable foreign keys in the beginning of synchronization
DropCheckConstraints | dropcheck | Drop check and not null constraints in the beginning of synchronization
DropKeys | dropkeys | Disable primary keys, indexes and unique constraints
ExcludeComments | nocomments | Prevent comments generation in a synchronization script
ExecuteAsSingleTransaction | tran | Execute a synchronization script as a single transaction
FileStoragePath | fspath | Specify a backup file location
IncludePrintComments | iprint | Include print comments into output while executing the script
ReseedIdentityColumns | reseed | Reseed a current value for identity columns
RestoreConstraintsWithCheck | checkconstrrestore | Restore constraints with CHECK
UseSchemaNamePrefix | fullnames | Generate fully qualified object names
IncludeComparisonSettings | incsettings | Include comparison settings
IncludeDifferencesPerColumns | incdiffcols | Include differences per columns
IncludeIdenticalObjects | incident | Include identical objects
IncludeObjectsData | incdata | Include objects data
IncludeOnlyColumnsWithChanges | inccolswchanges | Include only columns with changes

See Also

Working with Command Line

Advanced Data Comparison Topics


Advanced Data Comparison Topics

This section contains advanced topics that describes data comparison and synchronization process.

In This Section

Working with Backup Files
The topic describes how to compare and synchronize backups.

Known Data Comparison Issues
The topic describes problems that can occur during comparison and synchronization process.

Type Compatibility Table
The topic describes which data types can be compared.

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.


Working with Backup Files

dbForge Studio provides an option of comparing data between backup files or between databases and backup files. This feature can be useful if you want, for example, to retrieve data from a backup file and compare it with your database without restoring or copying the backup from a remote network.

Comparing and synchronizing backup files

With dbForge Studio you can:

· compare a backup file with another backup file or with a database
· create a synchronization script from a backup

If you set backup file as a target, the synchronization wizard creates a script to update the database from which the backup was created. Backup files cannot be modified directly.

If you set backup file as the source, and a database is the target, the database can be synchronized with the backup.

Compatibility with backup files

dbForge Studio supports:

· native SQL Server backups

If you want to set up a comparison with the backup files usage you should keep in mind that dbForge Studio does not support:

· tables that do not have a primary key, unique index, or unique constraint
· views
· computed columns, but you can compare persisted computed columns
· string representations of CLR types (only binary representation is supported)
· custom comparison keys, but you can select an alternative unique index, or unique constraint
· row filtering using the SQL Filter Editor.

See Also

Advanced Data Comparison Topics

Known Data Comparison Issues


Known Data Comparison Issues

There are some known problems that may abort data comparison process:

· When you are working with Azure, you can get the "A transport-level error has occurred when receiving results from the server. (provider: TCP provider, error: 0 - An existing connection was forcibly closed by the remote host.)" error, and the comparison process will be aborted.

This problem occurs because Azure closes connection.

When a connection is opened, a connection pool that stores low-level connections and keeps them open to reduce performance loss when re-opening these connection is created. dbForge Studio uses the ADO.NET model for data access, where pool timeout is 10 minutes, whereas Azure closes low-level connections after 5 minutes timeout. That's why you get the above message when trying to access data.

Microsoft ADO.NET developers should correct such behaviour.

See Also

Advanced Data Comparison Topics

Type Compatibility Table


Type Compatibility Table

This table demonstrates which data types can be compared by dbForge Studio.

- can be compared

- explicit conversion is performed when comparing. A synchronization script will contain already converted data. On the Different, Equal, and Only in Target tabs in the Data Comparison document, you will see data in Target data type, Only in source will display data in the Source data type.

- possible data loss

Empty cells mean that these type pairs cannot be compared.

See Also

Advanced Data Comparison Topics

Data Comparison Process Overview


Data Comparison Process Overview

dbForge Studio for SQL Server gives you a perfect opportunity to compare data between different databases and backup files with many useful features. They include the following:

· Comparison of data between different databases and backup files
· Displaying of data comparison results in a convenient UI, easy for analysis and synchronization
· Quick data synchronization of target and source databases or backup files
· 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 schemas, tables (views) and columns, so you can compare data of objects with non-equal names, owners, and structure.

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. The Data Synchronization Wizard allows you to perform backup.

Synchronization script is divided into batches with GO commands. GO statements are inserted after DML statements and statements, setting server options. GO statements are always inserted after the end of the DML statements for any table or view. If there are too many DML statements for a table or view (more than 1000 statements or more than 1 Mb of statements), they are divided into several batches with GO statements. In such case GO statements are inserted after each 1000 statements or after each 1 Mb of statements, depending on which comes first. You can synchronize database as one single transaction. If so, all synchronization actions will be rolled back in case of error. Otherwise, all statements before GO block with error will be executed, and statements of the invalid block and after invalid block will not be executed.

If you synchronize data with different data type, you may encounter synchronization warnings. They are displayed at the Summary tab of the 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 launching 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


Writing Data Reports

This section contains detailed description of data reports implementation in dbForge Studio for SQL Server. 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 SQL Server. 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 Creating a Static Report topic first. It will help you learn how to create a simple report with dbForge Studio for SQL Server.

1. In this example, a report will be bound to data from the Orders datatable of the CrmDemo 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).

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. Change the default text in the ReportHeader band to "Companies List".
4. Create three labels and set their Text properties to "Company name:", "Address:", and "Fax number:" correspondingly.
5. Create three labels bound to the CompanyName, Address, and Fax 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 represented in the Document Outline window. Note that in the Document Outline tree, bound controls are marked with yellow database icons:

8. To use this report for creating a master-detail report by our tutorial, save this report.
9. Now switch to the Preview tab at the bottom of the Document area:

In this topic, you've created a simple report which is bound to data. You can now proceed to the Creating 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 SQL Server.

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 for SQL Server.

1. Open the created report definition (see the How To: Create a Simple Data-Aware Report topic). For this, in the File menu, click Open.
2. To create a master-detail report, it's required to add the Orders table to the report. To add the detail 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 from the shortcut menu:

Note

In the Data Source tree the Orders_Company and Orders_ShipCompany nodes should be available. If they are 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 select the Orders_Company option to add a new detail report. A Detail Report band will appear:

5. Right-click the detail report to open the shortcut menu, point to Insert Band, and then click Group Header. This will add the GroupHeaderBand to the detail report:

You can add the Label control to the added GroupHeader band and change text in it to "ORDERS DETAILS:".

6. Add the OrderDate, ShipDate, Freight, and Discount fields from the Orders_Company 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 "Order date:", "Ship date:", "Freight:", "Discount:". You can drag the Line control onto the Detail band to separate orders details from each other.

Also drag the label with the "Phone" text in it and the one bound to the phone datafield 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:

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 SQL Server, 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 SQL Server.

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, 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:

Note

Actual document look may slightly vary from the above image, depending on the product you use.
3. Cancel - click this 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 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: 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.

See Also

Writing Data Reports

Advanced Topics in Writing Reports


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 data-aware 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.
· To send the generated report by email, open the SMTP, Environment, Options Dialog Box, and configure the email account settings. The following screen shot shows settings for a Gmail account:

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 SQL Server\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 dbforgesql.com file is located (by default it's C:\Program Files\Devart\dbForge Studio for SQL Server\). For this, use the cd operator:

C:\Users\User>cd C:\Program Files\Devart\dbForge Studio for SQL Server\

Press ENTER. You can see that the path has changed:

C:\Program Files\Devart\dbForge Studio for SQL Server>

3. Now call the dbforgesql.com file:

C:\Program Files\Devart\dbForge Studio for SQL Server> dbforgesql.com

4. Specify the /datareport operation switch:

C:\Program Files\Devart\dbForge Studio for SQL Server> dbforgesql.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 SQL Server> dbforgesql.com /datareport /reportfile:"C:\dbForge Studio for SQL Server\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 SQL Server> dbforgesql.com /datareport /reportfile:"C:\dbForge Studio for SQL Server\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
Person.FirstName,
Person.MiddleName,
Person.LastName,
Person.EmailPromotion
FROM Person.Person
WHERE BusinessEntityID = @Client_Id and PersonId in (@PersonsParam)

will look as follows:

dbforgesql.com /datareport /reportfile:Report.rdb /parameters:Client_Id="25" PersonsParam="3211,22123,123122"

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 SQL Server> dbforgesql.com /datareport /reportfile:"C:\dbForge Studio for SQL Server\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 SQL Server> dbforgesql.com /datareport /reportfile:"C:\dbForge Studio for SQL Server\Reports\Report1.rdb" /format:HTML /result email:"address@hostname.net"

· To send your report by FTP, specify the host, login, and password:

C:\Program Files\Devart\dbForge Studio for SQL Server> dbforgesql.com /datareport /reportfile:"C:\dbForge Studio for SQL Server\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 /?

For more information on the command line arguments for /datareport, refer to the Additional /datareport Arguments topic.

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 SQL Server>dbforgesql.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 SQL Server>dbforgesql.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 SQL Server>dbforgesql.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 SQL Server>dbforgesql.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 SQL Server>dbforgesql.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 SQL Server>dbforgesql.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 SQL Server>dbforgesql.com /datareport /reportfile:"sample_report.rdb" /resultfilename:report1

See Also

Working with Command Line

Advanced Topics


Advanced Topics in Writing Reports

This section contains detailed description of data reports implementation in dbForge Studio for SQL Server. When studying this section, you will learn how to perform the simplest and the most difficult tasks with data reports.

In This Section

Data Reports Overview
Learn more about data report creation in dbForge Studio.

Report Building Basics
This topic describes the main concepts of reports construction in dbForge Studio.

Designer Elements
This topic gives a brief overview of the main report designer elements.

Measure Units
This topic describes the measure units supported by dbForge Studio

Report Bands
This topic describes the band types available in dbForge Studio.

Report Controls
This topic describes report controls, which are used to display various information in a report.

Smart Tags
This topic gives a brief description of smart tags available in dbForge Studio for SQL Server.

Context Links
This topic gives a description of context links and their usage in dbForge Studio for SQL Server.

See Also

Writing Data Reports


Data Reports Overview

dbForge Studio for SQL Server 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 SQL Server

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 SQL Server 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 SQL Server 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 SQL Server 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 SQL Server 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 SQL Server.

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


Source-Controlling Databases

This section contains detailed description of source control functionality of dbForge Studio for SQL Server.

In This Section

Linking a Database to Source Control
This Section describes how to link a database to various source control systems.

Using SQL Source Control
This section describes how to use source control functionality of dbForge Studio for SQL Server


Linking a Database to Source Control

This section describes how to link an SQL database to various source control systems.

In This Section

Linking a Database to TFS
Describes how to link a database to Team Foundation Server (TFS).

Linking a Database to SVN
Describes how to link a database to Subversion (SVN).

Linking a Database to SourceGear Vault
Describes how to link a database to SourceGear Vault.

Linking a Database to Perforce
Describes how link a database to Perforce.

Linking a Database to Git
Describes how to link a database to Git.

Linking a Database to Mercurial
Describes how to link a database to Mercurial.

Linking a Database to a Working Folder
Describes how to link a database to a working folder.

Linking a Database to Plastic SCM and Other Systems
Describes how to link a database to Plastic SCM and other systems.

Database Development Models
Describes differences between the shared and dedicated database development models and how to switch from one model to another.


Linking a Database to TFS

This topic explains how to link a database to Team Foundation Server (TFS).

To link a database to TFS:

1. In Database Explorer, right-click a database you want to link to source control.
2. Point to Source Control Tasks, and then click Link database to source control... on the shortcut menu.

The Link Database To Source Control wizard opens.

3. On the Link tab of the wizard, click "+" in the Source control repository field.

The Source Control Repository Properties dialog box opens.

4. Select Team Foundation Server (TFS) from the Source Control system drop-down list box.

5. In Source control settings, specify:
· Server URL, Username and Password for the TFS server. Alternatively, select the Use Windows authentication check-box to use Windows authentication when logging in TFS.

Note

To get proper settings for Server URL, Username and Password, contact your system administrator.
· Database folder in TFS where SQL script will be stored.
· Repository name.
6. Click OK to close the Source Control Repository Properties dialog box.
7. Select a database development model. For more information, refer to the Database Development Models topic.
8. Click Link. If a database is linked to source control successfully, a database icon in Database Explorer will be changed to show that a database is linked.

Note

If linking a database to TFS was unsuccessful, and you see the "Can not find local client for TFS " error, install Team Foundation Server Object Model:

· For TFS2013
· For TFS2010

See Also

Linking a Database to Source Control

Linking a Database to SVN


Linking a Database to SVN

This topic explains how to link a database to Subversion (SVN).

To link a database to SVN:

1. In Database Explorer, right-click a database you want to link to source control.
2. Point to Source Control Tasks, and then click Link database to source control... on the shortcut menu.

The Link Database To Source Control wizard opens.

3. On the Link tab of the wizard, click "+" in the Source control repository field.

The Source Control Repository Properties dialog box opens.

4. Select Subversion (SVN) from the Source Control system drop-down list box.

5. In Source control settings, specify:
· Server URL, Username and Password for the SVN server.

Note

To get proper settings for Server URL, Username and Password, contact your system administrator.
· Database folder in SVN where SQL script will be stored.
· Repository name.
6. Click OK to close the Source Control Repository Properties dialog box
7. Select a database development model. For more information, refer to the Database Development Models topic.
8. Click Link. If a database is linked to source control successfully, a database icon in Database Explorer will be changed to show that a database is linked.

See Also

Linking a Database to Source Control

Linking a Database to SourceGear Vault


Linking a Database to SourceGear Vault

This topic explains how to link a database to SourceGear Vault.

To link a database to SourceGear Vault:

1. In Database Explorer, right-click a database you want to link to source control.
2. Point to Source Control Tasks, and then click Link database to source control... on the shortcut menu.

The Link Database To Source Control wizard opens.

3. On the Link tab of the wizard, click "+" in the Source control repository field.

The Source Control Repository Properties dialog box opens.

4. Select SourceGear Vault from the Source Control system drop-down list box.

5. In Source control settings, specify:
· Server address, Username and Password for the SourceGear Vault server. Optionally, select the Use SSL check-box for a secure connection.
· SourceGear Vault Repository name.
· Database Folder in SourceGear Vault repository where SQL script will be stored.
· Repository Name.

Note

To get proper settings, contact your system administrator.
6. Click OK to close the Source Control Repository Properties dialog box
7. Select a database development model. For more information, refer to the Database Development Models topic.
8. Click Link. If a database is linked to source control successfully, a database icon in Database Explorer will be changed to show that a database is linked.

See Also

Linking a Database to Source Control

Linking a Database to Perforce


Linking a Database to Perforce

This topic explains how to link a database to Perforce (P4).

To link a database to Peforce:

1. In Database Explorer, right-click a database you want to link to source control.
2. Point to Source Control Tasks, and then click Link database to source control... on the shortcut menu.

The Link Database To Source Control wizard opens.

3. On the Link tab of the wizard, click "+" in the Source control repository field.

The Source Control Repository Properties dialog box opens.

4. Select Perforce (P4) from the Source Control system drop-down list box.

5. In Source control settings, specify:
· P4Port, Username and Password for the Perforce server.
· Workspace. You can create a new workspace or select an existing one from the drop-down list box.

Note

It is important to ensure that the Source Control feature of dbForge Studio for SQL Server uses its own workspace for each database link. It is not recommended to use this workspace from other applications.

To create a new workspace:

o Click New in the Workspace section of Source control settings.
o In the New Workspace dialog box, specify:
§ Name of the new workspace
§ an existing Depot
§ Path to the Folder with database scripts. Click "..." to select an existing folder or create a new one.

Note

dbForge Studio for SQL Server will work with scripts from this folder only. If you leave the Folder field empty, it will be considered that the whole depot contains database scripts. In this case, database scripts will be located in one of the Devart folders. You can configure it in Source Conrol Options.

To select an existing workspace:

o Select an existing workspace from the drop-down list. Workspace also specifies the local folder where dbForge Studio for SQL Server will store database scripts.
o Optionally, select Mapping from the drop-down list box. Mapping specifies the depot and the remote folder, that will be used by dbForge Studio for SQL Server.

Note

Usage of existing workspace is not recommended due to possible conflicts with other applications or links.

Notes
A. For the correct work of the Source Control feature of dbForge Studio for SQL Server, you and your colleagues must use identical settings for P4Port, Depot and Folder when configuring a new Workspace.
B. To get proper settings for P4Port, Username, Password and Depot, contact your system administrator
· Repository name.
6. Click OK to close the Source Control Repository Properties dialog box.
7. Select a database development model. For more information, refer to the Database Development Models topic.
8. Click Link. If a database is linked to source control successfully, a database icon in Database Explorer will be changed to show that a database is linked.

See Also

Linking a Database to Source Control

Linking a Database to Git


Linking a Database to Git

This topic explains how to link a database to Git.

To link a database to Git:

1. In Database Explorer, right-click a database you want to link to source control.
2. Point to Source Control Tasks, and then click Link database to source control... on the shortcut menu.

The Link Database To Source Control wizard opens.

3. On the Link tab of the wizard, click "+" in the Source control repository field.

The Source Control Repository Properties dialog box opens.

4. Select Git from the Source Control system drop-down list box.

5. Set up Source control settings. dbForge Studio for SQL Server allows to use remote repository or local clone of the remote repository.

To link a database to remote repository, specify:

· URL of the Remote Repository.
· If you connect via HTTP or SSH protocol, set up Security settings:
o For the HTTP protocol, specify:
§ Login and Password for the remote Git repository.
§ Client Certificate, if the server is set up for authentication using the client certificate.
o For the the SSH protocol, specify authentication method:
§ To authenticate with a password, select the Password option, and type your password in the corresponding box.
§ To authenticate with a key, select the Key option, and provide path to the key file and passphrase in the corresponding boxes.
· Branch.
· Git User name and E-Mail.
· Repository name.

If you have a ready local clone of the remote repository, you can use it instead of the technical clone created by dbForge Studio for SQL Server. In this case, all settings (including address of the remote repository) will be taken from the selected local clone.

To link a database to local clone:

· Select the Use existing local clone check-box and specify path to it.
· Select Branch from the drop-down list box.
· Specify Git User name and E-Mail.
· Specify Repository name.
6. Click OK to close the Source Control Repository Properties dialog box
7. Select a database development model. For more information, refer to the Database Development Models topic.
8. Click Link. If a database is linked to source control successfully, a database icon in Database Explorer will be changed to show that a database is linked.

See Also

Linking a Database to Source Control

Linking a Database to Mercurial


Linking a Database to Mercurial

This topic explains how to link a database to Mercurial.

Note

Before linking a database to Mercurial, ensure you have Mercurial client installed.

To link a database to Mercurial:

1. In Database Explorer, right-click a database you want to link to source control.
2. Point to Source Control Tasks, and then click Link database to source control... on the shortcut menu.

The Link Database To Source Control wizard opens.

3. On the Link tab of the wizard, click "+" in the Source control repository field.

The Source Control Repository Properties dialog box opens.

4. Select Mercurial from the Source Control system drop-down list box.

5. Configure Source control settings:
· To use a remote Mercurial repository, specify URL to the Mercurial server.
· To use an existing Mercurial repository, select the Use existing local repository check-box, and specify path to it.
· Specify repository name.

Note

To get proper settings, contact your system administrator.
6. Click OK to close the Source Control Repository Properties dialog box.
7. Select a database development model. For more information, refer to the Database Development Models topic.
8. Click Link. If a database is linked to source control successfully, a database icon in Database Explorer will be changed to show that a database is linked.

See Also

Linking a Database to Source Control

Linking a Database to a Working Folder


Linking a Database to a Working Folder

A working folder contains SQL script files that represent your database. It allows you to script database changes to a database folder. After saving changes, the database working folder can be source-controlled with your version control system in the same way you version-control other files.

To link a database to a working folder:

1. In Database Explorer, right-click a database you want to link to source control.
2. Point to Source Control Tasks, and then click Link database to source control... on the shortcut menu.

The Link Database To Source Control wizard opens.

3. On the Link tab of the wizard, click "+" in the Source control repository field.

The Source Control Repository Properties dialog box opens.

4. Select Working Folder in the Source Control system drop-down list box.

5. Specify a path the the database folder, and type a repository name in the corresponding fields of the dialog box. Click OK.
6. Select a database development model. For more information, refer to the Database Development Models topic.
7. Click Link. If a database is linked to working folder successfully, a database icon in Database Explorer will be changed to show that a database is linked.

See Also

Linking a Database to Source Control

Linking a Database to Plastic SCM and Other Systems


Linking a Database to Plastic SCM and Other Systems

This topic explains how to link a database to Plastic SCM with preset config file and to other source control systems using editable template.

Note

Before linking a database to Plastic CSM, ensure you have Plastic SCM client installed.

To link a database to Plastic CSM and other systems:

1. In Database Explorer, right-click a database you want to link to source control.
2. Point to Source Control Tasks, and then click Link database to source control... on the shortcut menu.

The Link Database To Source Control wizard opens.

3. On the Link tab of the wizard, click "+" in the Source control repository field.

The Source Control Repository Properties dialog box opens.

4. Select Command Line Interaction from the Source Control system drop-down list box.
5. In Source control settings, specify:
· Path to the Database folder.
· Required Command line configuration preset from the drop-down list box:
o To link a database to Plastic SCM, select Plastic SCM.
o To link a database to another system, select Template, and then modify it accordingly in the Command line configuration box.
· Specify Repository name.

6. Click OK to close the Source Control Repository Properties dialog box
7. Select a database development model. For more information, refer to the Database Development Models topic.
8. Click Link. If a database is linked to source control successfully, a database icon in Database Explorer will be changed to show that a database is linked.

See Also

Database Development Models

Linking a Database to Plastic SCM and Other Systems

© 2004-2017 Devart


Database Development Models

This article explains what are the differences between the shared and dedicated database development models and how to switch from one model to another.

There are two common ways for teams to develop databases: the dedicated model and the shared model.

Dedicated model

In this model, developers are working on their own local copy of the database and later commit changes to a centralized repository.

The dedicated database development model implicates that each developer works on their own copy of the database and apply changes to the source control master repository. Developers can make changes independently, test and commit them to source control once they're confident in the changes.

In case of any damage, the developer can get the latest version from the Source control server.

Shared model

This model is designed for situations where multiple developers are working on a single database and commit their changes to a centralized repository.

The shared development model is an attractive development model, especially for small teams. You cannot test and play with your designs in a shared development model environment, as all your changes immediately affect everybody else.

Some development teams use combinations of the two. For example, a large team might use more than one shared development database.

See Also

Linking a Database to Source Control

Using SQL Source Control


Using SQL Source Control

This section describes how to use source control functionality of dbForge Studio for SQL Server

In This Section

Committing Changes
Describes how to update source control with local changes.

Undoing Changes
Describes how to undo uncommitted changes made to database objects.

Associating Commits with GitHub Issues
Describes how to associate commits with GitHub Issues.

Getting the Latest Version
Describes how to update database with the latest changes from source control.

Resolving Conflicts
Describes how to resolve conflicts.

Getting a Specific Version
Describes how to update your local database to a specific revision.

Viewing Source Control History
Describes how to view and use source control history.


Committing Changes

To update source control with your local changes:

1. In Database Explorer, right-click a linked database or a specific database object.
2. Point to Source Control Tasks, and then click Commit on the shortcut menu.

The Source Control Manager opens.

3. Navigate to the the Local changes section of the document.
4. Select files you want to commit.
5. Write a comment for your commit.
6. Click the Commit button.

See Also

Using Source Control

Getting the Latest Version


Undoing Changes

This topic explains how to undo database object changes that are not committed to source control yet.

To undo changes:

1. In Database Explorer, right-click a linked database or a specific database object.
2. Point to Source Control Tasks, and then click Show Source Control Manager on the shortcut menu.

The Source Control Manager opens.

3. Navigate to the the Local changes section of the document.
4. Select the files with changes you want to undo.
5. Click the Undo button.

6. Click OK to complete the undo operation.

Database changes you cannot undo

Please note that you cannot undo the following database changes:

· Committed changes
· Dropped data (dropped columns and tables cannot be restored with the Undo operation)
· Not Null columns (dropped Not Null columns with data cannot be restored with the Undo operation unless the columns have default values)

See Also

Using Source Control

Associating Commits with GitHub Issues


Associating Commits with GitHub Issues

With dbForge Studio for SQL Server, you can link your commits to GitHub issues and close GitHub issues with your commits.

To link a commit to a GitHub Issue, put the issue number with the '#' symbol in the Comment text box. For example, #111.

To close a GitHub issue, put a keyword and put the issue number with the '#' symbol in the Comment text box. For example, Close #111.

Keywords to close a GitHub Issue

To close a GitHub issue, you can use any of the following keywords:

· Close
· Closes
· Closed
· Fix
· Fixes
· Fixed
· Resolve
· Resolves
· Resolved

Example

Suppose, we have an open issue #2 with request to create a test table and close the issue afterwards:

When the table is created, we need to open the Source Control Document, and put the following comment before committing the created table: Closes #2.

As a result, the GitHub issue #2 has been successfully closed:

See Also

Using Source Control

Resolving Conflicts


Getting the Latest Version

To update your local version with the latest changes from source control:

1. In Database Explorer, right-click a linked database you would like to update.
2. Point to Source Control Tasks, and then click Get Latest on the shortcut menu.

The Source Control Manager opens.

3. Navigate to the Remote Changes section of the document.
4. Select files you want to update.
5. Click the Get Latest button.

See Also

Using Source Control

Resolving Conflicts


Resolving Conflicts

Conflict is a result of discrepancy between the latest version of an object in source control and the one in local database. The most common reason of conflicts is that multiple people were modifying it simultaneously.

Conflicts are displayed in the corresponding section of the Source Control Manager.

To resolve conflicts:

1. In Database Explorer, right-click a linked database or a specific database object.
2. Point to Source Control Tasks, and then click Show Source Control Manager on the shortcut menu. The Source Control Manager opens.

3. Select conflicted objects.
4. Select how you want to resolve conflicts:
· Get Local - your version of an object will be committed to source control.
· Get Remote - your changes will be discarded. The local database will be updated with the latest version of an object from source control.

See Also

Using Source Control

Viewing Source Control History


Getting a Specific Version

You can update your local database to a specific revision with help of Schema Compare and Sync functionality of dbForge Studio for SQL Server.

To get a specific version:

1. Run the Schema Comparison wizard.
2. On the Source and Target tab, select Source Control as Source, and a local database - as Target.
3. To select a certain revision, select the <Select a specified revision...> option from the Revision drop-down list box. The Revision history dialog box opens.
4. Select the required revision and then click Select.

5. Run schema comparison, analyze comparison results, and then synchronize revision with the database schema. For more information about schema comparison and synchronization, refer to the Comparing and Synchronizing Database Schemas section of the product documentation.

See Also

Using SQL Source Control

Undoing Changes


Viewing Source Control History

The Changes History document, provided by dbForge Studio for SQL Server, allows you to:

· View changes history for the entire database or for separate database objects.
· View details of each commit, including revision ID, date, author and comments.
· View list of objects that were modified in each commit.
· View DDL differences for each object.
· Compare two revisions.

To open the Changes History document:

1. In Database Explorer, right-click a linked database or a database object.
2. Point to Source Control Tasks, and then click View Changes History on the shortcut menu.

To compare two separate revisions, select required revisions from the list by holding the CTRL button.

See Also

Using Source Control


Creating Command Line Execution File

dbForge Studio for SQL Server 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.
· For Script Generation: click Save Command Line in the Generate Scripts Wizard.
· For Snapshot or Scripts Folder Generation: click Save Command Line in the Create Scripts Folder or Snapshot Dialog Box.
· For Index Manager: click Save Command Line on the Index Manager Document.

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 SQL Server 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 SQL Server:

· 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-2017 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

User Interface Concepts


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

Code Refactoring
This section contains information on user interface elements used when performing refactoring.

Code Debugger
This section describes the wizards, windows, and other UI elements related to debug processes.

Code Snippets
This section describes Code Snippets user interface elements.

Database Tasks
This section describes the wizards, related to the backup and restore processes.

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 Designer
This section contains information on Database Designer user interface elements.

Database Connection
This section describes Data Connection user interface elements.

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 Generator
This section describes wizards and windows, related to the Data Generator tool.

Documenter
This section user interface elements, related to the Documenter tool.

Data Report
Describes Data Report Wizard usage.

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.

Execute Script Wizard
This section describes the wizard for executing large scripts without opening them in editor.

Command Line Execution File Settings Dialog Box
This section describes the dialog box for generation of the command line execution file.

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 Editor
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 SQL Server to perform commands and to configure pages and controls.

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.

Query Profiling
This section gives description of Query Profiling interface elements.

Server Event Profiler
This section gives description of Server Event Profiler interface elements.

Schema Compare
This section describes all the wizards, documents, windows and other UI elements related to schema comparison and synchronization processes.

Shortcut Keys
Describes available shortcut keys.

Security Manager
Use the section to add, edit or delete user accounts, grant and revoke permissions.

SQL Document
This section describes SQL Document user interface elements.

SQL Formatter Wizard
This section describes SQL Formatter Wizard user interface elements.

Service Windows
This section describes user interface elements of service windows and dialogs.

Object and Data Search
This section describes the object and data search user interface elements.

Source Control
This section describes Source Control user interface elements.

Unit Test
This section describes Unit Test user interface elements.


Code Refactoring

This section contains information on user interface elements used when performing code refactoring.

In This Section

Preview Changes Dialog Box
Describes the Preview Changes window.


Preview Changes Dialog Box

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. If the change check box is cleared, this change will not be applied. To open this dialog box, select the object you would like to rename and press F2, make the required changes, and then press F2 again.

Rename <OldName> to <NewName>
This tree represents project script changes.

Preview code changes
This box displays changes in the code. Changes 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

Alias Refactoring

Reference


Code Debugger

This section describes the wizards, windows, and other UI 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.

The window toolbar contains the following tools:

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.

The breakpoint list contains three columns with the following information:

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.

To get more information about the Breakpoints window, refer to the How To: Work with Breakpoints section.

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

Debug Windows

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.

To learn more about the Watches window, refer to the Debugging T-SQL Database Objects section.

See Also

Debug Windows

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 General, 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 General, 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

Debug Windows

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 Microsoft SQL Server 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 and edit the existing connection.

New
Click to open and create a new connection.

Database
Click the field to select the required database from the list of all databases available on the selected Microsoft SQL Server 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

Code Debugger


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


Database Tasks

This section describes wizards and dialog boxes, related to the database tasks tools.

In This Section

Backup Wizard
Describes Backup wizard's fields and options.

Restore Wizard
Describes Restore wizard's fields and options.

Generate Script Wizard
Describes Generate Script wizard's fields and options.

Create Scripts Folder or Snapshort Dialog Box
Describes fields and options of the Create Scripts Folder or Snapshot dialog box

Scripts Folder Structure Dialog Box
Describes fields and options of the Scripts Folder Structure dialog box.

Attach Database Wizard
Describes Attach Database wizard's fields and options.

Detach Database Wizard
Describes Detach Database wizard's fields and options.

Copy Database Wizard
Describes Copy Database wizard's fields and options.

Manage Database Encryption Dialog Box
Describes fields and options of the Manage Database Encryption dialog box.

Index Manager
Describes Index Manager fields and options.


Backup Wizard

In This Section

General, Backup Wizard
Choose the general backup options on this page.

Media Options, Backup Wizard
Choose the backup media options here.

Backup Options, Backup Wizard
Choose backup set and encryption options on the page.

Progress, Backup Wizard
You can see database backup progress here.

Finish, Backup Wizard
You can see the results of backup operation on this page.

See Also

Database Tasks


General, Backup Wizard

The topic describes general backup options that you can set on the General page of the Backup wizard.

Choose general backup options on this page.

Connection
Choose a connection from the drop-down list.

Edit
Click to edit already existing connection properties.

New
Click to create a new connection specifying its properties.

Backup Type
Specify the fullness of your backup: differential or full.

Copy-only backup
Select the check box to perform a copy-only backup - a special-purpose full backup or log backup that is independent of the normal sequence of conventional backups.

Database
Choose a database from the drop-down list.

Recovery Model
A database property that controls transaction log maintenance on a database. Simple, Full, and Bulk-logged recovery models exist.

Backup Component

Database
Check the option to back up the whole database.

Files and Filegroups
Click ... to open the Select Files and Filegroups dialog box and specify a database file or a filegroup to include it into a file backup.

Backup to disk

Add
Click to open the Browse Files dialog box and add a backup file on the server disk.

Remove
Click to delete a selected database backup file from the list.

Script changes

To New SQL Window
Shows script changes in a new SQL document.
To Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Backup Wizard

Media Options, Backup Wizard


Media Options, Backup Wizard

The topic describes general media options that you can set on the Media Options page of the Backup wizard.

Overwrite Media

Back up to the existing mediaset
Click the option to back up a database to an existing media set. Is checked by default.

Append to the existing back up set
Append the backup set to the existing media set, preserving any prior backups.
Overwrite all existing back up set
Replace any prior backups on the existing media set with the current backup.
Check mediaset name and back up set expiration
Check the option to verify the name and the expiration date of the backup sets.

Back up to a new mediaset and erase all existing back up sets
Use a new media set, erasing the previous backup sets.

Media set name
Specify a new media set name.

Media set description
Specify a meaningful description for a new media set.

Reliability

Verify back up when finished
Verify that the backup set is complete and that all volumes are readable.

Perform checksum before writing to media
Verify the checksums before writing to the backup media.

Continue an error
Check the option to continue backup operation even if one or more errors occur.

Transaction log

Truncate the transaction log
Back up the transaction log and truncate it to free log space.

Back up the tail of the log and leave the database in the restoring stack
Back up the tail of the log and leave the database in a restoring state.

Script changes

To New SQL Window
Shows script changes in a new SQL document.
To Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Backup Wizard

Backup Options, Backup Wizard


Backup Options, Backup Wizard

The topic describes general backup options that you can set on the General page of the Backup wizard.

Backup set

Name
Specifies the name of the database that is backing up.

Description
Optionally, enter the description for the current database backup.

Backup set will expire

After
Specifies the number of dates that should pass before the backup needs rewriting.
On
Sets the date when the backup file is considered to be out-of-date and should be rewritten.

Compress backup
Click the option to compress the backup.

Encrypt backup
Select the option to encrypt the data while creating a backup.

Notes

The Encrypt backup option is available only for SQL Server 2014 databases.

To option becomes available only if the Back up to a new mediaset and erase all existing back up sets option was selected at Media Options, Backup Wizard.

Algorithm
Select an encryption algorithm to use for backup form the drop-down list box. The supported encryption algorithms are: AES 128, AES 192, AES 256, and Triple DES.

Certificate or Asymmetric key
Select a certificate or asymmetric key to use as a backup encrypror form the drop-down list box. Such encryptor should be created prior to the database backup.

Script changes

To New SQL Window
Shows script changes in a new SQL document.
To Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Backup Wizard

Progress, Backup Wizard


Progress, 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

Backup Wizard

Finish, Backup Wizard


Finish, Backup Wizard

You can see the results of the database backup operation on this page.

If the process is completed successfully, the [image] icon indicates this status.

If the process fails, the corresponding status is indicated by the [image] icon.

The quantity of processed files and the time of the whole backup process are also displayed here.

The number of occurred errors is shown.

See Also

Backup Wizard


Restore Wizard

In This Section

Source and Target, Restore Wizard
Choose the backup source and backup target on this page.

Files, Restore Wizard
Choose the files to restore here.

Options, Restore Wizard
Choose restore options on the page.

Restoring, Restore Wizard
You can see database restore progress

Operation Complete, Restore Wizard
You can see the results of restore operation on this page.

See Also

Database Tasks


Source and Target, Restore Wizard

Connection:
Choose a connection from the drop-down list.

Edit
Click to edit already existing connection properties.

New
Click to create a new connection specifying its properties.

Source for restore
Specify a restore source in this grid.

Database
Select this option to use a database as a restore source. Choose a database from the drop-down list.

Files
Select this option to use a backup file as a source for restore. Browse for the backup file location using the Browse Files dialog box.

Database
Select a database from which the backup file should be restored. The option is available only, if the Files option is selected.

Destination to Restore
Set the restore destination.

Database
Choose a target database from the drop-down list.

Restore to:
Choose the required backup from that drop-down list. The most recent backup taken is selected by default.

Backup set to restore
Lists the backup sets available for the specified location. The most recent backup set is selected by default.

See Also

Restore Wizard

Files, Restore Wizard


Files, Restore Wizard

Relocate database files to folder
Select this option to change database files location.

Data file folder
Enter or browse for the location where the data file should be relocated to.

Log file folder
Enter or browse for the location where the log file should be relocated to.

Relocate database files as
Lists the automatically generated names of the restored database files. Enter or browse for another names, if required.

See Also

Restore Wizard

Options, Restore Wizard


Options, Restore Wizard

Restore Options

Overwrite the existing databases (WITH REPLACE)
Select this option to overwrite the database(s) files, specified in the Restore to field on the Source and Target tab of the Restore Wizard.

Preserve the replication settings (WITH KEEP_REPLICATION)
Select this option to preserve the replication settings while restoring database to a server different than server where the database was created.

Restrict access to the restored database (WITH RESTRICTED USER)
Select this option to make the restored database available only to db_owner, dbcreator, or sysadmin.

Recovery state:
Use this option to determine the state of the database after restore. There are three states available:

RESTORE WITH RECOVERY
Select this option to recover the database after restoring the backup set, selected in the Backup set to restore grid of the Source and Target tab of the Restore wizard.

RESTORE WITH NORECOVERY
Select this option to leave the database in the restoring state.

RESTORE WITH STANDBY
Select this option to leave the database in a standby state. If selected, the option makes the database available for a limited read-only access.

Standby file:
Specify the file path to the standby file. The option is active only if, the RESTORE WITH STANDBY recovery state is selected.

Tail-Log Backup

A tail-log backup captures any log records that have not yet been backed up. The tail-log backup is meant for preventing work loss and for keeping the log chain intact.

Take tail-log backup before restore
Select to perform the tail-log backup before restoring the database.

Leave source database in the restoring state (WITH NORECOVERY)
Select to leave the source database in the restoring state. This guarantees that the database does not change after the tail-log backup.

Backup file:
Specify the file path to the log backup file.

Close existing connections to destination database.
Select this option to close connections to the database to be restored.

See Also

Restore Wizard

Restoring, Restore Wizard


Restoring, Restore Wizard

You can see the progress of database restore process on this page.

Minimize Application
Click to minimize the application windows.

Cancel
Click to cancel the backup process.

See Also

Restore Wizard

Operation Complete, Restore Wizard


Operation Complete, Restore Wizard

You can see the results of the database restore operation on this page.

Restore Again
Click to perform restore once more.

See Also

Restore Wizard


Generate Script Wizard

In This Section

General, Generate Script Wizard
Choose general backup options on this page.

Script Content, Generate Script Wizard
Choose database objects to backup on this page.

Options, Generate Script Wizard
Set database backup options on this page.

Errors Handling, Generate Script Wizard
Specify errors processing behavior and logging options on this page.

Progress, Generate Script Wizard
See the progress of database backup process on this page.

Finish, Generate Script Wizard
See the results of database backup operation on this page.

See Also

Database Tasks


General, Generate Script 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.

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.

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

Generate Script Wizard

Script Content, Generate Script Wizard


Script Content, Generate Script 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

Generate Script Wizard

Options, Generate Script Wizard


Options, Generate Script 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.

Common

Check for object existence
Check whether the object already exists on the server.

Generate comments in the script
Select to insert comments in the script.

Script authorization
Select to script AUTHORIZATION clauses.

Scripts collation
Includes collation information in the script.

Scripts default constraints
Scripts default constraints and schema defaults.

Scripts extended properties
Adds extended properties in the script.

Script logins
Includes all logins available on the server. Passwords will not be included.

Script security permissions
Select to script security permissions.

Script statistics
Select to script statistics.

Script USE DATABASE
Select to generate the USE DATABASE statement.

Specify object name with its schema
Select to prefix object names with object schema.

Tables/Views

Scripts change tracking
Scripts CHANGE_TRACKING clauses and statements when comparing and synchronizing databases.

Scripts check constraints
Adds CHECK constraints to the script.

Scripts DATA_COMPRESSION for indexes, primary and unique constraints
When selected, DATA_COMPRESSION clause is scripted for indexes, primary and unique constraints.

Scripts DML triggers
Scripts the creation of triggers on the table.

Scripts foreign keys
Scripts the creation of foreign keys on the table.

Scripts full-text search
Scripts full-text stoplists, full-text catalogues, and full-text indexes.

Script indexes
Scripts indexes.

Script primary keys
Scripts the creation of primary keys on the table.

Script unique keys
Includes the CREATE statement for unique keys in the tables.

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 settings.

My Defaults
Click this button to restore your default settings, previously saved with the Save As My Defaults button.

See Also

Generate Script Wizard

Errors Handling, Generate Script Wizard


Errors Handling, Generate Script 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.

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

Generate Script Wizard

Progress, Generate Script Wizard


Progress, Generate Script 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 press the Cancel button.

See Also

Generate Script Wizard

Finish, Generate Script Wizard


Finish, Generate Script 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 Errors handling page.

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

Generate Script Wizard

Database Tasks


Create Scripts Folder or Snapshot Dialog Box

Use this dialog box to:

· create a folder to store database scripts.
· generate a snapshot file for your database structure.

Source: Database

Connection
Select an SQL Server connection from the drop-down list. Click <Manage...> to open the Connection Manager dialog box. It will help you create, edit, and delete database connections.

Edit
Click to edit the selected connection. The Database Connection Properties dialog box opens. This option is available only when Database is selected as a Source Type.

New
Click to create a new SQL Server connection. The Database Connection Properties dialog box opens.

Server Version
Displays the server version.

Database
Specify the required database. Click <Refresh...> to refresh the list of available databases, if any changes were made.

Decrypt encrypted objects
Select the option to let encrypted objects be decrypted automatically.

Source: Scripts Folder

Database scripts folder
Specify the path to the scripts folder.

SQL Server Version
Displays the server version that is associated with the scripts folder.

Default Collation
Displays default collation that is associated with the scripts folder.

Source: Snapshot

Snapshot can be a source for the Scripts Folder only.

Snapshot
Specify the path to a snapshot you want to use.

Server
Displays the server connection name that is associated with the selected snapshot file.

Server Version
Displays the server version that is associated with the selected snapshot file.

Database
Displays the name of the database for the selected snapshot.

Created
Displays date and time when the selected snapshot was created.

Category
Displays the connection category that is associated with the selected snapshot file.

Destination Type: Scripts Folder

Path
Specify a path to store the scripts folder.

Scripts Folder Structure
Click to setup scrips folder structure.

Destination Type: Snapshot

Path
Specify a path to store the snapshot.

Compress
Select this check box if you want dbForge Studio to archive the snapshot file. This option is useful when you save large snapshots.

See Also

Database Tasks


Scripts Folder Structure Dialog Box

Use this dialog box to specify structure of the scripts folder and the file name templates. This mapping will be used by schema comparison and source control by default.

Type
Shows the database object type.

Subfolder name
Shows the subfolder name.

Name
Shows the file name template for the object.

Extension
Shows the file extension.

See Also

Database Tasks


Attach Database Wizard

Use the topic to attach a database to the connection.

Add
Click to open the Browse Files dialog and select the required database file.

Remove
Click to delete a database from the list.

Name
Displays the name of the currently selected database.

Attach As
Displays the name of the newly attached database.

Owner
Displays the database owner.

Status
Displays the attached database status.

Script changes

To New SQL Window
Shows script changes in a new SQL document.
To Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Database Tasks

Detach Database Wizard


Detach Database Wizard

Use the topic to detach the database from the connection.

Name
The name of the database to be detached.

Drop Connections
Click to drop the connection with the database.

Update statistics
Check the option to update the statistics.

Status
Shows the database status.

Script changes

To New SQL Window
Shows script changes in a new SQL document.
To Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Database Tasks

Copy Database Wizard


Manage Database Encryption Dialog Box

Use this page to set or modify encryption setting for the selected database.

Database Encryption Key

Encryption Algorithm
Select the required encryption algorithm from the drop-down list box.

Use server certificate
Select to make encryption secured by a certificate. Select the required certificate from the drop-down list box.

Use server asymmetric key
Select to make encryption secured by an asymmetric key. Select the required key from the drop-down list box.

Database Encryption Option

Set Database Encryption On
Enables (if checked) or disables (if cleared) database encryption.

Script changes

To New SQL Window
Shows script changes in a new SQL document.
To Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Database Tasks


Copy Database Wizard

In This Section

Source and target, Copy Database Wizard
Use the topic to select source and target connections to copy a database.

Select databases, Copy Database Wizard
Use the topic to select databases to copy or move.

Target databases, Copy Database Wizard
Use the topic to set target database settings here.

Transfer Settings, Copy Database Wizard
Use the topic to set the proxy settings for the transfer of the selected database.

Copy Logins, Copy Database Wizard
Use this page to select logins to copy.

Errors handling, Copy Database Wizard
Specify errors processing behavior and logging options here.

Progress, Copy Database Wizard
See the progress of database backup process on this page.

Finish, Copy Database Wizard
Use the wizard page to see whether the database copying was completed successfully.

See Also

Database Tasks


Source and target, Copy Database Wizard

Use the topic to select source and target connections to copy a database.

Load a previously saved project

Open
Click the button to open an already existing project.

Source

Connection
Select a source server connection. 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 server connections.

Edit
Click to edit the selected source connection.

New
Click to create a new source connection specifying its properties.

Server Version
The version of the database server used in the source connection is specified.

Target

Connection
Select a target server connection. 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 server connections.

Edit
Click to edit the selected target connection.

New
Click to create a new target connection specifying its properties.

Server Version
The version of the database server used in the target connection is specified.

Click the button to swap source and target connections.

See Also

Copy Database Wizard

Select databases, Copy Database Wizard


Select databases, Copy Database Wizard

Use the topic to select databases to copy or move.

Deselect All
Click to clear all the selected databases in the list below.

Refresh
Click the button to see the databases you have selected at the top of the list.

Copy
Select the databases to copy.

Move
Select the databases to move.

Override
Select the databases to ignore.

Database Name
Displays the names of the databases in the connection specified on the Source and target page.

Status
Shows the database status.

Filter
Type a filter string here. Use the "_" symbol to substitute any character.

See Also

Copy Database Wizard

Target databases, Copy Database Wizard


Target databases, Copy Database Wizard

Use the topic to set target database settings here.

Name
Displays currently selected database names.

Attach As
Specify a new name for the database to be added as a copy.

Owner
Shows the database owner.

Status
Shows whether such a database name is valid for creating a database copy.

See Also

Copy Database Wizard

Transfer Settings, Copy Database Wizard


Transfer Settings, Copy Database Wizard

Use the topic to set the proxy settings for the transfer of the selected database.

Target proxy settings

Operating System Proxy Account
Click to use an already existing system proxy account.

<Refresh...>
Click to refresh the list of existing system proxy accounts.

Windows Account
Click to create your own account.

User
Type in the user name of the windows account.
Password
Type in the user's password.

See Also

Copy Database Wizard

Copy Logins, Copy Database Wizard


Copy Logins, Copy Database Wizard

Use this page to select logins to copy.

Do not copy logins
Click not to use the logins when copying.

Copy all logins used by selected databases
Click to use all the logins that the selected databases use.

Copy only selected logins
Click to take only selected logins when copying.

Login
Displays the login name.

Destination Name
The name of the login copy.

Destination Status
The status of the login copy.

Show all server logins
Click to expand the whole list of the server logins.

Refresh
Click to return to the top of the server logins list.

See Also

Copy Database Wizard

Errors handling, Copy Database Wizard


Errors handling, Copy Database Wizard

Specify errors processing behavior and logging options here.

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.

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 copying process is aborted.

Log settings

Write a report to a log file
Check this option to write a copy report to a log file.

Log file
Choose the destination folder where the log file will be located.

See also

Copy Database Wizard

Progress, Copy Database Wizard


Progress, Copy Database Wizard

You can see the progress of database backup process on this page. To cancel the backup process, click the Cancel button.

See Also

Copy Database Wizard

Finish, Copy Database Wizard


Finish, Copy Database Wizard

Use the wizard page to see whether the database copying was completed successfully.

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 copying process the number of errors, successes and total objects is stated.

Show log file...
This button is active if you chose to create a log file on the Errors handling page.

Save a copy project
Check this option to save a project for future use. After the wizard is closed the Save As dialog window is opened.

Copy more
Click the button to return to the Source and target wizard page and add more database copies.

See Also

Copy Database Wizard

Database Tasks


Index Manager

This section provides detailed information on all the windows and dialog boxes related to the index manager functionality.

In This Section

Index Manager Document
Describes fields and options of the Index Manager document.

Options Dialog Box
Describes fields and options of the Options dialog box.


Index Manager Document

Use the Index Manager document to analyze and fix SQL indexes. To open a new document, right-click a database in Database Explorer, point to Tasks, and then click Manage Index Fragmentation on the shortcut menu.

Search
Type in the search string here for a quick navigation through the index list.

Clear
Click to clear the search string.

Reanalyze
Click to perform index analysis over again.

Options
Click to set up index analysis options.

Database
Select a database from the drop-down list box .In the drop-down list of the field, you can click the <Rrefresh...> link to refresh the list of existing databases.

Connection
Select a Microsoft SQL Server server connection. 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 database connections.

Action Required
Lists indexes that required maintenance, according to the preset Options.

Fix
Click to fix the selected indexes.

Script Changes

to New SQL Window
Shows script changes in a new SQL document.

to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

Export to CSV...
Click to export the analysis results to a .csv file.

No Action Required

Lists indexes that do not require maintenance, according to the preset Options.

Grid

Filter
Click the Filter glyph on a column header to start filtering or grouping data in the grid.

Fix Type
Shows the type of the supposed fix for the index. Fix Type for indexes in the No Action Required section is set to None.

Index Name
Shows name of the index.

Owner Object Name
Shows name of the index owner.

Index Type
Shows type of the index.

Owner Object Type
Shows type of the index owner.

Index Size (Pages)
Shows size of the index in pages.

Index Size (Mb)
Shows size of the index in megabytes.

Fragmentation (%)
Shows fragmentation volume of the index in percents.

Partition Number
Shows the partition number. For non-partitioned indexes, the value of this column is 1.

Rows In Partition
Indicates the number of rows in partition.

Reason
Shows the reason for fragmentation.

Result
Shows the result of the index fix. The column is only available for the Action Required section.

See Also

Options Dialog Box

Index Manager


Options Dialog Box

Use the Options dialog box to set up index scan options. To open it, click Options on the Index Manager document.

Index Fragmentation

Reorganize threshold: ...% Fragmentation
Set the the fragmentation threshold for reorganizing indexes. Value range for the option is from 0 to 99.

Rebuild threshold: ...% Fragmentation
Set the the fragmentation threshold for rebuilding indexes. Value range for the option is from 1 to 100.

Minimum index size: ... Pages
Set the minimum index size value. The value range for the option is from 0 to 99999.

Index Rebuild

Sort in tempdb
Select to rebuild indexes in tempdb. This option is selected by default.

Online
Select to rebuild indexes online.

Scan level mode

LIMITED
Select to scan indexes in a LIMITED mode. The LIMITED mode is the fastest way to scan indexes as it scans the smallest number of pages.

DETAILED
Select to scan indexes in a DETAILED mode. The DETAILED mode takes longer time in comparison with the LIMITED mode as it scans all pages.

Buttons

Restore defaults
Click to restore all options to the default values.

See Also

Index Manager


Database Explorer

In This Section

Delete Database
The topic describes to delete a database.

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 this dialog box to create a filter for database objects in accordance with certain criteria.

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.

Node Icons
This section lists and describes the icons of Database Explorer.

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.


Delete Database

Use this dialog box to delete a database.

Delete backup and restore history information for databases
Only appears when a database is deleted, this check box causes the backup and restore history for the subject database to be deleted from the msdb database.

Close existing connections
Only appears when a database is deleted, this check box terminates connections to the subject database.

Script changes

To New SQL Window
Shows script changes in a new SQL document.
To Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Database Explorer

Duplicate Object Dialog Box


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, right-click a required object in the Database Explorer and select Duplicate Object from the menu.

Destination database
Select a destination database to create a copy of an object. The drop-down list contains all the databases available on the server.

Destination schema
Select a destination schema 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 this check box 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

Script changes

To New SQL Window
Shows script changes in a new SQL document.
To Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

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
Select the property for a filter. The set of properties is different for each type of database objects.

Operator
Select the operator for a filter. The set of operators is different for each filter property.

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

Properties, DDL and Data of Selected Objects

Object Viewer has three views to display: Properties, DDL (text), and Data of Selected Objects 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 quick access to a wide range of options that differs depending on the selected database object. For example, for tables and views available in a database you can choose the Send To... option, and open the selected object in the Query Builder.

See Also

Database Explorer

Node Icons


Node Icons

This table lists and provides explanations of the Database Explorer icons.

Icons | Description
 | A connection to a server
 | A closed connection
 | A stand-by or read-only database
 | A database on a server
 | A database in the restoring state
 | An offline database
 | A database that is linked to a source control system.
 | 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 foreign key
 | A primary key
 | A unique index
 | An index
 | A check constraint
 | A view
 | An encrypted view
 | A stored procedure
 | An encrypted stored procedure
 | A table-valued function
 | An encrypted table-valued function
 | A scalar-valued function
 | An encrypted scalar-valued function
 | An aggregate function
 | A stored procedure parameter (IN)
 | A stored procedure parameter (OUT) or function return result
 | A stored function result value
 | A database trigger
 | An encrypted database trigger
 | A disabled database trigger
 | A trigger
 | A disabled trigger
 | An assembly
 | A user-defined data type
 | A table type
 | A CLR type
 | A sequence
 | A synonym
 | A rule
 | A default
 | A message type
 | A contract
 | A queue
 | An unavailable queue
 | A service
 | A route
 | A remote service binding
 | A broker priority
 | An even notification
 | A full-text catalog
 | A partition schema
 | A partition function
 | A full-text stoplist
 | A user
 | A role
 | An application role
 | A schema
 | An asymmetric key
 | A certificate
 | A symmetric key
 | An XML schema collection
 | A search property list

See Also

Database Explorer

Database Explorer Shortcut Keys


Database Explorer Shortcut Keys

Use following shortcut key combinations when working in the 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

Database Explorer Nodes' Properties


Database Explorer Nodes' Properties

This section describes what properties are owned by Database Explorer's nodes.

In This Section

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.

Function Properties
Lists properties of a function.

Procedure Properties
Lists properties of a procedure.

Primary Key Properties
Lists properties of a primary key.

Foreign Key Properties
Lists properties of a foreign key.

View Properties
Lists properties of a view.

Trigger Properties
Lists properties of a trigger.

Database Properties
Lists properties of a database.

See Also

Database Explorer


Connection Properties

This node represents a connection to Microsoft SQL Server and has the following properties:

Client version
Displays version of the Microsoft SQL Server client, that is used by this connection.

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
Identifies whether a connection is active or not.

Save Password
Shows whether the password should be saved.

Server Version
Displays version of the server connected.

See Also

Table Properties


Table Properties

This node represents Microsoft SQL Server table and has the following properties:

(Name)
The name of the table.

Backed Up
Indicates whether the table was backed up.

Cluster Name
Shows name of a cluster if one is used to store table data.

Compression
Shows whether data segments in the table are compressed.

Created
Shows creation date.

Flashback Archive Name
Shows the name of the flashback data archive.

Id Is Primary Key
Indicates that the object identifier (OID) of the object table is based on the primary key of the table.

Index Organized
Shows whether the table is index-organized.

Is Object Based Table
Shows whether the table is object-based.

Is Read Only
Shows whether the table is in read-only mode.

Modified
Shows when the table was modified last.

Object Name
Name of the object, which table is based on.

Object Owner
Owner of the object, which table is based on.

Owner
Shows schema that contains the table.

Partitioned
Shows whether the table is partitioned.

Result Cache
Shows the result cache size.

Row movement
Shows if the row movement mode is enabled in the table.

Status
Indicates whether the table is valid or not.

Temporary
Indicates whether the table is temporary.

Temporary Session
If selected, the rows of the table will be preserved. Applicable only for temporary tables.

See Also

Column Properties


Column Properties

This node represents table column and has the following properties:

(Name)
The name of the column.

Char Used
Specifies the measurement type for Char. Values are CHAR and BYTE

Cluster Name
Shows name of cluster that holds data for the column.

Compute Expression
Generates totals that appear as additional summary columns at the end of the result set.

Data Type
This is the type of the column.

Data Type Owner
If DataType is user-defined, this property indicates its owner, otherwise it is empty.

Default On Null
Shows whether the column default value is NULL.

Default Value
Specifies a default value that will be entered in the column.

Is Nested Table
Indicates whether the column is NESTED TABLE column or not.

Is Persistent
Determines whether or not an event persists with its document.

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.

Reference
Indicates whether the column has REF attribute.

Scale
This property shows how many decimals are in the column.

XML Schema Collection
Displays the name of XML schema collection, that is assigned to the column.

See Also

Index Properties


Index Properties

These nodes represent Microsoft SQL Server indexes. Unique indexes are marked by blue key icon [image], non-unique indexes are rendered with icon [image]. Indexes have the following properties:

(Name)
Specifies the name of the index.

Allow Page Locks
Specifies whether or not to allow page level locking.

Allow Row Locks
Specifies whether or not to allow row level locking.

Clustered
Reports index clustering on Microsoft SQL Server primary keys.

File Stream Option
Exposes a stream around a file, supporting both synchronous and asynchronous read and write operations.

Filegroup
Specifies the filegroup where the index will be created.

Fillfactor
Specifies how full SQL Server should make the leaf level of each index page when creating the index.

Filter
Returns the set resulting from filtering a specified set based on a search condition.

Ignore Dup Key
This option specifies the error response when an insert operation attempts to insert duplicate key values into a unique index.

Is Disabled
Sets the Boolean property value that specifies whether the index is disabled.

Is Filegroup Default
Specifies a default filegroup. If it is not specified, the default is the primary filegroup.

Is Primary
This filegroup contains the primary data file and any other files not placed into another filegroup. All pages for the system tables are allocated from the primary filegroup.

Is System Named
Gets the boolean property value that specifies whether the index was named automatically by the system.

Is Unique Constraint
Use the constraint to make sure that no duplicate values are entered in specific columns that do not participate in a primary key.

Owner
The table that contains the index.

Pad Index
Specifies the space to leave open on each page in the intermediate levels of the index.

Partition Column
Stores the index in a partition column.

Partition Scheme
Stores the index in a partition scheme.

StatisticsNorecompute
The NoRecompute property controls statistics generation when the Index object is used to create a Microsoft SQL Server index.

Unique
Selecting this check box makes the index unique.

See Also

Database Explorer Nodes' Properties

Primary Key Properties


Function Properties

This node represents SQL Server function and and has the following properties:]

(Name)
Specifies the name of a function.

Owner
The table that contains a function.

See Also

Database Explorer Nodes' Properties

Procedure Properties


Procedure Properties

This node represents SQL Server procedure and and has the following properties:]

(Name)
Specifies the name of a procedure.

Ansi Nulls
Indicates if procedure was created with the ANSI NULLs option. Values are True and False.

Assembly Class Name
Specifies the name of the used assembly class.

Assembly Method Name
Specifies the name of the used assembly method.

Assembly Name
Specifies the name of the assembly.

Execute Context
Specifies the security context under which to execute the procedure.

For Replication
Indicates if the object was created with the FOR REPLICATION option. Values are True and False.

Is Encrypted
Indicates whether the stored procedure is encrypted. Values are True and False.

Modify Date
Displays the date the stored procedure was modified.

Native Compilation
Indicates whether SQL statements in the procedure are all compiled to native code. Values are True and False.

Owner
Database that contains a procedure.

Principal Name
Specifies the name of a procedure principal.

Recompile
Indicates if the object was created with the RECOMPILE option. Values are True and False.

Schemabinding
Indicates if the object was created with the SCHEMABINDING option. Values are True and False.

Source Text
Specifies the source text of a procedure.

See Also

Database Explorer Nodes' Properties

Primary Key Properties


Primary Key Properties

This node represents a primary key and has the following properties:

Name
The name of the constraint.

Index Name
Name of the bound index.

Is System Named
Indicates whether the name was assigned by the system but not by the user.

Owner
Table that contains the constraint.

See Also

Database Explorer Nodes' Properties

Foreign Key Properties


Foreign Key Properties

Represents a foreign key and has the following properties:

Name
The name of the constraint.

Delete Rule
The rule used when a row is deleted. Can be Cascade, No Action, Set Null, or Restrict.

Enabled
Specifies whether the constraint is enabled.

Full Referenced Name
The name of the table with the schema prefix name that the key references to.

Is Not For Replication
The option is used to implement ranges of identity values in a partitioned environment.

Is System Named
Indicates whether the name was assigned by the system but not by the user.

Owner
The table that contains the key.

Referenced Constraint
The name of the referenced constraint.

Referenced Table Database
The name of the database that the key references to.

Referenced Table Name
The name of the table that the key references to.

Referenced Table Schema
The name of the schema that the key references to.

See Also

Database Explorer Nodes' Properties

View Properties


View Properties

This node represents Microsoft SQL Server view and has the following properties:

(Name)
The name of the view.

Create Date
Shows creation date.

Modify Date
Shows modification date.

Owner
Database that contains the view.

Principal Name
Specifies the name of a view principal.

See Also

Database Explorer Nodes' Properties


Trigger Properties

This node represents Microsoft SQL Server trigger and has the following properties:

(Name)
The name of the trigger.

Ansi Nulls
Specifies ISO compliant behavior of the Equals (=) and Not Equal To (<>) comparison operators when they are used with null values in SQL Server 2012.

Ansi Quotes
SQL Mode treat “"” as an identifier quote character (like the “`” quote character) and not as a string quote character.

Assembly Class Name
Specifies the name of the used assembly class.

Assembly Method Name
Specifies the name of the assembly type.

Assembly Name
Specifies the name of the assembly.

Event
Event that fires the trigger.

Execute As Clause
In SQL Server you can define the execution context of the following user-defined modules: functions (except inline table-valued functions), procedures, queues, and triggers.

Is Disabled
Allows to disable a trigger.

Is Encrypted
Gets or sets the Boolean property value that specifies whether the trigger is encrypted.

Is Not For Replication
Is used to implement ranges of identity values in a partitioned environment.

Modify Date
The date when a trigger was modified.

Owner
Schema that contains the trigger.

Table Name
Name of the table, the event on which fires the trigger.

Table Owner
Schema that contains the table, the event on which fires the trigger.

Type
Type of the trigger.

See Also

Database Explorer Nodes' Properties

Database Explorer


Database Properties

Represents a database and has the following properties:

Collation Name
A single string that specifies the collation name for a SQL collation.

Compatibility Level
Sets certain database behavior to be compatible with a specified earlier version of SQL Server,

Containment
Controls database containment options.

Create Date
Specifies the database creation date.

Default Fulltext Language
Specifies a default language value for full-text indexed columns.

Default Language
Specifies a default language for all newly created logins.

Directory Name
Specifies a directory name for the data associated with the selected database.

Is Ansi Null Default
Alters the session's behavior to override default nullability of new columns when the ANSI null default option for the database is false.

Is Ansi Nulls
Specifies SQL-92 compliant behavior of the Equals (=) and Not Equal to (<>) comparison operators when used with null values.

Is Ansi Padding
Controls the way the column stores values shorter than the defined size of the column, and the way the column stores values that have trailing blanks in char, varchar, binary, and varbinary data.

Is Ansi Warnings
Specifies ISO standard behavior for several error conditions.

Is Arithabort
Terminates a query when an overflow or divide-by-zero error occurs during query execution.

Is Auto Cleanup
Indicates whether change tracking information is automatically removed after the specified retention period.

Is Auto Close
Specifies whether a database shuts down cleanly and frees resources after the last user exits.

Is Auto Create Stats
Specifies whether a database automatically creates missing optimization statistics.

Is Auto Shrink
Specifies whether a database files are available for periodic shrinking.

Is Auto Update Stats
Specifies whether a database automatically updates out-of-date optimization statistics.

Is Auto Update Stats Async
Subsequent queries will use the updated statistics when they are available.

Is Concat Null Yields Null
Controls whether concatenation results are treated as null or empty string values.

Is Cursor Close On Commit
Controls the behavior of the Transact-SQL COMMIT TRANSACTION statement. The default value for this setting is OFF. This means that the server will not close cursors when you commit a transaction.

Is Cursor Default
Specifies the default cursor behavior.

Is Db Chaining
Configures the database ownership chaining for the instance of SQL Server.

Is Emergency
Indicates, that database is in an emergency, and is online as read-only. Access is restricted to sysadmin members.

Is Standby
Indicates, that database is online as read-only, with restore log allowed.

Is Numeric Roundabort
Specifies the level of error reporting generated when rounding in an expression causes a loss of precision.

Is Offline
Specifies, that database was explicitly taken offline.

Is Quoted Identifier
Causes SQL Server to follow the ISO rules regarding quotation mark delimiting identifiers and literal strings. Identifiers delimited by double quotation marks can be either Transact-SQL reserved keywords or can contain characters not generally allowed by the Transact-SQL syntax rules for identifiers.

Is Read Commited Snapshot
Isolation level based on row versioning.

Is Read Only
Indicates, that database can be read but not modified.

Is Recovering
Indicates, that database is recovering and not yet ready for queries.

Is Recovery Pending
Indicates, that SQL Server has encountered a resource-related error during recovery. The database is not damaged, but files may be missing or system resource limitations may be preventing it from starting. The database is unavailable. Additional action by the user is required to resolve the error and let the recovery process be completed.

Is Restoring
Indicates, that database is being restored.

Is Snapshot Isolation
Controls the locking and row versioning behavior of Transact-SQL statements issued by a connection to SQL Server.

Is Suspect
Indicates, that at least the primary filegroup is suspect and may be damaged. The database cannot be recovered during startup of SQL Server. The database is unavailable. Additional action by the user is required to resolve the problem.

Name
Displays a current database name.

Nested Triggers
Creates a DML, DDL, or logon trigger.

Non Transacted Access
The available level of the non-transactional access.

Owner
Specifies an owner of the current database.

Principal Name
The value set for this attribute is equal to the length of the user's ID and the domain name.

Recovery
Specifies a recovery model.

Retention Period
Specifies the minimum period for keeping change track information in the database. Data is removed only if the Auto Clean-Up value is True. The default value is 2.

Retention Period Units
Specifies the units for the Retention Period value. You can select Days, Hours, or Minutes.

Transform Noise Words
Suppresses an error message if noise words, that are stopwords, cause a Boolean operation on a full-text query to return zero rows.

Two Digit Year Cutoff
Indicates the highest year number that can be entered as a two-digit year. The year listed and the previous 99 years can be entered as a two-digit year. All other years must be entered as a four-digit year.

See Also

Database Explorer Nodes' Properties

Database Explorer


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.

Schemas Mapping Dialog Box
Use this dialog to set custom mapping for schemas.


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 (tables, views, schemas and columns) when mapping them. For example, sales.Customer will be mapped to sales.CuStomEr when this option is set.

Ignore underscores in object names
Select it to ignore underscores in object names (tables, views, schemas and columns) when mapping them. For example, sales.CustomerBalance will be mapped to sales.Customer_Balance when this option is set.

Ignore spaces in object names
Select it to ignore spaces in object names (tables, views, schemas and columns) when mapping them. For example, sales.CustomerBalance will be mapped to sales,[CustomerBalance] 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.
To add/edit a wildcard expression, click the [image] button next to the option and enter a required expression.

Exclude tables or views by mask. *Table*
Allows specifying a custom wildcard expression for tables or views to exclude them from comparison. For example, tables or views with such names as hr.employees, hr.employees, hr.TMP_EMPLPOYEES, sales.TMP_Employees_OLD, sales.REGIONS, Customer.TMP_regions, sales.tmp_RegionS_new will be excluded from mapping if "*employees*, *Regions*" is set for this option.
To add/edit a wildcard expression, click the [image] button next to the option and enter a required expression.

Ignore BLOB columns
Allows ignoring blob columns during comparison. The option can be applied to the following column types: IMAGE, (N)TEXT, (N)VARCHAR(max), VARBINAR(max), XML.

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 selected, 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 during comparison.

Ignore TIMESTAMP columns
Determines if TIMESTAMP should be ignored during comparison. TIMESTAMP columns can not be synchronized.

Ignore ROWGUID columns
Determines if ROWGUID columns should be ignored during comparison.

Ignore IDENTITY columns
Determines if IDENTITY columns should be ignored during comparison. You cannot synchronize a view if it includes an IDENTITY column.

Comparison Options

A set of options used to determine the objects and records that should be compared.

Compare history table for temporal tables
When selected, history table for temporal tables will be included into comparison.

Compare memory optimized tables
When selected, memory optimized tables will be included into comparison.

Compare tables with COLUMNSTORE indexes
When selected, tables with COLUMNSTORE indexes will be included into comparison.

Ignore column is SYSTEM_TIME for temporal tables
When selected, column is SYSTEM_TIME for temporal tables will be included into comparison. You cannot synchronize a SYSTEM_TIME columns.

Compare tables
Select to include tables into comparison.

Compare views
Select to include views into comparison. Views can be synchronized only if the referenced rows are from a single table, and do not include IDENTITY or computed columns.

Round float types up to 3 digits
Select it to specify the count of digits after the decimal point. Option rounds FLOAT, NUMERIC, DECIMAL, MONEY and SMALLMONEY data types.

Compare CLR types as binary
When selected, CLR types will be compared and synchronized as binary, otherwise - as string. It is recommended to apply this option when comparing large CLR data. Do not set this option for the types which do not inherit the IComparable interface.

Ignore leading spaces
When selected, whitespaces in the start of strings will be ignored during comparison and synchronization. This option can be applied only to (N)VARCHAR columns.

Ignore trailing spaces
Select to ignore whitespaces in the end of strings during comparison and synchronization. This option can be applied to (N)VARCHAR columns.

Compare CLR types as binary
Allows to compare and synchronize CLR types as binary, otherwise as string. It is recommended to apply this option when comparing large CLR data. Do not set this option for the types which do not inherit IComparable interface.

Ignore case
Ignores case in symbols for non-key columns of the following data types: (N)CHAR, (N)VARCHAR, (N)VARCHAR(MAX), (N)TEXT, CLR. This option can be applied to data which size doesn't exceed 5 Mb.

Ignore end of line
Allows ignoring end of line characters during comparison and synchronization. The option is applied only to (N)VARCHAR 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. This option is supported for the DATETIME, DATETIME2, SMALLDATETIME, and DATETIMEOFFSET data types.

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


Objects Mapping Dialog Box

This dialog allows you to set custom mapping for tables and views.

Source objects

Table
Select this radio button to display the list of tables in the source database. If there are several schemas in the database, tables are grouped by these schemas.

Filter
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.

Target objects

Table
Select this radio button to display the list of tables in the target database. If there are several schemas in the database, tables are grouped by these schemas.

Filter
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.

Buttons

OK
Click to map the selected source and target object and close the dialog.

Close
Click to close the dialog.

Map
Click to map the selected source and target object without closing the dialog.

See Also

Data Comparison Wizard

Mapping, Data Comparison Wizard


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


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.

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


Schemas Mapping Dialog Box

This dialog allows you to set custom mapping for schemas.

Schemas Mapping

Grid
Contains schemas to map.

Source
Lists all source schemas.

Target
Contains target schemas, mapped to the source schemas. Click [image] to map or unmap target schema.

Reset
Restores automatic mapping.

OK
Applies schema mapping.

Cancel
Cancels mapping changes.

See Also

Data Comparison Wizard

Data Synchronization 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

Database backup

Backup path: (Path)
Select to backup the target database before synchronization and specify the backup file location. The backup file name will be generated in the following format:<database_name>_<yyyy>_<MM>_<dd>_<hh>_<mm>.bak. It is recommended to backup your database before synchronization.

Backup type: (Type)
When selected, the backup will be created in the selected mode. Creating a differential database backup requires a preliminary full database backup. If your database has never been backed up, a full database backup will be created. The copy-only mode option is available for SQL Server 2008 or higher versions.

Create folder for database backup
Select to create folder for database backup storage.

Extension for backup file: (Extension)
When selected, the extension specified in this parameter will be used for the backup file. When the option is not selected, the default extension (.bak) will be used for the backup file.

Use compression for backup
When selected, the backup compression will be performed. This option is available for SQL Server 2008 or higher version.

Transactions

Use a single transaction
Select to execute a synchronization script as a single transaction. If selected, all the changes to the database will be rolled back in case of error when executing the synchronization script.

Add error handling statements
When selected, the script will stop executing after encountering an error.

Set transaction isolation level to SERIALIZE
When selected, the transaction isolation level will be set to the selected value. This option is enabled when the 'Use a single transaction' option is selected. You can specify the following transaction isolation levels: SERIALIZE, SNAPSHOT, REPEATABLE READ, READ UNCOMMITTED, READ COMMITTED.

Common

Check for the concurrency updates
If the option is turned on, UPDATE, DELETE commands will be supplemented with non-key values in WHERE condition. 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 Code';

Disable check constraints
Select to drop check and not null constraints in the beginning of the synchronization. After synchronization the check and not null constraints will be restored.

Disable DDL Triggers
Select it to make dbForge Data Compare disable DDL triggers in the beginning of the synchronization. After the synchronization they will be enabled. Note, this option will be disabled if target database is on SQL Server 2000.

Disable DML Triggers
Select it to make dbForge Data Compare disable DML triggers in the beginning of the synchronization. After the synchronization they will be enabled. Note, for triggers on a view created on SQL Server 2000, this option drops and then recreates them.

Disable foreign keys
Select this option to disable foreign keys before synchronizing tables and to enable them after it.

Disable primary keys, indexes and unique constraints
Select to drop primary keys, indexes, and unique constraints in the beginning of the synchronization. After synchronization the primary keys, indexes, and unique constraints will be restored. If the primary key, index or a unique constraint is the comparison key, it cannot be dropped.

Generate fully qualified object names
Check this option to generate fully qualified object names in the synchronization script. If this option is enabled, object names in synchronization script will include a schema name.

Include USE <database_name>
When selected, USE <database_name> clause will be added to the script.

Reseed Identity Columns
Check this option to reseed the current value of identity column

Reseed constraints with WITH CHECK
When selected, the constraints will be created with the WITH CHECK parameter. The option increases execution time, since data validation will take place, and there is a high chance it may fail. If the option is disabled, constraints will be created in the fast mode with the WITH NOCHECK parameter.

Synchronize database in the single user mode
When selected, database will be synchronized in the single user mode.

Synchronize via files path: (Enter a path)
If this option is checked, then during synchronization files for columns of the BLOB-type are copied to the specified folder (the File Storage Path option), and synchronization script holds references to these files using the OPENROWSET function. If this option is unchecked these files are not copied, and columns of the BLOB-type will be syncronized in a usual way. Files are created only for data the size of which is greater than 1 Mb, and for data the size of which is less than 1 Mb an ordinary script is formed.

Script Comments

Exclude Comments
Check this option to prevent comments generation in synchronization script.

Include print comments
Check to print comments into output while executing the script. If print comments are included in the deployment script, it is easier to locate items in output.

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, varchar(max)). 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 time will be measured inaccurately when backups are compared.
· 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 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-2017 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 Connection

This section describes Data Connection user interface elements.

Note

Database Explorer is not available in the following products:

· dbForge Data Compare for SQL Server
· dbForge Schema Compare for SQL Server
· dbForge Data Generator for SQL Server
· dbForge Event Profiler for SQL Server

In This Section

Database Connection Properties Dialog Box
Information about connection parameters.

Connect to SQL Database Dialog Box
The topic helps you to connect to the server without having specified a password.

Browse for Servers Dialog Box
The topic helps you to select local and network servers.

Connection Manager Dialog Box
The topic helps you to create, edit, and delete database connections.

Connect to Server Dialog Box
The topic helps you to connect to the server when the Database Explorer window is not activated.


Database Connection Properties Dialog Box

Use the Database Connection Properties dialog box to setup or change the database connection parameters. There are several ways to access the Database Connection Properties dialog box:

· Click New Connection on the Database Explorer window toolbar.
· In Database Explorer, open the shortcut menu for the data connection you want to modify and choose Modify Connection.
· In the Database menu, click New Connection.
· Right-click in the Database Explorer, and then select New Connection on the shortcut menu.

Note

Database Explorer is not available in the following products:

· dbForge Data Compare for SQL Server
· dbForge Schema Compare for SQL Server
· dbForge Data Generator for SQL Server
· dbForge Event Profiler for SQL Server

The Database Connection Properties dialog box includes the following tabs:

General, Database Connection Properties Dialog Box
Allows you to set the login information required to connect to the SQL Server.

Advanced, Database Connection Properties Dialog Box
Allows you to set additional options to tune database connections.

See Also

Database Connection

Browse for Servers Dialog Box


General, Database Connection Properties Dialog Box

Use the General tab of the Database Connection Properties dialog box to view and manage the following parameters of an SQL Server database connection:

Server
Select the server instance to connect to. The server instance last connected to is displayed by default.

Authentication
Two authentication modes are available when connecting to an instance of the Database Engine.

Windows Authentication
Microsoft Windows Authentication mode allows a user to connect through a Windows user account.

SQL Server Authentication
When a user connects with a specified login name and password from a non-trusted connection, SQL Server performs the authentication itself by checking to see if a SQL Server login account has been set up and if the specified password matches the one previously recorded. If SQL Server does not have a login account set, authentication fails, and the user receives an error message.

Active Directory Password Authentication
Allows connecting to MicrosoftAzure SQL Database with help of identities in Azure Active Directory. Use this method for connecting to SQL Database if you are logged into Windows using credentials from a domain that is not federated with Azure, or when using Azure AD authentication using Azure AD based on the initial or the client domain.

Active Directory Integrated Authentication
Allows connecting to MicrosoftAzure SQL Database by using identities in Azure Active Directory. Use this method for connecting to SQL Database if you are logged into Windows using your Azure Active Directory credentials from a federated domain.

Login
Enter the login to connect with. This option is not available if you have selected to connect using Windows Authentication.

Password
Enter the password for the login. This option is not available if you have selected to connect using Windows Authentication.

Allow saving password
If selected, the password is stored among the other connection parameters.

Database
Select a name of an SQL Server database you want to connect to.

Show all databases
Select the check box to show all databases.

Connection Name
Use this text box, to specify the connection name.

Document Category
You can assign a category for a document to associate it with a specific connection.

Test Connection
Click this button to make the test connection to a database.

See Also

Database Connection Properties Dialog Box

Advanced, Database Connection Properties Dialog Box


Advanced, Database Connection Properties Dialog Box

The Advanced properties tab provides the following options:

Connection timeout
Sets the length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error. The default value is 15 seconds.

Execute timeout
Sets the length of time (in seconds) to wait for a query execution before terminating the attempt and generating an error.

Encrypt connection
Forces encryption of the connection.

To add more connection parameters to the connection string, use the additional connection parameters.

Keyword

Default

Description

Asynchronous Processing

When true, enables asynchronous operation support. Recognized values are true, false, yes, and no.

AttachDBFilename

"false"

The name of the primary database file, including the full path name of an attachable database. AttachDBFilename is only supported for primary data files with an .mdf extension. The attachment will fail if the primary data file is read-only. The path may be absolute or relative.

Connection Timeout

15

The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error.

Context Connection

"false"

true if an in-process connection to SQL Server should be made.

Current Language

The SQL Server Language record name.

Data Source

The name or network address of the instance of SQL Server to which to connect. The port number can be specified after the server name: server=tcp:servername, portnumber. When specifying a local instance, always use (local). To force a protocol, add one of the following prefixes: np:(local), tcp:(local), lpc:(local)

Encrypt

"false"

When true, SQL Server uses SSL encryption for all data sent between the client and server if the server has a certificate installed. Recognized values are true, false, yes, and no.

Failover Partner

The name of the failover partner server where database mirroring is configured.

Initial Catalog

The name of the database.

Integrated Security

"false"

Whether the connection is to be a secure connection or not. Recognized values are 'true', 'false', and 'sspi', which is equivalent to 'true'.

MultipleActiveResultSets

"false"

When true, an application can maintain multiple active result sets (MARS). When false, an application must process or cancel all result sets from one batch before it can execute any other batch on that connection. Recognized values are true and false.

MultiSubnetFailover

Always specify multiSubnetFailover=Yes when connecting to the availability group listener of a SQL Server 2012 availability group or a SQL Server 2012 Failover Cluster Instance. multiSubnetFailover=Yes configures SQL Server Native Client to provide faster detection of and connection to the (currently) active server. Possible values are Yes and No.

Network Library

The network library used to establish a connection to an instance of SQL Server. Supported values include dbnmpntw (Named Pipes), dbmsrpcn (Multiprotocol, Windows RPC), dbmsadsn (Apple Talk), dbmsgnet (VIA), dbmslpcn (Shared Memory, local machine only) and dbmsspxn (IPX/SPX), dbmssocn (TCP/IP) and Dbmsvinn (Banyan Vines).

The corresponding network DLL must be installed on the system to which you connect. If you do not specify a network and you use a local server (for example, "." or "(local)"), shared memory is used.

Packet Size

Size in bytes of the network packets used to communicate with an instance of SQL Server.

Password

The SQL Server password.

Persist Security Info

"false"

When set to 'false' (strongly recommended), security-sensitive information, such as the password, is not returned as part of the connection if the connection is open or has ever been in an open state. Resetting the connection string resets all connection string values including the password.

Replication

"false"

true if replication is supported using the connection.

TrustServerCertificate

"false"

When set to true, SSL is used to encrypt the channel when bypassing walking the certificate chain to validate trust. If TrustServerCertificate is set to true and Encrypt is set to false, the channel is not encrypted. Recognized values are true, false, yes, and no.

Type System Version

A string value that indicates the type system the application expects. Possible values are:

· Type System Version=SQL Server 2000;
· Type System Version=SQL Server 2005;
· Type System Version=SQL Server 2008;
· Type System Version=Latest;

When set to SQL Server 2000, the SQL Server 2000 type system is used. The following conversions are performed when connecting to a SQL Server 2005 instance:

· XML to NTEXT
· UDT to VARBINARY
· VARCHAR(MAX), NVARCHAR(MAX) and VARBINARY(MAX) to TEXT, NEXT and IMAGE respectively.

When set to SQL Server 2005, the SQL Server 2005 type system is used. No conversions are made for the current version of ADO.NET.

When set to Latest, the latest version than this client-server pair can handle is used. This will automatically move forward as the client and server components are upgraded.

User ID

The SQL Server login account.

User Instance

"false"

A value that indicates whether to redirect the connection from the default SQL Server Express instance to a runtime-initiated instance running under the account of the caller.

Workstation ID

The local computer name

The name of the workstation connecting to SQL Server.

See Also

Database Connection Properties Dialog Box

Browse for Servers Dialog Box


Connect to SQL Database Dialog Box

The dialog box appears when you connect to the server without having specified a password.

Authentication
Specify the required authentication mode here.

User
Enter the name for the SQL login account.

Password
Enter the password for the SQL login account.

Server
Specify the server you want to connect to.

Database
Specify the database you want to work with.

See Also

Database Connection

Browse for Servers Dialog Box


Browse for Servers Dialog Box

Use the Browse for Servers dialog box to select the local and network servers.

This dialog box appears when you click <Browse...> in the Server combo-box (which is located on the General tab of the Database Connection Properties dialog box)

The Database Connection Properties dialog box provides the next members:

Local Servers
Displays the list of local servers.

Network Servers
Allows you to select an SQL Server instance in the network.

Refresh
Refreshes the list of network servers.

See Also

Database Connection

Connect to Server 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

Use the dialog box to connect to the server when the Database Explorer window is not activated.

Note

Database Explorer is not available in the following products:

· dbForge Data Compare for SQL Server
· dbForge Schema Compare for SQL Server
· dbForge Data Generator for SQL Server
· dbForge Event Profiler for SQL Server
· dbForge Documenter for SQL Server

Connections
Displays information on available server connections.

Server
Specify the server connection you want to create a new SQL document in.
Database
Specifies a database you want ot connect to.
User
Specifies a connection user login.
Name
Specifies a selected server database name.

See Also

Database Connection


Data Editor

This section provides information on data managing windows and dialogs.

In This Section

Data Viewer and Editor
Describes how to view and edit fields of large data types.

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 Editor Window
Describes user interface elements of the Data Editor window.


Data Viewer and Editor Window

Data Viewer and Editor is a tool which allows simple viewing and editing fields.

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 access Data Viewer and Editor, on the View menu, click Data Viewer and Editor. Then just select the text or BLOB field, and its content appears in the Data Viewer and Editor 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 to database more data than can be stored in the selected column type, 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.

JSON View
Shows cell data as a JSON string.

Rich Text View
Shows cell data as a rich text.

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.

Type | Size
Shows the type and size of the displayed data. If data cannot be displayed in the selected view, the Type will be set to Unknown.

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


Custom AutoFilter Dialog Box

Custom AutoFilter dialog is used to create a custom filter for a 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 a 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 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 data by hiding some columns in the grid. To open this dialog, select Visible Columns from the column shortcut menu. The Visible Columns dialog contains the following:

List of columns
Clear a 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 manually select required columns.

Sort alphabetically
Select it to show the columns in alphabetical order.

See Also

Data Editor

Data Editor Window


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.

Cached Updates Mode
Allows you to control data editing within single database object.

Apply Changes
Click to store your changes to the server.

Cancel Changes
Click in case you do not want the changes to be applied.

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. The option is available in dbForge Studio for Microsoft SQL Server.

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


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 Microsoft SQL Server 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 Microsoft SQL Server 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 Microsoft SQL Server 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 Microsoft SQL Server 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 Microsoft SQL Server server. In the drop-down list you can click the <Refresh...> link to refresh the list of databases available on the selected Microsoft SQL Server 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.

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

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.

dBase, FoxPro Database Options, Data Export wizard
Specify a number of digits after the decimal point on this page.

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.

Microsoft Access Database Options, Data Export wizard
Enter a table's name and password 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.

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.

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.

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.

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.

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.

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

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.

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.

Alias
Specify alias for the column here.

Data Type
Select data type of the column.

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 SQL Server 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 SQL Server 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 Microsoft SQL Server connection, a database, a schema, 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 Microsoft SQL Server 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 SQL Server 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 Microsoft SQL Server connection, a database, a schema, 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 Microsoft SQL Server 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 Microsoft SQL Server 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 Microsoft SQL Server server. In the drop-down list you can click the <Refresh...> link to refresh the list of databases available on the selected Microsoft SQL Server server, if any changes were made.

Schema
Select a schema located in the selected database.

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 Microsoft SQL Server 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 Microsoft SQL Server connection. The Database Connection Properties dialog box opens.

Database
Select a database located on the selected Microsoft SQL Server. 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.

Schema
Select a schema located in the selected database.

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 SQL Server 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 SQL Server 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 SQL Server 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 Options, Data Import Wizard

Use this wizard page to customize import of Excel 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 SQL Server 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 SQL Server 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 SQL Server 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 SQL Server 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 SQL Server 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.

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.

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 SQL Server. 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 SQL Server should handle errors during import and whether you want to get a log file with details about the import session.

When executing SQL queries in batches, errors handling may be performed not as a user may expect it, because such queries will be executed till the end of the batch in any case, even if execution should have been aborted because of some error inside the batch, and that's default behavior of SQL Server and cannot be changed. You should keep this in mind when executing such queries.

The page contains the following details:

Errors handling

Prompt a user for an action
Select it to be prompted by dbForge Studio for SQL Server 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 SQL Server 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-2017 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 Microsoft SQL Server, 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 Microsoft SQL Server connection properties.

New
Click to open the Database Connection Properties dialog and create a new Microsoft SQL Server instance connection.

Database
Select a name of a Microsoft SQL Server 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 SQL Server 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 SQL Server 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 SQL Server 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

Check Constraint Generator
Describes the Check Constraint Generator and its custom settings.

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.


Check Constraint Generator

The Check Constraint (auto assigned) Generator generates values within the value range of the check constraint expression. The generator is automatically assigned to a column for which a certain check constraint is defined. It uses the check constraint expression to limit the value range of the data generated for the column.

The dialog box of the Check Constraint shows the check constraint expression and contains Basic Settings and custom settings. You can customize the generator by changing the basic and custom settings.

Custom Settings

Check constraint:
Specifies the name of the check constraint for the selected column.

Expression
Specifies the check constraint expression.

Use Min and Max range from...generator
Select the check box to set minimum and maximum values of the specified generator (next by relevance). This option is available only for Numeric and Date/Time data types.

See Also

Basic Settings

Constant Generator


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


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


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));

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 | $"[HumanResources].[Employee].[Gender]" | F or M
loading column content from other database | $"[AdventureWorks2014].[HumanResources].[Employee].[Gender]" | F or M
loading column content from other connection | $"[connection_name].[AdventureWorks2014].[HumanResources].[Employee].[Gender]" | F or M
loading column content from query | $"[SELECT * FROM [HumanResources].[Employee] WHERE [OrganizationLevel] = 1].[Gender]" | F or M
loading column content from query of other connection | $"[connection_name].[SELECT * FROM [HumanResources].[Employee] WHERE [OrganizationLevel] = 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 SQL Server\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.


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.


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 SQL Server. 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

Backup path:
Select to backup the target database before data population and specify a backup file location. The backup file name will be generated in the current format: <database_name>_<yyyy>_<MM>_<dd>_,<hh>_<mm>.bak.

Create folder for database backup
Select to create directory on the server for the database backup. The option is disabled unless the Backup path: option is selected.

Insert multiple rows of data
Select to use a single INSERT statement for inserting all data into a table. The option will be ignored for sql_variant columns.

Use a single transaction
Select to execute data population script as a single transaction. All changes to the database will be rolled back in case of any error when executing the data population script.

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 check constraints
Select to drop check constraints in the beginning of data population. After data population, check constraints will be restored with WITH NOCHECK parameter.

Restore constraints with CHECK
If this option is disabled, all constraints will be created with the NOCHECK parameter. Otherwise, the constraints will be created with checking.

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.

Disable DDL triggers
Select to disable DDL triggers in the beginning of data population. After data population, they will be enabled.

Include print comments
If this option is selected, comments will be printed into output during script execution. If print comments are included into the deployment script, it is easier to locate items in output.

Exclude comments
Select to prevent comments generation in the data population script.

Description
Contains information on a currently selected data population option.

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 SQL Server, 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.

Column generation settings for NUMBER data types

Below is the list of exact number data types that use integer data.

bigint
Allowed value range for this type is -2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807)

int
Allowed value range for this type is -2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647)

smallint
Allowed value range for this type is -2^15 (-32,768) to 2^15-1 (32,767)

tinyint
Allowed value range for this type is 0 to 255

bit
Set the frequency of TRUE and FALSE values to occur

decimal
Allowed value range for this type is -10^38 +1 through 10^38 - 1

float
Allowed value range for this type is -1.79E+308 to -2.23E-308, 0 and 2.23E-308 to 1.79E+308

real
Allowed value range for this type is -3.40E + 38 to -1.18E - 38, 0 and 1.18E - 38 to 3.40E + 38

money
Allowed value range for this type is -922,337,203,685,477.5808 to 922,337,203,685,477.5807

smallmoney
Allowed value range for this type is -214,748.3648 to 214,748.3647

Column generation settings for CHAR data types

char(n), varchar(n), nchar(n), nvarchar(n), varchar(max), nvarchar(max), text, ntext
Character set
Select either US-ASCII or Unicode (UTF-8)

Min string lengths
Enter the minimal string length

Max string lengths
Enter the maximum string length

Start char
Select a start character from the drop-down list.

End char
Select an end character from the drop-down list.

binary
The strings will be generated with lengths between the specified values, inclusive of both the Min length and the Max length.

date
Max value
Use the Date-time picker control, to select the max value for Date.

Min value
Use the Date-time picker control, to select the min value for Date.

datetime

Max value
Use the Date-time picker control, to select the max value for Date. Enter a required values for Time and Fraction.

Min value
Use the Date-time picker control, to select the min value for Date. Enter a required values for Time and Fraction.

Random
Select to generate random values.

datetimeoffset
Select the timezone range.

hierarchyid
Min level
Select the min level of the hierarchical tree depth.

Max level
Select the max level of the hierarchical tree depth

Max value
Enter the max value

Min value
Enter the min value

geographic
Min longitude
Enter the min longitude value

Max longitude
Enter the max longitude value

Min latitude
Enter the min latitude value

Max latitude
Enter the max latitude value

Object type
Point
Linestring

geometry
Min X, Min Y, Max X, Max Y
Enter values for coordinates.

Object type
Point
Linestring
Polygon

See Also

Regular Expression Generator

Data Population Wizard


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.

Properties
Use the on/off switch to include/exclude properties to/from the generated document.

Settings
Use the on/off switch to include/exclude settings 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.

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.

Description

Contains the database description. Click anywhere in the field to modify it. Use the on/off switch to include/exclude the description.

Object types

Lists names and quantity of object types to be described in the generated document.

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.

Options

Lists database options.

Name
Shows name of the option.

Value
Shows the option value.

Include
Use the on/off switch to include/exclude the option into/from the generated document.

Database Files

Lists database files. Use the on/off switch to include/exclude this block.

Name
Shows name of the database file.

Type
Shows type of the database file.

Size
Shows size of the database file.

Max size
Shows the maximal size of the database file.

Autogrowth
Shows autogrowth value of the database file.

File Name
Shows the file name of the database file.

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

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.

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


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 SQL Server.

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 SQL Server 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 SQL Server. 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


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


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 Microsoft SQL Server.

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 SQL Server 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


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

Connection
Select to specify a connection. 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.

Project File
Select to load command line settings from the data generation project file. Click "..." to specify path to the file.

Include Echo OFF
Select to enable the echoing option.

Script Generation

Connection
Select to specify a connection. Click "..." to configure connection with Connection Manager Dialog Box.

Output
Select to specify file for storing the generated script Click "..." to specify path to the file.

Project File
Select to load command line settings from the script generation project file. Click "..." to specify path to the file.

Insert Echo OFF
Select to enable the echoing option.

Scripts Folder Creation

Connection
Select to specify a connection. Click "..." to configure connection with Connection Manager Dialog Box.

Path
Select to specify script folder path. Click "..." to specify the path.

Decrypt Encrypted objects
Select to decrypt source objects during describing.

Snapshot Creation

Database
Select to specify the target database. Click "..." to configure the database connection with Connection Manager Dialog Box.

File
Select to define a snapshot file. Click "..." to specify the file path

Compressed
Select to enable the snapshot file compression.

Index Management

Connection
Select to specify a connection. Click "..." to configure connection with Connection Manager Dialog Box.

Options
Select to include index management options into the command line execution file. Click "..." to configure index management options with the Options Dialog Box.

Fix Indexes
Select to fix indexes. Optionally, click "..." to save the fix indexes script. If the option is not selected, indexes will be analyzed only.

Report
Select to compose the index management report. Click "..." to specify path to save the report.

Execute
Select to execute the fix indexes script.

Error Code
Select to perform error code processing.

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
Click to save command line execution file.

See Also

Reference


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-2017 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 Editor

This section contains reference information on user interface. Visit following topics for detailed information.

In This Section

Table and View Editors
Contains information on user interface of tables, views, constraints and index editors.

Database Editor
Contains information on the database editor for modifying its properties.

New Object Dialog Box
Contains information about dialog box where you can create a new SQL Server schema object.

Database Objects Text Editor
Contains information on the text editor for modifying various database objects.


Table and View Editors

This section contains reference information on user interface of tables, views, constraints and indexes editors.

In This Section

Table Editor
Describes what elements the table editor has.

View Editor
Describes what elements the view editor has.

Column Properties
Information on what column properties you can alter in the grid.

Column Properties Dialog Box
Information on what column properties you can alter in the dialog box.

Keys
Information on what properties of keys you can alter in the grid.

Constraints
Information on what properties of constraints you can alter in the grid.

Index Properties
Information on what properties of indexes you can alter in the grid.

Rebuild Indexes Dialog Box
Describes elements of the Rebuild Indexes dialog box.

Reorganize Indexes Dialog Box
Describes elements of the Reorganize Indexes dialog box.

Disable Indexes Dialog Box
Describes elements of the Disable Indexes dialog box.

Statistics Editor
Describes what elements the statistics editor has.

See Also

Object Editor

Database Objects Text Editor User Interface Elements


Table Editor

Use the 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.

Constraints, Table Editor
Information on what parameters are provided at the Constraints tab.

Indexes, Table Editor
Information on what parameters are provided at the Indexes tab.

Statistics, Table Editor
Information on what parameters are provided at the Statistics tab.

Triggers, Table Editor
Information on what parameters are provided at the Triggers tab.

Storage, Table Editor
Information on setting parameters provided at the Storage tab.

Data, Table Editor
Information on the Data tab.

See Also

Table and View Editors User Interface Elements

View Editor


Columns, Table Editor

Use this tab to set up a table, its name and columns. To see this tab, double-click a table in the Database Explorer.

Name
Name of the table.

Schema
Contains the name of the schema the table belongs to.

Description
Table description. If it consists of more than one line, only the first line, followed with dots is displayed in the field. Click the button of this field to view and edit multiline description.

Type
Type of the table.

Durability
Specifies the type of durability of the table. There are two types of durability: SCHEMA_AND_DATA (indicates that the table is durable) and SCHEMA_ONLY (indicates that the table in nondurable).

Note

The Durability option applies to: SQL Server 2014 and later versions.

Column List Grid

The 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.

Not Null
Indicates whether column is nullable or not.

Identity
The value of this property indicates whether this column is identity or not.

Default
Default column value.

Column List Grid Shortcut Menu

Columns grid shortcut menu appears when editing table in a document and right-clicking the grid on the Columns tab. The menu contains the following items.

New Column
Creates a new column.

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.

Find
Click to start searching the columns, that meet the search string.

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.

Text editor
Contains SQL code of the table. Changes you make in the visual part of the editor are immediately available in the Text editor.

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
Shows script changes in a 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 the Constraints tab of the Table editor you can edit constraints of the specific table.

Constraint List

Name
Name of the constraint.

Columns
Name of the column involved in the constraint.

Constraint Type
Shows the constraint type.

Constraint List Shortcut Menu

Constraints tab shortcut menu appears when editing table in a document and right-clicking anywhere on the Constraints tab. The menu contains the following items.

Add Check Constraint
Opens the Check Constraints Properties grid where you can configure new check constraint.

Add Foreign Key
Opens the Foreign Key Properties grid where you can configure a new foreign key.

Add Primary Key
Opens the Primary Key Properties grid where you can configure a new primary key.

Add Unique Key
Opens the Unique Key Properties grid where you can configure a new unique key.

Delete Constraint
Deletes a 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 Constraints and Keys.

Text editor
Contains an SQL code of the created table. Changes you make in the visual part of the editor are immediately available in the Text Editor.

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
Shows script changes in a 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.

Index List Grid

Name
Name of the index.

Index Type
Shows type of the index.

Columns
List of columns that index includes, separated by commas.

Included Columns
List of included columns that index includes, separated by commas.

Unique
Flag showing whether index is unique or not.

Disabled
Flag showing whether index is disabled or not.

Filtered
Flag showing whether index is filtered or not.

Partitioned
Flag showing whether index is partitioned or not.

Auto Recompute Statistics
Flag showing whether the database engine computes new statistics when an index is created.

Ignore Duplicates
Flag showing whether a duplicate key value can be inserted into a column.

Fill Factor
Specifies what percentage of the index leaf level pages the system can fill.

Index List Grid Shortcut Menu

Indexes tab shortcut menu appears when editing table in a document and right-clicking anywhere on Indexes tab.

Add Clustered Index
Select to create a new clustered index. Opens the Clustered Index Properties grid.

Add Nonclustered Index
Select to create a new nonclustered index. Opens the Nonclustered Index Properties grid.

Add Primary Xml Index
Select to create a new primary Xml index. Opens the Primary XML Index Properties grid.

Add Secondary Xml Index
Select to create a new secondary Xml index. Opens the Secondary XML Index Properties grid.

Add Spatial Index
Select to create a new spatial index. Opens the Spatial Index Properties grid.

Add Clustered Colunstore Index
Select to create a new clustered columnstore index. Opens the Clustered Columnstore Index Properties grid.

Add Nonclustered Colunstore Index
Select to create a new nonclustered columnstore index. Opens the Nonclustered Columnstore Index Properties grid.

Delete Index
Deletes a currently selected index.

Index Properties Grid
The grid shows detailed properties of the index that is currently selected in the Column List grid. For detailed description of index properties, see Index Properties.

Text editor
Contains SQL code of the table. Changes you make in the visual part of the editor are immediately available in the Text editor.

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
Shows script changes in a new SQL document.
to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Table Editor

Storage, Table Editor


Statistics, Table Editor

On the Statistics tab of the Table editor you can edit statistics of the specific table.

Statistics List Grid

Name
Displays the name of the column described by the statistics.

Columns
Indicates columns described by the statistics.

NORECOMPUTE
If the option is checked, the statistics is not recomputed.

INCREMENTAL
Check the option to make statistics incremental.

Last Updated
Displays the date when the current statistics was updated.

Statistics List Grid Shortcut Menu

New Statistics
Click to open the Statistics Properties grid and configure new statistics.

Delete
Click to delete the corresponding statistics.

Statistics Properties Grid
The grid shows detailed properties of the statistics that is currently selected in the list. For detailed description of statistics properties, see Statistics Properties.

Text editor
Contains SQL code of the table. Changes you make in the visual part of the editor are immediately available in the Text editor.

Update Database
Saves changes to the database. Clicking this button is equal to clicking the Save button.

Script Changes

to New SQL Window
Shows script changes in a new SQL document.
to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Table Editor

Storage, Table Editor


Triggers, Table Editor

On the Triggers tab of the Table Editor, you can create and edit triggers of the specific table.

Trigger List

Name
Name of a trigger.

Type
Trigger type.

Event
Indicates the kind of statement that activates the trigger.

Not for Replication
Indicates whether a trigger is excluded from a replication operation or not.

Enable
Indicates whether a trigger is enabled or not.

Encrypted
Indicates whether a trigger is encrypted or not.

Trigger List Shortcut Menu

Triggers tab shortcut menu appears when editing a table in a document and right-clicking anywhere on Triggers tab.

Edit Trigger
Opens the trigger editor document with the trigger code.

New Trigger
Opens the trigger editor document with the trigger template.

Enable
Enables the selected trigger.

Disable
Disables the selected trigger.

Delete
Deletes a currently selected trigger.

Text editor

Contains SQL code of the created table. Changes you make in the visual part of the editor are immediately available in the Text editor.

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
Shows script changes in a new SQL document.
to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Table Editor

Statistics, Table Editor


Storage, Table Editor

Use this tab to set up table storage parameters.

Data Space Specification

Regular data space
Defines the amount of space in megabytes that the data occupies in the table.

Partition column
Shows the name of the column on which the table is partitioned.

Filestream data space
Specify the name of the FILESTREAM data filegroup here.

Text/Image file group
Shows the name of the filegroup that contains the text or image data for the table.

Partitions Data Compression

Partition number
Displays the number of partitions in the table.

Compression type
Specify the compression type of the table. Compression type can be None, Row, Page. None is used to define that partition numbers are not compressed. Row is used to define that partition numbers are using row compression. Page is used to define that partition numbers are using page compression.

Filegroup
Displays the name of the filegroup that contains the table.

Text editor

Contains SQL code of the table. Changes you make in the visual part of the editor are immediately available in the Text editor.

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
Shows script changes in a 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
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
Shows script changes in a new SQL document.
to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Table Editor

Index Properties Dialog Box


View Editor

Use the view editor to create and modify views.

In This Section

Query Text, View Editor
Information on what parameters are provided at the Query Text tab.

Query Design, View Editor
Information on what parameters are provided at the Query Design tab.

Statistics, View Editor
Information on what parameters are provided at the Statistics tab.

T-SQL, View Editor
Information on what parameters are provided at the T-SQL tab.

Data, View Editor
Information on what parameters are provided at the Data tab.

See Also

Table and View Editors

Object Editor


Query Text, View Editor

Use the Query Text tab of View Editor to edit query text of the view.

Name
Name of the view.

Schema
Contains the name of the schema the view belongs to.

Description
View description. If it consists of more than one line, only the first line, followed with dots is displayed in the field. Click the button of this field to view and edit multiline description.

Query Text
Contains query text of the view.

Options

CHECK OPTION
Select to force all data modification statements executed against the view to follow the criteria set within the SELECT statement.

ENCRYPTION
Select to create a view with the ENCRYPTION option. The option indicates that SQL Server will convert the original text of the CREATE VIEW statement to an obfuscated format.

SCHEMABINDING
Select to bind the view to the schema.

VIEW_METADATA
Select to create a view with the VIEW_METADATA option. The option specifies that SQL Server will return metadata information to the DBLIB, ODBC, and OLE DB APIs about the view, instead of the base table or tables, when browse-mode metadata is being requested for a query that references the view.

Buttons

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
Shows script changes in a 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
Shows script changes in a new SQL document.
to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

View Editor

Statistics, View Editor


Indexes, View Editor

On the Indexes tab of the View editor you can edit indexes of the specific index.

Index List Grid

Name
Name of the index.

Index Type
Shows type of the index.

Columns
List of columns that index includes, separated by commas.

Included Columns
List of included columns that index includes, separated by commas.

Unique
Flag showing whether index is unique or not.

Disabled
Flag showing whether index is disabled or not.

Filtered
Flag showing whether index is filtered or not.

Partitioned
Flag showing whether index is partitioned or not.

Auto Recompute Statistics
Flag showing whether the database engine computes new statistics when an index is created.

Ignore Duplicates
Flag showing whether a duplicate key value can be inserted into a column.

Fill Factor
Specifies what percentage of the index leaf level pages the system can fill.

Index List Grid Shortcut Menu

Indexes tab shortcut menu appears when editing table in a document and right-clicking anywhere on Indexes tab.

Add Clustered Index
Select to create a new clustered index. Opens the Clustered Index Properties grid.

Add Nonclustered Index
Select to create a new nonclustered index. Opens the Nonclustered Index Properties grid.

Delete Index
Deletes a currently selected index.

Index Properties Grid
The grid shows detailed properties of the index that is currently selected in the Column List grid. For detailed description of index properties, see Index Properties.

Text editor
Contains SQL code of the table. Changes you make in the visual part of the editor are immediately available in the Text editor.

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
Shows script changes in a new SQL document.
to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.


Statistics, View Editor

Use the Statistics tab of the View editor to edit statistics of the specific view.

Statistics List Grid

Name
Displays the name of the column described by the statistics.

Columns
Indicates columns described by the statistics.

NORECOMPUTE
If the option is checked, the statistics is not recomputed.

INCREMENTAL
Check the option to make statistics incremental.

Last Updated
Displays the date when the current statistics was updated.

Statistics List Grid Shortcut Menu

New Statistics
Click to open the Statistics Properties grid and configure new statistics.

Delete
Click to delete the corresponding statistics.

Refresh Object
Updates current view in case an object was updated in a database by someone else.

Statistics Properties Grid
The grid shows detailed properties of the statistics that is currently selected in the list. For detailed description of statistics properties, see Statistics Properties.

See Also

View Editor

Triggers, View Editor


Triggers, View Editor

Use the Triggers tab of Table Editor, to edit triggers of the specific view.

Trigger List

Name
Name of a trigger.

Type
Trigger type.

Event
Indicates the kind of statement that activates the trigger.

Not for Replication
Indicates whether a trigger is excluded from a replication operation or not.

Enabled
Indicates whether a trigger is enabled or not.

Encrypted
Indicates whether a trigger is encrypted or not.

Trigger List Shortcut Menu

Triggers tab shortcut menu appears when editing a table in a document and right-clicking anywhere on Triggers tab.

Edit Trigger
Opens the trigger editor document with the trigger code.

New Trigger
Opens the trigger editor document with the trigger template.

Enable
Enables the selected trigger.

Disable
Disables the selected trigger.

Delete
Deletes a currently selected trigger.

Text editor

Contains SQL code of the created table. Changes you make in the visual part of the editor are immediately available in the Text editor.

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
Shows script changes in a new SQL document.
to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

View Editor

T-SQL, View Editor


T-SQL, View Editor

Use the T-SQL tab of View Edtior to deit T-SQL script of the view.

For description of user interface elements of the tab, refer to the SQL Editor 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
Shows script changes in a 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 data of the view. For information on user interface elements of the grid, refer to Data Editor Window.

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
Shows script changes in a new SQL document.
to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

View Editor

Table and View Editors


Keys

This section contains reference information on key properties.

In This Section

Primary Key Properties Dialog Box
Information on what properties of a primary key you can alter in the dialog.

Foreign Key Properties Dialog Box
Information on what properties of a foreign key you can alter in the dialog.

Unique Key Properties Dialog Box
Describes what you can do in the Unique Key Properties Dialog Box

See Also

Table and View Editors

Constraints


Primary Key Properties

Use this grid to modify primary key properties. To view the grid, double-click a table in Database Explorer, switch to the Constraints tab, and double-click a constraint.

In This Section

General, Primary Key Properties
Describes the key characteristics you can specify on the General tab of the Primary Key Properties grid.

Options, Primary Key Properties
Describes the key characteristics you can specify on the Options tab of the Primary Key Properties grid.

Storage, Primary Key Properties
Describes the key characteristics you can specify on the Storage tab of the Primary Key Properties grid.

Fragmentation, Primary Key Properties
Describes the key characteristics you can specify on the Fragmentation tab of the Primary Key Properties grid.

See Also

Constraints

Foreign Key Properties Dialog Box


General, Primary Key Properties

Specify general properties for the primary key on this page.

Name
Key name. Uniqueness of the name is checked when you click Update Database or Refresh Object. The Name text box cannot be empty.

Description
Displays text describing the key.

Index Type
Select the index type from the drop-down list box. There are two values available in the list: Clustered and Nonclustered.

Constraint Columns

List of columns in the table that are included in the key.

Remove
Click to delete a selected constraint column from the grid.

Move up
Click to move an constraint column up in the grid.

Move down
Click the button to move a constraint column down in the grid.

Name
Specifies the name of a column participating in the unique key.

Data Type
Specifies the column data type.

Not Null
Indicates whether the column accepts the null values.

See Also

Primary Key Properties Dialog Box

Options, Primary Key Properties Dialog Box


Options, Primary Key Properties

Specify specific options for the primary key.

General

Auto recompute statistics
Indicates whether the database engine computes new statistics when a key is created.

Ignore duplicate values
Specify whether a duplicate key value can be inserted into a column.

Locks

Allow page locks
Check the option to allow page-level locking.

Allow row locks
Check the option to allow row-level locking.

Operation

Allow online DML processing
Specifies whether underlying tables and associated indexes are available for queries and data modification during the index operation.

Maximum degree of parallelism
Specify the maximimum degree of parallelism. The option overrides the Configure the max degree of parallelism Sever Configuration Option configuration option for the duration of the index operation.

Storage

Fill factor
Specifies what percentage of the key leaf level pages the system can fill.

Pad index
Specifies the space to leave open on the page in the intermediate key levels.

Sort in tempdb
Specifies whether to store temporary sort results in tempdb.

Filter

Expression
Creates a filter index by specifying which rows to include in the index.

See Also

Primary Key Properties Dialog Box

Storage, Primary Key Properties Dialog Box


Storage, Primary Key Properties

Use this page to view or modify the storage properties for the key.

Regular data space
Defines the amount of space in megabytes that the data occupies in the key.

Partition column
Shows the name of the column on which the key is partitioned.

Filestream data space
Specify the name of the FILESTREAM data filegroup.

Text/Image file group
Shows the name of the filegroup that contains the text or image data for the key.

See Also

Primary Key Properties Dialog Box

Fragmentation, Primary Key Properties Dialog Box


Fragmentation, Primary Key Properties

Describes the Fragmentation tab of the Unique Key Properties dialog box.

General

Partition ID
The partition ID of the B-Tree containing a key.

Size (MB)
Displays size of a leaf level row in megabytes.

Leaf-level rows
Shows the total number of the leaf level rows.

Average row size
Displays the average leaf-level row size.

Depth
The number of levels in a key including the leaf level.

Forwarded Records
The number of forwarded records in a heap. Not 'Heap' type keys will all have the null values.

Ghost rows
The number of ghost records that are not being retained due to an outstanding snapshot isolation transaction.

Maximum row size
Displays the maximum leaf-level row size.

Minimum row size
Displays the minimum leaf-level row size.

Pages
Shows the total number of data pages.

Version ghost rows
The number of ghost records that are being retained due to an outstanding snapshot isolation transaction.

Fragmentation

Page fullness
Indicates average fullness of key pages in percent.

Total fragmentation
The logical fragmentation percentage. Shows the number of pages in a key that are not stored in order.

See Also

Primary Key Properties Dialog Box

Foreign Key Properties Dialog Box


Foreign Key Properties

Use this grid to modify foreign key properties. To view the grid, double-click a table in Database Explorer, then switch to the Constraints tab and double-click a foreign key. Note that most of options are unavailable for changes once you have saved the foreign key. Tabs of this dialog box are listed below.

Name
Name of the foreign key. Uniqueness of the name is checked when you click Refresh Object or Update Database.

Description
Provide an appropriate description for the key.

Delete Rule
Specify action that must take place on row deletion. Can be Cascade, No Action, Set Null, or Set Default.

Update Rule
Specify action that must take place on row update. Can be Cascade, No Action, Set Null, or Set Default.

Constraint Columns
List of columns in the table that are included in the key.

Remove
Click to delete a selected constraint column from the grid.

Move up
Click to move an constraint column up in the grid.

Move down
Click the button to move a constraint column down in the grid.

Name
Specifies the name of a column participating in the foreign key.

Data Type
Specifies the column data type.

Not Null
Indicates whether the column accepts the null values.

Referenced Schema Name
Name of the schema the key references to.

Referenced Table Name
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.

Move up
Click to move a referenced column up in the grid.

Move down
Click the button to move a referenced column down in the grid.

Name
Specifies the name of a referenced column involved in the foreign key.

Data Type
Specifies the column data type.

Unique
Indicates whether the column is unique or not.

Primary
Indicates whether the column is primary or not.

Not for replication
Specify whether the foreign key is available for replication.

See Also

Keys

Unique Key Properties Dialog Box


Unique Key Properties

Use this grid to modify unique key properties. To invoke the dialog, double-click a table in Database Explorer, then switch to the Keys node, and the double-click a unique key.

In This Section

General, Unique Key Properties
Describes the key characteristics you can specify on the General tab of the Unique Key Properties grid.

Options, Unique Key Properties
Describes the key characteristics you can specify on the Options tab of the Unique Key Properties grid.

Storage, Unique Key Properties
Describes the key characteristics you can specify on the Storage tab of the Unique Key Properties grid.

Fragmentation, Unique Key Properties
Describes the key characteristics you can specify on the Fragmentation tab of the Unique Key Properties grid.

See Also

Keys

Constraints


General, Unique Key Properties

Specify general properties for a unique key on this page.

Name
The name of the key. Uniqueness of a name is checked when you click Update Database or Refresh Object. . A key name field cannot be empty.

Description
Displays text describing the key.

Index Type
Select the index type from the drop-down list box. There are two values available in the list: Clustered and Nonclustered.

Constraint columns

List of columns in the table that are included in a key.

Remove
Click the button to delete a selected constraint column from the grid.

Move up
Click the button to move an constraint column up in the grid.

Move down
Click the button to move a constraint column down in the grid.

Constraint key columns Grid

Name
Specifies the name of a column participating in a unique key.

Data Type
Specifies the data type of a column.

Not Null
Indicates whether a column accepts the null values.

See Also

Unique Key Properties Dialog Box

Options, Unique Key Properties Dialog Box


Options, Unique Key Properties

Specify specific characteristics for a key on the Options tab of the Index Properties dialog box.

General

Auto recompute statistics
Indicates whether the database engine computes new statistics when a key is created.

Ignore duplicate values
Specify whether a duplicate key value can be inserted into a column.

Locks

Allow page locks
Check the option to allow page-level locking.

Allow row locks
Check the option to allow row-level locking.

Operation

Allow online DML processing
Specifies whether underlying tables and associated indexes are available for queries and data modification during the index operation.

Maximum degree of parallelism
Specify the maximimum degree of parallelism. The option overrides the Configure the max degree of parallelism Sever Configuration Option configuration option for the duration of the index operation.

Storage

Fill factor
Specifies what percentage of the key leaf level pages the system can fill.

Pad index
Specifies the space to leave open on the page in the intermediate key levels.

Filter

Expression
Creates a filter index by specifying which rows to include in the index.

See Also

Unique Key Properties Dialog Box

Storage, Unique Key Properties Dialog Box


Storage, Unique Key Properties

Use this page to view or modify the storage properties for the key.

Regular data space
Defines the amount of space in megabytes that the data occupies in the key.

Partition column
Shows the name of the column on which the key is partitioned.

Filestream data space
Specify the name of the FILESTREAM data filegroup.

Text/Image file group
Shows the name of the filegroup that contains the text or image data for the key.

See Also

Unique Key Properties Dialog Box

Fragmentation, Unique Key Properties Dialog Box


Fragmentation, Unique Key Properties

Describes the Fragmentation tab of the Unique Key Properties dialog box.

General

Partition ID
The partition ID of the B-Tree containing a key.

Size (MB)
Displays size of a leaf level row in megabytes.

Leaf-level rows
Shows the total number of the leaf level rows.

Average row size
Displays the average leaf-level row size.

Depth
The number of levels in a key including the leaf level.

Forwarded Records
The number of forwarded records in a heap. Not 'Heap' type keys will all have the null values.

Ghost rows
The number of ghost records that are not being retained due to an outstanding snapshot isolation transaction.

Maximum row size
Displays the maximum leaf-level row size.

Minimum row size
Displays the minimum leaf-level row size.

Pages
Shows the total number of data pages.

Version ghost rows
The number of ghost records that are being retained due to an outstanding snapshot isolation transaction.

Fragmentation

Page fullness
Indicates average fullness of key pages in percent.

Total fragmentation
The logical fragmentation percentage. Shows the number of pages in a key that are not stored in order.

See Also

Unique Key Properties Dialog Box

Default Constraint Properties Dialog Box


Constraints

This section contains reference information on constraint properties.

In This Section

Default Constraint Properties
Describes what you can do in the Default Constraint Properties grid.

Check Constraint Properties
Describes what you can do in the Check Constraint Properties grid.

See Also

Table and View Editors User Interface Elements

Column Properties Dialog Box


Default Constraint Properties Dialog Box

Use this grid to modify default constraint properties. To view the grid, double-click a table in Database Explorer, go to the Constraints tab, double-click any default constraint (it is stated in the Type column of the Constraints grid).

Name
Specify the constraint name here.

Description
Displays text describing the constraint.

Definition
Specify the definition of the constraint here.

See Also

Constraints

Check Constraint Properties Dialog Box


Check Constraint Properties Dialog Box

Use this grid to modify check constraint properties. To view the grid, double-click a table in Database Explorer, go to the Constraints tab, right-click the grid, and select New Check Constraint from the shortcut menu, or double-click an existing check constraint (it is stated in the Type column of the Constraints grid).

Name
Specify the constraint name here.

Description
Displays text describing the constraint.

Condition
Specify the condition for the constraint.

Enabled
Select to enable a constraint.

Not for Replication
Select to exclude a constraint from a replication operation.

Check Existing Data
Select to test a constraint on data that existed before you created or re-enabled a constraint. The option is active only for a new or a disabled constraint.

See Also

Constraints

Column Properties Dialog Box


Index Properties

In This Section

Clustered Index Properties
Use the grid to create or edit an index of the clustered type.

Nonclustered Index Properties
Use the grid to create or edit an index of the nonclustered type.

Primary XML Index Properties
Use the grid to create or edit a primary XML index.

Secondary XML Index Properties
Use the grid to create or edit a secondary XML index.

Spatial Index Properties
Use the grid to create or edit a spatial index.

Clustered Columnstore Index Properties
Use the grid to create or edit a clustered columnstore index.

Nonclustered Columnstore Index Properties
Use the grid to create or edit a nonclustered columnstore index.

See Also

Table and View Editors

Rebuild Indexes Dialog Box


Clustered Index Properties

Use this dialog box to modify index properties. To view the grid, double-click a table in the Database Explorer, switch to the Indexes tab, and the double-click an index.

If you want to create a new index, in the Database Explorer window, navigate to the Indexes node of the required table, from its shortcut menu select New Index, and then click Clustered Index.

In This Section

General, Clustered Index Properties Dialog Box
Describes the General tab of the Clustered Index Properties grid.

Options, Clustered Index Properties Dialog Box
Describes the Options tab of the Clustered Index Properties grid.

Storage, Clustered Index Properties Dialog Box
Describes the Storage tab of the Clustered Index Properties grid.

Fragmentation, Clustered Index Properties Dialog Box
Describes the Fragmentation tab of the Clustered Index Properties grid.

Usage Statistics, Clustered Index Properties
Describes the Usage Statistics tab of the Clustered Index Properties grid.

See Also

Index Properties Dialog Box

Non-Clustered Index Properties Dialog Box


General, Clustered Index Properties

Specify general properties for clustered indexes on this tab.

Name
The name of a created index. Uniqueness of a name is checked when you save it. The field cannot be empty.

Description
Specify a created index with an appropriate description.

Index Type
Specify whether an index is clustered or nonclustered. Select the proper value from the drop-down list box.

Index Columns

Remove
Click the button to delete a selected index column from the grid.

Move up
Click the button to move an index column up in the grid.

Move down
Click the button to move an index column down in the grid.

Table Columns List

Lists the table columns that are participating in an index. The index must include at least one column.

Name
Specifies the name of a column.

Data Type
Specifies the data type of a column.

Not Null
Indicates whether a column accepts the null values.

Sort order
Indicates whether the data is sorted in ascending (ASC) or in descending (DESC) order.

See Also

Clustered Index Properties Dialog Box

Options, Clustered Index Properties Dialog Box


Options, Clustered Index Properties

Specify specific characteristics for an index on the Options tab of the Clustered Index Properties grid.

General

Auto recompute statistics
Indicates whether the database engine computes new statistics when an index is created.

Ignore duplicate values
Specify whether a duplicate key value can be inserted into a column.

Locks

Allow page locks
Check the option to allow page-level locking.

Allow row locks
Check the option to allow row-level locking.

Operation

Allow online DML processing
Specifies whether underlying tables and associated indexes are available for queries and data modification during the index operation.

Maximum degree of parallelism
Overrides the Configure the max degree of parallelism Server Configuration Option configuration option for the duration of the index operation.

Storage

Fill factor
Specifies what percentage of the index leaf level pages the system can fill.

Pad index
Specifies the space to leave open on the page in the intermediate index levels.

Sort in tempdb
Specifies whether to store temporary sort results in tempdb.

Filter

Expression
Creates a filter index by specifying which rows to include in the index.

See Also

Clustered Index Properties Dialog Box

Storage, Clustered Index Properties Dialog Box


Storage, Clustered Index Properties

Use this tab to view or modify filegroup or partition scheme properties for selected index.

Regular data space
Defines the amount of space in megabytes that the data occupies in the index.

Partition column
Shows the name of the column on which the index is partitioned.

Filestream data space
Specify the name of the FILESTREAM data filegroup.

Text/Image file group
Shows the name of the filegroup that contains the text or image data for the index.

See Also

Clustered Index Properties Dialog Box

Fragmentation, Clustered Index Properties Dialog Box


Fragmentation, Clustered Index Properties

Describes the Fragmentation tab of the Index Properties grid.

General

Average row size
Displays average size of a leaf level row.

Depth
The number of levels in an index including the leaf level.

Forwarded Records
The number of forwarded records in a heap. Not 'Heap' type indexes will all have the null values.

Ghost rows
The number of ghost records that are not being retained due to an outstanding snapshot isolation transaction.

Leaf-level rows
Shows the total number of the leaf level rows.

Maximum row size
Displays the maximum leaf-level row size.

Minimum row size
Displays the minimum leaf-level row size.

Pages
Shows the total number of data pages.

Partition ID
The partition ID of the B-Tree containing an index.

Version ghost rows
The number of ghost records that are being retained due to an outstanding snapshot isolation transaction.

Fragmentation

Page fullness
Indicates average fullness of index pages in percent.

Total fragmentation
The logical fragmentation percentage. Shows the number of pages in an index that are not stored in order.

See Also

Clustered Index Properties Dialog Box

Usage Statistics, Clustered Index Properties


Usage Statistics, Clustered Index Properties

Describes the Usage Statistics tab of the Clustered Index Properties grid.

user_seeks
Shows number of seeks by user queries.

user_scans
Shows number of scans by user queries.

user_updates
Shows number of updates bu user queries.

last_user_seek
Shows time of the last user seek.

last_user_scan
Shows time of the last user scan.

last_user_lookup
Shows time of the last user lookup.

last_user_update
Shows time of the last user update.

See Also

Clustered Index Properties Dialog Box

Non-Clustered Index Properties Dialog Box


Nonclustered Index Properties

Use this grid to modify index properties. To view the grid, double-click a table in the Database Explorer, then switch to the Indexes tab, and the double-click an index.

If you want to create a new index, in the Database Explorer window, navigate to the Indexes node of the required table, from its shortcut menu select New Index, and then click Nonclustered Index.

In This Section

General, Nonclustered Index Properties
Describes the General tab of the Nonclustered Index Properties grid.

Options, Nonclustered Index Properties
Describes the Options tab of the Nonclustered Index Properties grid.

Storage, Nonclustered Index Properties
Describes the Storage tab of the Nonclustered Index Properties grid.

Fragmentation, Nonclustered Index Properties
Describes the Fragmentation tab of the Nonclustered Index Properties grid.

Usage Statistics, Nonclustered Index Properties
Describes the Usage Statistics tab of the Nonclustered Index Properties grid.

See Also

Index Properties Dialog Box

Primary XML Index Properties Dialog Box


General, Nonclustered Index Properties

Specify general properties for nonclustered indexes on this tab.

Name
The name of a created index. Uniqueness of a name is checked when you save the index. The field cannot be empty.

Description
Provide a created index with an appropriate description.

Index Type
Specify whether an index is clustered or nonclustered. Select the proper value from the drop-down list box.

Unique
Specify whether an index is unique or not.

Index key columns

Add the desired columns to the Index key columns grid.

Remove
Click to delete a selected index column from the grid.

Move up
Click the button to move an index column up in the grid.

Move down
Click the button to move an index column down in the grid.

Index key columns Grid

Name
Specifies the name of a column participating in the index key.

Data Type String
Specifies the data type of a column.

Not Null
Indicates whether a column accepts the null values.

Sort order
Indicates whether the data is sorted in ascending (ASC) or in descending (DESC) order.

Included
Indicates whether a column is included or not.

See Also

Nonclustered Index Properties

Options, Nonclustered Index Properties


Options, Nonclustered Index Properties

Specify specific characteristics for an index on the Options tab of the Nonclustered Index Properties grid.

General

Auto recompute statistics
Indicates whether the database engine computes new statistics when an index is created.

Ignore duplicate values
Specify whether a duplicate key value can be inserted into a column.

Locks

Allow page locks
Check the option to allow page-level locking.

Allow row locks
Check the option to allow row-level locking.

Operation

Allow online DML processing
Specifies whether underlying tables and associated indexes are available for queries and data modification during the index operation.

Maximum degree of parallelism
Overrides the Configure the max degree of parallelism Server Configuration Option configuration option for the duration of the index operation.

Storage

Fill factor
Specifies what percentage of the index leaf level pages the system can fill.

Pad index
Specifies the space to leave open on the page in the intermediate index levels.

Sort in tempdb
Specifies whether to store temporary sort results in tempdb.

Filter

Expression
Creates a filter index by specifying which rows to include in the index.

See Also

Nonclustered Index Properties

Storage, Nonclustered Index Properties


Storage, Nonclustered Index Properties

Use this tab to view or modify filegroup or partition scheme properties for the selected nonclustered index.

Regular data space
Defines the amount of space in megabytes that the data occupies in the index.

Partition column
Shows the name of the column on which the index is partitioned.

Filestream data space
Specify the name of the FILESTREAM data filegroup.

Text/Image file group
Shows the name of the filegroup that contains the text or image data for the index.

See Also

Nonclustered Index Properties

Fragmentation, Nonclustered Index Properties


Fragmentation, Nonclustered Index Properties

Describes the Fragmentation tab of the Nonclustered Index Properties tab.

Fragmentation

Page fullness
Indicates average fullness of index pages in percent.

Total fragmentation
The logical fragmentation percentage. Shows the number of pages in an index that are not stored in order.

General

Average row size
Displays average size of a leaf level row.

Depth
The number of levels in an index including the leaf level.

Forwarded Records
The number of forwarded records in a heap. Not 'Heap' type indexes will all have the null values.

Ghost rows
The number of ghost records that are not being retained due to an outstanding snapshot isolation transaction.

Leaf-level rows
Shows the total number of the leaf level rows.

Maximum row size
Displays the maximum leaf-level row size.

Minimum row size
Displays the minimum leaf-level row size.

Pages
Shows the total number of data pages.

Partition ID
The partition ID of the B-Tree containing an index.

Version ghost rows
The number of ghost records that are being retained due to an outstanding snapshot isolation transaction.

See Also

Nonclustered Index Properties

Usage Statistics, Nonclustered Index Properties


Usage Statistics, Nonclustered Index Properties

Describes the Usage Statistics tab of the Nonclustered Index Properties grid.

user_seeks
Shows number of seeks by user queries.

user_scans
Shows number of scans by user queries.

user_updates
Shows number of updates bu user queries.

last_user_seek
Shows time of the last user seek.

last_user_scan
Shows time of the last user scan.

last_user_lookup
Shows time of the last user lookup.

last_user_update
Shows time of the last user update.

See Also

Nonclustered Index Properties

Primary Key Properties


Primary XML Index Properties

Use this grid to modify index properties. To invoke the dialog, double-click a table in the Database Explorer, then switch to the Indexes tab, and the double-click an index.

If you want to create a new index, in the Database Explorer window, navigate to the Indexes node of the required table, from its shortcut menu select New Index, and then click Primary XML Index.

In This Section

General, Primary XML Index Properties
Describes the primary XML index characteristics you can specify on the General tab of the XML Index Properties grid.

Options, Primary XML Index Properties
Describes the primary XML index characteristics you can specify on the Options tab of the XML Index Properties grid.

See Also

Index Properties Dialog Box

Secondary XML Index Properties


General, Primary XML Index Properties

Specify general properties for primary XML indexes on this tab.

Name
The name of a created index. Uniqueness of a name is checked when you save the index. The field cannot be empty.

Description
Specify a created index with an appropriate description.

Type
Shows index type.

Index Columns

Remove
Click the button to delete a selected index column from the grid.

Move up
Click the button to move an index column up in the grid.

Move down
Click the button to move an index column down in the grid.

Table Columns List

Lists the table columns that are participating in an index. The index must include at least one column.

Name
Specifies the name of a column.

Data Type String
Specifies the data type of a column.

Not null
Indicates whether a column accepts the null values.

See Also

Primary XML Index Properties

Options, Primary XML Index Properties


Options, Primary XML Index Properties

Specify specific characteristics for an index on the Options tab of the XML Index Properties grid.

Locks

Allow page locks
Check the option to allow page-level locking.

Allow row locks
Check the option to allow row-level locking.

Operation

Maximum degree of parallelism
Overrides the Configure the max degree of parallelism Server Configuration Option configuration option for the duration of the index operation.

Storage

Fill factor
Specifies what percentage of the index leaf level pages the system can fill.

Pad index
Specifies the space to leave open on the page in the intermediate index levels.

Sort in tempdb
Specifies whether to store temporary sort results in tempdb.

See Also

Primary XML Index Properties

Secondary XML Index Properties


Secondary XML Index Properties

Use this grid to modify index properties. To invoke the dialog, double-click a table in the Database Explorer, then switch to the Indexes tab, and the double-click an index.

If you want to create a new index, in the Database Explorer window, navigate to the Indexes node of the required table, from its shortcut menu select New Index, and then click Secondary XML Index.

In This Section

General, Secondary XML Index Properties
Describes the secondary XML index characteristics you can specify on the General tab of the XML Index Properties grid.

Options, Secondary XML Index Properties
Describes the secondary XML index characteristics you can specify on the Options tab of the XML Index Properties grid.

See Also

Index Properties Dialog Box

Spatial Index Properties Dialog Box


General, Secondary XML Index Properties

Specify general properties for a secondary XML index on this tab.

Name
The name of a created index. Uniqueness of a name is checked when you save the index. The field cannot be empty.

Description
Specify a created index with an appropriate description.

Type
Shows index type.

Primary XML Index
Select a primary XML index from the drop-down list.

Column
The name of a column where a primary XML index was created in.

Secondary XML Index Type
Select the type of your secondary XML index.

PATH
If you are using path expressions on XML columns, the PATH secondary index will speed up your work.

VALUE
If your work has something to do with querying values within XML instances without knowing the element or attribute names that contain those values, you can create the VALUE index.

PROPERTY
If you retrieve multiple values from individual XML instances by using path expressions in your work, clustering paths within each XML instance in the PROPERTY index may be helpful.

See Also

Secondary XML Index Properties

Options, Secondary XML Index Properties


Options, Secondary XML Index Properties

Specify specific characteristics for a secondary XML index on the Options tab of the XML Index Properties grid.

Locks

Allow page locks
Check the option to allow page-level locking.

Allow row locks
Check the option to allow row-level locking.

Operation

Maximum degree of parallelism
Overrides the Configure the max degree of parallelism Server Configuration Option configuration option for the duration of the index operation.

Storage

Fill factor
Specifies what percentage of the index leaf level pages the system can fill.

Pad index
Specifies the space to leave open on the page in the intermediate index levels.

Sort in tempdb
Specifies whether to store temporary sort results in tempdb.

See Also

Secondary XML Index Properties Dialog Box

Spatial Index Properties Dialog Box


Spatial Index Properties

Use this dialog box to modify index properties. To invoke the dialog, double-click a table in the Database Explorer, then switch to the Indexes tab, and the double-click an index.

If you want to create a new index, in the Database Explorer window, navigate to the Indexes node of the required table, from its shortcut menu select New Index, and then click Spatial Index.

In This Section

General, Spatial Index Properties
Describes the spatial index characteristics you can specify on the General tab of the Spatial Index Properties dialog box.

Options, Spatial Index Properties
Describes the spatial index characteristics you can specify on the Options tab of the Spatial Index Properties dialog box.

Storage, Spatial Index Properties
Describes the spatial index characteristics you can specify on the Storage tab of the Spatial Index Properties dialog box.

See Also

Index Properties Dialog Box

Clustered Columnstore Index Properties Dialog Box


General, Spatial Index Properties

Specify general properties for a spatial index on this tab.

Name
The name of the created index. Uniqueness of a name is checked when you save the index. The field cannot be empty.

Description
Specify a created index with an appropriate description.

Index Type
The spatial index type is specified.

Index Columns

Remove
Click the button to delete a selected index column from the grid.

Move up
Click the button to move an index column up in the grid.

Move down
Click the button to move an index column down in the grid.

Table Columns Grid

Lists the table columns that are participating in an index. The index must include at least one column.

Name
Specifies the name of a column.

Data Type String
Specifies the data type of a column.

Not Null
Indicates whether a column accepts the null values.

See Also

Spatial Index Properties

Options, Spatial Index Properties


Options, Spatial Index Properties

Specify specific characteristics for an index on the Options tab of the Spatial Index Properties grid.

General

Auto recompute statistics
Indicates whether the database engine computes new statistics when an index is created.

Locks

Allow page locks
Check the option to allow page-level locking.

Allow row locks
Check the option to allow row-level locking.

Operation

Maximum degree of parallelism
Overrides the Configure the max degree of parallelism Server Configuration Option configuration option for the duration of the index operation.

Storage

Fill factor
Specifies what percentage of the index leaf level pages the system can fill.

Pad index
Specifies the space to leave open on the page in the intermediate index levels.

Sort in tempdb
Specifies whether to store temporary sort results in tempdb.

Spatial General

Cells Per Object
Specify the number of tessellation cells-per-object that can be used for a single spatial object in the index.

Tessellation Scheme
Choose the tessellation scheme of an index.

Spatial Bounding Box
The bounding box holds the perimeter of the top-level grid of a geometric plane.

X-min
The X-coordinate of the lower-left corner of the bounding box.

Y-min
The Y-coordinate of the lower-left corner of the bounding box.

X-max
The X-coordinate of the upper-right corner of the bounding box.

Y-max
The Y-coordinate of upper-right corner of the bounding box.

Spatial Grids
You can specify the density of the grid at each level of the tessellation scheme here. Density is specified as LOW, MEDIUM, or HIGH. LOW represents a 4x4 grid (16 cells), MEDIUM represents an 8x8 grid (64 cells), and HIGH represents a 16x16 grid (256 cells).

Level 1
The density of the first-level (top) grid.

Level 2
The density of the second-level grid.

Level 3
The density of the third-level grid.

Level 4
The density of the fourth-level grid.

See Also

Spatial Index Properties

Storage, Spatial Index Properties


Storage, Spatial Index Properties

Use this tab to specify storage properties for the spatial index.

Regular data space
Defines the amount of space in megabytes that the data occupies in the index.

Partition column
Shows the name of the column on which the index is partitioned.

Filestream data space
Specify the name of the FILESTREAM data filegroup.

Text/Image file group
Shows the name of the filegroup that contains the text or image data for the index.

See Also

Spatial Index Properties

Clustered Columnstore Index Properties


Clustered Columnstore Index Properties

Use this grid to modify index properties. To view the grid, double-click a table in the Database Explorer, then switch to the Indexes tab, and the double-click an index.

If you want to create a new index, in the Database Explorer window, navigate to the Indexes node of the required table, from its shortcut menu select New Index, and then click Clustered Columnstore Index.

In This Section

General, Clustered Columnstore Index Properties
Describes the clustered columnstore index characteristics you can specify on the General tab of the Index Properties grid.

Options, Clustered Columnstore Index Properties
Describes the clustered columnstore index characteristics you can specify on the Options tab of the Index Properties grid.

Storage, Clustered Columnstore Index Properties
Describes the clustered columnstore index characteristics you can specify on the Storage tab of the Index Properties grid.

See Also

Index Properties Dialog Box

Non-Clustered Columnstore Index Properties Dialog Box


General, Clustered Columnstore Index Properties

Specify general properties for a clustered columnstore index on this page.

Name
The name of a created index. Uniqueness of a name is checked when you save the index. The field cannot be empty.

Description
Specify a created index with an appropriate description.

Type
Select proper index type from the drop-down list box. There are two values available: Clustered columnstore or Nonclustered columnsore.

See Also

Clustered Columnstore Index Properties

Options, Clustered Columnstore Index Properties


Options, Clustered Columnstore Index Properties

Specify specific characteristics for an index on the Options tab of the Index Properties grid.

Operation

Maximum degree of parallelism
Overrides the Configure the max degree of parallelism Server Configuration Option configuration option for the duration of the index operation.

See Also

Clustered Columnstore Index Properties

Storage, Clustered Columnstore Index Properties


Storage, Clustered Columnstore Index Properties

Use this tab to specify storage properties for the clustered columnstore index.

Regular data space
Defines the amount of space in megabytes that the data occupies in the index.

Partition column
Shows the name of the column on which the index is partitioned.

Filestream data space
Specify the name of the FILESTREAM data filegroup.

Text/Image file group
Shows the name of the filegroup that contains the text or image data for the index.

See Also

Clustered Columnstore Index Properties

Nonclustered Columnstore Index Properties


Nonclustered Columnstore Index Properties

Use this grid to modify index properties. To view the grid, double-click a table in the Database Explorer, then switch to the Indexes tab, and the double-click an index.

If you want to create a new index, in the Database Explorer window, navigate to the Indexes node of the required table, from its shortcut menu select New Index, and then click Nonclustered Columnstore Index.

In This Section

General, Nonclustered Columnstore Index Properties
Describes the nonclustered columnstore index characteristics you can specify on the General tab of the Index Properties grid.

Options, Nonclustered Columnstore Index Properties
Describes the nonclustered columnstore index characteristics you can specify on the Options tab of the Index Properties grid.

Storage, Nonclustered Columnstore Index Properties
Describes the nonclustered columnstore index characteristics you can specify on the Storage tab of the Index Properties grid.

See Also

Index Properties Dialog Box

Table and View Editors


General, Nonclustered Columnstore Index Properties

Specify general properties for nonclustered columnstore indexes on this tab.

Name
The name of the created index. Uniqueness of a name is checked when you save the index. The fileld cannot be empty.

Description
Specify a created index with an appropriate description.

Type
Select proper index type from the drop-down list box. There are two values available: Clustered columnstore or Nonclustered columnsore.

Index Columns

Remove
Click the button to delete a selected index column from the grid.

Move up
Click the button to move an index column up in the grid.

Move down
Click the button to move an index column down in the grid.

Table Columns Grid
Lists the table columns that are participating in an index. The index must include at least one column.

Name
Specifies the name of a column.

Data Type String
Specifies the data type of a column.

Not Null
Indicates whether a column accepts the null values.

See Also

Nonclustered Columnstore Index Properties

Options, Nonclustered Columnstore Index Properties


Options, Nonclustered Columnstore Index Properties

Specify specific characteristics for an index on the Options tab of the Nonclustered Columnstore Index Properties grid.

Operation

Maximum degree of parallelism
Overrides the Configure the max degree of parallelism Server Configuration Option configuration option for the duration of the index operation.

See Also

Nonclustered Columnstore Index Properties

Storage, Nonclustered Columnstore Index Properties


Storage, Nonclustered Columnstore Index Properties

Use this tab to specify storage properties for the non-clustered columnstore index.

Regular data space
Defines the amount of space in megabytes that the data occupies in the index.

Partition column
Shows the name of the column on which the index is partitioned.

Filestream data space
Specify the name of the FILESTREAM data filegroup.

Text/Image file group
Shows the name of the filegroup that contains the text or image data for the index.

See Also

Nonclustered Columnstore Index Properties


Rebuild Indexes Dialog Box

Use this dialog box to rebuild an index using the same columns, index type, uniqueness attribute, and sort order. To rebuild a certain index, right-click an index in the Database Explorer, and then select Rebuild Index from the shortcut menu. To rebuild all indexes, right-click the Indexes category node, and select Rebuild All Indexes from the shortcut menu.

The Rebuild Indexes dialog box includes the following elements.

Object Name
Displays the name of an index you want to rebuild.

Table Name
Displays the name of the table where an index belongs to.

Index Type
Displays the type of an index.

Total Fragmentation
The percent of logical fragmentation.

Result
Shows whether an index was rebuilt or not.

Filter
To quickly find a required index, enter characters available in the required index's name. Only indexes, names of which contain the required characters, will be shown in the list.

Script Changes

to New SQL Window
Shows script changes in a new SQL document.
to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Table and View Editors

Reorganize Indexes


Reorganize Indexes Dialog Box

Use the dialog box to reorganize an index level. To reorganize a certain index, right-click an index in the Database Explorer, and then select Reorganize Index from the shortcut menu. To reorganize all indexes, right-click the Indexes category node, and then select Reorganize All Indexes from the shortcut menu.

The Reorganize Indexes dialog box includes the following elements.

Object Name
Displays the name of an index you want to reorganize.

Table Name
Displays the name of the table where an index belongs to.

Index Type
Displays the type of an index.

Total Fragmentation
The percent of logical fragmentation.

Result
Shows whether an index was reorganized or not.

Filter
To quickly find a required index, enter characters available in the required index's name. Only indexes, names of which contain the required characters, will be shown in the list.

Compact large object column data
Specifies that all pages that contain large object (LOB) data are compacted. The option is selected by default.

Script Changes

to New SQL Window
Shows script changes in a new SQL document.
to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Table and View Editors

Disable Indexes


Disable Indexes Dialog Box

Use this dialog box to specify an index as disabled or unavailable in the required database. To disable a certain index, right-click an index in the Database Explorer, and then select Disable Index from the shortcut menu. To disable all indexes, right-click the Indexes category node, and then select Disable All Indexes from the shortcut menu.

The Disable Indexes dialog box includes the following elements.

Name
Displays the name of an index you want to disable.

Table
Displays the name of a table where an index belongs to.

Status
Shows the status of a selected index.

Script Changes

to New SQL Window
Shows script changes in a new SQL document.
to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Table and View Editors

Keys


Statistics Properties

This section contains reference information on constraint properties.

In This Section

General, Statistics Editor
Describes options on the General tab of the Statistics Properties grid.

Details, Statistics Editor
Describes options on the Details tab of the Statistics Properties grid.

See Also

Table and View Editors

Database Editor


General, Statistics Properties

Use the General tab of the Statistics Properties grid to add or remove columns to the statistics.

Statistics Name
Displays the name of the database object where the statistics are stored.

Filter Expression
Specifies an expression for selecting a subset of rows to include when creating the statistics object.

SAMPLE
Specifies the approximate percentage or number of rows in the table or indexed view for the query optimizer to use when it creates statistics.

Statistics Columns
Displays the columns described by this set of statistics. All values in the grid are read-only.

Move Up
Move the selected column to an earlier location in the statistics grid.

Move Down
Move the selected column to a later location in the statistics grid.

Remove
Remove the selected column from the statistics grid.

Name
Displays the name of the column described by the statistics. This can be a single column or a combination of columns in a single table.

Data Type
Indicates the data type of the columns described by the statistics.

Not Null
Indicates whether the column accepts null values.

Identity
Indicates an identity column when checked.

Norecompute
When the option is not checked, the statistics is recomputed.

Incremental
Check the option to make statistics incremental.

See Also

Statistics Editor

Details, Statistics Properties Dialog Box


Details, Statistics Properties

The Details tab of the Statistics Properties grid shows information collected in the currently selected statistic object.

Statistics Header

Name
Displays the name of the database object where the statistics are stored.

Updated
Displays the date the current statistics were created.

Rows
Displays the number of rows in the table.

Rows Sampled
Displays the number of rows examined to create the statistics.

Steps
The rows of the table are split into groups for the statistics histogram. This is the number of groups that were created.

Density
An index that has a large number of duplicates has high density.

Average Key Length
Displays the average length of each row.

String Index
Yes indicates that the statistics contain a string summary index to support estimation of result set sizes for LIKE conditions. (Applies only to leading columns of char, varchar, nchar, and nvarchar data types.)

Filter Expression
Displays the expression for a filter specified on the General tab of the editor.

Unfiltered Rows
Displays the number of rows that are not filtered.

Density Vector

All Density
Displays the density for the combination of columns listed in the Columns section.

Average Length
Displays the average length of the combination of columns listed in the Columns section.

Columns
Displays the columns described by the All Density and the Average Length fields.

Histogram Data

RANGE_HI_KEY
Displays the upper bound value of a histogram step.

RANGE_ROWS
Displays the number of rows from the sample that fall within a histogram step, excluding the upper bound.

EQ_ROWS
Displays the number of rows from the sample that are equal in value to the upper bound of the histogram step.

DISTINCT_RANGE_ROWS
Displays the number of distinct values within a histogram step, excluding the upper bound.

AVG_RANGE_ROWS
Displays the average number of duplicate values within a histogram step, excluding the upper bound value.

See Also

Statistics Editor

Database Editor


Database Editor

In This Section

Files, Database Editor
Use this page to create a new database or modify the properties for an existing one.

Filegroups, Database Editor
Use this page to view the filegroups and add a new filegroup to the selected database.

Options, Database Editor
Use the topic to modify the options for a selected database.

Change Autogrowth Dialog Box
Use the dialog box to edit the autogrowth values.

Browse For Folder Dialog Box
Use the dialog box to specify the path to the file.


Files, Database Editor

Use this page to create a new database or modify the properties for an existing one.

Name
Name of the database.

Owner
Displays the name of the database owner.

Description
Provide the database with meaningful description here.

Files

Add file
Add a new file to the database.

Remove
Delete the selected file from the database. A file cannot be removed unless it is empty. The primary data file and log file cannot be removed.

Logical name
Enter or modify the name of the file.

File type
Specify the file type here. The Data, Log, or Filestream Data values are available. You cannot modify the file type of an existing file.

Filegroup
Select the filegroup for the file here. By default, the filegroup is PRIMARY. You can create a new filegroup by selecting <new> and entering information about the filegroup in the New Filegroup dialog box. A new filegroup can also be created on the Filegroups tab. You cannot modify the filegroup of an existing file.

Initial size (MB)
Enter or modify the initial size for the file in megabytes.

Autogrowth/Max Size
Displays the autogrowth file properties. These properties control how the file expands when its maximum file size is reached. To edit autogrowth values, click the edit button next to the autogrowth properties for the required file, and change the values in the Change Autogrowth dialog box.

Path
Displays the path to the selected file. To specify a path for a new file, click the edit button next to the path for the file, and navigate to the destination folder. Note that you cannot modify the path of an existing file.

File name
Displays the name of the file. Is not valid for the FILESTREAM files.

Text editor
Contains SQL code of the database. Changes you make in the visual part of the editor are immediately available in the Text editor.

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
Shows script changes in a new SQL document.
to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Database Editor User Interface Elements

Filegroups, Database Editor


Filegroups, Database Editor

Use this page to view the filegroups and add a new filegroup to the selected database. Filegroup types are separated into row filegroups and FILESTREAM data filegroups.

Buttons

Add Filegroup
Adds a new blank row under the Filegropus node of the Filegroups list.

Add Filestream Filegroup
Adds a new blank row under the Filestream filegrops node of the Filegroups list.

Add Memory-Optimized Filegroup
Adds a new blank row under the Memory-Optimized filegroups node of the Filegroups list.

Remove
Removes the selected filegroup row from the grid.

Filegroups List

If there are all three filegroup types in the database, filegroups are sorted in three groups in the list: Filegroups, Filestream filegroups, Memory-Optimized filegroups.

Name
Name of the filegroup.

Files
Displays the count of files in the filegroup.

Default
Select to make this filegroup the default filegroup.

Read-only
Select to set the filegroup to a read-only status.

Text editor
Contains SQL code of the database. Changes you make in the visual part of the editor are immediately available in the Text editor.

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
Shows script changes in a new SQL document.
to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Database Editor

Options, Database Editor


Options, Database Editor

Use the topic to modify the options for a selected database.

Search
Type in a filter string here. Use the "_" symbol to substitute any character.

General

Collation
Specify the collation of the database by selecting it from the list.

Recovery model
Specify the model to recover the database: Full, Simple, or Bulk-Logged.

Compatibility level
Specify the latest version of SQL Server that the database supports.

Containment type
Specify none or partial to designate if this is a contained database.

State

Database Read-Only
Indicates whether updates are allowed on the database.

Encryption Enabled
If checked, the database is enabled for database encryption.

Restrict Access
Controls which users may access the database. When SINGLE_USER is specified, only one user can access the database at a time. When RESTRICTED_USER is specified, only members of the db_owner, dbcreator, or sysadmin roles can use the database. MULTI_USER returns the database to its normal state.

Automatic

Auto Close
If checked, the database is shut down cleanly and its resources are freed after the last user logs off.

Auto Create Statistics
If checked, any missing statistics needed by a query for optimization are automatically built during optimization.

Auto Shrink
Specify if the database files are available for periodic shrinking.

Auto Update Statistics
If checked, any out-of-date statistics needed by a query for optimization are automatically built during optimization.

Auto Update Statistics Asynchronously
Specifies that statistics updates for the AUTO_UPDATE_STATISTICS option are asynchronous.

Cursor

Close Cursor on Commit Enabled
If checked, any cursors that are open when a transaction is committed or rolled back are closed.

Use LOCAL Cursor
If checked, the local cursor is used.

Filestream

Filestream Directory Name
Specify the directory name for the FILESTREAM data associated with the selected database.

Non-Transacted Access
Indicates whether the non-transactional access to files stored in SQL Server is enabled or disabled.

Recovery

Page verify
Check the option to discover and report incomplete I/O transactions caused by disk I/O errors.

Service Broker

Broker Enabled
Specifies that Service Broker is enabled for the specified database.

Honor Broker Priority
Send operations take into consideration the priority levels that are assigned to conversations.

Service Broker Identifier
Identifier of the service broker for this database. Used as the broker_instance of the target in the routing table.

Change Tracking

Change Tracking
Indicates whether change tracking is enabled for the database.

Retention Period
Specifies the minimum period for keeping change track information in the database.

Retention Period units
Specifies the units for the Retention Period value. You can select Days, Hours, or Minutes.

Auto Cleanup
Indicates whether change tracking information is automatically removed after the specified retention period.

Containment

Default Language
Specifies a default language for all newly created logins.

Default Fulltext Language
Specifies a default language value for full-text indexes.

Nested Triggers Enabled
Specifies whether an AFTER trigger can cascade.

Transform Noise Words
Suppresses an error message, if noise words (stopwords) cause a Boolean operation on a full-text query to return zero rows.

Two Digit Year Cutoff
Specifies an integer from 1753 to 9999 that represents the cutoff year for interpreting two-digit years as four-digit years.

Miscellaneous

Allow Snapshot Isolation
Indicates whether snapshot isolation is allowed or not.

ANSI NULL Default
Determines the default value (NULL or NOT NULL) of a column or the CLR user-defined type for which the nullability is not explicitly defined in the CREATE TABLE or ALTER TABLE statements.

ANSI NULLS Enabled
All comparisons to a null value evaluate to UNKNOWN.

ANSI Padding Enabled
Strings are padded to the same length before conversion or inserting to a varchar or nvarchar data type.

ANSI Warnings Enabled
Errors or warnings are issued when conditions such as divide-by-zero occur or null values appear in aggregate functions.

Arithmetic Abort Enabled
A query is ended when an overflow or divide-by-zero error occurs during query execution.

Concatenate Null Yields Null
The result of a concatenation operation is NULL when either operand is NULL.

Date Correlation Optimization Enabled
SQL Server maintains correlation statistics between any two tables in the database that are linked by a FOREIGN KEY constraint and have datetime columns.

Numeric Round-Abort
An error is generated when loss of precision occurs in an expression.

Forced parametrization
SQL Server parameterizes all queries in the database.

Quoted Identifiers Enabled
Double quotation marks can be used to enclose delimited identifiers.

Recursive Triggers Enabled
Recursive firing of AFTER triggers is allowed.

Trustworthy
Indicates whether the instance of SQL Server trusts the database and the contents within it.

Database Scoped Configurations

Legacy Cardinality Estimation
Specify the query optimizer cardinality estimation model for the primary independent of the compatibility level of the database.

Legacy Cardinality Estimation for Secondary
Specify the query optimizer cardinality estimation model for the primary independent of the compatibility level of the database.

Max DOP
Specify the default MAXDOP setting for the primary that should be used for statements.

Max DOP for Secondary
Specify the default MAXDOP setting for secondaries, if any, that should be used for statements.

Parameter Sniffing
Enables or disables parameter sniffing on the primary.

Parameter Sniffing for Secondary
Enables or disables parameter sniffing on secondaries, if any.

Query Optimizer Fixes
Enables or disables query optimization hotfixes on the primary regardless of the compatibility level of the database.

Query Optimizer Fixes for Secondary
Enables or disables query optimization hotfixes on secondaries, if any, regardless of the compatibility level of the database.

Query Store

Operation Mode (Actual)
Shows the currently active query store operation mode.

Operation Mode (Requested)
Shows the requested query store operation mode.

Data Flush Interval (Minutes)
Shows the frequency at which query store data is flushed and persisted on disc.

Statistics Collection Interval
Shows the granularity at which runtime statistics are aggregated.

Max Size (MB)
Shows the maximum size allocated to the query store within the host database.

Query Store Capture Mode
Shows the query store capture mode. Select ALL to capture all queries. Select AUTO to capture queries based on resource consumption. Select NONE to stop capturing new queries.

Size Based Cleanup Mode
Activates data cleanup automatically when total amount of data reaches the maximum size. Select OFF to disable cleanup mode. Select AUTO to enable automatic data cleanup.

Stale Query Threshold (Days)
The duration to retain query store runtime statistics.

Max Plans Per Query
Shows the maximum number of unique plans that can be stored for a query in the plan store

Text editor
Contains SQL code of the database. Changes you make in the visual part of the editor are immediately available in the Text editor.

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
Shows script changes in a new SQL document.
to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Database Editor User Interface Elements

Database Objects Text Editor User Interface Elements


Change Autogrowth Dialog Box

Use the dialog box to edit the autogrowth values. To open it, go to the Files tab of the Database Editor, click the edit button next to the autogrowth properties for the selected file.

Enable Autogrowth
The option enables the autogrowth properties for the file.

File Growth

In Percent
Specify the growth of the file in percent.

In Megabytes
Specify the growth of the file in megabytes.

Maximum File Size

Limited to (MB)
Specify the maximum size value for the file.

Unlimited
Check the option to specify the file size as unlimited.

See Also

Database Editor

Browse For Folder Dialog Box


Browse For Folder Dialog Box

Use the dialog box to specify the path to the file. To open the dialog, go to the Main tab of the database editor, and then click the path edit button for the selected file.

Select the folder
Select the folder to store a selected file.

Selected path
Displays the selected path to a file.

See Also

Database Editor


New Object Dialog Box

Use this dialog box to create new database object. To open it, click on "Create New Database Object" button.

Location
Lists available databases on specific Microsoft SQL Server 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 Editor

Database Objects Text Editor


Database Objects Text Editor

Such objects as triggers, database triggers, procedures, functions, sequences, synonyms, etc., can be edited in a Text Editor that is opened by double-clicking the required object. In the opened text editor you can make the required changes and then perform the following actions:

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
Shows script changes in a new SQL document.
to Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Object Editor


Options

This section describes different options that are available in dbForge Studio.

In This Section

Environment Options
This section describes Environment options which determine how certain elements of the dbForge Studio display and behave.

Text Editor Options
This section describes Text Editor options that provide a variety of ways to customize the performance and appearance of the editor.

Code Analysis Options
Describes options to customize code analysis.

Generate Scripts Options
This section describes DDL generation options.

Query Execution Options
The section describes a variety of ways to customize the performance of query execution.

Data Comparison Options
This section describes options that allows you to change the default behavior of the Data Comparison.

Data Editor Options
This section describes the Data Editor options.

Data Generation Options
This section describes the Data Generation options.

Database Diagram Options
This section describes options that help to customize a database diagram.

Database Explorer Options
This section describes Database Explorer options.

Debugging Options
This section describes debugging options.

Index Manager Options
This section describes options for Index Manager.

Master-detail Options
This section describes the available Master-detail options.

Query Builder Options
This section describes options for Query Builder's diagram.

Query Profiler Options
This section explains code formatting options provided in the Options window.

Schema Comparison Options
This section describes schema comparison options.

Source Control Options
This sections describes source control options.


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.

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

Options

Text Editor Options


General, Environment, Options Dialog Box

Use this page of the Options dialog box to change settings for dbForge Studio. To access the Options dialog box, click Options on the Tools menu, and then select the General page in the Environment folder.

Visual Settings

Skin
Choose the application skin you prefer to use. The skin list contains the following themes:

· 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

Use styled images
Select the check box to apply styled images.

Note

Changes will be applied after you restart the application.

Enable main form skin
Select the check box to apply a chosen skin to the main application form. If not selected, the Windows theme will be applied to the application main form.

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.
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 SQL Server 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 shown 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 shown in recently used lists
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

Apply the following additional keyboard mapping scheme
Lists the set of all available shortcut keys collections. To load a specific scheme, select it from the list. When you are ready to leave the Options dialog box, click OK.

· 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.

Show Table
Click to open view the table listing all shortcuts applied to the commands within the selected keyboard mapping scheme.

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 a 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 CRTL, 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

Shortcuts Table, Keyboad Options


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
Describes options available for SQL document view.

Object Editors
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.

See Also

Environment Options

SMTP, Environment, Options Dialog Box


SQL Documents

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


Object Editors

The Object Editors subsection of Environment Documents of the Options window contains the following options:

Object Editors

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
If selected, script execution will be stopped when execution encounters the first error.

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.

To save a stored procedure that refers to a linked server, clear the Use Transactions option. Otherwise, if you need to use transactions, do the following :

1. Run Distributed Transaction Coordinator (MSDTC): on the Start menu, click Control Panel. In Control Panel, click Administrative Tools. In Administrative Tools, click Services. In the details pane, click Distributed Transaction Coordinator in the list of services. On the Action menu, click Start.
2. Open Component Services: on the Start menu, click Control Panel. In Control Panel, click Administrative Tools. In Administrative Tools, click Component Services.
3. In the Console Root, click to expand Component Services, click to expand Computers, click to expand My Computer, click to expand Distributed Transaction Coordinator and then click Local DTC.
4. Right click Local DTC and click Properties. The Local DTS Properties dialog box opens.
5. Switch to the Security tab and setup Distributed Transaction Coordinator in accordance with your security policy.

See Also

Documents, Environment, Options Dialog Box

Categories


Categories

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

Restore


Restore

Use the topic to customize the automatic files saving. It will allow you to return to the documents which you forgot to save during the last session.

Settings

Save restore information every ... min
Set the time after which the data will be saved automatically.

Restorable file types

SQL files (*.sql)
If selected, the *.sql files will be saved automatically.

Master-Detail files (*.mdet)
If selected, the master-detail files will be saved automatically.

Database diagrams (*.dbd)
If selected, the database diagrams will be saved automatically.

Reports (*.rdb)
If selected, the report files will be saved automatically.

Data generator files (*.dgen)
If selected, the data generator files will be saved automatically.

Server event profiler files (*.ssp)
If selected, the server profiler files will be saved automatically.

Data comparison files (*.dcomp)
If checked, the data comparison files will be saved automatically.

Schema comparison files (*.scomp)
If checked, the schema comparison files will be saved automatically.

Text files (*.txt)
If checked, the text files will be saved automatically.

XML files (*.xml)
If checked, the XML files will be saved automatically.

See Also

Documents, Environment, Options Dialog Box

Execution History


Execution History

Use the topic to customize saving of the 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.

Folder to store
Specify path to folder to store database of 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.

Clear execution history
Click to clear the execution history.

See Also

Documents, Environment, Options Dialog Box

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.

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

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


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.

Printing, 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

Options

Code Analysis 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 SQL Server 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.

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, a new line of text is positioned to fit the code context, basing on other code formatting settings and conventions.

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.

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.

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.

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

Text Editor Options

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.

Options

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
Point where code execution pauses.

Breakpoint (Disabled)
Breakpoint is disabled while debugging.

Breakpoint (Error)
Error in a breakpoint while debugging.

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 highlighting.

Identifier
Identifier, such as database object name, stored procedure parameter, etc.

Keyword
SQL keyword.

Line Numbers
Numbers appearing next to each code 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
SQL variable.

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
XML syntax delimiters.

XML String
String constant in XML editor.

XML Tag Name
XML attribute name.

XML Whitespace
Whitespace characters in XML.

Item foreground
Font color of a selected display item.

Use Default
Resets font color of a selected display item to its default value.

Item background
Background color of a selected display item.

Use Default
Resets background color of a selected display item to its default value.

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.

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.

List Members, Code Completion Text Editor Options Dialog Box
Describes options for list members.

Alias, Code Completion Text Editor Options Dialog Box
Describes options for aliases.

See Also

Text Editor Options

Formatting


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 set up 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 ... ms
Defines a delay used by dbForge Studio for SQL Server 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 suggestion cache every ... minute(s)
Select this checkbox to enable automatic refresh within specified interval.

Detect changes on a server before refreshing suggestion cache
If the option is enabled, the suggestion cache will be refreshed in case of any changes on a server. If the option is disabled, the suggestion cache will be refreshed when a user selects the respective command (irrespective of changes on the server).

Note

This option works on SQL Server 2005 or higher.

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:

Settings

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.
With database, schema and table name
The name of the table the column belongs to, the database and schema names are specified before the column name: DatabaseName.SchemaName.TableName.ColumnName.

Include default schema in object names
Includes the default schema into an object name when pasting it into the text.

Reverse order in 'JOIN'-condition
Applies reverse order in JOIN conditions.

Add parentheses when inserting functions
If the option is checked, parentheses are added when you insert functions.

Inclose identifiers within square brackets

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 bracketing is 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


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 setup 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
When selected, the relevant keyword will always be selected in the suggestion list, even if a user input is expected.

Commit snippets immediately
When selected, a code snippet shortcut will expand into the code snippet immediately after pressing Tab, without waiting for the suggestion box to appear.

See Also

Code Completion Options

Alias, Code Completion Text Editor Options Dialog Box


Alias, Code Completion Text Editor Options Dialog Box

Use the Alias section of the Options dialog box to setup alias generation in SQL Complete. You can apply the following options:

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
Determines the case of alias. The option is disabled by default.

Automatically generate AS clause
Alias is added using the AS clause.

Condition
Define an identifier using a corresponding condition mask to which a custom alias specified in the Action column will be assigned. You can remove the identifier by selecting it in the list and clicking [image].

Action
Define an alias name using a corresponding mask. The alias will be assigned to the identifiers meeting the condition specified in the Condition column. You can remove the alias by selecting it in the list and clicking [image].

See Also

Code Completion Options

Formatting


Printing, 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

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 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 Identifier Case option is set to Initial Caps each word.

Reset Page Defaults
Resets all options on this page to their default values.

Note

To disable code formatting for a specific part of the code, use the -- noformat -- endnoformat tags.

See Also

Formatting

Text Editor Options


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 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 a selected profile.

Show in Folder
Opens folder containing a 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

Text 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.

Format Current Statement
Formats a current statement.

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


Code Analysis Options

In This Section

Profiles, Code Analysis, Options Dialog Box
Describes options to customize code analysis.

Code Analysis Rules
This section contains information on the code analysis rules, used in T-SQL Code Analyzer.

See Also

Options

Generate Scripts Options


Profiles, Code Analysis, Options Dialog Box

Use the Profiles option to customize code analysis provided by dbForge Studio. To access it, go to Tools menu, select Options, and then click Code Analysis.

Code Analysis Profiles

Select a profile from the table.

Name
Profile name.

File
Profile file name.

Edit Profile
Opens the Edit Profile window that allows editing options available in the profile.

New Profile
Opens the New Profile window to create a new profile for code analysis.

Activate
Click to activate a selected profile.

Show in Folder
Opens folder containing a 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 a selected profile.

Rename
Click to change a profile name.

Show In Folder
Opens the folder containing a file in Windows Explorer.

Copy File Path
Copies a file path to clipboard.

Delete
Click to delete a selected code analysis profile.

See Also

Code Analysis Options

Options


Edit Profile, Code Analysis Options Dialog Box

Use this window to edit code analysis options in a selected profile.

Edit Profile Window

Filter
Allows quickly searching a required option or options group.

Select All
Click to select all options at a time.

Rules Grid

Rules
Lists code analysis rules, used in T-SQL Code Analyzer.

Best Practice Rules
Lists rules related to best coding practices.

Performance Rules
Lists rules, related to performance.

Deprecated Rules
Lists rules, related to usage of deprecated items.

Notification Type
Select how rule violations will be outputted in the Error List. There are four notification types available:

Mixed
Available only for a group of rules and indicates that the rules within a group have different notification types.

Error
Select to output the rule violation as an error.

Warning
Select to output the rule violation as a warning.

Hint
Select to output the rule violation as a hint.

See Also

Profiles, Code Analysis Options

New Profile, Code Analysis Options


New Profile, Code Analysis Options Dialog Box

Use this window to create and add a new profile for code analysis.

New Profile Window

Name
Specify a new profile name here.

Copy settings from
Select an existing profile to copy settings from.

File Path
Set the path where to save a new profile.

Set Active
Activate this profile in the Profiles, Code Analysis Options dialog box.

See Also

Profiles, Code Analysis Options

Options


Code Analysis Rules

This section contains information on the code analysis rules, used in T-SQL Code Analyzer.

In This Section

Best Practice Rules
This topic describes best practice rules.

Performance Rules
This topic describes performance rules.

Deprecated Rules
This topic describes deprecated rules.


Best Practice Rules

This section contains descriptions of the best practice rules.

In This Section

BP001: Best Practice Rule
This topic describes the BP001 best practice rule.

BP002: Best Practice Rule
This topic describes the BP002 best practice rule.

BP003: Best Practice Rule
This topic describes the BP003 best practice rule.

BP004: Best Practice Rule
This topic describes the BP004 best practice rule.

BP005: Best Practice Rule
This topic describes the BP005 best practice rule.

BP006: Best Practice Rule
This topic describes the BP006 best practice rule.

BP007: Best Practice Rule
This topic describes the BP007 best practice rule.

BP008: Best Practice Rule
This topic describes the BP008 best practice rule.

BP009: Best Practice Rule
This topic describes the BP009 best practice rule.

BP010: Best Practice Rule
This topic describes the BP010 best practice rule.

BP011: Best Practice Rule
This topic describes the BP011 best practice rule.

BP012: Best Practice Rule
This topic describes the BP012 best practice rule.

BP013: Best Practice Rule
This topic describes the BP013 best practice rule.


BP001: Best Practice Rule

BP001: SQL-92 style cursor declaration is used. Desirable to use T-SQL declaration format

This topic describes the BP001 best practice rule.

Message

SQL-92 style cursor declaration is used. Desirable to use T-SQL declaration format.

Description

It is recommended to declare cursor in T-SQL format instead of the outdated SQL-92 format.

Code Example

The following example shows the cursor declaration in the SQL-92 style.

DECLARE cursor_92 [SCROLL | INSENSITIVE] CURSOR FOR
SELECT o.[object_id]
FROM sys.objects o

The following example shows cursor declaration in the T-SQL declaration format.

DECLARE cursor_tql CURSOR LOCAL READ_ONLY FAST_FORWARD FOR
SELECT o.[object_id]
FROM sys.objects o

See Also

Best Practice Rules

BP002: Best Practice Rule


BP002: Best Practice Rule

BP002: Schema name for a table or view is not specified

This topic describes the BP002 best practice rule.

Message

Schema name for a table or view is not specified.

Description

It is possible to set a default schema for a database user. For example, the "dbo" schema is implicitly set for for the "sa" user. If a particular schema is not specified when creating a table or view, the default schema will be used.

It is required to specify schema even if a default schema is used. Violation of the rule may lead to a serious error, that is hard to detect in complex queries. Specification of a certain schema allows to avoid ambiguity when executing the same queries for different users.

Code Example

CREATE TABLE Table1(ID BIGINT)
INSERT INTO Table1(ID)
SELECT 1

SELECT * FROM Table1

In regard to the rule, the aforesaid code should be rewritten in the following way:

CREATE TABLE dbo.Table1(ID BIGINT)
INSERT INTO dbo.Table1(ID)
SELECT 1

SELECT * FROM dbo.Table1

See Also

Best Practice Rules

BP003: Best Practice Rule


BP003: Best Practice Rule

BP003: Possible unnecessary ELSE block in the CASE statement

This topic describes the BP003 best practice rule.

Message

Possible unnecessary ELSE block in the CASE statement.

Description

If none condition within the CASE STATEMENT equals TRUE, the NULL values will always be returned.

Code Example

SELECT ic.object_id,
COUNT(CASE WHEN is_unique = 1 THEN 1 ELSE NULL END) is_unique,
COUNT(CASE WHEN is_primary_key = 1 THEN 1 ELSE NULL END) is_primary_key
FROM sys.indexes ix
JOIN sys.index_columns ic ON ix.object_id = ic.object_id AND ix.index_id = ic.index_id
GROUP BY ic.object_id

The aforesaid query can be simplified by dropping ELSE NULL:

SELECT ic.object_id,
COUNT(CASE WHEN is_unique = 1 THEN 1 END) is_unique,
COUNT(CASE WHEN is_primary_key = 1 THEN 1 END) is_primary_key
FROM sys.indexes ix
JOIN sys.index_columns ic ON ix.object_id = ic.object_id AND ix.index_id = ic.index_id
GROUP BY ic.object_id

See Also

Best Practice Rules

BP004: Best Practice Rule


BP004: Best Practice Rule

BP004: Avoid the GOTO statement to improve readability

This topic describes the BP004 best practice rule.

Message

Avoid the GOTO statement to improve readability.

Description

Use of the GOTO statement is generally considered to be a poor programming practice and is not recommended. Extensive use of GOTO results into the poorly readable code, especially when procedures grow long.

It is recommended to use the rule to track all GOTO statements and labels. If the script body contains labels without GOTO that references to any of the labels, it is considered an error, as the code may never be executed.

Code Example

DECLARE @Counter INT
SELECT @Counter = 1

WHILE @Counter < 10 BEGIN
SELECT @Counter = @Counter + 1

IF @Counter = 4 GOTO goto1
IF @Counter = 5 GOTO goto2

END

goto1:
SELECT 1
GOTO goto3;

goto2:
SELECT 2

goto3:
SELECT 3

See Also

Best Practice Rules

BP005: Best Practice Rule


BP005: Best Practice Rule

BP005: Unqualified column name in SELECT list

This topic describes the BP005 best practice rule.

Message

Unqualified column name in SELECT list.

Description

It is recommended to set names for all columns of in SELECT list. Absence of column names may lead to ambiguities on client side when interpreting results of SELECT list

Compliance with this rule leads to code clarity.

Code Example

The following examples illustrate queries with unqualified column names:

SELECT 1;

SELECT @@servername;

SELECT Sen..atoms.IntSeq + 1 FROM Sen.dbo.atoms;

SELECT
'Total income is',
((OrderQty * UnitPrice) * (1.0 - UnitPriceDiscount)),
' for ',
p.Name AS ProductName
FROM Production.Product AS p
INNER JOIN Sales.SalesOrderDetail AS sod
ON p.ProductID = sod.ProductID
ORDER BY ProductName ASC;

SELECT
*,
(6371 * 1000 * ACOS(COS(RADIANS(42.3936868308)) * COS(RADIANS(a.col1)) * COS(RADIANS(a.col1) - RADIANS(-72.5277256966)) + SIN(RADIANS(42.3936868308)) * SIN(RADIANS(a.col1))))
FROM AA a;

See Also

Best Practice Rules

BP006: Best Practice Rule


BP006: Best Practice Rule

BP006: Declaring var type variables without length

This topic describes the BP006 best practice rule.

Message

Declaring var type variables without length.

Description

The rule checks T-SQL code for usage of data types without specified length. Such data types, as DECIMAL, NUMERIC, VARCHAR, NVARCHAR, CHAR and NCHAR can be declared without the length specification.

Unsage of data types with specified data length may reduce the size of memory space, that is used for data storage in comparison with data types without the length specification.

Code Example

The following declaration data

DECLARE @a DECIMAL
DECLARE @b NUMERIC
DECLARE @c VARCHAR
DECLARE @d CHAR
DECLARE @e NVARCHAR
DECLARE @f NCHAR

will be interpreted by SQL Server as:

DECLARE @a DECIMAL(18,0)
DECLARE @b NUMERIC(18,0)
DECLARE @c VARCHAR(1)
DECLARE @d CHAR(1)
DECLARE @e NVARCHAR(1)
DECLARE @f NCHAR(1)

See Also

Best Practice Rules

BP007: Best Practice Rule


BP007: Best Practice Rule

BP007: It is recommended to explicitly specify the [NOT] NULL option in a table column definition

This topic describes the BP007 best practice rule.

Message

It is recommended to explicitly specify the [NOT] NULL option in a table column definition.

Description

By default, if the NOT NULL option is not specified explicitly when creating a table, the NULL value will be applied to all columns.

Therefore, it is recommended to always set the availability of empty values in a column when creating a table, or declaring a temporary table, or a table variable.

Code Example

DECLARE @WorkOut TABLE
(
WorkOutID BIGINT
, TimeSheetDate DATETIME
, DateOut DATETIME
, EmployeeID INT
, IsMainWorkPlace BIT
, DepartmentUID UNIQUEIDENTIFIER
, WorkPlaceUID UNIQUEIDENTIFIER
, TeamUID UNIQUEIDENTIFIER
, WorkShiftCD NVARCHAR
, WorkHours REAL
, AbsenceCode VARCHAR
, PaymentType CHAR
, CategoryID INT
)

In regard to the rule, the declaration of the table variable will look in the following way:

DECLARE @WorkOut TABLE
(
WorkOutID BIGINT NOT NULL
, TimeSheetDate DATETIME NOT NULL
, DateOut DATETIME NOT NULL
, EmployeeID INT NOT NULL
, IsMainWorkPlace BIT NOT NULL
, DepartmentUID UNIQUEIDENTIFIER NOT NULL
, WorkPlaceUID UNIQUEIDENTIFIER NULL
, TeamUID UNIQUEIDENTIFIER NULL
, WorkShiftCD NVARCHAR NULL
, WorkHours REAL NULL
, AbsenceCode VARCHAR NULL
, PaymentType CHAR NULL
, CategoryID INT NOT NULL
)

See Also

Best Practice Rules

BP008: Best Practice Rule


BP008: Best Practice Rule

BP008: Executing a stored procedure without getting result

This topic describes the BP008 best practice rule.

Message

Executing a stored procedure without getting result.

Description

Getting the result code after execution of a stored procedure though the EXEC clause is considered as a best practice.

If a stored procedure is executed without errors (the value of RETURN is not explicitly specified), the result code will be "0".

Code Example

DECLARE
@ReturnID INT

EXEC @ReturnID = Labour.usp_AddCustomWorkFactor

SELECT @ReturnID

See Also

Best Practice Rules

BP009: Best Practice Rule


BP009: Best Practice Rule

BP009: Use named parameters when calling a procedure

This topic describes the BP009 best practice rule.

Message

Use named parameters when calling a procedure.

Description

When calling a user stored procedure, the parameters that are passed to procedure should always be specified explicitly. It is required to prevent the problems, that may arise if the parameters order was changed in schema.

Note

The rule applies only to user-defined stored procedures.

Code Example

DECLARE @ReturnID INT
EXEC @ReturnID = Labour.usp_AddCustomWorkFactor 1, N'657', 1
SELECT @ReturnID

In the aforesaid case, the parameters of the user-defined procedure should be specified explicitly:

DECLARE @ReturnID INT

EXEC @ReturnID = Labour.usp_AddCustomWorkFactor
@WorkOutID = 1
, @WorkFactorCD = N'657'
, @WorkFactorValue = 1
SELECT @ReturnID

See Also

Best Practice Rules

BP010: Best Practice Rule


BP010: Best Practice Rule

BP010: Detect the UPDATE statement without row limiting conditions

This topic describes the BP010 best practice rule.

Message

Detect the UPDATE statement without row limiting conditions.

Description

The table update operation without specifying conditions is infrequent (basically, it is used when adding new columns). Therefore, the UPDATE statement, that does not include conditions or JOIN clauses, may potentially damage data in a given table. To prevent the damage, such cases should be tracked.

Code Example

DECLARE @temp TABLE(id INT)

UPDATE @temp -- does not apply to table variables
SET id = 0

IF EXISTS(
SELECT 1
FROM tempdb.dbo.sysobjects
WHERE id = OBJECT_ID('tempdb.dbo.#DBObj')
) DROP TABLE #DBObj

CREATE TABLE #DBObj (id INT)

UPDATE #DBObj -- does not apply to temporary tables
SET id = 1

UPDATE Labour.WorkOut
SET IsMainWorkPlace = 0
WHERE WorkOutID = 123543 -- condition is specified

UPDATE wo
SET wo.AbsenceCode = NULL
FROM Labour.WorkOut wo
JOIN Labour.WorkPlace wp ON wo.WorkPlaceUID = wp.WorkPlaceUID
WHERE wp.PaymentType = 'TP' -- condition + connection are specified

UPDATE wo
SET wo.AbsenceCode = NULL
FROM Labour.WorkOut wo
JOIN Labour.Team t ON wo.TeamUID = t.TeamUID -- connection is specified

-- the similar cases should be tracked
UPDATE Labour.Absence
SET AbsenceCode = NULL

See Also

Best Practice Rules

BP011: Best Practice Rule


BP011: Best Practice Rule

BP011: It is recommended to enclose a routing procedure body in the BEGIN...END block

This topic describes the BP011 best practice rule.

Message

It is recommended to enclose a routing procedure body in the BEGIN...END block.

Description

When creating a stored procedure, it is allowed not to set the BEGIN...END block, that serves to specify the procedure body. It is recommenced to enclose the procedure body explicitly.

Code Example

CREATE PROCEDURE dbo.test
@x INT
AS
PRINT 'test#1 = ' + CONVERT(VARCHAR(8), @x)

SELECT @x

The aforesaid code should be rewritten in the following way:

CREATE PROCEDURE dbo.test
@x INT
AS
BEGIN

PRINT 'test#1 = ' + CONVERT(VARCHAR(8), @x)

SELECT @x
END

See Also

Best Practice Rules

BP012: Best Practice Rule


BP012: Best Practice Rule

BP012: It is not recommended to start a user stored procedure with 'sp_' prefix as it is used in built-in stored procedures

This topic describes the BP012 best practice rule.

Message

It is not recommended to start a user stored procedure with 'sp_' prefix as it is used in built-in stored procedures.

Description

In SQL Server, the sp_ prefix designates built-in stored procedures. Therefore, it is not recommended to set such prefix when creating user stored procedures.

Every time when SQL Server stumbles upon a procedure with the explicitly defined schema and with the name, that starts from "sp_", it firstly tries to find the procedure in the list of system functions, and then in another coincidence circuits. Therefore, the execution of user stored procedures with the "sp_" prefix may lead to a significant performance loss. In certain cases, adherence to the rule may improve performance.

Code Example

In the first example, the procedure name will cause the warning to be issued. In the second example, the procedure uses a usp_ prefix instead of sp_ and avoids the warning.

CREATE PROCEDURE [dbo].[sp_procWithWarning]
(
@Value1 INT,
)
AS
BEGIN
-- Additional statements here
RETURN 0;
END

CREATE PROCEDURE [dbo].[usp_procFixed]
(
@Value1 INT,
)
AS
BEGIN
-- Additional statements here
RETURN 0;
END

See Also

Best Practice Rules

BP013: Best Practice Rule


BP013: Best Practice Rule

BP013: It is not recommended to use fn_prefix when naming functions

This topic describes the BP013 best practice rule.

Message

It is not recommended to use fn_prefix when naming functions.

Description

Since all system functions have the fn_prefix, it is not recommended to use the prefix when creating user functions.

Code Example

CREATE FUNCTION dbo.fn_myfunction
( @value AS int )
RETURNS int
WITH EXECUTE AS CALLER
AS
BEGIN
SET @value=@value + 1
END;

See Also

Best Practice Rules

Performance Rules


Performance Rules

This section describes performance rules.

In This Section

PF001: Performance Rule
This topic describes the PF001 performance rule.

PF002: Performance Rule
This topic describes the PF002 performance rule.

PF003: Performance Rule
This topic describes the PF003 performance rule.

PF004: Performance Rule
This topic describes the PF004 performance rule.

PF005: Performance Rule
This topic describes the PF005 performance rule.

PF006: Performance Rule
This topic describes the PF006 performance rule.

PF007: Performance Rule
This topic describes the PF007 performance rule.

PF008: Performance Rule
This topic describes the PF008 performance rule.

PF009: Performance Rule
This topic describes the PF009 performance rule.

PF010: Performance Rule
This topic describes the PF010 performance rule.

PF011: Performance Rule
This topic describes the PF011 performance rule.

PF012: Performance Rule
This topic describes the PF012 performance rule.


PF001: Performance Rule

PF001: It's recommended not to use the NOT IN predicate in the WHERE clause

This topic describes the PF001 performance rule.

Message

It's recommended not to use the NOT IN predicate in the WHERE clause.

Description

The use of the NOT IN predicate in the WHERE clause may badly affect performance, since the query optimizer has to use a TABLE SCAN instead of an INDEX SEEK, even if the filtering columns are covered by index.

Therefore, it is recommended to to replace NOT IN with the alternative predicates ([NOT] EXISTS, IN, LEFT JOIN and NULL check), that in most cases operate faster.

Code Example

SELECT c.BusinessEntityID
FROM Person.BusinessEntityContact c
JOIN HumanResources.Employee e ON e.BusinessEntityID = c.BusinessEntityID
WHERE e.BusinessEntityID NOT IN (
SELECT sp.BusinessEntityID
FROM Sales.SalesPerson sp
WHERE sp.SalesQuota > 250000
)

In regard to the rule. the aforesaid query should be rewritten in the following way:

SELECT c.BusinessEntityID
FROM Person.BusinessEntityContact c
JOIN HumanResources.Employee e ON e.BusinessEntityID = c.BusinessEntityID
WHERE e.BusinessEntityID IN (
SELECT sp.BusinessEntityID
FROM Sales.SalesPerson sp
WHERE sp.SalesQuota <= 250000
)

Note

If a table contains a small quantity of rows, (<10.000), NOT IN does not affect performance.

See Also

Performance Rules

PF002: Performance Rule


PF002: Performance Rule

PF002: Consider using the [NOT] EXISTS predicate instead of [NOT] IN predicate

This topic describes the PF002 performance rule.

Message

Consider using the [NOT] EXISTS predicate instead of [NOT] IN predicate.

Description

It is recommended to replace the [NOT] IN predicate, containing sub-queries declared in the WHERE block, with the [NOT] EXISTS predicate, that is considered to be more efficient.

The main benefit of the [NOT] EXISTS predicate is that it stops when the value is found, instead of performing exhaustive search of the value.

Code Example

SELECT *
FROM Labour.ScheduleDetail sd
WHERE sd.DateOut /*NOT*/ IN (
SELECT wo.DateOut
FROM Labour.WorkOut wo
)

In regard to the rule, the aforesaid query can be rewritten in the following way:

SELECT *
FROM Labour.ScheduleDetail sd
WHERE /*NOT*/ EXISTS(
SELECT 1
FROM Labour.WorkOut wo
WHERE wo.DateOut = sd.DateOut
)

See Also

Performance Rules

PF003: Performance Rule


PF003: Performance Rule

PF003: It is not recommended to use join hints

This topic describes the PF003 performance rule.

Message

It is not recommended to use join hints.

Description

The usage of hints in join operations in not recommended in most cases, and is considered to be used only as a last resort by experienced developers and database administrators.

Code Example

SELECT o.name
FROM sys.objects o
INNER HASH JOIN sys.tables t ON o.[object_id] = t.[object_id]

In regard to the rule, the aforesaid query should be rewritten in the following way:

SELECT o.name
FROM sys.objects o
JOIN sys.tables t ON o.[object_id] = t.[object_id]

See Also

Performance Rules

PF004: Performance Rule


PF004: Performance Rule

PF004: PRINT statement is used in a trigger

This topic describes the PF004 performance rule.

Message

PRINT statement is used in a trigger.

Description

The use of the PRINT statement in a trigger leads to performance loss. Since applications, that modify tables or views with triggers do not always expect results, that will be returned within the modification operation, it is considered a good coding practice, when the trigger body does not return any results.

Note

The rule applies only to table triggers, view triggers and database triggers.

Code Example

ALTER TRIGGER [Labour].[trg_WorkOut]

ON [Labour].[WorkOut]
AFTER INSERT, UPDATE

AS BEGIN
SET NOCOUNT ON;
DECLARE @WorkOut TABLE
(
DateOut DATETIME
)

IF EXISTS(
SELECT 1
FROM @WorkOut wo
JOIN Labour.Holiday h ON wo.DateOut = h.[Date]
) BEGIN

PRINT 'Holiday is exists'
END
END

See Also

Performance Rules

PF005: Performance Rule


PF005: Performance Rule

PF005: Interleaving Data Definition Language (DDL) and Data Manupulation Language (DML) operations may cause recompilation

This topic describes the PF005 performance rule.

Message

Interleaving Data Definition Language (DDL) and Data Manupulation Language (DML) operations may cause recompilation.

Description

The usage of DDL and DML operations in stored procedures or triggers may lead to recompilation. In result, Query Optimizer won't be able to take the last successful plan from cache. Also, during the call of multiple procedures and triggers , it may result in performance decline.

It is recommended to put all DDL calls first and then put all DMLs. The break of this order is considered to be the error, that may cause recompilation.

Code Example

drop procedure dbo.test
go
create procedure dbo.test as
-- DDL
create table t1 (a int)
-- DML
select * from t1
-- DDL
create index idx_t1 on t1(a)
-- DML
select * from t1
-- DDL
create table t2 (a int)
-- DML
select * from t2
go
exec dbo.test

See Also

Performance Rules

PF006: Performance Rule


PF006: Performance Rule

PF006: SELECT statement is used in a trigger

This topic describes the PF006 performance rule.

Message

SELECT statement is used in a trigger.

Description

Returning data via the SELECT statement in a trigger may reduce performance.

If a trigger is debugged already, usage of the SELECT statement is considered to be a bad practice.

Notes
1. The rule applies only to table, view and database triggers.
2. The rule does not apply if:
· SELECT is used for value assignment.
· LINQ or EntityFramework are used.

Code Example

ALTER TRIGGER [LabourAPI].[trg_IOIU_Employee]

ON [LabourAPI].[Employee]
INSTEAD OF INSERT, UPDATE

AS BEGIN

SET NOCOUNT ON;
SET XACT_ABORT ON;

SELECT 1; -- error

DECLARE @ID INT

-- exception from the rule, as here data is not returned physically - SELECT is used for value assignment.
SELECT @ID = wo.WorkOutID
FROM LabourAPI.WorkOut wo
WHERE wo.WorkHours IS NULL

DECLARE
@EmployeeID INT
, @PersonID INT
, @TabelNumber VARCHAR(6)
, @DepartmentUID UNIQUEIDENTIFIER
, @PositionID INT
, @DateIn DATETIME
, @DateOut DATETIME
, @IsMainWorkPlace BIT
, @DatePension DATETIME
, @IsLabourUnionMember BIT
, @FiringReasonID INT

DECLARE employee CURSOR LOCAL READ_ONLY FAST_FORWARD FOR
SELECT
EmployeeID
, PersonID
, TabelNumber
, DepartmentUID
, PositionID
, DateIn
, DateOut
, IsMainWorkPlace
, DatePension
, IsLabourUnionMember
, FiringReasonID
FROM INSERTED

OPEN employee

FETCH NEXT FROM employee INTO
@EmployeeID
, @PersonID
, @TabelNumber
, @DepartmentUID
, @PositionID
, @DateIn
, @DateOut
, @IsMainWorkPlace
, @DatePension
, @IsLabourUnionMember
, @FiringReasonID

WHILE @@FETCH_STATUS = 0
BEGIN

IF EXISTS(
SELECT 1
FROM Labour.Employee
WHERE EmployeeID = @EmployeeID
)
BEGIN

UPDATE Labour.Employee
SET
PersonID = @PersonID
, TabelNumber = @TabelNumber
, DepartmentUID = @DepartmentUID
, PositionID = @PositionID
, DateIn = @DateIn
, DateOut = @DateOut
, IsMainWorkPlace = @IsMainWorkPlace
, DatePension = @DatePension
, IsLabourUnionMember = @IsLabourUnionMember
, FiringReasonID = @FiringReasonID
WHERE EmployeeID = @EmployeeID

END
ELSE BEGIN

INSERT INTO Labour.Employee
(
PersonID
, TabelNumber
, DepartmentUID
, PositionID
, DateIn
, DateOut
, IsMainWorkPlace
, DatePension
, IsLabourUnionMember
, FiringReasonID
)
SELECT
@PersonID
, @TabelNumber|
, @DepartmentUID
, @PositionID
, @DateIn
, @DateOut
, @IsMainWorkPlace
, @DatePension
, @IsLabourUnionMember
, @FiringReasonID

-- exception from the rule: if user uses LINQ or LINQ или EntityFramework
SELECT SCOPE_IDENTITY()

-- exception from the rule: if user uses LINQ or LINQ или EntityFramework
SELECT @@IDENTITY
END

-- error
SELECT @EmployeeID, @PersonID, @TabelNumber

FETCH NEXT FROM employee INTO
@EmployeeID
, @PersonID
, @TabelNumber
, @DepartmentUID
, @PositionID
, @DateIn
, @DateOut
, @IsMainWorkPlace
, @DatePension
, @IsLabourUnionMember
, @FiringReasonID
END

CLOSE employee
DEALLOCATE employee
END

See Also

Performance Rules

PF007: Performance Rule


PF007: Performance Rule

PF007: Possible to use the TRUNCATE statement to delete without row limiting conditions

This topic describes the PF007 performance rule.

Message

Possible to use the TRUNCATE statement to delete without row limiting conditions.

Description

Table data deletion via the DELETE statement without specifying any additional conditions can be significantly improved with the TRUNCATE statement. The DELETE statement removes rows one at a time and records an entry in the transaction log for each deleted row.

The TRUNCATE statement is executed faster, uses fewer system resources and does not record each row deletion in the transaction log.

Note

The rule is not applicable:

· If a table is connected with a trigger.
· If a table is referenced by a foreign key, even if it is disabled.
· If the WHERE block contains conditions, or the connection is performed within the DELETE statement.
· To table variables.
· To views.

Code Example

The following examples show the DELETE and TRUNCATE statements usage correspondingly.

DELETE FROM Labour.WorkQuota

TRUNCATE TABLE Labour.WorkQuota

See Also

Performance Rules

PF008: Performance Rule


PF008: Performance Rule

PF008: No SET NOCOUNT ON before DML in stored procedures and triggers

This topic describes the PF008 performance rule.

Message

No SET NOCOUNT ON before DML in stored procedures and triggers.

Description

If DML statements (SELECT, INSERT, UPDATE etc.) are used in a trigger or a stored procedure, and if SET NOCOUNT ON is not explicitly set up, SET NOCOUNT OFF is inserted by default, what, in its turn, reduces the query performance.

SET NOCOUNT ON prevents the sending of DONE_IN_PROC messages to the client for each statement in a stored procedure. For stored procedures that contain several statements that do not return much actual data, or for procedures that contain Transact-SQL loops, setting SET NOCOUNT to ON can provide a significant performance boost, because network traffic is greatly reduced.

Therefore, it is recommended to always check, whether SET NOCOUNT ON is set up explicitly.

Code Example

CREATE PROCEDURE dbo.usp_test AS
BEGIN

-- SET NOCOUNT ON;

SELECT 1;

END

See Also

Performance Rules

PF009: Performance Rule


PF009: Performance Rule

PF009: SET NOCOCUNT OFF option is used

This topic describes the PF009 performance rule.

Message

SET NOCOCUNT OFF option is used.

Description

SET NOCOUNT ON prevents the sending of DONE_IN_PROC messages to the client for each statement in a stored procedure. For stored procedures that contain several statements that do not return much actual data, or for procedures that contain Transact-SQL loops, setting SET NOCOUNT to ON can provide a significant performance boost, because network traffic is greatly reduced.

In stored procedures and triggers, the SET NOCOCUNT OFF option should be used carefully. When the option is used at the beginning of a stored procedure or a trigger, it may result in potential error. Therefore, It is not recommended to keep the option turned on permanently. Instead, turn it on to get the @@ROWCOUNT value and then turn it off.

Note

The rule applies only to stored procedures and triggers.

Code Example

CREATE PROCEDURE spFoobar
AS
BEGIN
DECLARE @count INT;
SET NOCOUNT OFF
SELECT *
FROM sysobjects
RETURN 0
SELECT @count = @@ROWCOUNT
SET NOCOUNT ON
END

See Also

Performance Rules

PF010: Performance Rule


PF010: Performance Rule

PF010: INDEX HINT is used

This topic describes the PF010 peformance rule.

Message

INDEX HINT is used.

Description

To increase productivity, there is a possibility to hint a certain index to optimizer.

The incorrect hints usage may lead to a significant performance loss.

Code Example

SELECT *
FROM Labour.WorkShift ws
JOIN Labour.WorkOut wo WITH (INDEX) ON ws.WorkShiftCD = wo.WorkShiftCD

It is not recommend to use hints. Therefore, it is preferable to exclude hints from queries.

SELECT *
FROM Labour.WorkShift ws
JOIN Labour.WorkOut wo ON ws.WorkShiftCD = wo.WorkShiftCD

See Also

Performance Rules

PF011: Performance Rule


PF011: Performance Rule

PF011: TABLE HINT is used

This topic describes the PF011 peformance rule.

Message

TABLE HINT is used.

Description

Table hints override the default behavior of the query optimizer for the duration of the data manipulation language (DML) statement by specifying a locking method, one or more indexes, a query-processing operation such as a table scan or index seek, or other options. Table hints are specified in the FROM clause of the DML statement and affect only the table or view referenced in that clause.

The incorrect hints usage may lead to a significant performance loss. Therefore, tt is recommended to use table hints as a last resort for experienced developers and database administrators.

Code Example

SELECT
t.[object_id]
, table_name = t.name
, [schema_name] = s.name
FROM sys.tables t WITH (NOLOCK)
JOIN sys.schemas s WITH (NOLOCK) ON t.[schema_id] = s.[schema_id]

The aforesaid code example without hints usage looks in the following way:

SELECT
t.[object_id]
, table_name = t.name
, [schema_name] = s.name
FROM sys.tables t
JOIN sys.schemas s ON t.[schema_id] = s.[schema_id]

See Also

Performance Rules

PF012: Performance Rule


PF012: Performance Rule

PF012: QUERY HINT is used

This topic describes the BP012 performance rule.

Message

QUERY HINT is used.

Description

Query hints are specified as part of the OPTION clause and affect all operators in the statement and hint (in some cases, impose) the optimizer how to use the plan, how to execute the query etc.

The incorrect hints usage may lead to a significant performance loss. Therefore, it is recommended to use query hints as a last resort for experienced developers and database administrators.

Code Example

SELECT ProductID, OrderQty, SUM AS Total
FROM Sales.SalesOrderDetail
WHERE UnitPrice < $5.00
GROUP BY ProductID, OrderQty
ORDER BY ProductID, OrderQty
OPTION (HASH GROUP, FAST 10);

See Also

Performance Rules

Code Analysis Rules


Deprecated Rules

This section describes deprecated rules.

In This Section

DP001: Deprecated Rule
This topic describes the DP001 deprecated rule.

DP002: Deprecated Rule
This topic describes the DP002 deprecated rule.

DP003: Deprecated Rule
This topic describes the DP003 deprecated rule.

DP004: Deprecated Rule
This topic describes the DP004 deprecated rule.

DP005: Deprecated Rule
This topic describes the DP005 deprecated rule.

DP006: Deprecated Rule
This topic describes the DP006 deprecated rule.

DP007: Deprecated Rule
This topic describes the DP007 deprecated rule.

DP008: Deprecated Rule
This topic describes the DP008 deprecated rule.


DP001: Deprecated Rule

DP001: FASTFIRSTROW table hint is deprecated

This topic describes the DP001 deprecated rule.

Message

FASTFIRSTROW table hint is deprecated.

Description

As from SQL Server 2012, FASTFIRSTROW table hint is considered to be deperecated. It is recommended to use [FAST n] instead.

Code Example

SELECT TOP 1 *
FROM Labour.WorkOut WITH (FASTFIRSTROW)

In regard to the rule, the aforesaid query should be rewritten in the following way:

SELECT TOP 1 *
FROM Labour.WorkOut
OPTION (FAST 1)

See Also

Deprecated Rules

DP002: Deprecated Rule


DP002: Deprecated Rule

DP002: DROP INDEX with two-part name is deprecated

This topic describes the DP002 deprecated rule.

Message

DROP INDEX with two-part name is deprecated.

Description

The DROP INDEX syntax with table_name.index_name is considered to be deprecated. It is recommended to replace it with index_name ON table_name syntax.

Code Example

DROP INDEX Labour.WorkOut.IX_WorkOut_AbsenceCode

In regard to the rule, the aforesaid query should be rewritten in the following way:

DROP INDEX IX_WorkOut_AbsenceCode ON Labour.WorkOut

See Also

Deprecated Rules

DP003: Deprecated Rule


DP003: Deprecated Rule

DP003: GROPUP BY ALL clause is deprecated

This topic describes the DP003 deprecated rule.

Message

GROPUP BY ALL clause is deprecated.

Description

The GROPUP BY ALL clause includes all groups and result sets, even those that do not have any rows that meet the search condition specified in the WHERE clause. When the ALL predicate is specified, null values for the summary columns of groups are returned, that do not meet the search condition.

The given clause is considered to be deprecated.

Code Example

SELECT wo.DateOut, COUNT(DISTINCT wo.EmployeeID)
FROM Labour.WorkOut wo
WHERE YEAR(wo.TimeSheetDate) = 2012
GROUP BY ALL wo.DateOut

The aforesaid query should be rewritten in the following way:

SELECT wo.DateOut, COUNT(DISTINCT CASE WHEN YEAR(wo.TimeSheetDate) = 2012 THEN wo.EmployeeID END)
FROM Labour.WorkOut wo
GROUP BY wo.DateOut

See Also

Deprecated Rules

DP004: Deprecated Rule


DP004: Deprecated Rule

DP004: COMPUTE and COMPUTE BY clauses are deprecated

This topic describes the DP004 deprecated rule.

Message

COMPUTE and COMPUTE BY clauses are deprecated.

Description

As from SQL Server 2012, COMPUTE and COMPUTE BY clauses are considered to be deprecated and are not supported.

It is recommended to use ROLLUP instead.

Code Example

SELECT e.EmployeeID
FROM b_LSD.Employee e
COMPUTE COUNT(e.EmployeeID)

In regard to the rule, the aforesaid query should be rewritten in the following way:

SELECT
CASE WHEN (GROUPING(e.EmployeeID) = 1)
THEN 0
ELSE e.EmployeeID
END
, COUNT(e.EmployeeID)
FROM Labour.Employee e
GROUP BY e.EmployeeID WITH ROLLUP

See Also

Deprecated Rules

DP005 Deprecated Rule


DP005: Deprecated Rule

DP005: Old-style TOP clause is used

This topic describes the DP005 deprecated rule.

Message

Old-style TOP clause is used.

Description

For backward compatibility, the parentheses for TOP clause are optional. However, it is recommended to always use parentheses for TOP in SELECT statements for consistency with its required use in INSERT, UPDATE, MERGE, and DELETE statements in which the parentheses are required.

Code Example

SELECT TOP 1 t.name
FROM sys.tables t
ORDER BY t.name

In regard to the rule, the query should be rewritten in the following way:

SELECT TOP (1) t.name
FROM sys.tables t
ORDER BY t.name

See Also

Deprecated Rules

DP006: Deprecated Rule


DP006: Deprecated Rule

DP006: Table hints without WITH keywords are deprecated

This topic describes the DP006 deprecated rule.

Message

Table hints without WITH keywords are deprecated.

Description

As from SQL Server 2008, omitting the WITH keyword is considered to be deprecated. Therefore, it is recommended to always specify WITH for table hints.

Code Example

SELECT
t.[object_id]
, table_name = t.name
, [schema_name] = s.name
FROM sys.tables t (NOLOCK)
JOIN sys.schemas s (NOLOCK) ON t.[schema_id] = s.[schema_id]

In regard to the rule, the aforesaid query will look in the following way:

SELECT
t.[object_id]
, table_name = t.name
, [schema_name] = s.name
FROM sys.tables t WITH (NOLOCK)
JOIN sys.schemas s WITH (NOLOCK) ON t.[schema_id] = s.[schema_id]

See Also

Deprecated Rules

DP007: Deprecated Rule


DP007: Deprecated Rule

DP007: Numbered procedures are deprecated

This topic describes the DP007 deprecated rule.

Message

Numbered procedures are deprecated.

Description

There is possibility to create numbered stored procedures. However, numbered procedures are considered to be deprecated. Therefore, it is not recommended to use numbered procedures.

Note

Applies to: SQL Server 2008 through SQL Server 2014.

Code Example

CREATE PROCEDURE dbo.test;1
@x INT
AS
BEGIN
PRINT 'test#1 = ' + CONVERT(VARCHAR(8), @x)
END

GO

CREATE PROCEDURE dbo.test;2
@x CHAR
AS
BEGIN
PRINT 'test#2 = ' + @x
END

See Also

Deprecated Rules

DP008: Deprecated Rule


DP008: Deprecated Rule

DP008 Deprecated Rule: Don't use deprecated TEXT, NTEXT and IMAGE data types

This topic describes the DP008 deprecated rule.

Message

Don't use deprecated TEXT, NTEXT and IMAGE data types.

Description

As from SQL Server 2014, TEXT, NTEXT and IMAGE data types are considered to be deprecated.

Avoid using these data types in new development work, and plan to modify applications that currently use them. Use nvarchar(max), varchar(max), and varbinary(max) instead.

Code Example

SELECT CAST(t.name AS NTEXT)
FROM sys.types t

CREATE TABLE [dbo].[Person]
(
FirstName NVARCHAR(25) NOT NULL
, LastName NVARCHAR(25) NOT NULL
, Picture IMAGE NULL
, [Description] TEXT NULL
, UnicodeDescription NTEXT NULL
)

In regard to the rule, the aforesaid query should be rewritten in the following way:

SELECT CAST(t.name AS NVARCHAR(MAX))
FROM sys.types t

CREATE TABLE [dbo].[Person]
(
FirstName NVARCHAR(25) NOT NULL
, LastName NVARCHAR(25) NOT NULL
, Picture VARCHAR(MAX) NULL
, [Description] VARCHAR(MAX) NULL
, UnicodeDescription NVARCHAR(MAX) NULL\
)

See Also

Deprecated Rules

Code Analysis Rules


Generate Scripts Options

This section describes DDL generation options.

In This Section

General, Generate Scripts, Options Dialog Box
Describes general options for DDL generation.

Scripts Folder Structure, Generate Scripts, Options Dialog Box
Describes options to configure mapping of the scripts folder and the file name templates.

See Also

Options

Query Execution Options


General, Generate Scripts, 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 Scripts node.

Settings

Generate Scripts

Find
Use the search filter to find the required option. To substitute the characters, use the "_" symbol.

Common

Check for object existence
Check whether the object already exists on the server.

Generate comments in the script
Select to insert comments in the script.

Script authorization
Includes script authorization clauses.

Script collation
Includes collation information in the script.

Script default constraints
Includes default constraints and schema defaults.

Script extended properties
If checked, extended properties for database objects are added to the script.

Script logins
Includes all logins available on the server. Passwords will not be included.

Script security permissions
Includes security permissions.

Script statistics
Includes statistics.

Script USE DATABASE
Generates the USE DATABASE statement.

Specify object name with its schema
Prefixes object names with object schema.

Tables/Views

Script change tracking
Includes CHANGE_TRACKING clauses and statements when comparing and synchronizing databases.

Script check constraints
Includes CHECK constraints in the script.

Script DATA_COMPRESSION for indexes, primary and unique constraints
When selected, the DATA_COMPRESSION clause is included for indexes, primary and unique key constraints.

Script DML triggers
Includes the CREATE statement for triggers in the tables.

Script foreign keys
Includes the CREATE statement for foreign keys in the tables.

Script full-text search
Includes full-text stop lists, catalogs, and indexes.

Script indexes
Includes the CREATE statement for indexes in the tables.

Script primary keys
Includes the CREATE statement for primary keys in the tables.

Script unique keys
Includes the CREATE statement for unique keys in the tables.

See Also

Generate Script Wizard

Options


Scripts Folder Structure, Generate Scripts, Options Dialog Box

The dialog box allows you to set the structure of the scripts folder and the file name templates. This mapping configuration will be used by schema comparison and source control by default.

Type
Shows the database object type.

Subfolder name
Shows the subfolder name.

Name
Shows the file name template for the object.

Extension
Shows the file extension.

Generate Scripts Options

Options


Query Execution Options

The Query Execution options in the Options dialog box provide a variety of ways to customize the performance of query execution.

In This Section

General, Query Execution, Options Dialog Box
Use the Options window to adjust the query execution to your needs.

See Also

Options

Data Comparison Options


General, Query Execution, Options Dialog Box

Use the Options window to adjust the query exectution behavior to your needs. To access this dialog box, select Options from the Tools menu and choosing the General page from the Query Execution folder.

The Query Execution General section of the Options window contains the following options:

General

ROWCOUNT
Causes SQL Server to stop processing the qurey after the specified number of rows are returned.

TEXTSIZE
Specifies the size of varchar (max), varbinary (max), text, ntext and image data returned by a SELECT statement.

Advanced

ARITHABORT
Select it to terminate a query when an overflow or divide-zero error occurs during query execution.

CONTACT_NULL_YIELDS_NULL
Controls whether concatenation results are treated as null or as empty string values.

DEADLOCK_PRIORITY
Specifies the relative importance that the current session continue processing if it is deadlocked with another session.

LOCK_TIMEOUT
Specifies the number of milliseconds a statement waits for a lock to be released. A value of -1 (default) indicates no time-out period (that is, wait forever). When a wait for a lock exceeds the time-out value, an error is returned. A value of 0 means to not wait at all and return a message as soon, as a lock is encountered.

NOCOUNT
Stops the message that shows the count of the number of rows affected by a Transact-SQL statement or stored procedure form being returned as a part of the result set.

NOEXEC
Complies each query, but does not execute it.

PARSEONLY
Examines the syntax of each Transact-SQL statement and returnes any error messages without compiling or executing the statement.

QUERY_GOVERNOR_COST_LIMIT
Overrides the currently configured query governor cost limit value for the current connection. Specifying 0 (the default) for this option turns off the query governor, and all queries are allowed to run indefinitely. The query governor disallows exectution of any query that has an estimated cost exceeding that value.

SHOWPLAN_TEXT
Causes Microsoft SQL Server not to execute Transact-SQL statements. Instead, SQL Server returns detailed information about how the statements are executed.

STATISTICS IO
Causes SQL Server to display information regarding the amount of disk activity generated by Transact-SQL statements.

STATISTICS TIME
Displays the number of milliseconds required to parse, compile and execute each statement.

TRANSACTION ISOLATION LEVEL
Controls the locking and row versioning behavior of Transact-SQL statements issued by a connection to SQL Server.

ANSI

ANSI_NULL_DFLT_ON
Modifies the behavior of the session to override default nullability of new columns when the ANSI null default option for the database is false.

ANSI_NULLS
Specifies ISO compliant behavior of the Equals (=) and Not Equal To (<>) comparison operators when they are used with null values in SQL Server.

ANSI_PADDING
Controls the way the column stores values shorter, than the defined size of the column, and the way the column stores values that have trailing blanks in char, varchar, binary and varbinary data.

ANSI_WARNINGS
Specifies ISO standard behavior for several error conditions.

CURSOR_CLOSE_ON_COMMIT
Controls the behavior of the Tranasact-SQL COMMIT TRANSACTION statement. The default value for this settign is OFF. This means that the sevrver will not close cursors when you commit a transaction.

IMPLICIT_TRANSACTIONS
Sets implicit transaction mode for the connection.

QUOTED IDENTIFIER
Causes SQL Server to follow the ISO rules regarding the quotation mark delimiting identifiers and literal strings. Identifiers delimited by double quotation marks can be either Transact-SQL reserved keywords or can contain characters not generally allowed by the Transact-SQL syntax rules for identifiers.

Other

Reset to Default
Click to reset options on this page to their default values.

See Also

Query Execution Options

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.

Synchronization, Data Comparison, Options Dialog Box
Choose the editor where to open the synchronization script in here.

See Also

Options

Data Editor 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

Options


Synchronization, Data Comparison, Options Dialog Box

Choose the editor where to open the synchronization script in.

SQL Editor

Internal
Synchronization script will be opened in the internal dbForge Studio for SQL Server editor.

Microsoft SQL Server Management Studio 2005
Synchronization script will be opened in the Microsoft SQL Server Management Studio 2005 editor.

Microsoft SQL Server Management Studio 2008
Synchronization script will be opened in the Microsoft SQL Server Management Studio 2008 editor.

Microsoft SQL Server Management Studio 2012
Synchronization script will be opened in the Microsoft SQL Server Management Studio 2012 editor.

Microsoft SQL Server Management Studio 2014
Synchronization script will be opened in the Microsoft SQL Server Management Studio 2014 editor.

Microsoft SQL Server Management Studio 2016
Synchronization script will be opened in the Microsoft SQL Server Management Studio 2016 editor.

See Also

Data Comparison Options

General, Data Comparison, Options Dialog Box


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 Data Editor window to adjust the data editing behavior to your needs.

See Also

Options

Data Generation 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 item
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 to apply the style settings for all even rows.

Enable style for odd rows
Check to apply the style settings for all odd rows.

Sample
Preview the display item appearance here.

Reset Page Defaults
Resets all the options on this page to their default values.

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.

Paper size
Select the required paper size from the drop-down list box.

Orientation
Select the page orientation for printing.

Portrait
Select to print data in a portrait (vertical) orientation.

Landscape
Select to print data in a landscape (horizontal) orientation.

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 required data type from the drop-down list box. The following data types are available: Date, DataTime, Floating-Point Numbers.

Edit format
Set the data format here, if required. 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 descriptions.

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 select one of the predefined data formats here. The following table contains their descriptions and samples.

Standard Mask | Name | Sample. Culture: English (USA)
For Date and DateTime
d | Short date | 8/20/2007
D | Long date | Monday, August 20, 2007
M or m | Month day | August 20
Y or y | Year month | August, 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
dd/MM/yyyy HH:mm:ss.ffffff | General date/time (long time with microsecods) | 16/05/2016 00:00:00.000000
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
For Floating-Point Numbers
G | General | 0,36
R | Maximal Precision (digits over standard precision may be inaccurate) | 0,3599999999999999

Test Input
The last date of test input is displayed in accordance with the format.

See Also

Data Editor

Options


Data Generation Options

This section describes data generation options.

In This Section

General, Data Generation Options
Describes general options for data generation.

See Also

Options

Database Diagram Options


General, Data Generation Options

Use the General tab of the Data Generation Options dialog box to the data generation behavior. To access this dialog box, select Options from the Tools menu and choosing the General page from the Data Generation folder.

The Data Generation General section of the 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

Options

Database Diagram Options


Database Diagram Options

This section describes options that help to 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, open the Options dialog box by clicking Options from the Tools menu. Then go to the Database Diagram node. To set options for the current diagram, right-click the diagram and click 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

Options

Database Explorer 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/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:

Default Document Settings

Skin

Skin Type
Choose the diagram skin type.

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:

Page Settings

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:

Print Settings

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


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

Options

Debugging 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.

Default action

Table and View

Customize dbForge Studio default behavior when double-clicking on table or view node in Database Explorer.

Retrieve data
Opens document with data of the table or view.

Open object editor
Opens object editor for the table or view.

Procedure and Function

Customize dbForge Studio default behavior when double-clicking on procedure or function node in Database Explorer.

Execute
Executes the procedure or function.

Open object editor
Opens object editor for the procedure or function.

See Also

Database Explorer 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

Options

Index Manager 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.

Settings

Edit and Continue

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


Index Manager Options

In This Section

General, Index Manager Dialog Box
Describes the tab, where you can customize Index Manager behavior.

See Also

Options

Master-Detail Options


General, Index Manager 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 Index Manager node.

Settings

Index Fragmentation

Reorganize threshold: ...% Fragmentation
Set the the fragmentation threshold for reorganizing indexes. Value range for the option is from 0 to 99.

Rebuild threshold: ...% Fragmentation
Set the the fragmentation threshold for rebuilding indexes. Value range for the option is from 1 to 100.

Minimum index size: ... Pages
Set the minimum index size value. The value range for the option is from 0 to 99999.

Index Rebuild

Sort in tempdb
Select to rebuild indexes in tempdb. This option is selected by default.

Online
Select to rebuild indexes online.

See Also

Index Manager 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

Options

Query Builder 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:

Page Settings

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.

Print Settings

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

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

Options

Query Profiler 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.

Settings

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


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.

Page, Query Profiler, Options Dialog Box
Describes the Query Profiler page settings.

Print, Query Profiler, Options Dialog Box
Describes the Query Profiler print settings.

See Also

Options

Schema Comparison 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 SqlProfiler node.

Settings

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.

Show information panel
If selected, an information panel appears underneath of the Query Profiler window.

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.

See Also

Query Profiler Options

Page, Query Profiler Options Dialog Box


Page, Query Profiler, Options Dialog Box

Use the Options window to adjust Query Profiler behavior to your needs. To open it, select Options from the Tools menu. Then go to the SqlProfiler node. The Page section allows you to customize page settings for printing.

Page Settings

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.

See Also

Query Profiler Options

Print, Query Profiler Options Dialog Box


Print, Query Profiler, Options Dialog Box

Use the Options window to adjust Query Profiler behavior to your needs. To open it, select Options from the Tools menu. In the Print section of the SqlProfiler node you can customize query profiling printing settings.

Print Settings

Scaling

Center Image
Select to center the image on the page.

Scale
Specify a 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 document width to.

Pages Down
Specify the number of pages to fit the document height to.

Print Elements

Print Grid
Select to print the diagram grid.

Page Markup Mode
Specify whether to print the markup which helps cut and glue together the document that is printed on 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 glue the query profiling document pages together.

Reset

Resets all options on this page to their default values.

See Also

Query Profiler 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.

Synchronization, Data Comparison, Options Dialog Box
Choose the editor where to open the synchronization script in here.

See Also

Options

Source Control 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


Synchronization, Schema Comparison, Options Dialog Box

Choose the editor where to open the synchronization script in.

SQL Editor

Internal
Synchronization script will be opened in the internal dbForge Studio for SQL Server editor.

Microsoft SQL Server Management Studio 2005
Synchronization script will be opened in the Microsoft SQL Server Management Studio 2005 editor.

Microsoft SQL Server Management Studio 2008
Synchronization script will be opened in the Microsoft SQL Server Management Studio 2008 editor.

Microsoft SQL Server Management Studio 2012
Synchronization script will be opened in the Microsoft SQL Server Management Studio 2012 editor.

Microsoft SQL Server Management Studio 2014
Synchronization script will be opened in the Microsoft SQL Server Management Studio 2014 editor.

See Also

Schema Comparison Options

Options


Source Control Options

This section describes source control options.

In This Section

General, Source Control, Options Dialog Box
Describes the tab where you can customize default source control options.

See Also

Options


General, Source Control, Options Dialog Box

Use this window to customize source control options to your needs

Default Source Control options

Include Dependencies
Select to show the list of dependent object in the dialog window while committing or updating the working copy (get latest). If the option is disabled, dependent objects will not be included to the Commit/Get Latest operation.

Source Folder
Shows path to the source folder. The folder contains a local copy of the latest revision from a version control. It gets updated every time the document is refreshed. Click "..." to modify path to the folder.

Temporary Folder
Shows path to the temporary folder. The folder stores document options and scripts. IN case of the Dedicated mode, this folder also contains a local copy of the database at the last time you ran the commit or the get latest operation. Click "..." to modify path to the folder.

See Also

Options

Source Control Options


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


Query Profiling

Use the Profiler document view to see the results of EXPLAIN command along with plan diagram, top operations, plan XML 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.

Plan Diagram

Shows the graphical representation of execution plan. The representation is read from right to left. Each query in the batch that is analyzed is displayed as well as the cost of each query as a percentage of the total cost of the batch. Hover the mouse over the needed node to get actual costs.

Plan Tree

Shows the EXPLAIN results returned by the executed query. Use the Plan Tree tab to obtain information about how Microsoft SQL Server 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.

Top Operations

Shows a simple list of all plan operations. By default they are ordered by highest estimated cost first.

Table I/O

Shows the input-output statistics for all tables involved in the execution plan.

Plan XML

Shows the execution plan in the XML format.

See Also

Reference


Server Event Profiler

This section provides reference information on UI elements related to Server Event Profiler.

In This Section

Server Event Profiler Document
Provides an information on how to manage traces and analyze and replay trace results.

Profile Server Events Wizard
Describes Profile Server Events Wizard.


Server Event Profiler Document

This topic describes a rich interface to create and manage traces and analyze and replay trace results. The events are saved in a trace file that can later be analyzed or used to replay a specific series of steps when trying to diagnose a problem.

Use Server Event Profiler to view captured event data in a trace. SQL Server Profiler displays data based on defined trace properties. Using Server Event Profiler, you can troubleshoot data by grouping traces or trace files. You might troubleshoot queries that perform poorly or that have exceptionally high numbers of logical read operations.

The following screen-shot demonstrates the Server Event Profiler document window.

The saved SQL Server Profiler document has the ".*ssp" extension.

Use SQL Server Profiler to monitor only the events in which you are interested. If traces are becoming too large, you can filter them based on the information you want, so that only a subset of the event data is collected. Monitoring too many events adds overhead to the server and the monitoring process, and can cause the trace file or trace table to grow very large, especially when the monitoring process takes place over a long period of time.

Server Event Profiler Document Shortcut Menu

Start Trace
Starts server events tracing

Stop Trace
Stops server events tracing

Extract Event SQL statement to

to new SQL Window
Extracts the event SQL statement to a new SQL window.

to clipboard
Extracts the event SQL statement to clipboard.

Select All
Selects all trace data

Copy
Copies the selected range of trace data.

Copy Cell
Copies the selected cell.

See Also

Profile Server Events Wizard


Profile Server Events Wizard

Use the wizard to create and manage traces. The events are saved in a trace file which you can analyze when trying to diagnose a problem.

In This Section

General, Profile Server Events Wizard
Select general options for profiling on this page.

Events To Capture, Profile Server Events Wizard
Specify the events you want to trace.

Actions, Profile Server Events Wizard
Specify the actions you want to capture in the current events session.

Event Filters, Profile Server Events Wizard
Specify comparison operators for the events in the trace.

Columns, Profile Server Events Wizard
Select the columns you want to capture in this events session.

See Also

SQL Server Profiler

SQL Server Profiler Document


General, Profile Server Events Wizard

Select general profiler options on this page.

Connection
Select a server connection. In the drop-down list you can click <Manage...> to open the Connection Manager dialog box. It will help you create, edit, and delete database connections.

Edit
Click the button to open the Database Connection Properties dialog box. Edit existing connection parameters.

New
Click the button to open the Database Connection Properties dialog box. Specify new connection parameters to create a new connection.

Server Version
The version of the database server used in the connection is specified.

Use template
Select the check-box to use the preset trace templates that allow to easily configure the event classes that you will most likely need for specific traces. Select the required template from the drop-down list box.

Stop trace at
Specify the date and time when you want the trace to be stopped.

Trace File Settings

Write trace to
Specify a file path to store trace file.

Session data storage settings

Maximum file size
Specify a maximum file size for the trace.

Enable file rollover
Is used when the maximum file size is reached. A new file is created for further saving the trace information.

Maximum number of files
Specify the maximum number of additional files for storing trace information.

See Also

Profile Server Events Wizard

Events, Profile Server Events Wizard


Events To Capture, Profile Server Events Wizard

Select the events you want to trace.

Show All
Select the check box to display all the events. Clear it to display only already selected ones.

Expand All
Click to see the expanded list of available events for the trace.

Collapse All
Click to see available traceable event classes.

Filter
Use the filter to quickly find a required event.

Events Table
The list of the events available for tracing. At least one event should be checked to execute the trace.

See Also

Profile Server Events Wizard

Actions, Profile Server Events Wizard


Actions, Profile Server Events Wizard

Select the actions you want to capture in the current events session.

Find Box
To quickly find an action, enter characters available in the required action's name. Only actions, names of which contain the required characters, will be shown in the list. The box is invisible by default. To enable it, use the Ctl+F keyboard shortcut.

Find
Click to start searching the actions, that meet the search string.

Clear
Click to clear the search string.

Actions List
The list of available actions for tracing is displayed.

See Also

Profile Server Events Wizard

Filters, Profile Server Events Wizard


Event Filters, Profile Server Events Wizard

The wizard's tab contains a list of events with comparison operators that you can use to filter events in a trace.

Find Box
To quickly find an event filter, enter characters available in the required event filter's name. Only event filters, names of which contain the required characters, will be shown in the list. The box is invisible by default. To enable it, use the Ctl+F keyboard shortcut.

Find
Click to start searching the event filters, that meet the search string.

Clear
Click to clear the search string.

Event Filters Grid

Event
Specify an event where you want to apply a comparison operator to.

Source
Specify data columns that contain the information you need.

Operator
Select a logical operator.

Comparator
Select a comparison operator.

Pattern
Type a value to use for the filter.

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 settings.

My Defaults
Click this button to restore your default settings, previously saved with the Save As My Defaults button.

See Also

Profile Server Events Wizard

Columns, Profile Server Events Wizard


Columns, Profile Server Events Wizard

Select the columns you want to capture in this events session.

Find Box
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. The box is invisible by default. To enable it either for Source Events Columns or for Target Events Columns, use the Ctl+F keyboard shortcut.

Find
Click to start searching the columns, that meet the search string.

Clear
Click to clear the search string.

Source Events Columns
Displays the list of available event columns that can be added to a trace.

Target Events Columns
Displays already selected event columns that will be added to a trace.

Click the button to add all available event columns to a trace.

Click the button to add a selected event column to a trace.

Click the button to remove all selected event columns from a trace.

Click the button to remove a selected event column from a trace.

Use the buttons to rearrange the columns order. The buttons move a column up or down.

See Also

Profile Server Events 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 Synchronization Wizard
Use the Schema Synchronization Wizard to synchronize database differences.

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 object.

Generate Comparison Report Dialog Box
Describes how to generate comparison reports.

Database Creation Dilaog Box
Describes fields and options of the Database Creation dialog box.


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

Schema Mapping, Schema Comparison Wizard
This page allows you to change the automatic schema mapping. The page is available if Database, Backup or Snapshot is selected as Source or Target.

Table Mapping, Schema Comparison Wizard
This page allows you to change the automatic table mapping. The page is available if Database, Backup or Snapshot is selected as Source or Target.

Object Mapping Dialog Box
This page allows you to change the automatic object mapping.

Column Mapping Dialog Box
This page allows you to change the automatic column mapping.

Object Filter, Schema Comparison Wizard
The topic describes object types filters.

See Also

Schema Compare

Schema Synchronization Wizard


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, Backup, Scripts Folder, Source Control, Snapshot.

Database

Connection
Select a Source Microsoft SQL Server server connection in the left part of the wizard and a Target Microsoft SQL Server 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.

New
Click to create a new connection for Microsoft SQL Server server.

SQL Server Version
The version of the database server used in the connection is specified.

Database
Select a server database for comparison from the drop-down list box. In Target, you can select <Create New Database> from the drop-down list to create a new target database with help of the Database Creation dialog box.

Backup

Add
Click the button to add a backup file to a comparison table below.

Remove
Click the button to delete a backup file from a comparison table.

Clear
Click the button to delete all the files from the comparison table.

Database
The database of a created backup is specified.

Date
The backup creation date is specified.

Server
The server connection name of a created backup is specified.

Scripts Folder

Database Scripts Folder
Specify the path to the existing scripts folder. You can open an existing scripts folder by clicking the <Browse..> link.

Browse
Click the button to open an existing scripts folder.

New
Click the button to open the Create Scripts Folder or Snapshot dialog box and create a scripts folder for a required database.

Server version
Select the required server version from the drop-down list.

Default collation
Select the required default collation from the drop-down list.

Source Control

Repository
Select a required source control repository from the drop-down list. Select <Manage...> to create, edit, or delete source control repositories with help of the Repository Manager Dialog Box.

Edit
Click to edit the source control repository properties

New
Click to create a new connection to source control repository.

Revision
Select a required revision from the drop-down list.

Latest (Head)
Select to use the latest revision copy of the version control.

<Select a specified revision...>
Select to use a required revision copy of the version control.

Server version
Select the required server version from the drop-down list.

Default collation
Select the required default collation from the drop-down list.

Snapshot

Snapshot
Select a snapshot file for comparison. You can open an existing snapshot file clicking the <Browse..> link.

New
Click the button to open the Create Schema Snapshot dialog box and create a snapshot for a required database.

Browse
Click the button to open an existing snapshot file.

Server
The server connection name is specified.

Server Version
The version of the snapshot database server used in the connection is specified.

Database
A database of the used snapshot is specified.

Created
A snapshot creation date is specified.

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

Options, Schema Comparison Wizard


Options, Schema Comparison Wizard

Use the Options wizard page to tune schema comparison.

Auto Mapping

Associate column names having similar name options, ...%
Select to consider similar column names equal. Click "..." to configure the similarity percent. The default value is 80%.

Ignore case in object names
Select to ignore cases in object names during mapping and comparison.

Ignore spaces in objects names
Select to ignore spaces in object names during mapping and comparison.

Common

Compare database properties
Select it to include a database object into comparison and synchronization. Note, that a database object will be synchronized even if this option is disabled, if the database object depends on other objects that are selected for synchronization.

Convert user data types into SQL Server system data types
Select to convert user data types into SQL Server system during comparison and synchronization.

Disable dependency analysis
Select to perform FAST COMPARISON. The option disables dependency building algorithms. Only object types selected in Object filer will be described. Synchronization script cannot be generated if this option is enabled.

Ignore authorization
Select it to ignore AUTHORIZATION clauses and statements on database-contained object when comparing and synchronizing databases.

Ignore CHANGE_TRACKING
Select it to ignore CHANGE_TRACKING clauses and statements when comparing and synchronizing databases.

Ignore CLR datatypes in column
When selected, CLR datatypes in column are ignored during comparison and synchronization. Columns' CLR dataypes in the target table will be reserved, if possible.

Ignore collations
Select it to ignore collations of columns during comparison and synchronization. Collations will be canceled if data type in column was changed to a non-text one, no matter, either you selected this option, or not

Ignore DATA_COMPRESSION for tables, indexes, primary and unique constraints.
Select it to ignore the DATA_COMPRESSION clause for tables, indexes, primary and unique key constraints. It will be preserved in Target.

Ignore database and sever names for synonyms
When selected, database and server names are ignored for synonyms during comparison and synchronization.

Ignore database extended properties
Select to ignore extended properties of database objects during comparison and synchronization. They will be preserved after synchronization if an object, referring to these extended properties, is rebuilt.

Ignore database object extended properties
Select to ignore extended properties of database objects during comparison and synchronization. These properties will be preserved after synchronization if an object that refers to them is rebuilt.

Ignore datatypes in column
When selected, datatypes in column are ignored during comparison and synchronization. Column datatypes in the target tables will be preserved, if possible.

Ignore event notification on queues
Select it to ignore an event notification on queues during comparison and synchronization.

Ignore filegroups and partition schemes/functions.
Select to ignore filegroup, partition schemes and partition functions during comparison and synchronization. The option is selected by default, as the tool does not synchronize the aforementioned clauses, but synchronizes the corresponding properties of tables, indexes, primary keys and unique constraints.

Ignore full-text catalog path
Select it to ignore the path in the full-text catalog during comparison.

Ignore full-text search
Select it to ignore full-text stoplists, full-text catalogers and full-text indexes during comparison and synchronization. If these objects are altered or deleted during synchronization, they will be restored if it is possible.

Ignore next filegroups
Select to ignore next filegroups during comparison and synchronization. Next filegroups in the target partition scheme will be preserved if possible.

Ignore semicolons
Select to ignore semicolons in the end of statements during comparison and synchronization.

Ignore sequence max value
Select to ignore sequence max value.

Ignore sequence min value
Select to ignore sequence min value.

Ignore sequence start value
Select to ignore sequence start value.

Ignore tSQLt framework and unit tests
Select to exclude tSQLt Framework objects during comparison and synchronization.

Ignore user DEFAULT_SCHEMA
Select it to ignore DEFAULT_SCHEMA for users during comparison and synchronization.

Ignore permissions
Select it to ignore security permissions during comparison and synchronization. The Target database permissions will be preserved if it is possible.

Ignore users' permissions
Select to ignore user permissions and role memberships during comparison and synchronization.

Ignore user DEFAULT_LANGUAGE
Select to ignore DEFAULT_LANGUAGE for users during comparison and synchronization.

Ignore logins, certificates, asymmetric keys for users
It is selected by default as the tool does not synchronize logins, certificats and asymmetric keys, but it synchronizes the corresponding user's properties. Logins for users existing in the Target database will be preserved.

Populate full-text indexes
When selected, populate full-text indexes are populated. The option is cleared by default, since creation of the full-text indexes i a time-consuming task.

Quote object names with square brackets
When selected, quote object names with square parentheses during script generation.

Tables

Force column order
When selected, adding a column to a table will cause its recreation. As a result, the column order will be preserved. Otherwise, difference in column order will be ignored and objects will be equal.

Ignore bound rules and defaults
Ignore bind of rules and defaults with a column, that is set with sp_bindrule or sp_bindefault during comparison and synchronization.

Ignore default column collations
Select to ignore default column collations during comparison and synchronization. If a column data type is changed to non-numeric, column collation will be canceled, regardless of the setting.

Ignore identity on columns
Select it to ignore identity on columns during comparison and synchronization. When selected, Ignore identity seed and increment values option is applied as well. Identity and its and and increment values will be restored in Target.

Ignore identity seed and increment values
Select it to ignore the identity seed and increment values during comparison and synchronization. Identity seed and increment values will be preserved after synchronization. If the Target column does not have the IDENTITY property, it will get this property after synchronization, but with default seed and increment values.

Ignore LOCK_ESCALATION
Select to ignore LOCK_ESCALATION.

Triggers

Ignore table DML triggers
Select it to ignore table DML triggers during comparison and synchronization. If they prevent synchronization, triggers will be dropped and then restored. If a table is dropped, then its triggers will be dropped in both cases either you have selected this option, or not.

Ignore INSTEAD OF triggers
Select to ignore INSTEAD OF triggers during comparison and synchronization. If a view is dropped, then its triggers will be dropped in both cases, either your have selected this option or not.

Ignore state of DML triggers
Select to ignore state of DML triggers during comparison and synchronization. State of DML triggers in the target database will be preserved if possible.

Ignore state of DDL triggers
Select to ignore state of DDL triggers during comparison and synchronization. State of DDL triggers in the target database will be preserved if possible.

Ignore firing order for DDL and DML triggers
Select it to ignore the setting of trigger fire order, that is set with sp_settriggerorder. Trigger fire order in the Target database will be preserved if possible.

Indexes and constraints

Ignore check constraints
Select to ignore constraints during comparison and synchronization. Check constraints won't be restored after synchronization.

Ignore column order in indexes
Select to ignore column order for included columns in indexes during comparison and synchronization.

Ignore constraints' names
Select to ignore constraints' names during comparison and synchronization. They will be preserved in Target.

Ignore constraints' system names
Select to ignore constraint system names during comparison and synchronization.

Ignore default constraints
Select to ignore default constraints and schema defaults during comparison and synchronization. Default constraint and schema defaults won't be restored after synchronization.

Ignore foreign keys
Select to ignore foreign keys during comparison and synchronization. Foreign keys won't be restored after synchronization.

Ignore foreign keys actions ON UPDATE and ON DELETE
Select to ignore referential integrity constraints for foreign keys during comparison and synchronization.

Ignore indexes
Select it to ignore indexes in tables and views during comparison.

Ignore indexes' names
Select to ignore names of indexes in tables and views during co indexes in tables and views during comparison and synchronization. Indexes' names will be preserved in Target.

Ignore NOCHECK state on constraints
Select to ignore NOCHECK clause for foreign keys and check constraints during comparison and synchronization. It will be preserved in Target.

Ignore NOT NULL constraint for a column
Select to ignore NOT NULL constraint for a column during comparison and synchronization. The option is not applicable to columns defines as PRIMARY KEY constraints.

Ignore PAD_INDEX and FILLFACTOR for indexes and constraints
Select to ignore PAD_INDEX and FILLFACTOR options for indexes and constraints during comparison and synchronization, The options will be preserved in Target.

Ignore PAGE_LOCK and ROW_LOCK for indexes and constraints
Select to ignore ALLOW_PAGE_LOCK and ALLOW_ROW_LOCK options for indexes and constraints during comparison and synchronization. The options will be preserved in Target.

Ignore primary keys
Select to ignore differences in primary keys during comparison and synchronization. Primary keys won't be restored after synchronization. For example, if one of their columns have no NOT NULL property.

Ignore sort direction (ASC/DESC) for index columns
Select to ignore sort direction for index columns during comparison and synchronization. It will be preserved in Target.

Ignore statistics
Select to ignore statistics related to a column during comparison and synchronization. If it prevents synchronization, it be be dropped and then restored with default options. Statistics won't be restored after synchronization, for example, if its column is dropped.

Ignore STATISTICS_NORECOMPUTE for indexes and constraints
Select it to ignore the STATISTICS_NORECOMPUTE option for indexes and constraints during comparison and synchronization. It will be reserved in Target.

Ignore unique keys
Select it to ignore unique keys during comparison and synchronization. Unique keys won't be restored after synchronization, for example if one of their columns was dropped.

Ignore WITH NOCHECK state on constraints
Select to ignore WITH NOCHECK clause for constraints during comparison and synchronization. It will be preserved in Target.

Keep objects in target

Ignore DML and INSTEAD OF triggers present only in Target
Select to ignore dropped DML triggers in target when comparing and synchronizing tables or views.

Ignore indexes present only in Target
Select to ignore dropped indexes in target when comparing and synchronizing tables or views.

Replications

Ignore NOT FOR REPLICATION for indexes, constraints and triggers
Select to ignore NOT FOR REPLICATION for indexes, constraints and triggers during compariosn and synchroniztion. They will be preserved in Target.

Ignore replicated tables
Select to ignore replicated tables during comparison.

Ignore replication procedures
Select to ignore replication procedures during comparison.

Ignore replication roles
Select to ignore replication roles ruing comparison.

Ignore replication schemas
Select to ignore replication schemas during comparison.

Ignore replication triggers
Select to ignore triggers created for replication needs during compassion and synchronization.

Script Objects

Decrypt encrypted objects
It is selected by default to make took decrypt encrypted objects' bodies for comparison and synchronization. They are shown in the comparison results as usual script objects. If you compare encrypted objects in databases with large bulks of data, selecting this option will slightly slow down a comparison.

Ignore case
Select it to ignore any case difference during comparison. Case differences in a script objects' body are preserved during synchronization.

Ignore comments
Select it to ignore comments when comparing views, stored procedures, etc. Comments in a script object's body are preserved during synchronization.

Ignore keyword reduction
Select it to ignore differences in full and short names of keywords during comparison.

Ignore object names in definitions
Select to ignore object names that appear in definitions during comparison.

Ignore QUOTED_IDENTIFIER and ANSI_NULLS
Select it to ignore QUOTED_IDENTIFIER and ANSI_NULLS options for functions, procedures, triggers, etc. during comparison and synchronization. They will be preserved in Target.

Ignore signatures
Select it to ignore signatures when comparing and synchronizing procedures, functions, triggers and assemblies.

Ignore white spaces
Select it to ignore any differences in white spaces (new lines, tabs, spaces, etc.) during comparison and synchronization. Original white spaces in a script object's body are preserved during synchronization.

Ignore WITH ENCRYPTION
Select to ignore difference in WITH ENCRYPTION attribute.

Ignore WITH option order
Select it to ignore elements order of WITH clause for views, procedures, functions, triggers, etc. during comparison and synchronization.

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

Schema Comparison Document


Schema Mapping, Schema Comparison Wizard

This page allows you to change the automatic schema mapping and map schemas manually based on your needs.

Note

The page is available if Database, Backup or Snapshot is selected as Source or Target.

It contains the following details:

Refresh
Click the button to discard the owners you have chosen.

Restore Default Mapping
Click it to discard your manual mapping and restore the default one.

Clear All Mapping
Click it to discard mapping. All fields in the Target part of the grid will have the <None> value. After that you can click the button to select the required schema from the drop-down list.

Source schema
Lists all schemas in the Source database.

Target schema
Contains Target schemas mapped to the Source ones. Note if dbForge Schema Compare cannot find the corresponding schema in the Target, you will see the <None> value in the fields.

Compare only mapped schemas
Select the check box to see only mapped schemas and their objects in the comparison results and synchronize them.

See Also

Schema Comparison Wizard

Object Filter, Schema Comparison Wizard


Table Mapping, Schema Comparison Wizard

Select tables and their columns to compare on this page. This page displays the grid with compared tables and comparison columns.

Note

The page is available if Database, Backup or Snapshot is selected as Source or Target.

The grid contains the following columns:

Column with check boxes
Select check boxes to include tables to comparison.

Object Name
Displays table names.

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 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 Object Mapping dialog box to customize the object mapping
 | Unmap | Click to unmap the object pairs, selected in the grid
 | Reset | Click to restore automatic mapping

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

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.

See Also

Schema Comparison Wizard

Object Mapping Dialog Box


Object Mapping Dialog Box

This dialog allows you to set custom mapping for tables.

Source objects

Lists tables of the source database. If there are several schemas in the database, tables are grouped by these schemas.

Filter
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.

Target objects

Lists tables of the target database. If there are several schemas in the database, tables are grouped by these schemas.

Filter
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.

Buttons

OK
Click to map the selected source and target object and close the dialog.

Close
Click to close the dialog.

Map
Click to map the selected source and target object without closing the dialog.

See Also

Schema Comparison Wizard

Column Mapping Dialog Box


Column Mapping Dialog Box

This dialog allows you to set custom mapping for columns.

Select columns for comparison
This grid allows controlling column mapping.

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.

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

Schema Comparison Wizard

Object Filter, 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 SQL Server versions.

Note

Objects are filtered according to the compatibility properties of the source database. Objects that are not compatible with the source database are disabled.

See Also

Schema Comparison Wizard

Schema Comparison Document


Schema Synchronization Wizard

Use Schema Synchronization Wizard to synchronize database differences. To access the wizard, click the [image] 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.

Dependencies, Schema Synchronization Wizard
Use the topic to specify additional objects to synchronize.

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

Schema Comparison Wizard


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 SQL Server. 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 general synchronization options including script execution.

Database backup

Backup path: (Path)
Select to backup the target database before synchronization and specify a backup file location. The backup file name will be generated in the current format: <database_name>_<yyyyy>_<MM>_<dd>_<hh>_<mm>.bak.

Backup type: (Type)
When selected, the backup will be created in the selected mode. Creating a differential database backup required a previous full database backup. If your database has never been backed up, a full database backup wil be created. The copy-only mode option is available for SQL Server 2008 or higher versions.

Create folder for database backup
Select to create a folder on the server for the database backup.

Extension for backup file: (Extension)
Select to setup extension for backup file. Click "..." to specify the required extension. If this option is not selected, the default extension (.back) will be used.

Use compression for backup
Select to perform backup compression. This option is available for SQL Server 2008 or higher versions.
Transactions

Use a single transaction
Select to execute a synchronization script as a single transaction. If selected, all the changes to the database will be rolled back in case of any error when executing the synchronization script.

Add error handling statements
If you run the script and the option is selected, the script will stop executing after encountering error.

Set Transaction isolation level to <LEVEL NAME>
Select this option to configure Transaction isolation level. Click "..." to select Transaction isolation level from the drop-down list box.

Common

Add constraints and keys to tables using WITH NOCHECK
Select to add WITH NOCHECK clause to foreign keys and constraints created during synchronization.

Add WITH ENCRYPTION
Adds WITH ENCRYPTION when stored procedures, functions, views and triggers are included to the synchronization script.

Check for object existence
Check for object existence.

Disable DDL triggers
Select to disable DDL triggers in the beginning of synchronization. After the synchronization they will be enabled.

Generate fully qualified object names
When selected, the fully qualified object names will be generated in the synchronization script. If the option is enabled, names of objects in the synchronization script will include a schema name.

Include USE <database_name>
When selected, the USE <database_name> clause will be added to the script.

Specify the folder for assemblies: (Enter a path)
When selected, the assembly synchronization will be performed by copying the files to the specified folder. Specify a local path or network location to copy the target assemblies to.

Synchronize database in the single user mode
When selected, database will be synchronized in the single user mode.

Update views
Updates the meta data for the specified non-schema-bound view.

Use ALTER SCHEMA TRANSFER expression
Use this expression to transfer tables between schemas. This option can be applied.

Use DROP and CREATE instead of ALTER
Select to replace ALTER statements with DROP and CREATE statements in synchronization script for views, procedures, functions and triggers. If this option is selected, the "Check for object existence" option will be used.

Use DROP and CREATE instead of ALTER for assemblies
When selected, ALTER statements will be replaced with DROP and CREATE statements in synchronization script for assemblies. If this option is selected, the 'Check for object existence' option will be used.

Use DROP and CREATE instead of ALTER for tables
When selected, ALTER statements will be replaced with DROP and CREATE statements in synchronization script for tables. If this option is selected, the 'Check for object existence' option will be used.

Verify table data using checksum
Select to enable the tool to check if any table data was lost after synchronization. If any data was lost, you could see a warning in the Error List window after synchronization.

Script Comments

Comment DDL statements for signatures, certificates, asymmetric and symmetric keys
If this option is selected, DDL for signatures, symmetric, asymmetric keys and certificates will be commented. This option is disabled by default, since the tool is unable to retrieve some options and passwords.

Exclude comments
Select to prevent comments generation in a synchronization script.

Include print comments
If the option is selected, comments will be printed into output while executing 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 comparison settings, previously saved with the Save As My Defaults button.

See Also

Schema Synchronization Wizard

Dependencies, Schema Synchronization Wizard


Dependencies, Schema Synchronization Wizard

Select additional objects to synchronize.

Synchronize the following objects, which have not been explicitly selected for synchronization, but which are used by one or more objects that you have included in the synchronization.

Affected Object
Specify the objects you want to include into the synchronization. All the objects are selected by default.

Details
Displays how a referencing object depends on an affected object.

Referencing or Referenced by
Objects that are referencing to the affected objects.

See Also

Schema Synchronization Wizard

Issues, 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


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.

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.

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.

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.

Owner
Shows an owner of a target object.

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 it to sort columns and constraints in alphabetical order.

Tip: To better understand comparison results, you can filter them by their status or name and group by their status, operation, and object type.

Preview Tooltip

Simply put your mouse pointer over any part of the vertical scroll bar and you will get a preview of the code at that position in the document.

Enhanced Scroll Bar

Enhanced Scroll Bar

See Also

Schema Update Script Window


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, Excel, XML and XML for 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 and comparison options.

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


Database Creation Dilaog Box

Use this dialog box to create a new target database.

Name
Specify the name of the database.

Owner
Select the name of the database owner from the drop-down list box.

Description
Provide the database with meaningful description here.

Files

Add
Add a new file to the database.

Remove
Delete the selected file from the database. A file cannot be removed unless it is empty. The primary data file and log file cannot be removed.

Logical name
Enter or modify the name of the file.

File type
Specify the file type here. The Data, Log, or Filestream Data values are available. You cannot modify the file type of an existing file.

Filegroup
Select the filegroup for the file here. By default, the filegroup is PRIMARY. You can create a new filegroup by selecting <new> and entering information about the filegroup in the New Filegroup dialog box. A new filegroup can also be created on the Filegroups tab. You cannot modify the filegroup of an existing file.

Initial size (MB)
Enter or modify the initial size for the file in megabytes.

Autogrowth/Max Size
Displays the autogrowth file properties. These properties control how the file expands when its maximum file size is reached. To edit autogrowth values, click the edit button next to the autogrowth properties for the required В file, and change the values in the Change Autogrowth dialog box.

Path
Displays the path to the selected file. To specify a path for a new file, click the edit button next to the path for the file, and navigate to the destination folder. Note that you cannot modify the path of an existing file.

File name
Displays the name of the file. Is not valid for the FILESTREAM files.

See Also

Schema Compare


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 | Reveal Database Explorer window | Global
 | Data Window | CTRL+W, D | Reveal Data window | Global
 | Properties Window | CTRL+W, P | Reveal Properties window | Global
 | Output | CTRL+W, O | Reveal the Output window | Global
 | Error List | CTRL+W, E | Reveal Error List window | Global
 | Document Outline | CTRL+W, U | Reveal Document Outline window | Global
 | Schema View | CTRL+W, C | Reveal Schema View window | Global
 | Code Templates | CTRL+W, T | Reveal Code Templates window | Global
 | Data Viewer and Editor | CTRL+W, R | Reveal Data Viewer and Editor window | Global
 | Generate DDL | CTRL+D, D | Call Generate DDL wizard | Global
 | Find Object | CTRL+D, F | Reveal Find Object window | Global
 | Security Manager | CTRL+D, Q | Reveal Security Manager window | Global
 | Web Browser | CTRL+W, W | Reveal Web Browser | Global
 | New Connection | CTRL+D, N | Show Database Connection Properties dialog box for a new connection | Global
 | Diagram Overview | CTRL+W, V | Reveal Diagram Overview window | Global
 |  | F1 | Show help about current 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+ALT+PAGE DOWN | Switch to next open document | Global
 |  | CTRL+ALT+ PAGE UP | Switch to previous open 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

See Also

Reference


Security Manager

Use Security Manager to add, edit or delete user accounts, grant and revoke permissions. To call Security Manager, select [image] Security Manager from the Database menu.

The left part of the Security Manager is a list of 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.

Login Editor, Security Manager
Use the section to create, view, or edit a login. Appears when the Logins node is selected.

User, Security Manager
Use the section to create, view, or edit a user account. Appears when the Users node is selected.

Role, Security Manager
Use the section to create, view, or edit a role. Appears when the Roles node is selected.

Application Role, Security Manager
Use the section to create, view, or edit an application role. Appears when the Application Roles node is selected.

Schemas Editor, Security Manager
Use the section to create, view, or edit a schema. Appears when the Schemas node is selected.


Security Manager Window

The topic describes the options available in the Security Manager window.

Connection
Select the needed connection from the drop down list. To create a new connection, open the Database Connection Properties dialog box clicking New in the suggested list.

Show all Objects
Click the icon to show objects for each database available on the selected server.

Refresh
Refreshes object information.

Stop Refresh
Stops the refresh operation.

Save
Saves changes made to the object that is being edited.

Undo
Cancels changes made to the object that is being edited.

Script Changes
Generates SQL statements that will be executed to apply changes to the object that is being edited.

Create Login/User/Role/Application Role/Schema
Creates a new object.

Delete
Deletes a selected object

Login/User/Role/Application Role/Schema Shortcut Menu

New Login/User/Role/Application Role/Schema
Opens the editor for a new object.

Duplicate Object
Creates a copy of an object.

Find in Database Explorer
Shows an object location within Database Explorer.

Generate Script As

CREATE
A script to create the selected object will be generated.
DROP
A script to drop the selected object will be generated.
DROP and CREATE
A script to drop and create the selected object will be generated.

Show details
Shows the object details in the Object Viewer window.

Delete
Deletes a selected object.

Refresh
Refreshes object information.

Properties
Shows the object properties in the Properties window.

Logins/Database/Users/Roles/Application Roles/Schemas Summary Information

When you navigate to a certain object folder, you can view the summary information for the objects within it. The summary information differs depending on the object type.

See Also

Security Manager

Login Editor, Security Manager


Login Editor, Security Manager

The section describes parameters to edit a login, grant server permissions and roles to a login or revoke them.

In This Section

General, Login Editor, Security Manager
Use this tab to view or modify login properties for new or existing SQL Server logins.

User Mapping, Login Editor, Security Manager
Use this tab to view or modify the mapping of logins to database users.

Server Roles, Login Editor, Security Manager
Use this tab to add logins to one or more server roles.

Server Permissions, Login Editor, Security Manager
Use this tab to grant server permissions to logins.

See Also

Security Manager

User Editor, Security Manager


General, Login Editor, Security Manager

Use this tab to view or modify login properties for new or existing SQL Server logins.

Name
Login name.

Authentication type
Select the authentication type here. If you are editing an existing login, this option cannot be altered. SQL Server authentication type activates the options below.

Password
Input the password here. Blank passwords are not allowed.

Confirm Password
Input the login password here to be sure it is correct.

Old password
Type the old password here when changing it to a new one.

Enforce password policy
Check this option to enforce password policy for the login. This option is on by default.

Enforce password expiration
Check this option to enforce password expiration policy for the login.

User must change password at next login
Check this option to prompt the user for a new password the next time the new login is used.

Credential name
Choose a credential name from the list of credentials for the login.

Default database
Select the default database for the login from the list.

Default language
Specify the default language for the login.

Certificate name
Specify the name of the associated certificate.

Asymmetric key name
Specify the name of the associated asymmetric key.

Disable
If this option is checked, the login continues to exist as a record. But if it tries to connect to SQL Server, it will not be authenticated.

See Also

Login Editor, Security Manager

User Mapping, Login Editor, Security Manager


User Mapping, Login Editor, Security Manager

Use this tab to view or modify the mapping of logins to database users.

Users mapped to this login
Select the databases that this login can access. The grid contains the following columns:

Map
Check the required database checkbox to allow the login to access it.
Database
Database name. The column presents the list of all databases available on the server.
User
Specify a database user to map to the login. By default, the database user has the same name as the login.
Default schema
Specify the user default schema.

Database role membership
Displays the list of valid database roles for each database. The grid contains the following columns:

Grant role
Check the checkboxes corresponding to the required user roles in the selected database.
Name
Specify a role name.

See Also

Login Editor, Security Manager

Server Roles, Login Editor, Security Manager


Server Roles, Login Editor, Security Manager

Use this tab to add logins to one or more server roles.

Name
Specify a server role name.

Note

Roles that cannot be assigned are written in italic.

See Also

Login Editor, Security Manager

Server Permissions, Login Editor, Security Manager


Server Permissions, Login Editor, Security Manager

Use this tab to grant server permissions to logins.

Name
Security permission name.

Granted
Check to grant this permission to the login. Clear the checkbox to revoke the permission.

Grant Option
Specify the state of the WITH GRANT option for the listed permission using this checkbox.

Deny
Select to deny this permission to the login. Clear to revoke this permission.

See Also

Login Editor, Security Manager

User Editor, Security Manager


User Editor, Security Manager

Use the section to edit a user account, grant object permissions and role memberships to a login or revoke them.

In This Section

General, User Editor, Security Manager
Use this tab to input general information on a user account.

Owned Schemas, User Editor, Security Manager
Use this tab to grant schemas to user account.

Role Membership, User Editor, Security Manager
Use this tab to grant roles to user account.

Object Permissions, User Editor, Security Manager
Grant or revoke object privileges to user account on this tab.

See Also

Security Manager

Role Editor, Security Manager


General, User Editor, Security Manager

Use this tab to input general information on a user account.

Name
Specify a user name.

Database
Specify a database to create user in.

User type
Select the type of user. Possible values are: User with login, User without login, User mapped to certificate, User mapped to an asymmetric key, Windows user, User with password.

Password
Input account password here. Available only for the User with password user type.

Confirm Password
Input account password here to be sure it is correct. Available only for the User with password user type.

Specify old password
Check to make it necessary to specify old password when changing it to the new one.

Old password
Input old password here.

Login name
Specify the login associated with the database user. Available only for the User with login and Windows user user types.

Certificate name
Specify the certificate name. Available only for the User mapped to certificate user type.

Asymmetric key name
Specify the asymmetric key name. Available only for the User mapped to an asymmetric key user type.

Default language
Specify the default language for the user.

Default schema
Specify the default schema for the user.

See Also

User Editor, Security Manager

Owned Schemas, User Editor, Security Manager


Owned Schemas, User Editor, Security Manager

Use this tab to grant schemas to user account.

Grant schema
Check the needed checkboxes to grant the needed schemas to users.

Name
Schema name.

Note

Schemas that cannot be owned are written in italic.

See Also

User Editor, Security Manager

Role Membership, User Editor, Security Manager


Role Membership, User Editor, Security Manager

Use this tab to grant roles to user account.

Grant role
Check the needed checkboxes to grant the needed roles to users.

Name
Role name.

See Also

User Editor, Security Manager

Object Permissions, User Editor, Security Manager


Object Permissions, User Editor, Security Manager

Grant or revoke object privileges to user account on this tab.

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 clear the checkbox 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

User Editor, Security Manager

Role Editor, Security Manager


Role Editor, Security Manager

Use the section to edit a user account, grant object permissions and role members to a login or revoke them.

In This Section

General, Role Editor, Security Manager
Use this tab to input a role name and an owner.

Owned Schemas, Role Editor, Security Manager
Use this tab to grant schemas to roles.

Role Members, Role Editor, Security Manager
Use this tab to grant role members to a role.

Object Permissions, Role Editor, Security Manager
Grant or revoke object privileges to user account on this tab.

See Also

Security Manager

Application Role Editor, Security Manager


General, Role Editor, Security Manager

Use this tab to input a role name and an owner.

Role name
Role name.

Owner
Indicates the owner of the role.

See Also

Role Editor, Security Manager

Owned Schemas, Role Editor, Security Manager


Owned Schemas, Role Editor, Security Manager

Use this tab to grant schemas to roles.

Grant schema
Check the required checkboxes to grant corresponding schemas to roles.

Name
Specify a schema name.

Note

Schemas that cannot be owned are written in italic.

See Also

Role Editor, Security Manager

Role Members, Role Editor, Security Manager


Role Members, Role Editor, Security Manager

Use this tab to grant role members to a role.

Name
Check the required checkboxes to grant corresponding role members to roles.

Note

Role members that cannot be granted are written in italic.

See Also

Role Editor, Security Manager

Object Permissions, Role Editor, Security Manager


Object Permissions, Role Editor, Security Manager

Grant or revoke object privileges to user account on this tab.

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 clear the checkbox 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

Role Editor, Security Manager

Application Role Editor, Security Manager


Application Role Editor, Security Manager

Use the section to edit application roles.

In This Section

General, Application Role Editor, Security Manager
Use this tab to input an application role name and an owner.

Owned Schemas, Application Role Editor, Security Manager
Use this tab to grant schemas to application roles.

Object Permissions, Application Role Editor, Security Manager
Grant or revoke object privileges to user account on this tab.

See Also

Security Manager


General, Application Role Editor, Security Manager

Use this tab to input an application role name and an owner.

Name
Specify an application role name.

Password
Input an application role password here.

Confirm password
Input an application role password here to be sure it is correct.

Default schema
Specify a default schema here.

See Also

Application Role Editor, Security Manager

Owned Schemas, Application Role Editor, Security Manager


Owned Schemas, Application Role Editor, Security Manager

Use this tab to grant schemas to application roles.

Name
Check the required checkboxes to grant corresponding schemas to application roles.

Note

Schemas that cannot be owned are written in italic.

See Also

Application Role Editor, Security Manager

Object Permissions, Application Role Editor, Security Manager


Object Permissions, Application Role Editor, Security Manager

Grant or revoke object privileges to user account on this tab.

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 clear the checkbox 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

Application Role Editor, Security Manager

Security Manager


Schemas Editor, Security Manager

Use the section to create, view, or edit a schema.

Name
Specify a schema name.

Database
Shows the the name of a database that contains a schema.

Owner
Select schema owner.

See Also

Security Manager

Application Role Editor, Security Manager


SQL Document

This section describes Query Editor user interface elements.

In This Section

SQL Editor Window
This topic describes the SQL document window interface elements.

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

SQL Document is a processing utility that serves for entering and editing SQL statements. The Editor is also used for creating and editing database objects.

To learn how to use SQL Editor features, see Writing and Executing SQL Statements.

To open SQL editor:

On the File menu, point to New, and then click New SQL.

-OR-

On the Standard toolbar, click New SQL.

SQL Document 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. You can show or hide it by setting the corresponding option in the General, Text Editor, Options dialog box.

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. You can show or hide them by setting corresponding options in the General, Text Editor, Options dialog box.

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 sub-objects of the selected object in the left box to navigate through DDL statements.

Document view
Displays the current document view. The following views are available: Query Builder, Text, Data, Profiler, Pivot Table.

Swap main and additional document views
Click to swap the main view and active additional views.

Query Execution Pane
Shows details of query execution. Consists of the following elements: query execution status, server version, user name, database, duration time of query execution.

Split Layout
Click to switch to split layout.

Combined Layout
Click to stitch to combined layout.

Show/hide additional document views
Click to show or hide additional document views.

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.

Nullable
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

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


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 SQL Server.

Document Outline Window
Use the topic to navigate through an opened SQL document outline.


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 SQL Server.

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 SQL Server.

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 SQL Server.

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


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


Source Control

This section provides detailed information on all the windows and dialog boxes related to the source control functionality.

In This Section

Link Database To Source Control Wizard
Describes Link Database to Source Control Wizard's fields and options.

Repository Manager Dialog Box
Describes fields and options of the Repository Manager dialog box.

Create Folder Dialog Box
Describes fields and options of the Create Folder dialog box.

Select Database Scripts Folder Dialog Box
Describes Select Database Scripts Folder dialog box.

Source Control Repository Properties Dialog Box
Describes fields and options of the Source Control Repository dialog box.

New Workspace Dialog Box
Describes New Workspace dialog box.

Source Control Manager
Describes the Source Control Manager.

Source Control Settings Dialog Box
Describes fields and options of the Source Control Options dialog box.

Changes History Document
Describes the Changes History document.

Dependencies Dialog Box
Describes the Dependencies dialog box.


Link Database To Source Control Wizard

In This Section

Link, Link Database To Source Control
Select a source control repository and database development method on this page.

Progress, Link Database To Source Control
You can see linking progress on this page.

Finish, Link Database To Source Control
You can see the results of linking operation on this page.


Link, Link Database To Source Control Wizard

Select source control repository and database development model on this page.

Connection
Select the required database connection from the drop-down list.

<Manage...>
Select to create, edit, or delete database connections with help of the Connection Manager Dialog Box.

Database
Select the required database from the drop-down list box.

<Refresh...>
Select to refresh the list of available databases.

Source control repository
Select the required source control repository from the drop-down list box.

<Manage...>
Select to create, edit, or delete source control repositories with help of the Repository Manager Dialog Box.

+
Click to open the Source Control Repository Properties dialog box to set up a new connection to source control repository.

...
Click to open the Source Control Repository Properties dialog box to view and manage properties of the selected source control repository.

Database development model

Specify one of the two standard development models for working with the selected source control system.

Dedicated
Select to use dedicated database development model. In this model, each developer will work on their own copy of the database.

Shared
Select to use the shared database development model. In this model, all developers will work on a single database.

Buttons

Next
Click to go to the Progress page.

Link
Click to link the database to the source control repository.

Cancel
Click to close Link Database To Source Control wizard.

See Also

Link Database To Source Control

Progress, Link Database To Source Control


Progress, Link Database To Source Control Wizard

You can see the progress of the linking process on this page. To minimize the application windows, click the Minimize Application button. To cancel the linking process, click the Cancel button.

See Also

Link Database To Source Control

Finish, Link Database To Source Control


Finish, Link Database To Source Control Wizard

You can see the results of the linking operation on this page.

If the process is completed successfully, the [image] icon indicates this status.

If the process fails, the corresponding status is indicated by the [image] icon.

Link again
Click to restart the wizard to try linking again.

Buttons

Finish
Click to close the Link Database To Source Control Wizard.

See Also

Link Database To Source Control

Progress, Link Database To Source Control


Repository Manager Dialog Box

Repository Manager dialog box allows you to create, edit, and delete source control repositories.

Dialog Box Controls

Repositories
The list of the existing repositories.

New
Click to open Source Control Repository Properties Dialog Box for setting a new source control repository.

Edit
Click to open Source Control Repository Properties Dialog Box for editing a source control repository.

Delete
Click to delete the source control repository.

Repository Info
Displays a string, containing the properties for the selected source control repository.

See Also

Source Control Repository Properties Dialog Box


Source Control Repository Properties Dialog Box

Use this dialog box to modify or set up properties of the source control repository.

Source control system
Select source control system from the drop-down list box.

Source control settings
Specify source control settings for the selected source control system.

For Team Foundation Server (TFS)

Server URL
Specify the URL for the TFS Server.

Username
Specify the username for the TFS Server.

Password
Specify the password for the TFS Server.

Use Windows authentication
Select to use Windows authentication when logging in to the repository.

Database folder
Specify the path to the repository folder containing SQL scripts that represent the database.

Repository name
Specify repository name here.

Note

For a step-by-step instructions on linking a database to Team Foundation Server (TFS), refer to Linking a Database to TFS.

For Subversion (SVN)

Server URL
Specify the URL of your SVN server.

Username
Specify the username for the SVN server.

Password
Specify the password for the SVN server.

Database folder
Specify the path to the repository folder containing SQL scripts that represent the database.

Repository name
Specify repository name here.

Note

For a step-by-step instructions on linking a database to Subversion (SVN), refer to Linking a Database to SVN.

For SourceGear Vault

Server
Specify the SourceGear Vault server address in this box.

Use SSL
Select the check-box to use SSL connection.

Username
Specify the username for the SourceGear Vault server.

Password
Specify the password for the SourceGear Vault server.

Repository
Specify the SourceGear Vault repository name.

Database folder
Specify the path to the repository folder containing SQL scripts that represent the database.

Repository name
Specify repository name here.

Note

For a step-by-step instructions on linking a database to SourceGear Vault, refer to Linking a Database to SourceGear Vault.

For Perforce (P4)

P4PORT
Specify the protocol, host and port number for the Perforce server.

Username
Specify the username for the Perforce server.

Password
Specify the password for the Perforce server.

Workspace
Select the workspace from the drop-down list box.

New
Click to create a new workspace with the New Workspace Dialog Box.

Mapping
Select mapping from the drop-down list box, if required. Mapping specifies the depot and the remote folder, that will be used by dbForge Studio for SQL Server.

Repository name
Specify repository name here.

Note

For a step-by-step instructions on linking a database to Perforce (P4), refer to Linking a Database to Perforce.

For Git

Remote repository
Specify URL for the remote repository in this box.

Security settings: HTTP

Login
Specify login for the remote repository.

Password
Specify password for the remote repository. .

Client Certificate
If the server is set up for authentication using the client certificate, select client certificate from the drop-down list box.

Security settings: SSH

Password
Select to use password authentication.

Password:
Type your password in this box.

Key
Select to use key authentication.

Key file
Specify path to the key in this box.

Passphrase
Type the passphrase in this box.

Use existing local clone
Select to use a ready local clone instead of the technical clone created by dbForge Studio for SQL Server. In this case, all settings (including address of the remote repository) will be taken from the selected local clone. Specify the path to the local clone in the box.

Branch
Select required branch of the remote repository from the drop-down list box.

User name
Specify your Git user name in this box.

E-mail
Specify your Git e-mail address in this box.

Repository name
Specify repository name in this box.

Note

For step-by-step instructions on linking a database to Git, refer to Linking a Database to Git.

For Mercurial

Server URL:
Specify the URL of the Mercurial server in this box.

Use existing local repository
Select to use existing local repository instead of the remote repository. Specify the path to the local repository in the box.

Repository name
Specify repository name in this box.

Note

For a step-by-step instructions on linking a database to Mercurial, refer to Linking a Database to Mercurial.

For Working Folder

Database folder
Specify the path to the database folder.

Repository name
Specify repository name here.

Note

For a step-by-step instructions on linking a database to a working folder, refer to Linking a Database to a Working Folder.

For Command Line Interaction

Database folder
Specify the path to the database folder.

Command line configuration preset
Select the required command line configuration preset from the drop-down list box. The following presets are available: Template, Plastic SCM.

Command line configuration
Shows config file with command line hooks according to the selected command line configuration preset.

Repository name
Specify repository name here.

Note

For a step-by-step instructions on linking a database to a working folder, refer to Linking a Database to Plastic SCM and Other Systems.

Buttons

OK
Click to apply changes.

Test
Click to test the connection to the source control repository.

Cancel
Click to cancel changes.

See Also

Select Database Scripts Folder Dialog Box

Source Control


Create Folder Dialog Box

Use this dialog box to create a new folder to store database scripts. To open this dialog box, click Create Folder in the Select Database Scripts Folder dialog box. If you specified a nonexistent folder in the Source Control Repository Properties Dialog Box, this box appears automatically during the attempt to link a database to a selected source control system.

Folder name
Type the folder name here.

Comment
Specify the comment for the folder to be created.

Buttons

OK
Click to apply changes.

Cancel
Click to cancel changes and close the dialog box.

See Also

New Workspace Dialog Box

Source Control


Select Database Scripts Folder Dialog Box

Use this dialog box to select the folder to store database scripts.

Select or create folder to link to database
Select the required folder from the list or create a new folder by clicking the Create Folder button.

Selected path
Shows the path to the selected folder.

Buttons

Create Folder
Click to open the Create Folder dialog box to create a new folder.

OK
Click to apply changes.

Cancel
Click to cancel changes and close the dialog box.

See Also

New Workspace Dialog Box

Source Control


New Workspace Dialog Box

Use this dialog box to create a new workspace.

Name
Type the name of a new workspace in this field.

Depot
Specify the depot to store database scripts.

Folder
Specify a path to a database scripts folder. Click "..." to open the Select Database Scripts Folder dialog box.

Note

If you leave the Folder field empty, it will be considered that the whole depot contains database scripts. If such folder does not exist, it will be created automatically on the first commit.

Buttons

OK
Click to apply changes.

Cancel
Click to cancel changes and close the dialog box.

Note

For a step-by-step instructions on creating a new workspace, refer to Linking a Database to Perforce.

See Also

Source Control Manager

Source Control


Source Control Manager

Use Source Control Manager to manage changes between working copy and source control. To open a new document, right-click the linked database, point to Source Control Manager, and then click New Source Control Document on the shortcut menu.

Buttons

Refresh
Click to refresh the document

Settings
Click to open the Source Control Options dialog box to modify source control options.

Search Box
Type in the operation name for a quick navigation through the Source Control document grid.

Conflicts

Get Local
Click to resolve the selected conflict by committing your version of the object to source control.

Get Remote
Click to resolve the selected conflict by updating database with the latest version of the object from source control.

Remote changes
Lists changes from source control.

Get Latest
Click to update working copy with the latest changes from source control.

Local changes
Lists changes that were made in the working copy.

Comment box
Type a comment describing your changes here.

Commit
Click to commit local changes to source control.

Undo
Click to undo selected local changes.

Grid

Change Type
Indicates the type of the change.

Type
Indicates the type of the database object.

Name
Indicates the name of the database object.

Owner
Indicates the owner of the database object.

Filter
Click the Filter glyph on a column header to start filtering or grouping data in the grid.

Shortcut Menu Commands

Refresh
Refreshes the opened Source Control Manager.

Settings
Opens Source Control Settings Dialog Box.

Collapse All
Click to collapse all records in the grid.

Expand All
Click to collapse all records in the grid.

Differences Pane

The pane displays DDL object differences between working copy and source control. You can use the following buttons to customize the differences representation:

Word Wrap
Click to enable/disable word wrap.

Show line numbers
Click to show/hide line numbers.

Shortcut Menu Commands

Copy
Copies the selected code fragment to clipboard.

Select All
Selects all code.

Ignore Whitespaces
Click to enable/disable ignoring whitespaces.

Ignore Line Breaks
Click to enable/disable ignoring line breaks.

Word Wrap
Click to enable/disable word wrap.

Show line numbers
Click to show/hide line numbers.

See Also

Source Control Settings Dialog Box

Source Control


Source Control Settings Dialog Box

Use this dialog box to set up or modify the source control options.

Search
For a quick look-up of the required option, type the option name in the box.

Include dependencies
Select to show the list of dependent objects in the dialog window while committing or updating the working copy (get latest). If the option is disabled, dependent objects will not be included to the Commit/Get Latest operation.

Source Folder
Shows path to the folder that contains a local copy of the latest revision from a version control. Click "..." to open it.

Temporary Folder
Shows path to the folder that stores document options and scripts. In case of Dedicated mode, this folder also contains a local copy of the database at the last time you ran a commit or a get latest. Click "..." to open it.

See Also

Changes History Document

Source Control


Changes History Document

Use Changes History document to compare separate revisions as well as to view changes related to a certain commit. The document allows to view changes history of all database objects, or separate objects. To open the document, right-click the linked database or any of its objects, point to Source Control Manager, and then click View Changes History on the shortcut menu.

Revision List
Lists all revisions related to the database or to the selected objects. Select a revision to see all changes in that commit. To compare two separate revision, select them in the grid by holding the CTRL button.

Refresh
Click to refresh revisions list.

Search box
Type in the search string here for a quick navigation through the revision list.

Revision
Shows the revision identifier.

Date
Displays the revision date.

Author
Displays name of the user who committed changes.

Comment
Displays comment related to the revision.

Revision Details

Comment box
Displays comment related to the selected revision.

Search box
Type in the file name here for a quick navigation through the file list. The box is hidden by default; to enable it, press CTRL+F or F3.

Operation
Shows the type of operation that was performed on the file within the selected revision.

Path
Shows paths to the files that were modified within the commit.

Differences Pane

The pane displays DDL object differences in different revisions. You can use the following buttons to customize the differences representation:

Word Wrap
Click to enable/disable word wrap.

Show line numbers
Click to show/hide line numbers

See Also

Dependencies Dialog Box

Source Control


Dependencies Dialog Box

Use this dialog box to select objects that reference to or are referenced by the objects you want to commit or update (get latest).

Change Type
Indicates the type of the change.

Type
Indicates the type of the dependent database object.

Database Object
Indicates the name of the dependent database object.

Owner
Indicates the owner of the dependent database object.

Last Changed
Indicates data and time when the object was changed for the last time.

See Also

Source Control


Unit Test

This section describes the dbForge Studio UI elements.

In This Section

Add New Test Wizard
Describes the UI elements of the Add New Test wizard.

Install Framework Wizard
Describes the UI elements of the Install Framework wizard.

Install Sample Database Wizard
Describes the UI elements of the Install Sample Database wizard.

Test List Manager Window
Describes the UI elements of the Test List Manager window.

Test Results Window
Describes the UI elements of the Test Results window.


Add New Test Wizard

In This Section

New Test, Add New Test Wizard
Describes the UI elements of the New Test window.

Creating Test, Add New Test Wizard
Describes the UI elements of the Creating Test window.

Operation Complete, Add New Test Wizard
Describes the UI elements of the Operation Complete window.


New Test, Add New Test Wizard

Specify details for creating a new test.

Wizard Controls

Connection
Select the required database connection from the drop-down list.

Database
Select the required database from the drop-down list.

Test Information
Type the name of a test.

Class Name
Select the required class from the list of available classes or type the name for a new test class.

Buttons

Help
Click to invoke help.

Add Test
Click to create the test.

Cancel
Click to cancel test creation and close the dialog box.

See Also

Creating Test, Add New Test Wizard

Unit Test


Creating Test, Add New Test Wizard

This window shows the progress of test creation.

Buttons

Minimize Application
Click to hide the window.

Help
Click to invoke help.

Install
Unavailable.

Cancel
Click to cancel the test creation.

See Also

Operation Complete, Add New Test Wizard

Unit Test


Operation Complete, Add New Test Wizard

This window displays a message about the results of test creation.

Show Finish Page checkbox
Select to open a query template for the created test.

Buttons

Help
Click to invoke help.

Finish
Click to finish the installation and exit the wizard.

Cancel
Unavailable.

See Also

Install Framework Wizard

Unit Test


Install Framework Wizard

In This Section

Target, Install Framework Wizard
Describes the UI elements of the Target window.

Progress, Install Framework Wizard
Describes the UI elements of the Progress window.

Finish, Install Framework Wizard
Describes the UI elements of the Finish window.


Target, Install Framework Wizard

Specify connection and database details for the framework installation.

Wizard Controls

Connection
Select the required server connection from the drop-down list.

Database
Select the required database from the drop-down list.

Buttons

Help
Click to invoke help.

Install
Click to run the installation process.

Cancel
Click to cancel the installation.

See Also

Progress, Install Framework Wizard

Unit Test


Progress, Install Framework Wizard

This window shows the progress of the framework installation.

Buttons

Minimize Application
Click to hide the window.

Help
Click to invoke help.

Install
Unavailable.

Cancel
Unavailable.

See Also

Finish, Install Framework Wizard

Unit Test


Finish, Install Framework Wizard

This window shows the results of the framework installation.

Buttons

Help
Click to invoke help.

Finish
Click to exit the wizard.

Cancel
Unavailable.

See Also

Install Sample Database Wizard

Unit Test


Install Sample Database Wizard

In This Section

Target, Install Sample Database Wizard
Describes the UI elements of the Target window.

Progress, Install Sample Database Wizard
Describes the UI elements of the Progress window.

Finish, Install Sample Database Wizard
Describes the UI elements of the Finish window.


Target, Install Sample Database Wizard

Specify connection and database details for the sample database installation.

Wizard Controls

Connection
Select the required server connection from the drop-down list.

Database
Specify the name of the sample database.

Buttons

Help
Click to invoke help.

Install
Click to run the installation process.

Cancel
Click to cancel the installation.

See Also

Progress, Install Sample Databese Wizard

Unit Test


Progress, Install Sample Database Wizard

This window shows the progress of the sample database installation.

Buttons

Minimize Application
Click to hide the window.

Help
Click to invoke help.

Install
Unavailable.

Cancel
Unavailable.

See Also

Finish, Install Sample Database Wizard

Unit Test


Finish, Install Sample Database Wizard

This window shows the results of the sample database installation.

Buttons

Help
Click to invoke help.

Finish
Click to exit the wizard.

Cancel
Unavailable.

See Also

Test List Manager Window

Unit Test


Test List Manager Window

This window displays a list of test classes and tests grouped by databases.

Window Controls

Connection box
Shows the current connection. To change the connection, select the required one from the drop-down list.

Test List Editor
Shows a list of tests grouped by classes and databases. Select/clear databases, test classes, and tests to perform corresponding test-related operation.

Test List Grid

Checkbox column
Select/clear the check box next to a test you want to run or delete.

Test Name column
Shows a test name.

Class Name column
Shows a test class name.

Buttons

Run Checked Tests
Click to run the checked tests.

Refresh
Click to update the test list.

Add New Test
Click to create a new test.

Delete Test
Click to delete a test.

Delete Test Class
Click to delete a test class.

See Also

Test Results Window

Unit Test


Test Results Window

This window displays the results of test execution.

Test Results Grid

Checkbox column
Select/clear the check box next to a test you want to run.

Status column
Shows the status of a test.

Test Name column
Shows a test name.

Class Name column
Shows a test class name.

Error Message column
Displays an error message for a failed test.

Buttons

Run Checked Tests
Click to run the checked tests.

Run All Tests
Click to run all the tests.

Stop
Click to stop test(s) execution.

See Also

Unit Test


Column Properties

Use this grid to modify column properties. To view the grid, double-click a table in the Database Explorer, select a column, and then click Edit Column. Alternatively, click Columns in Table Editor.

Main
Shows main properties of the column.

Name
Name of the column column.

Unique
Indicates whether the column is unique or not.

Primary
Indicates whether the column is primary or not.

Data Type
Shows properties related to the data type of the column.

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.

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
Shows properties for computed columns.

Computed
Indicates whether the column is computed or not.

Persisted
Indicates whether the column is persisted or not.

Expression
Shows the expression for the computed column.

Miscellaneous

Shows miscellaneous column properties.

Not null
Indicates whether column is nullable or not.

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
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

Table Editor

Database Objects Text Editor User Interface Elements


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.


Database Objects Text Editor User Interface Elements

Such objects as triggers, database triggers, procedures, functions, sequences, synonyms, etc., can be edited in a text editor that is opened by double-clicking the required object. In the opened text editor you can make the required changes and then perform the following actions:

Update Database
Saves changes to the database. Clicking this button is equal to clicking the Save button.

Script changes

To New SQL Window
Shows script changes in a new SQL document.
To Clipboard
Copies SQL code to the clipboard. You can insert it anywhere you need.

See Also

Object Editor


How To: Add Tables to Query

When you create a query, you are retrieving data from a table or other objects structured like tables — views and certain user-defined functions. To work with any of these objects in your query, you add them to the diagram pane.

To add a table or table-valued object to a query

1. On the Start page select SQL Development, and then click Query Builder.
2. In Database Explorer, select a required table or several tables (or table-valued objects) and drag-and-drop them to the diagram pane.

Alternatively you can

1. In Database Explorer, select a required table. You can select multiple tables by holding the CTRL button.
2. Right click selected tables, and point to Send to in the shortcut menu, and then click Query Builder.

Tables and views are automatically added to the query when you reference them in the statement in the SQL editor.

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.

See Also

Building Queries with Query Builder

How To: Remove Tables from 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


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.


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 the example of an 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 [image] 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 [image] 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 [image] 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


Using Source Control

This section describes how to use source control functionality of dbForge Studio for SQL Server.

In This Section

Committing Changes
Describes how to update source control with local changes.

Getting the Latest Version
Describes how to update database with the latest changes from source control.

Resolving Conflicts
Describes how to view and use source control history.

Viewing Source Control History
Describes how to update your local database to a specific revision.


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