- 博客(36)
- 资源 (6)
- 收藏
- 关注
原创 SQL Server 2012新特性_新的数据库还原选项
与旧的版本相比,2012对数据库还原的UI做了一些改动,下面一下看一看:新的时间点选择UI首先看一下下面的截图,在2012里增加了更加直观的备份时间线,DBA可以更加方便直观地指定还原的时间点,也能直接通过图例看出当前所要还原的文件备份类型。新的还原选项下面有两张图,其中上面的是2012的,下面是2008R2的。对比一下,就能很容易地看出两者的差别,及2012改进的地方
2012-03-29 11:09:04 8875 6
原创 SQL Server 2012新特性_增强的T-SQL编辑器
T-SQL编辑器在2012里有了进一步的增强,如支持代码片段、支持在完成列表中进行 substring 方式匹配及断点验证等。下面一起来看看:断点验证如下图,在2012的编辑器里,在一些无效的位置(如示例中的第3、4行)设置断点时,会在编辑器的左下角出现“这不是断点的有效位置”的信息提示,而在2008R2及之前的版本中,是不会有这样的提示的。2012的这个新特性,就可以避免一些有意或无
2012-03-29 10:29:27 3667
原创 SQL Server 2012可编程性新特性_8_OVER 子句功能增强
OVER 子句在2012里增强了其功能,现在可以计算出移动平均值、累计合计,同时可以指定ROWS(也可以用RANGE)子句,具体可以通过如下示例体会一下其含义: MSDN:http://msdn.microsoft.com/zh-cn/library/ms189461.aspx
2012-03-28 15:31:23 1403
原创 SQL Server 2012可编程性新特性_7_分析函数
SQL Server 2012 支持以下分析函数:CUME_DIST、PERCENT_RANK、FIRST_VALUE、LAST_VALUE、LAG、LEAD、PERCENTILE_CONT、PERCENTILE_DISC,用来基于一组行计算聚合值。不过,与聚合函数不同,它们可能针对每个组返回多行。 可以使用分析函数来计算移动平均线、运行总计、百分比或一个组内的前 N 个结果。CU
2012-03-28 14:03:13 2517
原创 SQL Server 2012可编程性新特性_6_14个新的内置函数
SQL Server 2012 引入了 14 个新的内置函数。这些新函数是:转换函数(3个):PARSE、TRY_CONVERT、TRY_PARSE日期和时间函数(7个):DATEFROMPARTS、DATETIME2FROMPARTS、DATETIMEFROMPARTS、DATETIMEOFFSETFROMPARTS、EOMONTH、MALLDATETIMEFROMPARTS、TIM
2012-03-28 10:16:19 1759
原创 SQL Server 2012可编程性新特性_5_sp_describe_first_result_set
过去,如果要确定查询或存储过程的返回结果类型,需要使用SET FMTONLY命令。使用该命令可以在不需要实际执行查询的情况下预览返回结果的列信息。可惜的是,返回的信息仅仅局限于列的定义,而如果只要先前执行查询便能够获得这些信息。现在,SQL2012通过使用新的sp_describe_first_result_set存储过程,便可以获得查询和存储过程返回结果的详细信息。这些信息包括数据类型及其规模、
2012-03-27 12:59:12 2031
原创 SQL Server 2012可编程性新特性_4_WITH RESULT SETS
在之前的版本基础上,2012新增了可以使用 WITH RESULT SETS 选项定义结果集的元数据的功能。我们知道,存储过程中返回结果集是很常见的,但如果想要控制部分返回结果集的字段名和数据类型将会是很困难的。SQL Server 2012引入一个新特性WITH RESULT SETS,可以重新定义存储过程中返回结果的字段名和数据类型。这会使得向拥有特定字段名和数据类型的临时表的结果集中插入记录
2012-03-27 11:04:23 2025
原创 SQL Server 2012可编程性新特性_3_THROW
T-SQL从2005年就开始支持TRY-CATCH ,但直到2012才有THROW。THROW不带参数,其用法与C#和VB中catch块中的throw类似。也就是说,它会重新抛出异常,而不会丢失当时捕捉到的任何信息。它对于向重试队列记录或添加条目很有帮助,同时也可以通知应用程序出错。当THROW带参使用时,它类似于RAISERROR,不同之处在于它支持sys.messages之外的错误信息号(er
2012-03-27 08:58:42 1368
原创 SQL Server 2012可编程性新特性_2_OFFSET
通过 OFFSET-FETCH 子句,您可以从结果集中仅提取某个时间范围或某一页的结果。OFFSET-FETCH 只能与 ORDER BY 子句一起使用。如下,从排序的结果集中跳过前2行并返回接下来的2行,可以通过ROW_NUMBER()来实现,但通过SQL2012的新特性OFFSET来实现更为简便;如果要从排序的结果集中跳过前2行并返回剩余的行,则只需将下面示例当中的FETCH NEXT 2
2012-03-26 21:44:14 1249
原创 SQL Server 2012可编程性新特性_1_Sequence
SQL Server 2012可编程性新增了一些新的特性,这些特性使得我们的日常工作变得更加简单,下面一起来学习一下:序列(Sequence)是一种用户定义的架构绑定对象,它根据创建该序列时采用的规范生成一组数值。这组数值以定义的间隔按升序或降序生成,并且可根据要求循环(重复)。 序列不与表相关联,这一点与标识列不同。有两种方式创建序列号,一是通过对象资源管理器-->DB-->
2012-03-26 16:14:20 1738
原创 Business Intelligence Center
在SharePoint的BI中心,将Report集成并显示出来,是我当初学习SharePoint的其中一个重要目标,下面也是粗略地将大致的步骤罗列一下:激活如下相关功能,否则创建库时看不BI中心模板创建BI中心创建数据连接前,需完成如下两步,否则将会报“Thefollowing data source cannot be us
2012-03-26 10:32:22 1191
原创 在SharePoint Server 2010上创建和发布Report
SharePoint作为资源共享和信息集成展示的强大平台,在该篇Blog中,将粗略地展示如何在SharePoint Server 2010上创建和发布Report。单击Report Data Source,创建数据源点击Report Builder Report启动Report Builder 3.0启动VS,创建Report Server Project
2012-03-26 10:04:23 1420
原创 在SharePoint Server 2010上搭建Report的发布环境
—创建一个资产库(Asset Library)—单击Library Settings进入设置环境—向库里添加如下红框里的3种内容类型—根据需要创建文件夹,以便分类
2012-03-26 09:46:16 1060
原创 如何在独立服务器上安装和配置 SharePoint 集成
学习SharePoint2010时,首先要安装相关所要的工具或环境,如SQL Server引擎、Reporting Services、Reporting Services 外接程序,之后就是要按照向导安装和配置SharePoint Server 2010。记得当初安装好后,在刚开始体验和学习时,总是遇到“Failed to establish connection with report serv
2012-03-26 09:35:56 1278
原创 SQL Server 2012 新功能一览
微软于3月7日正式发布SQL Server 2012(以后简称SQL2012)。SQL2012发布之前,有幸公费参加2011微软技术大会(北京),当时不是称为SQL Server 2012,而是其前身SQL Server Denali。 大会上,了解到Denali新增了支持Windows服务器核心的功能,让SQL Server安装能够更简洁和高效,有望减小潜在的攻击面、减少打补丁的
2012-03-23 09:10:54 10218
原创 Event Handling with Windows PowerShell 2.0
Unlike Windows PowerShell 1.0, for which you need to use .NET classes, such as the System.Management.ManagementEventWatcher class to subscribe and monitor events, Windows PowerShell 2.0 CTP3 provides
2012-03-22 15:25:57 1801
原创 WMI Query Language (WQL)
The WMI Query Language (WQL) is designed to perform queries against the CIM repository to retrieve WMI information. WQL is a subset of ANSI SQL with minor semantic changes to support WMI. Therefore,it
2012-03-22 13:31:18 2788
原创 WMI Provider for Server Events
You can use WMI to monitor server events.This provider manages a WMI namespace for each instance of SQL Server 2008. The name of the namespace is in the formatroot\Microsoft\SqlServer\ServerEvents\i
2012-03-22 13:20:06 869
原创 Changing SQL Server Advanced Properties with WMI Provider
Suppose the file system is corrupted,in which case you need to restore every database, including the master database. To restore the master database, you need to start the SQL Server in single-user mo
2012-03-22 12:32:06 829
原创 Changing FILESTREAM Settings
By default, FILESTREAM is disabled. Before starting to use it on a SQL Server instance, FILESTREAM needs to be enabled on the instance. The FILESTREAMSettings class provides an EnableFILESTREAM method
2012-03-22 11:15:26 824
原创 Managing Server Network Protocols with WMI Provider
To view the list of properties associated with each network protocol for the default instance on the local computer:Get-WmiObject -namespace root\Microsoft\SqlServer\ComputerManagement10 -class Serv
2012-03-22 10:56:01 909
原创 Managing SQL Server Client Aliases with WMI Provider
SQL Server client aliases make user connections easier, faster, and more convenient. Each alias saves all the information you need to connect to a SQL Server, such as the server name and the client pr
2012-03-22 09:51:16 1204
原创 Managing Client Network Protocols with WMI Provider
The ClientNetworkProtocol class represents the objects for client network protocols. To see the list of protocols of ClientNetworkProtocol class:Get-WmiObject -namespace root\Microsoft\SqlServer\Com
2012-03-21 14:58:18 1157
原创 Managing SQL Server Services with WMI Provider
The WMI Provider for Configuration Management provides access to WMI objects in the root\Microsoft\SqlServer\ComputerManagement namespace for SQL Server 2005,and the root\Microsoft\SqlServer\ComputerM
2012-03-21 13:55:24 767
原创 StdRegProv
The StdRegProv class contains methods that manipulate system registry keys and values.To check all the methods that are available from the class StdRegProv:$Reg = [WMIClass]"root\default:stdRegPro
2012-03-21 12:09:48 1310
原创 Win32_Environment
Querying this WMI class returns environment variables found under the registry key HKLM\System\CurrentControlSet\Control\Sessionmanager\Environment. To access all the variables and their values by
2012-03-21 11:12:35 912
原创 Win32_Process
To get a list of processes on your local computer:Get-WmiObject -class Win32_Process To get the values of related properties for the process sqlservr.exe, the SQL Server service:Get-WmiObject
2012-03-20 13:07:59 3361
原创 Win32_Service
To get a list of services on the local or remote computer:Get-WmiObject -class Win32_ServiceGet-WmiObject –computerName RemoteHostName-class Win32_Service To get the SQL Server service of the
2012-03-20 10:37:51 2278
原创 Win32_NTEventlogFile
To get a list of log files available on your local computer:Get-WmiObject -class Win32_NTEventlogFile | Format-Table –wrap To access the log files on a remote computer:Get-WmiObject -computerN
2012-03-19 15:42:21 2517
原创 The WMI Model
¤The WMI model has three layers:The lowest layer in the WMI model is managed resource. Windows resources that can be managed using WMI include event logs, services, processes, environment variables,
2012-03-16 16:20:48 751
原创 Permission Issues and WMI
In order for WMI to work, the Windows Management Instrumentation service must be running.The service cannot be disabled and it must run under the local system account. If this account is changed, WMI
2012-03-16 14:09:40 704
原创 Windows PowerShell and Processes
All the available cmdlets related to processes can be found by executing the following cmdlet:Get-Command *process* -CommandType "cmdlet" Get-ProcessTo get a list of processes running on the l
2012-03-16 13:10:12 706
原创 Windows PowerShell and Services
To find all the cmdlets that are related to Windows services, execute the following command:Get-Command -CommandType cmdlet *service* Get-ServiceTo find all the running services that start wit
2012-03-16 11:11:57 1194
原创 PowerShell cmdlets Related to event log
The most commonly used cmdlets related to event logging are as follows:Get-EventLogClear-EventLogShow-EventLogLimit-EventLogWrite-EventLogNew-EventLogRemove-EventLog clear the events
2012-03-15 16:35:03 967
原创 To find all the log types available on the local or a remote computer
Excute the following command to find all the log types available on the local or a remote computer:Get-EventLog –listGet-EventLog -computerName RemoteServerName –list Query all the entries in
2012-03-15 15:44:15 567
原创 How to see all the application errors related to SQL Server and export them to a .csv file.
How to see all the application errors related to SQL Server and export them to a .csv file? Just use below command: Get-EventLog -LogName "Application" -computername RemoteServerName | Where-Obje
2012-03-15 15:05:05 686
transaction-log-management
2013-06-06
How to boost DB server's performance
2008-09-25
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人