Logshipping status report Throgh Mail

  • Also, if you had it error out, you will need to run the d-r-o-p table #logshipping_status_manual statement to remove the reference to the temp table

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • Hi MyDoggieJessie,

    Thank you for your reply.

    I'm not too sure which error are you referring to?

    Issue from your script or Satnam's one?

    Please clarify.

    - Peter

  • Can you please post the O/P which you get after executing the stored procedure?

    With Thanks,

    Satnam

  • I am sorry, I am in India therefore you might expect some delay due to difference in Time Zone.

    With Thanks,

    Satnam

  • I was referring to your error after running the Satnam's script

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • Hi MyDoggieJessie,

    Thank you for your reply.

    As I've posted earlier, there are no errors from Satnam's script, email is sent out but the email content is empty. That's the current status.

    Appreciate for your help.

    - Peter

  • Hi Satnam,

    Thanks for your reply.

    As I've posted earlier, there are no errors from your script, email is sent out but the email content is empty. That's the current status.

    Appreciate for your help.

    - Peter

  • If the email is empty, check the variables used in the email portion of the script - chances are of of the variables used in the @body is NULL, causing the entire email body to be blank

    Check these variables:

    @database_name

    @server

    @SubjectHTML

    @tablecopyHTML

    @tablerestoreHTML

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • Hi MyDoggieJessie,

    Thank you for your reply and help.

    I'm still learning SQL queries.

    Could rovide the required SQL query to check for these variables?

    @database_name

    @server

    @SubjectHTML

    @tablecopyHTML

    @tablerestoreHTML

    And where should it be inserted?

    - Peter

  • Right before you send the email, add:

    SELECT

    @database_name, @server, @SubjectHTML, @tablecopyHTML, @tablerestoreHTML

    EXEC msdb.dbo.sp_send_dbmail...

    Etc.

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • Hi MyDoggieJessie,

    Thank you for your reply and help.

    I've inserted the SELECT command, but nothing come out. No errors. No result displayed. No email received.

    All I can see is this message:

    Command(s) completed successfully.

    Please advice.

    - Peter

  • Hi All,

    Think we're really stuck here as I don't see anymore replies.

    Hope somebody else can help out?

    Thanks.

    - Peter

  • You need to do something debugging. Is there any one else at your shop that can assist you with this?

    The fact that all those variables are blank is strange, but explains why your email is blank. Try:SELECT

    ISNULL(@database_name, 'database_name'), ISNULL(@server, 'server'), ISNULL(@SubjectHTML, 'SubjectHTML'), ISNULL(@SubjectHTML, 'SubjectHTML'), ISNULL(@tablecopyHTML, 'tablecopyHTML'), ISNULL(@tablerestoreHTML, 'tablerestoreHTML')

    What is the output of this?

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • Have you created a Proper Database Mail Profile?

    Have you checked, the email address that you have specified in the code is an appropriate one?

    With Thanks.

  • Hi MyDoggieJessie,

    Thanks for your reply.

    Which section in the script shoud I insert that SELECT query?

    - Peter

Viewing 15 posts - 61 through 75 (of 84 total)

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