SQL Server

Adapting Diagram File to Another Database

Friday, October 19th, 2012

Some of our users have faced the situation when they need to change the connection details of the existing Database Diagram file.

Let’s assume the situation when you have several databases with identical schemas which are only located on different MySQL servers and you have created a database model that was saved in a Database Diagram file. Now, you want to avoid redesigning the database model from scratch and only reassign the existing database model to another MySQL server.

Here are some steps you can follow to achieve this:

1. Create a database diagram.

2. Arrange objects on the diagram so you can easily read them (create containers, notes, etc).

3. Save the diagram and close dbForge Studio for MySQL.

4. Open the Database Diagram file using a third-party text editor, for instance, notepad.

Open Database Diagram as XML

Open Database Diagram as XML

5. Find the <Connection></Connection> tag that may look as follows:

...
<Connection>
    <Name>MyConnectionToDB</Name>
    <ConnectionString>User Id=root;Host=db;Port=3310;Database=sakila;Ping Interval=120;Character Set=utf8;</ConnectionString>
</Connection>
...

and make the following changes:

...
<Connection>
    <Name>new_connection_name</Name>
    <ConnectionString>User Id=new_user_id;Host=new_host;Port=new_port;Database=new_db_name;Ping Interval=120;Character Set=utf8;</ConnectionString>
</Connection>
...

i.e. modify the <Name></Name> tag (change it to something different) and the <ConnectionString></ConnectionString> tag (connection details for another server).

6. Find all the <DbOid></DbOid> tags that may look as follows:

...
<DbOid>
    <Path>sakila.actor</Path>
    <TypeName>Table</TypeName>
</DbOid>
...

and change the database name to the new one:

...
<DbOid>
    <Path>new_db_name.actor</Path>
    <TypeName>Table</TypeName>
</DbOid>
...

Make sure you specify the new database name in the same letter case as it exists on the server.
7. Save the modified file with the new name.

Now, you have a new Database Diagram file adjusted to another server.

 

NOTE: The article applies to dbForge Studio for MySQL, dbForge Studio for SQL Server, and dbForge Studio for Oracle.

dbForge Studio for SQL Server is Ready to Try

Friday, September 14th, 2012

Devart proudly presents dbForge Studio for SQL Server — a new set of SQL Server tools for database developers and administrators.

All users who have used our previously elaborated solutions (such as SQL Complete, Data Studio, Schema Compare, Data Compare and Query Builder for SQL Server) can now benefit from having them at hand in a single integrated development environment.

A new GUI tool by Devart for SQL Server is ready.

A new GUI tool by Devart for SQL Server is ready.

Product Editions

Studio for SQL Server comes in 4 editions so that each user could decide which set of tools meets their requirements best:

  • Free Express edition provides 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 is a fully-featured edition that provides additional functionality
  • Data edition includes all the functionality of the discontinued Data Studio for SQL Server

dbForge Data Studio for SQL Server has been discontinued and become the Data Edition of the Studio (that’s why the new product inherits Data Studio’s versioning — 3.0)

Not only have we integrated the existing products into one, but also added a number of new features.

Major New Features

  • Table Designer that allows to:
    • Set table properties in the visual editors
    • Edit a script that creates the table
    • Rebuild tables when complex changes are introduced
    • Preview changes before modifying a database object
  • Database Diagram for when you need to get a quick look at the database structure. It provides:
    • Visual editing, easy manipulation and scaling
    • Containers for grouping objects
    • Printing large diagrams
    • Virtual connections
  • T-SQL Debugger A must-have tool for building server-side logic. Being integrated into the stored procedure editor it allows to start debugging by clicking on the Database Explorer tree
  • Query Profiler to locate bottlenecks and optimize slow query execution time with many advanced options unavailable in a standard tool
  • Security Manager that incorporates visual editors for logins, users, and roles; batch object editing, etc.

Availability

Consumers can give dbForge dbForge Studio for SQL Server 3.0 a test drive by downloading the 30-day trial Professional edition at the product download page. dbForge Studio for SQL Server 3.0 price starts at $149.95.

Tell us what you think about the new release, on the dbForge Studio for SQL Server feedback page. We are looking forward to your comments and suggestions!

SQL Complete is ready for SQL Server 2012 now!

Friday, February 3rd, 2012

Devart Team is glad to announce the new release of SQL Complete v3.5. It includes support of all versions and editions of SQL Server, column picker, extended T-SQL syntax support and many other features.

SQL Complete 3.5

In the new version, we’ve made a huge effort to improve usability of our Intellisense and paid a lot of attention to the application quality in general. Together with the new features, meet new look of the suggestion list and new level of the usability of our application!

New features

  • Support of SQL Server 2012 and SQL Server Compact Edition As support for the new version of SQL Server was introduced together with full support for Compact Edition, developers got an opportunity to use the advanced SQL Intellisense functionality with any server version and edition, starting with SQL Server 2000 and up to SQL Azure.
  • Column picker feature New functionality will make it possible to create SELECT and INSERT queries, as it allows defining column lists for selecting, grouping, sorting and inserting without typing any code at all. The suggestion list appearance was changed – now it supports hierarchical view for table columns and shows information about data type.
  • Intellisense in SQLCMD mode Scripts that are executed with the help of the command line utility, are usually parameterized. But often it is the reason of the fact that ability to show correct suggestions for objects is lost, because database or schema name can be a variable. Now SQL Complete solves this problem. Values of variables are taken from the text of the document and object suggestions work as with an ordinary SQL script.
  • Automatic formatting of keywords on typing Keywords are formatted according to the option settings. This will help to avoid appearance of keywords written in different registry, when part of them was inserted from the suggestion list and part was typed manually.
  • Extended and revised SQL Snippets We’ve revised existing code templates, added new ones, and changed the behavior of the suggestion list on selecting a template. This will allow choosing the needed template as quickly as possible and reducing time needed for typing recurring code constructions. Also keep in mind that users can create their own SQL snippets with the help of the special editor.
  • Extended T-SQL syntax support Context-sensitive prompt of objects in the MERGE statement and a number of SQL Server 2012 T-SQL construction is supported.
  • SQL formatting improved Formatting of procedure and function code, CASE statements, comments, and column list inserted on wildcard expansion is improved.
  • Express edition feature set extended The free Express edition of our product is also improved. Now it supports SQL Server 2012 and SQL Server Compact Edition. Besides, information on columns is expanded, and hierarchical list structure that simplifies working with SELECT and INSERT statements is also available in the free edition.

(more…)

dbForge SQL Complete extends its functionality

Monday, October 3rd, 2011

Devart Team is glad to announce the new release of SQL Complete v3.1. The new version includes some improvements in both Standard and free Express editions to make your work easier, more effective and convenient.

SQL Complete SSMS add-in

SQL Complete SSMS add-in

New Features

  • Linked servers support The new version of SQL Complete features support for IntelliSense when working with linked servers. Just imagine – now you can type your queries with the kind of IntelliSense you are accustomed to even when using all advantages of linked servers configuration!
  • SQL statements support extended Standard edition provides support for GRANT, REVOKE, DENY, ENABLE/DISABLE TRIGGER, and ALTER SCHEMA statements.
  • New Highlight Occurrences option The new option allows you to turn highlighting of occurrences on and off. Besides, all existing options were rearranged to improve product’s usability.

Improvements

  • Usability of code completion improvement We revised rules for showing suggestion list especially when editing existing SQL queries. Now the suggestion list does not appear for arithmetic operations, numbers, and semicolons.
  • Installation process customization We improved the product’s usability basing on users’ requests. Now you can select the development environment in which SQL Complete will function when installing the add-in – just select the needed environment from the list of available environments on a special page of the installation wizard.
  • Tracing support We added tracing support for you to help us find and fix errors in our application – if you encountered any problems with SQL Complete, start tracing and send the created file to Devart afterwards.

Express Edition Extension

  • SQL statements support extended Support for DROP, EXEC, DECLARE, and SET statements was added.
  • Variables and parameters support
  • Qualify Column Names option is available

Availability

Consumers can give the updated dbForge SQL Complete a test drive by downloading the 30-day trial Standard edition at the product download page. SQL Complete’s Standard edition is available for an estimated retail price of $99.95.

If you don’t need advanced code completion features but want to get more than SSMS IntelliSense can give, you are welcome to try free Express edition.

To leave feedback, users can go to the dbForge SQL Complete feedback page. The Devart team is looking forward to receiving any comments and suggestions.

SQL Complete v3.0: new version of add-in that can replace native Intellisense for SSMS is available!

Tuesday, July 26th, 2011

When working on the new version of SQL Complete, we were focused on the idea of providing the most needed functionality to our users. Such course has already become the strategy of our product development. Our intention is not just to pack the product with features, but to give our users a tool that can make their work more effective. The result of this course was implementing more than a dozen of features and adding integration of SQL Complete with Visual Studio. We hope the integration will be useful for a wide range of prospective users.

Main New Features Highlights

New SQL Server versions support

SQL Server 2011 (codename Denali)
SQL Azure
SQL Server Compact edition

Added integration into Visual Studio

Visual Studio 2010: Professional, Premium, and Ultimate editions
Visual Studio 2008: Professional and Team System editions

“Go to definition” for database objects

This function allows navigating from code editor to the object in the Object Explorer (Server Explorer in VS) tree.

When the cursor is on the object identifier, the program will find the needed object and show it in the treeview on pressing F12 or clicking the corresponding item in the context menu.

If the object is declared in the script, the cursor will be moved to the beginning of its declaration.

Code Snippets

This feature makes it easy and convenient to use fragments of code over and over. The new functionality includes:

Showing code templates in the dropdown list
Opening templates on pressing Tab
Adding and editing templates with the help of templates manager
Possibility to add parameters to templates. Parameter values are entered by a user on inserting

New code completion features

IntelliSense for temporary tables and table variables
Expand EXEC statement feature. All parameters with value stoppers are inserted automatically on pressing Tab
sys.sp_* procedures are now suggested without schema prefix in EXEC statement
Expand ALTER statement for procedure, function, view, and trigger. Object body is inserted into the document automatically on pressing Tab
Suggestions for DROP statements added
Context-sensitive code completion for CREATE TRIGGER statement
Extended support for T-SQL DECLARE statement
Option for including default schema (dbo) into object name when pasting it into the text
Hierarchyid data type support in code completion

Document Outline window

This feature makes navigating through large SQL documents a real pleasure. The Document Outline window shows the structure of the current document. Besides, a user can synchronize structure with text right from the code.

Highlight occurrences of an identifier

This unique feature allows users to see all entries of an identifier in the document text. When the cursor is on the identifier, after a time lag all occurrences of this identifier into the text are highlighted.

SQL formatting component improved

Stream formatting for large documents. Application no longer hangs when formatting large SQL document. User can cancel the formatting process
Common table expression formatting supported
New formatting options for indenting JOIN clauses
Message for invalid statements

Quick database object information extended

Tool tip with parameters and descriptions of procedures and functions is shown
Tool tip with columns list when the mouse cursor hovers over the asterisk in the SELECT list is shown
For the alias in the FROM list, a table or expression with the list of columns is shown (if possible)
Now name, type, keys, and some other properties are shown for columns
Quick info is shown for the dropdown list items

“Execute current statement” feature

Now user can execute the current SQL statement (i.e. the one where the input cursor is located) in the document using the hot key.

Performance improvements

Formatting speed increased
Parsing speed of complex statements increased

What about SQL Complete Express?

Of course, most functionality is available only in the Standard edition of SQL Complete.

But all the same some improvements were made in the Express edition. There are the new features that were added:

Support for the new SQL Server versions
Visual Studio integration
SQL formatting component improvements
“Execute current statement” feature
Performance improvements

Availability

Consumers can give the updated dbForge SQL Complete a test drive by downloading the free Express edition or the 30-day trial Standard edition at the product download page. SQL Complete’s Standard edition is available for an estimated retail price of $49.95.

To leave feedback, users can go to the dbForge SQL Complete feedback page. The Devart team is looking forward to receiving any comments and suggestions.

Improving Performance for Parsing UNION Clause in SQL Complete

Monday, December 27th, 2010

In the previous article we told that we’ve performed a lot of work concerning optimization of parsing queries in SQL documents. Also we informed that we’ve fixed all problems that were found by users of our intellisense… But recently one user sent us quite a small script that caused freezing of SSMS by Devart SQL Complete. Here it is:
(more…)

SQL Complete: Parsing performance improved!

Monday, December 13th, 2010

Recently we have released a free SQL Complete tool that provides IntelliSense and script layout for SQL Server. If you like IntelliSense in Visual Studio and write T-SQL, you’ll probably appreciate the productivity improvements with SQL Complete.
(more…)

Refreshing Objects of SQL Server Databases

Tuesday, November 2nd, 2010

In some cases, for example, when migrating or updating objects, it’s necessary to update metadata for views created without evident listing of columns in the select-list, i. e. for views of the SELECT * FROM some_table type. The built-in sp_refreshview procedure is developed for these goals, it updates the metadata for the specified non-schema-bound view. Persistent metadata for a view can become outdated because of changes to the underlying objects upon which the view depends.

Metadata of other objects containing the code can be changed using the built-in sp_refreshsqlmodule procedure, that is designed to update metadata for the specified non-schema-bound stored procedure, user-defined function, view, DML trigger or database-level DDL trigger in the current database. Persistent metadata for these objects, such as data types of parameters, can become outdated because of changes to their underlying objects.

So using the script specified below, the updates of all objects containing the code for the current database can be performed (i.e. update metadata information for all VIEWS, DML TRIGGERS, PROCEDURES, FUNCTIONS, DDL TRIGGERS):

(more…)

How To: Create a Query in One Shot

Tuesday, August 31st, 2010

To get information from a database it is necessary to execute a query to get this data.

Usually an ordinary SQL editor is used to create queries. To use such editor, one should remember the syntax of the SELECT operator and the names of tables and columns.

Let’s use a visual instrument developed specially to design queries, and see that it’s much easier to create queries visually instead of typing them in an editor.

Task:

It’s necessary to show the salaries of the employees of departments situated in different cities for the 2008 year in descending order.

(more…)

Moving Database Objects from One Schema to Different Schemas

Friday, July 2nd, 2010

Database development is not limited to an initial copy of a database. On your road you meet multiple enhancements, refactoring, upgrade and many other cases that require changes in a database structure. One of most common cases is to upload database objects from one schema to several schemas. Here the simplicity ends and you are stuck with the questing ‘How to do this?’

Upload manually or automatically?

(more…)


dbForge Team Blog