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 > Changing Alias Name and trying to restore backup

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-04-10, 14:56
rockycj_dba rockycj_dba is offline
Registered User
 
Join Date: Apr 2009
Posts: 17
Changing Alias Name and trying to restore backup

I'm using DB2 9.1 LUW. I want to change the Alias name of a database to the database name. Here is what the old name was as of this morning:

Alias: PS_TRN
Database: PSFTTRN

I want it to be:
Alias: PSFTTRN
Database: PSFTTRN

I dropped the database and re-created it and am trying to run the backup from last night. Which has the old PS_TRN alias.

Here is what I'm running:
db2 restore db psfttrn from . taken at 20100804010119 replace existing

Here is the error I'm getting:
SQL2542N No match for a database image file was found based on the source
database alias "PSFTTRN" and timestamp "20100804010119" provided.

Is there anything I can do to restore this new database with the PSFTTRN alias name?

Thank you.

CC
Reply With Quote
  #2 (permalink)  
Old 08-04-10, 15:07
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
First of all, you don't need to drop the database to change its alias. Re-cataloging the database with the desired alias would do the trick.

What is the backup image file name?
Reply With Quote
  #3 (permalink)  
Old 08-04-10, 15:10
rockycj_dba rockycj_dba is offline
Registered User
 
Join Date: Apr 2009
Posts: 17
Changing Alias Name and trying to restore backup

The backup image filename is PS_TRN.0.db2inst1.NODE0000.CATN0000.20100804010119 .001.

CC
Reply With Quote
  #4 (permalink)  
Old 08-04-10, 18:20
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Then you are issuing an incorrect command. It should be
Code:
restore db PS_TRN from . taken at 20100804010119 into PSFTTRN
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