Bug 47045 - JDBC Request .sql script file execution
Summary: JDBC Request .sql script file execution
Status: NEW
Alias: None
Product: JMeter
Classification: Unclassified
Component: HTTP (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 enhancement with 1 vote (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-17 07:57 UTC by Horatiu Vlad
Modified: 2012-10-24 01:41 UTC (History)
1 user (show)



Attachments
JDBCSampler with Script Query Type (5.68 KB, application/x-gzip)
2009-04-20 07:46 UTC, Horatiu Vlad
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Horatiu Vlad 2009-04-17 07:57:14 UTC
JDBC Request is supporting only SQL queries and no .sql script files. It would be helpful to have a new Query Type: Script that would take a .sql script file path as input.
Comment 1 Sebb 2009-04-17 09:19:03 UTC
What format would the script file take?

How is JMeter to know where the statement boundaries are? 
JDBC does not support multiple queries per statement, as far as I know.

A lot of databases support script files, but as far as I know there is no standard for statement delimiters or indeed for SQL features such as commit, rollback, and set statements.
Comment 2 Horatiu Vlad 2009-04-20 07:46:38 UTC
Created attachment 23514 [details]
JDBCSampler with Script Query Type

I'm using the attached JDBC Sample code that allows Script as Query Type. The for the Query is the script file that was previously created as a DB dump. The only limitation that I have to cope with in my case is the 'client_encoding' that can be set only to 'UNICODE' or not specified at all.
Comment 3 Sebb 2009-04-20 08:16:05 UTC
The script file appears to use

--

as a comment marker, and 

;

at the end of a line to delimit statements.

As far as I know, neither of these are standardadised.
Also, using ";" to delimit statements is unlikely to work in all cases.

So whilst it might work for your particular case, it looks like it will not work for all JBDC implementations.

It's important that JMeter is able to work with all JDBC implementations.