[THIN] Re: Reduce the Appsense Event Retention?

  • From: "James Scanlon" <James.Scanlon@xxxxxxxxxxxxxxxx>
  • To: <thin@xxxxxxxxxxxxx>
  • Date: Mon, 1 Aug 2011 09:21:57 +0100

Ben,

You rock mate!
Appreciate the email and thanks very much!! :)

James 

-----Original Message-----
From: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx] On
Behalf Of Ben Pelzer
Sent: 01 August 2011 09:18
To: thin@xxxxxxxxxxxxx
Subject: [THIN] Re: Reduce the Appsense Event Retention?

Hi James,

You can not do that from within the Management Console (yet) as far as I
know You'll have to delete the events by hand

I was in the same "predicament" as you, the SQL database my customer
used for the AppSense Management server even filled up completely (that
will teach them to use SQL Express) So I asked AppSense support about
this and they provided me with a SQL script to delete all events past a
certain date to purge the database and free up some space For good
measure I'll copy the mail and the script I got from them in here The
script can be used to make some kind of recurring scheduled task Hope
you can use this too

Cheers,

Ben

-----Begin mail from AppSense Support
Hello Ben, 

As mentioned in my previous email, please find a sql script attached
(you will need to save and remove the .txt extension)

There are two edits required to the file, line 2 requires the name of
the database to be entered, and line 6 requires the number of days that
events should be kept. All events older than this value will be deleted.
This needs to be run from the SQL Server Management Studio, or from the
command line using osql.exe.

Also, as mentioned in my previous email, before running this I would
suggest stopping the "AppSense Events Dispatcher Service" which will
prevent any more events being added to the database while the script
runs, and will also allow time to check the database size afterwards and
remove any packages, or older versions of, if more space is required.

Once you are happy with the database size, restart the "AppSense Events
Dispatcher Service". I would suggest at this point keeping a close eye
on the database size and check your event filtering configuration. I
would also suggest implementing some form of monitoring so you can be
alerted when the database is getting large.
 If you still require a lot of auditing information, I would suggest
moving the database to a SQL Server, instead of SQL Express.

Please do not hesitate to contact me should you have any issues or
queries with the above.
-----End mail




-----Begin SQL script, select and copy into a text file and rename it to
.sql extension; run on SQL server that holds AppSense database

-- Set the following to the database that this script operates on USE
[DatabaseName]

-- This represents the number of days to preserve events for
-- i.e. '7' will delete events older than one week DECLARE @ageOfEvents
INT SET @ageOfEvents = 7

-- Delete the events
DECLARE @eventCount INT
DECLARE @oldestEventTime DATETIME
SET @oldestEventTime = DATEADD (DD, -@ageOfEvents, GETUTCDATE()) PRINT
N'Deleting events older than ' + CONVERT(NVARCHAR(32),
@oldestEventTime)
EXEC Event_DeleteFromTime NULL, @oldestEventTime, 0, @eventCount OUTPUT
PRINT CONVERT(NVARCHAR(12), @eventCount) + N' events deleted'

-----End SQL script


On 30-07-2011 00:58 , "thin-digest@xxxxxxxxxxxxx"
<thin-digest@xxxxxxxxxxxxx> wrote:

>Msg: #4 in digest
>Subject: [THIN] Reduce the Appsense Event Retention?
>Date: Fri, 29 Jul 2011 17:01:44 +0100
>From: "James Scanlon" <James.Scanlon@xxxxxxxxxxxxxxxx>
>
>Any one know how to set APPSENSE event retention?
>We have specific events 'captures' enabled - but the retention on these

>events is from when Appsense was running.
>We only want to keep the last 2 weeks worth of logs / events? Can this 
>easily be set anywhere?
>
>Cheers :)

************************************************
For Archives, RSS, to Unsubscribe, Subscribe or set Digest or Vacation
mode use the below link:
//www.freelists.org/list/thin
************************************************

______________________________________

C. Hoare & Co. is authorised and regulated by the Financial Services Authority 
with registration no. 122093.  The FSA’s address is 25, The North Colonnade, 
Canary Wharf, London E14 5HS.
Registered in England no. 240822.  Registered office 37 Fleet St, London, EC4P 
4DQ

Confidentiality Disclaimer:
This message and attachments are confidential and may be privileged, and are 
sent for the personal attention of the addressee(s).  If you are not the 
intended addressee, any use, disclosure or copying of this document is 
unauthorised. Information transmitted by email may be intercepted, lost, 
destroyed, corrupted or delayed and as a result, C. Hoare & Co. do not accept 
responsibility for any errors or omissions in the contents of this message. If 
you would like to confirm the contents of this email, please request a hard 
copy version.

If the contents of this message are of a personal nature, the email will have 
been sent in a personal capacity and not on behalf of C. Hoare & Co.

Monitoring/Viruses:
C. Hoare & Co. may monitor all incoming and outgoing emails in line with 
current legislation. Although emails are screened for viruses, C. Hoare & Co. 
cannot guarantee that any transmissions will be virus free.
________________________________________

************************************************
For Archives, RSS, to Unsubscribe, Subscribe or
set Digest or Vacation mode use the below link:
//www.freelists.org/list/thin
************************************************

Other related posts: