If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > restoring database from a different schema

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-08-04, 05:04
bagsakan bagsakan is offline
Registered User
 
Join Date: May 2004
Posts: 9
Question restoring database from a different schema

hi,

i have been given backup image of a database which was created using username/password user1/pass1. now my database username is different (user2/pass2) and i cant seem to be able to restore the database image sent to me because i keep on getting the error that the supplied username and password is incorrect.

my assumption is that the supplied password in the statement

restore database testdata user user2 using pass2 from c:\temp\testdata with 3 buffers buffer 1024 without prompting

is being used to 1) open the image, and 2 ) used for logging to the current instance (my system username and schema name are different).

can somebody point me to the right direction?

thanks.
Reply With Quote
  #2 (permalink)  
Old 06-08-04, 05:15
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
What platform and version are you on ?

If you are on Windows, is the user domain or local ?

Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 06-08-04, 07:05
hufa hufa is offline
Registered User
 
Join Date: Jun 2004
Posts: 2
Urgent!!! Restore data from DAT files!?

Hello,

we have a big problem!
From a DB does'n exist any backup. We have only the DAT.*, NAM.*, INX.*, *.LB and *.LBA files without their right paths for the data structure (only SMS tablespaces , OS=Win2000 Server).

How can I restore the tables from the DAT tables? Do you know a tool which can read DAT files?

thanks
hufa
Reply With Quote
  #4 (permalink)  
Old 06-08-04, 23:13
bagsakan bagsakan is offline
Registered User
 
Join Date: May 2004
Posts: 9
Quote:
Originally Posted by sathyaram_s
What platform and version are you on ?

If you are on Windows, is the user domain or local ?

Cheers
Sathyaram
Sorry, i forgot to supply that basic information...

our platform is windows. the backup image is from DB2 7.2 EE which is the same version installed in the destination workstation.

my user is a domain user but the DB2 application was intalled using a local account. please let me know if i have left out some other information useful for debugging this problem. thank you.

regards...
Reply With Quote
  #5 (permalink)  
Old 06-09-04, 04:26
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Attach to the instance using your local account and password and then issue this restore command ...

db2 attach to inst1 user localac using localpass
db2 restore database dbname1 .....

HTH

sAthyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #6 (permalink)  
Old 06-09-04, 23:33
bagsakan bagsakan is offline
Registered User
 
Join Date: May 2004
Posts: 9
ok, i logged in as the local user (db2admin) and attached to the db2 instance. however using any of the following command throws the exception that the supplied credentials are not valid.

restore database testdata from c:\......
restore database testdata user user2 using pass2 from c:\...
restore database testdata user db2admin using localpass from c:\...
Reply With Quote
  #7 (permalink)  
Old 06-10-04, 02:31
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Certainly, the second and third statements have invalid credentials.

For the first command, unless you supply the full command, there is no way for anyone to know what the invalud credentials are.

BTW, IBM has compiled information about DB2 and published them. They are popularly known as manuals ... These pages may tell you what the valid credentials are ... Refer 'Useful DB2 Stuff' thread for the link to the manuals

Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On