markneustadt.com

ORA-25408: Can not safely replay call

I have a system at work that imports data from the old system to our new system.  Given that the new system is very object oriented, performing a straight conversion is not really possible.  As such, we have this importer system.

During the imp0rt, I ran into a very strange problem.  While trying to fill a dataset from Oracle, we get the error:

ORA-25408: can not safely replay call

Weird.  Time for some research…

It looks like the ORA-25408 error has to do with some sort of “failover” event at the server.  It seems highly unlikely that this is actually what I’m running into.  However, I do know that our connection to the server farm is sketchy.

I updated the system with a Try/Catch block.  Now, if the dataset fails to fill, the system will sleep for 1 second and try again.  If it continues to fail, I’ll have to look into it further.

ORA-00911: invalid character

What a weird thing…  Here I am coding along with everything happy.  Basically, I’m just writing a utility program that will read records from one table, do a little processing and then write the data to another database.

One of my statements reads like this:

strSelectText = "SELECT * FROM VALID_TERM_TYPE;"

That’s cool… it works just like I would think it would.  Another statement needs some criteria on it.  That statement reads like this:

strSelectText = "SELECT * FROM MJR_PGM WHERE PGM_STATUS='P';"

No problem, right?  Buuzzzzzz….  When I try to execute that statement, I get the following error:

“Oracle.DataAccess.Client.OracleException ORA-00911: invalid character    at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure)at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src) at Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior) at Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) at MajorsImporter.Form1.Button1_Click(Object sender, EventArgs e) in C:\svn\MajorsDB2K8\MajorsImporter\Form1.vb:line 239” “Oracle.DataAccess.Client.OracleException ORA-00911: invalid character    at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure)   at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src)   at Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior)   at Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)   at MajorsImporter.Form1.Button1_Click(Object sender, EventArgs e) in C:\svn\MajorsDB2K8\MajorsImporter\Form1.vb:line 239”

What the heck?!

I examine the statement again and everything looks right.  Maybe I need to use double quotes instead:

strSelectText = "SELECT * FROM MJR_PGM WHERE PGM_STATUS=""P"";"

NOPE.  Arg…. mabye if I escape them like in C or something…:

strSelectText = "SELECT * FROM MJR_PGM WHERE PGM_STATUS=\"P\";"

NOPE.  Double Arg.  I do a little researching and discover that when I add the criteria to the select statement, I have to leave the semi-colon off the end!!

strSelectText = "SELECT * FROM MJR_PGM WHERE PGM_STATUS='P';"

WOW… who would have thought that with no criteria, you the semi-colons are optional, but with criteria they’re forbidden.

Stupid computers…. who needs’em?

Stupid Data Type problems

Why why why… why do all companies have to have their “own” date formats?  I’m trying to insert some records into an Oracle database from a VB.Net application.  The oracle datatype is DATE.

So in my stored procedure call, I try to format the value as a date.
objCommand.Parameters.Add(“iStartDate”, CType(StartDate, Date))
No luck.  I get an error telling me that there’s an invalid character or some such thing.  In order to insert the record I have to format it.
objCommand.Parameters.Add(“iStartDate”, Format(CType(StartDate, Date), “dd-MMM-yyyy”))
Again… not a huge deal.  Just something else to get me cranky.
Scroll To Top