SQLServer

Check MSSQL Database Mirroring

Description:

Perl script for checking database mirroring in Microsoft SQL Server 2005

Current Version

Last Release Date

June 7, 2009

Compatible With


Project Files
Project Notes
This Perl script uses DBI to connect to a Microsoft SQL Server and checks the state of a mirrored database. The script should be run on the PRINCIPAL because on the MIRROR the user needs to have SYSADMIN rights otherwise the script returns "NULL" (no data)
Reviews (2) Add a Review
Sysbase error
by sriniprog, August 31, 2016

Hi Team, Couldn't able to complete the check.. Please refer below error and guide us to fix the same ASAP. [root@segment-119-227 libexec]# ./check_dbmirroring.pl -H 192.168.52.219 -d HRPL_MDS_DB1 -u toolsadmin -p T00l@dm1N install_driver(Sybase) failed: Can't locate DBD/Sybase.pm in @INC (@INC contains: /usr/local/nagios/libexec /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at (eval 3) line 3. Perhaps the DBD::Sybase perl module hasn't been fully installed, or perhaps the capitalisation of 'Sybase' isn't right. Available drivers: DBM, ExampleP, File, Gofer, Oracle, Proxy, SQLite, Sponge, my at ./check_dbmirroring.pl line 52 [root@segment-119-227 libexec]# Rgds Srini



Works well after some config
by CircaLucid, May 31, 2015

My config on Ubuntu 12.04.5 LTS x86. I had to create a SQL Server authentication login. wget "http://exchange.nagios.org/components/com_mtree/attachment.php?link_id=493&cf_id=24" -O /usr/lib/nagios/plugins/check_dbmirroring.pl chmod 755 /usr/lib/nagios/plugins/check_dbmirroring.pl apt-get install libdbd-sybase-perl nano /etc/nagios3/resource.cfg # MS SQL Server user/password $USER7$= $USER8$= nano /etc/nagios3/commands.cfg define command{ command_name check_dbmirroring command_line $USER1$/check_dbmirroring.pl -H $HOSTADDRESS$ -d $ARG1$ -u $USER7$ -p $USER8$ } nano /etc/nagios3/conf.d/sql4.cfg define service { host_name sql4 service_description ActivityLog Mirroring check_command check_dbmirroring!ActivityLog use generic-service }



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4.5 (2)
Favorites
0
Views
116,774