473,659 Members | 2,722 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Restore DB2 9.1 backup problem

1 New Member
Hello,

I am trying to restore a DB2 9.1 fp2 backup to another DB2 9.1 fp2 machine, both are on Windows.

Expand|Select|Wrap|Line Numbers
  1. C:\Program Files\IBM\SQLLIB\BIN>db2 -tvf C:\db2_data\test.db2
  2. UPDATE COMMAND OPTIONS USING S ON Z ON MYDB_NODE0000.out V ON
  3. DB20000I The UPDATE COMMAND OPTIONS command completed successfully.
  4.  
  5. SET CLIENT ATTACH_DBPARTITIONNUM 0
  6. DB20000I The SET CLIENT command completed successfully.
  7.  
  8. SET CLIENT CONNECT_DBPARTITIONNUM 0
  9. DB20000I The SET CLIENT command completed successfully.
  10.  
  11. RESTORE DATABASE mydb FROM 'C:\' TAKEN AT 20080310154100 INTO mydb REDIRECT WITHOU
  12. T ROLLING FORWARD
  13. SQL1277W A redirected restore operation is being performed. Table space
  14. configuration can now be viewed and table spaces that do not use automatic
  15. storage can have their containers reconfigured.
  16. DB20000I The RESTORE DATABASE command completed successfully.
  17.  
  18. SET TABLESPACE CONTAINERS FOR 2 USING ( FILE 'C:\db2_data\userspace1'
  19. 256000 )
  20. DB20000I The SET TABLESPACE CONTAINERS command completed successfully.
  21.  
  22. SET TABLESPACE CONTAINERS FOR 3 USING ( FILE 'C:\db2_data\regtbs'
  23. 768000 )
  24. DB20000I The SET TABLESPACE CONTAINERS command completed successfully.
  25.  
  26. SET TABLESPACE CONTAINERS FOR 4 USING ( FILE 'C:\db2_data\idxtbs'
  27. 128000 )
  28. DB20000I The SET TABLESPACE CONTAINERS command completed successfully.
  29.  
  30. SET TABLESPACE CONTAINERS FOR 5 USING ( FILE 'C:\db2_data\lobtbs'
  31. 512000 )
  32. DB20000I The SET TABLESPACE CONTAINERS command completed successfully.
  33.  
  34. SET TABLESPACE CONTAINERS FOR 6 USING ( PATH 'C:\db2_data\testspace' )
  35. DB20000I The SET TABLESPACE CONTAINERS command completed successfully.
  36.  
  37. RESTORE DATABASE mydb CONTINUE
  38. SQL1277W A redirected restore operation is being performed. Table space
  39. configuration can now be viewed and table spaces that do not use automatic
  40. storage can have their containers reconfigured.
  41. DB20000I The RESTORE DATABASE command completed successfully.
As you can see, although all the redirects finish successfully, it fails to run the restore db mydb continue

1. The script is generated by db2

2. I manually run the above commands too, got the same problem

3. There are 0~7 tablespace containers, but 0, 1, and 7 are automatic storage tablespace,
e.g.
Expand|Select|Wrap|Line Numbers
  1. db2 => set tablespace containers for 7 using (file "C:\db2_data\C0000000.LRG" 32)
  2. SQL20319N The SET TABLESPACE CONTAINERS command is not allowed on an
  3. automatic storage table space. SQLSTATE=55061
4. The only thing I changed is the file size in the SET TABLESPACE CONTAINERS command, since I don't have enough space for the tablespace allocated on the original machine, but I do have enough space to hold all the data (the backup file is about 28GB only).

Any suggestion/help is appreciated!
Apr 1 '08 #1
2 8594
I have just had the same problem, but I have finally tracked down the cause.
One of more of the "redirect" commands is using a container name that is already in use, OR a redirect is missing for a tablespace and the original location is still in use.
There is no error message when issuing the redirect and a totally misleading message when you try to "continue", but the file name has already been used.
To find which tablespace is causing the problem, look in the diagnostic log. There should be a message.
The conatiner may be in use by another database. This was the problem I had. The redirect commands were generated by a script, which missed them some tablespaces.
The "continue" will not work if it knows that a container is already in use - it is asking you for a missing redirect command.
I hope this helps.
Oct 6 '10 #2
vijay2082
112 New Member
Hi,
You need to provide path for the automatic storage tablespaces. This the reason why your restore is failing.How will the database figure out where to set automatic storage containers for the tablespace (0, 1, and 7 in youe case)

You will also see mesages related to container failed operation while doing a rollforward continue operation in the db2diag.log file.

ideally your restore command should be like one below
-- assuming that you have sufficient space on D: and that teh drive is present on the server

db2 "RESTORE DATABASE mydb FROM 'C:\' TAKEN AT 20080310154100 on ' D:\' dbpath on 'C:\' INTO mydb REDIRECT WITHOUT ROLLING FORWARD "


Ref: http://publib.boulder.ibm.com/infoce...c/r0001976.htm


Cheers, Vijay
Oct 18 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2224
by: Spieg | last post by:
I've a program with VB6 working with SQLServer 2000. I have a Central Station with the program runnin with full prvileges and that can perform all the actions on the DB. There are also some clients that cannot be connected via LAN or internet that need to use the same DB. The way I solved this with Aces was to copy the Access file from the Central Station ot the disconnected clients. Then to update the central Staton I used to save the...
3
2247
by: butatista | last post by:
Please help SQL Server 2000 Standard I am trying to restore databases on my server and am unable to get them to restore using the database option. For example, the location of my backup file is: D:\MSSQL\BACKUP\MY_DB\MY_DB_ddmmyy.bak
1
2107
by: John Rajendran | last post by:
Hi there, I need to take a backup with the following scanerio in mind: At T1 I take the FULL BACK UP of the database called BACK_1_FULL.BACK in c:\ Then at T2 I would like to take only the differential BACKUP of the Transaction log called BACK_1_TRANSLOG.BACK and at T3 I would like to take only the differential BACKUP of the Transaction log called BACK_2_TRANSLOG.BACK. At T4 my system fails and I need to bring the database
0
1857
by: xixi | last post by:
i have been tried to restore a backup image from a remote db2 udb on windows server to a local db2 server, i have mapped the network drive from the remote machine to local, but when i run restore command specify the drive and folder stored the backup image, it gives me error that SQL2036N The path for the file or device "e:\backup" is not valid. e is the mapped drive, so how to fix the problem
0
1247
by: vhernz | last post by:
Hi, I am new in MSSQL and recently encountered a problem in backing up the database. Here is the scenario 1. There is an schedule backup everyweek which overwrite the backup file everytime a backup is occured. 2. I need to update some script in sql. so what i did is to manually backup the database which also overwrite the old database file. 3. When SQL prompts that the backup is successful I thought it was totally all backup because...
4
5749
by: Christian Maslen | last post by:
Hi All, I understand in older versions of DB2/UDB this was not possible. The following article explains how I might do this http://www.ibm.com/developerworks/db2/library/techarticle/0207kline/0207kline.html Is this still a restriction in version 9.x? I'd specifically like to restore a backup performed on an AIX server to a Windows server.
5
2781
by: Nasif | last post by:
Hello All I am currently doing a project on MS SQL Server 2005 where I am in need of table level backup/restore. I know about FILEGROUP. But in our project using FILEGROUP is not feasible. As far as I know MS SQL Server 2005 does not support Table level restore directly. Moreover relational integrity is also matter. Is there any clever trick or 3rd party free software to do table level restore/backup? Please Help.
1
1436
harshadd
by: harshadd | last post by:
http://images.orkut.com/orkut/photos/OgAAAPCx9BDT2K9eZgmdGn5dAG_oKl7hf_SnAM8q4fIPozZ1oOIYdzAwHLfBA1HFlX6F04O5kWMQGYlUiHs7NbwPm10Am1T1UJ6Eoc0OhIb-Tkbf1rcJlIni46gd.jpg Pls see the above error I am trying to restore backup taken on my clients server on my development server. It gives me access denied error. sa user is configured for mixed mode authentication. pls see the attcment for error mesage. rgds HND
1
2481
by: prakash mhatre | last post by:
I want to restore backup from mapped network drive which i have shared in MSSQL server 2003. I have mapped a network drive & given sharing to the folder. I am using a batch file to restore it...contains of the file is as below : SQLCMD -i RESTORMIS.txt -o RESTOR_outpu.log and RESTORMIS.txt contains as below : RESTORE DATABASE PRODRDCC FROM DISK = '\\192.168.0.91\D$\DATA\CBS\FULL.BAK' WITH MOVE 'SDCPROD' to...
0
8427
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
8332
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,...
0
8746
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
8525
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
8627
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
7356
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
6179
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
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.