Home Forums Programming SMO/RMO/DMO Can I use SMO to script out schema objects from a database ? RE: Can I use SMO to script out schema objects from a database ?

  • Wow that is alot of work

    Why arent you using the SMO option. I have other options but I would suggest that you research what you need.

    ScriptingOptions scropt = new ScriptingOptions();

    scropt.ScriptSchema = true;

    scropt.AllowSystemObjects = false;

    SchemaCollection schemacoll;

    schemacoll = db.Schemas;

    foreach (Schema schemas in schemacoll)

    {

    schemas.Script(scropt);

    }