drop database gets errors
Posted in 2009
A user new to IDS 11.50 on Windows couldn't drop a development database, getting errors 425/107 (database locked by another session). Replies explained the database is locked while any session is connected: use onstat -g sql to find sessions and onmode -z to kill them, or go quiescent (onmode -u/-s) or restart single-user (oninit -j) before dropping. Art Kagel noted your own connection can be the culprit, suggesting 'dbaccess - -' so you're attached to the instance but no database. The poster resolved it with onmode -s, then onmode -m, then dropped the database.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Platform-Specific Issues
I am new to IDS 11.50.TC1 on Windows Server 2003 R2 from SE on NCR MP-RAS. I am trying to drop a database that we are using for development to load a new copy and I get errors 425 and 107. I don't see how anyone else could have locked records in the database. Is there a way to unlock the database without restarting the IDS server?
Hi,
the database itself is locked if there is a session connected to it.
Onstat -g sql shows sessions connected to the database
Stop the application(s) or ask users to disconnect from the database.
OR:
Use onmode -z <session-id> to kill the sessions.
Regards,
Andreas
-------------------------------------------
SPAR Österreichische Warenhandels-AG
Hauptzentrale
A - 5015 Salzburg, Europastrasse 3
FN 34170 a
Tel: +43 662 4470 24223
Mobile: +43 664 6259575
E-Mail: Andreas.KUTSCHE@spar.at
Internet: http://www.spar.at
Wichtiger Hinweis: Der Inhalt dieser E-Mail kann vertrauliche und rechtlich
geschützte Informationen, insbesondere Betriebs- oder Geschäftsgeheimnisse,
enthalten, zu deren Geheimhaltung der Empfänger verpflichtet ist. Die
Informationen in dieser E-Mail sind ausschließlich für den Adressaten
bestimmt. Sollten Sie die E-Mail irrtümlich erhalten haben so ersuchen wir
Sie, die Nachricht von Ihrem System zu löschen und sich mit uns in Verbindung
zu setzen.
Über das Internet versandte E-Mails können leicht manipuliert oder unter
fremdem Namen erstellt werden. Daher schließen wir die rechtliche
Verbindlichkeit der in dieser Nachricht enthaltenen Informationen aus. Der
Inhalt der E-Mail ist nur rechtsverbindlich, wenn er von uns schriftlich
bestätigt und gezeichnet wird.
Sollte trotz der von uns verwendeten Virus-Schutzprogramme durch die Zusendung
von E-Mails ein Virus in Ihre Systeme gelangen, haften wir nicht für evtl.
hieraus entstehende Schäden.
Wir danken für Ihr Verständnis.
Important notice: The contents of this e-mail may contain confidential and
legally protected information that is in particular related to operational and
trade secrets, which the recipient is obliged to treat as confidential. The
information in this e-mail is made available exclusively for use by the
addressee. In the event that the e-mail may have been sent to you in error, we
would ask you to kindly delete this communication from your system and to
contact us.
E-mails sent via the Internet can be easily manipulated or sent out under
someone else's name. We therefore do not accept legal liability for the
information contained in this communication. The contents of the e-mail are
only legally binding if they have been confirmed and signed by us in writing.
If, in spite of our using Antivirus protection software, a virus may have
penetrated your system through the sending of this e-mail, we do not accept
liability for any damage that may possibly arise as a result of this.
We trust that you appreciate our position.
-------------------------------------------
-----Ursprüngliche Nachricht-----
Von: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] Im Auftrag von TOM
LOCKE
Gesendet: Mittwoch, 1. April 2009 21:18
An: ids@iiug.org
Betreff: drop database gets errors [15392]
I am new to IDS 11.50.TC1 on Windows Server 2003 R2 from SE on NCR MP-RAS.
I am trying to drop a database that we are using for development to load a new
copy and I get errors 425 and 107.
I don't see how anyone else could have locked records in the database. Is
there a way to unlock the database without restarting the IDS server?
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
onstat -g sql shows this:
IBM Informix Dynamic Server Version 11.50.TC1 -- On-Line -- Up 12 days
20:31:15 -- 86400 Kbytes
Sess SQL Current Iso Lock SQL ISAM F.E.
Id Stmt type Database Lvl Mode ERR ERR Vers Explain
18 sysadmin DR Wait 5 0 0 - Off
17 sysadmin DR Wait 5 0 0 - Off
16 sysadmin DR Wait 5 0 0 - Off
This is totally a development system and there are no users doing anything at
this time.
Tom,
If it is just a development -- then I guess you can try different things to
get what you want (dropping a database). Perhaps there is something still
connecting to the database that you don't see. In any way, try this:
onmode -u
this will change to quiescent mode and kill all attached sessions,
then you can drop the database.
or shutdown the database:
onmode -kythen oninit -j
to bring it to in single-user mode, you can drop the database, then bring it
to online by:
onmode -m
Let us know if this works
Kern --
________________________________
From: TOM LOCKE <tomlocke@countyofplumas.com>
To: ids@iiug.org
Sent: Wednesday, April 1, 2009 3:17:41 PM
Subject: drop database gets errors [15392]
I am new to IDS 11.50.TC1 on Windows Server 2003 R2 from SE on NCR MP-RAS.
I am trying to drop a database that we are using for development to load a new
copy and I get errors 425 and 107.
I don't see how anyone else could have locked records in the database. Is
there a way to unlock the database without restarting the IDS server?
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
I did an onmode -s to go to quiescent mode gracefully and whatever was using
the database seemed to stop. I then used onmode -m and then dropped the
database.
Someone is connected to that database. Is it possible it is your own
session? You cannot drop a database that you are connected to. Do the
following and see what happens:
dbaccess - -
drop database <mydatabase>;
That should work. In this way you will be connected to the instance but to
no database at all when you issue the drop command.
Art
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
On Wed, Apr 1, 2009 at 3:17 PM, TOM LOCKE <tomlocke@countyofplumas.com>wrote:
> I am new to IDS 11.50.TC1 on Windows Server 2003 R2 from SE on NCR MP-RAS.
>
> I am trying to drop a database that we are using for development to load a
> new
> copy and I get errors 425 and 107.
>
> I don't see how anyone else could have locked records in the database. Is
> there a way to unlock the database without restarting the IDS server?
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001636163eb509b981046685af51
Related threads
- Posting from the Informix-list
- Migrating from IDS 9.40.UC6 to 11.50.UC3
- Ip for a network session
- questions onstat -g