Looking for a way to change all objects at once?

  • Hi,

    I have a field in a table called prin_ball, upon doing a search for this, I would have to change it in about 158 different objects (that is jobs tables, procedures, views, and triggers). Is there anyway of doing a find and replace to change all at once. Or at least the views, tables and procedures?

    Thank you


  • As far as I know, this is a manual process.  If you NEED to change the table but don't want to change all of the objects using that table, you could create a view with that name and have it select from the new table name.  This way existing objects won't break and your table will have the new name.

    If that isn't an option, you will need to adjust all objects that are calling that table when you rename it.  You can script it and have it in a single transaction so on the back end, everything is "changed" at the same time.  But there is no automated way that I am aware of.

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!

  • Hi,

    Oaky thanks.

  • What is the change that needs to be made?  Normally - adding a column to a table shouldn't require changing any other code and shouldn't require modifying the view.  If you are removing or renaming a column then I would recommend looking at the change in more detail.

    Jeffrey Williams
    Problems are opportunities brilliantly disguised as insurmountable obstacles.

    How to post questions to get better answers faster
    Managing Transaction Logs

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply