Red Gate forums :: View topic - cross database usage of Smart Rename
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Refactor 1
SQL Refactor 1 forum

cross database usage of Smart Rename

Search in SQL Refactor 1 forum
Post new topic   Reply to topic
Jump to:  
Author Message
JoshuaQSP



Joined: 01 Jun 2009
Posts: 2

PostPosted: Mon Jun 01, 2009 8:51 pm    Post subject: cross database usage of Smart Rename Reply with quote

I ran a test and noticed that when I used the Smart Rename feature on a table's column name, it only updated stored procedure code that referenced the column in question, if that sp is in the same database. If the sp code resides in another db, it is not updated, even though it references the column being renamed.

I have a "common" database with tables like account, user, customer, season, etc, that are then referenced across all of the other sql dbs on the server. Is there a way to get smart rename to rename a column and include referencing stored procedures from multiple dbs ? A setting to change etc? If not, is this feature in a future versions wish list ?

Our current work around is to run dependency tracker as well (for the table), find all of the hits, comb through them to find dependency hits on that specific column, then hand-edit the code. Its time consuming and not pretty.

thanks,
Joshua
Back to top
View user's profile Send private message
Anu Deshpande



Joined: 20 Apr 2009
Posts: 662
Location: Cambridge

PostPosted: Tue Jun 02, 2009 1:52 pm    Post subject: Reply with quote

Thank you for your post into the forum and sorry that you have encountered this problem.

I have tested as per your example and replicated your problem.

I have created a Bug Report for the development team to consider. The reference for the Bug Report is SR-843. Hopefully the development team will rectify this bug in a future version of SQL Refactor.
_________________
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Back to top
View user's profile Send private message Send e-mail
JoshuaQSP



Joined: 01 Jun 2009
Posts: 2

PostPosted: Tue Jun 02, 2009 9:04 pm    Post subject: re: cross database usage of Smart Rename Reply with quote

Hi Anu. Thank you for your reply.

Is there another work around that you can suggest that may work better then the method we are currently using ?

Is there a way to recieves updates on bug SR-843 (email subscription, website to check, etc ?

thanks,
Joshua
Back to top
View user's profile Send private message
Anu Deshpande



Joined: 20 Apr 2009
Posts: 662
Location: Cambridge

PostPosted: Wed Jun 03, 2009 10:54 am    Post subject: Reply with quote

Hi Joshua,
Thanks for the update.

I am afraid I have no intelligent work around for you at the moment but I recreated your issue and can suggest a way using dependency tracker.

Following are the steps (for example let us consider you need to change table T1 in database D1 and you are referring that in stored procedure S2 in database D2):
1. Change the name of T1 in D1 and run the script provided by SQL Refactor to reflect changes in D1 as it will not do any changes in D2.
2. Start Redgate Dependency Tracker.
3. Add the table from D1 which you chnaged and add all Stored procedures in D2.
4. Dependency tracker will highlight for you 'Unresolved Internal Reference- Object not found'

This should make your life more easier.

Note: To make dependency tracker to highlight the missing object you need to add both the databases in the project.

Kindly let us know if that was useful and also if you have any other question,I'll like to help!
_________________
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Back to top
View user's profile Send private message Send e-mail
Anu Deshpande



Joined: 20 Apr 2009
Posts: 662
Location: Cambridge

PostPosted: Wed Jun 03, 2009 11:49 am    Post subject: Reply with quote

Hi Joshua

I am sorry I forgot to mention about the bug tracking.
SR- 843 is a feature added in our internal system and there is no way of tracking it externally I am afraid!
But what I did is I have added a watch on feature request submitted and can update you on the progress of the same.

Hope that is fine with you.
_________________
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Back to top
View user's profile Send private message Send e-mail
swirl80



Joined: 23 Oct 2008
Posts: 18

PostPosted: Wed Jun 17, 2009 1:41 pm    Post subject: Reply with quote

can i piggy back this thread for a moment as i have a similar question.

Will smart rename ever provide the facility to rename an object in order to move it to another schema in another database? At present you can only amend objects within the same database.

thanks
Back to top
View user's profile Send private message
Anu Deshpande



Joined: 20 Apr 2009
Posts: 662
Location: Cambridge

PostPosted: Wed Jun 17, 2009 1:50 pm    Post subject: Reply with quote

Thanks for your post.

We will definitely make a note of it.

Thanks for your suggestion.
_________________
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group