For the best web experience, please use IE11+, Chrome, Firefox, or Safari

ApexSQL Refactor FAQ

General

For a list of general FAQs about ApexSQL add-ins, please see ApexSQL add-ins general FAQs

SQL Server Management Studio and Visual Studio support

Yes, ApexSQL Refactor integrates into Visual Studio 2010 and higher

Microsoft SQL Server 2005 and higher

SQL Server Express, Standard, and Enterprise editions

Yes. ApexSQL Refactor supports Azure SQL Database and SQL Server on Amazon RDS

Yes, ApexSQL Refactor supports Azure SQL Database Managed Instance

Microsoft SQL Server Management Studio 2012 and higher
You can use the latest full-featured backwards compatible SQL Server Management Studio for free. Click here

Yes, ApexSQL Refactor supports Active Directory - Password authentication

SQL formatter customization

Yes, you can customize the SQL code layout with nearly 200 different SQL formatter options.
Please visit the following article: How to customize SQL formatting profiles

Yes, you can have many different users defined SQL query formatter profiles

Yes. You can easily export and share all the SQL formatter options

Batch SQL formatter

Yes, ApexSQL Refactor provides the Format SQL objects feature for such a task

Yes, the Format SQL scripts feature can be used for formatting multiple SQL scripts at once

Yes, you can specify the list of script-based objects, for example stored procedures and functions that want to format

Yes, the last column, "OK" under the Format SQL object window indicates whether the object is formatted properly, according to the specified format profile. A red X denotes that the object isn't formatted properly. A check mark, indicates the object is formatted properly. All objects that require formatting, will be pre-selected

ApexSQL Refactor Objects to be refactored

Yes, before executing the batch SQL query formatter, you can compare a SQL object's script as it now and how it will look like after clicking ‘OK' to format SQL.
Right click on the script object from the list in the Format SQL object window and click the Compare button or use the Ctrl + G shortcut:

ApexSQL Refactor Objects before and after

Currently, no. This feature is planned for ApexSQL Refactor 2019 R2

Currently, no. This feature is planned for ApexSQL Refactor 2019

Formatting other

Yes, SQL code can be obfuscated and make less readable

There are options for Wrapping, randomize keywords case and remove comments. All options are located under the Obfuscation tab of the Options dialog:

ApexSQL Refactor Objects obfuscation

Yes, ApexSQL Refactor has SQL code formatting impact preview which shows a clear insight and view of the impact of any formatting option changes immediately when you make them. If you don't like how it looks it can be easily changes and reverted without saving:

ApexSQL Refactor preview impact

By default, the predefined SQL code is used, but you can use SQL code that is in a SQL editor by clicking the Use current SQL button on the top right side of the Options dialog and preview changes:

ApexSQL Refactor preview changes

Yes, if in a SQL script wants to format only one part of the script and other parts to be non-formatted, just select that part and use Format SQL command either from the ApexSQL Refactor toolbar, ApexSQL Refactor main menu or right click in a query editor and from the context menu, choose command to format SQL code:

ApexSQL Refactor format blocks

Yes, you can use ApexSQL Refactor formatting options under the Capitalization tab of the Options dialog to change the case of keywords, built-in functions, built-in data types, identifiers and variables

ApexSQL Refactor casing keywords

Yes, using the Wildcard expansion feature from ApexSQL Refactor you can expand SELECT * statements so that they list all of the columns that exist in the referenced tables. Doing this you can improve query performance and avoid syntax errors

Yes, by using the Qualify object names feature to qualify the object. When the object in a SQL query is qualified SQL Server will not check if the current user is the owner of the object when executing a SQL query, meaning that no additional work will be required from SQL Server. This speed up the query execution

Refactoring

Yes, you can rename tables, procedures, views, functions, parameters and columns without breaking any dependencies.
Please visit the following article: How to rename database objects in a SQL Server database safely

Yes, the tool can add and remove parameters as well as change their names, default values and data types without impacting referencing objects.
Please visit the following article: Changing SQL stored procedures and functions parameters without breaking dependencies

Yes, using Encapsulate code as feature you can creating a new stored procedure, a view, a scalar inline function, or a table inline function from any valid T-SQL code block.

Yes, ApexSQL Refactor can split a table in your database into two tables. This is useful when wants to normalize your database or improve database performance
Please visit the following article: How to set options for the Split table refactoring method on SQL Server

Yes, for that in ApexSQL Refactor exist Add surrogate key feature, which can replace a complex natural key with a simple surrogate key thus keeping referential integrity, unifying key support for the whole database, and improving database refactoring performance

Other

Yes, using the Unused variables and parameters feature from ApexSQL Refactor you can clean up your code by identifying and removing parameters and variables that aren't used

Yes, you can convert a T-SQL script into client language-specific syntax - Java, VB.NET, c#, Perl, PHP, Delphi, Ruby, C++, or other custom languages for which conversion rules are defined.
Please visit the following article: How to quickly convert SQL code to language-specific client code

No, ApexSQL Refactor is not open source software