Send Email If Packages Executes For Longer Than A Secified Amount Of Time
Nov 15, 2007
Is there a way ( using an included SSIS task rather than coding a script task) to detect whether a package has run longer than a specified period of time?
So I can send an email to operators notifying them that a job is taking longer than usual.
Hi,I have stored procedure (MS SQL Server 2000) which operateson around 600 000 rows (SELECT, UPDATE, INSERT)and executes in 5 minutes,when I put it in SQL transaction it slows down to more than 5 hours (!!)I have to admit that it is not problem with data locks (beside thatprocedurenothing else is executed on db),It is not also problem with that exact procedure, other proceduresalso slow down heavily when wrapped by SQL transactionvery very seldom stored procedure within transaction executescomparably long that its copy without transactionI guess it could be MS SQL Server 2000 configuration/tuning problem.Any ideas ?Chris
I want to send a deployed report (report manager), through email, by calling reportingServices webservice. But the requirement is that, time is not fixed for sending this email, so I want to trigger the sending of report as a one time event, no subscription to a daily time...
I have a problem with a report set up to execute a snapshot and subscription on day 1 of each month. On July 1, it ran and was emailed to the user; on 8/1 it created the snapshot but did not send to the user because of a user error in the subscription, so it was sent manually. the parameters issues were corrected and on 9/1 the snapshot executed but the subscription did not send. In the subscription window, the last good email of a snapshot was sent 7/1. So again 9/1 was sent manually. After fixing the parameters shouldn't this have emailed the snapshot correctly on 9/1?
Do I need to delete this subscription and create a new one to get it to send on 10/1 now?
any suggestions?
the set up is now verified to be identical to other reports which created a snapshot and emailed successfully, the only difference is the original problem with only the 7/1 subscription the only one you see when you look at the "subscription tab" for this report in Reporting services:
Description:Send e-mail to name.one@plife.com, name.two@plife.com
Trigger:SnapshotUpdated
Lastrun: 7/1/2006 7:00 AM
Mail Sent to:Mail sent to name.one@plife.com, name.two@plife.com
Snapshots successful
5/1/2006 7:00:02 AM
6/1/2006 7:00:03 AM
6/1/2006 8:26:31 AM
7/1/2006 7:00:07 AM
8/1/2006 7:00:24 AM
9/1/2006 7:00:19 AM
Logfile for "Ops Specialists/1035 Exchange Issue - Details (200407-R01)" report Portion of log file: ReportingServicesService!dbpolling!f!9/1/2006-07:00:04:: EventPolling processing item e869f577-b189-4e6a-a9be-37b61d737340 ReportingServicesService!dbpolling!13!9/1/2006-07:00:04:: EventPolling processing item 2b275311-0ee4-4cef-972d-86de48f4f360 ReportingServicesService!dbpolling!c!9/1/2006-07:00:04:: EventPolling processing item 3df3960a-ee28-4d5e-a46e-326ab5a0060d ReportingServicesService!library!c!9/1/2006-07:00:04:: Schedule e11a00d3-56b6-46b3-b2d3-9e3156805be8 executed at 9/1/2006 7:00:04 AM. ReportingServicesService!library!13!9/1/2006-07:00:04:: Schedule 177e9473-2c81-4152-a89f-137d25a556e1 executed at 9/1/2006 7:00:04 AM. ReportingServicesService!library!4!9/1/2006-07:00:04:: Schedule 89071f26-435c-4cc7-bd9a-23907ef32b5c executed at 9/1/2006 7:00:04 AM. ReportingServicesService!library!f!9/1/2006-07:00:04:: Schedule 3720d20c-460e-4549-9b57-c3cc97919f5f executed at 9/1/2006 7:00:04 AM. ReportingServicesService!schedule!13!9/1/2006-07:00:04:: Updating report execution snapshot for report /Client Services/Ops Specialists/1035 Exchange Issue - Details (200407-R01) ReportingServicesService!schedule!c!9/1/2006-07:00:04:: Updating report execution snapshot for report /Client Services/Ops Specialists/1035 Exchange Bridged - Details (200407-R01) ReportingServicesService!schedule!f!9/1/2006-07:00:04:: Updating report execution snapshot for report /Client Services/Ops Specialists/Policy Counts (200401-R01) ReportingServicesService!schedule!4!9/1/2006-07:00:04:: Updating report execution snapshot for report /Client Services/Inforce Admin/CAAB226 (200501-R03) ReportingServicesService!dbpolling!d!9/1/2006-07:00:08:: EventPolling processing 4 more items. 8 Total items in internal queue.
I am in the process of migrating DTS 2000 packages via DTS Migration Wizard.
I ran all of the packages through the wizard. Then, I successfully completed changing the remaining issues in two of my packages to SSIS. Everything was fine. The second package I completed is called from a SQL Agent Job. I managed to get the job step converted to use SSIS package. It ran successfully.
Now, I am trying to open other packages to work on them and I get "Microsoft Visual Studio is unable to load this document: Value does not fall within the expected range." and a message window that says "Object reference not set to an instance of an object." This actually happens with the two that I migrated, also. I can no longer access them.
What happened?!?!?!? Does anyone have any experience with this?
We moved a 2000 database to another platform by restoring the database. It took a lot longer than I expected. Would it take less time to restore it a second time to the same target database since the allocations are already there?
I have SQL Server 2005 installed on my machine and I am firing following query to insert 1500 records into a simple table having just on column.
Declare @i int Set @i=0 While (@i<1500) Begin Insert into test2 values (@i) Set @i=@i+1 End
Here goes the table definition,
CREATE TABLE [dbo].[test2]( [int] NULL ) ON [PRIMARY]
Now the problem with this is that on one of my server this query is taking just 500ms to run while on my production and other test server this query is taking more than 25 seconds. Same is the problem with updates. I have checked the configurations of both the servers and found them to be the same. Also there are no indexes defined on either of the tables. I was wondering what can be the possible reason for this to happen. If any of u people has any pointers regarding this, will be really useful
Hi all, can i send an email through SQL? i don't want to use third party software. Also, i can't configure the customer's db server. It is possible to send an email without much configuration. If configuration needed, is it possible to configure through SQL script? thx
Hi, I need to select a table from my database and send the table as an email message to a person every 10am because the table changes every day. How to it?
actually i m working on a store procedure in which end of the procedure when task complete it's send email to specific person, but i m having a problem using this function.
it's work fine when the outlook is configure on the server, but is there any way to send email rather then configure outlook on the server just chk internet is working send email on behalf of server, i have more then 2 servers and outlook is configure only one server and i don't want to configure outlook on other server due to work load on server.
This was a P A I N to get working. Maybe someone else here is sending email and could use it.
A UNICODE Send Mail using CDOSYS with ReadReceipt and Importance...
Sub SendMail (sFromAddress, sToAddress, sCcAddress, sBccAddress, sSubject, sBody, boolReadReceipt, intImportance ) 'on error resume next Const cdoDispositionNotificationTo = "urn:schemas:mailheader:disposition-notification-to" Const cdoReturnReceiptTo = "urn:schemas:mailheader:return-receipt-to" dim cdoMessage, cdoConfiguration
Set cdoConfiguration = Server.CreateObject ("CDO.Configuration") ' Outgoing SMTP server With cdoConfiguration .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost" .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 .Fields.Update End With
Set cdoMessage = CreateObject("CDO.Message") With cdoMessage ' Update the CDOSYS Configuration SET .Configuration = cdoConfiguration .BodyPart.charset = "unicode-1-1-utf-8"
IF boolReadReceipt Then .Fields(cdoDispositionNotificationTo)= sFromAddress .Fields(cdoReturnReceiptTo)= sFromAddress End If
' Set the Importance: 0:Low, 1:Normal, 2:High .Fields("urn:schemas:httpmail:importance").Value= intImportance .Fields.Update .From= sFromAddress .ReplyTo= sFromAddress .To= sToAddress .Cc= sCcAddress .Bcc= sBccAddress .Subject= sSubject .Textbody= sBody .Send End With
Set cdoMessage = Nothing Set cdoConfiguration = Nothing End Sub
I'm trying to implement DTS and FTP. So that when a company sends or FTP infomation to our server, it runs a script and checks to see if the infomation is correct and sends and email saying successful or unsuccessful.
1. I'm trying to get the notifications working on the scheduled jobs.I want to email me when the job fails. I created an operator(dmalhotr) and given me as the email address.Here is the error what I'm getting when I'm pressing the test buttonto email myself in properties dmalhotr operator (hope that makessense).Error 22022: sqlserveragent error: the sqlserveragent mail session isnot running; check the mail profile and/or the sqlserveragent servicestartup account in the sqlserveragent properties dialog.I cancel out of it. Then I go to support services --> sql mail -->right-click properties (WE HAVE LOTUS NOT EXCHANGE HERE- dont knowwhether that makes a difference).It says profile name Outlook and I click test. It says Successfullystarted (and stopped) a MAPI session with this profile.I go back to the operator and then click test to send email and I getthe same error. I started and stopped sql server agent and still getthe same error.Not sure how this works, please send me an email as to what I'm doingwrongThanks:DHRUV
It seems that using the Send Mail Task, there is no option for me to format my email as HTML. I have all my HTML code in a string and need to format my email to send the string as an HTML email. What would be the best way to approach this?
I am generating the text file on run time using flat file destination. The text file is generated on the location C: SSIS or D:SSIS based on the location specified in the configuration file.
The text file contains the non matching rows during lookup transform task.
I want to send this dynamically generated text file using the send email task.
But while doing this, I receive an error during package validation:
Package validation error:
Error at send email task [ send email task ] : either the file C:SSISErroroutput.txt does not exists or you do not have permission to access the file.
Error at send email task ; There were error during task validation.
Please suggest as I need to generate the text file only in case of lookup failure.
We have a database with 20 gig and with huge transactions. The transaction log backup is scheduled every one hour from 3.00 AM to 9.00 PM.
We take a full backup in the disk at 9.00 PM and again a full backup in the tape at 2.00 AM
It works fine in the day from 6.00 AM and complete within seconds and the size is approx. 50 to 200 MB.
But the very first transaction log backup at 3.00 AM is running like 3 hrs and the size is approx. 11 gig whick is almost equivalent to the Full backup size. There are some dts packages that are running in the night and as usual reindex, intergrity checks are running and there no large user traffic during night. But I have no idea which the very first transaction log backup in the morning takes longer time and has this bug size. Is there any work around to fix this proble.
I thought I could just copy over some asp.net code like: System.Web.Mail.MailMessage mailMessage = new System.Web.Mail.MailMessage(); But VS2005 doesn't seem to want me touching System.Web.Mail. Any ideas? Thanks, Allen
Does anyone know if this can be done? I've looked everywhere. This is how my info is appearing in an email... These are the files I requested and this is how it's being displayed. Any suggestions? Requestor Requested Shipped Due ------------------------------------------------------------------------------ ----------------------------------------------------------------------- ----------------------------------------------------------------------- ----------------------------------- ----------------------------------------------------------------------- ---- ------------------------------ ------------------------------ ------------------------------ Approaching the Corporate Heart
klm@yahoo.com 02/07/2008 02/07/2008 02/06/2008 PASSION FOR CUSTOMERS 3 copies
Hi all I have heared that there is way to use SQL SMO (SQL Management Objects), or other third party tools running on a management server to send out an email or some kind of notifications if a database is locked.
Anyone knows how to do that in SQL Managment 2005. Thanks -Sarah
When a new record is inserted into the database. I want this to trigger an email that will be sent to all users who requested one when a new record was added. I can't figure the best way to set this up. All help gratefully received. Thanks JB
I am trying to write a stored procedure in Sql Server that should send an email containing a query result everyday at 2:00 PM. How can I do this?? Im trying to use xp_sendmail but this gives me the following error:
Could not find stored procedure 'xp_sendmail'.
Plz let me know if there is any easy way to handle this.
I’d like to update rows matching a certain criteria each night automatically and then send an email.
I have a table with a Status column and an Expire Date column. I want to update rows where the Status = Open and the Expire Date < The current Date by changing the Status to Closed then send an HTML email. Do I have to write a program and schedule it to run or is there a way to do this in MS SQL? I looked at using a stored procedure but I don’t see how to schedule one to run (other than at startup) and I’m not sure if the GETDATE function can be called.
I have a basic trigger that populated an audit table, but I want to add logic to that to send an email everytime the trigger is called,Is there a easy way to add code to my basic trigger to send an email to me everytime the data changes.Thanks
I have a datetime field in a databse for when a tender closes. More often then not its 4pm - for what its worth. And I want to send an email informing the manager 6hrs, 30mins prior and when the tender closes. So I need to somehow check that field either once a day and store those times somewhere or quite regularly ... like every hour.
I would be interested to hear how people would approach such a concept. I havn't got a great deal of experience in triggers or SQL mail.
Hi guys,I hope somebody can help as I am trying to write a procedure in SQL that will be an email reminder sent to users on every 5 th or the month if they don't submit data before.
I am quite new to sql and procedures in particular so I was hoping somebody can help.
I need to: 1.Check the day of the month, if not 5th do nothing
2.Get the date of the prevoious month (get current date - 1 month,set day to 1)this is the funny bit. I have a field DateEntered,but users only select the month and the year on the acctual page,but when submitted it gets written as a full date and defaults to the 1st of the month.
3.Get the list of hospitals that haven't got data for the previous month
Dear all, i am using sql server 2005. i am facing a scenario where i have to send mail to single or multiple user depending on the query. i tried this stmt to send mail to multiple receipints EXEC msdb.dbo.sp_send_dbmail @profile_name = 'imran' , @recipients= 'imran.khan@bbraun.com;amol.puranik@bbraun.com', @subject = 'Test mail' it succesfully sent mail.
Now i want to send mail depending on query. with single employee it is no issue. but if it is more then one employee how can i mail to multiple recipient.
That is my question is in this sp to send multiple recepients one has to separates addresses with ; semi colon how can i arreange recipient so that ; comes in between.
I have an store procedure and I want to build an email with this store procedure to email me How can I use the email command to incorporate into my sql SP?