Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to set session and processes in oracle

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

In this issue, the editor will bring you about how to set session and processes in oracle. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

1.sessions

Among the limits set by initialization parameters, the best known estimates are sessions and processes

The Sessions parameter specifies the number of sessions that can exist in an Instance at the same time, or the number of concurrent users who can log in to the database at the same time. Usually, when we set this number, we need to consider how many concurrent users we might have connected to the database at the same time, plus the number of background processes, multiplied by 1.1.

For example, if it is estimated that there may be 100 users connected to the database at the same time, your session should be at least

(100 + 10) * 1.1 = 121

When the concurrent user of the database connection has reached this value, and a new session is connected, an error will be reported.

00018, 00000, "maximum number of sessions exceeded"

/ / * Cause: All session state objects are in use.

/ / * Action: Increase the value of the SESSIONS initialization parameter.

2. Processes

Similar to Sessions is the parameter processes.

The Processes parameter specifies the number of processes that Instance can run simultaneously at the OS level. Based on the same considerations as the sessions setting, when we set up processes, we should also consider how many concurrent users we may have connected to the database at the same time, plus the number of background processes.

Of course, under the configuration of MTS (shared server), the determination of this value will be different. Should be ordinary background processes + maximum number of shared servers (max_shared_servers) + maximum number of Dispatcher processes (max_dispatchers).

In addition, because in the window platform, Oracle exists as a single process, the Processes parameter is changed to limit the number of threads in the Oracle process.

When Oracle needs to start a new process and the processes parameter has been reached, an error will be reported:

00020, 00000, "maximum number of processes (% s) exceeded"

/ / * Cause: All process state objects are in use.

/ / * Action: Increase the value of the PROCESSES initialization parameter.

1)。 Modify via SQLPlus

The relationship between Oracle's sessions and processes is

Sessions=1.1*processes + 5

Using sys, log in with sysdba privileges:

SQL > show parameter processes

NAME TYPE VALUE

-

Aq_tm_processes integer 1

Db_writer_processes integer 1

Job_queue_processes integer 10

Log_archive_max_processes integer 1

Processes integer 150

SQL > alter system set processes=400 scope = spfile

The system has changed.

SQL > show parameter processes

NAME TYPE VALUE

-

Aq_tm_processes integer 1

Db_writer_processes integer 1

Job_queue_processes integer 10

Log_archive_max_processes integer 1

Processes integer 150

SQL > create pfile from spfile

The file has been created.

Restart the database, OK!

SQL > shutdown immediate

The database has been closed.

The database has been uninstalled.

The ORACLE routine has been closed.

SQL > startup

The ORACLE routine has been started.

Total System Global Area 171966464 bytes

Fixed Size 787988 bytes

Variable Size 145488364 bytes

Database Buffers 25165824 bytes

Redo Buffers 524288 bytes

The database is loaded.

The database is already open.

SQL > show parameter processes

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 400

SQL > show parameter session

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 0

Session_max_open_files integer 10

Sessions integer 445

Shared_server_sessions integer

SQL >

Note: sessions is a derived value, which is determined by the value of processes. The reference formula is sessions=1.1*process + 5. There are differences in different environments during the experiment.

This is how to set session and processes in the oracle shared by the editor. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report