SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Problem with Sybase Database Profile

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Problem with Sybase Database Profile
Author Message
iqbal



Joined: 16 Sep 2010
Posts: 56

Post Problem with Sybase Database Profile Reply with quote
We are using 24x7 version 4.4 on Windows 2003 server. We created two database profiles, one based on ODBC and other on SYBASE to connect to a Sybase ASE 12.5 server running on a HPUX machine. We tried to run simple SQL jobs such as "SELECT column name FROM table name". The job based on SYBASE profile always returns the error message "Job completed with exit code -1.....". The message is the same even if we change the table name to something which does not exist. On the other hand, if ODBC based profile is used, then, if the SELECT statement is correct, it does not return any error message and if it is not okay (such as non-existing table name) it returns the correct error message.

Now we want to use profile based on SYBASE because it supports commands like "DUMP DATABASE...". How can we make the SYBASE based profile to return correct error messages insted of always returning "Job completed with exit code -1....."?
Thu Oct 21, 2010 5:24 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6502

Post Reply with quote
Please enable the tracing option in Tools/Options menu Log tab and rerun the job. Please paste content of jdbc.log file. If you find any sensitive data in the text like Sybase server name or user / password, please replace this data with asterisks before pasting the text.
Thu Oct 21, 2010 9:08 am View user's profile Send private message
iqbal



Joined: 16 Sep 2010
Posts: 56

Post Reply with quote
Yes, here is the content of jdbc.log. On the 7th line you can see the error reported. This is what we need to be shown as the error message. Instead, the error displayed is "Job completed with exit code -1. This exit code does not satisfy job exit code condition. Job failed."

DriverManager.initialize: jdbc.drivers = null
JDBC DriverManager initialized
registerDriver: driver[className=com.sybase.jdbc3.jdbc.SybDriver,com.sybase.jdbc3.jdbc.SybDriver@1b9240e]
registerDriver: driver[className=com.sybase.jdbc3.jdbc.SybDriver,com.sybase.jdbc3.jdbc.SybDriver@1ee4648]
DriverManager.deregisterDriver: com.sybase.jdbc3.jdbc.SybDriver@1b9240e
SQLException: SQLState(42000) vendor code(208)
com.sybase.jdbc3.jdbc.SybSQLException: xxxxx.dbo.yyyyyyyy not found. Specify owner.objectname or use sp_help to check whether the object exists (sp_help may produce lots of output).

at com.sybase.jdbc3.tds.Tds.a(Unknown Source)
at com.sybase.jdbc3.tds.Tds.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.ResultGetter.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.executeLoop(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.execute(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.execute(Unknown Source)
at com.softtreetech.jscheduler.business.sql.SqlConnector.execute(Unknown Source)
at com.softtreetech.jscheduler.business.runner.SqlScriptJobRunner.executeScript(Unknown Source)
at com.softtreetech.jscheduler.business.runner.SqlScriptJobRunner.runJob(Unknown Source)
at com.softtreetech.jscheduler.business.runner.AbstractJobRunner.runJobIgnoringErrorsIfNeeded(Unknown Source)
at com.softtreetech.jscheduler.business.runner.AbstractJobRunner.startExecution(Unknown Source)
at com.softtreetech.jscheduler.business.runner.AbstractJobRunner.execute(Unknown Source)
at com.softtreetech.jscheduler.business.runner.JobExecutorImpl.execute(Unknown Source)
at com.softtreetech.jscheduler.JSchedulerStarter.startup(Unknown Source)
at com.softtreetech.jscheduler.JSchedulerStarter.main(Unknown Source)

----------------------------------------------------------------------------------------------------------------------------------------------------------

Now, whenever we give a SELECT statement with correct table name, the log shows the following. Again we get SQLException as shown in line number 6 and the error displayed is "Job completed with exit code -1. This exit code does not satisfy job exit code condition. Job failed."

DriverManager.initialize: jdbc.drivers = null
JDBC DriverManager initialized
registerDriver: driver[className=com.sybase.jdbc3.jdbc.SybDriver,com.sybase.jdbc3.jdbc.SybDriver@c2ff5]
registerDriver: driver[className=com.sybase.jdbc3.jdbc.SybDriver,com.sybase.jdbc3.jdbc.SybDriver@20be79]
DriverManager.deregisterDriver: com.sybase.jdbc3.jdbc.SybDriver@c2ff5
java.sql.SQLException: JZ0C0: Connection is already closed.
at com.sybase.jdbc3.jdbc.ErrorMessage.raiseError(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.checkConnection(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.close(Unknown Source)
at com.softtreetech.jscheduler.business.sql.SqlConnector.execute(Unknown Source)
at com.softtreetech.jscheduler.business.runner.SqlScriptJobRunner.executeScript(Unknown Source)
at com.softtreetech.jscheduler.business.runner.SqlScriptJobRunner.runJob(Unknown Source)
at com.softtreetech.jscheduler.business.runner.AbstractJobRunner.runJobIgnoringErrorsIfNeeded(Unknown Source)
at com.softtreetech.jscheduler.business.runner.AbstractJobRunner.startExecution(Unknown Source)
at com.softtreetech.jscheduler.business.runner.AbstractJobRunner.execute(Unknown Source)
at com.softtreetech.jscheduler.business.runner.JobExecutorImpl.execute(Unknown Source)
at com.softtreetech.jscheduler.JSchedulerStarter.startup(Unknown Source)
at com.softtreetech.jscheduler.JSchedulerStarter.main(Unknown Source)
SQLException: SQLState(JZ0C0)
DriverManager.deregisterDriver: com.sybase.jdbc3.jdbc.SybDriver@20be79

DriverManager.deregisterDriver: com.sybase.jdbc3.jdbc.SybDriver@1ee4648


---------------------------------------------------------------------------------------------------------------------------------------------------------

Also, please note that the job type is 'SQL commands'. By default Exit code condition for this job is [ANY]. How can we change this to 0? The wizard for SQL commands type job does not have a place to mention exit code condition.
Fri Oct 22, 2010 12:20 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6502

Post Reply with quote
Hi,

xxxxx.dbo.yyyyyyyy not found. Specify owner.objectname or use sp_help to check whether the object exists, usually indicates one of the following:

1) Wrong database server connection - you are thinking you are connected to server A but indeed you are connected to server B, or connected to a different instance of the database server running on the same physical server (wrong port)
2) User authorization level doesn't allow accessing object xxxxx.dbo.yyyyyyyy


Can you verify the connection and user settings?
Fri Oct 22, 2010 8:52 am View user's profile Send private message
iqbal



Joined: 16 Sep 2010
Posts: 56

Post Reply with quote
1. I believe you did not understand the issue. In order to safeguard information i changed actual database name and table name to xxxxx and yyyy. The exception shown in the jdbc.log is correct. But why it is not shown in the log displayed. The log simply says "Job completed with exit code -1. This exit code does not satisfy job exit code condition. Job failed." However, when I use ODBC profile it shows the error message just like the one shown in jdbc.log.

2. Why are we getting this exception "java.sql.SQLException: JZ0C0: Connection is already closed" whenever the SELECT statement is given with correct name? I mean, it does the job but throws the exception "java.sql.SQLException: JZ0C0: Connection is already closed" so that job is shown as failed with the message "Job completed with exit code -1. This exit code does not satisfy job exit code condition. Job failed."
Fri Oct 22, 2010 9:56 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6502

Post Reply with quote
1. Sorry, I misunderstood the issue. I thought your were concerned with table not found issue. I see now that the issue is with the database specific error message not getting into the job log and only generic error reported in case native Sybase driver is used for connections. I'm really unsure if that is a different behavior or something else. Please try refreshing the log view, perhaps the error has been written to the log but not yet picked by the log viewer.


2. The following message shouldn't cause any issues, this is just an extra precaution step
java.sql.SQLException: JZ0C0: Connection is already closed.
The connection is closed in 2 places after running SQL commands, and somewhere else after that in the driver manager, in case the previous processing aborted on exception.
Fri Oct 22, 2010 7:21 pm View user's profile Send private message
iqbal



Joined: 16 Sep 2010
Posts: 56

Post Reply with quote
1. I refreshed the log again and found that the specific error message is not displayed. If we use odbc then error message is displayed. Do you know any settings somewhere to do for this? For us Sybase profile to work is really really important.

2. The real problem we are facing is that for any job even if it is done without any error we get the job as failed, with exit code -1. How can we rectify this problem?
Fri Oct 22, 2010 11:55 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6502

Post Reply with quote
I'll check if we can reproduce your environment and have the same version of Sybase server and client to test with.
Sat Oct 23, 2010 11:38 am View user's profile Send private message
iqbal



Joined: 16 Sep 2010
Posts: 56

Post Reply with quote
Awaiting a solution from you at the earliest. We want to close this POC at the earliest.
Sat Oct 23, 2010 1:47 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6502

Post Reply with quote
We're still looking for a test environment
Tue Oct 26, 2010 12:57 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6502

Post Reply with quote
Hi,

Version 4.4.322 was released today. This version implements a couple of internal workarounds for dealing with known Sybase JDBC driver compatibility issues. Please give it a tray.
Fri Nov 05, 2010 7:13 pm View user's profile Send private message
iqbal



Joined: 16 Sep 2010
Posts: 56

Post Reply with quote
Sure, we will let you know in a few days.
Tue Nov 09, 2010 4:58 am View user's profile Send private message
waleeed1



Joined: 27 Feb 2016
Posts: 1
Country: American Samoa

Post Reply with quote
We are using 24x7 version 4.4 on Windows 2003 server. We created two database profiles, one based on ODBC and other on SYBASE to connect to a Sybase ASE 12.5 server running on a HPUX machine. We tried to run simple SQL jobs such as "SELECT column name FROM table name". The job based on SYBASE profile always returns the error message "Job completed with exit code -1.....". The message is the same even if we change the table name to something which does not exist. On the other hand, if ODBC based profile is used, then, if the SELECT statement is correct, it does not return any error message and if it is not okay (such as non-existing table name) it returns the correct error message.
_____________________
== www.crosswordchamp.com ==


Last edited by waleeed1 on Thu Mar 03, 2016 1:48 am; edited 1 time in total
Sat Feb 27, 2016 5:54 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6502

Post Reply with quote
Do you get the same error with non SELECT statements, for example, SET NOCOUNT ON
Sat Feb 27, 2016 11:54 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.