473,756 Members | 2,383 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Tablespace Offline / Corrupt Quandry

OK, I'm stumped now. I need help restoring a tablespace that has been
marked offline. Here's a little background on the problem:

1) There was a hardware failure that caused the tablespace to become marked
offline: State = 0x4000; Detailed explanation: Offline
2) I tried switching it back online and got this error: DB21034E The
command was processed as an SQL statement because it was not a valid Command
Line Processor command. During SQL processing it returned: SQL0293N Error
accessing a table space container. SQLSTATE=57048
3) I double-checked the raw device assinged to the container and it *does*
have appropriate permissions: bash-2.05$ ls -lt /dev/rdsk/c3t5d2s6
lrwxrwxrwx 1 root root 48 Jul 31 2003 /dev/rdsk/c3t5d2s6 ->
.../../devices/pseudo/rdnexus@3/rdriver@5,2:g,r aw
4) Ran DB2DART to determine the extent of the damage: ERROR: One or more
object tables or DMS tablespaces are corrupt. Some tablespaces may not be
usable.

So basically, I need to restore the tablespace. Our system is not set up
for regular backups, but rather exists as a mirrored setup. The application
that populates the database populates a primary and a standby, so I have a
live database to extract the lost data from to bring over and re-create.

We've repaired the hardware problem, but the problem I'm having now is I
can't drop the tablespace because it is not empty, but I can't drop the
tables in the tablespace because access is not allowed:
bash-2.05$ db2 drop tablespace arc_event_data
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0282N Table space "ARC_EVENT_DATA " cannot be dropped because at least
one
of the tables in it, "ARCSIGHT.ARC_E VENT_MAX", has one or more of its parts
in
another table space. SQLSTATE=55024
bash-2.05$ db2 drop table ARC_EVENT_MAX
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0290N Table space access is not allowed. SQLSTATE=55039

I'm in a pickle here. Any suggestions short of dropping the database and
re-creating?

Amy
One perplexed DBA

Nov 12 '05 #1
8 12779
Amy,

I would restart the database with drop pending tablespaces
- db2 "restart db <dbname> drop pending tablespaces(tbs 1,tbs2,....)"

This will allow you to drop the tablespaces, once the database has been
restarted, as it flags the tablespaces as drop pending.

Cheers,
"Amy DBA" <te********@gma il.NOSPAM.com> wrote in message
news:tf******** ********@newssv r22.news.prodig y.com...
OK, I'm stumped now. I need help restoring a tablespace that has been
marked offline. Here's a little background on the problem:

1) There was a hardware failure that caused the tablespace to become marked offline: State = 0x4000; Detailed explanation: Offline
2) I tried switching it back online and got this error: DB21034E The
command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0293N Error accessing a table space container. SQLSTATE=57048
3) I double-checked the raw device assinged to the container and it *does*
have appropriate permissions: bash-2.05$ ls -lt /dev/rdsk/c3t5d2s6
lrwxrwxrwx 1 root root 48 Jul 31 2003 /dev/rdsk/c3t5d2s6 -> ../../devices/pseudo/rdnexus@3/rdriver@5,2:g,r aw
4) Ran DB2DART to determine the extent of the damage: ERROR: One or more object tables or DMS tablespaces are corrupt. Some tablespaces may not be
usable.

So basically, I need to restore the tablespace. Our system is not set up
for regular backups, but rather exists as a mirrored setup. The application that populates the database populates a primary and a standby, so I have a
live database to extract the lost data from to bring over and re-create.

We've repaired the hardware problem, but the problem I'm having now is I
can't drop the tablespace because it is not empty, but I can't drop the
tables in the tablespace because access is not allowed:
bash-2.05$ db2 drop tablespace arc_event_data
DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned:
SQL0282N Table space "ARC_EVENT_DATA " cannot be dropped because at least
one
of the tables in it, "ARCSIGHT.ARC_E VENT_MAX", has one or more of its parts in
another table space. SQLSTATE=55024
bash-2.05$ db2 drop table ARC_EVENT_MAX
DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned:
SQL0290N Table space access is not allowed. SQLSTATE=55039

I'm in a pickle here. Any suggestions short of dropping the database and
re-creating?

Amy
One perplexed DBA


Nov 12 '05 #2
Great suggestion, Fred, but no bueno. The restart command finished
successfully, but the tablespaces came back up with the same label. I'm
mess around with the bad container for a bit. Last resort, I could just
create a new tablespace and put the tables in there.

Amy
"Lack of planning on your part will constitute an emergency on my part.
That's why I'm the DBA."

"Fred Nurk" <fr****@nospam. yahoo.com.au> wrote in message
news:41******** **************@ news.optusnet.c om.au...
Amy,

I would restart the database with drop pending tablespaces
- db2 "restart db <dbname> drop pending tablespaces(tbs 1,tbs2,....)"

This will allow you to drop the tablespaces, once the database has been
restarted, as it flags the tablespaces as drop pending.

Nov 12 '05 #3
Amy,

Did you just do it just for the bad tablespace? As it is DMS, the are be
dependancies in other DMS tablesapces. ie data in one tablespace and
indexes/blobs in another, this is shown by the SQL0282N you recieved while
trying to drop the tablespace. You need to alter the problem tablespace and
the dependant tablespace(s) as well.

You can check this simply by quering the syscat.tables view.

select tabschema, tabname, tbspace, index_tbspace, long_tbspace
from syscat.tables
where tbspace = "ARC_EVENT_DATA "

Cheers,
"Amy DBA" <te********@gma il.NOSPAM.com> wrote in message
news:Vw******** **********@news svr30.news.prod igy.com...
Great suggestion, Fred, but no bueno. The restart command finished
successfully, but the tablespaces came back up with the same label. I'm
mess around with the bad container for a bit. Last resort, I could just
create a new tablespace and put the tables in there.

Amy
"Lack of planning on your part will constitute an emergency on my part.
That's why I'm the DBA."

"Fred Nurk" <fr****@nospam. yahoo.com.au> wrote in message
news:41******** **************@ news.optusnet.c om.au...
Amy,

I would restart the database with drop pending tablespaces
- db2 "restart db <dbname> drop pending tablespaces(tbs 1,tbs2,....)"

This will allow you to drop the tablespaces, once the database has been
restarted, as it flags the tablespaces as drop pending.


Nov 12 '05 #4
Yes, I tried issuing the command to drop both the DMS and the index
tablespace, with no luck. Maybe it won't drop the tablespace becaue they
aren't pending, but rather offline?

db2 "restart database arcsight drop offline tablespaces
(ARC_EVENT_INDE X,ARC_EVENT_DAT A)"
"Fred Nurk" <fr****@nospam. yahoo.com.au> wrote in message
news:41******** *************** @news.optusnet. com.au...
Amy,

Did you just do it just for the bad tablespace? As it is DMS, the are be

--
**Amy**
"Lack of planning on your part will constitute an emergency on my part.
That's why I'm the DBA."
Nov 12 '05 #5
Ian
Amy DBA wrote:
Yes, I tried issuing the command to drop both the DMS and the index
tablespace, with no luck. Maybe it won't drop the tablespace becaue they
aren't pending, but rather offline?

db2 "restart database arcsight drop offline tablespaces
(ARC_EVENT_INDE X,ARC_EVENT_DAT A)"
"Fred Nurk" <fr****@nospam. yahoo.com.au> wrote in message
news:41******** *************** @news.optusnet. com.au...
Amy,

Did you just do it just for the bad tablespace? As it is DMS, the are be


Amy,

Did you check the permissions on the device? Your earlier post showed
the permissions for the link in /dev/rdsk, but not the actual device
in /devices ?

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 12 '05 #6
Excellent question Ian. What type of permissions do I need? Here's what I
have:

crw-rw---- 1 root root 197, 38 Aug 4 06:00 rdriver@5,2:g,r aw
crw-rw---- 1 arcsight db2grp1 197, 54 Aug 2 00:23 rdriver@5,3:g,r aw

"Ian" <ia*****@mobile audio.com> wrote in message
news:41******** @corp.newsgroup s.com...

Did you check the permissions on the device? Your earlier post showed
the permissions for the link in /dev/rdsk, but not the actual device
in /devices ?

--
**Amy**
"Lack of planning on your part will constitute an emergency on my part.
That's why I'm the DBA."
Nov 12 '05 #7
Ian
Amy DBA wrote:
Excellent question Ian. What type of permissions do I need? Here's what I
have:

crw-rw---- 1 root root 197, 38 Aug 4 06:00 rdriver@5,2:g,r aw
This looks like the problem to me. /dev/rdsk/c3t5d2s6 points to this
device. I assume that your instance owner is 'arcsight' with group
'db2grp1', so with these permissions DB2 won't be able to open the
raw device!

You should set the permissions/ownership per the other device you
listed:
crw-rw---- 1 arcsight db2grp1 197, 54 Aug 2 00:23 rdriver@5,3:g,r aw


Good luck,
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 12 '05 #8
Well I've corrected the permissions, but db2 still won't take the tablespace
offline. Looks like I'm going to have to call db2 support. :(

"Ian" <ia*****@mobile audio.com> wrote in message
news:41******** @corp.newsgroup s.com...
Amy DBA wrote:
Excellent question Ian. What type of permissions do I need? Here's what I have:

crw-rw---- 1 root root 197, 38 Aug 4 06:00 rdriver@5,2:g,r aw


This looks like the problem to me. /dev/rdsk/c3t5d2s6 points to this
device. I assume that your instance owner is 'arcsight' with group
'db2grp1', so with these permissions DB2 won't be able to open the
raw device!

You should set the permissions/ownership per the other device you
listed:
crw-rw---- 1 arcsight db2grp1 197, 54 Aug 2 00:23 rdriver@5,3:g,r aw


Good luck,
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----

Nov 12 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3388
by: valexena | last post by:
I am attempting to take tablespace offline and receiving the following error: ORA-01546- cannot take tablespace offline. What I am doing wrong? -- Posted via http://dbforums.com
7
12671
by: tracy | last post by:
hi, i need advise and guidance from experts. Today, I discovered about 1464 tables created in SYSTEM tablespace and the owner is dev_user. As, i read from ORACLE 101 DBA's it said :'System tablespace is a tablespace user to stored objects belong to user SYS only. if, we do not ensure this, the SYSTEM tablespace will : • Tend to get very fragmented • Have potentially severe contention against it and affect performance
4
14397
by: mairhtin o'feannag | last post by:
Hello, I have a tablespace striped across three drives, call them 1,2,3, just to be clever. :) I allocated a lot more space (DMS) than I should have, since I didn't know a way to estimate the space required (long story, but the original space was in one huge tablespace for all tables ((35 million row tables)) and I needed to segregate them out into separate tablespaces for backup and restore purposes. So I allocated, like 4 million...
4
11180
by: cbielins | last post by:
One of our tablespaces is in an offline state: Tablespace ID = 9 Name = xxx_xxxx Type = Database managed space Contents = Any data State = 0x4000 Detailed explanation: Offline
2
2774
by: Raghava | last post by:
hi all, i was working on DB2 and came across an issue. i.e. can a tablespace be rollforwarded to POINT-IN-TIME? the scenario is as follows: i created a data base and a tablespace in it. i have enabled archival logging (enabled userexit and logretain) and changed log path to a different location. as the log path and logging method was changed, the database was in backup pending state. so, i took a complete offline backup of the
8
2474
by: Raj | last post by:
-Is it possible to recover a tablespace just from a full offline backup and offline incremental backup? If not possible -Can we recover tablespace from Full backup , Wednesdays incremental backup (logs before wednesday are lost) to a point in time on Friday Thanks, Raj
6
3864
by: Konstantin Andreev | last post by:
Hello, all. Let the tablespace SY810T4K is almost full: --------------- db2 =list tablespaces show detail ... Name = SY810T4K Type = Database managed space Contents = Any data Total pages = 332800
4
1878
by: Raj | last post by:
For tablespace level recovery of the db is the following strategy good enough? Sunday's Table - Full offline backup Mondays incremental to tape Monday's offline incremental backup + Monday's logs Tuesday's tape - Tuesday's offline incremental backup + Monday's logs + Tuesday's logs .. .. ..
1
1498
by: nkumarin001 | last post by:
Hi, Sorry i typed a wrong question last time. Please help me in this question. 1) Why we cant bring "temporary tablespace" offline? 2) Why we can bring "tempfile" offline? Regards, Naveen
0
9872
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8713
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7248
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6534
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5142
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3805
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3358
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2666
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.