How do I dismount an exchange 2003 DB, run eseutil /d and then mount using a VB script?

15 pts.
Tags:
Eseutil utility
Exchange 2003
Exchange databases
VBScript
All, I have been working on a simple VB script to dismount a specific store, run a offline defrag, then mount the store again. Since this exchange 2K3 server has mulitple stores, I would rather not stop the IS service. I would use a scheduled task to call a batch file which runs the VBscript. I dont have a problem runiing this part, but it seems some of my sytax is incorrect, could you please offer your suggestions to me, I certainly would appreciate!!! Here is my VBScript code: Dim strMDBName Dim strSGName Dim strComputerName Dim strAdmGrpName Dim OrgName Dim LdapDc strMDBName = sg1priv2 ("Name of the MDB to be dismounted","Mailbox Store Name","Mailbox store (Server-A)") strSGName = SG1 ("Name of the storage group that contains the MDB","Storage Grop name","First storage group") strComputerName = USUS1EXC1002 ("Name of the Exchange 2000 server","Server Name","Server-a") strAdmGrpName = AG-NA ("Name Of the administrative group","Admin Group name","First Administrative Group") OrgName = CORP ("Enter the Organization Name","Organization","NorthWind Traders") LdapDc = DC=CORP ("Enter LDAP Domain Name","Dc=Domain,Dc=msft","DC=NorhWind,DC=Traders") ' Sub DismountMailboxStoreDB (strMDBName,strSGName,strComputerName ) Dim iMDB Dim iServer Dim strTemp Dim strMDBUrl Dim arrStGroup() set iServer = CreateObject ("CDOEXM.ExchangeServer") set iMDB = CreateObject ("CDOEXM.MailboxStoreDB") iServer.DataSource.Open strComputerName WScript.echo iServer.DirectoryServer ' Build the URL to the MailboxStoreDB strMDBUrl = "LDAP://"&iServer.DirectoryServer&"/"&"cn="&strMDBName&",cn="&strSGName&",cn=InformationStore,cn="&strComputerName&",CN=Servers,CN=" &strAdmGrpName&",CN=Administrative Groups,CN="&OrgName&",CN=Microsoft Exchange,CN=Services,CN=Configuration,"& LdapDc WScript.echo "the url is " & strMDBUrl 'e.g strMDBUrl = "ldap://CN=Mailbox Store (SERVER-A),CN=First Storage Group,CN=InformationStore,CN=SERVER-A,CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=NorthWind Traders,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=NorhWind,DC=Traders" 'Bind to the MailboxStoreDB iMDB.DataSource.Open strMDBUrl 'Dismount the MailboxStoreDB iMDB.Dismount(30) WScript.echo "The database "& strMDBName & " was seccessfuly dismounted" 'Cleanup Set iServer = Nothing Set iMDB = Nothing ' End Sub
ASKED: September 4, 2008  12:52 PM
UPDATED: September 4, 2008  12:59 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following