Showing posts with label status. Show all posts
Showing posts with label status. Show all posts

Thursday, March 22, 2012

Email subscription Reported as Successful but not arriving in recipients inbox.

I have a report that is sent via email to a list of recipients. When I look at the subscription in 'My Subscriptions' the value in the Status column states that the message was 'sent successfully', however the email does not appear in the inboxes of any of the intended recipents. The report renders OK via the browser and only takes a few seconds to process. The subscription exports the report as an Excel file. The excel file is approx 8MB in size but this is still below the attachment size limit for internal emails within my organisation. The subscription is tied to a shared schedule. Other reports that are tied to the shared schedule are shown as successful in 'My Subscriptions' and also appear in the inboxes of recipients. All email address are correct.

I forgot to mention, the report was successfully received by all recipients until very recently and the report has not been modified since this time.

Has anyone come across this problem before.

Thanks

Mike

The Reporting Services e-mail delivery extension considers "sent successfully" to be "I handed it off to some SMTP forwarder". What happens to the e-mail after that is outside the scope of RS. You need to investigate within the e-mail system.

As a diagnostic, you might try delivering to an SMTP pickup folder temporarily to convince yourself that the Report Server is generating the e-mails. Find the rsReportServer.config file, change the "SendUsing" element to 1, specify some SMTPServerPickupDirectory, and try the delivery. If you get .EML files created in the specified folder, RS has done it's part of the delivery. Make sure you set SendUsing back to 2 or <blank> after you've done your test.

Here's a sample of the config file section you need to modify:

<RSEmailDPConfiguration>
<SMTPServer></SMTPServer>
<SMTPServerPort></SMTPServerPort>
<SMTPAccountName></SMTPAccountName>
<SMTPConnectionTimeout></SMTPConnectionTimeout>
<SMTPServerPickupDirectory>D:\Email</SMTPServerPickupDirectory>
<SMTPUseSSL></SMTPUseSSL>
<SendUsing>1</SendUsing>
<SMTPAuthenticate></SMTPAuthenticate>
<From>_awtest@.Microsoft.Com</From>
<EmbeddedRenderFormats>
<RenderingExtension>MHTML</RenderingExtension>
</EmbeddedRenderFormats>
<PrivilegedUserRenderFormats></PrivilegedUserRenderFormats>
<ExcludedRenderFormats>
<RenderingExtension>HTMLOWC</RenderingExtension>
<RenderingExtension>NULL</RenderingExtension>
<RenderingExtension>RGDI</RenderingExtension>
</ExcludedRenderFormats>
<SendEmailToUserAlias>True</SendEmailToUserAlias>
<DefaultHostName></DefaultHostName>
<PermittedHosts></PermittedHosts>
</RSEmailDPConfiguration>

Wednesday, March 21, 2012

Email Subscription

Hi,

Please help, I am trying to setup email subscriptions using reporting services. When the subscription runs i get a status of Logon Failed.

What does this error mean?

Problem with the SMTP settings?
Problem with some background user settings?

Any info in the right direction welcome.

Si

Hi

What is the exact error message you received under the status column.

You can also look in the log file, it will be called ReportServer_(date).log under your server installation directory \logfiles.

Did you enter the right smtp address in rsReportServer.config (will be entered with installation but can be modified afterwards.)

StarBuck

Monday, March 19, 2012

email notification on job status

In MSDE, since there is no sql mail, I am thinking of doing the following:
1. write a shell script which will query the sysjobhistory table to
determine if any job failed. If so, then an email about the failure is sent
out.
Question: What should my sql command and my mail command look like. I dont
have much experience in shell scripting or am not very familiar with MSDB
database either.
hi,
inquisite wrote:
> In MSDE, since there is no sql mail, I am thinking of doing the
> following:
> 1. write a shell script which will query the sysjobhistory table to
> determine if any job failed. If so, then an email about the failure
> is sent out.
> Question: What should my sql command and my mail command look like. I
> dont have much experience in shell scripting or am not very familiar
> with MSDB database either.
if an SMPT solution is viable, I'd resort on xp_smpt extended stored
procedure provided at http://sqldev.net/xp/xpsmtp.htm
you can then code your task's step to send a mail on success or failure..
SQL Server MVP Tibor Karaszi presents and describes such a feature at
http://www.karaszi.com/sqlserver/info_no_mapi.asp
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.10.0 - DbaMgr ver 0.56.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||SMTP solution is not available. That is why I wanted to send an email through
some script running on the server.
"Andrea Montanari" wrote:

> hi,
> inquisite wrote:
> if an SMPT solution is viable, I'd resort on xp_smpt extended stored
> procedure provided at http://sqldev.net/xp/xpsmtp.htm
> you can then code your task's step to send a mail on success or failure..
> SQL Server MVP Tibor Karaszi presents and describes such a feature at
> http://www.karaszi.com/sqlserver/info_no_mapi.asp
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.10.0 - DbaMgr ver 0.56.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>
>
|||If an SMTP server is not available then how were you planing to send email?
Jim
"inquisite" <inquisite@.discussions.microsoft.com> wrote in message
news:D7FE12AC-C359-4B74-A8C6-E497686705CB@.microsoft.com...[vbcol=seagreen]
> SMTP solution is not available. That is why I wanted to send an email
> through
> some script running on the server.
> "Andrea Montanari" wrote:

Friday, February 24, 2012

eliminate duplicate results

Hi,

Here is a brief description of a problem I'm currently experiencing:

We have a phone line that employees can call to report their status. There is no limit on how often they can call. Each time a call is completed a record is inserted into a table with the following info: the employees unique id, theire current status, and the location of an audio file should they have chosen to leave a message. When I query this table I'd like to only return the most recent call for each employee, disregarding all the rest.

So...

When I do a simple query like:

SELECT MAX(DISTINCT r.ircDateStamp),
r.entityId
FROM tblInboundRollCall r
WHERE (r.ircLineId = 13) AND (r.ircDateStamp BETWEEN startDate AND endDate)
GROUP BY r.entityId

I get only one record, the most recent one, for each employee who has called. However as soon as I try to get another field I get one record for each different value in that field.

a second query:

SELECT MAX(DISTINCT r.ircDateStamp),
r.entityId,
r.ircStatus
FROM tblInboundRollCall r
WHERE (r.ircLineId = 13) AND (r.ircDateStamp BETWEEN startDate AND endDate)
GROUP BY r.entityId, r.ircStatus

This returns one record for each status value that each employee has.

I guess my question is how do I retrieve all of the fields in a record with the most recent date for each unique employee.

Thanks for the help.Read this thread

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=31147

And change MIN to MAX|||Thanks for the quick reply.

Which post in that thread am I looking at?|||Just got it working. With a little tweaking of the second last post in the linked thread everything is perfect

Thanks Brett!

Sunday, February 19, 2012

Efficient way of purging old data?

I have a table with no primary key.

The are 6 columns. The first four columns represent one object. There is then a status and a datetime (Updated).

A new record is added into the table whenever a status changes (I need to keep the old status as well).

The problem I have is how to efficiently purge old data.

I need to keep all records with a datetime within the last week.

I also need to ensure that I at least one status is kept for each combination of the first four columns.

The table contains over 150,000 records. About 1,000 statuses change per day.

I want to purge the data once a week - delete about 7,000 records.

This is the query I wrote

delete from table1 where Updated <
(select max(Updated) from table1 t1 where table1.col1 = t1.col1 and table1.col2 = t1.col2
and table1.col3 = t1.col3 and table1.col4 = t1.col4 group by col1, col2, col3, col4)
and Updated < GetDate() - 7

This seems to be fairly fast - records only change a couple of times a week, so the subquery only returns 3 or 4 records. The subquery will be called on almost all the records in the table though.

Can anyone see a more efficient way of doing this?

Well, I'd use a dereived table myself:

delete from table1 t1
inner join
(select col1, col2, col3, col4, max(Updated) as MaxUpdated
from table1
group by col1, col2, col3, col4) t2 on t1.col1 = t2.col1 and t1.col2 = t2.col2 and t1.col3 = t2.col3 and t1.col4 = t2.col4 and t1.Updated = t2.MaxUpdated
where t1.Updated < GetDate() - 7

That usually seems to perform faster then a subquery, but you'd have to try it for yourself to know for sure.