Scripting Wizard

  • Hi all

    I've been trying to script about 12 view, these view already exist in the destination db. Now when I use the wizard with the IF Exist and "Create Only" options it does not include the drop statement. How would I go about to include the drop statement in the script generated by the wizard.

    l0n3i200n

  • I would very much like to see the answer to your above stated question.  I have run into the same problem (it applies to tables and procedures as well).  I have been using the Create Only and manually adding the Drop statement before running the script.  This is becoming tiresome.  Did you note that while the dropdown contains only the choices Create or Drop, the Description of the dropdown at the bottom of the screen contains all 3 options.

    Frustrated in Florida!

  • Hi Sophie

    I did notice the descriptions. I would think MS did remove the drop for safety reasons. ( or it can just be a plain bug ).  I'm running SP 1 and it still didn't correct the problem.

  • Supposedly they added this functionality back in in SP2.  Haven't had time to test it yet myself though

  • Thanks Anders... you're right, it's in SP2.  I'm having my guys install it this afternoon.  The line reads:  Generate Script Wizard. You can now specify that the scripted objects include a DROP statement before the CREATE statement.  Scripting of objects into separate files is now possible. This feature is supported in SQL Server 2005 Express Edition SP2.  I'm looking forward to it, I hope l0n3i200n does too!

    Thanks again.

  • I sure am looking 4ward to it. Thanks for all the replies and advice.

  • Hi

    I've just upgraded my sqlexpress version to SP2. It still doesn't include the drop statement. Do I need to set something to make it insert it or is my luck just bad...

    SELECT @@Version

    returns

    Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86)   Apr 14 2006 01:12:25   Copyright (c) 1988-2005 Microsoft Corporation  Developer Edition on Windows NT 5.0 (Build 2195: Service Pack 4)

     

  • Well, I seem to be having the same bad luck.  I also installed SP2 and the dropdown has exactly the same choices as before.  It appears we have come full circle.

    Anybody out there have any other suggestions?

  • G8 news

    The latest service pack for sql 2005 now includes the drop statement option in the scripting wizard as a switch. I used it and it works like a charm.

    Just though I'd let ya now.

     

    ,Cheers

    l0n3i200n

Viewing 9 posts - 1 through 8 (of 8 total)

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