Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2007
    Posts
    265

    Unanswered: Does renaming of a table require recreating functions and procedures?

    Hi,

    Here is an interesting question -- I have this scenario in my database :

    Table A ( with a lot of functions and procedures associated with it)

    Table B ( same structure as Table A)


    Here is what will happen --

    Table A will be renamed to Table C
    Table B will be renamed to Table A

    Then the original Table A ( now Table C) will be dropped.

    The question is if with the whole renaming process, will the functions and stored procedures have to be recreated? Thanks!

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    I think the UDFs will need to be dropped before you do anything and recreated after you are done. The stored procedures should just have to have to be rebound. (see db2rbind to do them all at once).

    Andy

  3. #3
    Join Date
    Nov 2007
    Posts
    265
    thanks, i thought so too..

  4. #4
    Join Date
    Aug 2011
    Location
    Glasgow, UK
    Posts
    36
    Why is this so? Is there a unique handle that DB2 uses for DB objects at compile time; therefore a renaming of a table will make no difference as the stored proc or UDF will always use that handle?

  5. #5
    Join Date
    Nov 2007
    Posts
    265
    I will experiment and see if it works without recreating the functions / procedures..will let you know what I find..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •