天天看點

YourSQLDba介紹

YourSQLDba介紹

YourSQLDba是一個法國人寫的程式,它是由一系列T-SQL存儲過程構成的腳本檔案。可以了解成一個元件或安裝包,進而簡化了在Mircorsoft SQL Server 2005/2008 資料庫的安裝,部署。它可以提供自動、複雜,非常容易定制的資料庫維護管理,進而可以極大的讓DBA從繁雜的維護工作中釋放出來。這是一個優秀的工具,可以減輕你的工作。也是每個DBA應該努力的方向,可以編寫自己的資料庫管理維護工具,讓你從繁雜的工作中解脫出來。

YourSQLDba的官方網站:http://www.grics.qc.ca/yoursqldba/index_en.shtml

主要設計目标

   1. 實作SQL伺服器維護的最佳實踐

   2. 易于部署(從後面的介紹可以看出)

   3. 沒有依賴其他工作的SQL代理和工作SQL Management Studio等

   4. 大量日志記錄和報告,非常便于診斷問題

   5. 確定維護問題可以自動産生報告

   6. 確定嚴重的情況也不容忽視很長時間。

功能介紹

  完整備份和日志備份的自動化

  執行更新統計資訊(通常每隔一個指定的周期執行一次,預設是一周)

  選擇性reorganize或重建那些超過閥值的索引。

  檢查資料庫的完整性。

  保持MSDB的最新備份,并記錄備份曆史(每個完整或日志備份周期)

  清理曆史記錄(備份、Sql Agent、 Sql Maintenance)

  清空(回收)SQL Server錯誤日志每天(30條以上歸檔)

  提供簡單的存儲過程工具做手工備份、複制資料庫、恢複資料庫

  資料庫維護任務的Schedule

  配置資料庫郵件維護報告

  發送電子郵件,定期通知維護活動。

  發送異常郵件通知資料庫維護中的一些問題

    Disable immediately databases with integrity problem

  當備份失敗超過3次時,禁用資料庫備份(手工備份可以重置失敗次數)

   Connect network drives visible to database engine for backup purposes, and make them auto-reconnect at startup.

對應英文文檔如下:

  Automate full backups and recurrent log backups.

  Perform update statistics (spread all of them over a specified period of time, by default a week)

  Selectively reorganize or rebuild index that show a fragmentation thresold

  Check database integrity

  Keep an up-to-date backup of MSDB which record all backup history (at the end of each full or log backup cycle)

  Clean-up history log (backup, Sql Agent, Sql maintenance)

  Recycle SQL Server error log every day (keep up to 30 archives)

  Provides simplified sp utilities to do manual backup, duplicate database, and restore database.

  Schedule agent task for maintenance

  Configure database mail for maintenance reporting

  Send e-mail that regular notify maintenance activity

  Send exceptional e-mail for notifying problematic maintenance  issues

  Disable immediately databases with integrity problem

  Disable databases which failed to be backup more than 3 consecutives times (manual backup can reset the failure count)

  Connect network drives visible to database engine for backup purposes, and make them auto-reconnect at startup.

版本跟新情況

YouSQLDba的最新版本是2012-06-12年釋出的Version 5.0.2版本。

12-003

Release – Version 5.0.2 2012-06-12 of YourSQLDba

2012-06-12

12-002

Release – Version 5.0.1 2012-03-20 of YourSQLDba

2012-03-20

12-001

Release – Version 5.0 2012-03-02 of YourSQLDba

2012-03-02

11-006

Release – Version 4.0.11 2011-10-06 of YourSQLDba

2011-10-06

11-005

Release – Version 4.0.9 2011-09-21 of YourSQLDba

2011-09-21

幫助文檔

你從官網下載下傳的YourSQLDba_ENU.chm幫助時,要注意不要下載下傳了法文的文檔。基本上關于YouSQLDba的資料都可以從幫助文檔擷取。

安裝過程

YourSQLDba的安裝步驟很簡單,首先安裝前,你先看一下幫助文檔的Deployment & Update文檔部分。對整體安裝部署有個了解先。

1:打開SQL Server Management studio. 建立一個查詢界面。

2:然後通過幫助檔案中的“Click here to open the script”連接配接,進去複制拷貝腳本YourSQLDba_InstallOrUpdateScript.sql。

3:執行腳本成功後,會在資料庫執行個體上建立一個YourSQLDba 資料庫和相關的維護程式。

                                     

YourSQLDba介紹

4:解決方案成功部署之前,需要初始化設定。初始化設定是一個存儲過程,是這一解決方案的一部分。

文檔中例子如下:

YourSQLDba介紹

從名字可以看出YourSQLDba_FullBackups_And_Maintenance 它主要是做全備以及維護工作。YourSQLDba_LogBackups作業做日志備份工作。有時候需要對這兩個作業的指令根據具體需要和需求做出具體調整。例如做全備或日志備份時,排除某個資料庫等,設定保留周期等等。

YourSQLDba介紹

5:設定接收郵件的郵箱位址,初始化之後,它會建立一個叫YourSQLDba_Operator的操作員,你去裡面添加

YourSQLDba介紹
YourSQLDba介紹

這個時候基本上就配置成功了,你會在備份目錄看到,相應的備份檔案将會生成。

使用情況

接下來你會收到YourSQLDba發送過來各類郵件(備份情況郵件)

                                    維護報告

YourSQLDba介紹

                                報錯郵件

YourSQLDba介紹

如果發現上面出錯報告,你可以執行郵件裡面的腳本,這樣你就可以在“Action”列看到報錯的詳細資訊(見下圖),然後就可以着手解決問題。

YourSQLDba介紹