为了账号安全,请及时绑定邮箱和手机立即绑定

YourSQLDba的翻译

标签:
产品

第一个问题是需要问的是我需要定制吗?在一个双核cpu 12G内存 200G硬盘的机器中,维护任务执行得很好
这花了大概2个小时去完成所有的事情

然而定制是必须的对于一个工具的默认配置.总是有特别的案例或者数据库需要特别的照顾.YourSQLDba_DoMaint 存储过程有一些有趣的参数去包含了或者排除了数据库根据他们名字多个通配符的选择条件.这些通配符都是根据SQL"like"操作符.也有默认的操作需要被管理.默认日志备份会在所有的完整恢复模式的数据库上执行.如果
一个数据库在简单恢复模式遇到了意外怎麽办?日志备份会派上用场.YourSQLDba的存储过程能够提供检测和标记这种状况的解决方案吗?是的,只要声明一个包含的数据库通配符列表.如果一个数据库被还原.而没有新的完整备份执行过,并且这不在测试环境呢?尝试去做日志备份去引发SQLSERVER错误信息。在一个受保护环境这是很好的,你想要有日志备份,在测试环境这是很烦人的。YourSQLDba提供一个特别的参数去避免这些消息

定制YourSQLDba是很容易的,因为
你能够做维护任务选项定制
因为YourSQLDba是一个基于主要存储过程,和参数允许去
选项哪个维护任务去执行
执行数据库选择会使用通配符
选择数据库备份文件保留路径
执行统计信息更新

TSQL 支持默认参数,所以存储过程能使用默认值以避免破坏了实际定制的改变

你能够把维护作业细分为多个子步骤通过不同的参数选项
作业会使用SQLSERVER代理来运行
SQLSERVER代理允许添加步骤到默认的维护步骤。一个简单的实践是细分默认维护步骤为两个或多个连续的步骤
然后对于每个步骤调整维护任务的参数。使用多步骤避免维护任务并行运行,因为他们是一个紧挨一个运行的
你能根据环境定制维护任务
YourSQLDba使用SQLSERVER 数据库邮件去通知DBA 或者应用程序管理者。这很容易去改变profile的邮件配置
和邮件帐户
YourSQLDba使用SQLSERVER代理操作员去存储邮件接受者去维护消息
YourSQLDba默认有一个操作员参数已经设置好了,你可以改变这个操作员

 

 

How to customize YourSQLDba maintenance
  

Updated : 2009-02-25

The first question to ask is do I need them ?  On a double dual-core machine with 12Gb of ram and around 200Gb of data the default maintenance perform well.  It takes around 2 hours to complete everything.

Customization is however a must for a tool which by default does almost anything.  There is always special cases or database than have special needs or can't be managed as the other.  YourSQLDba_DoMaint stored procedure have interesting parameters to dynamically include or exclude databases based on their name with multiple wildcard selection criteria.  These wildcards are based on SQL "like" operator.  There is also default behavior that need to be managed.  By default log backups are done for all databases in full recovery mode.  What if, a database is put accidently in simple recovery mode ?  Log backups can be taken.  Is YourSQLDba procedure provide means to detect and signal this unwanted situation ? Yes. Just specify an include database wildcard list.   What if a database is restored, and no new full backup is performed, as it arrives often in a test environment ?  Trying to do log backup raise an SQL Server error message.  In a production environment it is great, you want to have log backups, in test environment it is annoying.  YourSQLDba provides a special parameter to avoid these messages (the default is for production environment).

Customization is easy with YourSQLDba.  It is possible because:

You can do maintenance option customizations
Because YourSQLDba is based on a main stored procedure, parameters allow to:
Chose which maintenance tasks to process
Perform database selection using multiple include/exclude wildcard of type "like" selection.
Choose database backup file retention (one for full backup, the other for log backups)
Spread update statistics load over a specified number of day
Etc. Etc
T-SQL support default parameters, so the procedure can and will be enhanced using default value for them to avoid breaking changes to actual customizations.
 
You can subdivide maintenance job is substeps with different parameter option
It uses SQL Server Agent to be run.
SQL Server Agent allows to add step to the default maintenance step.  A easy practice is to divide the default maintenance in two or more consecutive steps, and tailor maintenance parameters for the each step (like database selection parameters, operator, database backup retention, maintenance options).  Using steps avoids concurrent maintenance processes, because they run one after another.
You can do environment maintenance customization
YourSQLDba uses SQL Server DatabaseMail to communicate with DBA Admin, or application admin.  It is easy to modify email configuration of the profile and account used by YourSQLDba.
It uses SQL Server Agent Operator definition to stored email recipients to maintenance messages
YourSQLDba have an operator parameter which is set by default to YourSQLDba_operator.  This can be changed

 

点击查看更多内容
TA 点赞

若觉得本文不错,就分享一下吧!

评论

作者其他优质文章

正在加载中
  • 推荐
  • 评论
  • 收藏
  • 共同学习,写下你的评论
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦
今天注册有机会得

100积分直接送

付费专栏免费学

大额优惠券免费领

立即参与 放弃机会
意见反馈 帮助中心 APP下载
官方微信

举报

0/150
提交
取消