使用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{\¶meter_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.

相关推荐
IT_10248 小时前
Spring Boot项目开发实战销售管理系统——数据库设计!
java·开发语言·数据库·spring boot·后端·oracle
丶意冷13 小时前
mybatisPlus分页方言设置错误问题 mybatisPlus对于Oceanbase的Oracle租户分页识别错误
java·数据库·oracle·oceanbase
坤坤不爱吃鱼17 小时前
【MySQL\Oracle\PostgreSQL】迁移到openGauss数据出现的问题解决方案
mysql·postgresql·oracle
晋阳十二夜1 天前
【压力测试之_Jmeter链接Oracle数据库链接】
数据库·oracle·压力测试
AI、少年郎1 天前
Oracle 进阶语法实战:从多维分析到数据清洗的深度应用(第四课)
数据库·oracle
cpsvps2 天前
触发器设计美国VPS:优化数据库性能的关键策略
数据库·oracle
我科绝伦(Huanhuan Zhou)11 天前
Oracle|Oracle SQL*Plus 配置上下翻页功能
数据库·sql·oracle
曹牧12 天前
Oracle获取前100条记录
数据库·oracle
Lightning_201712 天前
Neo4j.5.X社区版创建数据库和切换数据库
数据库·oracle·neo4j
远方160912 天前
72-Oralce Temporay tablespace(单实例和多租户下的管理)
大数据·数据库·sql·oracle·database