Formula for calculating the number of Oracle sessions and processes

Source: Internet
Author: User
The relationship between Oracle sessions and processes is sessions = 1.1 * processes + 5 ----- experiment part ----

Microsoft Windows [version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C: \ Documents ents and Settings \ Administrator> sqlplus/nolog

SQL * Plus: Release 10.2.0.1.0-Production on Friday May 18 22:41:18 2012

Copyright (c) 1982,200 5, Oracle. All rights reserved.

SQL> set linesize 1000
SQL> set timing on
SQL> set wrap off
SQL> conn sys as sysdba
Enter the password:
Connected.
SQL> show user
USER is "SYS"
SQL> select * from V $ instance;
INSTANCE_NUMBER INSTANCE_NAME HOST_NAME VERSION STARTUP_TIME status parall thread # ARCHIVER LOG_SWITCH_WAIT logins shutdo DATABASE_STATUS INSTANCE_ROLE ACTIVE_STATE BLOCKE
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 orcl SHARK-7DB94E655 10.2.0.1.0 18-5 month-12 open no 1 stopped allowed no active PRIMARY_INSTANCE NORMAL NO

Used time: 00: 00: 00.06

SQL> show parameter process -- check that the number of processes is 10 GB and 150 processes are installed by default.

NAME TYPE VALUE
----------------------------------------------------------------------------------------
Aq_tm_processes integer 0
Db_writer_processes integer 1
Gcs_server_processes integer 0
Job_queue_processes integer 10
Log_archive_max_processes integer 2
Processes integer 150
SQL> show parameter session -- the number of calls is 170

NAME TYPE VALUE
----------------------------------------------------------------------------------------
Java_max_sessionspace_size integer 0
Java_soft_sessionspace_limit integer 0
License_max_sessions integer 0
License_sessions_warning integer 0
Logmnr_max_persistent_sessions integer 1
Session_cached_cursors integer 20
Session_max_open_files integer 10
Sessions integer 170
Shared_server_sessions integer

SQL> select 150*1.1 + 5 from dual; -- check that the formula is normal.

150*1.1 + 5
----------
170

Used time: 00: 00: 00.00
SQL> alter system set processes = 100 scope = both; -- modify the number of processes. It is a SPFILE parameter.
Alter system set processes = 100 scope = both
*
Row 3 has an error:
ORA-02095: Unable to modify the specified initialization parameter

SQL> alter system set processes = 100 scope = spfile;

The system has been changed.

Used time: 00: 00: 00.04
SQL> show parameter process -- Instance needs to be restarted

NAME TYPE VALUE
----------------------------------------------------------------------------------------
Aq_tm_processes integer 0
Db_writer_processes integer 1
Gcs_server_processes integer 0
Job_queue_processes integer 10
Log_archive_max_processes integer 2
Processes integer 150
SQL> shutdown immedate;
SP2-0717: the Shutdown option is invalid.
SQL> shutdown immdate;
SP2-0717: the Shutdown option is invalid.
SQL> shutdown immediate;
The database has been closed.
The database has been detached.
The Oracle routine has been disabled.
SQL> startup; -- restart
The ORACLE routine has been started.

Total System Global Area 612368384 bytes
Fixed Size 1250452 bytes
Variable Size 226495340 bytes
Database Buffers 381681664 bytes
Redo Buffers 2940928 bytes
The database has been loaded.
The database has been opened.
SQL> show parameter process -- check that the number of processes is 100, and the modification is successful! Success is actually a verb modified by the adverbs. The successful person is an attribute that indicates that this person is rich and tasteless.

NAME TYPE VALUE
----------------------------------------------------------------------------------------
Aq_tm_processes integer 0
Db_writer_processes integer 1
Gcs_server_processes integer 0
Job_queue_processes integer 10
Log_archive_max_processes integer 2
Processes integer 100
SQL> show parameter session -- the number of calls has changed to 115

NAME TYPE VALUE
----------------------------------------------------------------------------------------
Java_max_sessionspace_size integer 0
Java_soft_sessionspace_limit integer 0
License_max_sessions integer 0
License_sessions_warning integer 0
Logmnr_max_persistent_sessions integer 1
Session_cached_cursors integer 20
Session_max_open_files integer 10
Sessions integer 115
Shared_server_sessions integer
SQL> select 100*1.1 + 5 from dual; -- the formula is correct.

100*1.1 + 5
----------
115

Used time: 00: 00: 00.00
SQL>

 

 

 

 

Related Article

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.