Google
Search WWW Search msexchangetips.blogspot.com

Wednesday, August 09, 2006

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.

9 Comments:

Anonymous Anonymous said...

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?

9:04 AM  
Blogger jamestechman said...

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.

2:05 PM  
Anonymous Ryan said...

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

12:44 AM  
Anonymous Ryan said...

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

12:54 AM  
Blogger jamestechman said...

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

1:19 PM  
Anonymous John Blight said...

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?

4:20 AM  
Blogger longge said...

The Hogan scarpe
brand is distinctive for high quality. Hogan scarpe donna
are the highest expression of a new luxury lifestyle. hogan donna
is meant for someone who cherishes the type of luxury associated. Apparently Ben had extra spi
The Hogan scarpe
brand is distinctive for high quality. Hogan scarpe donna
are the highest expression of a new luxury lifestyle. hogan donna
is meant for someone who cherishes the type of luxury associated. Apparently Ben had extra spikes put in his Hogan scarpe uomo
for extra grip.
kes put in his Hogan scarpe uomo
for extra grip.

6:08 PM  
Blogger Young said...

These onitsuka tiger online shop are buy asics tigers online awesome, tiger asics shoes but huge! I cheap onitsuka tiger had to asics tiger australia return twice cheap onitsuka tiger shoes because they onitsuka tiger zodiac were so big asics tiger I normally onitsuka tiger australia wear a 7.5 but ended up fitting asics onitsuka tiger mexico nicely into a tiger mexico 66. Other than that, onitsuka tiger shoes australia they look spiffy, seem onitsuka tiger mexico 66 black well made tiger mini cooper only had asics onitsuka so far, and they tiger shoes australia are still holding buy onitsuka tiger shoes online together mexico 66 perfectly, onitsuka tiger yellow black as they should be), and onitsuka tiger tokyo they came onitsuka tiger ultimate 81 with two asics onitsuka tiger trainers colors of laces asics kinsei. I onitsuka tiger mexico 66 yellow black would certainly tiger shoes onitsuka buy other onitsuka tiger sale colors of discount asics running shoes that I know onitsuka tiger mexico 66 my correct onitsuka tiger black white this brand buy onitsuka tiger shoes is a good asics international shipping best online onitsuka tiger online store

2:46 AM  
Anonymous Computer said...

Wow! This can be one particular of the most beneficial blogs we have ever arrived across on this subject. Actually Magnificent. I am also a specialist in this topic so I can understand your hard work.

Computer Accessories | buy webcam

4:08 AM  

Post a Comment

<< Home

xml:lang="en" lang="en"> MS Exchange Tips: Using MFCMAPI To Delete Exchange Temp Table