通过使用本网站, 您同意 隐私政策.
接受
进入IT进入IT进入IT
  • 家
  • 信息技术专家
  • 技术
  • 微软
    • 天蓝色
    • 配置管理器/SCCM
    • 数字PM
    • 协调者
    • Hyper-V
    • 微软 Edge 预览体验
    • 微星指数
    • 办公室 365
    • 办公室内幕
    • 电力商业智能
    • Skype
    • SQL服务器
    • 团队
  • 视窗
    • Windows 管理中心
    • Windows客户端
    • Windows服务器
  • SCCM查询集合列表
阅读: 如何修复 SCCM 无法恢复主数据库错误
字体调整器氨基酸
进入IT进入IT
字体调整器氨基酸
  • 家
  • 信息技术专家
  • 技术
  • 微软
  • 视窗
  • SCCM查询集合列表
搜索
  • 家
  • 信息技术专家
  • 技术
  • 微软
    • 天蓝色
    • 配置管理器/SCCM
    • 数字PM
    • 协调者
    • Hyper-V
    • 微软 Edge 预览体验
    • 微星指数
    • 办公室 365
    • 办公室内幕
    • 电力商业智能
    • Skype
    • SQL服务器
    • 团队
  • 视窗
    • Windows 管理中心
    • Windows客户端
    • Windows服务器
  • SCCM查询集合列表
configmgr

如何修复 SCCM 无法恢复主数据库错误

出版: 二月 18, 2024
10 最小阅读量
分享

如何修复 SCCM 无法恢复主数据库错误. Configuration Manager SQL Instance service doesn’t start. When you try to start it it’s stopped and brings the next error in Event Log.

内容
解决方案 1: 从备份恢复解决方案 2: 重建主数据库解决方案 3: 移动到另一个 SQL Server 实例

Cannot recover the master database. SQL Server is unable to run. 从完整备份恢复主服务器, 修复它, 或重建它. 有关如何重建主数据库的更多信息, see SQL Server Books Online.

Event Log

解决方案 1: 从备份恢复

笔记: 你必须有这个备份.

Restoring the master database from the SQL server or another backup solution.

1. Run the SQL Server Configuration Manager;

2. Right-click the SQL Server service 并点击 特性;

3. 之后选择 启动参数选项卡;

4. 类型 – 米 in the 指定启动参数 文本框并单击 Add 按钮. 点击 申请;

6. Restart your SQL Server.

Use the command line in SQL Server Management Studio to restore your SQL server master database from the backup.

1. 导航到 …/Tools/Bin 目录并查找 sqlcmd.exe;

2. 一旦找到, run the sqlcmd.exe file;

3. Use the – S 私人连接的标志. 但, 如果您有公共连接, 然后使用 – U 和 –P 旗帜;

4. 这样做之后, 您将能够轻松恢复主数据库备份;

5. 现在删除 – 米 flag services from the SQL Server and restart the SQL server to return to the multi-client mode.

笔记: If you have another backup solution like Data Protection Manager there is a more easy way o restore SQL backup.

解决方案 2: 重建主数据库

以下过程重建master, 模型, 数据库数据库, 和 tempdb 系统数据库. 您无法指定要重建的系统数据库. 对于集群实例, this procedure must be performed on the active node and the SQL Server resource in the corresponding cluster application group must be taken offline before performing the procedure.

此过程不会重建资源数据库. 参见 参考资料 部分, 本主题后面的“重建资源数据库过程”.

为 SQL Server 实例重建系统数据库:

1. Insert the SQL Server 2019 (15.x) 将安装介质放入磁盘驱动器, 或者, 从命令提示符, 将目录更改为本地服务器上 setup.exe 文件的位置. 服务器上的默认位置是C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\SQLServer2016.

2. 从命令提示符窗口, enter the following command. 方括号用于表示可选参数. 请勿输入括号. When using a Windows operating system that has User Account Control (联合应用中心) 已启用, 运行安装程序需要提升权限. 命令提示符必须以管理员身份运行.

Setup /QUIET /ACTION=REBUILDDATABASE  /INSTANCENAME=InstanceName /SQLSYSADMINACCOUNTS=accounts [ /SAPWD=  StrongPassword ] [ /SQLCOLLATION=CollationName]
参数名称描述
/安静或/Q指定安装程序在没有任何用户界面的情况下运行.
/操作=重建数据库指定安装程序重新创建系统数据库.
/实例名称=实例名称Is the name of the instance of SQL Server. 对于默认实例, 输入MSSQLSERVER.
/SQLSYSADMINACCOUNTS=帐户Specifies the Windows groups or individual accounts to add to the 系统管理员 固定服务器角色. 当指定多个帐户时, 用空格分隔帐户. For example, enter 内置管理员MyDomainMyUser. 当您指定帐户名称中包含空格的帐户时, 将帐户用双引号引起来. For example, enter NT当局系统.
[ /SAPWD=强密码 ]Specifies the password for the SQL Server sa 帐户. 如果实例使用混合认证,则需要此参数 (SQL Server and Windows Authentication) mode.

** 安全说明 ** 这 sa account is a well-known SQL Server account and it is often targeted by malicious users. It is very important that you use a strong password for the sa login.

Do not specify this parameter for Windows Authentication mode.
[ /SQL排序规则=排序规则名称 ]指定新的服务器级排序规则. 该参数是可选的. 未指定时, 使用服务器的当前排序规则.

** 重要的 **
更改服务器级别排序规则不会更改现有用户数据库的排序规则. 所有新创建的用户数据库将默认使用新的排序规则.
[/SQLTEMPDBFILECOUNT=文件数]指定tempdb数据文件的数量. 该值最多可以增加到 8 或核心数量, 以较高者为准.

默认值: 8 或核心数量, 以较低者为准.
[ /SQLTEMPDBFILESIZE=文件大小InMB ]指定每个 tempdb 数据文件的初始大小(以 MB 为单位). 设置允许的大小最大为 1024 MB.

默认值: 8
[/SQLTEMPDBFILEGROWTH=FileSizeInMB]指定每个tempdb数据文件的文件增长增量(以MB为单位). A value of 0 表示自动增长关闭,不允许增加空间. 设置允许的大小最大为 1024 MB.

默认值: 64
[/SQLTEMPDBLOGFILESIZE=FileSizeInMB]Specifies the initial size of the tempdb log file in MB. 设置允许的大小最大为 1024 MB.

默认值: 8.

允许范围: 最小值 = 8, 最大值 = 1024.
[/SQLTEMPDBLOGFILEGROWTH=FileSizeInMB]Specifies the file growth increment of the tempdb log file in MB. A value of 0 表示自动增长关闭,不允许增加空间. 设置允许的大小最大为 1024 MB.

默认值: 64

允许范围: 最小值 = 8, 最大值 = 1024.
[ /SQLTEMPDBDIR=目录 ]指定 tempdb 数据文件的目录. 当指定多个目录时, 用空格分隔目录. 如果指定了多个目录,tempdb 数据文件将以循环方式分布在各个目录中.

默认值: 系统数据目录
[ /SQLTEMPDBLOGDIR=目录 ]Specifies the directory for the tempdb log file.

默认值: 系统数据目录

3. 当安装程序完成重建系统数据库时, 它返回到命令提示符,没有任何消息. Examine the Summary.txt log file to verify that the process completed successfully. 该文件位于C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\Logs.

RebuildDatabase 场景删除系统数据库并以干净状态重新安装. 因为tempdb file count的设置不持久, 安装过程中 tempdb 文件数量的值未知. Therefore, RebuildDatabase 场景不知道要重新添加的 tempdb 文件的数量. 您可以使用 SQLTEMPDBFILECOUNT 参数再次提供 tempdb 文件数量的值. 如果没有提供参数, RebuildDatabase 将添加默认数量的 tempdb 文件, tempdb 文件的数量与 CPU 数量一样多,或者 8, 以较低者为准.

就我而言, this doesn’t help and finish with error:

Detailed results:
   Feature:                       Database Engine Services
   Status:                        Failed
   Reason for failure:            An error occurred during the setup process of the feature.
   Next Step:                     Use the following information to resolve the error, and then try the setup process again.
   Component name:                SQL Server Database Engine Services Instance Features
   Component error code:          0x851A001A
   Error description:             Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
   Error help link:               https://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=14.0.3192.2&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026

I try to change the SQL Instance service run account, 但这没有帮助.

解决方案 3: 移动到另一个 SQL Server 实例

笔记: You must have access to SCCM SQL database and *.log file.

1. 安装新的 SQL Server instance;

2. 打开数据库文件安全设置并添加 Full Control 对于您当前的用户;

3. 重复此操作 *.log 您的数据库文件;

4. Attach Configuration Manager to new SQL Instance;

5. Mount Configuration Manager installation *.iso file and run 飞溅.hta;

6. 点击 安装;

7. 点击 下一个;

8. Select 执行站点维护或重置此站点 然后单击 下一个;

9. Select Modify SQL Server configuration 然后单击 下一个;

10. Enter new SQL Server instance details and click 下一个;

11. 当该过程完成时, 关闭安装向导.

12. 尝试运行 Configuration Manager console 并检查一切是否正常.

标记:命令提示符 (指令管理系统)MECMMEMCM微软SQL服务器微软视窗服务器系统中心配置管理器视窗
上一篇 Office 预览体验 Mac 版 16.34 发行说明
下一篇 如何在 Windows 中设置默认键盘布局 10 使用GPO
发表评论 发表评论

发表回复 取消回复

您的电子邮件地址不会被公开. 必填字段已标记 *

该网站使用 Akismet 来减少垃圾邮件. 了解您的评论数据的处理方式.

翻译

English中文(简体)DanskNederlandsFrançaisDeutschItaliano한국어PolskiPortuguêsRomânăEspañolУкраїнська
经过 Transposh - translation plugin for wordpress

热门帖子

Windows Server 的系统要求 2016
Windows服务器
配置管理器查询集合列表
配置管理器查询集合列表
configmgr
在经典团队网站的新式页面上启用结构化/托管导航
技术
SCCM 无法从 MP 获取预期版本的 DP 位置
configmgr

最近的帖子

在 Ubuntu 上安装和配置 Fail2ban 以实现 SSH 保护 24.04
Linux
如何在Linux中检查时区
Linux
在AlmaLinux上启用和配置FirewallD
Linux
AlmaLinux中的用户创建和SSH密钥设置
Linux

© 2023 进入IT

转到移动版本
欢迎回来!

登录您的帐户

用户名或电子邮件地址
密码

丢失密码?