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 > Problem with Restoring Database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-08-04, 10:14
ddempsey ddempsey is offline
Registered User
 
Join Date: Jun 2003
Posts: 50
Problem with Restoring Database

Hi all,

I'm having problems with backups and restores.
See below.
Firstly i performed backup. No problem so far.
Then i tried to restore it using the same user and password that i used to backup the database. Got an Error
Then i tried to restore it without using the same user and password that i used to backup the database. Restored successful with a warning.
Then finally i tried to restore backup into another new database.
Failed with invalid credentials.
I have included the output below. Can anyone explain to me why these restores are failing.

Thanks,
Dave

C:\>DB2 BACKUP DATABASE TEST9 USER fusionadmin1 USING password TO C:\TMP WITHOUT PROMPTING

Backup successful. The timestamp for this backup image is : 20040708145938


C:\>db2 RESTORE DATABASE TEST9 USER fusionadmin1 USING password FROM C:\BCK TAKEN AT 20040708145938 WITH 2 BUFFERS BUFFER
1024 WITHOUT PROMPTING

SQL1403N The username and/or password supplied is incorrect. SQLSTATE=08004


C:\>db2 RESTORE DATABASE TEST9 FROM C:\TMP TAKEN AT 20040708145938 WITH 2 BUFFERS BUFFER 1024 WITHOUT PROMPTING

SQL2540W Restore is successful, however a warning "2539" was encountered
during Database Restore while processing in No Interrupt mode.


C:\>db2 RESTORE DATABASE TEST9 FROM C:\TMP TAKEN AT 20040708145938 TO C: INTO TEST10 WITH 2 BUFFERS BUFFER 1024 WITHOUT PROMPTING

SQL3282N The supplied credentials are not valid.
Reply With Quote
  #2 (permalink)  
Old 07-08-04, 10:49
J Petruk J Petruk is offline
Registered User
 
Join Date: Mar 2004
Location: Toronto, ON, Canada
Posts: 513
SQL2540W Restore is successful, however a warning "2539" was encountered
during Database Restore while processing in No Interrupt mode.


This is nothing - just means an SQL2539W which is just warning you are overwriting an existing db, if you hadn't specified WITHOUT PROMPTING you'd have seen this on the screen and would have had to answer YES to continue.

Did you try connecting after this?

Are you logged in as the instance owner, or something else? Untangling credentials in db2 is frankly irritating... but anyway, check SYSADM_GROUP, etc. to see which you're in.
__________________
--
Jonathan Petruk
DB2 Database Consultant
Reply With Quote
  #3 (permalink)  
Old 07-08-04, 11:07
ddempsey ddempsey is offline
Registered User
 
Join Date: Jun 2003
Posts: 50
I am logged in as the instance owner
I could connect after i stopped the roll forward.
I check the authories and the user fusionadmin1 has all authories.
Although there isn't any SYSADM_GROUP. The only group i see is PUBLIC
As you can see i'm new to DB2, there must be something else i'm overlooking.
Also when icreated the database TEST9, i got an error to do with LDAP saying
the database wasn't cataloged. Do i need to install the OLAP starter kit

Thanks,
Dave
Reply With Quote
  #4 (permalink)  
Old 07-08-04, 11:11
ddempsey ddempsey is offline
Registered User
 
Join Date: Jun 2003
Posts: 50
Sorry, its on Windows 2000
fusionadmin1 is an administrator on the server
Reply With Quote
  #5 (permalink)  
Old 07-08-04, 11:48
J Petruk J Petruk is offline
Registered User
 
Join Date: Mar 2004
Location: Toronto, ON, Canada
Posts: 513
Quote:
Originally Posted by ddempsey
I am logged in as the instance owner
I could connect after i stopped the roll forward.
I check the authories and the user fusionadmin1 has all authories.
Although there isn't any SYSADM_GROUP. The only group i see is PUBLIC
As you can see i'm new to DB2, there must be something else i'm overlooking.
Also when icreated the database TEST9, i got an error to do with LDAP saying
the database wasn't cataloged. Do i need to install the OLAP starter kit

Thanks,
Dave
So it sounds like this isn't a RESTORE problem anymore, since you can connect? Is that correct?

No SYSADM_GROUP on Windows means anyone belonging to the local Administrators group is SYSADM.
__________________
--
Jonathan Petruk
DB2 Database Consultant
Reply With Quote
  #6 (permalink)  
Old 07-08-04, 11:55
ddempsey ddempsey is offline
Registered User
 
Join Date: Jun 2003
Posts: 50
Yes, It isn't a restore problem if i restore the database onto itself.
However, it is still a problem when i want to restore a backup into a new database
Reply With Quote
  #7 (permalink)  
Old 07-08-04, 12:03
J Petruk J Petruk is offline
Registered User
 
Join Date: Mar 2004
Location: Toronto, ON, Canada
Posts: 513
Quote:
Originally Posted by ddempsey
Yes, It isn't a restore problem if i restore the database onto itself.
However, it is still a problem when i want to restore a backup into a new database
Hmm, confusing.

You could try creating a local group, adding the login id and instance id to it, and setting SYSADM_GROUP, then restart, that may work.

That existing database is local I assume? Just checking
__________________
--
Jonathan Petruk
DB2 Database Consultant
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