1. Environment:Server: RHEL 5
Client: Windows XP
Database version: 10.2.0.1.0
2. Using netca create a listener:configuration file:
- [milo@milo admin]$ pwd
-
/u01/app/oracle/product/10201/db_1/network/admin
-
[milo@milo admin]$ cat listener.ora
-
# listener.ora Network Configuration File: /u01/app/oracle/product/10201/db_1/network/admin/listener.ora
-
# Generated by Oracle configuration tools.
-
-
SID_LIST_LISTENER =
-
(SID_LIST =
-
(SID_DESC =
-
(SID_NAME = PLSE xtProc) #E和x之间空格应该没有, 由于blog有屏蔽, 所以拆分。
-
(ORACLE_HOME = /u01/app/oracle/product/10201/db_1)
-
(PROGRAM = extproc)
-
)
-
)
-
-
LISTENER =
-
(DESCRIPTION_LIST =
-
(DESCRIPTION =
-
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
-
(ADDRESS = (PROTOCOL = TCP)(HOST = milo.com)(PORT = 1521))
-
)
-
)
3. Start listener on server:lsnrctl start
4. Install client software: 10201_client_win32.zipBetter install network utils (including tnsping tool)
5. Client side tnsnames.ora configuration:- MILO =
-
(DESCRIPTION =
-
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.128.129)(PORT = 1521))
-
(CONNECT_DATA =
-
(SERVER = DEDICATED)
-
(SERVICE_NAME = orcl)
-
)
-
)
-
-
EXTPROC_CONNECTION_DATA =
-
(DESCRIPTION =
-
(ADDRESS_LIST =
-
(ADDRESS = (PROTOCOL =IPC)(KEY = EXTPROC1))
-
)
-
(CONNECT_DATA =
-
(SID = PLSE xtProc) #E和x之间空格应该没有, 由于blog有屏蔽, 所以拆分。
-
(PRESENTATION = RO)
-
)
-
)
6. Test setting in client side:Before doing tnsping to check the name service resolve, you should make sure the network between server and client works good.
- C:\Documents and Settings\IBM>tnsping MILO
-
-
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 23-2月 -
-
2011 23:34:17
-
-
Copyright (c) 1997, 2005, Oracle. All rights reserved.
-
-
已使用的参数文件:
-
D:\oracle\product\10.2.0\client_4\network\admin\sqlnet.ora
-
-
已使用 TNSNAMES 适配器来解析别名
-
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.
-
128.129)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl
-
)))
-
OK (80 毫秒)
7. Connect the server side:- D:\>sqlplus /nolog
-
-
SQL*Plus: Release 10.2.0.1.0 - Production on 星期三 2月 23 23:52:30 2011
-
-
Copyright (c) 1982, 2005, Oracle. All rights reserved.
-
-
SQL> conn system@MILO
-
输入口令:
-
已连接。
-
SQL> select instance_name, status from v$instance;
-
-
INSTANCE_NAME STATUS
-
-------------------------------- ------------------------
-
orcl OPEN
NOTE:
I have placed the configuration files in wrong place, so I can't get my result, until I place them to the correct path.The files should place to D:\oracle\product\10.2.0\client_4\network\admin\ ,
NOT D:\oracle\NETWORK\admin.
ALWAYS BE AWARD OF THAT!
阅读(2525) | 评论(0) | 转发(1) |