473,387 Members | 1,899 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Restore to new database

Hello,

Im working on a project where I have to bring at production database
in house for regression testing.

The people who hosts the database (db2 version 7) has made a backup of
the base and given me a CD containing one file...

When I try to do a restore to new Database I get the dreaded SQL2542N

My command is a follows:

RESTORE DATABASE CW FROM "C:\DB2Backup_190204\" TAKEN AT
20040219030333 TO "C:" INTO CW2 WITH 2 BUFFERS BUFFER 1024 PARALLELISM
1 WITHOUT PROMPTING;

The folder contains the file I was given by the hosting company, named
"030327.001"...

IS it at timestamp problem??? I the folder only contains on backup, do
I need to specify the timestamp??

Any suggestions??

thanks in advance

Mikkel Bruun
Nov 12 '05 #1
5 17698
Assuming the date (20040219) is correct try:

RESTORE DATABASE CW FROM "C:\DB2Backup_190204\" TAKEN AT
20040219030327 TO "C:" INTO CW2 WITH 2 BUFFERS BUFFER 1024 PARALLELISM
1 WITHOUT PROMPTING;

mikkel wrote:
Hello,

Im working on a project where I have to bring at production database
in house for regression testing.

The people who hosts the database (db2 version 7) has made a backup of
the base and given me a CD containing one file...

When I try to do a restore to new Database I get the dreaded SQL2542N

My command is a follows:

RESTORE DATABASE CW FROM "C:\DB2Backup_190204\" TAKEN AT
20040219030333 TO "C:" INTO CW2 WITH 2 BUFFERS BUFFER 1024 PARALLELISM
1 WITHOUT PROMPTING;

The folder contains the file I was given by the hosting company, named
"030327.001"...

IS it at timestamp problem??? I the folder only contains on backup, do
I need to specify the timestamp??

Any suggestions??

thanks in advance

Mikkel Bruun


--
Anton Versteeg
IBM Certified DB2 Specialist
IBM Netherlands
Nov 12 '05 #2
Ian
mikkel wrote:
Hello,

Im working on a project where I have to bring at production database
in house for regression testing.

The people who hosts the database (db2 version 7) has made a backup of
the base and given me a CD containing one file...

When I try to do a restore to new Database I get the dreaded SQL2542N

My command is a follows:

RESTORE DATABASE CW FROM "C:\DB2Backup_190204\" TAKEN AT
20040219030333 TO "C:" INTO CW2 WITH 2 BUFFERS BUFFER 1024 PARALLELISM
1 WITHOUT PROMPTING;

The folder contains the file I was given by the hosting company, named
"030327.001"...

IS it at timestamp problem??? I the folder only contains on backup, do
I need to specify the timestamp??

Any suggestions??

thanks in advance

Mikkel Bruun


Talk to your hosting site -- for a Windows platform, you need the entire
path to exist in order to restore.

For a backup taken with the command 'backup database cw to c:\db2backup',
The path would look something like:

c:\db2backup\CW.0\DB2\NODE0000\CATN0000\20040219\0 30327.001
On your server, you need the same directory structure from CW.0 on down.
For example, If you have the structure:

d:\backups\CW.0\DB2\NODE0000\CATN0000\20040219\030 327.001

Then you can restore with 'restore database cw from d:\backups ...'

Your hosting site should be able to give you the rest of the particulars
for where the file you received was located on their server.

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 #3
You can also use the 'db2ckbkp' utility to determine the full backup
image directory structure if it wasn't supplied:

C:\Backups>db2ckbkp -H 172030.001

=====================
MEDIA HEADER REACHED:
=====================
Server Database Name -- SAMPLE
Server Database Alias -- SAMPLE
Client Database Alias -- SAMPLE
Timestamp -- 20040114172030
Database Partition Number -- 0
Instance -- DB2
Sequence Number -- 1
Release ID -- A00
Database Seed -- 4035829E
DB Comment's Codepage (Volume) -- 0
DB Comment (Volume) --
DB Comment's Codepage (System) -- 0
DB Comment (System) --
Authentication Value -- 255
Backup Mode -- 0
Includes Logs -- 0
Compression -- 0
Backup Type -- 0
Backup Gran. -- 0
Status Flags -- 15
System Cats inc -- 1
Catalog Partition Number -- 0
DB Codeset -- IBM-1252
DB Territory --
LogID -- 1074118829
LogPath --
D:\DB2\NODE0000\SQL00001\SQLOGDIR\
Backup Buffer Size -- 8876032
Number of Sessions -- 1
Platform -- 5

The proper image path would be:
SAMPLE.0\DB2\NODE0000\CATN0000\20040114\172030.001

Image header dumped -- NO VERIFICATION PERFORMED.
Hope that helps.
kdr

Ian wrote:
Talk to your hosting site -- for a Windows platform, you need the entire
path to exist in order to restore.

For a backup taken with the command 'backup database cw to c:\db2backup',
The path would look something like:

c:\db2backup\CW.0\DB2\NODE0000\CATN0000\20040219\0 30327.001
On your server, you need the same directory structure from CW.0 on down.


--
================================================== ===================
Kelly D. Rodger IBM Canada
DB2 UDB Development Backup & Restore
================================================== ===================

Nov 12 '05 #4
Ian
Kelly D. Rodger wrote:
You can also use the 'db2ckbkp' utility to determine the full backup
image directory structure if it wasn't supplied:

C:\Backups>db2ckbkp -H 172030.001


Wow, thanks. This is handy to know.

Ian
-----= 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 #5
Ian wrote:
Kelly D. Rodger wrote:
You can also use the 'db2ckbkp' utility to determine the full backup
image directory structure if it wasn't supplied:

C:\Backups>db2ckbkp -H 172030.001


Wow, thanks. This is handy to know.

Ian
-----= 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! =-----


In addition you may want to do a redirected restore if your disk layout
(tablespace definitions) are different from the source server.

Especially useful on a Windows server where you can't create logical links
like you can on UNIX.

I've got a script which will generate a redirected restore using the source
database "LIST TABLESPACE" output as input. It's a Perl script and
designed for use on UNIX, but you may find it useful. If so feel free to
drop me an email for a copy.

Phil

--
Philip Nelson
ScotDB Limited
http://www.scotdb.com
(te*****@scotdb.com)

Nov 12 '05 #6

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

Similar topics

3
by: Tim Morrison | last post by:
MSDE2000 I have an application in which I am running a TSQL command of BACKUP DATABASE and RESTORE DATABASE for the backup and restore commands for my application. For testing purposes, i did the...
0
by: xo55ox | last post by:
Hi, I have been trying to set up an automated restore process from prod to backup server. First, I schedule the full database backup nightly, transfer the backup file and restore it to the...
3
by: Jon Jacobs | last post by:
I attempt to back up a database on one server and restore it on my local machine. This is what the query text looks like: restore database model from Disk='c:\JQJ\mydump\model.bak' with...
4
by: Hardy | last post by:
hi gurus, now I have to backup and restore a 8 T size db2 database. from two s85 to two 670. the partitions,tablespaces of the db should be redesigned then I plan to use redirected restore. but...
9
by: GL | last post by:
I am running DB2 8.1.1 on AIX 5.1 Having a problem with a redirected restore. Once into the restore continue phase, I immediately get the following “SQL2059W A device full warning was...
2
by: anna_cheng11 | last post by:
We do not have a DBA available, and this is a development environment, hence I was asked to do the work. I am not a DBA. I need some help to clarify my understanding of DB2 recovery and I am...
11
by: Chris | last post by:
I have searched this group for answers and tried the responses. I am trying to Use an full online backup from our production server and apply it to our test server. The Tablespaces in the...
0
by: Takpol | last post by:
Hello, I have several archived filegroups that have data in them partitioned based on the date. These filegroups have been removed from database after archival. For example two months ago....
5
by: HSP | last post by:
hi. i need to restore an old database. The db was backed up using a DLT drive, using 2 volumes. The content for the tapes was copied to file onto Solaris machine using rsh and dd (for backup...
5
by: chow.justy | last post by:
Dear all, I'm a new beginner of DB2. I face 2 question during restore the data. I have 2 DB2 servers on my company. Server A is running on V7.2 and Server B is running on v8.2 (Enterprise...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
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...

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.