Use PowerShell to Script SQL all Database Objects without data daily RRS feed

  • General discussion

  • Hi Team,

    Here is the requirement from my client.


    SQL team, 

    We want to ensure that you have a script which saves the current structure of the schema – ESB_MSGS (DB Name). This has to run every day and schema structure with indexes and all other relevant information apart from data has to be saved/backed up.


    In this way, whenever there is any serious issue with DB. We can standup a temp DB server and execute the scripts to support the applications. Our applications don’t care about the data inside the table. Data in table is required for futuristic purpose so having data is not our top priority but having a functioning DB is our top priority.

    My Question: 

    I would like to take script of entire database without data on daily basis . We dont bother about data. We need only structure of database and we want everything except data.

    Could you please provide a solution or share me any scripts/power shell scripts /process on this.

    Venkat Thota

    • Changed type Bill_Stewart Monday, October 22, 2018 2:13 PM
    • Moved by Bill_Stewart Monday, October 22, 2018 2:13 PM This is not "scripts on demand"
    Wednesday, September 12, 2018 2:40 PM

All replies