473,737 Members | 9,590 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 4555
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
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
6201
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
5728
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
4259
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
2543
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
5161
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
3223
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
11566
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
3310
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
8968
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
9334
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...
1
9258
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
8207
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
6749
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
6052
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
4569
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
4823
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3278
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

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.