sql server 2008: sp_RENAME table disappeared -


i renamed table sp_rename (sql server 2008)

sp_rename 'dbname.scname.oldtblname' 'dbname.scname.newtblnam' 

the resulting message (it in black color - warning or successful message) "caution: changing part of object name break scripts , stored procedures."

so after command table 45 million records disappeared , don't have backup. new table.

:) guys have idea bringing table back? :)

p.s. yeah, smile not ":(", because when seriousness of problem goes threshold, ":(" becomes ":)".

  • what say?
    ssms not refresh object explorer automatically there

    use dbname select object_id('scname.newtblnam')

  • sp_rename says

you can change name of object or data type in current database only. names of system data types , system objects cannot changed.

you specified dbname it's possible have object [dbname.scname.newtblnam] in dbo schema (or similar)

  • and did backup first? best practice before (formal) schema changes, y'know

fwiw, i've never lost table or other object using sp_rename


Comments

Popular posts from this blog

unicode - Are email addresses allowed to contain non-alphanumeric characters? -

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -