A Guide for SQL Server Backup Application Vendors
Summary: SQL Server 2005 provides support for Volume Shadow Copy Service (VSS) by providing a writer (the SQL writer) so that a third-party backup application can use the VSS framework to back up database files. This paper describes the SQL writer component and its role in the VSS snapshot creation and restore process for SQL Server databases. It also captures details on how to configure and use the SQL writer to work with backup applications in the VSS framework. On This Page Intr
SQL Server Transaction Log Fragmentation: a Primer
Generally, you will have no need to worry about the number of virtual log files in your transaction log. However, if you use the default settings for 'auto-grow', you can end up with such 'fragmentation' in your transaction log as to affect performance noticably. How can this be avoided? How can you tell it's a problem? What do you do about it? Greg explains.[@more@]http://www.simple-talk.com/sql/database-administration/sql-server-transaction-log-fragmentation-a-primer/
Database Testing: How to Regression Test a Relational Database
Why test an RDBMS? What should we test? When should we test? How should we test?Who should test? Introducing database testing into your organization Database testing and data inspection Best practices [@more@]http://www.agiledata.org/essays/databaseTesting.html#Tools
SQLite数据库访问编程及管理工具
工具SQLite AdministratorSQLite Database BrowserVisual studio 2005下使用SQLite数据库使用SQLite.NET访问SQLite结合Enterprise Library操作SQLiteADO.NET访问SQLite[@more@]可视化的SQLite数据库管理工具管理SQLite数据库除命令行外,网络上还有很多开源的可视化的SQLite数据库管理工具,登陆https://sourceforge.net/或者通过其他搜索引擎(GOOOGLE/BAIDU),输入【SQLite】可以找到一大片相关工具,比如,SQLite Database Browser、SQLite Administrator... 等等。试用了几个,比较而言,个人比较喜欢SQLite Administrator,该工具界面
一个小时内学习SQLite数据库
SQLite 是一个开源的嵌入式关系数据库,实现自包容、零配置、支持事务的SQL数据库引擎。 其特点是高度便携、使用方便、结构紧凑、高效、可靠。 与其他数据库管理系统不同,SQLite 的安装和运行非常简单,在大多数情况下 - 只要确保SQLite的二进制文件存在即可开始创建、连接和使用数据库。如果您正在寻找一个嵌入式数据库项目或解决方案,SQLite是绝对值得考虑。[@more@]1. 介绍SQLite 是一个开源的嵌入式关系数据库,实现自包容、零配置、支持事务的SQL数据库引擎。 其特点是高度便携、使用方便、结构紧凑、高效、可靠。 与其他数据库管理
用CLR函数把HTMLCode转换为原字符
1. HTMLCode格式2. 转换方法3. 部署方法4. 调用方法[@more@]1. HTMLCoding格式因为安全方面的原因,网页提交html特殊字符例如<, >,', "等和汉字时,常常被编码为HTMLCode格式。例如:[ ' ] - ’[ " ] - ”[ < ] - <[ > ] - >[中国] - & #20013;& #22269;C#引用System.Web.dll,调用HttpUtility.HtmlDecode转换成原文。具体:VS.net建立Database项目而不是CLR项目,否则,不能Reference System.Web.dll到项目中;创建CLR Funcation,调用 HttpUtility.HtmlDecode转换成原文
使用CLR函数压缩(Gzip)ntext类型字段
Gzip to StringString to Gzip[@more@]using System;using System.Data;using System.Data.SqlClient;using System.Data.SqlTypes;using Microsoft.SqlServer.Server;using System.IO;using System.IO.Compression;using System.Text;public partial class Gzip{ [Microsoft.SqlServer.Server.SqlFunction] public static SqlChars GzipToString(SqlBytes gBytes) { byte[] bytes = gBytes.Value; bytes = Decompress(bytes); string str = Encoding.GetEncoding(936).GetString(bytes); SqlChars s
Monitoring Tempdb in SQL Server 2005
from: http://www.sqllion.com/2009/05/monitoring-tempdb-in-sql-server-2005/[@more@]As the tempdb database is the common global resource for all the operations going on in SQL Server, so the DBA has to be bit cautious about the use of it. Because any unexpected operations by the applications running under the SQL Server instance or any uneven query by the user can eat all the space available to thetempdb resulting decrease in the performance of all other applications running under the same instanc
sql server系统表与系统视图详细说明
SQL Server系统表系统视图,可分为:目录视图 信息架构视图 兼容性视图 复制视图 动态管理视图和函数 [@more@]系统表:sysaltfiles 主数据库 保存数据库的文件 syscharsets 主数据库字符集与排序顺序sysconfigures 主数据库 配置选项syscurconfigs 主数据库当前配置选项sysdatabases 主数据库服务器中的数据库syslanguages 主数据库语言syslogins 主数据库 登陆帐号信息sysoledbusers 主数据库 链接服务器登陆信息sysprocesses 主数据库进程sysremotelogins主数据库 远程登录帐号syscolumns 每个数据库 列sysconstrains 每个数据库 限制sys
A significant part of sql server process memory has been paged out. This may result in performance d
A good article about "A significant part of sql server process memory has been paged out. This may result in performance degradation. Duration 0 seconds. Working set (KB) 25432, committed (KB) 11296912, memory utilization 0%"[@more@]If you are using SQL Sever Server standard edition 64 bit on a Windows 2003 64bit, you will frequently encounter this problem where SQL Server says:A significant part of sql server process memory has been paged out. This may result in performance degradatio
监控Oracle数据库性能的脚本段整理
监控Oracle数据库性能的脚本段整理[@more@]1. 监控事例的等待 select event,sum(decode(wait_Time,0,0,1)) "Prev", sum(decode(wait_Time,0,1,0)) "Curr",count(*) "Tot" from v$session_Wait group by event order by 4; 2. 回滚段的争用情况 select name, waits, gets, waits/gets "Ratio" from v$rollstat a, v$rollname b where a.usn = b.usn; 3. 监控表空间的 I/O 比例 select df.tablespace_name name,df.file_name "file",f.phyrds p
三种东西永远不要放到数据库里
我已经在很多演讲里说过,改进你的系统的最好的方法是先避免做“蠢事”。我并不是说你或你开发的东西“蠢”,只是有些决定很容易被人们忽略掉其暗含的牵连,认识不到这样做对系统维护尤其是系统升级带来多大的麻烦。作为一个顾问,像这样的事情我到处都能见到,我还从来没有见过做出这样的决定的人有过好的结果的。[@more@]我已经在很多演讲里说过,改进你的系统的最好的方法是先避免做“蠢事”。我并不是说你或你开发的东西“蠢”,只是有些决定很容易被人们忽略掉其暗含 的牵连,认识不到这样做对系统维护尤其是系统升级带来多大的麻烦。
浅析SQL Server datetime数据类型设计与优化误区
今天我们将探讨SQL Server datetime数据类型设计与优化误区,希望这些基础性的知识能对大家有所帮助。原文链接:http://www.cnblogs.com/gaizai/archive/2010/11/26/1888505.html[@more@]一、场景在SQL Server 2005中,有一个表TestDatetime,其中Dates这个字段的数据类型是datetime,如果你看到表的记录如下图所示,你最先想到的是什么呢?(图1:数据列表)你看到这些数据,是不是觉得这样的设计既浪费了存储空间,又使得这个列的索引增大,查询起来更慢,你也想使用一些其它的数据类型来代替这个datetime吧?其实大家都是这么想的,这个
监控SQL Server的运行状况(1)
Microsoft SQL Server 2005 提供了一些工具来监控数据库。方法之一是动态管理视图。动态管理视图 (DMV) 和动态管理函数 (DMF) 返回的服务器状态信息可用于监控服务器实例的运行状况、诊断问题和优化性能。[@more@]Microsoft SQL Server 2005 提供了一些工具来监控数据库。方法之一是动态管理视图。动态管理视图 (DMV) 和动态管理函数 (DMF) 返回的服务器状态信息可用于监控服务器实例的运行状况、诊断问题和优化性能。 常规服务器动态管理对象包括: dm_db_*:数据库和数据库对象 dm_exec_*:执行用户代码和关联的连接 dm_os_*:内存、锁定
生成目录树方法
1, 在自己的电脑上(服务器上此方法不能使用),打开运行,输入"cmd".2, 执行下面这条语句,可以更新目录文本。 tree "ComputerNameh$Path" /f /a > .txtComputerNameh$PathDirectory3, 回车运行,就可以在这个目录下生成最新的目录树文件-- Directory.txt。[@more@]
关系型数据库性能测试参考指标----SQL Server
注:以下指标取自SQL Server自身提供的性能计数器。[@more@]SQL Server指标名称指标描述指标范围指标单位1.SQL Server中访问方法(Access Methods)对象包含的性能计数器全表扫描/秒(Full Scans/sec)指每秒全表扫描的数量。全表扫描可以是基本表扫描或全索引扫描。由于全表扫描需要耗费大量时间,因此全表扫描的频率过高的话,会影响性能。如果该指标的值比1或2高,应该分析设计的查询以确定是否确实需要全表扫描,以及SQL查询是否可以被优化。次数/秒2.SQL Server中缓冲器管理器(Buffer Manager)对象包含的性能计数器缓冲区高速缓存命
Eclipse Data Tools Platform (DTP) 连接SQL Server 2008
Eclipse Data Tools Platform (DTP) 连接SQL Server 2008[@more@]关键配置1. 下载安装sqljdbc_4.0到C:Program FilesMicrosoft JDBC Driver 4.0 for SQL Server.2. 或者在DTP的New Database Connections时Edit Driver Definition的JAR List中Add 安装路径:到C:Program FilesMicrosoft JDBC Driver 4.0 for SQL Serversqljdbc_4.0enusqljdbc4.jar;或者在环境变量中添加CLASSPATH,值:C:Program FilesMicrosoft JDBC Driver 4.0 for SQL Serversqljdbc_4.0enusqljdbc4.jar此时,可以配置sql server 用户名/密码方式连接。3. 把sqljdbc_auth
PHP开发工具、开发环境汇总
http://www.oschina.net/project/lang/22/php[@more@]PHP开发工具PHPEclipse 是一个相当强大的一个Eclipse下开发PHP的插件,包括的功能有:PHP语法分析,调试,代码格式化,大纲视图,代码模板定制等。下载:http://sourceforge.net/projects/phpeclipse/
主流NoSQL数据库Redis专题
http://www.it168.com/redian/redis/index.html[@more@]
The DBA as Detective: Troubleshooting Locking and Blocking
In this article I demonstrated how I go about detecting SQL Server problems in the form of excessive locking, and blocking. While this is a good start for the DBA detective, there is much more ground to cover. I mentioned CPU and I/O in this article only peripherally, as it relates to problem code. In my book, I continue on the path of analyzing performance issues, but extend this topic to explain how to make sure you get notified immediately of performance, and other, issues.After all, if you d