Results 1 to 11 of 11
  1. #1
    Join Date
    Jun 2004
    Posts
    8

    Unanswered: Cannot restore DB2 backup - error - SQL2040N

    I am trying to restore a database using option 'Database -> create -> database from backup' option of Control Center. after filling in the fields for database name, backup device, backup file date & time, i am not able to successfully restore the database. the message displayed is 'SQL2040N - database alias paramater <dbalias> not valid'. I gave the same alias name as that of the database of which the backup was taken.

    SQL2040N - says database alias parameter not valid
    DB2 version - 4.0

    where am i going wrong ?

    Regds
    Prashant

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    What name are you giving ?
    Are you sure you are on Version 4 ?
    What platform are you on ?

    Is the backup taken on the same version of the database ?

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

  3. #3
    Join Date
    Apr 2004
    Location
    Inside Intel
    Posts
    165

    Talking

    As Sathyaram said, the backup DB2 version should be the same as restore DB2 version (fixpaks doesnt matter) additionally the OS family should also be the same. Like you cannot backup on Windows 2000 and restore on Windows XP (I have tried this and it gave me a Bad Container error).

    Why dont you go to the command line and do a

    RESTORE DATABASE <database> FROM "<Location>" TAKEN AT <timestamp>;

    This worked for me.

    By the way what OS are you on?

    Newbie

  4. #4
    Join Date
    Jun 2004
    Posts
    8

    Cannot restore DB2 backup - error - SQL2040N

    [QUOTE=sathyaram_s]What name are you giving ? - i am prompted for 'new database name' where i key-in some new name which does not exist on the server where i am restoring the backup.

    Are you sure you are on Version 4 ? yes i am on version 4. the backup is also taken on version 4.

    What platform are you on ? i am on Win 2K. The version from where the backup is taken is also win 2K.

    Is the backup taken on the same version of the database ? yes.

    Regds
    Prashant

  5. #5
    Join Date
    Jun 2004
    Posts
    8
    [QUOTE=sathyaram_s]What name are you giving ? - i am prompted for 'new database name' where i key-in some new name which does not exist on the server where i am restoring the backup.

    Are you sure you are on Version 4 ? yes i am on version 4. the backup is also taken on version 4.

    What platform are you on ? i am on Win 2K. The version from where the backup is taken is also win 2K.

    Is the backup taken on the same version of the database ? yes.

    Regds
    Prashant

  6. #6
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    There is no verison 4 of DB2 for Windows. IBM went from verson 2.1 to version 5.1 in order to be in synch (version number wise) with DB2 for OS/390.

    Maybe you are on fixpak 4 (version unknown). The current release is version 8.1 fixpack 5.
    Last edited by Marcus_A; 06-04-04 at 02:33.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  7. #7
    Join Date
    Jun 2002
    Posts
    7

    Version and Command

    Prashant,

    Maybe using the DB2level command would clear the version your on for us.

    Next, from the command centre can you use the show command option to capture the restore command for us to see.

    Paste this command into the command centre and run it to double check you get the same error.

  8. #8
    Join Date
    Jul 2003
    Location
    Austin, TX, USA
    Posts
    278

    Sql204

    Hi Prashant,

    I had posted the same in your last thread so I don't see the need for you to start a new duplicate thread anyways what I had posted is below.

    Given below is the explanation of the error.

    -----------------------------------------------------
    C:\>db2 ? SQL2040N


    SQL2040N The database alias parameter "<dbalias>" is not valid
    or not specified.

    Explanation:

    The application calling the Backup or Restore utility has
    supplied a database alias parameter that is not valid. The alias
    must be 1 to 8 bytes and the characters must be chosen from the
    database manager base character set.

    User Response:

    Reissue the Backup or Restore command with a valid database
    alias.
    ---------------------------------------------------------------------

    Try giving a dbalias name which is in between 1-8 characters and I think that should solve your problem
    HTH

    Nitin

    Ask the experienced rather than the learned

  9. #9
    Join Date
    Jun 2004
    Posts
    8
    Hi, Nitin
    Thanks for your reply for both the threads (second was created because in first thread the TITLE was not explanatory). anyway, the error discription which u has provided was already available along with the error code. pl find some other solution if possible.
    Regds
    Prashant

  10. #10
    Join Date
    Jun 2004
    Posts
    8
    Dear Sathyaram,
    sorry for wrongly putting the version number. I have atually put the Websphere version number and not DB2 version number. Correct info is as below.

    What name are you giving ? I am giving 'new database name' ie 'gskjun03'

    Are you sure you are on Version 4 ? no, i am on version 7.

    What platform are you on ? OS platform of server is 'Win2K' and the OS on the PC where i am trying to restore is 'Windows NT workstation'

    Is the backup taken on the same version of the database ? yes, the backup taken is on DB2 version 7

    Regds
    Prashant

  11. #11
    Join Date
    Jun 2004
    Posts
    8
    sorry for wrongly putting the version number. I have atually put the Websphere version number and not DB2 version number. Correct info is as below.

    What name are you giving ? I am giving 'new database name' ie 'gskjun03'

    Are you sure you are on Version 4 ? no, i am on version 7.

    What platform are you on ? OS platform of server is 'Win2K' and the OS on the PC where i am trying to restore is 'Windows NT workstation'

    Is the backup taken on the same version of the database ? yes, the backup taken is on DB2 version 7

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •