Forum Moderators: DixonJones

Message Too Old, No Replies

Webtrends mySQL database corrupt?

How to fix...

         

mattglet

2:37 pm on Aug 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I had a power outage, which caused my Webtrends log server to shut down unexpectedly (yes, I have learned my lesson). This has caused (I think?) the mySQL database to become corrupt.

Symptoms:
I try to add an event to the scheduler, but it doesn't go in.

Can anyone provide some pointers as how to verify the DB is working correctly, or a reason why I can't add anything to the scheduler?

Also, I just noticed that WTRS.exe is not running, which I'm pretty sure it's supposed to be? When I try to run it manually, I get an error saying it can't locate the wtlicensemanager.dll file (I have the file, it's just not located in the directory it's looking in).

nkad05

2:57 pm on Aug 8, 2005 (gmt 0)

10+ Year Member



If your database was setup using MyISAM tables, then you will need to run myisamchk [http://dev.mysql.com/doc/mysql/en/corrupted-myisam-tables.html]

If you were using the InnoDb storage engine, tables undergo an automatic diagnostic/repair when mysql re-starts if using the innodb_force_recovery option in your config.

casimir1234

3:14 pm on Aug 9, 2005 (gmt 0)

10+ Year Member



cgrantski hit it spot on with this post(below)..I too have to do this all the time..

Regarding your license file -first try putting the file where WebTrends is looking. If that does not work try the webtrends knowledge base. Maybe you could crack open an ini file and alter the path...Also always remember to restart the webservices before you do anything.

cgrantski:
you could try a general mysql repair to your main db files: (these are lifted from WT KB articles)
mysqlcheck.exe -r --databases wt_sched -u Administrator -p

mysqlcheck.exe -r --databases wtmaster -u Administrator -p

where "Administrator" is your mysql username of course

also this:

mysql –u Administrator –p
use wtmaster
repair table wt_servicestatus:
exit

These are done from the mysql/bin folder

afterwards restart the mysql and scheduler services

mattglet

3:10 pm on Aug 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



mysql –u Administrator –p
use wtmaster
repair table wt_servicestatus:
exit

I'm not entirely sure what this is... is each line a different command via the command line interface?

cgrantski

3:43 pm on Aug 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, that's it.

mattglet

4:04 pm on Aug 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




mysql> use wtmaster
Database changed
mysql> repair table wt_servicestatus:
->

Excuse my ignorance, but how long does the repair take? As you can see, after I submitted the command, all I got was "->". Is this ok?

I've tried the mysqlcheck.exe tools as well, I got "OK" for everything. Things are still not working.

cgrantski

11:09 pm on Aug 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



the repair takes a few seconds and you get a huge list of OK things. If you didn't, you might have copied the command wrong, or you might be in the wrong folder, etc. Try again.

This is only two of all the possible tables to repair, but it's the two most common ones where things happen. If there's still a problem, you can try this:

mysql –u Administrator –p
(Press enter it prompts for password)

use wtmaster <enter>
repair table wt_servicestatus: <enter>
exit

What will work for you depends on what's wrong.

But in general for the problem you're having I reboot the server(s) and when they come back up the scheduler is working. I assume you checked Services in control panel to make sure scheduler is running?

There's also an issue with affinity tracking and pipelining that affects scheduler, but not usually all of a sudden like you are seeing.

mattglet

1:41 pm on Aug 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've given up. I'm reinstalling.

Is there anything I can do/back up that will help me get back on the ground quicker?

i.e.
My analysis data?
My Profile settings?

matthewharper

7:32 pm on Aug 12, 2005 (gmt 0)

10+ Year Member



What command prompt do you type the repair commands into?

Thank you,
M

cgrantski

8:25 pm on Aug 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you have a normal installation location:

C:\Program Files\WebTrends\modules\common\database\mysql\bin>

.... where, in the instructions a few responses above, it says "mysql\bin". Your own installation may have the folder pair \mysql\bin\ in a different path.

matthewharper

8:34 pm on Aug 12, 2005 (gmt 0)

10+ Year Member



I was able to run all of the above command line tips but my scheduler is still stuck. any ideas?