Table information

  • Hello Everyone,

    I have a question regarding to table rename.

    Lets say i have one table A, later i rename to B. How can i get the information about that table?

    Like what was the previous name etc...

    Hope to hear soon from experts.

    Thanks for you help in advance.

  • I don't remember any table where that information is stored.

    I think you have take care of it yourself.

  • There is no table where this information is stored, but you can look at the default trace to see if the information is available there. It would only not be available if the change was done so far in the past that it had cycled out.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • a rename of an existing object doesn't count as a DDL operation, so it wouldn't be in the default trace; I investigated that on a similar thread previously.

    you'd want to add your own DML trace to capture stuff like that in the future; you cannot find past events if you didn't have a DML trace already running.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Lowell (5/18/2011)


    a rename of an existing object doesn't count as a DDL operation, so it wouldn't be in the default trace; I investigated that on a similar thread previously.

    you'd want to add your own DML trace to capture stuff like that in the future; you cannot find past events if you didn't have a DML trace already running.

    Ah, didn't know that. Thanks.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

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

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