DG配置网络报ORA-12514: TNS:listener does not...
DG配置网络报ORA-12514: TNS:listener does not...
配置data guard网络监听的时候,连接测试报错如下:
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
出错原因是由于,在修改init$Oracle_SID.ora文件时,在主库里面新添加了一项db_unique_name=10gpri;
备库上新添加一项db_unique_name=10gstandby.
在配置监听文件和客户端tnsnames.ora时,,就要修改GLOBAL_DBNAME 成相应的10gpri或10standby.
[oracle@dg01 admin]$ cat listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.21.1.30)(PORT = 1521))
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PL***tProc)
(ORACLE_HOME = /u01/oracle/product/10.2.0/db_1 )
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = 10gpri)
(ORACLE_HOME = /u01/oracle/product/10.2.0/db_1)
(SID_NAME = dg01)
)
)
[oracle@dg01 admin]$ cat tnsnames.ora
10gpri=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.21.1.30)(PORT = 1521))
(CONNECT_DATA =
(server=dedicated)
(service_name = 10gpri)
)
)
10gstandby=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.21.1.31)(PORT = 1521))
(CONNECT_DATA =
(server=dedicated)
(service_name = 10gstandby)
)
)
在两个节点上测试如下:
节点dg01:
[oracle@dg01 dbs]$ sqlplus scott/tiger@10gstandby
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 24 03:29:28 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SCOTT_S:138_P:28085_10gstandby> show parameter name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert string
db_name string dg01
db_unique_name string 10gstandby
global_names boolean FALSE
instance_name string dg01
lock_name_space string
log_file_name_convert string
service_names string 10gstandby
节点dg02:
[oracle@dg02 dbs]$ sqlplus scott/tiger@10gpri
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 24 03:29:28 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SCOTT_S:145_P:22710_10gpri> show parameter name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert string
db_name string dg01
db_unique_name string 10gpri
global_names boolean FALSE
instance_name string dg01
lock_name_space string
log_file_name_convert string
service_names string 10gpri

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)
