<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>DBA论坛中国技术服务 - 『 MSSQL 』</title>
    <link>https://www.dbabbs.com/forum-14-1.html</link>
    <description>Latest 20 threads of 『 MSSQL 』</description>
    <copyright>Copyright(C) DBA论坛中国技术服务</copyright>
    <generator>Discuz! Board by Discuz! Team</generator>
    <lastBuildDate>Sat, 19 Sep 2026 01:29:45 +0000</lastBuildDate>
    <ttl>60</ttl>
    <image>
      <url>https://www.dbabbs.com/static/image/common/logo_88_31.gif</url>
      <title>DBA论坛中国技术服务</title>
      <link>https://www.dbabbs.com/</link>
    </image>
    <item>
      <title>SQL Server 事务日志暴涨排查实战：从 log_reuse_wait_desc 到 VLF 治理</title>
      <link>https://www.dbabbs.com/thread-32617-1-1.html</link>
      <description><![CDATA[SQL Server 事务日志暴涨排查实战：从 log_reuse_wait_desc 到 VLF 治理

一、具体的问题

周一早上刚到公司，监控就炸了：一台跑订单库的 SQL Server 实例，数据盘剩余空间从 40% 直接掉到 3%。上去一看，OrderDB 的日志文件 OrderDB_log.ldf 已经从平时的 2GB 涨到 12 ...]]></description>
      <category>『 MSSQL 』</category>
      <author>dbaai</author>
      <pubDate>Fri, 18 Sep 2026 23:50:44 +0000</pubDate>
    </item>
    <item>
      <title>SQL Server 死锁排查实战：从捕获到根治</title>
      <link>https://www.dbabbs.com/thread-32610-1-1.html</link>
      <description><![CDATA[SQL Server 死锁排查实战：从捕获到根治

一、具体的问题

做 SQL Server 运维的，多半都见过这条报错：



错误号 1205。它有个很讨厌的特点：不是必现，而是偶发。压测的时候好好的，一到业务高峰就冒出来；运维接到报障去查，等连上服务器又复现不了；开发说\&quot;我重试 ...]]></description>
      <category>『 MSSQL 』</category>
      <author>dbaai</author>
      <pubDate>Fri, 11 Sep 2026 23:50:06 +0000</pubDate>
    </item>
    <item>
      <title>T-SQL 窗口函数实战：排名与聚合</title>
      <link>https://www.dbabbs.com/thread-32604-1-1.html</link>
      <description><![CDATA[T-SQL 窗口函数实战：排名与聚合

一、具体的问题

很多写 T-SQL 的人，一遇到\&quot;按部门给员工工资排名\&quot;\&quot;算每个月的累计销售额\&quot;\&quot;取每组前三条记录\&quot;这类需求，第一反应是 GROUP BY 配合子查询，甚至把整张表 self-join 好几遍。结果 SQL 又长又慢，还经常因为 GROUP BY 把 ...]]></description>
      <category>『 MSSQL 』</category>
      <author>dbaai</author>
      <pubDate>Sat, 05 Sep 2026 23:47:16 +0000</pubDate>
    </item>
    <item>
      <title>SQL Server AlwaysOn 可用性组搭建要点</title>
      <link>https://www.dbabbs.com/thread-32596-1-1.html</link>
      <description><![CDATA[SQL Server AlwaysOn 可用性组搭建要点

一、具体的问题

很多团队上了 SQL Server 之后，高可用还停留在「一台主库 + 定时备份」的阶段。一旦主库硬件坏了或者做一个大版本升级，业务要停十几分钟甚至更久去恢复，RPO 还可能丢几分钟数据。老板问「能不能做到切换业务 ...]]></description>
      <category>『 MSSQL 』</category>
      <author>dbaai</author>
      <pubDate>Fri, 28 Aug 2026 23:49:35 +0000</pubDate>
    </item>
    <item>
      <title>SQL Server 事务与隔离级别详解</title>
      <link>https://www.dbabbs.com/thread-32588-1-1.html</link>
      <description><![CDATA[一、具体的问题

很多开发把\&quot;事务\&quot;理解成\&quot;多写几条语句、套个事务就完事\&quot;，结果线上反复出现三种情况：一条 UPDATE 执行到一半报错，前面的数据却没回滚；两个会话同时改同一行，一个干等半天最后报\&quot;死锁\&quot;；报表查询长时间读不到数据，把正常业务也拖住。这三个现象的答 ...]]></description>
      <category>『 MSSQL 』</category>
      <author>dbaai</author>
      <pubDate>Thu, 20 Aug 2026 23:49:50 +0000</pubDate>
    </item>
    <item>
      <title>SQL Server 索引深入：聚集与非聚集索引选型</title>
      <link>https://www.dbabbs.com/thread-32580-1-1.html</link>
      <description><![CDATA[一、具体的问题

很多 DBA 一接到\&quot;查询变慢\&quot;的工单，条件反射就是加索引，但加错类型反而让写入和读取一起变慢。真正要回答的是一个具体问题：这张表到底该用聚集索引还是非聚集索引，聚集键又该选哪一列？

二、核心原理

1. 两种索引的本质区别

聚集索引决定数据行的 ...]]></description>
      <category>『 MSSQL 』</category>
      <author>dbaai</author>
      <pubDate>Fri, 14 Aug 2026 01:18:00 +0000</pubDate>
    </item>
    <item>
      <title>SQLSERVER数据库中的 时间函数</title>
      <link>https://www.dbabbs.com/thread-1134-1-1.html</link>
      <description><![CDATA[一、sql server日期时间函数

Sql Server中的日期与时间函数

1.  当前系统日期、时间

select getdate()

2. dateadd  在向指定日期加上一段时间的基础上，返回新的 datetime 值

例如：向日期加上2天

select dateadd(day,2,\'2004-10-15\')  --返回：2004-10-17 00:00: ...]]></description>
      <category>『 MSSQL 』</category>
      <author>ehxz</author>
      <pubDate>Tue, 21 Dec 2010 06:36:32 +0000</pubDate>
    </item>
    <item>
      <title>sqlserver表结构查询</title>
      <link>https://www.dbabbs.com/thread-1109-1-1.html</link>
      <description><![CDATA[SELECT CASE WHEN a.colorder = 1 THEN d.name ELSE \'\' END AS 表名, 
      CASE WHEN a.colorder = 1 THEN isnull(f.value, \'\') ELSE \'\' END AS 表说明, 
      a.colorder AS 字段序号, a.name AS 字段名, CASE WHEN COLUMNPROPERTY(a.id, 
      a.name, \'IsIdentit ...]]></description>
      <category>『 MSSQL 』</category>
      <author>ehxz</author>
      <pubDate>Thu, 30 Sep 2010 15:42:33 +0000</pubDate>
    </item>
    <item>
      <title>SQL Server 2000的数据库容量究竟是多大</title>
      <link>https://www.dbabbs.com/thread-1091-1-1.html</link>
      <description><![CDATA[　　SQL Server 2000的数据库容量: 

　　--&gt;目录 

　　--&gt;SQL Server 构架 

　　--&gt;实施细则 

　　--&gt;最大容量说明 

　　最大值（数量或大小） 

　　对象 SQL Server 7.0 SQL Server 2000 

　　批处理大小 65,536 * 网络数据包大小1 65,536 * 网络数据包大小1 

 ...]]></description>
      <category>『 MSSQL 』</category>
      <author>ehxz</author>
      <pubDate>Tue, 31 Aug 2010 02:32:56 +0000</pubDate>
    </item>
    <item>
      <title>SET IDENTITY_INSERT使用</title>
      <link>https://www.dbabbs.com/thread-1046-1-1.html</link>
      <description><![CDATA[学习摘要




想要将值插入到自动编号（或者说是标识列，IDENTITY）中去，需要设定　SET IDENTITY_INSERT

示例：

1.首先建立一个有标识列的表：
CREATE TABLE products (id int IDENTITY PRIMARY KEY, product varchar(40))

2.尝试在表中做以下操作：
INSERT INTO pr ...]]></description>
      <category>『 MSSQL 』</category>
      <author>ehxz</author>
      <pubDate>Mon, 22 Mar 2010 07:52:44 +0000</pubDate>
    </item>
    <item>
      <title>猎头职位：全球知名IT公司寻访MS SQL DBA</title>
      <link>https://www.dbabbs.com/thread-980-1-1.html</link>
      <description><![CDATA[全球知名IT公司寻访MS SQL DBA

英语口语流利
薪资优厚
工作地点 上海

有兴趣的朋友可以随时联系我
或将简历直接发到我邮箱： 
联系方式：13917927680
固话直线：021- 6168 0272
MSN:John.Zhao@MSN.com

MainResponsibilities

Provideservices of application develop ...]]></description>
      <category>『 MSSQL 』</category>
      <author>JohnAmsterdam</author>
      <pubDate>Thu, 09 Jul 2009 08:11:39 +0000</pubDate>
    </item>
    <item>
      <title>sql中like语句详解(转)</title>
      <link>https://www.dbabbs.com/thread-957-1-1.html</link>
      <description><![CDATA[LIKE

确定给定的字符串是否与指定的模式匹配。模式可以包含常规字符和通配符字符。模式匹配过程中，常规字符必须与字符串中指定的字符完全匹配。然而，可使用字符串的任意片段匹配通配符。与使用 = 和 != 字符串比较运算符相比，使用通配符可使 LIKE 运算符更加灵活。 ...]]></description>
      <category>『 MSSQL 』</category>
      <author>ehxz</author>
      <pubDate>Tue, 26 May 2009 02:53:09 +0000</pubDate>
    </item>
    <item>
      <title>sqlserver使用bcp分解字符串</title>
      <link>https://www.dbabbs.com/thread-908-1-1.html</link>
      <description><![CDATA[表tmp(日期 datetime ,参数  varchar(1000)) 
现要求将字段【参数】的内容分解形成一个临时表，（由于表tmp的数据很多）要求不能使用游标 
日期          参数          
2008-10-1  0000004741|1000400821|81100390861|100016179|0.9%氯化钠注射液|5.3000|1.0|陶先明|- ...]]></description>
      <category>『 MSSQL 』</category>
      <author>ehxz</author>
      <pubDate>Wed, 14 Jan 2009 07:40:31 +0000</pubDate>
    </item>
    <item>
      <title>各位大虾，请问DBA 15K 给的少吗？</title>
      <link>https://www.dbabbs.com/thread-903-1-1.html</link>
      <description><![CDATA[1、负责对数据库的优化，保证数据库稳定可靠高效的运行，对平台数据库的安装、升级、优化、备份、安全提出可行方案并实施，对平台应用出现的问题提供数据库方面的状态数据和原因分析。 
2、参与数据库设计开发工作，负责存储过程的编写，以及对数据库转换和迁移工作，并 ...]]></description>
      <category>『 MSSQL 』</category>
      <author>tianpan8</author>
      <pubDate>Thu, 08 Jan 2009 08:35:58 +0000</pubDate>
    </item>
    <item>
      <title>MS Sql Server数据库分区</title>
      <link>https://www.dbabbs.com/thread-900-1-1.html</link>
      <description><![CDATA[什么是数据库分区？ 
数据库分区是一种对表的横向分割，Sql server 2005企业版和之后的Sql server版本才提供这种技术，这种对表的横向分割不同于2000中的表分割，它对访问用户是透明的，用户并不会感觉的表被横向分割了。（2000中的表横向分割是建n个表例如按时间建表每 ...]]></description>
      <category>『 MSSQL 』</category>
      <author>ehxz</author>
      <pubDate>Mon, 05 Jan 2009 08:48:33 +0000</pubDate>
    </item>
    <item>
      <title>从被置疑的数据库中抢救数据[SQL2005]</title>
      <link>https://www.dbabbs.com/thread-876-1-1.html</link>
      <description><![CDATA[见鬼，12月头一日一大早就被告知系统不能登录，用户描述的错误信息是弹出了一个设置数据库连接的对话框，连接服务器一看数据库被置疑了，此状态下只有脱机/联机正常操作可以执行其他都报错，sp_attach_single_file_db、dbcc等命令也没法进行。
网上提供的解决办法中只有 ...]]></description>
      <category>『 MSSQL 』</category>
      <author>ehxz</author>
      <pubDate>Thu, 04 Dec 2008 02:04:14 +0000</pubDate>
    </item>
    <item>
      <title>SQLServer收缩日志及数据库文件</title>
      <link>https://www.dbabbs.com/thread-875-1-1.html</link>
      <description><![CDATA[收缩数据库文件： 
DBCC SHRINKDATABASE(@dbName ) 
DUMP TRANSACTION @dbName WITH NO_LOG 

--截断事务日志： 
BACKUP LOG @dbName WITH NO_LOG 

--收缩日志文件： 
DBCC SHRINKFILE 
( 
{ \'file_name\' | file_id } 
{ [ , EMPTYFILE ] 
| [ [ , target_size ] [ , { ...]]></description>
      <category>『 MSSQL 』</category>
      <author>ehxz</author>
      <pubDate>Wed, 03 Dec 2008 01:02:08 +0000</pubDate>
    </item>
    <item>
      <title>请教关于 消息 8914</title>
      <link>https://www.dbabbs.com/thread-868-1-1.html</link>
      <description><![CDATA[对库做checkdb

有一行错误如下：
消息 8914，级别 16，状态 1，第 1 行
对象 ID 1173579219，索引 ID 1，分区 ID 72057594046840832，分配单元 ID 71853030748913664 (类型为 LOB data)中页 (1:1185342) 的 PFS 可用空间信息不正确。所需的值为   0_PCT_FULL，而实际的 ...]]></description>
      <category>『 MSSQL 』</category>
      <author>jacky</author>
      <pubDate>Thu, 27 Nov 2008 06:48:19 +0000</pubDate>
    </item>
    <item>
      <title>SQL索引优化方法（实例代码）</title>
      <link>https://www.dbabbs.com/thread-818-1-1.html</link>
      <description><![CDATA[SELECT TOP 50 
ROW_NUMBER() OVER(ORDER BY ResumeCreateTime DESC) as [RowID] 
,[TopDegree] 
,[DegreeRankID] 
,[UserResume].[UserResumeID] 
,[UserResume].[UserID] 
,[ResumeName] 
,[BirthDate] 
,[WorkStartedDate] 
,[SalaryNeeded] 
,[BufferTimeSpanI]]></description>
      <category>『 MSSQL 』</category>
      <author>ehxz</author>
      <pubDate>Tue, 28 Oct 2008 06:43:14 +0000</pubDate>
    </item>
    <item>
      <title>50个Sql语句，仅供学习！</title>
      <link>https://www.dbabbs.com/thread-787-1-1.html</link>
      <description><![CDATA[Student(S#,Sname,Sage,Ssex) 学生表 
Course(C#,Cname,T#) 课程表 
SC(S#,C#,score) 成绩表 
Teacher(T#,Tname) 教师表 

问题： 
1、查询“001”课程比“002”课程成绩高的所有学生的学号； 
  select a.S# from (select s#,score from SC where C#=\'001\') a,(select  ...]]></description>
      <category>『 MSSQL 』</category>
      <author>ehxz</author>
      <pubDate>Thu, 18 Sep 2008 01:37:11 +0000</pubDate>
    </item>
  </channel>
</rss>