oracle啟動監聽linux
㈠ linux下如何用命令來配置oracle11g的監聽
這個不是命令配置的,是改文件
如果是服務端:
$ORACLE_HOME/network/ADMIN目錄,修改LISTENER.ORA
到$ORACLE_HOME/bin下,通過lnsrctl start啟動監聽 lnsrctl stop | lnsrctl status 分別是停止監聽和查看監聽狀態
如果是客戶端:
$ORACLE_HOME/network/ADMIN目錄,修改tnsnames.ora
==========================================================
配置LISTENER.ORA的demo:
LISTENER =
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
#BEQUEATH CONFIG
(GLOBAL_DBNAME=salesdb.mycompany)
(SID_NAME=sid1)
(ORACLE_HOME=/private/app/oracle/proct/8.0.3)
#PRESPAWN CONFIG
(PRESPAWN_MAX=20)
(PRESPAWN_LIST=
(PRESPAWN_DESC=(PROTOCOL=tcp)(POOL_SIZE=2)(TIMEOUT=1))
)
)
)
配置tnsnames.ora的demo:
ora_xxx =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ora11g) <-----這個地方填SID_NAME也行
)
)
㈡ linux下啟動oracle監聽時報錯
錯誤:
[oracle@Oora log]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Proction on 18-12月-2009 17:22:17
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /opt/app/oracle/proct/10.2.0/db_1/bin/tnslsnr: please wait...
TNS-12537: TNS:connection closed
TNS-12560: TNS:protocol adapter error
TNS-00507: Connection closed
Linux Error: 29: Illegal seek
[oracle@ora log]$
解決辦法:
1:查看/etc/hosts文件,一定要包含以下語句:
127.0.0.1 localhost.localdomain localhost
2:保證下面2個文件標紅的內容要完全一樣
修改listener.ora文件
默認情況下該文件內容:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =你的伺服器IP地址)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
修改tnsnames.ora文件
默認情況下該文件內容
orcl =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =你的伺服器IP地址)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
㈢ 如何查看和開啟oracle監聽和服務
1、檢查oracle監聽服務運行狀態,輸入lsnrctl status命令來查看,看到提示信息TNS:no listener,表示監聽沒有啟動,
㈣ linux怎樣啟動oracle監聽
我用的是redhat
linux,用下面的步驟來啟動oracle資料庫。
首先使用oracle用戶登錄linux,然後在shell命令行中執行下面的命令:
第一步:打開oracle監聽
$
lsnrctl
start
第二步:進入sqlplus
$
sqlplus
/nolog
sql>
第三步:使用sysdab角色登錄sqlplus
sql>
conn
/as
sysdba
第四步:啟動資料庫
sql>
startup
經過上面的四個步驟,oracle資料庫就可以啟動了。
㈤ linux下oracle資料庫啟動監聽報目標主機不存在,但是hosts文件里已經配置
1、cat $ORACLE_HOME/network/admin/listener.ora
修改HOST=0.0.0.0或主機IP
(ADDRESS = (PROTOCOL = TCP)(HOST = server10)(PORT = 1521))
2、netstat -ntlp
3、ifconfig -a
㈥ Linux如何設置Oracle實例和監聽自啟動
設置Oracle 實例和監聽服務自啟動 1. 增加啟動腳本 touch /etc/init.d/orcl vi orcl # !/bin/bash # whoami # root # chkconfig: 345 51 49 # /etc/init.d/orcl # description: starts the oracle dabase deamons # ORA_HOME=/home/oracle/proct/10.2.0/db_1/ ORA_OWNER=oracle case "{GetProperty(Content)}" in start) echo -n "Starting orcl: " su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart" & su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start" touch /var/lock/subsys/orcl echo ;; stop) echo -n "shutting down orcl: " su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut" & su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop" rm -f /var/lock/subsys/orcl echo ;; restart) echo -n "restarting orcl: " {GetProperty(Content)} stop {GetProperty(Content)} start echo ;; *) echo "Usage: `basename {GetProperty(Content)}` start|stop|restart" exit 1 esac exit 0 保存orcl 並退出 2. 增加配置服務 /sbin/chkconfig --add orcl 3. 修改 /etc/oratab 文件 vi /etc/oratab ORACLE_SID:ORACLE_HOME:Y -- 是否自啟動 4. 重啟測試一下 或者簡單的配置 /etc/rc.d/rc.local 增加兩條啟動命令 su - oracle -c /home/oracle/proct/10.2.0/db_1/bin/dbstart su - oracle -c /home/oracle/proct/10.2.0/db_1/bin/lsnrctl start
㈦ Linux下oracle啟動監聽報錯,弄了一整天了
1:查看/etc/hosts文件,一定要配置好本機的代稱localhost,要包含以下語句:
127.0.0.1 localhost.localdomain localhost
2:查看listener.ora與tnsnames.ora裡面的HOST 配置的是否一致。
㈧ linux操作系統下oracle資料庫如何配置監聽
1. 修改監聽器配置文件
Linux下Oracle監聽器配置文件在:$ ORACLE_HOME/network/admin/listerer.ora, 如:
/bank/oracle/oracle10g/proct/10.2.0/network/admin/listener.ora
修改並配置要監聽SID的相關信息,如:
#listener.ora Network Configuration File: /bank/oracle/oracle10g/proct/10.2.0/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /bank/oracle/oracle10g/proct/10.2.0)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL DBNAME = bkserver)
(SID_NAME = bkserver)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.7.13.242)(PORT = 1521))
)
)
2. 啟動監聽器
(1). 切換至oracle安裝用戶(一般為oracle)
su - oracle
(2). 啟動監聽器
lsnrctl start
另:停止監聽器
lsnrctl stop
3. 測試監聽器是否運行正常
在客戶端修改tnsnames.ora配置文件就訪問Oracle資料庫,如:
BKSERVER =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.7.13.242)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = BKSERVER)
)
)
通過命令tnsping測試是否能訪問到監聽器,如:
M:\>tnsping bkserver
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Proction on 12-8月 -
2010 17:11:04
Copyright (c) 1997, 2005, Oracle. All rights reserved.
已使用的參數文件:
D:\oracle\proct\10.2.0\client_1\network\admin\sqlnet.ora
已使用 TNSNAMES 適配器來解析別名
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = 10.7.13.242)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVIC
E_NAME = BKSERVER)))
OK (20 毫秒)
注意: 監聽器是否能被tnsping通跟資料庫的開啟/關閉無關,所以就算可以tnsping通監聽器但未必能連接到資料庫,這時請檢查listener.ora文件配置信息是否正確,還有資料庫是否已經被開啟。
㈨ 如何在linux suse中安裝Oracle 11g創建監聽
在linux suse中安裝Oracle 11g創建監聽的步驟:
在本地oracle用戶模式下 oracle@linux-udly:~> netca
接下來按圖一直點擊NEXT
此處可以修改oracle監聽器的埠號