473,574 Members | 2,929 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 4532
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
12653
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...
4
6190
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...
6
5711
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...
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...
4
2538
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...
6
5145
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...
3
3192
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...
2
11540
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
3285
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...
0
7835
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...
0
7753
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...
0
8095
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7847
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...
0
8132
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...
0
3769
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...
1
2265
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
1
1365
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1096
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...

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.