Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object in use by who? need to know which connection has an object in use ( ie. stored procedure ) [CORE3805] #4148

Open
firebird-automations opened this issue Mar 31, 2012 · 5 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Robert Gilland (robert.gilland_basx.com.au)

Votes: 1

We are constantly updating our catalogue of stored procedures. However process keeps failing as we get "Object in use" errors. We need to know who has these procedures open so we can disconnect them ( read fire them ) and continue on our merry way. We would like the monitor tables to tell us what nasty people have our objects in use.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Component: Engine [ 10000 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

If this is a common occurance, then it seems appropriate that you use the "shutdown" database function to prevent user connections, while you are applying schema updates.

That way you guarantee that the updates will be successful, without the termination/severance costs related to firing staff and the effort in hiring new staff. ;-)

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

I tend to agree with Sean. If you want to freeze all activity in order to perform a schema upgrade, database shutdown is a proper way to go. Otherwise, monitoring tables will not help much, because as soon as you get a list of "blockers" other sessions may also take a lock on these procedures, so your "kill list" will get outdated immediately.

Also, beware that you need to use WAIT mode for your DML transaction altering the schema, it nearly zeroes a possibility to get "object in use" errors, at least for procedures/triggers.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ] =>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant