The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday 7:30am (PST)
The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday 7:30am (PST)
Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

How to log SQL queries, parameter querylog? (OVSD 4.5 SP20)

Highlighted
Gints Bika1
Super Collector

How to log SQL queries, parameter querylog? (OVSD 4.5 SP20)

Hello,

I am trying to enable SQL queries' logging using parameter /querylog.

I added this parameter in sd_server.bat, then
read ITSM006089 and modified installservice.bat. It didn't work.

Does anyone have enabled logging and can send a fragment of a .bat file?

My version was:
java -cp lib\classloader.jar com.hp.startup.Bootstrap com.hp.ifc.bus.AppServer /querylog
-showconsoleoutput %1 etc.

Or maybe client .bat file should have some kind of parameters?

Thanks in advance
3 REPLIES
Ben Snell
Member

Re: How to log SQL queries, parameter querylog? (OVSD 4.5 SP20)

Hi

Never tried doing this so would not surprise me that it's been broken in one the of SP upgrades.

The SQL is solely from the server to the database - the client does not access the database directly.

As an alternative you can log this at the database level - quite straight forward on both SQL Server and Oracle and there are quite a few articles on the web explaining how to do this.

Regards
Ben
Gints Bika1
Super Collector

Re: How to log SQL queries, parameter querylog? (OVSD 4.5 SP20)

It seems to me that logging using database server will indeed be the right option.

But maybe I've just missed something important, for example in 1 of 4 threads found searching for keyword "querylog" CLIENT parameter /querylog was mentioned.

Or the command line must have some "interesting" detail?
Err_1
Honored Contributor

Re: How to log SQL queries, parameter querylog? (OVSD 4.5 SP20)

Hi,

To start the server with QUERYLOG, you'll need to edit the following file: " \bin\startserver.bat" and add the parameter QUERYLOG like this:

@ECHO OFF
sd_server start /QUERYLOG %1 %2 %3 %4 %5 %6 %7 %8 %9

Then, to start the server, open a command prompt window, cd into \bin directory:
C:\>cd "C:\Program Files\Hewlett-Packard\OpenView\service desk 4.5\server\bin", and call the startserver batch file.



I think that QUERYLOG parameter is case sensitive, so use capital letter as in my example.

Regards,
Randall Barrantes
SW Support Delivery Manager
//Add this to "OnDomLoad" event