Highlighted
Contributor.
Contributor.
585 views

C Function that execute database functions shows as transaction in Analysis

Hi,

I have a TruClient that executes a C function to connect to a database and execute some SQL statement like below:

void cleanDbBuffers()    
{
    
    lr_db_connect("StepName=CONNECT_TO_DB", 
                  "ConnectionString=Data Source={LRP_DS};Initial Catalog={LRP_DB};Integrated Security=false;user id={LRP_DB_USER_ID};password={LRP_DB_PASSWORD};" ,
                  "ConnectionName={LRP_DB}",
                  "ConnectionType=SQL",
                LAST);
    
    lr_db_executeSQLStatement("StepName=DROPCLEANBUFFERS", "ConnectionName={LRP_DB}", "SQLStatement=CHECKPOINT;DBCC DROPCLEANBUFFERS;", "DatasetName=ResultSet", LAST);
    
    lr_db_disconnect("StepName=DISCONNECT_FROM_DB","ConnectionName={LRP_DB}", LAST);
}

The function executed successfully. However, the 3 calls to the database all show up as Transactions in the Analysis Summary Report.  See attached image. Does anyone know if there is any way to disable them from showing up as Transaction?

Thanks!
Jason

0 Likes
3 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: C Function that execute database functions shows as transaction in Analysis

Hi

No, I do not know how to prevent the transactions to happen. But if you set a "Global filter" (File menu) in the analysis session for the Transaction name <> "The three transactionnames" then they also will disappear from the summary.

br /ola


Please mark post as solved if your problems or questions is/are resolved.
If this post was valuable to you, please consider kudo it.

.
0 Likes
Highlighted
Contributor.
Contributor.

Re: C Function that execute database functions shows as transaction in Analysis

Thanks. I figured that.

I was wondering if this can be avoided as the reports are automatically generated and I do not wish to have to manually open up the report and exclude them using global filter.

Regards,
Jason

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: C Function that execute database functions shows as transaction in Analysis

Sorry, I don't know of a solution, but I do have another workaround up the sleve.

You could create an Analysis template with the needed filter and make it default, if you want to lower the manual steps.

br /ola


Please mark post as solved if your problems or questions is/are resolved.
If this post was valuable to you, please consider kudo it.

.
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.