在 SQL 中存储 Exchange 2010 电子邮件
我有一个应用程序,它将在收到电子邮件时启动程序流程。我需要将电子邮件链接到我的应用程序,我将通过消息上的自定义属性来完成此操作。
然后我需要永久存储该电子邮件以供参考。由于 Exchange 2010 仅支持邮箱中的 10Gb 和 100,000 个项目(不使用 PST 文件),因此我需要将邮件放入更永久的存储 SQL 中。
我正在运行 SQL 2005,我想将电子邮件存储在那里,但不是作为图像,这样我就可以在需要时搜索它。当我使用 Exchange Web 服务获取电子邮件时,我已经拥有该消息的完整 XML。我认为将其存储在一个 XML 字段中,该字段具有与其关联的消息 XML 模式(以帮助提高性能)应该为我提供最佳解决方案。
我的问题是获取消息的 XML 模式。我似乎在任何地方都找不到它,而且似乎没有太多关于将消息放入 SQL 的在线内容。
我的做法是错误的还是有更好的解决方案?该邮箱预计每年会收到超过 60 万封电子邮件。
任何帮助或帮助都会很高兴得到。
谢谢, 麦克风
I have an application which will start a program flow with the arrival of an email. I will need to link the email to my application, which I'm going to do via a custom property on the message.
I will then need to store the email for reference forever. As Exchange 2010 supports only 10Gb and 100,000 items in a mailbox (without using PST files), I need to get the message into a more permanent store, SQL.
I'm running SQL 2005 and I want to store the email in there but not as an image, so I can search it if I need to. As I am using Exchange Web Services to get the email I already have the full XML for the message. I figure storing it in a XML field which has the Message XML schema associated to it (to help with performance) should give me the best solution.
My issue is getting the XML schema for a Message. I can't seem to find it anywhere and there doesn't seem to be much online content for putting messages into SQL.
Am I going about this all wrong or is there a better solution for me? The mailbox is forecast to receive over 600k emails a year.
Any help or assistance will be happily received.
Thanks,
Mike
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我使用 XMLSpy 生成基于 XML 文件的架构。它不会是完美的,但它对我有用。
XMLSpy 生成的内容比下面的多,但它限制太多,而且 SQL 也没有验证它。所以我去掉了一些额外的东西并保持它的美观和简单。
这是它生成的 MessageType XML Schema;
I used XMLSpy to generate a schema based on the XML file. It won't be perfect but it works for me.
XMLSpy generated more than the below but it was too restrictive and also SQL didn't validate it. So I took out some of the extras and kept it nice and simple.
Here is the MessageType XML Schema it generated;
您可以将其存储在 XML 列中,对该列建立索引并进行搜索。
至于消息 xml 模式,可能有一个,但我找不到它。
you can store it in an XML column, index that column and search through it.
as for the message xml schema, there probably is one but i can't find it.