Unable to rename table

  • I bcp'd data into a table with plans to rename the old one (tbl_leads_Queue_old) and the one I created to tbl_leads_queue to replace the original table..

    However, I'm getting this error message when I try and rename the original table.

    I checked the dependencies and there are views, sp's and UDF's associated with the table. I tried dropping the functions and renaming, but still got the same error message. What objects would this error message be referring to?

     

    Server: Msg 15336, Level 16, State 1, Procedure sp_rename, Line 383

    Object 'tbl_leads_queue' cannot be renamed because the object participates in enforced dependencies.

  • Check if yo have objects created with the option "with schemabinding"

    also check if you have foreign keys on it.

  • Thanks for your help.

    There was a view that was created with schemabinding.

    Dropped that renamed the table and recreated the view.

     

    Thanks again!!

    Susan

     

Viewing 3 posts - 1 through 2 (of 2 total)

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