ApexSQL Refactor release notes

Release: 2011.01.0036
Date: March 09, 2012
Description: Major feature, medium fix release

Enhancements:

  • Add-in can now work on SQL Server Management Studio 2012 RC0
  • Add-in now fully supports SQL Server 2012 RC0

Fixes:

  • Formatting Options Preview drop down menu remains hidden after resizing the dialog and reopening it
  • Smart Rename Function Refactor uses incorrect Function name in the resulting script when renaming scalar recursive Function
  • Smart Rename Procedure Refactor uses incorrect Procedure name in the resulting script when renaming recursive Procedure
  • Formatting Options | General | Remove unnecessary brackets setting doesn't remove excessive brackets used to encapsulate logical operations in a WHERE clause of SELECT statement
  • "Critical error occurred when loading metadata information" error is encountered on any Refactor operation if the currently logged user has only 'db_datareader' permission
  • Find Unused Variables and Parameters Refactor incorrectly reports unused variable when the variable was used in a WHERE clause of SELECT statement
  • "A transport-level error has occurred when receiving results from the server" error is encountered if the connection to the server is lost during the Smart Rename Refactor operation
  • "A surrogate column <name> already exists" error is encountered when using Add Surrogate Key Refactor to add a key to a Table using Primary key constraint name the same as Primary key column name
  • Formatting Options | General | Always use statement terminator setting doesn't add statement terminators to IF ... ELSE control flow nested statements when Formatting Options | Flow Control | Always use BEGIN and END in IF statements setting is also ON
  • CASE keyword is capitalized based on Formatting Options | Capitalization | Format System Functions setting value
  • Formatting Options | Value Lists | Place value list on new line setting doesn't differentiate between Align with keyword and Indent <n> spaces values when Formatting options | General | Add spaces inside parentheses and Add spaces outside parentheses settings are ON
  • Formatting Options | General | Remove unnecessary brackets setting removes all excess brackets except the last pair if multiple bracket pairs were used to encapsulate the same statement
  • Formatting Options | Data Statements | Format Column Lists | Place column on new line | Indent <n> spaces setting doesn't place all columns on individual lines in a SELECT statement following OVER clause
  • Replace One-to-Many Relationship Refactor resulting code cannot be executed as it generates a duplicate key name for the Table being refactored when Associative table name is the same as existing Table Index name
  • Expand Wildcards Refactor doesn't expand wildcards in SELECT statement nested within an INSERT statement
  • Inline comments are formatted and put on a new line even when the Formatting Options | Comments | Format Comments setting is OFF
  • "Object reference not set to an instance of an object" error is encountered after attempting to open Add Surrogate Key Refactor dialog for a Table object with no keys
  • F1 keyboard shortcut opens both Windows Help and add-in support pages when used in Formatting Options | Export dialog
  • A valid Formatting Options | Comments | Add border above/below block comments using [character] is required when accepting Formatting Options changes even when the setting is OFF
  • Add-in logs excessive errors during validation of Change Parameters Refactor default parameter values
  • Formatting Options | Import dialog doesn't display full default file name for exporting formatting options
  • Smart Rename Table Column Refactor resulting script alters Views that don't directly reference renamed column

Changes:

  • Add-in log file is now saved in a new location: '%LOCALAPPDATA%\ApexSQL\ApexSQLRefactor2011\ApexSQLRefactor2011.log' or '%USERPROFILE%\Local Settings\Application Data\ApexSQL\ApexSQLRefactor2011\ApexSQLRefactor2011.log' for operating systems prior to Windows Vista

Known issues:

  • Check for Updates main menu command for previous add-in major version reports incorrect new add-in version availability
Release: 2010.05.0032
Date: April 06, 2011
Description: Medium feature, minor fix release

Enhancements:

  • 'Add Surrogate Key' Refactor is now available for Tables accessible through the Object Explorer context menu 'Refactors' for Tables and from the application main menu
  • Format SQL Code functionality and Formatting Options have been improved to double the number of formatting configuration settings groups and more than double the number of configurable individual formatting settings

Fixes:

  • "Selected object cannot be found, please refresh Object Explorer and try again" error message is encountered when initiating Change Parameters Refactor for an aggregate function
  • Find Unused Variables and Parameters Refactor doesn't work if the SQL code being refactored contains syntax errors
  • "The type 'table' doesn't exist" error message is encountered when attempting to display script preview generated for a Stored Procedure by Change Parameters Refactor if any of the procedure parameters is of TABLE type
  • "The type doesn't exist" error message is encountered when attempting to display Change Parameters Refactor script preview if user-defined data type with a non-default schema is specified as a parameter type
  • Change Parameters Refactor generates script with syntax errors for stored procedures created with no parameters and ending with ';' terminator
  • "An error occurred while validating the default for parameter " error message is encountered after modifying a parameter's default value using Change Parameters Refactor on a SQL Server 2000 stored procedure
  • Smart Rename Column Refactor encapsulates the column name with additional square brackets in the generated script after each subsequent refactoring
  • Change Parameters Refactor generates code with syntax errors if any of the existing procedure parameters are followed by inline code comments
  • "Object with name '.' already exists" error message is encountered when using Smart Rename Refactor to only modify the casing of the object name in a case sensitive database
  • Smart Rename Refactor generates script with syntax errors when renaming a view column if the new column name contains '#' character
  • Change Parameters Refactor dialog doesn't display schemas of user-defined data type parameters
  • Change Parameters Refactor stops validating parameter default value if the parameter type is changed
  • Change Parameters Refactor doesn't remove READONLY attribute from a table valued parameter after the parameter's data type is changed
  • Encapsulate As Scalar Inline Function Refactor encapsulates entire SELECT statement when only sub-query CASE expression is selected for encapsulation
  • Smart Rename Refactor cannot rename an object with non-Latin characters in its name
  • Change Parameters Refactor displays only one warning after generating a script to remove multiple parameters that are being used in procedure's body

Changes:

  • Evaluation Notice dialog will now appear on the first and each 25th usage of non-free refactors during the evaluation period

Release: 2010.04.0030
Date: December 10, 2010
Description: Medium feature, minor fix release

Enhancements:

  • Add-in can now work on SQL Server Management Studio 2008 R2
  • The following new refactors have been added to the application: 'Replace One-to-Many Relationship with Associative Table' Refactor for Tables accessible through the Object Explorer context menu 'Refactors' for Table objects and from the application main menu 'Change Parameters' Refactor for Stored Procedures and Functions accessible through the Object Explorer context menu 'Refactors' for Stored Procedures and Functions 'Find Unused Variables and Parameters' Refactor accessible from the application main menu
  • Encapsulate As Refactor now supports View as the target object type
  • Formatting Options Preview panel now supports previewing code formatting changes on both built-in examples and current query with changes highlighting
  • Main menu and Object Explorer context menu commands have been assigned corresponding graphical icons
  • Support related commands have been introduced into application main menu: 'Activate', 'Check for Updates', 'Support Forum' and 'Help'
  • Smart Rename Refactor has been assigned a default keyboard shortcut Ctrl+Shift+R

Fixes:

  • "ArgumentException" error is encountered on the second attempt to rename an object that had schema just renamed using Smart Rename Refactor
  • "Index was outside the bounds of the array" error is encountered when attempting to display a script generated by encapsulating any code as scalar inline function
  • Encapsulating CREATE TABLE statement as a table-valued function returns unmodified code without any warning messages
  • "Some objects have failed the check for schema object validity" error is encountered when using Smart Rename Refactor to rename a table containing non-alphanumeric characters in its name
  • Smart Rename Refactor doesn't rename table columns in case sensitive databases if only column name casing is changed
  • Encapsulate As Refactor fails without warning to encapsulate a code if the database already contains an object with the same name
  • Smart Rename Table dialog is displayed instead of Smart Rename Column dialog when the selected column's parent table is named with non-alphanumeric characters
  • "ArgumentNullException" error is encountered when encapsulating an entire function code as a new scalar inline function
  • Previously renamed table column cannot be renamed again if the new name contains an apostrophe
  • Format SQL removes blank code segments if the formatted code contains syntax errors
  • Smart Rename Refactor doesn't validate new object name length and produces an incorrect script if the maximum SQL Server allowed object name length is exceeded
  • Expand Wildcards and Qualify Object Names refactors remove empty lines from the script after refactoring
  • Smart Rename Column Refactor doesn't drop foreign key constraints prior to renaming a table column

Changes:

  • Application main menu has been moved from the Tools menu to the SQL Server Management Studio menu root bar
  • Remove Parameters Refactor has been removed as it was made obsolete by the new Change Parameters Refactor
  • Encapsulate As Refactor target type is now only selectable from the main menu 'Encapsulate As' before invoking the refactor dialog
  • Qualify Object Names Refactor default keyboard shortcut is now Ctrl+Shift+B
  • Expand Wildcards Refactor default keyboard shortcut is now Ctrl+Shift+W
  • Format SQL Code Refactor default keyboard shortcut is now Ctrl+Shift+D
  • About dialog has been updated for usability and easier access to ApexSQL support pages
  • Encapsulate As and Smart Rename dialog 'Refresh' buttons are now named 'Generate preview'
  • Smart Rename dialog 'Generated script' text box has been moved to a new tab with the same name
  • Copy SQL Code As Customize Language Templates dialog has been updated for usability by introducing graphics and rearranging existing input controls

Known limitations:

  • Data type that belongs to a non-default schema cannot be used as a parameter type in Change Parameters Refactor
  • Table type cannot be used as a parameter type in Change Parameters Refactor
  • Smart Rename Refactor cannot rename non-table objects that already contain characters from a non-English alphabet in their name

Release: 2010.03.0028
Date: July 8, 2010
Description: Medium feature, minor fix release

Enhancements:

  • The following new refactors have been added to the application: 'Smart Rename' Refactor for Tables, Views, Stored Procedures and Functions accessible through the Object Explorer context menu 'Refactors' for specified object types 'Smart Rename Column' Refactor for Columns accessible through the Object Explorer context menu 'Refactors' for Table or View object Columns 'Smart Rename Parameter' Refactor for Parameters accessible through the Object Explorer context menu 'Refactors' for Stored Procedure or Function Parameters 'Remove Parameter' Refactor for Parameters accessible through the Object Explorer context menu 'Refactors' for Stored Procedures, Functions and Stored Procedure or Function Parameters
  • Encapsulate Now button is added to the Encapsulate As dialog to allow for immediate execution of the generated Encapsulate code script

Fixes:

  • Parameterized SELECT statement cannot be encapsulated as a table inline function
  • Expand Wildcards refactor does not work under SQL Server Management Studio 2005 without service packs
  • Qualify Object Name refactor does not work under SQL Server Management Studio 2005 without service packs
  • Encapsulate As refactor doesn't embrace new object name with square brackets when the name contains special characters
  • Warning message about incompatible ApexSQL Debug version displays twice at SQL Server Management Studio start up
  • Encapsulate As refactor resulting script doesn't have GO statements in the Modified source section
  • Encapsulate As refactor always encapsulates the entire code from the Query Editor window disregarding existing code selection
  • "Selected code cannot be refactored" message is displayed each time Encapsulate As Table Inline Function refactor is used in case the selected code contains empty lines
  • Encapsulate As refactor dialog size and position is not saved in between SQL Server Management Studio sessions
  • SQL Server Management Studio loses focus right after Encapsulate As menu item is clicked
  • "Value cannot be null" error is encountered when copying empty code from Encapsulate As dialog
  • "Object reference not set to an instance of an object" error is encountered when closing information dialog reporting problems with network communication
  • Two BEGINs are added to a new inline function after applying Encapsulate As Inline Function refactor
  • "InvalidOperationException" error is encountered when refactoring any object from a database containing space in its name
  • 'Place Parenthesis Content on New Line' formatting option is not applied for single-line statements
  • 'Place ")" on New Line' formatting option is not applied for data statements
  • 'Indent Definitions' formatting option for schemas is not applied if 'Place First Schema Definition on New Line' option is OFF
  • 'Use BEGIN-END on Procedures' formatting option always adds additional BEGIN-END pair to a procedure after formatting even if the procedure already has a BEGIN-END pair of statements
  • 'Place on New Line' formatting option value for JOINs is not saved between SQL Server Management Studio sessions
  • Formatting Options dialog has overlapping and incorrectly sized controls when using 120 DPI screen font resolution
  • Encapsulate As Stored Procedure refactor does not encapsulate simple SELECT queries when querying using an asterisk
  • Copy SQL Code As refactor does not include GO statements into refactored code
  • NOT FOR REPLICATION attribute of a stored procedure is not moved to a new line when formatting schemas
  • 'Indent Contents' formatting option for Expressions | Parenthesis section is applied to contents inside parentheses of a single-line statement
  • CONSTRAINT keyword inside a table definition is not indented with other columns if 'Indent Definitions' formatting option is ON
  • 'Proper case' formatting option for Types is not applied for NUMERIC type
  • Table columns are not placed on new line after COMPUTE attribute in case 'Place Next Items on New Line' option is ON

Changes:

  • The following features are now free and available after the application trial period expires: 'Format SQL Code' and 'Format SQL Options' 'Expand Wildcards' Refactor 'Qualify Object Name' Refactor
  • This version of the add-in is now fully compatible and can coexist with any ApexSQL Debug version
  • Add-in log file is now saved in a new location: '%LOCALAPPDATA%\ApexSQL\ApexSQLRefactor2010\ApexSQLRefactor2010.log' or '%USERPROFILE%\Local Settings\Application Data\ApexSQL\ApexSQLRefactor2010\ApexSQLRefactor2010.log' for operating systems prior to Windows Vista
  • Encapsulate As and Customize Languages dialogs now have updated control positions, default dialog sizes and new icons in dropdown controls
  • Encapsulate As no longer has 'Open in Existing Window' functionality
  • Formatting Options dialog has been redesigned for improved usability: option groups are now vertical, only one preview script is available per group of options, multiple individual options were renamed placed in corresponding groups and information balloons are added for each of the individual options
  • All add-in proprietary assemblies are now signed using ApexSQL private key and can be manually verified for validity

Release: 2010.02.0025
Date: March 16, 2010
Description: Minor fix release

Fixes:

  • SQL Server Management Studio errors are caught and displayed in the Error Reporter even if they did not originate from the add-in
  • Error Reporter dialog closes SQL Server Management Studio when dismissed

Changes:

  • This version of the add-in can now coexist with ApexSQL Debug version 2008.05 only

Known limitations:

  • This version cannot be run successfully on machines where ApexSQL Debug 2008.04 or lower is installed

Release: 2010.01.0024
Date: December 21, 2009
Description: Major feature, minor fix release

Enhancements:

  • The following new refactors have been added to the application: 'Qualify Object Name' Refactor which fully qualifies all object names found in the SQL code 'Expand Wildcards' Refactor which replaces wildcards found in the SQL code with the actual object names 'Encapsulate As' Refactor which encapsulates selected SQL code into scalar inline functions, table-valued functions, or stored procedures 'Copy SQL Code As' Refactor which encapsulates SQL code into a customizable client code language syntax and copies it to clipboard

Fixes:

  • Case operators in SELECT statement aren't placed at new line if the Placement | Expressions | Place operators at New Line option is ON
  • For commas that separate tables in a FROM clause, the Placement | Commas in Multi-line SQL | Place at start | Line up to list | One Space After Comma option does not work, that is, no space is added after each comma

Changes:

  • Format SQL Code command keyboard shortcut is now Ctrl+Shift+F to avoid collision with the Ctrl+Shift+R option (Refresh Local Cache) in SQL Server Management Studio 2008
  • This version of the add-in can now coexist with ApexSQL Debug version 2008.04 only
  • Format SQL Code command is now always enabled but will only work if a Query Window is open or will show an informative message otherwise
  • This is the first commercial version. The add-in has an evaluation period of 14 days. ApexSQL Refactor 2008 remains to be a FREE version

Known limitations:

  • This version cannot be run successfully on machines where ApexSQL Debug 2008.03 or lower is installed

Release: 2008.02.0022
Date: August 20, 2009
Description: Minor feature, minor fix release

Enhancements:

  • Add-in now can work on SQL Server Management Studio 2005 without SP2 or higher

Fixes:

  • Proper case option turns data types to camel case (i.e. varChar) instead of proper case (i.e. Varchar)
  • SPARSE is not recognized as a keyword
  • Proper case option isn't applied to MAX keyword
  • Placement | Expressions | At End option doesn't work for expressions in WHERE clause
  • Geography, geometry and hyerarchyID data types aren't recognized as such
  • Cases | Keywords formatting option isn't applied to NOCOUNT keyword
  • Place operators at New Line option is on by default but isn't colored with default color
  • 'Space after ( and Before )' option doesn't add space after opening parenthesis
  • Line break is missed between variable declaration ending with semicolon and SELECT statement
  • Placement | Lists | Place Next Item On New Line option doesn't work for lists in parentheses
  • Closing parentheses aren't aligned with opening ones in inline table-valued functions
Release: 2008.01.0020
Date: January 12, 2009
Description: Initial release