these days QQ many friends asked about the client network configuration problems, I hope this article can help some friends (previously also wrote an article about using third-party tools to connect the database: http://blog.itpub.net/29876893/viewspace-1465317/). The first is that the database is a single instance, the connection of the database is the private connection mode.
sql> SELECT * from v$version where rownum=1;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-production
first, talk aboutServer-Sidenetwork configuration, you can choose between two ways:
1.
[email protected] ~]$ NETCA
configurable through NETCA, this graphically-based approach is convenient
2. Go directly to the Listener.ora file to configure
static monitoring configuration:
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = Localhost.localdomain) (PORT = 1521))
)
Sid_list_listener =
(sid_list =
(Sid_desc =
(global_dbname = jing)
(oracle_home =/u01/app/oracle/product/11.2.0/dbhome_1)
(sid_name = orcl3939)
)
(Sid_desc =
(global_dbname = Tai)
(oracle_home =/u01/app/oracle/product/11.2.0/dbhome_1)
(sid_name = orcl3939)
)
)
Here'sthe value of the Global_dbname (Jing,tai) is the service name provided to the client, which is the value of the client service_name:
the service "Jing" consists of 1 instances.
The instance "orcl3939", State UNKNOWN, contains 1 handlers for this service ...
the service "Tai" consists of 1 instances.
The instance "orcl3939", State UNKNOWN, contains 1 handlers for this service ...
command execution succeeded
You can also add multiple service names.
If you want to configure dynamic monitoring, very simple, set service_names, the database is registered by default is 1521 port, set up a number of service_names, Oracle background process Pmon will register you, is not very convenient!
If you register the dynamic listening port does not want to be 1521, such as 1522 also set Local_listener=text (alter system set LOCAL_LISTENER=TEXT scope=spfile;)
and add in the Tnsnames.ora file:
Text =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (host = hostname xxxx) (PORT = 1522))
)
)
Let's look at the registration of the Monitoring bar: (note Oh, configure the dynamic monitoring to open the database to start)
[Email protected] ~]$ lsnrctl status
...
... The service "A.localdomain" consists of 1 instances.
Instance "ORCL3939", state ready, contains 1 handlers for this service ...
The service "B.localdomain" consists of 1 instances.
Instance "ORCL3939", state ready, contains 1 handlers for this service ...
The service "C.localdomain" consists of 1 instances.
Instance "ORCL3939", state ready, contains 1 handlers for this service ...
The service "D.localdomain" consists of 1 instances.
Instance "ORCL3939", state ready, contains 1 handlers for this service ...
The service "Jing" consists of 1 instances.
The instance "orcl3939", State UNKNOWN, contains 1 handlers for this service ...
The service "Orcl3939.localdomain" consists of 1 instances.
Instance "ORCL3939", state ready, contains 1 handlers for this service ...
The service "Orcl3939xdb.localdomain" consists of 1 instances.
Instance "ORCL3939", state ready, contains 1 handlers for this service ...
The service "Tai" consists of 1 instances.
The instance "orcl3939", State UNKNOWN, contains 1 handlers for this service ...
...
...
A.localdomain
B.localdomain
C.localdomain
Jing + = can provide services to clients (client's service_name)
Orcl3939.localdomain
Orcl3939xdb.localdomain
Tai
Described belowCustomerEndBar:
There are two ways in which we can configure:
1.Net Manager (Graphical interface is still the comparison of our favorite):
First service naming:
You can write anything here, we write 55.
Host name recommended write IP, port number to see the configuration of server-side monitoring
Here's the service name write what, don't I say more:
A.localdomain
B.localdomain
C.localdomain
Jing
Orcl3939xdb.localdomain
Tai
Our service name has been well-equipped!
Test first:
Below we configure the monitoring: (only to do the following picture, the other is not a problem)
Oracle home directory can be used without writing, global database name and Sid,google please
2. Go directly to the directory to configure the Tnsnames.ora:
55 =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 172.18.115.78) (PORT = 1521))
)
(Connect_data =
(server = dedicated) + Server private Connection mode (if sharing mode is used, the service name needs to write dynamically registered listener)
(service_name = b.localdomain)
)
)
It's not too much to explain here!
Then we tnsping service name!
Ok!
Here's how you connect to the database using third-party tools!
PL/SQL Developer,toad,spotlight ..... The rest of the problem is solved.
Please correct me if the above is wrong.
A little explanation on the client network configuration