There is not such type of event yet.
The concept of events relates to objects.
for example :
If you see the web or windows ' control that have particular events as web page or winform have certain events.
Loading , Loaded and other.
Dropdownlist control has selectionChanged event.
We could create our own events but how ' ll you trigger them daily automatically
You could create window service in visual studio for such type of tasks.
Or you may add your required program in Windows Task Scheduler ?
Or you have one more better option to create a sql job .
Sql job will trigger automatically at your specified time and is a component of sql server
7/5/2012 1:39:55 PM
Can you provide any sample for SQL Job?
Other major thing is that do you think that performance will be enhanced from the revomal of records?
If thinking then its wrong.
Your database performance could be more slow but why?
Because your database log size increases when you delete .
You 'll have to reduce the database log size and should update the specified tables' statistics and rebuilding the indexes.
Keep an eyes on. The mentioned things and create such procedure and place it in sql job.
If Windows service then manage it by calling that stored procedure.
In case of Any ambiguty , ask
This is simple wizard approach.
You ll just need to follow some steps.
Right now I am. Unable to publish anything but I 'll try sooner INSA.
Anything else is required except of it?
So that I could try to put a complete scenario.
7/5/2012 7:59:28 PM
Ok Please Thanks.
Sorry in delay , I hadn't an instance of sql server installed in my home machine.
It's just complete It's downloading now.
One thing I forgot to ask: sql job is a component of sql server enterprise edition only.
I don't think that you could be able use this component if you have an express or may be standard edition.
One small sample and some guidence has been placed at below URL:
========================================Shrink database and Shrink Log==========
For shrinking the database and log , we Set Recovery Model simple before shrinking
and then Set its FUll model after using the below commands as i mentioned below:
Alter database DatabaseName SET Recovery simple
DBCC SHRINKFILE('DatabaseNamelog', 1)
Alter database DatabaseName SET Recovery full
I would suggest that you should first read the below article for getting an overview that
what se should do or what not?
==========================================Statistics and Re indexing===========
For the update statistics , you could use
EXEC sp_UpdateStats for whole database.
you can use UpdateStatistics for single table too.
=============================re -indexing and statistics=====================