January 22, 2015 at 5:30 am
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
January 22, 2015 at 6:15 am
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
January 22, 2015 at 6:38 am
Can you please post the O/P which you get after executing the stored procedure?
With Thanks,
Satnam
January 22, 2015 at 6:39 am
I am sorry, I am in India therefore you might expect some delay due to difference in Time Zone.
With Thanks,
Satnam
January 22, 2015 at 7:08 am
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
January 22, 2015 at 7:27 am
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
January 22, 2015 at 7:29 am
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
January 22, 2015 at 7:32 am
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
@SubjectHTML
@tablecopyHTML
@tablerestoreHTML
______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience
January 22, 2015 at 10:10 pm
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
January 22, 2015 at 10:36 pm
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
January 23, 2015 at 7:19 am
Hi All,
Think we're really stuck here as I don't see anymore replies.
Hope somebody else can help out?
Thanks.
- Peter
January 23, 2015 at 7:32 am
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
January 23, 2015 at 8:06 am
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.
January 23, 2015 at 10:55 pm
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