Solved

DROP PROCEDURE fails with SQL0911N  Reason code "68".  SQLSTATE=40001

Posted on 2014-01-16
2
1,517 Views
Last Modified: 2014-01-23
I'm trying to drop a very large, complex stored procedure, which calls other stored procedures. I keep getting a lock error and if fails

DB21034E  The command was processed as an SQL statement because it was not a
valid Command Line Processor command.  During SQL processing it returned:
SQL0911N  The current transaction has been rolled back because of a deadlock
or timeout.  Reason code "68".  SQLSTATE=40001

We're running DB2 v9.7 on AIX.

Why can't I drop the procedure? We plan on recreating the procedure. Should I use "CREATE OR REPLACE PROCEDURE" instead of two discrete steps of DROP then CREATE?

Sorry, I don't deal much with stored procedures and I'm just trying to help out.

Thanks!
0
Comment
Question by:data_bits
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 39786329
yes, if you want to "recreate" anyhow, don't drop it. with the drop, you are loosing all permissions assigned to the procedure, by using the create or replace you will retain any permissions granted to roles/users.
0
 
LVL 25

Accepted Solution

by:
Tomas Helgi Johannsson earned 500 total points
ID: 39790508
Hi!

The reason why you cant drop a stored procedure and are getting -911 error is due to that another application/session is using the procedure.
Use db2top to find the session executing the SP and terminate it. Then you will be able to
drop the procedure.

Regards,
    Tomas Helgi
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question