Re: Dropping a dbspace
Posted in 2004
Topics: Storage & Space Management, Server Administration, Logging & Checkpoints
Chariya Peterson wrote:
>
> I have a bad dbspace I wanted to drop (and recreated). But I have some
> problem.
> Here is the output form onstat -d:
>
> 5010c7d8 1 0x20001 1 1 N informix
> dbroot_test3
> 5020dcb0 2 0x20005 2 1 ND informix dbdata
> 5020de00 3 0x2001 3 1 N T informix
> dbtemp01
>
> 5010c928 1 1 0 50000 45561 PO--
> /usr/informix/dev-links/DBROOT_TEST3
> 5021cc50 2 2 1 208000 0 PD--
> /usr/informix/dev-links/DBDATA_TEST3
> 5021cdd0 3 3 1 50000 49947 PO--
> /usr/informix/dev-links/DBTEMP1_TEST3
>
> I tried to drop dbdata, but both onmonitor and onspaces just hang.
> We are using Informix 9.4.
>
> Thanks,
> Chariya
Platform??
What "went bad"?
What error is in the online log when you try and drop it?
What does ls -l /usr/informix/dev-links/DBTEMP1_TEST3 show?
What does ls -L /usr/informix/dev-links/DBTEMP1_TEST3 show?
On the assumption that you have some logical logs, and a bit of physical
log, I wonder how much actual "data" is left in the instance with this
dbspace dbdata marked as down.
If this is a 4k pagesize then you have used nearlt 18 Mb out of the
rootdbspace.
So the onconfig.std has :
PHYSDBS rootdbs # Location (dbspace) of physical log
PHYSFILE 2000 # Physical log file size (Kbytes)
# Logical Log Configuration
LOGFILES 6 # Number of logical log files
LOGSIZE 2000 # Logical log size (Kbytes)
which is 14 Mb, so perhaps you could salvage 2 Mb of data, but that is
probably another logical log!
"TBP@Nospam.Nothere.Co.Uk" wrote:
>
> Chariya Peterson wrote:
>
> >
> > I have a bad dbspace I wanted to drop (and recreated). But I have some
> > problem.
> > Here is the output form onstat -d:
> >
> > 5010c7d8 1 0x20001 1 1 N informix
> > dbroot_test3
> > 5020dcb0 2 0x20005 2 1 ND informix dbdata
> > 5020de00 3 0x2001 3 1 N T informix
> > dbtemp01
> >
> > 5010c928 1 1 0 50000 45561 PO--
> > /usr/informix/dev-links/DBROOT_TEST3
> > 5021cc50 2 2 1 208000 0 PD--
> > /usr/informix/dev-links/DBDATA_TEST3
> > 5021cdd0 3 3 1 50000 49947 PO--
> > /usr/informix/dev-links/DBTEMP1_TEST3
> >
> > I tried to drop dbdata, but both onmonitor and onspaces just hang.
> > We are using Informix 9.4.
> >
> > Thanks,
> > Chariya
>
> Platform??
AIX RS6000
> What "went bad"?
The DBDATA dbspace is down (with flag = ND). I wanted to drop and
import the database from another server but have to get the dbspace
online (or drop/recreate) first.
Here is the error messages from onmode/oninit
----
informix@saatest3 $ onmode -ky
Warning: checkpoint appears to be stalled and is not complete.
Continuing shutdown
----
informix@saatest3 $
informix@saatest3 $ oninit
SENDER IS NULL NO MAIL WILL BE SENT
oninit: Cannot open chunk '/usr/informix/dev-links/DBDATA_TEST3'. errno
= 2
----
> What error is in the online log when you try and drop it?
16:19:04 Dataskip is now OFF for all dbspaces
16:19:04 Checkpoint blocked by down space, waiting for override orshutdown
16:20:00 (4) connection rejected - no calls allowed for sqlexec
16:20:00 listener-thread: err = -27002: oserr = 0: errstr = : Noconnections are allowed in Dynamic Server quiescent mode.
----
> What does ls -l /usr/informix/dev-links/DBTEMP1_TEST3 show?
Seems normal.
ls -l
lrwxrwxrwx 1 informix informix 19 Apr 14 2003
/usr/informix/dev-links/DBDATA_TEST3@ -> /dev/dbdata_testdb
> What does ls -L /usr/informix/dev-links/DBDATA1_TEST3 show?
ls -L
/dev/dbdata_testdb
>
> On the assumption that you have some logical logs, and a bit of physical
> log, I wonder how much actual "data" is left in the instance with this
> dbspace dbdata marked as down.
There is no need to recover the data. I simply want to drop and
recreate this dbspace (DBDATA). Then import the database.
Chariya
Chariya Peterson wrote:
>
> "TBP@Nospam.Nothere.Co.Uk" wrote:
>
>>Chariya Peterson wrote:
>>
>>
>>>I have a bad dbspace I wanted to drop (and recreated). But I have some
>>>problem.
>>>Here is the output form onstat -d:
>>>
>>>5010c7d8 1 0x20001 1 1 N informix
>>>dbroot_test3
>>>5020dcb0 2 0x20005 2 1 ND informix dbdata
>>>5020de00 3 0x2001 3 1 N T informix
>>>dbtemp01
>>>
>>>5010c928 1 1 0 50000 45561 PO--
>>>/usr/informix/dev-links/DBROOT_TEST3
>>>5021cc50 2 2 1 208000 0 PD--
>>>/usr/informix/dev-links/DBDATA_TEST3
>>>5021cdd0 3 3 1 50000 49947 PO--
>>>/usr/informix/dev-links/DBTEMP1_TEST3
>>>
>>>I tried to drop dbdata, but both onmonitor and onspaces just hang.
>>>We are using Informix 9.4.
>>>
>>>Thanks,
>>>Chariya
>>
>>Platform??
>
>
> AIX RS6000
>
>
>
>>What "went bad"?
>
> The DBDATA dbspace is down (with flag = ND). I wanted to drop and
> import the database from another server but have to get the dbspace
> online (or drop/recreate) first.
>
>
> Here is the error messages from onmode/oninit
> ----
> informix@saatest3 $ onmode -ky
> Warning: checkpoint appears to be stalled and is not complete.
> Continuing shutdown
> ----
> informix@saatest3 $
> informix@saatest3 $ oninit
> SENDER IS NULL NO MAIL WILL BE SENT
> oninit: Cannot open chunk '/usr/informix/dev-links/DBDATA_TEST3'. errno
> = 2
> ----
#define ENOENT 2 /* No such file or directory */
>
>>What error is in the online log when you try and drop it?
>
> 16:19:04 Dataskip is now OFF for all dbspaces
> 16:19:04 Checkpoint blocked by down space, waiting for override or> shutdown
>>What does ls -l /usr/informix/dev-links/DBTEMP1_TEST3 show?
>
> Seems normal.
> ls -l
> lrwxrwxrwx 1 informix informix 19 Apr 14 2003
> /usr/informix/dev-links/DBDATA_TEST3@ -> /dev/dbdata_testdb
>
>>What does ls -L /usr/informix/dev-links/DBDATA1_TEST3 show?
>
> ls -L
> /dev/dbdata_testdb
>
>
>>On the assumption that you have some logical logs, and a bit of physical
>>log, I wonder how much actual "data" is left in the instance with this
>>dbspace dbdata marked as down.
>
>
> There is no need to recover the data. I simply want to drop and
> recreate this dbspace (DBDATA). Then import the database.
>
> Chariya
Humm, well, err, oh, so, re-create the instance from scratch ;)
Also,
#define ENOENT 2 /* No such file or directory */
so make sure that /usr/informix/dev-links/DBDATA_TEST3@ ->
/dev/dbdata_testdb actually points to a bit of useable disk.
Try :
dd if=/usr/informix/dev-links/DBDATA_TEST3 bs=4k count=1 of=/dev/null
Related threads
- IDS 10 table-level restore
- Informix Development Webinar December 11, 2007
- ontape -p/r with changed ROOTPATH
- Migrate from HP PA-RISC to HP ITANIUM by ontape