Using MFCMAPI To Delete Exchange Temp Table
Summary:
Duplicate messages are not only a nuisance but can be difficult to troubleshoot. Although there are several reasons why duplicate messages can occur, one known issue is caused by messages that are stuck within the temp table within the Exchange store. Temp tables are temporarily holding places within the Exchange store where messages are constructed. This can be caused by several reasons such as your AV application. This article will discuss how to delete the temp table so that duplicate messages are not re-generated. The process below will delete the temp table and create a new one.
Evan Dodds (Exchange MVP) does a great job explaining in depth about the temp table.
http://blogs.technet.com/evand/archive/2004/12/27/332752.aspx
You can also find additional info from MS Technet. http://www.microsoft.com/technet/prodtechnol/exchange/2003
/insider/Special_Mailboxes.mspx
When troubleshooting duplicate messages, note the message ID. This is critical in determining whether the original message is duplicating itself or if a client is possibly re-sending messages possibly due to a virus infection. Therefore, examine the headers at least two duplicate messages to examine the message ID. This article is assuming the message ID is the same and is stuck within the Exchange temp table. Note that deleting the temp table will delete any messages yet to be processed or queued. Therefore, perform this during non production hours.
Resolution:
1. Download MFCMAPI, also known as MAPI Editor. http://www.microsoft.com/downloads/details.aspx?
FamilyID=55FDFFD7-1878-4637-9808-1E21ABB3AE37&displaylang=en
2. Launch MFCMAPI application. Click OK at the Microsoft Exchange Server MAPI Editor window. Click Session, and select Logon and Display Store Table.
3. You will now be prompted to create a profile. Note, you must be logged in with an account that has full rights to your Exchange server, otherwise you will receive the following error message below when we open the temp table.
Error:
Code: MAPI_E_FAILONEPROVIDER === 0x8004011D
Function
File f:\df7830\extest\src\mfmapi\mapistorefunctions.cpp
4. Once logged in, click MDB, and select Get Mailbox Table. A new window display opens "Server Mailbox Table" From here, you can select the server name you wish to work with. Select default settings and click OK.
5. You will now see all mailboxes enumerated. You will need to locate the SMTP(Servername --GUID) mailbox. Note there can be more than one depending on how many stores you have. Therefore you will need to perform step 6 on the remainding SMTP (Servernam --GUID) mailboxes.
6. Once you have double clicked the mailbox, expand Root Container. You will see TempTable#. Highlight this, go to Actions menu and select delete folder. In the Deleted Selected Folder Window, check "Hard Deletion" and click OK. Right click your Root Container and select Refresh View. Your TempTable# should not appear. Repeat this step for all SMTP (Servername --Guid) mailboxes you have. Once complete, restart your IIS server. This will re-create your TempTable#.
James Chong (MVP)
MCITP | EMA; MCSE | M+, S+
Security+, Project+, ITIL
msexchangetips.blogspot.com
How useful was this article? Want to see a tip not listed? Please leave a comment.
Duplicate messages are not only a nuisance but can be difficult to troubleshoot. Although there are several reasons why duplicate messages can occur, one known issue is caused by messages that are stuck within the temp table within the Exchange store. Temp tables are temporarily holding places within the Exchange store where messages are constructed. This can be caused by several reasons such as your AV application. This article will discuss how to delete the temp table so that duplicate messages are not re-generated. The process below will delete the temp table and create a new one.
Evan Dodds (Exchange MVP) does a great job explaining in depth about the temp table.
http://blogs.technet.com/evand/archive/2004/12/27/332752.aspx
You can also find additional info from MS Technet. http://www.microsoft.com/technet/prodtechnol/exchange/2003
/insider/Special_Mailboxes.mspx
When troubleshooting duplicate messages, note the message ID. This is critical in determining whether the original message is duplicating itself or if a client is possibly re-sending messages possibly due to a virus infection. Therefore, examine the headers at least two duplicate messages to examine the message ID. This article is assuming the message ID is the same and is stuck within the Exchange temp table. Note that deleting the temp table will delete any messages yet to be processed or queued. Therefore, perform this during non production hours.
Resolution:
1. Download MFCMAPI, also known as MAPI Editor. http://www.microsoft.com/downloads/details.aspx?
FamilyID=55FDFFD7-1878-4637-9808-1E21ABB3AE37&displaylang=en
2. Launch MFCMAPI application. Click OK at the Microsoft Exchange Server MAPI Editor window. Click Session, and select Logon and Display Store Table.
3. You will now be prompted to create a profile. Note, you must be logged in with an account that has full rights to your Exchange server, otherwise you will receive the following error message below when we open the temp table.
Error:
Code: MAPI_E_FAILONEPROVIDER === 0x8004011D
Function
File f:\df7830\extest\src\mfmapi\mapistorefunctions.cpp
4. Once logged in, click MDB, and select Get Mailbox Table. A new window display opens "Server Mailbox Table" From here, you can select the server name you wish to work with. Select default settings and click OK.
5. You will now see all mailboxes enumerated. You will need to locate the SMTP(Servername --GUID) mailbox. Note there can be more than one depending on how many stores you have. Therefore you will need to perform step 6 on the remainding SMTP (Servernam --GUID) mailboxes.
6. Once you have double clicked the mailbox, expand Root Container. You will see TempTable#. Highlight this, go to Actions menu and select delete folder. In the Deleted Selected Folder Window, check "Hard Deletion" and click OK. Right click your Root Container and select Refresh View. Your TempTable# should not appear. Repeat this step for all SMTP (Servername --Guid) mailboxes you have. Once complete, restart your IIS server. This will re-create your TempTable#.
James Chong (MVP)
MCITP | EMA; MCSE | M+, S+
Security+, Project+, ITIL
msexchangetips.blogspot.com
How useful was this article? Want to see a tip not listed? Please leave a comment.


6 Comments:
what happens if everytime I double click on one of my SMTP mailboxes (we have several stores), it just closes MFCMAPI? the size of the mailbox displayed is 0. Does this mean the temp tables are emtpy?
Hmmm, I notice sometime it hangs or closes when performing tasks. It should'nt be shutting down like that. Try this, if you have another Exchange server, run MFCMAPI from there, and when you get to the point of opening the table, point the servername to the original Exchange server. Also make sure you don't have more than one MFCMAPI session open or it will cause it to hang. So make sure you don't have another account that's currently RDP'd into the server and has the session open.
Hi James,
Thanks for providing these tips for us to use. i am having trouble getting this to work, i have a very strange issue and a post was placed in a thread i started at http://forums.msexchange.org/m_1800415530/mpage_1/key_/tm.htm#1800415582
which reccomended the MFCMAPI tool and your blog, so here i am, but i am getting these errors Error:
Code: MAPI_E_FAILONEPROVIDER == 0x8004011D
Function
File f:\df7830\extest\src\mfcmapi\mapistorefunctions.cpp
Line 58
Error:
Code: MAPI_E_FAILONEPROVIDER == 0x8004011D
Function CallOpenMsgStore( lpMAPISession, NULL, &pRow->aRow[ulRowNum].lpProps[EID].Value.bin, MDB_WRITE, lppMDB)
File f:\df7830\extest\src\mfcmapi\mapistorefunctions.cpp
Line 777
Error:
Code: MAPI_E_NOT_FOUND == 0x8004010F
Function OpenMessageStoreGUID(lpMAPISession,pbExchangeProviderPrimaryUserGuid,&lpPrivateMDB)
File f:\df7830\extest\src\mfcmapi\mfcutilityfunctions.cpp
Line 567
you seem to be an expert to say the least on these exchange related diffculties. if you could offer any advice i would be most appreciative.
you listed that you the account logged in under had to have full permissions to teh exchange computer and i was logged in as admin but still got the error. i also made sure i was logged onto the console and that no other users were logged on at the time as mentioned in the other comment.
Thanks for any help you can offer.
PS. sorry for the long ugly links
Hi James i just cleaned the errors and the link up:)
Click here for my original thread
Error:
Code: MAPI_E_FAILONEPROVIDER == 0x8004011D
Function
File f:\df7830\extest\src\mfcmapi\ mapistorefunctions.cpp
Line 58
Error:
Code: MAPI_E_FAILONEPROVIDER == 0x8004011D
Function CallOpenMsgStore( lpMAPISession, NULL, &pRow->aRow[ulRowNum].lpProps [EID].Value.bin, MDB_WRITE, lppMDB)
File f:\df7830\extest\src\mfcmapi\ mapistorefunctions.cpp
Line 777
Error:
Code: MAPI_E_NOT_FOUND == 0x8004010F
Function OpenMessageStoreGUID (lpMAPISession, pbExchangeProviderPrimaryUserGuid, &lpPrivateMDB)
File f:\df7830\extest\src\mfcmapi\ mfcutilityfunctions.cpp
Line 567
Hello Ryan,
Yes these appear to be permissions related. I see this stuff often when I don't have full rights somewhere. Ensure that the account that you log into the Exchange server with is admin and has full rights to the Exchange org including send as receive as to be safe. Aslo when you run MFCMAPI and are prompted to create a profile, use a MB that also has this same right if using a MB other than the account you are logged on with. If you have any questions, you can email me as well at jchong1@cox.net. Hope this helps.
James Chong
Rather than deleting the temp tables, or deleting items within them, is there a way of flushing them, so that messages in the temp tables are sent?
Post a Comment
<< Home