| Author |
Topic |
|
brendalisalowe
Constraint Violating Yak Guru
269 Posts |
Posted - 2004-10-18 : 12:31:28
|
| I want to be able to run something at a certain time at night. Like it a certain field = 10, then move it to a different table. Does anyone know where I would begin on doing this? I have never done this before? Please let me know where I should begin. Thanks!BrendaIf it weren't for you guys, where would I be? |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-10-18 : 12:43:31
|
| You will need to create a scheduled job.In enterprise manager see management, sql server agent, jobs.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
brendalisalowe
Constraint Violating Yak Guru
269 Posts |
Posted - 2004-10-18 : 15:18:10
|
| Are there tutorials anywhere that explain how to create a new job in SQL Server? I need to create a job where if a field = today then send an email. How would I do that? Thanks!BrendaIf it weren't for you guys, where would I be? |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2004-10-18 : 16:11:52
|
in index in BOL type jobs and there is everything you need.you can also do it in EM->Tools->Job Scheduling-> and just follow the wizard it depends for what exactly do you need a job. If you want to send an email when the record is not frequently inserted/updated then use a trigger.else schedule a job that peridically scans a table and sends mails when correct conditions are fulfilled.Go with the flow & have fun! Else fight the flow |
 |
|
|
brendalisalowe
Constraint Violating Yak Guru
269 Posts |
Posted - 2004-10-18 : 16:37:23
|
| Ok, but now my question is what coding do I put in it? Visual Basic Sripting? T-SQL? What would the coding be?BrendaIf it weren't for you guys, where would I be? |
 |
|
|
DustinMichaels
Constraint Violating Yak Guru
464 Posts |
Posted - 2004-10-18 : 16:46:38
|
| I would think you would want to use T-SQL. You can actually choose the type of command to run whenever you make a step for the job.Dustin Michaels |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-10-18 : 16:47:16
|
| TSQL would be best for this task, but you can use a lot of different types of languages in job steps. Just don't change the default type as this is the default.Tara |
 |
|
|
brendalisalowe
Constraint Violating Yak Guru
269 Posts |
Posted - 2004-10-18 : 16:50:34
|
| So what is a sample T-SQL I would use for this. Like if a field = a date, then send an email? Thanks!BrendaIf it weren't for you guys, where would I be? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-10-18 : 16:54:53
|
| Could you provide examples? Do you have SQL Mail configured or some way of e-mailing from the database server?Tara |
 |
|
|
brendalisalowe
Constraint Violating Yak Guru
269 Posts |
Posted - 2004-10-18 : 17:04:02
|
| I am trying to figure out how to configure SQL Mail. How do setup a specific user to have that?BrendaIf it weren't for you guys, where would I be? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-10-18 : 17:14:21
|
| http://support.microsoft.com/default.aspx?scid=kb;EN-US;263556Tara |
 |
|
|
brendalisalowe
Constraint Violating Yak Guru
269 Posts |
Posted - 2004-10-18 : 17:18:48
|
| Funny. I was just looking at that same page. I can't figure out how to have an account setup for MSSQLServer. Do you know?BrendaIf it weren't for you guys, where would I be? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-10-18 : 17:20:20
|
| I don't understand what you mean. You need to have the SQL services uses a domain account that has local admin privileges. This account also needs to be setup in Exchange. Do you have an account like this? If not, ask your server admin to do this for you. Do not use someone's user account. Use a generic account such as SQLAdmin.Tara |
 |
|
|
brendalisalowe
Constraint Violating Yak Guru
269 Posts |
Posted - 2004-10-18 : 17:31:50
|
| So a SQLAdmin account should be setup in Exchange and in SQL Server? I am the IT Dept. Funny huh? I control everything. When I try to setup SQL Mail, it only comes up with one MAPI address even though I have setup another one. Don't you love how I don't know anything?BrendaIf it weren't for you guys, where would I be? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-10-18 : 17:33:03
|
| Yes. And you need to login to the database server using the SQLAdmin account, then setup SQL Mail.Tara |
 |
|
|
brendalisalowe
Constraint Violating Yak Guru
269 Posts |
Posted - 2004-10-19 : 13:07:32
|
| Hi TaraDo I create a user or a login for SQL Server?BrendaIf it weren't for you guys, where would I be? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-10-19 : 13:10:03
|
| Neither. The user is at the Active Directory/Domain level.Tara |
 |
|
|
brendalisalowe
Constraint Violating Yak Guru
269 Posts |
Posted - 2004-10-19 : 13:13:48
|
| So I just create a new user (SQLAdmin) in the Active Directory Users and Computers? Then what?BrendaIf it weren't for you guys, where would I be? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-10-19 : 13:15:22
|
| Then add the account to the local administrators group on the database server. Give that account an inbox in Exchange. Then log into the database server using SQLAdmin. Then finish configuring SQL Mail.Tara |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-10-19 : 13:16:13
|
| Forgot to mention that you'll need to change the SQL services to use this SQLAdmin account. They'll require a restart. This needs to happen before configuring SQL Mail.Tara |
 |
|
|
brendalisalowe
Constraint Violating Yak Guru
269 Posts |
Posted - 2004-10-19 : 13:19:30
|
| After I do all of that, do I always have to logon as SQLAdmin for it to work?BrendaIf it weren't for you guys, where would I be? |
 |
|
|
Next Page
|