Fanr

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

随笔分类 -  MSSQL

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 14 下一页

摘要:-- 创建要使用的数据库Create Database HelloWorldDBgoUse HelloWorldDBgo-- 创建要使用的两种消息类型。我们要使用的消息将是-- 字符串而不是 XML - 因此无需进行验证CREATE MESSAGE TYPE [HelloWorldRequest] VALIDATION = NONE CREATE MESSAGE TYPE [HelloWorldResponse] VALIDATION = NONE -- 创建一个限制此对话框中消息类型-- 的规范。请求由对话框的初始化程序发出-- 响应消息由对话框目标发送。CREATE CONTRACT... 阅读全文
posted @ 2011-11-15 14:04 Fanr_Zh 阅读(263) 评论(0) 推荐(0) 编辑

摘要:很多开发人员都想成为一名数据库培训,也有很多人一开始就把自己定位成为一名DBA,DBA究竟需要掌握些什么知识和技能呢?以下是我 做DBA工作和面试DBA时,整理的一些DBA方面的三十个问题,三十个大问题中还有许多小的问题,涵括了SQL Server 2008 R2培训比较多的技术知识点,与大家分享下,希望给有志做DBA的朋友们一些帮助:1. char、varchar、nvarchar之间的区别(包括用途和空间占用);xml类型查找某个节点的数据有哪些方法,哪个效率高;使用存储过程和使用T-SQL查询数据有啥不一样;2.系统DB有哪些,都有什么作用,需不需要做备份,为什么;损坏了如何做还原(.. 阅读全文
posted @ 2011-11-11 09:54 Fanr_Zh 阅读(471) 评论(0) 推荐(0) 编辑

摘要:Transparent data encryption (TDE) is a new feature in Microsoft SQL Server 2008 Enterprise edition and in my opinion one of the best small features to come out of this release. It is a source of annoyance that you have to fork out the not inconsiderable sum of money for the Enterprise Edition in ord 阅读全文
posted @ 2011-11-03 13:18 Fanr_Zh 阅读(294) 评论(0) 推荐(0) 编辑

摘要:Deadlockingoccurs when two user processes have locks on separate objects and each process is trying to acquire a lock on the object that the other process has. When this happens, SQL Server identifies the problem and ends the deadlock by automatically choosing one process and aborting the other proc 阅读全文
posted @ 2011-10-31 09:37 Fanr_Zh 阅读(447) 评论(0) 推荐(0) 编辑

摘要:In transactional replication, the transaction log of the database involved in replication is both written to and read from. Without replication, a transaction log is almost always written to, and rarely read from. Because a transaction log is both written to and read from when using transactional re 阅读全文
posted @ 2011-10-28 11:08 Fanr_Zh 阅读(335) 评论(0) 推荐(0) 编辑

摘要:USE AdventureWorksDW2008R2declare @P1 int --游标号码declare @P2 intset @P2=8 --参数[传入参数](可能是游标类型)declare @P3 intset @P3=1 --参数[传入参数](可能是游标锁类型)declare @P4 int --返回行数beginexec sp_cursoropen @P1 output,N'select * from DimCustomer',@P2 output,@P3 output,@P4 outputexec sp_cursorfetch @P1, 16, 1, 100-- 阅读全文
posted @ 2011-10-23 19:41 Fanr_Zh 阅读(310) 评论(0) 推荐(0) 编辑

摘要:Troubleshooting Performance Problems in SQL Server 2005Published: October 1, 2005Writers:Sunil Agarwal, Boris Baryshnikov, Tom Davidson, Keith Elmore, Denzil Ribeiro, Juergen ThomasApplies To:SQL Server 2005Summary:It is not uncommon to experience the occasional slow down of a SQLServer database. A 阅读全文
posted @ 2011-10-22 22:12 Fanr_Zh 阅读(3649) 评论(0) 推荐(0) 编辑

摘要:DBCC CACHESTATSdisplays information about the objects currently in the buffer cache, such as hit rates, compiled objects and plans, etc.Example:DBCC CACHESTATSSample Results (abbreviated):Object Name Hit Ratio————————-Proc0.86420054765378507Prepared0.99988494930394334Adhoc 0.93237136647793051ReplPro 阅读全文
posted @ 2011-10-21 10:41 Fanr_Zh 阅读(455) 评论(0) 推荐(0) 编辑

摘要:某些查询占用的资源比其他查询占用的资源多。例如,返回大型结果集的查询和那些包含 WHERE 子句(并非唯一子句)的查询总是占用大量资源。与不太复杂的查询相比,查询优化器的智能水平无法消除这些构造的资源开销。SQL Server 使用最佳访问计划,但查询优化会受到可访问内容的限制。尽管如此,您可以执行下列操作来提高查询性能:添加更多内存。当服务器运行许多复杂查询且其中几个查询执行很慢时,此解决方案尤其有用。使用多个处理器。多个处理器允许数据库引擎使用并行查询。有关详细信息,请参阅。重写查询。请注意下列事项:如果查询使用游标,则确定是否可以使用效率更高的游标类型(如快速只进游标)或单个查询编写游标 阅读全文
posted @ 2011-10-12 13:16 Fanr_Zh 阅读(458) 评论(0) 推荐(0) 编辑

摘要:List of Threshold Value for SQL Server Performance CountersBy : Kasim Wirama, MCDBA, MCITPMonitoring database performance is proactive task that a DBA should do. Possible bottleneck for SQL Server is memory, processor, I/O subsystem, tempdb database, and locking. For SQL Server specifics, below list 阅读全文
posted @ 2011-09-21 09:22 Fanr_Zh 阅读(988) 评论(0) 推荐(0) 编辑

摘要:原文是E文,做一下翻译并且提取一些重要的思路。1.定义业务规格What are your most critical business processes and how often are they processed (e.g. number of sales activities per day, number of client requests per day, etc.)最重要的业务流程是什么,使用频率如何What is regarded (required) as acceptable response times from the online application? How 阅读全文
posted @ 2011-09-16 23:30 Fanr_Zh 阅读(3422) 评论(0) 推荐(1) 编辑

摘要:聚集索引:Clustered Indexes in SQL Server: Things You Need to Know- 08 Dec 2005数据库压力测试:How to Set Up a SQL Server Stress Test Environment in 8 Steps: Lessons From the Field- 01 Dec 2005数据库监控:SQL Server Monitoring in 8 Steps: Lessons From the Field- 02 Aug 2005基线tips:10 Baselining Tips for SQL Server: Les 阅读全文
posted @ 2011-09-16 22:50 Fanr_Zh 阅读(286) 评论(0) 推荐(0) 编辑

摘要:Downloading and Configuring SQLIOSQLIO Video Tutorial: http://sqlserverpedia.com/wiki/SAN_Performance_Tuning_with_SQLIO[Download SQLIO from Microsoft]Notice that I said SQLIO, not SQLIOSIM. Experienced database administrators will often direct you to SQLIOSIM because it's easier to use and mimic 阅读全文
posted @ 2011-09-16 14:45 Fanr_Zh 阅读(1244) 评论(0) 推荐(0) 编辑

摘要:Stress Testing Your SQL Server Databases - A Systematic ApproachStress Testing your SQL Server environments is a practice that can yield great benefits. Stress Testing can be used for performance tuning, to uncover bottlenecks, and for capacity planning among other things. In this article we will us 阅读全文
posted @ 2011-09-16 13:10 Fanr_Zh 阅读(1903) 评论(0) 推荐(0) 编辑

摘要:下面给出了限制优化时间和事件数的建议:对于单个查询和小型工作负荷(少于 100 个事件),请指定无限制的优化时间。如果指定不限制优化时间,数据库引擎优化顾问将给出最佳建议,并且在大多数情况下,优化会在相对较短的时间内完成。对于大型工作负荷(多于 100 个事件),请考虑以下方案,其优先级以其列出顺序为准。首先考虑方案 1 到方案 3,最后考虑方案 (4)。如果用户在时间上有约束,请限制优化时间。如果优化固定数量的事件就足够了(例如,前 10,000 个事件可以代表其余工作负荷),请使用 dta 命令行实用工具,并通过 –n 参数指定事件数。如果使用的是 dta 命令行实用工具,并希望进一步限制 阅读全文
posted @ 2011-09-13 10:25 Fanr_Zh 阅读(289) 评论(0) 推荐(0) 编辑

摘要:This article describes a utility that is able to report the most common DBCC CHECKDB errors significantly faster than DBCC CHECKDB does itself. This can be very important in determining quickly the correctness of data in large databases.Now that I have your attention I should point out this utility 阅读全文
posted @ 2011-08-23 15:28 Fanr_Zh 阅读(473) 评论(0) 推荐(0) 编辑

摘要:So lately I've been geeking out on SQL internals. My most recent find involves a couple of undocumented toys,DBCC Pageandsys.system_internals_allocation_units.DBCC Page will actually display the contents of a page. I found a blog post byPaul Randal, back when he still worked for Microsoft, descr 阅读全文
posted @ 2011-08-18 12:25 Fanr_Zh 阅读(343) 评论(0) 推荐(0) 编辑

摘要:from :http://www.cnblogs.com/yxp132/articles/49224.htmlBest Practices Analyzer Tool for Microsoft SQL Server 2000是Microsoft SQL Server开发团队开发的一个数据库管理工具,可以让你检测设计的数据库是否遵循SQL Server操作和管理的最佳实践准则。这些准则公认有助于提高数据库的性能和效率,并让应用程序易于维护。1,安装SQL BPA后,启动界面如下所示:2,开始使用SQL BPA最佳实践分析器安装完成后会有一个SQL Server Best Practices A 阅读全文
posted @ 2011-08-17 12:11 Fanr_Zh 阅读(401) 评论(0) 推荐(0) 编辑

摘要:启用指定的跟踪标记。DBCC TRACEON ( trace# [ ,...n ][ , -1 ] ) [ WITH NO_INFOMSGS ]禁用指定的跟踪标记。DBCC TRACEOFF ( trace# [ ,...n ] [ , -1 ] ) [ WITH NO_INFOMSGS ]显示跟踪标志的状态。DBCC TRACESTATUS ( [ [ trace# [ ,...n ] ] [ , ] [ -1 ] ] ) [ WITH NO_INFOMSGS ]跟踪标志用于临时设置特定服务器的特征或关闭特定行为。例如,如果启动 SQL Server 的一个实例时设置了跟踪标志 3205,将 阅读全文
posted @ 2011-08-11 14:51 Fanr_Zh 阅读(431) 评论(0) 推荐(0) 编辑

摘要:下面的示例演示必须对驻留在 HOST_A 上的一个伙伴执行哪些操作。在此示例中,两个伙伴是三个计算机系统上的默认服务器实例。两个服务器实例在非信任的 Windows 域中运行,因此需要基于证书的身份验证。HOST_A 担当初始主体角色,HOST_B 担当镜像角色。使用证书设置数据库镜像涉及四个常规阶段,本示例演示其中的三个阶段:1、2、4。这些阶段如下:配置出站连接本示例显示了下列操作的步骤:为出站连接配置 Host_A。为出站连接配置 Host_B。有关设置数据库镜像的这一阶段的信息,请参阅如何允许数据库镜像使用证书进行出站连接 (Transact-SQL)。配置入站连接本示例显示了下列操作 阅读全文
posted @ 2011-08-11 14:42 Fanr_Zh 阅读(527) 评论(0) 推荐(0) 编辑

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 14 下一页