Script DB problem

  • Hello evryone, i m using SQLServer 2005, in this while generating script (for backup purposes), it generates the

    script but without the drop stmts of already existing table, functions, SP , view etc.

    Kindly tell me y its not adding the drop stms of the objectsin the script, as in SQL Sever 2000,

    during script generation it firstly create the Drop obj stms than creating stms of the objects, as after making some chnages in the DB

    , if i run the script than firtly i dropped the SPs, functions maually in 2005, than run the script.

    plz tell me how i generate the drop stms while generating the script of the database.Thanx in Advance.

  • go to ssms and use the generate script for database. In the wizard, initially you can selet what all objects you want to script In the further steps you will get the scripting options and there down you will get the "drop existing" option.

  • Thanx for ur reply, but i cant find the option "drop existing", in this no option exists with this name.

  • open SSMS --> Databases (click the righ button of your mouse) --> tasks --> Generate Scripts.

    This will open the wizard. Select your database and click next. In the script options, change the "SCRIPT DROP" to true. Proceed.

    http://rajanjohn.blogspot.com/

  • Got resolved?

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

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