Reputation: 381
I have below SQL Query which is running fine in SQL Server but its showing error while executing in JMETER
declare @LogSpace table (DatabaseName varchar(255), [Log Size (MB)] float, [Log Space Used (%)] float, [Status] int) insert into @LogSpace execute('dbcc sqlperf(''LogSpace'')') select cast(round([Log Space Used (%)],2,0) as decimal(18,2)) from @LogSpace where DatabaseName = 'PUB_SUB_E2E';
Error: Response message: com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set.
I am using the JDBC Request Query Type as 'SELECT Statement'
Any help would be appreciated.
Upvotes: 1
Views: 968
Reputation: 168002
As per JMeter documentation:
JDBC Request
This sampler lets you send a JDBC Request (an SQL query) to a database.
In your case there are multiple queries of different nature which cannot be executed in a single shot. So the options are in:
Callable Statement
Upvotes: 1