Archive
Highlighted

Sybase: Rising Column option produces error: "java.sql.SQLException: JZ0SA: Prepared Statement: Input parameter not set, index: 0."

New Member

Issue Description : Configured Sybase to Connect with Splunk and works Fine. While using Rising Column option for the query below we receive this error :

"java.sql.SQLException: JZ0SA: Prepared Statement: Input parameter not set, index: 0." 

SELECT "DBA"."f_Day_ComponentMetrics"."Day", 
"DBA"."f_Day_ComponentMetrics"."Node Name", 
"DBA"."f_Day_ComponentMetrics"."Node Location", 
"DBA"."f_Day_ComponentMetrics"."Node Family", 
"DBA"."f_Day_ComponentMetrics"."Node Availability (avg)", 
"DBA"."f_Day_ComponentMetrics"."Node Availability (min)", 
"DBA"."f_Day_ComponentMetrics"."Node Availability (max)", 
"DBA"."f_Day_ComponentMetrics"."lt_TimeStamp" 
FROM "DBA"."f_Day_ComponentMetrics" WHERE "Node Name" > ? 
ORDER BY "Node Name" ASC 
0 Karma
Highlighted

Re: Sybase: Rising Column option produces error: "java.sql.SQLException: JZ0SA: Prepared Statement: Input parameter not set, index: 0."

Try this
SELECT "DBA"."fDayComponentMetrics"."Day",
"DBA"."fDayComponentMetrics"."Node Name" as Node,
"DBA"."fDayComponentMetrics"."Node Location",
"DBA"."fDayComponentMetrics"."Node Family",
"DBA"."fDayComponentMetrics"."Node Availability (avg)",
"DBA"."fDayComponentMetrics"."Node Availability (min)",
"DBA"."fDayComponentMetrics"."Node Availability (max)",
"DBA"."fDayComponentMetrics"."ltTimeStamp"
FROM "DBA"."f
Day_ComponentMetrics" WHERE Node > ?
ORDER BY Node ASC

0 Karma
Highlighted

Re: Sybase: Rising Column option produces error: "java.sql.SQLException: JZ0SA: Prepared Statement: Input parameter not set, index: 0."

New Member

Stil lsame error

java.sql.SQLException: JZ0SA: Prepared Statement: Input parameter not set, index: 0.

0 Karma
Highlighted

Re: Sybase: Rising Column option produces error: "java.sql.SQLException: JZ0SA: Prepared Statement: Input parameter not set, index: 0."

Ultra Champion

Did you actually set an initial value for the checkpoint?

0 Karma
Highlighted

Re: Sybase: Rising Column option produces error: "java.sql.SQLException: JZ0SA: Prepared Statement: Input parameter not set, index: 0."

@anitaroseline I think the issue is Checkpoint field being null. Did you update the checkpoint value? or is it blank?

0 Karma
Highlighted

Re: Sybase: Rising Column option produces error: "java.sql.SQLException: JZ0SA: Prepared Statement: Input parameter not set, index: 0."

New Member

Correct its blank.Thanks for bringing up.

Please can you advise me what could be set.For SQL inputs i have give Date and time.

But here for Sybase input i entered the same and i get same error.

0 Karma
Highlighted

Re: Sybase: Rising Column option produces error: "java.sql.SQLException: JZ0SA: Prepared Statement: Input parameter not set, index: 0."

Ultra Champion

You selected "Node Name" as the rising column. That doesn't sound like a timestamp field?

So either you need to use a different column, or find a suitable value from that column to use as the initial checkpoint. You could run the query without the WHERE part, to see what value shows up on top.

0 Karma
Highlighted

Re: Sybase: Rising Column option produces error: "java.sql.SQLException: JZ0SA: Prepared Statement: Input parameter not set, index: 0."

New Member

Yeah without WHERE works perfect.I wanted to use rising column here as i wanted to index only when there are some new events.

Date is not supported for Sybase.

0 Karma
Highlighted

Re: Sybase: Rising Column option produces error: "java.sql.SQLException: JZ0SA: Prepared Statement: Input parameter not set, index: 0."

New Member

But one Question per splunk docs, varchar int, float, real,
bigint, number are supported with rising columns.

Hence i do not have proper timestamp filed i choose Node name.

So how could we use them in combination with checkpoint

0 Karma
Highlighted

Re: Sybase: Rising Column option produces error: "java.sql.SQLException: JZ0SA: Prepared Statement: Input parameter not set, index: 0."

Ultra Champion

Yeah, but the Name column is not going to enable you to find new records right? You'll need to find a column that actually increases for newly inserted entries. So either an auto increment row ID column or a column that provides a timestamp of when the respective line was added to the database.

0 Karma