1)服務器端配置Listener
添加Listeners
2)啟動Net
3)停止Net
4)參數文件摘要
5)客戶端配置
1)服務器端配置Listener
執行/ora/bin/netasst
填寫描述
查看生成的 Net
[oracle@lin admin]$ more listener
# LISTENER
# Generated by Oracle Net
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =
(PROTOCOL_STACK =
(PRESENTATION = TTC)
(SESSION = NS)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME = /ora)
(SID_NAME = ora
)
)
### 如果指明監聽服務的
2)啟動Net
首先你可以這樣取得幫助
[oracle@lin /ora]$ lsnrctl
LSNRCTL> help
然後開始啟動
[oracle@lin bin]$ lsnrctl start
聯接時
LSNRCTL for Linux: Version
(c) Copyright
Starting /ora/bin/tnslsnr: please wait
TNSLSNR for Linux: Version
System parameter file is /ora/network/admin/listener
Log messages written to /ora/network/log/listener
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=
(PROTOCOL_STACK=(PRESENTATION=TTC)(SESSION=NS)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=
(PROTOCOL_STACK=(PRESENTATION=TTC)(SESSION=NS)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version
Start Date
Uptime
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /ora/network/admin/listener
Listener Log File /ora/network/log/listener
Services Summary
ora
The command completed successfully
以上提示說
3)停止Net
最簡單的方法是 [oracle@lin /ora]$ lsnrctl stop
有時侯
這裡有一個強硬的手段
[oracle@lin /ora]$ ps
oracle
或使用更少的參數也能找到tnslsnr:
[oracle@lin /ora]$ ps
PID TTY TIME CMD
現在殺死PID =
[oracle@lin /ora]$ kill
LSNRCTL象 SVRMGRL一樣
[oracle@lin bin]$ lsnrctl stop
LSNRCTL for Linux: Version
(c) Copyright
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=
(PROTOCOL_STACK=(PRESENTATION=TTC)(SESSION=NS)))
The command completed successfully
Listeners =DataBase Name = Global DB Name =ora
[oracle@lin oracle]$ cd /ora/net*/ad*
[oracle@lin admin]$ ls
listener
namesdrp
下面是在 Windwos NT/
4)參數文件摘要
[oracle@lin admin]$ more /u
db_name = ora
instance_name = ora
service_names = ora
control_files = (
db_block_buffers =
shared_pool_size =
log_checkpoint_interval =
log_checkpoint_timeout =
processes =
log_buffer =
log_archive_start = true
log_archive_dest_
log_archive_format = %t_%s
# 切記打開回滾段
rollback_segments = (r
# global_names = false ### 監聽服務無需指明
# oracle_trace_enable = true
# define directories to store trace and alert files
background_dump_dest = /u
core_dump_dest = /u
user_dump_dest = /u
db_block_size =
remote_login_passwordfile = exclusive
os_authent_prefix =
compatible =
[oracle@lin admin]$ more tnsnames
# TNSNAMES
# Generated by Oracle Net
使用net
[oracle@lin /ora]$ netass* 添加Service: 名稱ora
PROTOCOL=TCP HOST=
機器解釋成一個Oracle服務器地址包
( DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=
(PROTOCOL_STACK=(PRESENTATION=TTC)(SESSION=NS))
)
一般說來
Windows 客戶端網絡配置與此類似
ORA
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =
(CONNECT_DATA = (SID = ora
)
在Windows
只要理解以上oracle結構原理
copy CD
copy CD
我不久前有這麼一次經歷
From:http://tw.wingwit.com/Article/program/Oracle/201311/18835.html