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

使用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.kler.cn/a/503920.html

相关文章:

  • Unity shader中真的可以动态关闭Stencil Test吗?
  • SQL Server 查看数据库表使用空间
  • Hadoop•安装JDK
  • C++并发编程之跨应用程序与驱动程序的单生产者单消费者队列
  • Three.js 用户交互:构建沉浸式3D体验的关键
  • RabbitMQ故障全解析:消费、消息及日常报错处理与集群修复
  • 【01】AE特效开发制作特技-Adobe After Effects-AE特效制作快速入门-制作飞机,子弹,爆炸特效以及导出png序列图-优雅草央千澈
  • 三相无刷电机控制|FOC理论04 - 克拉克变换 + 帕克变换的最终目标
  • ubuntu Android : adb logcat 过滤多个log
  • RAG 测评基线
  • git相关操作
  • Linux入门——权限
  • 学习笔记080——如何备份服务器中Docker创建的MySQL数据库数据?
  • [Linux] GDB 和 CGDB的使用及理解
  • 国产编辑器EverEdit - 打印与打印预览
  • 如何编写和运行 Lua 脚本优化复杂的 Redis 操作
  • 计算机视觉算法实战——视频分析(Video Analysis)
  • Linux 服务器挖矿木马防护实战:快速切断、清理与加固20250114
  • 【自然语言处理】P1 自然语言处理概述
  • 【SpringSecurity】SpringSecurity安全框架登录校验流程与登录配置示例
  • 时序数据库的订阅对比:TDengine vs InfluxDB 谁更强?
  • CentOS 6.8 安装 Nginx
  • 在ES6模块中导入和导出
  • C语言基本知识复习浓缩版:控制语句--分支
  • Flutter路由动画Hero函数的使用
  • 《利用深度神经网络在广角小口径望远镜中实现天文目标的检测与分类》论文精读