I incorrectly ran sp_rename in the following manner:
sp_rename 'Schema.Table', 'Schema.Table2'
Now the table is no longer accessible. It shows up in sysobjects as Schema.Table2 in the "name" column. I know I shouldn't have included the Schema name in the second part of the rename, but now that I have, it's inaccessible. Is there a way that I can repair my mistake. I've tried doing:
sp_rename 'Schema.Table2', 'Table', 'object'
But I get there error:
Either the parameter @objname is ambiguous or the claimed @objtype (object) is wrong.