About

MS MVP Logo

View Marc Lognoul [MVP]'s profile on LinkedIn

Disclaimer

The information and materials in this site are provided "AS IS" with no warranties, and confering no rights. This site does not represent the thoughts, intentions, plans or strategies of our employers, customers, friends or family, solely our own personal opinions.

Backup/Restore of the ADMT Database

by Marc 10. April 2008 20:24

Attention: none of the procedure describe in this post are supported by Microsoft, test and use at your own risks!

When migrating or restructuring domains, it often happens that, the first steps are to migrate user accounts and groups and then, gradually migrate computers while translating security. When using standard method of translation, the AMT Tools uses its internal database to store mapping between the user from the security principal (user, group or computer) from the source domain and the one from the destination domain, in order to achieve a SID mapping between both.While in most case, the migration can happen in one day, larger organizations may need weeks to achieve migration. It may therefore be an interesting option to backup the ADMT database, just in case of disaster… 

With versions of ADMT earlier than v3, backup was a matter of making sure not one was busy with an ADMT console open and coping the protar.mdb file (a jet-like database). From version 3, ADMT uses MSDE as database engine.

There are therefore basically two methods to back up the database:

You can use an “offline” method by stopping the service MSSQL$MS_ADMT, then copying the files ADMT.mdf et ADMT_log.LDF located under %windir%\ADMT\MSSQL$MS_ADMT\Data\ to a safe place and finally starting the service MSSQL$MS_ADMT again.You can also use an “online” method (well known by DBA’s).

To backup, execute this command: "%PROGRAMFILES%\Microsoft SQL Server\80\Tools\Binn\osql.exe" -E -S %computername%\MS_ADMT -Q"BACKUP DATABASE ADMT TO DISK = 'C:\admt.bak'"

And to restore, execute this one:

"%PROGRAMFILES%\Microsoft SQL Server\80\Tools\Binn\osql.exe" -E -S %computername%\MS_ADMT -Q"RESTORE DATABASE ADMT FROM DISK = 'C:\admt.bak'"

Since MSDE is based on SQL2000, it will not support UNC path, only local file system!

And cut!

Tags:

AD | Migration

Comments are closed