oracle dblink問題
192.168.1.10連線192.168.1.20資料庫
1
[oracle@card admin]$ vim tnsnames.ora
20 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.20)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
[oracle@card admin]$ tnsping 20
[oracle@card admin]$ tnsping 20
TNS Ping Utility for Linux: Version 9.0.1.0.0 - Production on 29-APR-2015 09:49:52
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
/home/oracle/OraHome1/network/admin/sqlnet.ora
Used HOSTNAME adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SID=*)(SERVICE_NAME=20.))(ADDRESS=(PROTOCOL=TCP)(HOST=20)(PORT=1521)))
TNS-12532: TNS:invalid argument
出現TNS-12532
解決辦法:
註釋掉預設域名
[oracle@card admin]$ vim sqlnet.ora
#NAMES.DEFAULT_DOMAIN = DEV.CN.TLAN
NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
[oracle@card admin]$ tnsping 20
TNS Ping Utility for Linux: Version 9.0.1.0.0 - Production on 29-APR-2015 09:51:50
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
/home/oracle/OraHome1/network/admin/sqlnet.ora
/home/oracle/OraHome1/network/admin/tnsnames.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.20)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = orcl)))
OK (0 msec)
2 建立dblink
create database link orcl connect to scott identified by tiger using '20';
select * from test@orcl;
ERROR at line 1:
ORA-02085: database link FGOS.REGRESS.RDBMS.DEV.US.ORACLE.COM connects to ORCL
出現錯誤 ORA-02085
解決辦法:
當GLOBAL_NAMES引數設定為TRUE時,使用DATABASE LINK時,DATABASE LINK的名稱必須與被連線庫的GLOBAL_NAME一致。
SQL> show parameter global_names
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
global_names boolean TRUE
SQL> alter system set global_names=false scope=both;
SQL> show parameter global_names
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
global_names boolean FALSE
select * from test@orcl;
歡迎關注我的微信公眾號"IT小Chen",共同學習,共同成長!!!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29785807/viewspace-1609985/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle dblink監聽問題Oracle
- oracle 9i 刪除dblink問題Oracle
- 利用oracle快照dblink解決資料庫表同步問題Oracle資料庫
- oracle DBLink oracleOracle
- ORACLE DBLINKOracle
- Oracle private dblink和pubic dblinkOracle
- oracle DBLink sqlserverOracleSQLServer
- oracle之DBLINKOracle
- SQL Server通過dblink訪問Oracle資料SQLServerOracle
- ORACLE通過透明閘道器建dblink連線Postgresql的幾個問題OracleSQL
- Oracle dblink詳解Oracle
- Oracle建立dblink MySQLOracleMySql
- Oracle dblink介紹Oracle
- Oracle DBLink連線數過多的問題(Ora-02020)Oracle
- 【DBLINK】DBLINK域名問題及與global_name和db_domian的關係
- dblink建立後訪問提示密碼錯誤問題解決密碼
- Oracle dblink詳解(轉)Oracle
- 【PL/SQL】oracle建立dblinkSQLOracle
- 水煮oracle34----oracle dblink詳解Oracle
- ora24756問題處理辦法(dblink迴圈呼叫)
- 配置Oracle DBlink連線MySQL庫OracleMySql
- oracle database link (dblink) 工作原理OracleDatabase
- Oracle SQL performance with database links - dblinkOracleSQLORMDatabase
- 建立oracle dblink 的兩種方式Oracle
- ORACLE碎片問題Oracle
- oracle dblink用法總結和expdp和impdp利用dblink倒入匯出到本地Oracle
- oracle 12c使用dblink克隆pdbOracle
- Oracle DBLINK 抽數以及DDL、DML操作Oracle
- Oracle常見問題一千問Oracle
- Oracle DBLink跨資料庫訪問SQL server資料同步 踩坑實錄Oracle資料庫SQLServer
- Oracle10g中通過透明閘道器、DBLink訪問MySQL資料OracleMySql
- Oracle IO問題解析Oracle
- oracle併發問題Oracle
- oracle IO 問題解析Oracle
- oracle鎖表問題Oracle
- oracle高水位問題Oracle
- oracle 分頁問題Oracle
- oracle AS重啟問題Oracle