linux啟動oracle命令
A. linux怎麼進入oracle命令
su –oracle不是必需,適合於沒有DBA密碼時使用,可以不用密碼來進入sqlplus界面。
sqlplus /nolog 或sqlplus system/manager 或./sqlplus system/manager@ora9i。
root用戶登錄linux桌面右擊>open terminal# su - oracle$ sqlplus /nologSQL> conn / as sysdbaSQL>startupSQL>select sysdate from al;之後你就可以使用oracle了。
B. 如何在linux下重啟oracle資料庫
1、打開一個terminal切換到oracle用戶,用oracle用戶修改以下內容,注意要用oraclee用戶編輯,CD到oracle的安裝目錄的bin目錄。
C. 如何在Linux中設置開機自動啟動oracle
對於LINUX 操作系統 有很多技術知識是我們需要學習的。這里我就給大家介紹Linux中設置oracle開機自動啟動的 方法 。一起來看看吧。
Linux中設置oracle開機自動啟動的方法
在terminal中切換到root用戶
查看/etc/oratab文件的內容,其內容如下
[root@golonglee ~]# cat /etc/oratab | grep -v ^$
#
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME::
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
oel63:/home/oracle/app/oracle/proct/11.2.0/dbhome_1:N
使用命令vi /etc/oratab編輯文件/etc/oratab,在最後添加如下內容
##### what I have written is as following
oel63:/home/oracle/app/oracle/proct/11.2.0/dbhome_1:Y
#####Finished wrote in 2015-12-24
說明:/home/oracle/app/oracle/proct/11.2.0/dbhome_1為oracle的安裝目錄,要根據實際情況進行修改。
(注意:圖中我用紅色標記的N要改成Y)
找到最後的內容
oel63:/home/oracle/app/oracle/proct/11.2.0/dbhome_1:N
復制該行oel63:/home/oracle/app/oracle/proct/11.2.0/dbhome_1:N並注釋掉
粘貼該行,並將該行
oel63:/home/oracle/app/oracle/proct/11.2.0/dbhome_1:N最後的N
改為Y
最後按2次ESC鍵,並輸入:wq並按下enter保存,退出
使用命令vi /etc/rc.d/rc.local編輯rc.local文件,添加如下內容
##### what I have written is as following
su oracle -lc "/home/oracle/app/oracle/proct/11.2.0/dbhome_1/bin/lsnrctl start"
su oracle -lc /home/oracle/app/oracle/proct/11.2.0/dbhome_1/bin/dbstart
#####Finished wrote in 2015-12-24
說明:因為第一行命令中有空格所以用雙引號(英文的雙引號)
/home/oracle/app/oracle/proct/11.2.0/dbhome_1為oracle的安裝目錄,要根據實際情況進行修改。
最後按2次ESC鍵,並輸入:wq並按下enter保存,退出,重啟機器,驗證成功。
是不是很簡單呢~快跟著我一起學習吧!!!如果覺得這篇 文章 不錯的話就給我點一個贊吧。
D. linux下怎麼啟動oracle資料庫,命令是什麼
啟動oracle資料庫步驟:x0dx0a首先使用oracle用戶登錄Linux,然後在shell命令行中執行下面的命令:x0dx0a第一步:打開Oracle監聽x0dx0a$ lsnrctl startx0dx0a第二步:進入sqlplusx0dx0a$ sqlplus /nologx0dx0aSQL>x0dx0a第三步:使用sysdab角色登錄sqlplusx0dx0aSQL> conn /as sysdbax0dx0a第四步:啟動資料庫x0dx0aSQL> startupx0dx0a經過上面的四個步驟,oracle資料庫就可以啟動了。x0dx0a關閉資料庫用 shutdown 是要等待事物結束才關閉,強制關閉用 shutdown abort。
E. 如何在linux下重啟oracle資料庫
打開secureCRT,連接到資料庫所在的linux機器。若用戶為root,請輸入命令「su - oracle」並回車,若要密碼,輸入密碼後並回車,就切換到了oracle用戶下。(圖為已切換到oracle用戶下了)
如何在linux下重啟oracle資料庫
關掉oracle的監聽進程:命令為「lsnrctl stop」並回車,這時外部沒法連接到資料庫了。如圖有提示關閉成功信息。
如何在linux下重啟oracle資料庫
先殺掉所有session,小編用的是命令:「ps -ef|grep $ORACLE_SID|grep -v ora_|grep LOCAL=NO|awk '{print $2}'|xargs kill」也可以用其他辦法。然後用sqlplus登錄到資料庫。命令依次為:「sqlplus /nolog」-「connect / as sysdba」 ,最後用命令關閉oracle資料庫"shutdown immediate" 。關閉命令的時候需要等待點時間,成功後會有如圖的提示。
如何在linux下重啟oracle資料庫
用命令"exit"退出sqlplus。然後用命令「lsnrctl start」啟動資料庫的監聽進程。如圖
提示語句表明啟動成功。
如何在linux下重啟oracle資料庫
和第三步一樣,先用sqlplus登錄到資料庫。命令依次為:「sqlplus /nolog」-「connect / as sysdba」。然後輸入命令「startup」並回車。等待幾分鍾會出現如圖提示信息。最後用命令「exit」退出sqlplus。
如何在linux下重啟oracle資料庫
END
注意事項
注意命令不要輸入錯誤。
在關閉資料庫的時候要耐心等待一下。
一定要先殺掉所有session哦。
F. 如何在linux下重啟oracle資料庫
用ssh工具連接linux,按以下步驟操作執行。
1、用oracle用戶登錄進去。
2、export ORACLE_SID=QS5100J; 指定oracle資料庫的instance的名稱。「QS5100J」為oracle的sid名稱。
3、sqlplus /nolog 連接到資料庫的sqlplus中。
4、connect /as sysdba; 出現「Connected to an idle instance.」停止連接到資料庫的應用。
5、shutdown immediate; 關閉資料庫,等待數分鍾。
6、startup; 啟動資料庫。
自動執行:寫在sql文件中,用符號「@」引入文件執行。
以下文件可以放sql文件中執行
connect /as sysdba;
shutdown immediate;
startup;
手動執行:手動時一行一行輸入執行。
使用SSH工具以root用戶登錄到資料庫伺服器後,執行以下命令:
1、啟動資料庫實例
su – oracle
export ORACLE_SID=QS5100Z QS5100Z為資料庫名
sqlplus /nolog
conn / as sysdba
startup
exit
emctl start dbconsole 啟動控制台
2、啟動資料庫監聽
輸入:su – oracle
輸入: lsnrctl start
3、查看是否啟動成功
su - oracle
ps -ef|grep oracle
4、查看oracle監聽狀態
su - oracle
lsnrctl status
G. 如何在linux下啟動和關閉ORCALE資料庫
1. linux下啟動oraclex0dx0asu - oraclex0dx0asqlplus /nologx0dx0aconn /as startx0dx0aexitx0dx0a2. linux下關閉oraclex0dx0asu - oraclex0dx0asqlplus /nologx0dx0aconn /as sysdbax0dx0ashutdown stopx0dx0aexitx0dx0a3、啟孝悶動監聽器x0dx0aoracle@suse92:~> lsnrctl startx0dx0a4、停止監聽器x0dx0aoracle@suse92:~> lsnrctl stopx0dx0a5、查看監聽器狀態x0dx0aoracle@suse92:~> lsnrctlx0dx0aLSNRCTL> statusx0dx0aLSNRCTL> exitx0dx0a6.# setup 可以設置防火牆等信息x0dx0a7.安裝監聽器x0dx0a運行 netca 命令x0dx0alsnrctl startx0dx0alsnrctl stopx0dx0areload listener 重新載入x0dx0aservice listenerx0dx0ahelp 幫助x0dx0aquit 退巧閉彎出x0dx0avi etc/hostsx0dx0a添加 192.168.0.100 chsylinuxx0dx0a資料庫關閉死掉還可以STARTUP FORCEx0dx0a,再糟糕的情況用態做SHUTDOWN ABORT。
H. 如何在linux下重啟oracle資料庫
1.先用在oracle中有dba許可權的用戶登錄linux,用sqlplus連接oracle
執行sqlplus/nolog
2.進入sqlplus界面後,執行conn/assysdba
小等一會提示已連上,再執行
3.shutdownimmediate
等一會兒會提示你oracle已經停了
4.再執行startup
等一會兒會提示你啟動成功
這樣就完成了oracle的重啟
。
I. linux oracle資料庫服務怎麼重啟
linux下重啟oracle資料庫按如下步驟操作:
(1) 以oracle身份登錄資料庫,命令:su – oracle
(2) 進入Sqlplus控制台,命令:sqlplus /nolog
(3) 以系統管理員登錄,命令:connect / as sysdba
(4) 啟動資料庫,命令:startup
(5) 如果是關閉資料庫,命令:shutdown immediate /SHUTDOWN ABORT
(6) 退出sqlplus控制台,命令:exit
(7) 進入監聽器控制台,命令:lsnrctl
(8) 啟動監聽器,命令:start
(9) 退出監聽器控制台,命令:exit
(10) 重啟資料庫結束