Results 1 to 5 of 5

Thread: SQL Server 7 Question...

  1. #1

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Angry SQL Server 7 Question...

    I have a VB app that uses SQL Server 7.
    The app creates jobs in the Jobs table, the structure is irrelavant for this Q.
    30 days after the job is created it's status is set to cancelled.

    In the Sub Main of my app I can run a procedure which checks all jobs and if any are found that are over 30 days old then the app sets the Cancelled field to TRUE.
    The problem occurs when another app also uses the data in the jobs table. If someone doesn't run the main app then jobs which are greater than 30 days will still be shown as being effective.
    Does SQL Server have an event where I can set it to run at Midnight everyday. This event would run a stored procedure which would automatically cancel jobs...Anyone know if this is possible???

  2. #2
    Hyperactive Member GlenW's Avatar
    Join Date
    Nov 2001
    Location
    Gateshead, England
    Posts
    479
    Can't you get the 'other App' to do the cancelled thingy as well?

  3. #3

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Talking My house is as small as the moon...

    Errr...nope. There are 2 other apps which reference this table, but only one app administers it. Doing an event in SQL Server is far more reliable than copying code from one app to another, then to another...espescially if the functionality changes...

  4. #4
    Fanatic Member Jerry Grant's Avatar
    Join Date
    Jul 2000
    Location
    Dorset, UK
    Posts
    810
    In SQL Server Enterprise Manager, open the Management tree node for your server, select SQL Server Agent, Jobs.

    In here you can specify scheduled events, like running SPs at specific times...........

    Think this is what you are looking for!
    Jerry Grant................tnarG yrreJ
    Website: <JG-Design></.net>
    Email: [email protected]
    Working towards a bug free world......
    (Not a Microsoft employee)

  5. #5

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width