On Wednesday 31 January 2007 08:41, Manuel Staechele wrote:
> hi,
>
> i want every media LastWritten 7 days ago to go in full status.
> because if the media is append, it will not automatic pruned
> i have wrote a little sql query to do the job, but want ask if there is
> a better, than execute the sql query every day.

I'll let others on this list answer your question, but in your SQL below, I 
see no reason to change a Used status to Full.

>
> sql query:
>
> UPDATE Media SET
>    VolStatus = 'Full'
> WHERE (VolStatus = 'Append' or VolStatus = 'Used')
>    AND LastWritten < NOW() - interval 7 DAY
>
>
> thanks for idees.
>
> greetings
> manuel staechele

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to