[20180208]ezconnect語法.txt
[20180208]ezconnect語法.txt
--昨天看書Oracle Database11g DBA Handbook.pdf,Using Easy Connect Naming P561.發現如下內容:
connect username/password@[//]host[:port][/service_name][/server][/instance_name]
Element Description
// Optional. Specify // for a URL.
Host Required. Specify the host name or the IP address.
Port Optional. Specify the port or use the default (1521).
service_name Optional. Specify the service name. The default value is the host name of the database server.
server Optional. Also known as connect_type in OCI, specifies the type of service handler: dedicated, shared, or pooled.
instance_name Optional. Corresponds to the INSTANCE_NAME initialization parameter.
For URL or JDBC connections, prefix the connect identifier with a double slash (//):
connect username/password@[//][host][:port][/service_name]
--//如果透過ezconnect連線資料庫特定例項,可以這樣:
sqlplus system/xxxxxxxxxxxx@192.168.aa.bb:1521/fyhis:dedicated/fyhis1
SYSTEM@192.168.aa.bb:1521/fyhis:dedicated/fyhis1> select INSTANCE_NUMBER,INSTANCE_NAME from v$instance ;
INSTANCE_NUMBER INSTANCE_NAME
--------------- ----------------
1 fyhis1
sqlplus system/xxxxxxxxxxxx@192.168.aa.bb:1521/fyhis:dedicated/fyhis2
SYSTEM@192.168.aa.bb:1521/fyhis:dedicated/fyhis2> select INSTANCE_NUMBER,INSTANCE_NAME from v$instance ;
INSTANCE_NUMBER INSTANCE_NAME
--------------- ----------------
2 fyhis2
--//這樣可以連線不同例項.這樣寫也可以:
sqlplus system/xxxxxxxxxxxx@192.168.aa.bb:1521/fyhis:/fyhis1
sqlplus system/xxxxxxxxxxxx@192.168.aa.bb:1521/fyhis:/fyhis2
sqlplus system/xxxxxxxxxxxx@192.168.aa.bb:1521/fyhis/fyhis1
sqlplus system/xxxxxxxxxxxx@192.168.aa.bb:1521/fyhis/fyhis2
--//註文件有誤,應該是這樣,server前使用:.
connect username/password@[//]host[:port][/service_name][:server][/instance_name]
R:\>sqlplus system/xxxxxxxxxxxx@192.168.aa.bb:1521/fyhis/dedicated/fyhis2
SQL*Plus: Release 12.1.0.1.0 Production on Thu Feb 8 08:59:26 2018
Copyright (c) 1982, 2013, Oracle. All rights reserved.
ERROR:
ORA-12521: TNS:listener does not currently know of instance requested in connect descriptor
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2150938/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20161212]ezconnect與共享服務模式.txt模式
- [20160213]關於ansi語法.txt
- CMakeLists.txt 語法介紹與例項演練
- [20230905]奇怪的語法.txt
- [20160809]exp語法問題.txt
- [20160803]exp/imp語法問題.txt
- [2016026]12c lateral語法.txt
- EZCONNECT方式連線服務端服務端
- 【EZCONNECT】 sqlnet.ora檔案中EZCONNECT引數與Easy Connect Naming Method方法SQL
- [20180912]關於ANSI joins語法.txt
- [20200227]使用tcpdump or and ()語法問題.txtTCP
- 11g下sqlnet.ora及EZCONNECTSQL
- 英語語法
- JavaScript 新語法 「雙問號語法」與「可選鏈語法」JavaScript
- [20150724]無法通過sql_id找到sql語句.txtSQL
- sql case語法和plsql case語法!SQL
- [一、基本語法]1基本語法概述
- 語法與語義
- Wfurent 語語法概述
- protobuf 語法,proto3 語法參考
- Dart語法篇之基礎語法(一)Dart
- JAVA語法糖和語法糖編譯Java編譯
- dockerfile 語法Docker
- markdown 語法
- 模板語法
- SQL語法SQL
- 語法糖
- Makedown語法
- JavaScript語法JavaScript
- Emmet語法
- jQuery 語法jQuery
- jQuery語法jQuery
- JS語法JS
- Octave語法
- COPY語法
- Explain語法AI
- Progress語法
- smarty語法