您的位置:首页 > 数据库

MS SQL Server错误收集以及解决办法

2012-12-17 13:38 330 查看
1、103.242 系统报错日志 Zabbix Agent:

[6184]:  Can't get required buffer size. Counter path is "SQLServer:Memory Manager\Total Server Memory (KB)": The specified counter path could not be interpreted。

链接地址:http://sqltechconsulting.com/blog/page/3/

 

数据库服务不能起来 创建时间:2011年10月26日(星期三) 晚上10:48

The description for Event ID 17052 from source MSSQL$XXX73 cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

SQLServerAgent Monitor: SQLServerAgent has terminated unexpectedly.

the message resource is present but the message is not found in the string/message table

解决方式:Kill任务管理器 SQL Server进程,重启。

 

同步错误:The process could not execute 'sp_replcmds' on . (Source: MSSQL_REPL, Error number: MSSQL_REPL20011)

The process could not execute 'sp_replcmds' on XXX\XXXX. (Source: MSSQL_REPL, Error number: MSSQL_REPL20011)

Get help: http://help/MSSQL_REPL20011

An unexpected Text Information Begin (TIB) log record was encountered while processing the TIB for offset 0. Last TIB processed: (textInfoFlags 0xfffffffc, coloffset 4912, newSize 0, oldSize -4294967295). Contact Customer Support Services. (Source: MSSQLServer,
Error number: 18834)

Get help: http://help/18834

The Log-Scan Process failed to construct a replicated command from log sequence number (LSN) {0001e640:000001b7:00f9}. Back up the publication database and contact Customer Support Services. (Source: MSSQLServer, Error number: 18805)

Get help: http://help/18805

The process could not execute 'sp_replcmds' on 'XXX\XXXX'. (Source: MSSQL_REPL, Error number: MSSQL_REPL22037)

Get help: http://help/MSSQL_REPL22037

 

sp_repldone, sp_replrestart

 

 

EXEC sp_repldone @xactid = NULL, @xact_segno = NULL, @numtrans = 0, @time = 0, @reset = 1

 

-- Flushes the article cache

EXEC sp_replflush

 

同步错误:Command attempted:

if @@trancount > 0 rollback tran

(Transaction sequence number: 0x000128D40000E4C1003F00000000, Command ID: 13)

Error messages:

SQL Server detected a logical consistency-based I/O error: unable to decrypt page. It occurred during a read of page (1:7230447) in database ID 6 at offset 0x00000dca7de000 in file 'F:\DataBase\XXX.mdf'.  Additional messages in the SQL Server error log or system
event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for mor (Source: MSSQLServer,
Error number: 824)

Get help: http://help/824

SQL Server detected a logical consistency-based I/O error: unable to decrypt page. It occurred during a read of page (1:7230447) in database ID 6 at offset 0x00000dca7de000 in file 'F:\DataBase\XXX.mdf'.  Additional messages in the SQL Server error log or system
event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for mor (Source: MSSQLServer,
Error number: 824)

Get help: http://help/824

 

previous releases of microsoft visual studio 2008

安装 Microsoft SQL Server 2008 时可能需要 Microsoft Visual Studio 2008 Service Pack 1 (SP1) 的发行版本。

http://www.microsoft.com/downloads/zh-cn/details.aspx?familyid=27673C47-B3B5-4C67-BD99-84E525B5CE61&displaylang=zh-cn

 

 

---------------------------修改维护计划中报错,调用SSIS的组件报错-----------------------------------------------

 

 

--Value cannot be null. Parameter name: component (System.Design)

--Error 1 Error loading 'DBBak - sa' : The LoadFromSQLServer method has encountered OLE DB error code 0x80004005 (Communication link failure).  The SQL statement

that was issued has failed.  . server=XXX;package=Maintenance Plans\DBBak;username=sa; 1 1 

use master

GO

EXEC sp_configure 'show advanced option', '1';

RECONFIGURE WITH OVERRIDE

GO

EXEC sp_configure;

 

EXEC sp_configure 'network packet size', 14336;

RECONFIGURE WITH OVERRIDE

GO

 

 

The database owner SID recorded in the master database differs from the database owner SID recorded in database 'XXX'. You should correct this situation by resetting

the owner of database '' using the ALTER AUTHORIZATION statement.

SELECT

    a.name

    , a.owner_sid

    , b.sid

    , b.name

    , b.type_desc

FROM   

    master.sys.databases a

    LEFT OUTER JOIN master.sys.server_principals b

        ON a.owner_sid = b.sid

WHERE

    a.name not in ('master','tempdb','model','msdb');

EXEC sp_helplogins;

ALTER AUTHORIZATION ON DATABASE:: Monitor TO [XXX\Administrator];

EXEC dbo.sp_changedbowner @loginame = [XXX\Administrator];

 

 

 

--Network packet size (bytes): 4096

--Use the network packet size option to set the packet size (in bytes) used across the entire network. Packets are the fixed-size chunks of data that transfer requests and results between clients and servers. The default packet size set by SQL Server is
4,096 bytes. If an application does bulk copy operations, or sends or receives large amounts of text or image data, a packet size larger than the default may improve efficiency because it results in fewer network read and write operations. If an application
sends and receives small amounts of information, the packet size can be set to 512 bytes, which is sufficient for most data transfers.

--Note

--Do not change the packet size unless you are certain that it will improve performance. For most applications, the default packet size is best.

 

--On systems using differing network protocols, set network packet size to the size for the most common protocol used. The network packet size option improves network performance when network protocols support larger packets. Client applications can override
this value.

--You can also call OLE DB, Open Database Connectivity (ODBC), and DB-Library functions request a change the packet size. If the server cannot support the requested packet size, the Database Engine will send a warning message to the client. In some circumstances,
changing the packet size might lead to a communication link failure such as the following:

--Native Error: 233, no process is on the other end of the pipe.

--The network packet size option is an advanced option. If you are using the sp_configure system stored procedure to change the setting, you can change network packet size only when show advanced options is set to 1. After this setting is changed, all new
connections receive the new value.

--The maximum
4000
network packet size for encrypted connections is 16,383 bytes.

sp_configure

sp_configure 'network packet size (B)',32767

--4096

reconfigure with override

go

 

 

错误 2812: 未能找到存储过程 master.dbo.xp_fixeddrives

在还原数据库的时候出现"错误2812:未能找到存储过程'master.dbo.xp_fileexist'",

解决方案:

把恢复数据库需要用到的存储过程个恢复,打开MSSQL查询分析器,分别运行下面的两条数据库语句即可.

EXEC sp_addextendedproc xp_dirtree ,@dllname ='xpstar.dll'

EXEC sp_addextendedproc xp_fileexist ,@dllname ='xpstar.dll'

 

 

You cannot restore a backup created with a newer version of SQL Server on an instance running an older version of SQL Server. Unfortunately, the error messages that are displayed may not always tell you that it is a versioning problem. These are some of
the error messages raised when trying to restore a backup file that is not backwards compatible.

 

SELECT failed because the following SET options have incorrect settings: 'ANSI_PADDING'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data
type methods and/or spatial index operations.

 

SQL Server 2008 R2 to SQL Server 2008

Msg 3169, Level 16, State 1, Line 1

The database was backed up on a server running version 10.50.1600. That version is incompatible with this server, which is running version 10.00.1600. Either restore the database on a server that supports the backup, or use a backup that is compatible with
this server.

Msg 3013, Level 16, State 1, Line 1

RESTORE DATABASE is terminating abnormally.

SQL Server 2008 R2 to SQL Server 2005

Server: Msg 3241, Level 16, State 7, Line 1

The media family on device 'f:\temp\test001_sql2008r2.bak' is incorrectly formed. SQL Server cannot process this media family.

Server: Msg 3013, Level 16, State 1, Line 1

RESTORE DATABASE is terminating abnormally.

SQL Server 2008 R2 to SQL Server 2000

Server: Msg 3169, Level 16, State 1, Line 1

The backed-up database has on-disk structure version 661. The server supports version 539 and cannot restore or upgrade this database.

Server: Msg 3013, Level 16, State 1, Line 1

RESTORE DATABASE is terminating abnormally.

SQL Server 2008 to SQL Server 2005

Server: Msg 3241, Level 16, State 7, Line 1

The media family on device 'f:\temp\test001_sql2008.bak' is incorrectly formed. SQL Server cannot process this media family.

Server: Msg 3013, Level 16, State 1, Line 1

RESTORE DATABASE is terminating abnormally.

SQL Server 2008 to SQL Server 2000

Server: Msg 3169, Level 16, State 1, Line 1

The backed-up database has on-disk structure version 655. The server supports version 539 and cannot restore or upgrade this database.

Server: Msg 3013, Level 16, State 1, Line 1

RESTORE DATABASE is terminating abnormally.

SQL Server 2005 to SQL Server 2000

Server: Msg 3169, Level 16, State 1, Line 1

The backed-up database has on-disk structure version 611. The server supports version 539 and cannot restore or upgrade this database.

Server: Msg 3013, Level 16, State 1, Line 1

RESTORE DATABASE is terminating abnormally.

 

 

/*-- 错误18483:未能连接到服务器 'xx',因为'distributor_admin'未在该服务器上定义为远程登录。 --*/

  --出现这种问题,应该是你曾经更改过计算机名

  --执行下面的语句,完成后重新启动SQL服务

IF SERVERPROPERTY('ServerName')@@SERVERNAME

BEGIN

DECLARE @srvname sysname

SET @srvname=@@SERVERNAME

EXEC sp_dropserver @server=@srvname

SET @srvname=CAST(SERVERPROPERTY('ServerName') as sysname)

EXEC sp_addserver @server = @srvname , @local = 'LOCAL'

 

 

Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impersonated, or you do not have permission

 

USE <DatabaseName>

GO

sp_changedbowner '<NewLogin>'

注意<DatabaseName> 值,该值代表数据库的名称。<NewLogin> 值,该值代表要为其设置的登录的名称。

 

 

 传递给数据库 '' 中的日志扫描操作的日志扫描号 (::) 无效。此错误可能指示数据损坏,或者日志文件(.ldf)与数据文件(.mdf)不匹配。如果此错误是在复制期间出现的,请重新创建发布。否则,如果该问题导致启动期间出错,请从备份还原。

 

DBCC REBUILD_LOG('djcallcenter', 'F:\djcallcenter_1.ldf')

CREATE DATABASE djcallcenter FOR_ATTACH_REBUILD_LOG

 

 

安装.NET3.0的时候报错,错误日志如下:

 

[03/19/12,10:28:19] Microsoft .NET Framework 3.0 SP2 x86: [2] Error: Installation failed for component Microsoft .NET Framework 3.0 SP2 x86. MSI returned error code 1603

[03/19/12,10:28:34] WapUI: [2] DepCheck indicates Microsoft .NET Framework 3.0 SP2 x86 is not installed.

标题: Microsoft SQL Server 2008安装程序

------------------------------

 

出现以下错误:

无法获得 XXX\Microsoft.SqlServer.Management.PSProvider.dll程序集中的安装程序类型。

------------------------------

解决参考URL:http://support.microsoft.com/kb/955403/zh-cn

------------------------------

主要原因是Gost的系统把IE给绑架了…

解决方案:http://wenku.baidu.com/view/c223cb62f5335a8102d22015.html

 

 

 

 

sql server 配置管理器 无法连接到 wmi提供程序

 

找了好久啊!!建议先用最后一个方法

无法连接到WMI提供程序。你没有权限或者该服务器无法访问/cannot connect to WMI provider. You do not have permission or the……

解决1:

Cannot connect to WMI provider. You do not have permission or the server is unreachable. Note that you can only manage SQL Server 2005 servers with SQL Server

Configuration Manager.Invalid class [0x80041010] The solution is to go to a command prompt and then run mofcomp.

C:\Program Files\Microsoft SQL Server\Shared>mofcomp "C:\Program Files\Microsoft SQL Server\Shared\sqlmgmproviderxpsp2up.mof"

The output will look like below

Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.2180

Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.

Parsing MOF file: C:\Program Files\Microsoft SQL Server\Shared\sqlmgmprovider

xpsp2up.mof

MOF file has been successfully parsed

Storing data in the repository...

Done!

注意一下:上述的mofcomp命令在C:\WINDOWS\system32\wbem目录下。

解决2:

1 右击“我的电脑”-->“管理”

2 在“本地用户和组”内的Administrators组上双击,出现添加属性对话框。

3 单击“添加”按钮,出现添加用户对话框

4 单击“高级”按钮,再单击“搜索”(或是“立即查找”)按钮。注:此'NT AUTHORITY\NETWORK SERVICE'用户为系统内置帐户,无法直接添加。

5 在“搜索结果”内选择“Network Service”用户后,单击“确定”

3.检查一下 windows下的system32 中是否有framedyn.dll这个系统文件,如果没有到system32 下的wbem文件中拷贝framedyn.dll到system32 目录下。 我进到system32目录找framedyn.dll

文件,果然没有找到,再进入system32\wbem目录,找framedyn.dll,拷贝到system32目下。再次进入配置管理器,这次终于成功了!!!问题终于解决了!!!这主要是通过Java 或者vc连

接数据库遇到的问题。

mofcomp "C:\Program Files\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof"

 

 无法初始化链接服务器 "XXX" 的 OLE DB 访问接口 "OraOLEDB.Oracle" 的数据

消息 7303,级别 16,状态 1,过程 sp_testlinkedserver,第 1 行

无法初始化链接服务器 "null" 的 OLE DB 访问接口 "OraOLEDB.Oracle" 的数据源对象。

 

http://blog.sina.com.cn/s/blog_614b6f210100t80r.html
http://blog.163.com/huhenggang@126/blog/static/113852947201121294114739/

 

/****** @server:自定义名,@srvproduct:产品名,固定值,@provider:驱动名{<OraOLEDB.Oracle>,<MSDAORA>64下有Bug},@datasrc:数据源,Oracle这里配置为 tnsnames 中的别名******/

EXEC master.dbo.sp_addlinkedserver @server = N'LinuxOrcl', @srvproduct=N'Oracle', @provider=N'OraOLEDB.Oracle', @datasrc=N'LINUXORCL76'

 /*

 @rmtsrvname: 远程链接服务器名字

 @useself: 是否使用当前登录SQL Server的认证信息登录链接服务器,SQL Server和远程链接服务器均使用Windows集成认证登录时可以使用

 @locallogin: 建立本地SQL Server登录帐号与远程链接服务器登录帐号之间的对应关系,例如本地SQL Server sa帐号使用A1登录链接服务器,crm帐号使用A2登录链接服务器。@locallogin可以是域帐号。为null时本地SQL Server所有帐号均可使用该登录信息

 @rmtuser,@rmtpassword: 登录远程链接服务器的帐号、密码

 */

EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'LinuxOrcl',@useself=N'False',@locallogin=NULL,@rmtuser=N'system',@rmtpassword='DBAAdmin'

GO

## HOST 指定IP,PORT:指定端口,SERVICE_NAME:全局数据库ID,LINUXORCL76:64位下为@datasrc

LINUXORCL76 =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.12.76)(PORT = 1521))

    )

    (CONNECT_DATA =

      (SERVICE_NAME = orcl)

    )

  )

 

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

消息 20615,级别 16,状态 1,过程 sp_MSrepl_addsubscription,第 675 行

无法添加对发布的异类订阅。没有为异类订阅启用该发布。

消息 20021,级别 16,状态 1,过程 sp_MSrepl_addpushsubscription_agent,第 258 行

找不到该订阅。

exec sp_changepublication N'Linux_Orcl', N'enabled_for_het_sub', N'true', @force_invalidate_snapshot = 1, @force_reinit_subscription = 1

GO

 

标题: Microsoft SQL Server 2012 Service Pack 1 安装程序

------------------------------

出现以下错误:

Could not open key: UNKNOWN\Components\1FA18F7974E099CD0AF18C3B9B1A1EE8\536B55D6A9188274EB99B175CC002B76.   Verify that you have sufficient access to that key, or contact your support personnel. 

有关帮助信息,请单击: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft%20SQL%20Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3000.0&EvtType=0xDF039760%25401201%25401
------------------------------


Error

Error 1402. Could not open key UNKNOWN\Components\ DA42BC89BF25F5BD0AF18C3B9B1A1EE8 

Verify that you have sufficient access to that key or contact your support personnel. 

 


Solution

To resolve the issue, perform the following steps:

 

1)  Resolve permission issues per:  http://support.microsoft.com/kb/313222 . Once done, run the installer again.

 

2)  If step 1 is unsuccessful, open the registry. Create a backup of the registry!! Then, locate the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\DA42BC89BF25F5BD0AF18C3B9B1A1EE8 key and attempt to open.
Typically an "Access Denied" error will be generated if the issue above is occurring. Right-mouse click on the key and click 'Permissions'. Grant FULL access to this folder, and check the box to allow the same permission to be granted to this key's sub-folders
(descendants). Exit the registry, and install SSR.

 

 


 

3)  If both steps above are unsuccessful,

Step one, back up the registry.

Step two, go to the MS KB: <http://www.microsoft.com/downloads/details.aspx?FamilyID=e8ba3e56-d8fe-4a91-93cf-ed6985e3927b&displaylang=en> and download the file that installs subinacl.  It is an MSI file, and will do a quick install of a few Microsoft
files.

Step three, create a batch file with the following commands:

cd /d "%ProgramFiles%\Windows Resource Kits\Tools"

subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f /grant=system=f

subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f /grant=system=f

subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f

subinacl /subdirectories %SystemDrive% /grant=administrators=f /grant=system=f

subinacl /subdirectories %windir%\*.* /grant=administrators=f /grant=system=f

secedit /configure /cfg %windir%\inf\defltbase.inf /db defltbase.sdb /verbose

Step four, run the batch file.  Let it run until the Dos screen closes.

Step five, reboot the machine and run the install again

4)  If all steps above do not resolve the issue, then export the contents of the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\DA42BC89BF25F5BD0AF18C3B9B1A1EE8 key then delete the entire key. Once deleted,
create a new key with the same name and rerun setup.

------------------------------
 

SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.

解决方法如下:

1、IP地址配置不正确,打开配置工具,选择MSSQLSERVER协议, 双击右边窗口的TCP/IP,在弹出窗口中检查IP配置。
2、可能是因为VIA协议启用造成的。
3、管理员密码修改也会造成sqlserver服务无法启动。修改以哪个账号来启动服务。


安装SQL2008 R2出现 chould not open key:unknown\components

错误信息:Error 1402.Could not open key: UNKNOWN\Components\94422102FB8324F41B3E7CD7B422BDC7\1926E8D15D0BCE53481466615F760A7F.   Verify that you have sufficient access to that
key, or contact your support personnel.

以管理员身份运行CMD命令提示符,输入以下语句并运行就OK了
secedit /configure /cfg %windir%\inf\defltbase.inf /db defltbase.sdb /verbose


 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐