DB-delete-script and project references in the db

View: New views
2 Messages — Rating Filter:   Alert me  

DB-delete-script and project references in the db

by Schmaderer, Roland :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

DB-delete-script and project references in the db

Hi all,

I haven´t had a closer look at the db, yet. But maybe someone has some quick answers for me :-)
Two questions about the sonar db:

First, is there a script to delete data about a project in a defined period?
I want to keep the db as lean as possible. So, for example, it would be nice
to keep data of the last 10 days only. Or to thin out the values
by deleting every second entry.

And second, how are different projects referenced in the DB (artifactid?) and is there a way to get metrics
on them by a simple select statement?
We´re using the cruise control site to get an overview of the current build process and
I want to add a link to each project and maybe one or two metrics on it. Has anybody
done something compareable and would give me a hint? :-)

Thanks
Roland


Re: DB-delete-script and project references in the db

by Olivier Gaudin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Roland,

First, is there a script to delete data about a project in a defined period?

No there is not (and obviously, I don't recommend to use one...). A good start to create one would be to use the purge script [1].
 

And second, how are different projects referenced in the DB (artifactid?) and is there a way to get metrics
on them by a simple select statement?

I think you should use the web service API [2].

Olivier

[1] http://jira.codehaus.org/browse/SONAR-893
[2] http://docs.codehaus.org/display/SONAR/Web+Service+API





On Thu, Jul 2, 2009 at 11:15 AM, Schmaderer, Roland <schmaderer@...> wrote:

Hi all,

I haven´t had a closer look at the db, yet. But maybe someone has some quick answers for me :-)
Two questions about the sonar db:

First, is there a script to delete data about a project in a defined period?
I want to keep the db as lean as possible. So, for example, it would be nice
to keep data of the last 10 days only. Or to thin out the values
by deleting every second entry.

And second, how are different projects referenced in the DB (artifactid?) and is there a way to get metrics
on them by a simple select statement?
We´re using the cruise control site to get an overview of the current build process and
I want to add a link to each project and maybe one or two metrics on it. Has anybody
done something compareable and would give me a hint? :-)

Thanks
Roland