-
How to avoid ORA-29470 when bindin variables to a Cursor on Oracle 11g
I have an Old VB6 Applications that uses Cursors in a process without problem on versions below to 11g on Oracle.
the thing is that the new security features for cursors added on Oracle 11 R1 is affecting me. My application only creates a cursor from VB that only update a table and is done using a PLSQL builder, using the same cursor Once it is created we start to bind the info on that cursor...
package_sql is an Oracle package that only do this: dbms_sql.bind_array(hCursor, sName, aValues);
Here is a code Example of my application:
.
.
.
m_AddOraParam "SQL", ORATYPE_VARCHAR2, "update TABLE set " & sSetFields & " where ID = :ID and " & sFilter
Set p = m_AddOraParam("hc", ORATYPE_SINT, 0, ORAPARM_OUTPUT)
Set PLSQL = New PLSQLBuilder
PLSQL.AddLine "begin"
PLSQL.AddLine " :hc := dbms_sql.open_cursor;"
PLSQL.AddLine " begin"
PLSQL.AddLine " dbms_sql.parse(:hc, :SQL, dbms_sql.NATIVE);"
PLSQL.AddLine " exception"
PLSQL.AddLine " when others then"
PLSQL.AddLine " dbms_sql.close_cursor(:hc);"
PLSQL.AddLine " raise;"
PLSQL.AddLine " end;"
PLSQL.AddLine "end;"
m_ndbPrp.ExecuteSQL PLSQL.Text
m_hcPRDUpdate = p.Value
m_OraParams.Remove "SQL"
m_OraParams.Remove "hc"
End If
m_AddOraParam "hc", ORATYPE_SINT, m_hcPRDUpdate, ORAPARM_INPUT
Set p = m_AddOraParam("RecCount", ORATYPE_SINT, 0, ORAPARM_OUTPUT)
If m_cmdPRDUpdate Is Nothing Then
Set PLSQL = New PLSQLBuilder
PLSQL.AddLine "begin"
PLSQL.AddLine " package_sql.BindNumberArray(:hc, ':ID', :ID);"
PLSQL.AddLine " package_sql.BindDateArray(:hc, ':Period', :Period);"
PLSQL.AddLine " package_sql.BindNumberArray(:hc, ':Hours', :Hours);"
PLSQL.AddLine " :RecCount := dbms_sql.execute(:hc);"
PLSQL.AddLine "end;"
Set m_cmdPRDUpdate = m_CreateOraCmd(PLSQL.Text)'->> ERROR ORA-29470
Else
m_ExecOraCmd m_cmdPRDUpdate
End If
.
.
.
What I'm trying to find out is if someone else know how to relax those security things, or how to workaround it... change the way how my application work imply a lot of things.. that's why I'm looking for another exit the solution
-
Allow me to quote Oracle whey they say "...please consult with Oracle Support Services on steps to relax the security checks" (1)
My suggestion would be to open a SR with Oracle support.
(1) Oracle® Database Readme
11g Release 1 (11.1)
Part Number B28280-10
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
-
I also want to avoid ORA-29470 when bindin variables to a Cursor on Oracle 11g. Any help?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|