| LINKS |
|
Solution Center Database Solutions for SQL Server DBAs and Developers How to implement risk free name changes for objects, columns, and parameters Problem: Changing the name of an object, column, or parameter is a simple procedure, significantly complicated by the presence of referencing objects. A single name change can cause a cascade of broken dependencies, potentially compromising the structure and integrity of your entire database. Unless all dependent objects are updated, foreign key references to dependent columns will be broken, views and stored procedures that explicitly reference the old name will fail causing application breakage, and many other problems can be created. Solution: ApexSQL has spent the equivalent of 3 years developing and testing our own proprietary parser that monitors dependencies in real time, quickly and accurately.Our Smart Rename refactor harness the power of this proprietary parser to easily propagate name changes throughout databases, consistently preventing broken dependencies and related errors. The Smart Rename refactor enables you to implement a name change without modifying a single line of script. This refactor is included in both ApexSQL Edit, and our SSMS add-in, ApexSQL Refactor. Here’s how to take advantage of ApexSQL’s Smart Rename refactor. Step One: The Smart Rename refactor is available through the context (right-click) menu of each column. Right click the column, parameter, or object that you wish to rename, and select Refactors | Smart Rename. This opens the Smart Rename dialog box. Step Two: Enter your desired new name. For items other than columns and parameters, you are also able to select a new schema. Click the Preview button to see the SQL script that contains all SQL commands necessary to rename the selected object, column, or parameter and all dependent objects. You can then click Refresh to update the script preview if any changes have been made. Step Three: Click Rename Now to execute the generated script. You can also click Open Script to open the script in a new Query Editor window, in order to manually modify the script. The Smart Rename refactor of ApexSQL Edit and ApexSQL Refactor is a powerful addition to any developer’s tool set. Combining the accuracy of our proprietary database parser and seamless integration into ApexSQL Edit or SSMS, ApexSQL’s Smart Rename refactor makes SQL Development easier and more efficient. For information about ApexSQL’s full set of refactors, see ApexSQL Edit or ApexSQL Refactor. Availability Labels: SQL Development and Coding |







Post a Comment