当前位置:网站首页 > SQL数据库编程 > 正文

sqlldr 导入(sqlldr 导入报错)



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:

  1. 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
  2. Open the error.log file from the ADSync2019 instance folder in the following directory path:

    <service profile path>AppDataLocalMicrosoftMicrosoft SQL Server Local DBInstancesADSync2019

  3. Find the following error entry in the log to verify that the database is corrupted:
     
  4. 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.
  5. Open the SQL Templates folder at C:Program FilesMicrosoft SQL Server150LocalDBBinnTemplates.
  6. Copy the model.mdf and modellog.ldf files to the ADSync2019 instance folder from step 2.
  7. 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 导入报错)的文章就 介绍到这了,更多相关内容请继续浏览下面的相关 推荐文章,希望大家都能在 编程的领域有一番成就!

版权声明


相关文章:

  • .sql文件有什么用(数据库.sql文件)2025-08-08 22:54:08
  • sql语句中foreach循环(sql中的foreach用法)2025-08-08 22:54:08
  • sqlldr字符编码(sqlldr 指定字符集)2025-08-08 22:54:08
  • .sql文件有什么用(.sql文件的作用)2025-08-08 22:54:08
  • pymysql连接数据库失败(pymssql连接数据库 报错)2025-08-08 22:54:08
  • pymysql连接数据库失败(pymysql 连接数据库)2025-08-08 22:54:08
  • 数据库增删改查关键字(sql增删改查关键字)2025-08-08 22:54:08
  • pyspark读取mysql(pyspark.sql)2025-08-08 22:54:08
  • mongodb数据库和mysql区别(mongodb与mysql的区别)2025-08-08 22:54:08
  • mysql主键用uuid(mysql主键用什么类型)2025-08-08 22:54:08
  • 全屏图片