FREQUENTLY ASKED QUESTIONS
<span style='font-size:14.0pt;font-family:Arial'>
=head2 DESCRIPTION
q) <b>i just want to install your stored procedure library... what should i do.</b>
a) just go to the ADMIN_SCRIPTS/procs subdirectory and run <your perl>/configure.pl. The main issue you will in counter with this perl script is your perl setup and your perl library path. If you get missing module messages it is likely that this is the problem. The script uses the GEM library DBIFunc.pm, which is located in the lib directory. The configure.pl script should find it automatically, if it does not, please contact SQL Technologies. configure.pl will prompt you for Server, Login (an sa login) and Password - it will then autodetect if you are on Microsoft SQL Server or Sybase and install the procedures as appropriate.
q) <b>i cant run ``perl configure.pl'' or ``perl gem.pl'' to start the application.</b>
a) Well... thats pretty general... i would love some more information. The first thing to do is run ``perl troubleshoot.pl''.
q) <b>i want my data subdirectory to exist somewhere besides data...</b>
a) use symbolic links. There are currently dependencies on the path to this directory that are not completely flexible - hence the lack of a GemRpt_DATA_DIR configuration variable in configure.cfg. This may change in future versions.
q) <b>i wish to run from unix</b>
a) this is an x windows application from windows - you need to set your display and have an x emulator like exceed running on your pc.
export DISPLAY=10.5.103.51:0.0 /usr/local/bin/perl-5.8.1 gem.pl
q) <b>the screen freezes when running some commands</b>
a) check the background screen, the screen you called the GEM or configure.pl programs from, for output.
the lack of fork() functionality on Windows implies that sometimes there are issues like this. It is
being worked. The solution to this is often to just hit return a few times in the background screen.
q) <b>i get an error that looks like:</b> >> [gem.pl] | Reading XML Configuration File - conf/ >> [gem.pl] | Reading Gem Function Library >> [gem.pl] | Reading Configuration Files no element found at line 1, column 0, byte 0 at G:/dev/lib/XML/Parser.pm line 168 <Hit Enter Key To Continue>
a) well your conf/gem.xml file is incorrect - i would just go to an archive. The archive files are all listed with date extensions in the same directory. The xml configuration file is very touchy about syntax.
q) <b>i get the following message at startup</b> junk after document element at line 6050, column 0, byte 933251 at C:/Perl/site/ lib/XML/Parser.pm line 168 <Hit Enter Key To Continue>
a) you have a screwed up xml configuration file. The above file is screwed up at line 6050. You will need to edit the file and fix it or to roll back to one of the dated backups.
q) <b>why dont some of the perl scripts run stand alone??? </b>
for example i run <i>perl fix_db.pl -AX</i> and i get
Can't locate Repository.pm in @INC (@INC contains:
/apps/sybmon/perl/lib/5.8.4/sun4-solaris-thread-multi
/apps/sybmon/perl/lib/5.8.4
/apps/sybmon/perl/lib/site_perl/5.8.4/sun4-solaris-thread-multi
/apps/sybmon/perl/lib/site_perl/5.8.4
/apps/sybmon/perl/lib/site_perl .) at fix_db.pl line 21.
BEGIN failed--compilation aborted at fix_db.pl line 21.
a) GEM libraries in perl are NOT stored in the normal perl library locations. They are stored in the lib subdirectory of the GEM install. If you installed into /apps/sybmon, you need to run <i>perl -I/apps/sybmon/lib fix_db.pl -A
To get around this problem, we use lines like
use lib qw(/apps/gem/lib);
Which are touched / updated by the GEM Configuration Utility when you run the reformatter option.
q) <b>I keep getting these pop up screens from my scheduled tasks</b>
a) run your windows scheduled tasks using a different account from your interactive account.
q) <b>My windows graphical application gets stuck/frozen</b>
a) this is one of those silly windows'isms. If you have tabbed into the console window and scrolled, the application can get frozen. Of course, all the information (plus more) that you see in this window is actually saved into the log file and can be viewed from there. <b> HIT RETURN IN YOUR CONSOLE WINDOW TO CONTINU&/b;.
q) <b>I have a problem installing... help!!!</b>
a) well... im sorry to hear that... but the right thing to do is report it to sql technologies and to attach the log file to your error report. This file is the application name with a .log extension - so configure.log is the configure.pl log file. This log file does contain lots of details on your install and should hopefully help us solve your problem. Thanks!
q) <b>Rep Server Error Log Contains:</b>
E. 2006/04/25 12:04:04. ERROR #14024 USER(sa) - /execint.c(1038)
Executor does not allow the entered command in the current mode.
a) Sadly, this appears to be intrinsic to the DBD::Sybase library. It must do some under the covers sql commands to verify the connection. This message means a ``normal'' sql command was sent to the rep server - which of course will not handle it because the rep server has no sql language handler. Ignore the messages.
q) i keep getting messages ``no statement executing at ....''
a) this comes from older versions of DBD::Sybase and has been fixed in the latest version. Ignore the messages or upgrade
q) ok i scheduled all these jobs - what if something goes wrong?
a) the console contains the contents of all your log files! Basically the jobs in your crontab all use a similar syntax to :
$ cat TraceRoute.ksh umask 000 /apps/sybmon/perl/bin/perl /apps/sybmon/dev/ADMIN_SCRIPTS/monitoring/tracert.pl -BATCH_ID=TraceRoute $* > /apps/sybmon/dev/data/GEM_BATCHJOB_LOGS/Unix_TraceRoute.log 2> /apps/sybmon/dev/data/batchjob_errors/Unix_TraceRoute.log
Of course this is all customized ... the perl, the file locations etc...
So how do you see what happened!!! just look at the console under ``GEM Logs'' -> ``BATCH FILE EXECUTION LOGS''. Do this every few days to make sure things are working (or whenever you notice a problem.o
| q) when i install the stored procedure library, i get language mismatch messages like : | |
| Msg 2401, Level 11, State 2: | |
| Server 'CALYPSODB': | |
| Character set conversion is not available between client character set 'utf8' | |
| and server character set 'iso_1'. | |
| No conversions will be done. |
a) set the LANG environment variable as appropriate
export LANG=C q) I run GEM under LINUX and get expat errors:
Generic Enterprise Manager Configuration Utility
Copyright (c) 1995-2006 by SQL Technologies
Root Directory: /apps/sybmon/gem
Installation Log File: logs/upgrade_part1.log
>> [configure] | Reading GEM Function Library
>> [func] | Reading Configuration Files - FULL
>> [func] | creating conf/configure.cfg from sample file
...
>> [func] | creating conf/port_monitor.dat from sample file
>> [func] | creating conf/replication.dat from sample file
>> [func] | Reading XML Data - gem.xml
Can't load '/apps/sybmon/lib/auto/XML/Parser/Expat/Expat.so' for module XML::Parser::Expat: libexpat.so.1: cannot open shared object file: No such file or directory at /apps/perl/linux/perl-5.8.2/lib/5.8.2/i686-linux/DynaLoader.pm line 229.
at /apps/sybmon/lib/XML/Parser.pm line 14
Compilation failed in require at /apps/sybmon/lib/XML/Parser.pm line 14.
BEGIN failed--compilation aborted at /apps/sybmon/lib/XML/Parser.pm line 18.
Compilation failed in require at /apps/sybmon/gem/lib/XML/Simple.pm line 224.
/apps/perl/linux/perl-5.8.2/bin/perl -I/apps/sybmon/gem/lib -I/apps/sybmon/lib /apps/sybmon/gem/bin/configure.pl --LOGFILE=logs/upgrade_part2.log --UPGRADE
a) Apparently the default linux /usr/local/lib/libexpat.a is an old version & is missing a symbol resulting in
Can't load '/apps/sybmon/DOWNLOADS/XML-Parser-2.34/blib/arch/auto/XML/Parser/Expat/Expat.so' for module XML::Parser::Expat: /apps/sybmon/DOWNLOADS/XML-Parser-2.34/blib/arch/auto/XML/Parser/Expat/Expat.so: undefined symbol: XML_SetEntityDeclHandler at /apps/perl/linux/perl-5.8.2/lib/5.8.2/i686-linux/DynaLoader.pm line 229.
You will need to build by hand. Download and install the newest libexpat.a which comes from sourceforge at http://sourceforge.net/projects/expat => I downloaded it into /apps/sybmon/DOWNLOADS/expat-2.0.0
You will want to build an all 32 bit solution. I have had no luck making it work if any part is 64 bit.
-- DO THIS ON A 32 BIT MACHINE IF YOU CAN!
mkdir /apps/sybmon/mystuff
cd /apps/sybmon/DOWNLOADS/expat-2.0.0
configure --prefix=/apps/sybmon/mystuff
make
make install
The above will install to /apps/sybmo/mystuff instead of /usr/local/lib. It creates some .a/.so and some .h's.
XML::Parser was also downloaded in /apps/sybmon/DOWNLOADS. The out of the box code does NOT work if you had to rebuild libexpat. It will find the wrong libexpat.so. The bad code does something like:
LD_RUN_PATH=/usr/local/lib; cc -shared -L/usr/local/lib Expat.o -o ... -L /a/b/lib -lexpat
This causes the build to use the original Expat.a in /usr/local/lib
/usr/local/bin/perl-5.8.2 Makefile.PL EXPATLIBPATH=/apps/sybmon/mystuff/lib EXPATINCPATH=/apps/sybmon/mystuff/include PREFIX=/apps/sybmon/lib
vi Makefile */Makefile
- LDDLFLAGS = -shared -L/usr/local/lib
- LDFLAGS = -L/usr/local/lib
+ LDDLFLAGS = -shared
+ LDFLAGS =
make
make test
Note that you need to actually edit two Makefiles. I shortened LD_LIBRARY_PATH too - adding /apps/sybmon/mystuff/lib to it too.
Finally... i needed to move all the stuff in the target directory up to a top level and set
export perlargs=-I/apps/sybmon/lib
q) I have an Installation failure on some kind of _BAK table
> perl upgrade.pl
[ snip ]
TABLE ContainerMap SAVE drop Install Restore
TABLE ContainerOverride SAVE drop Install Restore
TABLE Container_full SAVE drop Install Restore
*****************************************************
Cant Backup Table Event. Event_BAK allready exists! This indicates that a prior release failed. Event_BAK is a backup of Event prior to the upgrade - make sure that the data is ok, dr
op Event_BAK, and rerun this command
*****************************************************
/apps/sybmon/perl/bin/perl -I/apps/sybmon/dev/lib /apps/sybmon/dev/bin/configure.pl --LOGFILE=logs/upgrade_part2.log --UPGRADE
a) You have a prior failed upgrade and a table archive (with the _BAK extension) exists. You are probably ok to just drop the
_BAK table but you would be better served to
insert Event select * from Event_BAK
drop table Event_BAK
q) While installing GEM on a windows system I receive the followingn error
messages during the ppm install DBI :
C:\Workfiles\GEM\gem>ppm PPM - Programmer's Package Manager version 3.2. Copyright (c) 2001 ActiveState Corp. All Rights Reserved. ActiveState is a division of Sophos.
Entering interactive shell. Using Term::ReadLine::Perl as readline library.
Type 'help' to get started.
ppm> install DBI Error: No valid repositories: Error: 500 Can't connect to localhost:80 (connect: Unknown error) Error: 500 Can't connect to localhost:80 (connect: Unknown error) ppm> install DBI Error: No valid repositories: Error: 500 Can't connect to localhost:80 (connect: Unknown error) Error: 500 Can't connect to localhost:80 (connect: Unknown error) ppm>
Any suggestions?
a) I have re-installed active perl and added the DBD::ODBC manually and now it works fine.
q) I have reinstalled a system and PcServiceChecker is complaining about services being down.
a) You need to reinitialize conf/pc_service.dat. This is a good example of a procedure. We know what complains. Its the Batch PcServiceChecker.ksh. So we run it : Here is my session
[G:/dev/win32_batch_scripts/interactive] Win32ServiceCheckerInit.ksh --HELP
Unknown option: help
Bad Parameter List Bad file descriptor
Usage: pc_service.pl - show all nt services
--OUTFILE=outfile - save results to outfile
--DEBUG
--SYSTEMS=[system,system]
if system=ALL will work on all systems in cfg file
if system=Local will work on local system
--ERRORLOG=errorlog - errorlog
--SERVICE=service - show services matching
--PATERN=patern - show services matching patern
--EXCLUDE_PAT=patern - exclude services matching patern
--RUNSTATE=runstate - show services with state matching patern
--ACTION=action - START|STOP|SNAPSHOT|VALIDATE
if action is SNAPSHOT then a snapshot is taken
if action is VALIDATE then a validate vs snapshot
many of the above can take csv list as an arg
[G:/dev/win32_batch_scripts/interactive] cat PcServiceCheckerInit.ksh
C:/perl/bin/perl.exe //samba666/sybmon/dev/ADMIN_SCRIPTS/bin/pc_service.pl --ACTION=SNAPSHOT $*
[G:/dev/win32_batch_scripts/interactive] PcServiceCheckerInit.ksh --SYSTEMS=WIN32_SERVER1
Saving Snapshot into //samba666/sybmon/dev/conf/pc_service.dat
Deleting Data For WIN32_SERVER1
Delete Heartbeat where monitor_program='PcServiceChecker' and system='WIN32_SERVER1'
44 services saved for WIN32_SERVER1
[G:/dev/win32_batch_scripts/interactive]
If we now compare pc_service.dat with a saved version, we see only the services for WIN32_SERVER1 have been replaced.
PROCESS NOTES
The following describes the major processes involved within the GEM system
The following batches read event log info and store the results in the database. After storing the results, they run the script UpdateBackupStateStaticInfo.pl to fix up static info (like the list of working databases in the system) and then will run a reporting tool Backup_Crosscheck_Report.pl which reads crosscheck.dat and compares the results to the saved values in the BackupState table.
MssqlBackupCrosscheck.ksh
MssqlBackupCrosscheckWeekly.ksh
To collect data initially, we suggest you run the above with --NOALARM so you dont get totally spammed with alarms
about databases you dont care about. Once you do the initial run (with --NOALARM) look at the standard output for
the job and appropriately edit crosscheck.dat to remove any databases for which you dont care about backups and to
appropriately have the system handle/manage your log shipping. By setting up the directives in this config file, you
can inform GEM that systems should be log-shipped and it will intelligently understand that means that tran dumps must
happen on primary and loads happen on secondary and that the database names must match between the systems.
=head2 SYBASE LOG FILE CHECKS
The following Jobs Relate To Fetching Sybase Log Files
| SybErrLogAllRpt.ksh | Generates ``Sybase Error Log - UnFiltered'' |
| SybErrLogFetch.ksh | Fetch The Logs & Generate Console Sybase Error Log Fetch Report |
| SybErrLogSaveAlarms.ksh | Save Alarms From Prefetched Files - Report in ``Sybase Error Log - Recent'' |
| SybErrLogConfig.ksh | Generates The Console Sybase Error Log Configuration Report |
| SybErrLogRpt.ksh | Generates ``Sybase Error Log - Filtered'' |
The best mechanism to approach this process is to look at the Configuration Report and to remove any log files that are irrelevant -> the way we do this is to actually mark the RUN files associated with the log files as bad.
allsrv_query_long.pl --QUERY=select @@SERVERNAME,value,comment from sysconfigures where comment=``procedure cache size'' --TYPE=SYBASE