Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
LOOKUP_BI
Constraint Violating Yak Guru
295 Posts |
Posted - 2010-04-13 : 15:37:35
|
| I have the following code in place, I need to be able to capture specific application error for each of the Servers that we have.@srv1 variable basically has the value of the number of rows with errors for Server1DECLARE @tableHTML NVARCHAR(MAX) ;SET @tableHTML =N'<H3>Daily App Error</H3>' +N'<table border="1"></th>' + N'<TR bgcolor="#A9F5F2"><TH>Server<TH><TH>L_Error<TH>TH>History<TH></TR>'+N'<TR bgcolor="#A9F5F2"><TD>Server1</TD>'+CAST((SELECT td = @srv1, ''FOR XML PATH('td'), TYPE) AS NVARCHAR(MAX)) + <a href="#">CAST((SELECT td = Error_Description, '' from dbo.DailyErrorLog_Server1FOR XML PATH('td'), TYPE) AS NVARCHAR(MAX))</a> + N'</TR></table>'I need the end results to be as suchServer L_Error HistoryServer1 5 <Click here for complete list of errors>Once user clicks on the History Column data, another window should open with all the errors for Server1How do I implement this in the above body which belongs to my sp_send_dbmail. |
|
|
LOOKUP_BI
Constraint Violating Yak Guru
295 Posts |
Posted - 2010-04-14 : 09:38:50
|
| All,Appreciate any suggestions, anybody has done this beforeImagine I have 10 servers to report aboutI am aware that creating a hyperlink means, creating a file to be linked to the hyperlink.If im not mistaken I would need 10 separate files to be tied to the 10 links in the email. I can create these files but how would I do the following:1) Update 10 html files with everydays error log. This would generally need to be done everyday prior to send mail task.What kind of process would take care of this ?2) When I send the email out with the links and if a user clicks on the link for error. Does he need access to the dir where the link files would be stored ? |
 |
|
|
|
|
|