473,666 Members | 2,258 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System Error - Rebuilding tablespace (DB2 v9)

Env: DB2 v9.1 Server / Win XP. DB is enabled for Archival Logging.

Was playing around with rebuild tablespace feature. My database 'CARD'
has tablespace named t1,t2,t3.

Taken couple of individual tablespace backup as below

C:\dir1>db2 "backup db card tablespace(sysc atspace,userspa ce1,t1)"
Backup successful. The timestamp for this backup image is :
20070402114435

C:\dir1>db2 "backup db card tablespace(sysc atspace,t2)"
Backup successful. The timestamp for this backup image is :
20070402114448

Then intentionally I dropped the tablespace t1,t2 to restore it from
backup.

Then I tried to restore but it fails
C:\dir1>db2 "restore db card rebuild with
tablespace(sysc atspace,userspa ce1,t1) taken at 20070
402114435"
SQL2561W Warning! Rebuilding a database from a table space image or
using a
subset of table spaces. The target database will be overwritten. The
restore
utility also reports the following sqlcode "2539".
Do you want to continue ? (y/n) y
DB20000I The RESTORE DATABASE command completed successfully.

C:\dir1>db2 rollforward db card to end of logs
SQL1042C An unexpected system error occurred. SQLSTATE=58004

Please advice.

Thanks,
Sam

Apr 2 '07 #1
1 4540
If you hadn't received this error, your database would be in very big
trouble.

You dropped two tablespaces; t1 and t2.

You restored two tablespaces; syscatspace and t1.

You then tried to rollforward the logs for syscatspace, userspace1,
t1,t2,t3.

You can't rollforward all of the tablespaces, only those you are
restoring. See the "ON TABLESPACE" clause of the ROLLFORWARD command.

You have two additional problems. You never restored t2, and, if you
rollforward to the end of the logs; you will include the drop tablespace
commands that were executed. You'd be better off testing this type of
recovery by deleting the physical data sets for the tablespaces and
recovering from there.

Rollforward to a point in time just before you dropped the tablespaces
may leave you with an inconsistent catalog because changes to it after
the drop tablespace commands will no longer exist. Point in time
recoveries also require that a new backup be immediately made to allow
future recoveries.

Phil Sherman
Sam Durai wrote:
Env: DB2 v9.1 Server / Win XP. DB is enabled for Archival Logging.

Was playing around with rebuild tablespace feature. My database 'CARD'
has tablespace named t1,t2,t3.

Taken couple of individual tablespace backup as below

C:\dir1>db2 "backup db card tablespace(sysc atspace,userspa ce1,t1)"
Backup successful. The timestamp for this backup image is :
20070402114435

C:\dir1>db2 "backup db card tablespace(sysc atspace,t2)"
Backup successful. The timestamp for this backup image is :
20070402114448

Then intentionally I dropped the tablespace t1,t2 to restore it from
backup.

Then I tried to restore but it fails
C:\dir1>db2 "restore db card rebuild with
tablespace(sysc atspace,userspa ce1,t1) taken at 20070
402114435"
SQL2561W Warning! Rebuilding a database from a table space image or
using a
subset of table spaces. The target database will be overwritten. The
restore
utility also reports the following sqlcode "2539".
Do you want to continue ? (y/n) y
DB20000I The RESTORE DATABASE command completed successfully.

C:\dir1>db2 rollforward db card to end of logs
SQL1042C An unexpected system error occurred. SQLSTATE=58004

Please advice.

Thanks,
Sam
Apr 3 '07 #2

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

Similar topics

7
12659
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
6197
by: ScottH | last post by:
I am running 7.2 with fixpack 10a under W2K. I got a backup from someone else in an attempt to debug a data issue. The other person created the database with UTF-8 (codepage 1208), so I created a new database with that codepage, cd to the directory where the backup was located, but the restore failed: db2 => create database MYDB using codeset UTF-8 territory us DB20000I The CREATE DATABASE command completed successfully. db2 =>...
6
5718
by: robert | last post by:
just got out of a "class" on EXPLAIN, from a 390/v6 maven. was told that ACCESSTYPE = 'R' in the plan_table meant a TableSpace scan. hmmmm. next step up (or down, depending on your outlook) wasn't a Table Scan. thought this might be a MainFrame thing; but a look at DB2Info on my UDB 7.2 server showed the same thing. this is truly puzzling. is there an explanation of EXPLAIN which describes how to get a Table Scan???? or are we...
7
4255
by: JS | last post by:
Can somebody explain how to get the tablespace out of quiesce mode? I am executing on each node of my EEE Win2K system: db2 quiesece tablespace for table schema.tablename RESET I get the confirmation that the SQL command has executed successfully on each node. But, it doesnt seem to do anything because when I try and query the table, I get "TABLE SPACE ACCESS NOT ALLOWED" This all resulted from trying to execute a load with the...
4
2541
by: WantedToBeDBA | last post by:
Hi Friends, I am running a stored procedure in Windows 2000 box (version 8.1.0) and i am getting following error in db2diag.log repeatly. The scenerio is as follows. I am inserting 55000 records(getting it from a select statement) into an temporary table which takes around 22.5 hours. When i execute the query seprately, it talkes only 3 min to complete the exection. The tablespace i am using for temporary table is DMS and it has lots of...
6
5150
by: Jurgen Haan | last post by:
Hi hi, I'm trying to perform a redirected restore, but I get a nice error returned. Does anyone have an idea of what the -5130 errorcode means? db2inst@ELMO:~> db2 restore db efproddb into testprod redirect SQL1277N Restore has detected that one or more table space containers are inaccessible, or has set their state to 'storage must be defined'. DB20000I The RESTORE DATABASE command completed successfully. db2inst@ELMO:~> db2 set...
3
3205
by: hikums | last post by:
Source/Production system: AIX 5.2, DB2 8.2 I have a full backup of sample db taken on 05/01/2006(logs included in backups) I have a tablespace backup of userspace1 taken on 05/03/2006(logs included in backups) There are other tablespaces in this db as well There is retention logging I want to restore the userspace1 tablespace of sampledb into newdb on
2
11554
by: rAinDeEr | last post by:
Hi, I have Db2 9 installed in Windows. Am trying to create a table with the following DDL CREATE TABLE DB2N.T_CO ( a1 VARCHAR(100) NOT NULL, b1 VARCHAR(255), c1 VARCHAR(255), d1 VARCHAR(255),
6
3293
by: Troels Arvin | last post by:
Hello, I have recently run a rather large data import where the imported data i pumped through some updatable views equipped with INSTEAD OF triggers. For various reasons, the exact same data where imported into the exact same table/view/trigger structures (but with slightly different tablespace configuration, see later). The involved hardware was different (one running on x86_64, one running on PPC), but with comparable CPU, memory and...
0
8443
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8550
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8639
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7385
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
6192
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...
1
2769
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
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1772
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.