This article describes a known issue in the SQLLocalDB utility that can prevent the ADSync service from starting because of a corrupted database. This issue mainly affects Microsoft Entra Connect 2.x servers that run on a Microsoft SQL Server 2019 LocalDB.
The issue is caused by a bug in the SQL Server backup logic that creates an inconsistent state in the SQL Server database start page. After a backup occurs, the database is set to recovery mode ( == 0x), and the (the log sequence number (LSN) for the database backup) is set to a value that points to a log file. However, the actual recovery mode that is governed by the database is .
In recovery mode, database logs are truncated automatically. In recovery mode, logs are truncated only after a backup. When SQLLocalDB is restarted after the log file is truncated, it detects a backup LSN that's earlier than the earliest log file. Therefore, it won't start the service.
Review the guidance in the next sections to learn how to do the following tasks:
- Correctly identify whether the Microsoft Entra Connect service (ADSync) doesn't start because of database corruption.
- Mitigate the issue by recovering the database from a corrupted state.
- Apply a permanent fix to make sure that this database corruption doesn't occur again.
You can verify that the issue is based on the following events in the Microsoft Entra Connect server:
- Event Viewer: Application, EventID 528, Source: SQLLocalDB 15.0
- Event Viewer: Application, EventIDs 2005 and 6226, Source: ADSync
- SQLLocalDB error.log file in <ADSync service profile path>AppDataLocalMicrosoftMicrosoft SQL Server Local DBInstancesADSync2019
To recover the database from a corrupted state, follow these steps:
- Go to one of the following ADSync Service profile locations, depending on the service account that's running (such as a domain account, virtual service account, or managed service account):
- C:Users<service account>
- C:UsersADSyncMSAxxxx$
- C:WindowsServiceProfilesADSync
- Open the error.log file from the ADSync2019 instance folder in the following directory path:
<service profile path>AppDataLocalMicrosoftMicrosoft SQL Server Local DBInstancesADSync2019
- Find the following error entry in the log to verify that the database is corrupted:
- If error "9003" exists in this entry, rename the model.mdf and modellog.ldf files in this folder to old_model.mdf and old_modellog.ldf, respectively.
- Open the SQL Templates folder at C:Program FilesMicrosoft SQL Server150LocalDBBinnTemplates.
- Copy the model.mdf and modellog.ldf files to the ADSync2019 instance folder from step 2.
- Start the ADSync service.
Microsoft has introduced a fix for this issue in Microsoft Entra Connect version 2.1.1.0. If the sync service (ADSync) can't be started, you need to apply the steps in the Mitigation section before you can upgrade Microsoft Entra Connect.
To prevent the corruption issues in the SQLLocalDB database, install the latest Microsoft Entra Connect build, which is available at Microsoft Entra Connect: Version release history.
If you have questions or need help, create a support request, or ask Azure community support. You can also submit product feedback to Azure feedback community.
到此这篇sqlldr 导入(sqlldr 导入报错)的文章就 介绍到这了,更多相关内容请继续浏览下面的相关 推荐文章,希望大家都能在 编程的领域有一番成就!版权声明:
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若内容造成侵权、违法违规、事实不符,请将相关资料发送至xkadmin@xkablog.com进行投诉反馈,一经查实,立即处理!
转载请注明出处,原文链接:https://www.xkablog.com/sqlbc/55440.html