Forum Stats

  • 3,853,880 Users
  • 2,264,288 Discussions
  • 7,905,491 Comments

Discussions

Abnormal growth of temporary tablespace after the call of OCI_FetchLast function

user5957941
user5957941 Member Posts: 2
edited Aug 12, 2015 12:19PM in Oracle Call Interface (OCI)

Hi everybody,

We have web services in C# which work with business libraries written in C++.

All of these business librairies use OCILIB to execute SQL statements on a Oracle 11G Standard SE1 database .

We noticed, when we call certain web methods (often with strong select statements), after calling the OCI_FetchLast function, our temporary tablespace grows of 10/20mo and never reduces until we stop or recycle the IIS application pool where the web wervice is installed.

So, if this web method is often called, our temporary tablespace burst (even if it sized up 10GB) in less than 30 minutes of use.

Here is what we do in our function :

(...)

m_st = OCI_StatementCreate(pConnection->m_database);       

if (m_st != NULL)

{

    OCI_SetFetchMode(m_st, OCI_SFM_SCROLLABLE);

    res = ( OCI_ExecuteStmt( m_st, sql ) == 0 ) ? false : true;

    if (res)

    {

        m_PrivRs = OCI_GetResultset(m_st);

        if (m_PrivRs != NULL)

        {

            res = ( OCI_FetchLast( m_PrivRs ) == 0 ) ? false : true;

            if (res)

            {

                m_lCountLine = OCI_GetRowCount(m_PrivRs);

                OCI_FetchFirst(m_PrivRs);

            }

(...)

OCI_StatementFree(m_st);

m_st = NULL;

(...)


We tried to use the OCI_Cleanup function... it works but it's a "little" bit destructive , because after our connection is destroyed.


Is anybody has an idea, an advice, an other way to return easily the number of line?


Thanks for your help !


Ce message a été modifié par : user5957941

Tagged:

Answers

This discussion has been closed.