0

I am trying to load test a MS SQL Server database using some typical user interactions. The front end uses a bespoke desktop application and doesn't lend itself to traffic capture, hence decided to create trace files from SQL Server Profiler.

As it turns out, a small pan on a GIS application generates a lot of traffic so what I wanted to do was replay the entire two-second recording as-is (preferably without supplying 'Parameter values' or 'Parameter types' in the JDBC Request Sampler).

My JDBC Connection config is set up and JDBC Request has following values:

Variable name of pool... = mydatabase

Query Type = 'Callable Statement'

Query: ${__FileToString(C:\AutomationSrc\JMeter\Testsql.txt)}

(My trace file is around 2000 lines, hence external file preferred).

The request body, calling the trace, looks like this:

[Callable Statement] declare @p1 int set @p1=66 exec sp_prepexec @p1 output,NULL,N'SELECT table_name, time_last_modified FROM SDE.sde.SDE_tables_modified' select @p1 go exec sp_unprepare 66 go declare @p1 int set @p1=67 exec sp_prepexec @p1 output,N'@P1 bigint',N'SELECT lineage_name, time_last_modified FROM SDE.sde.SDE_lineages_modified WHERE lineage_name = @P1',-1 select @p1 go exec sp_unprepare 67 go declare @p1 int set @p1=68 exec sp_prepexec @p1 output,N'@P1 bigint',N'SELECT lineage_name, time_last_modified FROM SDE.sde.SDE_lineages_modified WHERE lineage_name = @P1 OR lineage_name = -1 ',10723135

etc etc (around 2000 rows total)

The Response Message however is "com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 'go'."

Unsure where to go next - is it possible to run stored procedures in such a format? Parameter values and types are declared within the trace file but can JMeter read them?

Many thanks Dan

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.