Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDBC Request .sql script file execution #2225

Open
asfimport opened this issue Apr 17, 2009 · 3 comments
Open

JDBC Request .sql script file execution #2225

asfimport opened this issue Apr 17, 2009 · 3 comments

Comments

@asfimport
Copy link
Collaborator

Horatiu Vlad (Bug 47045):
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.

Votes in Bugzilla: 1
OS: Linux

@asfimport
Copy link
Collaborator Author

Sebb (migrated from Bugzilla):
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.

@asfimport
Copy link
Collaborator Author

Horatiu Vlad (migrated from Bugzilla):
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.

Created attachment JDBCSampler_with_Script_QueryType.tar.gz: JDBCSampler with Script Query Type

@asfimport
Copy link
Collaborator Author

Sebb (migrated from Bugzilla):
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant