哪种工具/技术:数据库和相关服务的系统管理 [英] Which tool / technology: System management for databases and dependent services

查看:87
本文介绍了哪种工具/技术:数据库和相关服务的系统管理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

系统上的后续操作管理问题:

由于我可能不会在上获得很多反馈. serverfault 我会在这里尝试一下.

Since I probably will not get much feedback on serverfault I'll give it a try here.

我主要关心的是反映我必须管理的数据库,服务和任务/作业之间的依赖关系.

My main concern is to reflect the dependencies between the databases, services ans tasks/jobs I'll have to manage.

除了考虑Powershell之外,我什至考虑使用MSBuild,因为它将允许对依赖关系进行建模并重用配置目标.

Besides considering Powershell, I even thought about using MSBuild because it would allow for modeling dependencies and reuse configuration targets.

换句话说: 我应该使用什么技术来开发灵活的解决方案,使我能够以正确的顺序停止机器D上的服务A,B和C,并禁用任务E在计算机F上,何时删除数据库X?

...,而在删除数据库Y时,我想重用该部分来停止服务B和C.

推荐答案

如果您熟悉PowerShell并想使用依赖项,请尝试蛋糕.看起来像什么:

If you are familiar with PowerShell and want to work with dependencies, try psake. What it looks like:

psake script.ps1:-------
properties {
 $dbServer = 'sqlexpress'
 ...
}
task default -depend StopServer1, StopServer2

task StopS1 -depend MakeS1Backup, StopSqlServer1 {
 ...
}
task MakeS1Backup {
 ... make backup
}
task StopSqlServer1 {
 stop-service ...
}
# and anything similar to StopServer2

那么您可以这样称呼它(有更多选择):

Then you may call it like this (there are more options):

Invoke-Psake script.ps1 
#or
Invoke-Psake script.ps1 -task StopS1 #calls only StopS1 task and all other scripts it depends on
#or
Invoke-Psake script.ps1 -task MakeS1Backup #only backups S1, it doesn't depend on anything else

它的作用-停止服务器1(任务StopS1),并在此之前处理StopS1所依赖的所有任务.因此,在停止S1之前,先对S1进行备份,并停止Sql server 1,依此类推.

What it does - it stops server 1 (task StopS1) and before that it processes all the tasks that StopS1 depends on. So before stopping S1 backup of S1 is made and Sql server 1 is stopped and so on.

我喜欢它比msbuild配置好得多,后者非常冗长和丑陋(尽管功能非常强大).

I like it much better than msbuild configuration, which is very verbose and ugly (although very powerfull).

这篇关于哪种工具/技术:数据库和相关服务的系统管理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆