At a customers site we have to deal with OPEN_CURSORS = 50
In our MIDAS server's datamodule we have quite a lot of TOracleDataSets and a few TOracleQueries. All of these, when opened or executed, take up a lot of cursors. On most occasions we eventually run out of them.
Of course, one way to go is to increase the OPEN_CURSORS parameter.
But when I ran the query
select * from v$open_cursor
I saw a lot of cursors that, on my account, needed not to be there.
To try and decrease the number of cursors I did the following:
1] call ToracleDataSet.CloseAll in the AfterClose event of each TOracleDataSet and also manually/recursively close all connected details datasets. These were not automatically closed !
2] call Close after each TOracleQuery.Execute to release resources.
3] There were also a lot of open cursors for querying constraints in the Oracle dictionary. In the source I saw this was done through TOracleTableInfo.Query and the TOracleDataSet.DMLQuery. These queries were never closed. So I closed them.
After these modifications, I brought the # of cursors down to 10, where it first was more than 50.
Now I have one question:
Can I close the queries in item 3] without any problems ? It seems to work alright.
Please advise.
TIA
Jan Huizinga.
In our MIDAS server's datamodule we have quite a lot of TOracleDataSets and a few TOracleQueries. All of these, when opened or executed, take up a lot of cursors. On most occasions we eventually run out of them.
Of course, one way to go is to increase the OPEN_CURSORS parameter.
But when I ran the query
select * from v$open_cursor
I saw a lot of cursors that, on my account, needed not to be there.
To try and decrease the number of cursors I did the following:
1] call ToracleDataSet.CloseAll in the AfterClose event of each TOracleDataSet and also manually/recursively close all connected details datasets. These were not automatically closed !
2] call Close after each TOracleQuery.Execute to release resources.
3] There were also a lot of open cursors for querying constraints in the Oracle dictionary. In the source I saw this was done through TOracleTableInfo.Query and the TOracleDataSet.DMLQuery. These queries were never closed. So I closed them.
After these modifications, I brought the # of cursors down to 10, where it first was more than 50.
Now I have one question:
Can I close the queries in item 3] without any problems ? It seems to work alright.
Please advise.
TIA
Jan Huizinga.