From: rettenbe Date: Thu, 17 Apr 2008 13:16:58 +0000 (+0000) Subject: separate scripts for checking job and messaging db X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ded990da5c98569d3eda8b6ccb35a32cb8465812;p=gosa.git separate scripts for checking job and messaging db git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10539 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/tests/sqlite-check-jobs.pl b/gosa-si/tests/sqlite-check-jobs.pl new file mode 100755 index 000000000..b80039b62 --- /dev/null +++ b/gosa-si/tests/sqlite-check-jobs.pl @@ -0,0 +1,46 @@ +#!/usr/bin/perl +#=============================================================================== +# +# FILE: DBD-SQlite.pl +# +# USAGE: ./DBD-SQlite.pl +# +# DESCRIPTION: +# +# OPTIONS: --- +# REQUIREMENTS: --- +# BUGS: --- +# NOTES: --- +# AUTHOR: (), <> +# COMPANY: +# VERSION: 1.0 +# CREATED: 20.12.2007 08:54:52 CET +# REVISION: --- +#=============================================================================== + +use strict; +use warnings; +use GOSA::DBsqlite; +use Data::Dumper; + +print "START\n"; +my $res; +my $db_name; + + +$db_name = "/var/lib/gosa-si/jobs.db"; +if (-e $db_name) { + print "\n############################################################\n"; + my $table_name = "jobs"; + print "$db_name\n"; + print "$table_name\n"; + my $sqlite = GOSA::DBsqlite->new($db_name); + my $col_names = $sqlite->get_table_columns($table_name); + + print join(', ', @{ $col_names } )."\n" ; + my $answer = $sqlite->show_table($table_name); + print $answer."\n"; +} + + +print "\nFINISH\n"; diff --git a/gosa-si/tests/sqlite-check-messaging.pl b/gosa-si/tests/sqlite-check-messaging.pl new file mode 100755 index 000000000..f7244ad8c --- /dev/null +++ b/gosa-si/tests/sqlite-check-messaging.pl @@ -0,0 +1,44 @@ +#!/usr/bin/perl +#=============================================================================== +# +# FILE: DBD-SQlite.pl +# +# USAGE: ./DBD-SQlite.pl +# +# DESCRIPTION: +# +# OPTIONS: --- +# REQUIREMENTS: --- +# BUGS: --- +# NOTES: --- +# AUTHOR: (), <> +# COMPANY: +# VERSION: 1.0 +# CREATED: 20.12.2007 08:54:52 CET +# REVISION: --- +#=============================================================================== + +use strict; +use warnings; +use GOSA::DBsqlite; + + +print "START\n"; +my $res; +my $db_name; + + +$db_name = "/var/lib/gosa-si/messaging.db"; +if (-e $db_name) { + print "\n############################################################\n"; + my $table_name = "messaging"; + print "$db_name\n"; + print "$table_name\n"; + my $sqlite = GOSA::DBsqlite->new($db_name); + my $col_names = $sqlite->get_table_columns($table_name); + print join(', ', @{ $col_names } )."\n" ; + my $answer = $sqlite->show_table($table_name); + print $answer."\n"; +} + +print "\nFINISH\n";