ORA-27102: out of memory

Source: Internet
Author: User

Http://technet.microsoft.com/zh-cn/library/bb124810 (exchg.65). aspx

 

Windows Server 2003 supports the Enable switch, so that you can adjust the memory usage and memory address space allocation. Regardless of the amount of physical memory in the system, Windows uses a 4 GB virtual address space, of which 2 GB is allocated to user-mode processes (such as applications ), the other 2 GB is allocated to kernel-mode processes (such as operating systems and kernel-mode drivers ). In a system with physical memory equal to or greater than 1 GB, you can use the preceding two enable switches to allocate more memory (3 GB) to the application ), allocate less memory (1 GB) to the operating system ). The extra virtual address space helps reduce the number of memory fragments generated in the virtual address space of the exchange information storage process.

The/3 GB switch can be used to change the allocation. This switch is entered in the system boot. ini file and takes effect after restart.

Before getting started

Note the following before performing the steps in this topic:

The/3 GB switch is supported only in the following operating systems:

  • Windows 2000 Advanced Server
  • Windows 2000 datacenter Server
  • Windows Server 2003 Standard Edition
  • Windows Server 2003 Enterprise Edition
  • Windows Server 2003 datacenter
Important information:
The/3 GB switch should not be used in Windows 2000 Server because it is not supported and may cause application or operating system crash.

Procedure

Set/3 GB enable switch in Windows Server 2003

  1. Right-click my computer" And then select "properties" . "System Properties" will appear" Dialog box.

  2. Click "advanced" Tab.

  3. In the "Start and fault recovery" area, click "Settings" . "Start and fault recovery" will appear" Dialog box.

  4. In the system startup area, click Edit" . This will open the windows boot. ini file in notepad.

  5. In[Operating systems]Add the following switch to the end of the startup command line containing the/fastdetect switch:/3 GB

  6. Save the changes and close notepad.

  7. Click OK" Close the dialog box and restart the computer for the change to take effect.

Set/3 GB enable switch in Windows 2000 Advanced Server or Windows 2000 datacenter Server

  1. In Windows Resource Manager, navigate to system partition. This partition stores hardware-specific Windows files, such as boot. ini and ntldr.

  2. If you cannot see the boot. ini file, it may be because the folder option is set to hide the protected operating system file. In this case, in the resource manager window, click "Tools" , "Folder Options" And "View" . Clear "Hide protected operating system files (recommended )" Check box. When the system prompts, click "yes" .

  3. You can view the boot. ini file in the resource manager, right-click the file, and then click open mode" And then click notepad" Open the file.

  4. Add the/3 GB switch[Operating systems]The end of a row starting with "multi.

  5. Save the changes and close notepad.

  6. Restart the computer for the change to take effect.

For details
  • For more information, see optimizing memory usage in Exchange Server 2003.
  • For more information about optimizing the memory usage and performance of the Exchange Server, see the following Microsoft Knowledge Base Article:
    • 266096: when the physical Ram exceeds 1 GB, Exchange 2000 requires/3 GB Switch
    • 325044: how to solve the virtual memory fragmentation problem in Exchange Server 2003 and Exchange 2000 Server
    • 815372: how to optimize memory usage in Exchange Server 2003
    • 308356: memory usage of the lsass.exe process on the domain controller running Windows Server 2003 or Windows 2000 Server
    • 810371: Use the/userva parameter on Windows 2003 Server-based Exchange servers.
    • 823440: Use the/3 GB switch in Exchange Server 2003 on Windows Server 2003-based systems
    • 822178: Overview of dependency and requirements for Exchange Server 2003 features

The first time I made optimization settings for the customer, I encountered such an error. At that time, I had no experience and could not afford to worry about the database. I was so scared, fortunately, I found an experienced senior to solve the problem.

A few years later and never happened again. These days I suddenly remembered the same thing and tried to simulate the situation and handle it myself.

How did the problem occur,

First, on a 32-bit machine, when the SGA memory is configured to exceed 1.5 GB, this problem basically occurs.

We also need to know that the sga_max_size can be changed automatically. When the memory component and size of the SGA are smaller than the sga_max_size, The sga_max_size will not change, but will still maintain its own value, if the sum is exceeded, the value of sga_max_size will be automatically changed and changed. You can try this by yourself.

View my memory

Total system global area 965812724 bytes

Fixed size 455156 bytes

Variable Size 251658240 bytes

Database buffers 713031680 bytes

Redo buffers 667648 bytes

This is an instance on my windowxp,

Now I want to adjust the database buffer value to 1G. I only need to set db_cache_size to 1G without setting sga_max_size. In this case, because the value of each component is greater than the current value of sga_max_size, so the sga_max_size is automatically changed.

SQL> alter system set db_cache_size = 1000 m scope = spfile;

SQL> shutdown immediate;

SQL> startup;

Check the current memory information.

Total system global area 1301357848 bytes

Fixed size 455960 bytes

Variable Size 251658240 bytes

Database buffers 1048576000 bytes

Redo buffers 667648 bytes

It is found that sga_max_size has automatically changed

SQL> show parameters SGA _

Name type value

--------------------------

Sga_max_size big integer 130135784

The token has also changed.

Now let's simulate our problem.

However, before the simulation, back up our init. ora. We can't do it without backing up init. ora. However, it's too much trouble to wait for the recovery settings.

Back up the parameter for memory adjustment.

SQL> Create pfile = 'f: \ synchrophy \ Server \ oracle \ admin \ ora9i \ pfile \ init. Bak. ora 'from spfile;

This is to back up your spfile to the pfile file. Since spfile is a binary file and cannot be modified, we generally use this form for backup.

Back up. We can safely change our memory quota.

SQL> alter system set db_cache_size = 1500 m scope = spfile;

SQL> shutdown immediate;

SQL> startup;

Now the problem has occurred.

Let's take a look.

ORA-27102: out of memory

OSD-00022: Message 22 not found; Product = RDBMS; facility = sosd

O/s-error: (OS not enough storage is available to process this command.

The reason for this problem is that the memory of Oracle is limited on 32-bit machines. The maximum memory is 4 GB, and the 32-Bit Memory is 50% reserved for the operating system. The window is single-threaded, it cannot exceed 1.7 GB. Out of memory will also be released.

How can we solve this problem. If you know how to start Oracle's init, it is easy to perform this restoration. By default, oralce is started first from spfile,

You can find the path in this way.

SQL> show parameter pfile

Name type value

--------------------------

Spfile string % ORACLE_HOME % \ database \ spfile %

Oracle_sid %. ora

Therefore, you can restore the file by modifying the values of relevant parameters. However, note that this is a binary file and the binary format must be maintained.

There is also a way to use the pfile we just used to restore.

SQL> startup pfile = 'your backup init. ora ';

If it is in the window

SQL> Create spfile from pfile = 'your backed up init. ora ';

Restart the service.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.