Showing posts with label NearPoint. Show all posts
Showing posts with label NearPoint. Show all posts

Monday, June 27, 2011

MessageQueryPrep status in NearPoint 3.1.x and higher builds

Run the following query to check the status of the messages waiting to be indexed:

select status, count(*) from MimosaExchangeItem_1..MessageQueryPrep (NOLOCK)
group by status

The status column values and their meaning are listed below:

-- 0 Message item not processed
    > DL expansion will work on these items and update STATUS = 11

-- 11 DL expansion completed, waiting to be indexed
    > Indexer will process and update STATUS = 1

-- 1 Message item already indexed
    > Query Prep task will insert record into MessageQuery / MessageQueryDetails tables

-- 2 Message item delete
    > Record deleted from MessageQuery / MessageQueryDetails tables

-- 3 Message item reset for reindexing
    > Indexer will process and update STATUS = 1

-- 4 Message item updated/read/modified
    > MessageQuery / MessageQueryDetails tables directly updated with new value.

-- 5 Message item error while indexed
    > Message item will be re-indexed


See the following Mimosa knowledgebase articles for more details.  (Requires access to Mimosa Systems customer support portal.)

MessageQueryPrep status in NearPoint 3.1.x and higher builds
http://mimosasystems.custhelp.com/app/answers/detail/a_id/364/kw/index%20queue/related/1

NearPoint Archive is out of date (Browse -- Current as of:)
http://mimosasystems.custhelp.com/app/answers/detail/a_id/615

Friday, June 24, 2011

Duplicate Folders in Mimosa Archive

I recently ran across an unusual problem in which duplicate folders were appearing in a given user's Mimosa Archive as shown below.  






Note that the "Inbox" folder appears multiple times but the message "No records found" appears when attempting to view the contents of the duplicates.


This issue was most likely due to archiving a mailbox which has some degree of corruption. In this case, the folders were archived multiple times but the contents were not.  Fortunately, Mimosa Systems has provided the msisp_DeleteEmptyFolders stored procedure to remove the duplicate folders.  Here's how to use it:

  1. Run the following SQL query to determine the MailboxID of the affected user:

Select * from MimosaContext..Mailbox (nolock) Where MailboxName like '%LastName%'
  1. Change to the MimosaExchangeItem_1 database then run the following stored procedure, replacing MailboxID with the mailbox ID number determined by the previous query:
exec MimosaExchangeItem_1.dbo.msisp_DeleteEmptyFolders MailboxID, 1

e.g.,

exec MimosaExchangeItem_1.dbo.msisp_DeleteEmptyFolders 802, 1



The duplicate folders should be immediately removed.

Wednesday, June 15, 2011

NearPoint Email Restores Failing

If users report that they are unable to restore messages from the NearPoint (Mimosa) archive, try restarting the following two services:
  • Mimosa Restore Service
  • Mimosa Email Restore Service

If that doesn't resolve the issue, review the EMailRestoreHandler logs in the NearPoint log directory for the current day, usually under "C:\Program Files (x86)\Mimosa\Common\Log" folder.

In the particular scenario leading up to this issue, users were able to select and submit items to be restored but no corresponding jobs were appearing under Options --> View Task History.

Tuesday, May 24, 2011

Useful NearPoint SQL Queries

General Mailbox Information

To determine the number of folders in a user’s mailbox archive:

select * from MessageFolder (nolock)
where MailboxID = 16

or if you just want the count

select COUNT(*) from MessageFolder (nolock)
where MailboxID = 16

To find information on a given mailbox by name:

select * from MimosaContext..Mailbox (nolock) where MailboxName like '%clare%'

To show the number items awaiting processing, use the following query (Note that I’m not really sure about this.)

select mailboxid, COUNT(*)  from mimosaexchangeitem_1..messagequeryprep (nolock)
group by mailboxid

Mailbox Indices

Number of folders in a user’s mailbox:

use MimosaExchangeItem_1
go;
select * from MessageFolder (nolock)
where MailboxID = 16

Location of the Index chunk(s) for a given mailbox, e.g., MailboxId = ‘34’


use MimosaContext
go

select MB.MailboxID, SG.StorageGroupName, SG.MailboxStoreName, MB.MailboxName, LV.SharePath+IL.IndexRelativePath as Location, IL.IndexPath 
from storageGroup SG (NOLOCK), Mailbox MB (NOLOCK), IndexLocation IL (NOLOCK), NPStorageLogicalVolume LV (NOLOCK)
where MB.StorageGroupID = SG.StorageGroupID AND MB.MailboxID = IL.MailboxID
      AND LV.LogicalVolumeID=IL.LogicalVolumeID
      AND MB.MailboxId = '34'

Mailboxes queued for re-indexing:

use MimosaContext
go;
Select * from IndexTaskQueue
/* TaskType=23:  Queue for re-index; this task removes the indices from the original location */
/* TaskType=25:  Rebuilds index in new location */
Where TaskType = '23' 

Mailboxes being re-indexed:

use MimosaContext
go;
Select * from IndexTaskQueue
/* TaskType=23:  Queue for re-index; this task removes the indices from the original location */
/* TaskType=25:  Rebuilds index in new location */
Where TaskType = '25' 

Mailbox indices by location, mailbox id, store, etc.

use MimosaContext
go;
select MB.MailboxID, SG.StorageGroupName, SG.MailboxStoreName, MB.MailboxName, LV.SharePath+IL.IndexRelativePath as Location, IL.IndexPath  from storageGroup SG (NOLOCK), Mailbox MB (NOLOCK), IndexLocation IL (NOLOCK), NPStorageLogicalVolume LV (NOLOCK)  where MB.StorageGroupID = SG.StorageGroupID AND MB.MailboxID = IL.MailboxID
      AND LV.LogicalVolumeID=IL.LogicalVolumeID
      /*AND MailboxStoreName LIKE '%MAILNO04%'*/
      /*AND MailboxName like 'HR%'*/
      /*AND MB.MailboxId = '1122'*/
      /*AND IL.IndexRelativePath LIKE '%INDEX2%'*/
      /*AND LV.SharePath LIKE '\\MIMNVT02\IORINDEX-02%'*/
        AND LV.SharePath LIKE '\\MIMNVT02\INDEX%'

Queue mailboxes for re-indexing based on location, mailbox id, etc.

use MimosaContext
go

-- Declare variables
DECLARE @MailboxID VARCHAR(150)
DECLARE @MailboxDB TABLE(MailboxID NVARCHAR(150), StorageGroupName NVARCHAR(100), MailboxStoreName NVARCHAR(100), MailboxName NVARCHAR(100), Location NVARCHAR(100))

INSERT INTO @MailboxDB (MailboxID, StorageGroupName, MailboxStoreName, MailboxName, Location)
SELECT TOP 38 MB.MailboxID, SG.StorageGroupName, SG.MailboxStoreName, MB.MailboxName, LV.SharePath+IL.IndexRelativePath as Location 
from storageGroup SG (NOLOCK), Mailbox MB (NOLOCK), IndexLocation IL (NOLOCK), NPStorageLogicalVolume LV (NOLOCK)
where MB.StorageGroupID = SG.StorageGroupID AND MB.MailboxID = IL.MailboxID
      AND LV.LogicalVolumeID=IL.LogicalVolumeID
      /*AND MailboxStoreName LIKE '%MAILNO04%'*/
      /*AND MailboxName like 'HR%'*/
      /*AND IL.IndexRelativePath LIKE '%INDEX2%'*/
      /*AND LV.SharePath LIKE '\\MIMNVT02\IORINDEX-02%'*/
      AND LV.SharePath LIKE '\\MIMNVT02\INDEX%'

-- Create a cursor for the databases on each Server\Instance (Inner Loop)
DECLARE dbCursor CURSOR FOR
SELECT MailboxID FROM @MailboxDB
OPEN dbCursor

FETCH NEXT FROM dbCursor
INTO @MailboxID

WHILE (@@FETCH_STATUS=0)
BEGIN
      SELECT @MailboxID
     
      exec msisp_AddIndexingtask @MailboxID,0,'','','CONSOLE',0,0,DEFAULT,DEFAULT,23,0

      -- Fetch Next Record
      FETCH NEXT FROM dbCursor
      INTO @MailboxID
END

To determine the index locations for a given mailbox (e.g., ‘AssetID=16’) use the following queries:

select * from MimosaContext..AssetIndexMap (nolock)
where AssetId = 16

select * from MimosaContext..Indexlocation (nolock)
where MailboxId = 16

To identify mailbox indices which have been split into multiple chunks:


use MimosaContext
go

select MB.MailboxID, SG.StorageGroupName, SG.MailboxStoreName, MB.MailboxName, LV.SharePath+IL.IndexRelativePath as Location, IL.IndexPath  from storageGroup SG (NOLOCK), Mailbox MB (NOLOCK), IndexLocation IL (NOLOCK), NPStorageLogicalVolume LV (NOLOCK)
where MB.StorageGroupID = SG.StorageGroupID AND MB.MailboxID = IL.MailboxID
      AND LV.LogicalVolumeID=IL.LogicalVolumeID
      AND IL.IndexRelativePath LIKE '%INDEX2%'

Re-index mailboxes consisting of more than one index chunk using the following script:

use MimosaContext
go

-- Declare variables
DECLARE @MailboxID VARCHAR(150)
DECLARE @MailboxDB TABLE(MailboxID NVARCHAR(150), StorageGroupName NVARCHAR(100), MailboxStoreName NVARCHAR(100), MailboxName NVARCHAR(100), Location NVARCHAR(100))

INSERT INTO @MailboxDB (MailboxID, StorageGroupName, MailboxStoreName, MailboxName, Location)
SELECT TOP 100 MB.MailboxID, SG.StorageGroupName, SG.MailboxStoreName, MB.MailboxName, LV.SharePath+IL.IndexRelativePath as Location 
from storageGroup SG (NOLOCK), Mailbox MB (NOLOCK), IndexLocation IL (NOLOCK), NPStorageLogicalVolume LV (NOLOCK)
where MB.StorageGroupID = SG.StorageGroupID AND MB.MailboxID = IL.MailboxID
      AND LV.LogicalVolumeID=IL.LogicalVolumeID
      AND IL.IndexRelativePath LIKE '%INDEX2%'

-- Create a cursor for the databases on each Server\Instance (Inner Loop)
DECLARE dbCursor CURSOR FOR
SELECT MailboxID FROM @MailboxDB
OPEN dbCursor

FETCH NEXT FROM dbCursor
INTO @MailboxID

WHILE (@@FETCH_STATUS=0)
BEGIN
      SELECT @MailboxID
     
      exec msisp_AddIndexingtask @MailboxID,0,'','','CONSOLE',0,0,DEFAULT,DEFAULT,23,0

      -- Fetch Next Record
      FETCH NEXT FROM dbCursor
      INTO @MailboxID
END


General

To extract XML code from a database field:

select cast(NPConfigDetails as XML) from MimosaContext..npconfiguration (nolock)