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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How to setup the DTS

Author  Topic 

kingkong
Starting Member

16 Posts

Posted - 2004-09-01 : 15:58:04
Hi Folks:
I have the following SP to retrieve people Name & Email from Table called "Employee". I have to run this query every Monday and Wednesday morning at 8:00am for email notification. Can anyone guide me how to setup DTS for scheduling this task? Also, can I perform Email Noticfication into SQL-Server or I can to do it outiside after returning the recordset for name & email after the execute the DTS-Query.


CREATE Procedure Employee
@role char (50)
As
SELECT Name, Email FROM People where Role = @role ORDER BY Name
GO

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-09-01 : 16:00:31
You don't need DTS for this. Create a job within SQL Server. It is located under Management, SQL Server Agent, Jobs. Create a job, then the job step would be your stored procedure. Then add a schedule for Monday and Wednesday in the schedule tab.

Tara
Go to Top of Page

kingkong
Starting Member

16 Posts

Posted - 2004-09-01 : 16:25:38
Hi Tara:
After schedule setup, can I senting email to Users after execute this schedule.

Example:
I mean "SELECT Name, Email FROM People where Role = @role ORDER BY Name" will return 50 people name & email. Can I do all within SQL-Server?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-09-01 : 16:29:01
Do you have SQL Mail setup on the database server or someway to e-mail users?

Tara
Go to Top of Page

kingkong
Starting Member

16 Posts

Posted - 2004-09-01 : 17:30:51
I have to check it out for SQL Mail. Thanks
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-09-01 : 17:42:28
http://support.microsoft.com/default.aspx?scid=kb;EN-US;263556

Tara
Go to Top of Page

kingkong
Starting Member

16 Posts

Posted - 2004-09-02 : 10:45:02
Tara:
Thanks for your input!

I found out using SQL Email couldn't sent out email with HTML format. So, I had talked to one of my developer that he told me writing coding & save as with VBS script extension. Calling the Store Procedure & return records & senting out email in VB Script.

If it is working, sent this VBS file to DBA & let him setup the JOB Schedule to excecute this file.

Once again! Thanks for your times!
Go to Top of Page
   

- Advertisement -