MS SQL错误:SQL Server failed with error code 0xc0000000 to spawn a thread to process a new login or connection. Check the SQL Server error log and the W

简介: 早晨宁波那边的IT人员打电话告知数据库无法访问了。其实我在早晨也发现Ignite监控下的宁波的数据库服务器出现了异常,但是当时正在检查查看其它服务器发过来的各类邮件,还没等到我去确认具体情况,就收到了电话。

      早晨宁波那边的IT人员打电话告知数据库无法访问了。其实我在早晨也发现Ignite监控下的宁波的数据库服务器出现了异常,但是当时正在检查查看其它服务器发过来的各类邮件,还没等到我去确认具体情况,就收到了电话。我首先检查网络是否畅通,结果发现网络没有问题,然后远程登录到该服务器,查看了一下数据库的服务发现其运行正常,但是在本机使用MSSMS管理工具亦无法连接数据库,当下有两种方案:方案一:使用DAC登录数据库,检查具体情况,方案二:直接去查看错误日志,查看具体错误信息。于是为了快点找到原因。我选择了去查看错误日志(C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\LOG)。

日期 2014/3/4 8:51:52

日志 SQL Server (存档编号3 - 2014/3/4 8:55:00)

源 Logon

消息

SQL Server failed with error code 0xc0000000 to spawn a thread to process a new login or connection. Check the SQL Server error log and the Windows event logs for information about possible related problems. [CLIENT: xxx.xxx.xxx.xxx]

在网上搜索了一下发现: This problem occurs because the Windows operating system pages out the working set of the SQL Server process.Means sql server needed more memory for that but showing less for  a process..

因为这台服务器是Windows Server 2003 Stanard 32bit , 物理内存4G,内存一直比较吃紧,本来计划迁移到新服务器,但是由于各种原因一直没有实施。 于是我重启了SQL Server 服务后,发现问题解决了。继续查找错误日志记录中最早出现“Error: 17189, Severity: 16, State:1"的时间点,发现是在早晨2014/3/4  8:02:49, 在此之前出现了

”AppDomain 4(YourSQLDba.dbo[runtime].3) is marked for unload due to memroy pressure

SQL  Server Agent有如下错误信息:

关于这个问题, http://www.nullskull.com/q/10143638/error--17189.aspx 这里做了详细的介绍。

  1. To resolve the known issues that cause the Windows operating system to page out the working set of the SQL Server process, apply the hotfixes that are described in the following Microsoft Knowledge Base articles.
    Note Hotfixes are cumulative. A later version of a hotfix contains the earlier versions of that hotfix.
    • Microsoft has found an issue that may cause the 64-bit edition of the SQL Server working set to be trimmed. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

      http://support.microsoft.com/kb/905865/  (http://support.microsoft.com/kb/905865/ ) The sizes of the working sets of all the processes in a console session may be trimmed when you use Terminal Services to log on to or log off from a computer that is running Windows Server 2003

    • Computers that are running Windows Server 2003 can be too aggressive when they cache dirty buffers if there is an application performing buffered I/O, such as a file copy operation. This behavior can cause the working set in SQL Server to be trimmed. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

      http://support.microsoft.com/kb/920739/  (http://support.microsoft.com/kb/920739/ ) You may experience a decrease in overall system performance when you are copying files that are larger than approximately 500 MB in Windows Server 2003 S or in Windows Server 2003 S

    • The SQL Server working set may be trimmed when the system is using some advanced TCP features. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

      http://support.microsoft.com/kb/942861/  (http://support.microsoft.com/kb/942861/ ) Error message when an application connects to SQL Server on a server that is running Windows Server 2003: "General Network error," "Communication link failure," or "A transport-level error"

    • On a multiprocessor computer that is running Windows Server 2003, the System process may consume most of the available system memory. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

      http://support.microsoft.com/kb/942486/  (http://support.microsoft.com/kb/942486/ ) The System process may consume most of the available system memory on a multiprocessor computer that is running Windows Server 2003

  2. If a device driver uses the MmAllocateContiguousMemory function, and if it sets the value of the HighestAcceptableAddress parameter to less than 4 gigabytes (GB), the Windows operating system may page out the working set of the 64-bit SQL Server process. To resolve this problem, contact the vendor of the device driver for driver updates.
  3. If you still encounter these problems after you apply these hotfixes, apply a Windows hotfix that limits the number of trim operations per process. For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:

    http://support.microsoft.com/kb/938486/  (http://support.microsoft.com/kb/938486/ ) A Windows Server 2003-based computer becomes unresponsive because of a memory manager trimming operation that is caused by an indeterminate module that requests lots of memory

    http://support.microsoft.com/kb/956341/  (http://support.microsoft.com/kb/956341/ ) A Windows Server 2003-based computer becomes unresponsive because of a large memory allocation request

    When a device driver tries to allocate memory, the Windows operating system may page out the working set of other applications. This Windows hotfix lets you use event tracing to find the device driver that causes problem.

  4. Applications may use the system cache too much, and may cause a large growth of the system cache. To respond to the growth of the system cache, the system pages out the working set of the SQL Server process or of other applications. If you experience this problem, you can use some memory management functions in the application. These functions control the system cache space that file I/O operations can use in the application. For example, you can use the SetSystemFileCacheSize function and the GetSystemFileCacheSize function to control the system cache space that file I/O operations can use.
    You can use the Memory performance object to view the values of various counters in this object to determine whether the system cache working set uses too much memory. For example, you can view the Cache Bytes and System Cache Resident Bytes counters. For more information about this topic, visit the following Microsoft Web sites:

    http://blogs.msdn.com/ntdebugging/archive/2007/11/27/too-much-cache.aspx (http://blogs.msdn.com/ntdebugging/archive/2007/11/27/too-much-cache.aspx)
    http://blogs.msdn.com/ntdebugging/archive/2009/02/06/microsoft-windows-dynamic-cache-service.aspx (http://blogs.msdn.com/ntdebugging/archive/2009/02/06/microsoft-windows-dynamic-cache-service.aspx)

    You can download and deploy the "Microsoft Windows Dynamic Cache Service" to control the memory that is consumed by the system cache.

  5. If SQL Server is running together with SAP R/3, you may experience a paging issue. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

    http://support.microsoft.com/kb/931308/  (http://support.microsoft.com/kb/931308/ ) You may experience increased paging to the hard disk when you run an SAP R/3 program on a Windows Server 2003-based computer

参考资料:

      http://www.nullskull.com/q/10143638/error--17189.aspx

    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/59e24094-d459-4d78-b06a-bbad77c60245/server-failed-with-error-code-0xc0000000-to-spawn-a-thread-to-process-a-new-login-or-connection?forum=sqlsetupandupgrade

 

相关文章
|
SQL 网络协议 数据库连接
已解决:连接SqlServer出现 provider: Shared Memory Provider, error: 0 - 管道的另一端上无任何进程【C#连接SqlServer踩坑记录】
本文介绍了解决连接SqlServer时出现“provider: Shared Memory Provider, error: 0 - 管道的另一端上无任何进程”错误的步骤,包括更改服务器验证模式、修改sa用户设置、启用TCP/IP协议,以及检查数据库连接语句中的实例名是否正确。此外,还解释了实例名mssqlserver和sqlserver之间的区别,包括它们在默认设置、功能和用途上的差异。
|
SQL 安全 数据库
基于SQL Server事务日志的数据库恢复技术及实战代码详解
基于事务日志的数据库恢复技术是SQL Server中一个非常强大的功能,它能够帮助数据库管理员在数据丢失或损坏的情况下,有效地恢复数据。通过定期备份数据库和事务日志,并在需要时按照正确的步骤恢复,可以最大限度地减少数据丢失的风险。需要注意的是,恢复数据是一个需要谨慎操作的过程,建议在执行恢复操作之前,详细了解相关的操作步骤和注意事项,以确保数据的安全和完整。
755 0
|
SQL 数据库 数据安全/隐私保护
SQL Server数据库Owner导致事务复制log reader job无法启动的解决办法
【8月更文挑战第14天】解决SQL Server事务复制Log Reader作业因数据库所有者问题无法启动的方法:首先验证数据库所有者是否有效并具足够权限;若非,使用`ALTER AUTHORIZATION`更改为有效登录名。其次,确认Log Reader使用的登录名拥有读取事务日志所需的角色权限。还需检查复制配置是否准确无误,并验证Log Reader代理的连接信息及参数。重启SQL Server Agent服务或手动启动Log Reader作业亦可能解决问题。最后,审查SQL Server错误日志及Windows事件查看器以获取更多线索。
272 0
|
SQL
关于ThinkPHP5.1+的Log无法记录SQL调试记录的小经历
项目开发阶段,除了基本编码外,性能也需要实时关注与优化。之前我的大部分项目都是使用ThinkPHP5.0以及ThinkPHP3.2,对于框架提供的日志记录和日志配置都差不多,然后使用ThinkPHP5.1的时候就吃瘪,花了十几分钟才好,所以写一下防止后面忘记了再踩坑。
311 0
|
SQL 安全 网络安全
解决:provider:Named Pipes Provider error:40无法打开SQL Server的连接 的3种方式
解决:provider:Named Pipes Provider error:40无法打开SQL Server的连接 的3种方式
2077 0
|
SQL IDE Java
IDEA控制台如何查看格式化的SQL(MyBatis Log插件)
IDEA控制台如何查看格式化的SQL(MyBatis Log插件)
3149 0
|
Java
解决:Config service failed to start in 120 seconds! Please check ./service/apollo-service.log...
解决:Config service failed to start in 120 seconds! Please check ./service/apollo-service.log...
438 0
SQL Server Connectors By Thread Pool | DTSQLServerTP plugin instructions
SQL Server Connectors By Thread Pool | DTSQLServerTP plugin instructions
166 0
|
SQL JSON Java
SQL Server Connectors By Thread Pool | DTSQLServerTP 插件使用说明
SQL Server Connectors By Thread Pool | DTSQLServerTP 插件使用说明
283 0
|
SQL 存储 关系型数据库
MySQL的Binlog日志和Relay Log日志存储的SQL都是一样的吗?底层原理是什么?
MySQL的Binlog日志和Relay Log日志存储的SQL都是一样的吗?底层原理是什么?
635 0

热门文章

最新文章

下一篇
开通oss服务