Scripting Objects with PowerShell

  • Can I download scriptdatabase.ps1 file? I do not see link to it.

  • > For the way we work, the databases are built from source control node in a build environment

    How much data do you generate for your build environment from your source control node?

    Do you ever try your code on 3, better 5 years worth of data?

    How long does it take to regenerate such a data set on a DEV machine?

    _____________
    Code for TallyGenerator

  • amitelman - Friday, May 4, 2018 2:24 PM

    Can I download scriptdatabase.ps1 file? I do not see link to it.

    Added

  • Thank you Steve for posting script.
    Usually people added just a handful of object types they want to script. Tables, views , SPs
    For source control, I don't want to miss any objects. How can I get whole list of scriptable objects?
    I have this but not sure it's complete list:
    ApplicationRoles,Assemblies,AsymmetricKeys,Certificates,DatabaseAuditSpecifications,Defaults,ExtendedProperties,ExtendedStoredProcedures,
    Federations,FileGroups,FullTextCatalogs,FullTextStopLists,LogFiles,PartitionFunctions,PartitionSchemes,PlanGuides,Roles,Rules,Schemas,
    SearchPropertyLists,Sequences,ServiceBroker,StoredProcedures,SymmetricKeys,Synonyms,Tables,Triggers,UserDefinedAggregates,
    UserDefinedDataTypes,UserDefinedFunctions,UserDefinedTableTypes,UserDefinedTypes,Users,Views,XmlSchemaCollections

  • All objects should be in the SMO model somewhere. Dig through the classes to add what you need:
    https://msdn.microsoft.com/en-us/library/mt571730.aspx

Viewing 5 posts - 16 through 19 (of 19 total)

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