Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Posts
    1,605

    Unanswered: "There is not enough memory available" error using "restore database" command

    Hi,
    1. I have created off-line database backup on DB2 Workgroup v8.2 FP9 on Windows 2003.
    2. I copied backup file from computer (step 1) to Windows XP SP3 using DB2 Express-C v9.5 (no fixpack).
    3. I executed the following command from db2cmd:
    db2 RESTORE DATABASE mydb FROM "C:\backup_dir" TAKEN AT 20081107091504 TO "C:" INTO mydb WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT PROMPTING

    and getting error: "SQL1022C There is not enough memory available to process the command. SQLSTATE=57011"

    db2 ? sql1022c
    Code:
    SQL1022C  There is not enough memory available to process the command.
    
    Explanation:
    
    Not enough random access memory (RAM) is available to process the
    command.
    
    If a remote procedure was invoked, the remote procedure may use a local
    variable space that is larger than the allowable maximum (4K).
    
    If the statement involves a user-defined function (UDF), the memory set
    controlled by the ASLHEAPSZ database manager configuration parameter may
    be larger than the memory available.
    
    The command cannot be processed.
    
    User response:
    
    Stop the application. Possible solutions include:
    *  Change the MEMMAN NO SWAP, NO MOVE option in the CONFIG.SYS file to
       SWAP, MOVE.
    *  Remove background processes.
    *  Decrease the values of the configuration parameters that define
       allocation of memory, including ASLHEAPSZ if UDFs are involved in the
       failing statement.
    *  Install more random access memory (RAM).
    *  If a remote procedure was invoked, ensure that the remote procedure
       uses a local variable space that is less than or equal to 4K.
    *  If you are using Remote Data Services, increase the Remote Data
       Services heap size (rsheapsz) in the server and client configuration
       because at least one block is used per application.
    
     sqlcode: -1022
    
     sqlstate: 57011
    On restore database computer there is 2,5 GB of RAM and 2,1 RAM free. It should not be the RAM problem.

    Any idea what is wrong? How to restore database from v8.2 to v9.5 database?

    Regards,
    Grofaty
    Last edited by grofaty; 11-07-08 at 05:05.

  2. #2
    Join Date
    Apr 2008
    Posts
    39
    It could be because of ASLHEAPSZ which is related to communication buffer.
    The communication buffer stores the result of the query in the buffer space rather than storing it in temporary tables.

    I guess restore command internally uses some blocking cursors with select statements and that's where the problem is popping up from. The communication buffer space should be large enough to hold the result set of the query.

    Thanks,
    Madhavi.

Posting Permissions

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