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

Understand the shared and private connections of oracle

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

In dedicated connection mode, client connection only supports dedicated connection; in shared connection mode, either dedicated connection mode or shared connection mode can be used;

Dedicated connection mode: a client connection corresponds to a server process, one-to-one;

Shared connection mode: multiple client connections correspond to a server process, and there is a process dispatcher on the server side to manage, many-to-many;

look at the picture

shared connection

dedicated connection

Check whether oracle database server is in shared or private connection mode

The following test is dedicated mode and uses shared mode to connect to the login database with an error

Change the server back to DEDICATED and log in.

So how do I change the database to shared mode?

2 dispatchers are configured, with a maximum of 5 dispatchers;

alter system set dispatchers ='(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.3.168))(DISPATCHERS=2)';--It is recommended to write host here. If you do not write it, you need to add a host name and ip corresponding record to the hosts file on the connected computer, otherwise you will report error ora-12545;

alter system set max_dispatchers=5;

Configure the number of shared server processes

alter system set shared_servers=5;--Sets the current shared server process to 5

alter system set max_shared_servers=15;--Max shared server process is 15

alter system set shared_server_sessions=100;--Set the number of shared connection sessions, which cannot exceed the number of sessions

Change tnsname.ora's connection mode to shared

Connection successful, query v$session dynamic performance view, connection mode is both dedicated and shared

Find all dispatchers

Finally, I will teach you a simple way to connect.

Grammar:

connect username/password @ hostname (or IP address): port number/instance name

For example: sqlplus sys/123456@192.168.3.168:1521/orcl

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