·您的位置: 首页 » 资源教程 » 编程开发 » 其它教程 » 压缩AD数据库

压缩AD数据库

类别: Windows教程  评论数:0 总得分:0
压缩AD数据库可以提高DC的在AD读写方面的性能.
因为操作AD数据库是比较危险的动作,因此在压缩AD数据库前,为安全起见请备份好系统状态数据以备不时之需.

操作过程:
1.重新启动DC.
2.使用目录服务恢复模式启动机器.
3.开启命令行模式.
4.启动NTDS软件:ntdsutil.exe
5.在ntdsutil提示符下输入"files".如下:
ntdsutil:files
6.使用Compact to %s 命令压缩数据库.
因为AD数据库NTDS.dit存放在C:WINNTNTDS下,因此不能将数据库直接压缩在C:WINNTNTDS下,应该压缩到另外一个目录中.
7.压缩完毕,将压缩了的ntds.dit拷回到C:WINNTNTDS下覆盖原来的ntds.dit,并将C:WINNTNTDS下的所有.log文件删除.
8.使用quit命令退出ntdsutil软件.
9.重新启动DC,以普通模式进入系统.


一个简单的例子:
****************************

file maintenance: Compact to e:打开数据库 [Current]。
使用临时路径: E:执行指令: C:WINNTsystem32esentutl.exe /d "C:WINNTNTDSntds.dit" /8 /o /l"C:
WINNTNTDS" /s"C:WINNTNTDS" /t"e:ntds.dit" /!10240 /p


Initiating DEFRAGMENTATION mode...
Database: C:WINNTNTDSntds.dit
Log files: C:WINNTNTDS
System files: C:WINNTNTDS
Temp. Database: e:ntds.dit

Defragmentation Status ( % complete )

0 10 20 30 40 50 60 70 80 90 100
|----|----|----|----|----|----|----|----|----|----|
...................................................

Note:
It is recommended that you immediately perform a full backup
of this database. If you restore a backup made before the
defragmentation, the database will be rolled back to the state
it was in at the time of that backup.

Operation completed successfully in 17.314 seconds.


产生 Process Exit 码 0x0(0)

如果压缩成功您需要:
复制 "e:ntds.dit" 到 "C:WINNTNTDSntds.dit"
并删除旧的日志文件:
del C:WINNTNTDS*.log
file maintenance:

********************************
在上面的例子中,我们将数据库压缩到了e:下,这里注意,应该使用e:而不能使用e:做为路径,否则会出错.

ntdsutil.exe的file maintenance功能如下:

? 打印这个帮助信息
Compact to %s 将 DB 压缩到指定的目录
Header 转储 Jet 数据库头
Help 打印这个帮助信息
Info 返回有关 DS 文件的信息
Integrity 执行 Jet 功能检查
Move DB to %s 将DB 移到指定的目录
Move logs to %s 将日志移到指定的目录
Quit 返回到上一个菜单
Recover 执行软数据库故障恢复
Repair 执行数据库修复 - 您可能会丢失数据
Set path backup %s 设置联机备份目录路径
Set path DB %s 设置 DB 文件路径
Set path logs %s 设置登录目录路径
Set path working dir %s 设置 NTDS 工作目录路径
-= 资 源 教 程 =-
文 章 搜 索
关键词:
类型:
范围:
纯粹空间 softpure.com
Copyright © 2006-2008 暖阳制作 版权所有
QQ: 15242663 (拒绝闲聊)  Email: faisun@sina.com
 纯粹空间 - 韩国酷站|酷站欣赏|教程大全|资源下载|免费博客|美女壁纸|设计素材|技术论坛   Valid XHTML 1.0 Transitional
百度搜索 谷歌搜索 Alexa搜索 | 粤ICP备19116064号-1