关于Windows PowerShell的想法(二)

来源:互联网 发布:部落冲突胖子升级数据 编辑:程序博客网 时间:2024/06/12 01:20

奇怪为什么在安装SQL2008时会有这个工具,在联机从书中看到了新特性之一后就明白了:

"

SQL Server PowerShell Provider and Cmdlets

SQL Server 2008 introduces two PowerShell snap-in dll files that implement the following:

  • A SQL Server PowerShell provider that exposes the SQL Server Management Object models as paths similar to file system paths. Each node in the path is associated with a SQL Server Management Object class.

  • A set of SQL Server PowerShell cmdlets for tasks such as running sqlcmd scripts or encoding delimited identifiers for use in PowerShell paths.

In addition, there is a new sqlps utility that launches a PowerShell environment configured with the SQL Server features such as the provider and snap-ins. A PowerShell subsystem has been added to SQL Server Agent so that you can run PowerShell scripts on a schedule or in response to 数据库引擎 events. You can launch SQL Server PowerShell sessions by right-clicking Object Explorer nodes in SQL Server Management Studio. For more information, see SQL Server PowerShell Overview."

打开相应的链接进入了介绍,这里面的另一句话让我更为吃惊:

"SQL Server 2008 introduces support for Microsoft PowerShell. PowerShell is a powerful scripting shell that lets administrators and developers automate server administration and application deployment. The PowerShell language supports more complex logic than Transact-SQL scripts, giving SQL Server administrators the ability to build robust administration scripts. PowerShell scripts can also be used to administer other Microsoft server products. This gives administrators a common scripting language across servers."

看起来MS是想借.net平台做一个类似于MMC的玩意儿,只不过这个是用来写脚本进行管理,而MMC是图形界面的,并且业界一直传着:能用图形界面的命令行方式就一定能完成,能用命令行完成的,图形界面不一定能完成.MS看来是要增强命令行,而且还要和UNIX SHELL一样,能做强大的脚本.

原创粉丝点击