当前位置: 首页 > news >正文

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

在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.lryc.cn/news/521323.html

相关文章:

  • ubuntu22.4 ROS2 安装gazebo(环境变量配置)
  • 【机器学习:十四、TensorFlow与PyTorch的对比分析】
  • [C++]类与对象(上)
  • 大数据技术实训:Zookeeper集群配置
  • HTML5 加载动画(Loading Animation)
  • C语言进阶-2指针(一)
  • 【人工智能】用Python进行对象检测:从OpenCV到YOLO的全面指南
  • 《深度剖析算法优化:提升效率与精度的秘诀》
  • Mysql--重点篇--索引(索引分类,Hash和B-tree索引,聚簇和非聚簇索引,回表查询,覆盖索引,索引工作原理,索引失效,索引创建原则等)
  • matlab使用 BP 神经网络进行数据预测的完整流程,包括数据读取、数据预处理等等
  • systemd-networkd NetworkManager 介绍
  • 本地部署项目管理工具 Leantime 并实现外部访问
  • PHP cURL 函数初学者完全指南
  • C#中的Array数组,List集合和ArrayList集合--07
  • 基于深度学习的视觉检测小项目(十三) 资源文件的生成和调用
  • 硬件实用技巧:TPS54331DR横杠标识识别1引脚
  • 《C++11》nullptr介绍:从NULL说起
  • 自然语言处理基础:全面概述
  • 网络安全的几种攻击方法
  • 国内源快速在线安装qt5.15以上版本。(10min安装好)(图文教程)
  • 【pycharm发现找不到python打包工具,且无法下载】
  • C++ QT 自绘表盘
  • 数据科学与数据工程:两者的区别与交集
  • MAC AndroidStudio模拟器无网络
  • PHP语言的多线程编程
  • 当自动包布机遇上Profinet转ModbusTCP网关,“妙啊”,工业智能“前景无限
  • 浅析大语言模型安全和隐私保护国内外标准和政策
  • OpenCV相机标定与3D重建(54)解决透视 n 点问题(Perspective-n-Point, PnP)函数solvePnP()的使用
  • Chatper 4: Implementing a GPT model from Scratch To Generate Text
  • spring-mvc源码分析v3.3.0