KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

Check mount status of exchange 2003 mailbox database
Goto page Previous  1, 2
 
Post new topic   Reply to topic    KS-Soft Forum Index -> Library
View previous topic :: View next topic  
Author Message
meppyman



Joined: 06 Sep 2009
Posts: 118
Location: Melbourne

PostPosted: Thu Jul 29, 2010 7:07 am    Post subject: Reply with quote

Yes a separate test, this time using Active RMA of a customers remote Exchange server. The agent is running using service account that is setup in the same way as the HM account on the HM server; administrator, delegated exchange administrator, run as a service and as a batch job, etc.
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 11048
Location: USA

PostPosted: Thu Jul 29, 2010 2:17 pm    Post subject: Reply with quote

We cannot reproduce the problem.
We will modify script for you so you will be able to use Shell Script test method and see error description in Reply field of the test

Regards
Alex
Back to top
View user's profile Send private message Send e-mail Visit poster's website
KS-Soft



Joined: 03 Apr 2002
Posts: 11048
Location: USA

PostPosted: Thu Jul 29, 2010 4:09 pm    Post subject: Reply with quote

There is sample script that you may use with Shell Script test method, so you should see error description (not just errorlevel code)
Required params: Servername StorageGroupName MDBName
Code:

Option Explicit

On Error Resume Next

const statusAlive       = "scriptRes:Host is alive:"
const statusDead        = "scriptRes:No answer:"
const statusUnknown     = "scriptRes:Unknown:"
const statusNotResolved = "scriptRes:Unknown host:"
const statusOk          = "scriptRes:Ok:"
const statusBad         = "scriptRes:Bad:"
const statusBadContents = "scriptRes:Bad contents:"

dim quot, iServer, iMDB, Args, CorrectSyntax, strMode, strComputerName, strSGName, strMDBName, strTemp, arrStGroup, strMDBUrl, i

quot = chr(34)

Set iServer = CreateObject ("CDOEXM.ExchangeServer")
Set iMDB = CreateObject ("CDOEXM.MailboxStoreDB")

Set Args = WScript.Arguments
If Args.count = 3 Then
CorrectSyntax = True
strComputerName = Args(0)
strSGName = Args(1)
strMDBName = Args(2)
Else
CorrectSyntax = False
End If


If CorrectSyntax Then

' Bind to the Exchange Server
iServer.DataSource.Open strComputerName

If Err <> 0 Then
WScript.StdOut.Write statusUnknown & Err.Description
' Cleanup
Set iServer = Nothing
Set iMDB = Nothing
WScript.Quit
End If


strTemp = "LDAP://" & iServer.DirectoryServer & "/" & "cn=" & strMDBName & ","

' Set variant array to the ExchangeServer.StorageGroups
arrStGroup = iServer.StorageGroups

' Look in the StorageGroups array if the StorageGroup with strSGName exists

If strSGName = "" Then

' Add last part to the URL to the MailboxStoreDB
strMDBUrl = strTemp & iServer.StorageGroups(0)
Else
For i = 0 To UBound(arrStGroup)

If InStr(1, UCase(arrStGroup(i)), UCase(strSGName)) <> 0 Then
strMDBUrl = arrStGroup(i)
End If
Next


If strMDBUrl <> "" Then
' Add last part to the URL to the MailboxStoreDB
strMDBUrl = strTemp & strMDBUrl
End If
End If
' Bind to the MailboxStoreDB
iMDB.DataSource.Open strMDBUrl ', , , adCreateOverwrite

If Err <> 0 Then
WScript.StdOut.Write statusUnknown & Err.Description
' Cleanup
Set iServer = Nothing
Set iMDB = Nothing
WScript.Quit
End If

dim sStoreStatus

If iMDB.Status = 0 Then
WScript.StdOut.Write statusOk & "Mounted" & " (" & strSGName & "/" & strMDBName & ")"
 ElseIf iMDB.Status = 1 Then
WScript.StdOut.Write statusBad & "Dismounted" & " (" & strSGName & "/" & strMDBName & ")"
 ElseIf iMDB.Status = 2 Then
WScript.StdOut.Write statusUnknown & "Store is mounting" & " (" & strSGName & "/" & strMDBName & ")"
 ElseIf iMDB.Status = 3 Then
WScript.StdOut.Write statusUnknown & "Store is dismounting" & " (" & strSGName & "/" & strMDBName & ")"
 Else
WScript.StdOut.Write statusUnknown & "Unknown Status" & " (" & strSGName & "/" & strMDBName & ")"
 End If


' Cleanup
Set iServer = Nothing
Set iMDB = Nothing
Else
WScript.StdOut.Write statusUnknown & "Incorrect syntax. Required params: Servername StorageGroupName MDBName"

End If


Regards
Alex
Back to top
View user's profile Send private message Send e-mail Visit poster's website
meppyman



Joined: 06 Sep 2009
Posts: 118
Location: Melbourne

PostPosted: Sat Jul 31, 2010 3:01 am    Post subject: Reply with quote

Thanks but getting a Syntax error, the paramaters I am passing are in this format:

SERVER "First Storage Group" "Mailbox Store (SERVER)"
Back to top
View user's profile Send private message
meppyman



Joined: 06 Sep 2009
Posts: 118
Location: Melbourne

PostPosted: Sun Aug 01, 2010 12:29 am    Post subject: Reply with quote

Strange... all of a sudden it is returning:

"An invalid ADSI pathname was passed" (Typing this reminded me that Copy Reply never works for me).

I tried a different server with the same results.

I also mail enabled the service account just in case and made it a Full Exchange Administrator. No difference to either test.
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 11048
Location: USA

PostPosted: Mon Aug 02, 2010 9:06 am    Post subject: Reply with quote

Microsoft says this error can occur when StorageGroupName is incorrect or when "account that you are using is not a part of the Exchange Domain Servers administrator global group"

Regards
Alex
Back to top
View user's profile Send private message Send e-mail Visit poster's website
meppyman



Joined: 06 Sep 2009
Posts: 118
Location: Melbourne

PostPosted: Mon Aug 02, 2010 3:32 pm    Post subject: Reply with quote

The parameters are used locally with no problems from the same account as the RMA service is running under. The server is of course a member of that group as it is an SBS server. Only computer accounts get added to that group not users, users are delegated admin rights through the exchange admin tool.
Back to top
View user's profile Send private message
meppyman



Joined: 06 Sep 2009
Posts: 118
Location: Melbourne

PostPosted: Mon Aug 02, 2010 5:18 pm    Post subject: Reply with quote

I just configured the script to run on my server (HM local not RMA) and it works perfectly, as does the other test I have running.

It's going to be something simple that's been overlooked but for now I am not seeing what the problem is.
Back to top
View user's profile Send private message
meppyman



Joined: 06 Sep 2009
Posts: 118
Location: Melbourne

PostPosted: Sun Sep 26, 2010 3:34 am    Post subject: Reply with quote

Any one got any more ideas with this one? I have a client that has their store go down frequently and it's embarrassing that they know before I do even when it happens after hours.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Library All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index