Smart rename & identity column

Dmitry GokunDmitry Gokun Posts: 19
edited November 25, 2013 11:51AM in SQL Prompt Previous Versions
Hello,

i'm trying to use "smart rename" feature to rename identity column on one of my tables. But that end ups with identity values screwed. However, i can edit generated changes script, add IDENTITY_INSERT statements and so on. But why SQL Prompt cannt do that by itself??

Do you know about this problem and is it planned to be fixed in future versions?

Regards,
Dmitry Gokun.

Comments

  • Anu DAnu D Posts: 876 Silver 3
    Thanks for your post.

    I replicate the issue but it works for me.

    What exactly you mean by "identity values screwed"?

    Does it breaks the sequence? Or does it tries to reset the identity value?
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
  • Hello Anu.

    Here's sample script which creates table:
    CREATE TABLE Test
    (
        TestId INTEGER IDENTITY(1, 1) NOT NULL PRIMARY KEY,
        Name NVARCHAR(MAX) NOT NULL
    )
    GO
    
    INSERT INTO Test(Name) VALUES ('Name1')
    GO
    
    INSERT INTO Test(Name) VALUES ('Name2')
    GO
    
    INSERT INTO Test(Name) VALUES ('Name2')
    GO
    
    INSERT INTO Test(Name) VALUES ('Name4')
    GO
    
    DELETE FROM Test WHERE TestId = 1
    GO
    
    DELETE FROM Test WHERE TestId = 3
    GO
    
    SELECT * FROM Test
    GO
    

    After running this, you have two rows in table "Test":

    TestId Name
    2 Name2
    4 Name4

    Now, right-click TestId column in SMSS's Object Explorer and "Smart Rename..." it to "Id". After script ran, try selecting from "Test". What you get is:

    Id Name
    1 Name2
    2 Name4

    As you can see, values of identity column just renamed are screwed.

    Regards,
    Dmitry Gokun
  • Well, 11 monthes passed since i reported this problem. It's not fixed. Can you let us know if you ever have plans to fix it?

    Fix is as hard as adding SET IDENTITY_INSERT ON statement to generated script.. It's very frustrating that it makes such a big problem for RedGate to fix.
  • Eddie DEddie D Posts: 1,806 Rose Gold 5
    Hi Dmitry

    Sorry that we have overlooked this forum post.

    I have recreated your issue, as soon as our Bug Tracking system is back on line, I will check to see what the progress there is on the bug report and seek to update the urgency of this bug report.

    Also I will post back and provide an update to you.

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • Hello Eddie,

    thanks for picking up this ..

    Regards,
    Dmitry
  • And so it goes... No fix, no forum update. Good support, guys (Y)
  • PDinCAPDinCA Posts: 642 Silver 1
    Hi Dmitry,

    As a sometimes-frustrated fellow bug-reporter, I've found that if ANYONE posts a reply to the initial post, Red Gate's nightly post-crawler doesn't pick up your post and automatically add it as a case, which WILL get attention.

    Thus, if someone replies and you don't get a timely response from Red Gate, either:
      Post it again as a new thread, preferably late on Friday as few folks will see it and reply over the weekend. :wink: Email RG support directly, referencing the post - they are very responsive to direct approaches. Call the support line, referencing the bug and post.

    To NON-RED-GATE posters:
    Unless you are offering a SOLUTION, REFRAIN from posting a reply to an INITIAL post reporting a bug! WAIT until Red-Gate has responded, then throw in your two-cents-worth, please...
    Jesus Christ: Lunatic, liar or Lord?
    Decide wisely...
  • Do not you think it's idiotic that we should do this magic to have bugs fixed in product we paid money for?

    What i do here is simple - we will not buy RedGate's products anymore and i will storngly advise all people i know to do the same. Thanks God, there full set of competitive products on the market.
  • PDinCAPDinCA Posts: 642 Silver 1
    Sorry to see you go, Dmitry.

    I've been a user of about 80% of the SQL tools for over 7 years and, yes, there have been some frustrations, but overall, having looked at and evaluated all the competition, Red Gate's tools are IMO, yes IMO, the best value for money and the most comprehensive.

    Hope you find support by the other vendors up to your high expectations. I have tools from three other vendors and their support is worse than Red Gate's and their availability, even for a US Company calling a US Vendor, much worse, too.

    Enjoy! :(
    Jesus Christ: Lunatic, liar or Lord?
    Decide wisely...
  • Eddie DEddie D Posts: 1,806 Rose Gold 5
    Hi Dimitry

    Sorry for my delay in replying back to you, following my post into this forum topic on the 1st May 2012.

    Upon checking our Bug Tracking system, there is an existing Bug Report, SP-3975. My colleague, Anu Deshpande (who originally replied to you on the 31st May 2011), submitted this bug report in early June 2011. Also a support call was created for this forum topic, call reference F0048263.

    I can only apologise that the above information was not communicated to you either via the support call or this forum topic.

    Unfortunately the bug you have reported to Red Gate in the Smart Rename Feature of SQL Prompt is still unresolved. Therefore I will be requesting that SQL Prompt Product Manager and SQL Project Manager review the Bug Report and generate a fix for this problem.

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • We have encountered this issue now as well in a project and really dissapointed this has not been resolved now more than two years since it was raised, a fundamental bug for a rename feature. Not impressed redgate.
  • Eddie DEddie D Posts: 1,806 Rose Gold 5
    Thank you for your posts regarding a problem with the Smart Rename feature of SQL Prompt.

    I have some good news, a patch has been generated that fixes this issue.

    Please download SQL Prompt V6.2.0.125 using this LINK.

    Any problems either reply to this forum post, or e-mail support@red-gate.com or submit a new support request via the support PORTAL.

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
Sign In or Register to comment.