Send mail TO sql server and get result back...

  • Hi all, I have Database Mail up and running on a SQL 2008 server and everything works great. But what I want to set up is a way for people to send queries TO the server and get a result back. Is this possible that a SQL Server can receive email, run the query in the body, and send the result back?

    Thanks!

  • This was possible in SQL Server 2000 using SQLMail, but I have not found any way at this time to do so with DatabaseMail.

    I think it may have been considered a security hole as there was no real way to validate the code before it was executed which could leave a database vulnerable to SQL Injection type attacks.

  • Lynn's point on security is a good one; I would think it might be possible with CLR, but I'm not sure; there are a lot of objects that you cannot add to a SQL CLR project.

    maybe instead of email you might consider a web service or an EndPoint to return specific data?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Yeah, you're right about security. The reason I brought it up was that I vaguely remember doing something like this in SQL 2000, but I couldn't find it in 2008. That probably explains it. Thanks.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply