15 pts.
 How do I dismount an exchange 2003 DB, run eseutil /d and then mount using a VB script?
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

Software/Hardware used:
ASKED: September 4, 2008  12:52 PM
UPDATED: September 4, 2008  12:59 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _