• JayK (1/4/2011)


    Hi Craig - thanks for the reply....

    In youe extract is says : "When no profile_name is specified, sp_send_dbmail uses the default private profile for the current user."

    But in my script I am specifying an actual profile called 'default' which is set up on the server and is working OK to send out mails.....so going on that msdn extract this is the profile that should be used....or am I reading it wrong?

    No, I don't think so, but it's easy enough to test. Try setting up a job to send yourself an email with no query involved but the rest of the parameters the same. I may have jumped to a conclusion there, apologies. If you can nail down that it's the actual query, then you'll have to look at the sql agent's ability to access those tables directly.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA