开发者

Scripting the creation of a database from a backup in SQL Server

开发者 https://www.devze.com 2023-03-12 05:46 出处:网络
I currently have a tediously long process for creating new instances of a CMS we make. I plan to script as much of the process as I can, using Python.

I currently have a tediously long process for creating new instances of a CMS we make.

I plan to script as much of the process as I can, using Python.

The first step is creating a database.

Currently it is a manual process where I will create an empty database "MyNewSite" and then select restore from backup and restore it from the "master" db file. Before the restore I change the data and log paths accor开发者_如何学Pythondingly (so they dont overwrite the master).

Is there any way to automate this? I'm not really sure where to begin so any help would be appreciated.


The CMS you make should have a deployment script. All your development process should update upgrade scripts, never touch the database directly. Database updates should be deployed through source code (upgrade scripts) and version control: Version Control and your Database.

0

精彩评论

暂无评论...
验证码 换一张
取 消