- 博客(12)
- 资源 (12)
- 收藏
- 关注
原创 如何查看当前Open的Cursor
遇到错误:A cursor with thename ' ' already exists,想要看是什么代码导致的。找到下面几种方法. --测试声明Cursor并且打开DECLARE vend_cursor CURSOR GLOBAL FOR SELECT * FROMPurchasing.VendorOPEN GLOBALvend_cursor
2013-12-30 21:20:40 1417
原创 Set statistics time 输出 CPU time> elapsed time
今天用Set Statisticis time比较语句的执行时间,信息如下: SQL ServerExecution Times: CPU time = 199229 ms, elapsed time =156327 ms.SQL Serverparse and compile time: CPU time = 0 ms, elapsed time = 0
2013-12-26 17:06:58 1460
原创 分析SQL Server 给出的missing index建议
测试基于SQL Server 2008 AdventureWorks2008,TablePerson.Person.表中已经存在的索引定义: CREATE NONCLUSTEREDINDEX [IX_Person_LastName_FirstName_MiddleName] ON [Person].[Person] ( [LastName] ASC, [F
2013-12-25 20:35:30 2977
原创 Reporting Service textbox换行
如果字符串很长,希望在SSRS中的textbox中按照要求换行,该如何实现呢? 可以直接使用换行符vbCrLf 比如在TextBox的表达式中输入: ="Test Name" + vbCrLf +vbCrLf +"Number” + vbCrLf +vbCrLf +”Priority” 就可以出现下面的效果: 可以看到既有换行,而且每行中间还隔了一个空行。
2013-12-24 21:18:43 7059 1
原创 修改SQL Server Cluster 节点 IP地址
如何修改SQL Server集群虚拟地址的文章,微软已经有专门的KB介绍,这里测试修改集群节点的IP地址。以A/P集群举例: 1. 在Passive的Node上网络适配器修改IP地址。修改完成后会看到Cluster Event里面有无法连接到Node的错误。 2. 在集群管理器中刷新Network资源,发现Passive Node上修改的IP地址已经成功显示
2013-12-24 17:20:17 2907
原创 查询SQLServer的启动时间
上午在分析索引的使用情况,想看一下数据库什么时候启动的,确保统计的数据没有问题,可以使用下面三种方法查询: SELECT sqlserver_start_timeFROM sys.dm_os_sys_info select crdate from master..sysdatabaseswherename='tempdb' SELECT login_time F
2013-12-24 14:19:55 2115
原创 使用DBCC DBINFO查询数据库信息
在使用 DBCC DBINFO之前我们先看你下面几个问题: 1. SQL Server是否升级过?安装时的版本是多少?2. SQL Server当前的内部版本号是多少?3. SQL Server上次成功运行DBCC CHECKDB的时间是多少?4. 日志是否被重建过5. 。。。。。。 上面所需要的信息只需要一个命令就可以了DBCC DBINFO(这个是Un
2013-12-20 09:58:18 2039
原创 Cognos中根据数据增长显示红绿灯
用户有一个需求,需要对比前后列的数值,如果负增长用红灯表示,正增长用绿灯,如果没有增长用黄灯表示。计算前后列数据的不同值可以使用Cognos的running-difference。 方法1: 打开GoSales(Query)的Package,使用库存名称空间的”国家或地区”,“期初盘存”两个字段,先创建列表拖入这两个字段。 在查询中创建两个新的数据项,分别命名为”Ru
2013-12-13 16:39:52 1581
原创 查询SQL Server Index上次Rebuild时间
朋友有一个Rebuild Index的Job执行一般停掉了,问我是否可以查看哪些Index已经被Rebuild过了。本来以为Sys.index或者Sys.objects会存储类似的信息,结果没有找到。 从网上查了一下,SQL Server没有存储类似的信息。但是因为Rebuild Index会自动更新统计信息,而统计信息的更新时间是可以获得的。所以我们可以大致根据统计信息的时间来估计。
2013-12-13 15:23:19 1651
转载 Cognos 如何让汇总行在明细列的顶部
用户希望将汇总的数据显示在第一行,但是Cognos默认出来的汇总数据是放在最后一行。在Cognos论坛看到一个帖子提到了解决办法: http://www.cognoschina.net/club/viewthread.php?tid=41673&pid=353555&page=1&extra=#pid353555 我按照上面文字提到的步骤自己做了一遍: 1.打开Report S
2013-12-06 11:27:50 2789
原创 SSIS 执行变量中的脚步输出列顺序与SQL查询列顺序不同
这个问题是朋友遇到的,做一个SSIS的程序将数据导入到txt。然后再用Oracle的工具导入到Oracle。但是在SSIS中执行变量脚步的时候,发现输出的列名称跟查询的列名称完全不同。 如图: 因为txt的格式已经定义好了,而且解析的程序也已经做好,所以如果txt列顺序有问题就会影响到后面的操作。查了一下好像没有地方可以调整输出量的顺序。 当然这个问题可以通过调
2013-12-04 10:53:21 1964
原创 2014 OLTP Memory Database lock 测试
根据微软的说法,由于内存数据库使用了乐观并发控制 ,所以事务不需要锁来锁定资源保证一致性。微软认为在内存数据库的事务中冲突和失败是非常少的情况,所以假定所有的并行事务都是成功的。因此写不会阻塞读,写也不阻塞写。 下面是原文:Transactionsin Memory-Optimized TablesInstead, transactions proceedunder the (op
2013-12-03 10:25:03 1270
The Guru's Guide to SQL Server Architecture and Internals.chm
2009-10-13
Sqlserver性能调整
2009-09-27
使用CPU计数器监视SQL Server性能的
2009-09-27
inside-microsoft-r-sql-server-tm-2005-the-storage-engine
2009-09-27
SQL SERVER 2005
2009-09-27
SQL+Server+2005技术内幕-存储引擎1-5章.pdf
2009-09-24
Microsoft Press - Inside Microsoft SQL Server 2005 Query Tuning and Optimization (Sep 2007).chm
2009-09-24
Inside Microsoft SQL Server 2005: T-SQL Programming
2009-09-24
SQL.Server.2005.Administration
2009-05-25
TSQL Query Tuning
2009-05-25
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人