大网数据广告活动
域与目录服务

How to extend the schema

· 52CE 我爱测

Learn how to extend the schema when existing classes and attributes do not fit with the type of data to be stored.

When the existing classes and/or attributes do not fit with the type of data that you want to store, you might want to extend the schema. For more information on deciding when to extend the schema, see Extending the Schema. When you have decided that schema extension is required, use the following procedure to extend the schema.

Verify Active Directory functionality before you apply any schema extensions

Verify Active Directory functionality before you update the schema to help ensure that the schema extension proceeds without error. At a minimum, ensure that all domain controllers for the forest are online and performing inbound replication.

To verify Active Directory functionality before you apply the schema extension:

  1. Log on to an administrative workstation that has the Windows Support Tool, Repadmin.exe, installed.

    [!NOTE] The Support Tools are located on the operating system installation media in the Support\Tools folder.

  2. Open a command prompt, and then change directories to the folder in which the Windows Support Tools are installed.

  3. At a command prompt, type the following, and then press ENTER:

    repadmin /replsum /bysrc /bydest /sort:delta
    

    All domain controllers should show 0 in the Fails column, and the largest deltas (which indicate the number of changes that have been made to the Active Directory database since the last successful replication) should be less than or roughly equal to the replication frequency of the site link that is used by the domain controller for replication. The default replication frequency is 180 minutes.

    For more information about additional steps that you can take to verify Active Directory functionality before you apply the schema extension, see How to upgrade Windows 2000 domain controllers to Windows Server 2003.

Extending the schema

To Extend the Schema:

  1. Determine the method of extension. Once you have carefully designed your schema changes, the next step is to decide which method to use to extend the schema. You can use one of the following methods:
    • Manually, using import files. See the documentation Using the LDIFDE Tool.

      [!NOTE] Do not use LDIFDE to import Windows Sch*.ldf files. Those files are required to extend the Active Directory schema in order to install domain controllers that run a newer version of Windows Server than the version that is running on the current schema master. When you need to extend the schema in order to install a new domain controller, use Adprep.exe.

    • Programmatically, using an installation program. For more information, see Programmatic Extension
  2. Enable Schema Changes. For more information, see Prerequisites for Installing a Schema Extension and Enabling Schema Changes at the Schema Master.
  3. Obtain an Object Identifier (OID) for your new attributes and/or classes, as described in Obtaining an Object Identifier.
  4. Create new attributes and classes.
  5. Use display specifiers to integrate new attributes and classes with the user interface, if necessary.
  6. Update the schema cache as described in Updating the Schema Cache.
  7. Verify the schema extension using LDP.exe.

See also

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 09/05/2024
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。