Finding Recipients In Jobs
Jan 7, 2015I was wondering if there is a query out there that can find all of the SP jobs that get sent out to a certain email address example 123@xyzcompany.com ....
View 1 RepliesI was wondering if there is a query out there that can find all of the SP jobs that get sent out to a certain email address example 123@xyzcompany.com ....
View 1 RepliesI am a newbie to tsql. I am trying to find if a job has failed, if so I only want to pickup the lastest job. I want to see name,message and run date. I know I need to find the max run_date and run_time for each job_id. I know that I need to join the sysjobhistory table and the sysjobs tables. I also know that I need status not equal to one. I have tried thousands of different things and nothing seems to work. If I ever get this to work then I only want to look at jobs in the last 24 hours. I am not going to include any of my job since I have tried so many things and I have been all over the map.
Follow-up to my original post.Is it possible for the "objEmail.To" to lookup the values from a sqlservertable?At the moment, I type the email address separated by a semi-colon.TIA~Set objEmail = CreateObject("CDO.Message")objEmail.From = "send@test.com"objEmail.To = "receive@test.com"objEmail.Subject = "TEST SUBJECT"objEmail.AddAttachment "\server est.csv"objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "SERVER_NAME"objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "username"objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "userpwd"objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25objEmail.Configuration.Fields.UpdateobjEmail.Sendset objEmail = nothing
View 1 Replies View RelatedHi everyone,
i'd like to assign "@recipients" for sp_send_dbmail derived from a query as follows:
Code SnippetDECLARE @mailist VARCHAR(2000)
SET @mailist=
'select email
from
server.db.dbo.table
where
lastname=' +''''+'aaa'+''''
exec msdb.dbo.sp_send_dbmail
@profile_name='myprofile',
@recipients=@mailist,
@subject='email address through a query',
@...
when i run it i dont get any error message but mails to dot arrive.
any suggestion why ?
Thanks a lot
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.
Thank you.
Hi There,
I try to send a report by email using SSRS subscriptions with recipients defined in an outlook email group. if 1 or more emailid are not a valid ones then SSRS does not send the report to any other valid recipients but displays the bellow error message!
"The e-mail address of one or more recipients is not valid."
In corporate companies, it is a common to find in valid/locked emailids in email group lists which can not be corrected.
Expected functionality: SSRS Subscriptions should send report email to other valid recipients in the mail group.
Could you please suggest a work around or fix the issue?
Thank you much in advance!
Regards,
Ramana
I able to send mail with HTML body format using script task, but i am not able to send more than one recipients with the below code:
/*
Microsoft SQL Server Integration Services Script Task
Write scripts using Microsoft Visual C# 2008.
The ScriptMain is the entry point class of the script.
*/
using System;
using System.IO;
using System.Data;
using Microsoft.SqlServer.Dts.Runtime;
[code]....
I have subscriptions that fail because someone's email is no longer valid,
where is this error information stored so I can fix the problem?
I have a large list and it is hard to do manually.
I will be using data driven solutions, but these are existing subscriptions that need to be ran.
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
I have table called email_address and have all the email ids in this table. using sql task, I am getting the ids and passing to string. This string variable is passed to the to field using expression.Since it is a string only the first email id is set in the to field and the rest is ignored. Can you tell me a way to parameterize all the email ids to the to field in this case.Email ids from Table -> To field..I would like to put all the email ids in the to fields at once and send only a single email!
View 10 Replies View RelatedHello,
I am very new to SQL and I have an issue. We have a website that has pictures on the site. We want to take them down but the pictures are somehow tied into the database, they aren't on any of the servers. How can I find these pictures that seem to be somehow hard coded into the database?
Any help would be greatly appreciated.
i have
create table test
(id_text int
,text_name varchar(10)
,id_author int)
insert into test (id_text, text_name, id_author) values (205, 'name1', 123)
insert into test (id_text, text_name, id_author) values (205, 'name2', 124)
insert into test (id_text, text_name, id_author) values (205, 'name2', 125)
insert into test (id_text, text_name, id_author) values (206, 'name2', 124)
insert into test (id_text, text_name, id_author) values (207, 'name2', 122)
insert into test (id_text, text_name, id_author) values (207, 'name2', 128)
select id_text, id_author from test
and i need to get out only id_text with the first author.
any solutions for sql server 2000?
thank you
I have a report that is grouped by week. The details of the week have the date, time interval (half hour), and the maximum value for that day. So in the example below I am showing the week of May 21st. Then I have all of the days of that week, sorted by date as requested, with the halfhour the maximum value occured in on that day. So Monday the 22nd has the maximum value for the week at 254 (and is highlighted in red). Where the ????? are below, I need to display '1400' which is the interval, but have not yet been able to figure out how to do this.
I tried the following expression:
=iif(max(Fields!MaxValue.Value) = Fields!MaxValue.Value, Fields!Interva.Value, "X")
but this only works if the first day is the maximum value.
5/21/2006
?????
254
Sun, 5/21/2006
1000
147
Mon, 5/22/2006
1400
254
Tue, 5/23/2006
1830
141
Wed, 5/24/2006
1830
107
Thu, 5/25/2006
0830
210
Fri, 5/26/2006
1900
36
Sat, 5/27/2006
1000
149
Any ideas are greatly appreciated!
Hi,It may sound funny but it is true. I have 2 version of same procedure, 1 is named as "update_aggre" other named as "update_aggre_2" .if I run these procedures using sql jobs the 1st procedure takes 12 seconds and the 2nd takes 2 second. I am stil surprise why is that both of them have same code.Any ideas please?and also I need to have lock mechanism within a procedure so that if some one is calling a procedure which is already called by some one ans is stil working on it the second user shld not be able to overwrite the existing data untill the first one is finished.TIAAmit
View 3 Replies View RelatedWe're upgrading to Sql 7 from 6.5 but having problems running jobs with the following sql statement :
SQLMAINT.EXE -D master -BkUpDB e:dump -BkUpMedia DISK -DelBkUps 2 -Rpt d:salogmaster_dump.log
The error message is [Microsoft SQL-DMO (ODBC SQLState :28000}] Error 18456:[Microsoft]ODBC SQL Server Driver][SQL Server]Login failed for
user 'Domainuser'. Process Exit Code 1. The step failed.
The user is a domain account and already in local administrator group. It also starts up both Sql server & Sql server agent. It can run the same job on another server. I have compared the set up and can't find any differences.
Thanks in advance for your help.
If i've created myself a job on my SQL Server and then scripted it, how do i run this script and so doing create my job on another server?
View 2 Replies View RelatedHi, I have a DTS package that runs correctly when executed manually, but when I schedule a job via the package, the job begins executing and nevers seems to complete the run. The Package runs in less that 1 minute, but the job sticks on executing and does not complete. I have to cancel, any ideas?
Thanks
I have 12 scheduled daily jobs, all the jobs are depending on one job.I want to run rest all the jobs if and only if the Job#1 gets success.Now all are running independently.Is there a way to force the sequence by using SQL.
Thanks!
If we have several jobs running several times daily,do we have to do any clean-up with the logs/job history so that they don't run into any problem later?Will it be o.k if we do not clear off the history frequently?
View 2 Replies View RelatedHi all,
My firm has about 15 SQL Servers. 5 of them are still 6.5 and the other 10
are 7.0. I have noticed that the jobs I have setup to perform maintenance
tasks, backups etc. almost never fail in 7.0. Similar tasks routinely
fail on the 6.5 servers.
So I did a test. I deleted a database in 7.0 and ran a backup job. Although
the log for the job said that it couldn't find the db it still said the job
was successful. In 6.5 if you try to run a job on a non-existent db it
fails. What's going on in 7.0? What has to happen for a SQL Server agent job
to fail. This seems like an awfully dangerous new "feature".
If anyone could shed light on this I would appreciate it.
Thanks
JJ
Hi,
How do we add DTS pakages to a scheduled job ?
Ex: Lets say i have 2 DTS pakages One has got to run immediately after the other.
>Now i create a schedule for the main DTS pakage.
>Once i create a schedule, It goes into Jobs as a Scheduled job.
>Now in the propertied part of the first DTS job i need to add a second DTS
as Step2, mentioning that it should run after the First DTS.
How do we do this ?
Thanks in Advance,
Siv
Does anyone know how I can set up some form of alert that tells me which scheduled jobs are still running?
View 1 Replies View RelatedWe had some jobs in Sql server 7.0 which ran together at the same time.
Now we have moved to sql 2000 and when we run those jobs together again they just sit up(keep on going without doing anything) and do nothing.I have monitored that there is no Blocking or any kind of Performance Overload.
These jobs run fine when they are executed Individually in Sql 2000
Any kind of help will be appreciated.
Thanks,
James
hey guys!! can someone tell me, what are jobs on MS SQL?
and what is a job scheduler? how do it function? what are the processes
involved? and additional information about this stuffs.. thanks..really need it.. tnx tnx..
p.s.
if your wondering
why i asked the questions
here..because it's really
hard to search the meaning
of it in the net..i hope you
guys could help me.. tnx
Thanks for the help with moving jobs from one server to another.
Now that I have moved them, they now fail each and all. I have copied the script and saved them as vbs files and placed them in a folder on the server and ran them successfully. I think it has something to do with the rights, but I don't know what. Could someone shed some light on possible causes?
Thanks,
Lee
Hi SQL Guru's
I am trying to run a job on Multiple SQL Servers in a domain.I am setting the job on my system,but the Radio button "Target Multiple Servers" is disabled.How do I enable the radio button "Target Multiple Servers".
Please let me know if this is possible.
Best Regards
SK.
http://www.dbforums.com/forumdisplay.php?f=246
View 6 Replies View RelatedWhat's the best way to backup jobs in SQL Server 2000?
View 3 Replies View RelatedI need some direction on SQL Jobs.
I can handle the setting up a SQL Job/DTS Package.
What I have is SQL Statement I need to run that creates a txt file Renames file to AUX_Export_020507.txt then zips that text file and Name it AUX_Export_020507.zip. Then move the zip file to a FTP directory.
I would like to get email after it runs also.
This issue I am having is the Part that zips the file
Renames the text file and zip file to add the current date on end like I have above and move it to a FTP directy..
The old days we would creat an autoex.bat file to move and rename.
Thanks
Michael Webb
Hi All,
I want to create a job which will basically fetch the information from the system. I mean job will fetch the following information about disk available in the system.
1) Drive
2) Total Size
3) Available Space
4) %free space
Suppose I have 3 drives d,h,i
The information should look like this
Drive Totalsize Available Space %free space
H 2 Gb 1 GB 50%
Can anyone please help me.
Regards,
Frozen
I already learned SQL by reading "Head First SQL" book (which uses MySQL). I also know how to use Excel(using basic function and creating pivot table.) However, I noticed that many available jobs require Microsoft SQL Server 2005 and also using SQL with Excel. Now, I am thinking to learn SQL Server 2005 Express Edition because it is free! I would really appreciate if anyone who has been working in industry give me some suggestions about what is the best way to learn SQL Sever 2005? or does it worth to learn? or is it hard to learn? Can you recommend good book or website for learning SQL Server 2005 Express Edition. Thanks!
View 3 Replies View RelatedHow is it possible to schedule a job to run every 40 seconds.
It seems every 1 minute is the shortest time available in the job properties for scheduling a job.
Thanks
I have 2 jobs
in first job,there are 2 steps
in the 1st step it has to take the backup
in the 2nd step it has to call the 2nd job
in 2nd job,it has to restore the backup
i dont know how to call another job in the second step and one more thing is the restoration is done on another sql server instance