Bulk Smart Rename
Enhance Smart Rename to accept a list of name changes.
Even if it runs the existing smart rename and concatenates the scripts it would save a lot of data entry time versus doing each change one at a time.
You should require fully qualified names in the import data to avoid ambiguity errors.
We’re going to be reviewing this over the next couple of months, which would be released via the SQL Prompt for Teams EAP (get in touch if you want to know more).
In the meantime please add any other information that you think would be useful.
-
Daniel Lancelot commented
Real shame there has been no progress on this even after over 6 years...
Not functionality that is required often - but generally speaking, when renaming columns, I suspect that the most common use case is to update legacy db's to confirm with a consistent naming strategy - and in most cases this will involve renaming multiple columns within the same tables. For this use case, bulk renaming is essential.
I have just been tasked by a client to perform this task on a legacy db - and I have identified 51 tables with 770 dependant entities that require updating. Most of these tables have between 5 and 20 fields. Using the Smart Rename tool to do this would require somewhere in the region of ~8,000 separate scripts to be generated... which is obviously completely nonsensical.
I believe that for the majority of the alterations I will be quicker to script them manually, as the benefits of being able to update 10 fields in a single stored proc in one go outweigh much of the automation gains for those tables which have a low number of dependencies.
-
Stephen Anslow commented
As there's no bulk rename, I can't quantify that. The pain of changing over 500 columns piecemeal is not something I wish to inflict upon myself.
Quantification on the single-column front comes down to "how long is a piece of string?" and varies from month to month from zero, to a few columns - mostly zeros.
Like I said, as there's no bulk rename, i.e., rename every column in a given table, how can I give you a number? If it were present, likely there would be several timebox projects carving up the renames from light impact first through pervasive, over the course of at least a year.
Apologies for a somewhat woolly answer...
-
AdminJustin Caldicott (Admin, Redgate) commented
Can I ask, how much do you use the smart rename feature for a single rename, vs for batch renames?
-
Stephen commented
The multi-rename ability would be MOST useful when one is charged with modyfying column names to conform to "generally accepted best practices". The legacy (dung heap of insanity) I just inherited features part of the table name as the prefix in 95% of all column names, rendering like-column-name-recognition nigh on impossible. I have HUNDREDS of columns to rename and, for example, taking a 50-column table through the rename process piecemeal is obviously a painful undertaking.
If I could use all 25 votes for just "Bulk Rename" I would!
-
Stephen commented
Or in the opening dialog, give us the option to "Add more columns to rename". I, too, find the repetitive nature of multiple column renames a very time-consuming exercise. Granted we don't typically do it very often, but when renaming four columns in the same table, to have to generate and merge four scripts seems a little O.T.T. and something that "Smart" Rename should handle for us... Any chance you can give us this great feature?
-
Rodd Graham commented
By 'accept a list of name changes' I mean import from a data format.