使用sqlplus的easy connect时如何指定是链接到shared server还是dedicated process

server/2025/1/16 5:44:15/

oracle配置了shared server的情况下
可以使用 :shared来指定链接到shared server也可以默认不指定 不指定的情况下会默认链接到shared server
如果想链接到 dedicated process 则必须显式指定链接到dedicated process
server type的类型包括DEDICATED, SHARED, or POOLED.

[Fri Jan 10 19:59:26][152395][oracle@nshqap04adm05:/u01/app/orabase/23c/dbhome1/bin][0]$ ./sqlplus ‘sys/cdb1@nshqap04-scan5:1521/cdb1pdb10001:shared as sysdba’

SQL> oradebug setmypid
Statement processed.
SQL> oradebug tracefile_name
/u01/log/main250105/diag/rdbms/cdb1/cdb11/trace/cdb11_s499_139545.trc

[Fri Jan 10 20:07:15][152395][oracle@nshqap04adm05:/u01/app/orabase/23c/dbhome1/bin][0]$ ./sqlplus ‘sys/cdb1@nshqap04-scan5:1521/cdb1pdb10001 as sysdba’

SQL> oradebug setmypid
Statement processed.
SQL> oradebug tracefile_name
/u01/log/main250105/diag/rdbms/cdb1/cdb11/trace/cdb11_s499_139545.trc

以上两种方式都链接到了 shared server process

下面只有显式的指定 dedicated 才会链接到dedicated process上面去

[Fri Jan 10 20:08:46][152395][oracle@nshqap04adm05:/u01/app/orabase/23c/dbhome1/bin][0]$ ./sqlplus ‘sys/cdb1@nshqap04-scan5:1521/cdb1pdb10001:dedicated as sysdba’

SQL> oradebug setmypid
Statement processed.
SQL> oradebug tracefile_name
/u01/log/main250105/diag/rdbms/cdb1/cdb12/trace/cdb12_ora_392089.trc

Oracle 19c Easy Connect Plus

In Oracle Database 19c a new feature is introduced called “Easy Connect Plus” that will enhance connection string syntax.

Easy Connect Plus will make it easier to use features such as TLS connections, wallets, load balancing, connection timeouts, and to tune network buffer sizes without external configuration.

The following is an example of the traditional easy connect syntax against a pluggable database:

SQL> connect emad/password@dbhost.example.com:1521/pdb1

Where port number is “optional” in the command syntax, in my example its 1521

The following is Easy Connect syntax structure that is available in Oracle Database drivers (JDBC,

ODP.Net, cx_Oracle, node-oracledb etc) that use Oracle Client 19c and connect to Oracle Database 11.2 or later.

[[protocol:]//]host1{,host2}[:port1]{,host2:port2}[/[service_name][:

server_type][/instance_name]][?parameter_name=value{&parameter_name=

value}]

Protocol: transport protocol to be used while connecting to the database

host. In 19c, the supported values of protocol are TCP and TCPS. The default is TCP.

Hosts: The host list is a comma-separated list of host names or IP addresses which are used to connect to a database.

Ports: Port numbers indicate the ports that the database services are listening on.

When using multiple hosts, if the same port is used on each host, then you can use:

host1,host2:port Otherwise you can indicate different ports should be used:

host1:port1,host2:port2

Service Name:The service name is the service the database is known by. It is a name comprised of the database name and domain name, entered during installation or database creation.Service names can be found by running “lsnrctl services” on the database host.Note that database “system identifiers“ (SIDs) cannot be used in Easy Connect or Easy Connect Plus syntax.

Server Type: The server type specifies what kind of server is used on the database host to handle the connection. It can be one of DEDICATED, SHARED, or POOLED.

Instance Name: to connect to a specific instance that the service represents, you can use an instance name.

Parameters: Parameters are name-value pairs that control the behavior of connections. The syntax uses ‘?’ to indicate start of parameters and a ‘&’ delimiter between each parameter. Leading and trailing white spaces are ignored within parameter values. If whitespace is required as part of the value, it should be placed within double quotes. Parameters are described in the next section.


http://www.ppmy.cn/server/158431.html

相关文章

计算机视觉算法实战——吸烟人员检测

✨个人主页欢迎您的访问 ✨期待您的三连 ✨ ✨个人主页欢迎您的访问 ✨期待您的三连 ✨ ✨个人主页欢迎您的访问 ✨期待您的三连✨ ​​​​​​ ​​​​​​​​​​​​ ​​​​​ 1. 领域介绍✨✨ 计算机视觉是人工智能的一个重要分支,旨在通过算法让计算机…

数字孪生笔记 1 工业数字孪生的意义

什么是工业数字孪生? 很多在做这个工作研究的同学最开始都想问的一个问题。到底什么才是数字孪生?我在五年前做数字孪生的时候也在思考这个问题。五年时间从数字孪生兴起,到元宇宙爆发,再到数字孪生和元宇宙没人提起,…

【网络】:网络编程套接字

目录 源IP地址和目的IP地址 源MAC地址和目的MAC地址 源端口号和目的端口号 端口号 VS 进程ID TCP协议和UDP协议 网络字节序 字符串IP和整数IP相互转换 查看当前网络的状态 socket编程接口 socket常见API 创建套接字(socket) 绑定端口号&…

C# XPTable 日期字段处理(XPTable控件使用说明十三)

1、SQLite数据库定义为日期类型 2、XPtable中日期字段定义与显示 //显示时间表columnModel1.Columns.Clear();columnModel1.Columns.Add(new NumberColumn("id", 30));NumberColumn numberColumn new NumberColumn("次数", 50);numberColumn.Maximum 100…

CentOS 和 Ubantu你该用哪个

文章目录 **一、CentOS 和 Ubuntu 的详细介绍****1. CentOS****1.1 基本信息****1.2 特点****1.3 缺点** **2. Ubuntu****2.1 基本信息****2.2 特点****2.3 缺点** **二、CentOS 和 Ubuntu 的异同****1. 相同点****2. 不同点****3. 使用体验对比** **三、总结和选择建议** Cent…

Unity的四种数据持久化方式

目录 什么是数据持久化 数据持久化之PlayerPrefs 概述 API及用法 电脑中存放的位置 优缺点 主要用处 封装PlayerPrefs 数据持久化之XML XML是什么 读取XML信息 C#读取XML的方法有几种 读取xml文件信息 读取元素和属性信息 总结 写入XML信息 选择存储目录 存储…

springboot vue uniapp 仿小红书 1:1 还原 (含源码演示)

线上预览: 移动端 http://8.146.211.120:8081/ 管理端 http://8.146.211.120:8088/ 小红书凭借优秀的产品体验 和超高人气 目前成为笔记类产品佼佼者 此项目将详细介绍如何使用Vue.js和Spring Boot 集合uniapp 开发一个仿小红书应用,凭借uniapp 可以在h5 小程序 app…

FilmMusic

电影推荐 《五朵金花》《沉睡魔咒》《三国之见龙卸甲》《灰姑娘》《正义联盟》《沉睡魔咒2》 《神奇女侠》《神奇女侠》HD中字在线观看 - 影视天堂 《野性的呼唤》《野性的呼唤2020》HD中字在线观看 - 影视天堂 《毒液2》《小马王》《秦时明月之百步飞剑》《秦时明月之夜尽…