YourSQLDba的翻译(五)

 YourSQLDba的翻译(五)

有以下几个步骤去部署或升级 YourSQLDba
1、启动SSMS
2、点击“新建查询”按钮
3、复制YourSQLDba_InstallOrUpdateScript.sql 脚本到SSMS里的查询窗口里并执行脚本来创建或更新
YourSQLDba数据库和维护计划

我在部署、升级和初始安装里做了区别
这个解决方案需要在初始安装之前被部署,初始安装是这个解决方案的存储过程的一部分
部署或者升级只需要运行解决方案定义的那个脚本就行了
初始部署YourSQLDba的时候不需要任何参数,只需要打开并运行脚本即可,当以后有新的版本
只需要执行新的脚本,新的特性自然会添加到YourSQLDba

安装完毕之后,YourSQLDba只会在master数据库产生唯一一个存储过程,叫做CreateNetworkDrive
这个存储过程会在数据库启动的时候执行。它在启动的时候会关注YourSQLDba.Maint.networkDrives表是否有驱动器符号与UNC路径匹配。这个进程会让这些驱动器盘符可以访问当SQLSERVER数据库引擎备份数据库的到这些驱动器的时候。这些映射可以被记录/清除 ,而记录和清除调用的存储过程就是
YourSQLDba.Maint.CreateNetworkDrives 和YourSQLDba.Maint.DeleteNetworkDrive

初始化安装存储过程必须要执行并配置,使您的YourSQLDba可以操控并正常使用,这个存储过程是需要参数的

 

YourSQLDba
Deployment & upgrade
  

Updated : 2009-02-25

Steps to deploy or upgrade YourSQLDba :

1. Start SQL Server Management studio.

2. Click the tool  New query to the top left side of the windows.

3. Copy the script YourSQLDba_InstallOrUpdateScript.sql (Click here to open the script) in the new window and execute this script to create or update the YourSQLDba database and maintenance procedures.

I make a distinction between deployment & upgrade and initial setup.

This solution need to be deployed before initial setup.  Initial setup is a stored procedure that is a part of this solution.

To be deploy or upgraded just run the script that defines de solution.

The script is made in a way that it preserves its log history, and SQL Server Agent tasks that run maintenance, customized or not.  It finds itself the actual state of the version and perform selectively cumulative updates to bring it to the latest version that the script represent.

Deployment creates YourSQLDba database if it doesn't exists, and creates or upgrade existing objects contained in it.

By itself initial deployment requires no parameters, just open and run the script.  The same applies for upgrading to the latest version.

Setup create only one stored procedure in master : CreateNetworkDrive. This procedure is marked as a startup procedure. It looks at startup into table YourSQLDba.Maint.networkDrives to find out if there is drive letters to map to UNC location.  This process make these drive letters accessible to SQL Server engine for backup purposes.  These mappings can be recorded/erased  into/from this table using procedures YourSQLDba.Maint.CreateNetworkDrives and YourSQLDba.Maint.DeleteNetworkDrive.

This is initial setup (running a YourSQLDba stored procedure that need parameters) that configures everything necessary to make it operational and alive

你可能感兴趣的:(sql)