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).
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)
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.
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).
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).
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).