If you have enough RAM allocated to SQL Server to keep it from bogging down
the machine for an extended period of time, you do not need to do anything
Go into SQL Enterprise Manager and click on Server, then SQL Server, then
Configure. Click on Configuration and scroll down until you see "Memory"
and adjust the "Current" value to a decent amount of RAM (this number is in
2k units, so specifying 50000 is actually 100MB). The amount of RAM you
allocate to SQL MUST be available in order for SQL Server to start, so if
you don't have much available at any given time, be careful what you choose
here. Also, you can adjust "tempdb in ram" to make things run a bit
smoother. Be ware--this is measured in MB, NOT 2k units, so allocating
"2044" is 2GB, not 4MB!
> Also, is there a command to automate the deletion process... such
> as a variable... or statement... to delete the previous month's call
> ...as opposed to having to specifiy the previous month by name.
I typically keep 2 to 3 months worth of Calls data (excluding Start
records). Typically once a month, I manually run "DELETE FROM Calls WHERE
CallDate < '6/1/98'"
On a nightly basis (at 12:30am), I have SQL's Scheduled Task manager run
the following CmdExec command:
isql -n -E -Sservername -i\\servername\sql-script-path\Calls-Cleanup.sql
The "Calls-Cleanup.sql" script is below:
/* Delete START and null records from Calls table older than one day */
DELETE FROM Calls
WHERE (AcctStatusType = 1 OR UserName = 'null')
AND DateDiff(Day, CallDate, GetDate()) > 1