Database Maintenance

This is a discussion on "Database Maintenance" within the Classic ASP section. This forum, and the thread "Database Maintenance are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices




Closed Thread
 
LinkBack Thread Tools
  #1  
Old Dec 10th, 2003, 18:37
Junior Member
Join Date: Aug 2003
Location: USA
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Database Maintenance

I have several tables where data needs to be deleted, based on some value, on a periodic basis to prevent gigantic volumes of obsolete data in the database.

Also have several preformated mass emails that needs to be sent on a periodic basis based on some value.

I have scripts-routines-sql stmts that says in effect "Delete from table something where DatePosted is < = Date().

As of now, I'm having to manually open a page with these functions listed, and then execute the ones that needs to be executed. What I would like to see happen, is that these functions are run automatically at some given time based on some criteria, without daily-weekly-monthly involvement from me.

If someone could please give me some pointers as to how this is accomplished, it would be greatly appreciated.

Thanks

Ernest
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!

  #2  
Old Dec 10th, 2003, 19:45
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
What db are you using and are you running this on your own server?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
Old Dec 10th, 2003, 19:50
Junior Member
Join Date: Aug 2003
Location: USA
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
I'm using SQL 2K and a shared hosting service.

Ernest
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #4  
Old Dec 10th, 2003, 20:47
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
I'm not sure what's locked down on your shared SQL account, you might not have permissions to do this. But what you want to do is add a job using a SQL Agent. It's in the Management folder of your SQL account. It's pretty self explanatory to set up.

If you don't have permissions for this there's a couple other things you can set up, but they'll require having your computer turned on to run.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #5  
Old Dec 11th, 2003, 14:23
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
Use the windows task scheduler to open a browser once per day and visit your page which runs the functions.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #6  
Old Dec 11th, 2003, 14:41
Rob's Avatar
Rob Rob is offline
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,188
Blog Entries: 7
Thanks: 27
Thanked 23 Times in 20 Posts
I would recommend going down the SQL Agent route. Mosts hosts will allow jobs to run via the agent which perform tasks on your database.

The other option as smokie says is to have a browser navigate the link once a day.

Do these scripts take a long time to run?? If not, consider piggy backing them onto a commonly hit web page..
A mass delete using such a simple filter would not take long at all to run (especially if they get run every day) and your users will not even notice.
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread

Tags
database, maintenance

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
User web maintenance Moonlilly Web Page Design 5 Mar 24th, 2007 06:30
XML Code for transfering data from one SQL Server Database to another database plolla Other Programming Languages 1 Aug 3rd, 2006 18:37


All times are GMT. The time now is 15:59.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42