Script to create Database & User ?

  • I'm looking to save time in the future by using a simple form that takes the input and creates a DB and a new user (with Db owner privileges).

    Is there such a script out there?

  • In SQL 2005, you can use the SMO objects to create your database, table, column and more others. The code for the same is available in microsoft virtual labs sessions in SMOs.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

  • You might also want to check out this app I wrote on codeplex.  it's a console app that will script out the entire db, separate file for each object.

    http://www.codeplex.com/scriptdb

    ---------------------------------------
    elsasoft.org

Viewing 3 posts - 1 through 2 (of 2 total)

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