Author |
|
k2zs Senior Member
Joined: October 22 2009 Location: United States
Online Status: Offline Posts: 113
|
Posted: July 04 2010 at 11:11 | IP Logged
|
|
|
Hello,
I ran into a problem while trying to trim my event log. Unfortunately I haven't done it sooner and the log goes back to December 2009, not sure if that's the problem.
When I try using the command:
ph_trimeventlog ( 0 ) or ph_trimeventlog ( 1 ), or ph_trimeventlog ( )
I get this in the event log:
An error occurred while trimming the eventlog table.
SQLSTATE = S1000
[Sybase][ODBC Driver][Adaptive Server Anywhere]General error: Unable to find in index 'eventlog' for table 'eventlog'
Is my database corrupt?
__________________ Scott, K2ZS
Home Automation Ideas
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: July 04 2010 at 11:24 | IP Logged
|
|
|
Long is bad. You might try ph_exporteventlog to get around the problem.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
k2zs Senior Member
Joined: October 22 2009 Location: United States
Online Status: Offline Posts: 113
|
Posted: July 04 2010 at 11:34 | IP Logged
|
|
|
ok, I'll try that Pete, Would the date/time format be like this:
2009-12-3 13:00:00
to represent December 3rd 2009 at 1:00 PM
That is my first event in the log...
Scott
__________________ Scott, K2ZS
Home Automation Ideas
|
Back to Top |
|
|
k2zs Senior Member
Joined: October 22 2009 Location: United States
Online Status: Offline Posts: 113
|
Posted: July 04 2010 at 11:39 | IP Logged
|
|
|
I just tried this:
ph_exporteventlog ( 2009-12-26 13:00:00, 2010-07-04 11:40:00,1, c:\phevents.txt,0, 1 )
and it evaluated to !.
__________________ Scott, K2ZS
Home Automation Ideas
|
Back to Top |
|
|
k2zs Senior Member
Joined: October 22 2009 Location: United States
Online Status: Offline Posts: 113
|
Posted: July 04 2010 at 11:44 | IP Logged
|
|
|
ok... I made the file name a string and it evaluated to a -4 so it still is having an issue trimming the event log.
__________________ Scott, K2ZS
Home Automation Ideas
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: July 04 2010 at 11:44 | IP Logged
|
|
|
I haven’t tried it yet but I would think you need to use relativedate ( date, n )
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
k2zs Senior Member
Joined: October 22 2009 Location: United States
Online Status: Offline Posts: 113
|
Posted: July 04 2010 at 11:45 | IP Logged
|
|
|
BeachBum wrote:
I haven’t tried it yet but I would think you need to use relativedate ( date, n ) |
|
|
Not sure what that means, can you show me?
__________________ Scott, K2ZS
Home Automation Ideas
|
Back to Top |
|
|
k2zs Senior Member
Joined: October 22 2009 Location: United States
Online Status: Offline Posts: 113
|
Posted: July 04 2010 at 11:49 | IP Logged
|
|
|
I found that it did create the event log file as directed
__________________ Scott, K2ZS
Home Automation Ideas
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: July 04 2010 at 11:52 | IP Logged
|
|
|
Did it trim it?
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
k2zs Senior Member
Joined: October 22 2009 Location: United States
Online Status: Offline Posts: 113
|
Posted: July 04 2010 at 11:55 | IP Logged
|
|
|
no, it ieturned -4 when run and the event log is still full.
__________________ Scott, K2ZS
Home Automation Ideas
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: July 04 2010 at 12:00 | IP Logged
|
|
|
That doesn’t sound good. You might try phupg.exe from the PH directory and see what that does.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
k2zs Senior Member
Joined: October 22 2009 Location: United States
Online Status: Offline Posts: 113
|
Posted: July 04 2010 at 12:09 | IP Logged
|
|
|
Nice!
That did the trick.
Thanks Pete :)
__________________ Scott, K2ZS
Home Automation Ideas
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: July 04 2010 at 12:14 | IP Logged
|
|
|
Sometimes we get lucky…
__________________ Pete - X10 Oldie
|
Back to Top |
|
|