Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
donbonin Absent Member.
Absent Member.
4024 views

execute sql statements from a data file

My DBA can provide me with thousands of sql statements that have actually hit the database - I want to replay these exact statments via SilkPerformer.

I would like to simply pull the statament into a variable then execute it (lets assume a simple "select" sql statament) and let Silk do it's thing.

I can't see a simple way of doing this given the way silk structures it's database scripts where each sql statment is called like a function.

Is there another common approach to doing what i have in mind?

Thanks!

 

0 Likes
5 Replies
Micro Focus Expert
Micro Focus Expert

RE: execute sql statements from a data file

What about having the DBA store those statements as a stored procedure, which you can call from Silk Performer?

0 Likes
donbonin Absent Member.
Absent Member.

RE: execute sql statements from a data file

I want the tool to do the work, not my DBA.  I posted this question to silk support and they too have not come up with a workable suggestion, so don't feel bad!   I just can't fathom that I'm the first to every want to do this....  very unlikely indeed.

0 Likes
ajl2 Absent Member.
Absent Member.

RE: execute sql statements from a data file

I don't know if you are the first - but you certainly aren't the only one! I have a simple select statement that I have declared in my script.

dclsql

 ComplianceCountBefore:

   Select count(compliancestatus)

   INTO *, :v_compliancecount1

   From nss1001p_Compliance;

It seems like in order for this to work, you need to have a "cursors" statement, a db connect statement - and I am not sure what else. Let alone knowing how to call it where I need it in the script.

I haven't ever tried this before, and I've found the example in the Help files to be either a bit confusing or over engineered for what I am trying to accomplish.

There are several example scripts which on my system are located here:

C:\Users\Public\Documents\SilkPerformer 9.0\Samples\Database

Again they seem to be either a bit confusing or over engineered for what I am trying to accomplish. I've tried pulling bits and pieces from them in order to get the SQL in my script working without much luck.

0 Likes
Sujeet1 Absent Member.
Absent Member.

RE: execute sql statements from a data file

Hi,

 

I think you can go with the Silk Performer ‘High Level Interface API’s’  to accomplish what you are looking after..  Check out the documentation how to setup the DSN(Setting High-Level ODBC Options) for the said API’s in BDL script

  

Setting High-Level ODBC Options

Silk > Silk Performer > Silk Performer 9.5 > Silk Performer Workbench > Managing Load Tests > Outlining Projects > Project Profile Settings > Database Settings

 

High-level Interface

Silk > Silk Performer > Silk Performer 9.5 > Benchmark Description Language (BDL) Reference > Database (DBMS) Functions

  

Regards,

Sujeet

0 Likes
Highlighted
donbonin Absent Member.
Absent Member.

RE: execute sql statements from a data file

Three years later and no one has yet to want to execute dynamic sql??

I still have to hard code my SQL in the "dclsql"  at the bottom of the script.

What if I have thousands of different SQLs to execute??  Do you want me to insert thousands of sqls in that section of the script???  Absurd!!

WHY CAN'T I DATA DRIVE A COMPLETE SQL STATEMENT??????  

Will this ever be addressed?

The API stuff was interesting but it has the exact same problem in every case - the SQL you want to execute must reside in the script in the dclsql  section at compile time...  why, why I ask you??

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.