SQL SERVER – Free intellisense add-in for SSMS

This article shows how to use ApexSQL Complete, a free intellisense add-in. You can download ApexSQL Complete, and play along through the article.

ApexSQL Complete is a free SQL Server Management Studio and Visual Studio add-in that speeds up SQL coding. In this article, we will explain ApexSQL Complete through its features. To start using ApexSQL Complete, enable it from the ApexSQL menu under the main menu in SSMS:

SQL SERVER – Free intellisense add-in for SSMS image001

Hint list – complete your SQL code

This is a key feature of ApexSQL Complete. It helps you find the wanted object or a SQL keyword, and complete the SQL statement faster instead of typing the entire object name or keyword. After you start typing, for example “SE”, SQL intellisense will appear with all keywords and database objects that contains “SE”, listed by importance:

SQL SERVER – Free intellisense add-in for SSMS image002

You can uncheck the box for the appropriate objects, and prevent them to appear in the SQL intellisense from the add-in options, under the Hints tab. This will decrease the number of hints in the SQL intellisense list, and speed up the coding process:

SQL SERVER – Free intellisense add-in for SSMS image003

Another useful property of the SQL intellisense in ApexSQL Complete is a multiple sections, which allow you to navigate over the database schema, to a table, and select the specific columns, checking the appropriate boxes. You can also select the columns and hit the Enter key to insert them:

SQL SERVER – Free intellisense add-in for SSMS image004

If a SQL script you are using is large, at some point you will need to look at SQL code before you continue. ApexSQL Complete offers you to accomplish this without a break. Press and hold the CTRL key, and the SQL intellisense will become transparent, so you can see through, and review SQL code. Releasing the CTRL key will get you back to a previous state, and you can continue typing:

SQL SERVER – Free intellisense add-in for SSMS image005

Tab navigation – monitors all opened SSMS tabs

This feature allows you to track opened and recently closed tabs, or to restore previously saved session after crashing. These operations can be managed from the add-in options, under the Tab navigation tab. Here you can set the period for keeping the tabs saved, and set the interval for auto-save.

SQL SERVER – Free intellisense add-in for SSMS image006

This could be useful if, for any reason SSMS crashes. The Tab navigation feature saves your time, and gets you back to a point before crashing.

The Tab navigation pane consists of two parts, Opened tabs and Recently closed tabs. In the Opened tabs section, all opened tabs from one session will be shown, and you can easily switch from one to another. You can search the content of the opened and closed queries, and open the query that contains searched results. Double-clicking the query from a list of the Recently closed tabs tab opens it in a new query window. For the opened and closed tabs, if you select a query from the list, a complete content will be shown in the preview section to the right:

SQL SERVER – Free intellisense add-in for SSMS image007

At any point, you can save your workspace or opened tabs, and restore to the saved state later, if SSMS crashes.

Code structure – view and find SQL code blocks

This feature provides a tree-like form of SQL code presented in a separate SSMS window on the left side of the query window. When you enable the Code structure feature from the add-in options, it allows you to see all the important parts of SQL code used in the query. SQL code blocks from the Code structure window can be expanded so you can navigate to a specific part of the block. Selecting any item from the Code structure window highlights a SQL code block in the query window:

SQL SERVER – Free intellisense add-in for SSMS image008

This way you can move through SQL code in blocks and find the part you are looking for instead of scrolling down the query.

Executed queries – track executed queries

Using this feature allows you to track all executed queries in a defined period. To enable the feature, select the Log execute queries option under the Executed queries tab in the add-in options. You can set the folder for storing the executed queries. The queries are saved as an .xml files. You can also define the maximum number of lines in SQL code, which will be stored. The Default period option allows you to show the queries executed in a defined period.

SQL SERVER – Free intellisense add-in for SSMS image009

When activated, the Executed queries form will show all the queries executed in a defined time range. If you select a query from the list, its content appears in the preview section. You can search through the queries, executed in a defined period. Double-clicking any of the executed queries from the list opens it in a new query window in SSMS, so you can additionally change SQL code.

SQL SERVER – Free intellisense add-in for SSMS image010

Snippets library – insert often SQL statements

With this feature you can insert often used SQL statements, even a whole procedure, or blocks of SQL code. You can create a snippet from the ApexSQL Complete options, or from the SSMS query window:

1) To create a snippet from the ApexSQL Complete options, navigate to the add-in options, and click Add new snippet option, under the Snippets tab:

SQL SERVER – Free intellisense add-in for SSMS image011

Here you can edit any of the predefined snippets from the library, export/import them to use it on another machine.

2) To create a snippet from the SSMS query window, type SQL code you want to be defined as a snippet, select it, and right click on it. From the context menu, choose the New snippet option:

SQL SERVER – Free intellisense add-in for SSMS image012

This will open the Create a new snippet window, with the selected code already inserted in the Code section. You just need to define a name for the new snippet, and optionally a description:

SQL SERVER – Free intellisense add-in for SSMS image013

To use already created snippet from the Snippet library, click the Insert snippet option from the context menu in the SSMS query window, and double click on a snippet from the list to use it in the query.

Navigate to object – locate an object in the Object Explorer

This allows you to locate the selected object in the Object Explorer pane. In the query window, select the object you want to locate, and right-click on it. From the context menu, choose the Navigate to object option, and the selected object will be located and highlighted in the Object Explorer pane to the left.

SQL SERVER – Free intellisense add-in for SSMS image014

Test mode – execute queries without impact to the database

The Test mode feature allows you to execute a query in a test environment, without impact and consequences to the database. To use the Test mode feature, select the Test mode option from the toolbar, and highlight SQL code in the query window you want to execute.

SQL SERVER – Free intellisense add-in for SSMS image015

The Test mode feature will add BEGIN TRANSACTION and the ROLLBACK TRANSACTION statements. After the execution, it rolls back the transactions at the beginning:

SQL SERVER – Free intellisense add-in for SSMS image016

Reference: Pinal Dave https://blog.sqlauthority.com/ )

,
Previous Post
SQL SERVER – Beginning Contained Databases – Notes from the Field #037
Next Post
MySQL – How to Format Date in MySQL with DATE_FORMAT()

Related Posts

6 Comments. Leave new

  • Santosh Pawar
    July 18, 2014 5:41 pm

    When i Close & Open SQL Serve then Once again i need to do Disable auto-Complete and Enable Auto-complete then only it working. Why any other setting which i didnt set..?

    Reply
  • Santosh Pawar
    July 18, 2014 5:50 pm

    ApexSQL Complete : When i Close & Open SQL Server then Once again i need to do Disable auto-Complete and Enable Auto-complete then only it working. Why any other setting which i didnt set..?
    I am Using SQL Server 2008 R2 (RTM) – 10.50.1617.0 (Intel X86) Express Edition.

    Reply
  • Marko Radakoivic
    July 22, 2014 1:58 am

    Hi Santosh,

    The issue you experienced has been fixed in the development.
    Please send us an email to support@apexsql.com, and we’ll send you a patch.

    Thanks,
    Marko

    Reply
  • I have been seeing an issue where the native SQL Intellisense on SSMS 2012 and possibly 2014 causes blocking. Does this solution above resolve that issue?

    Reply
  • Nguyen Van Thanh
    November 6, 2017 9:30 am

    Thank You very much. Best Tool but show very slow.

    Reply
  • Can I use this add-in in my organizations’ machine as well?

    Reply

Leave a Reply

Menu