Oracle Tools for Application and Database Modeling and Design

ORA-04031 - unable to allocate bytes of shared memory

This error usually occurs during the creation of a Designer 2000 Repository (Figure E1.1). The status of the Repository installation will be CDI-21235 (Figure E1.2).

Figure E1.1: Error Dialog

Figure E1.2: Repository Installation Status Shows CDI-21235


Hitting the "eject" button () will open a dialog with the option to abort (Figure E1.3). Hitting the abort button will open a different dialog to exit out of the repository installation (Figure E1.4)

Figure E1.3: Error Notification with Option to Abort

Figure E1.4: Exiting the Repository Installation


The reason this error occurs is a lack of allocated memory in the System Global Area (SGA) for the database instance. The initialization parameter that determines the size of the SGA is shared_pool_size (This portion is a replication of Step 6 in the section: Preparing to install a Designer 2000 Repository). Open up the initialization file for the ORCL instance ('initorcl.ora', located in the /database directory) in a text editor (Figure E1.5, E1.6). Search for the 'shared_pool_size' parameter and change it to 6000000 (6MB)(Figure E1.7). Save the file.

Figure E1.5: Locate the Initialization File

Figure E1.6: Open 'initorcl.ora' in a Text Editor


Figure E1.7: Increase the 'shared_pool_size' Parameter to 6MB


The Oracle7 instance must now be restarted. During the installation of Oracle7, shortcuts to shutdown and restart the Oracle7 instance were created under the folder Personal Oracle for Windows. Select Stop Database to begin the shutdown process (Figure E1.8). If there are active connections to the database instance, Oracle prompts to stop them (Figure E1.9). Hit the Stop Active Connections button and Oracle will finish shutting down the database (Figure E1.10).

Figure E1.8: Scanning for Active Connections

Figure E1.9: Terminate Active Connections


Figure E1.10: Instance Shutdown Successfully.


To restart the instance, simple select Start Database from the same folder and the startup process begins (Figure E1.11), this time reading in the new value for shared_pool_size. A dialog appears signalling that the instance was success fully started (Figure E1.12).

Figure E1.11: Instance Startup

Figure E1.12: Startup Successful


Upon restarting the repository installation, Oracle will recognize that the previous install failed and ask to start from where the install terminated (Figure E1.13). Select Yes, and the installation will continue (Figure E1.14). A successful installation will result in a dialog signalling completion (Figure E1.15).

Figure E1.13: Restarting From the Previous Install

Figure E1.14: Installation Process


Figure E1.15: Installation Completed Successfully.




Main Page About the Book Student Resources Oracle Resources Instructor Resources Contact Us

1999 Prentice-Hall, Inc., A division of Pearson Education, Upper Saddle River, New Jersey 07458 Legal Statement
Comments should be directed to webmaster@prenhall.com