View Single Post

   
  #4 (permalink)  
Old 04-08-2008, 06:18 PM
John Smith
 
Posts: n/a
Default Re: Out of Memory / There is already an object named "X" in the database.

John Smith wrote:
"I have tried

String lsTempQuery1 =
"DROP TABLE tempdb..TMP_TABLE , tempdb..XY, tempdb..FIXING";

// ....

loStatement.addBatch( lsTempQuery1 );
loStatement.addBatch( lsTempQuery2 );
loStatement.addBatch( lsTempQuery3 );
loStatement.addBatch( lsTempQuery4 );

loStatement.executeBatch();
loStatement.clearBatch();

but my program simply hangs with no output. I don't see how the "DROP
TABLE" line (i.e. lsTempQuery1 ) can cause my program to hang. "

I tried:
String lsTempQuery1 =
"DROP TABLE tempdb..FIXING";

and adding lsTempQuery1 to the batch as above.

re-run gives:
com.sybase.jdbc2.jdbc.SybBatchUpdateException: JZ0BE:
BatchUpdateException: Error occurred while executing batch statement:
Cannot drop the table 'tempdb..FIXING', because it doesn't exist in the
system catalogs.

at
com.sybase.jdbc2.jdbc.ErrorMessage.raiseBatchUpdat eException(ErrorMessage.java:698)
at
com.sybase.jdbc2.jdbc.SybStatement.batchLoop(SybSt atement.java:1330)
at
com.sybase.jdbc2.jdbc.SybStatement.sendBatch(SybSt atement.java:1139)
at
com.sybase.jdbc2.jdbc.SybStatement.executeBatch(Sy bStatement.java:1099)
at
com.sybase.jdbc2.jdbc.SybStatement.executeBatch(Sy bStatement.java:950)
at prc1.main(prc1.java:79)
com.sybase.jdbc2.jdbc.SybBatchUpdateException: JZ0BE:
BatchUpdateException: Error occurred while executing batch statement:
Cannot drop the table 'tempdb..FIXING', because it doesn't exist in the
system catalogs.

at
com.sybase.jdbc2.jdbc.ErrorMessage.raiseBatchUpdat eException(ErrorMessage.java:698)
at
com.sybase.jdbc2.jdbc.SybStatement.batchLoop(SybSt atement.java:1330)
at
com.sybase.jdbc2.jdbc.SybStatement.sendBatch(SybSt atement.java:1139)
at
com.sybase.jdbc2.jdbc.SybStatement.executeBatch(Sy bStatement.java:1099)
at
com.sybase.jdbc2.jdbc.SybStatement.executeBatch(Sy bStatement.java:950)
at prc1.main(prc1.java:94)


in other words, if i first drop the table tempdb..FIXING, then i get an
error stating that the table FIXING cannot be DROP since FIXING is not
in the system catalogs. If I do *not* DROP TABLE tempdb..FIXING, then
I get an error stating that
" There is already an object named 'FIXING' in the database."

Reply With Quote