對于LINUX 操作系統(tǒng) 有很多技術(shù)知識是我們需要學(xué)習(xí)的。這里我就給大家介紹Linux中設(shè)置oracle開機自動啟動的 方法 。一起來看看吧。
10年積累的成都網(wǎng)站設(shè)計、做網(wǎng)站、成都外貿(mào)網(wǎng)站建設(shè)公司經(jīng)驗,可以快速應(yīng)對客戶對網(wǎng)站的新想法和需求。提供各種問題對應(yīng)的解決方案。讓選擇我們的客戶得到更好、更有力的網(wǎng)絡(luò)服務(wù)。我雖然不認(rèn)識你,你也不認(rèn)識我。但先制作網(wǎng)站后付款的網(wǎng)站建設(shè)流程,更有太和免費網(wǎng)站建設(shè)讓你可以放心的選擇與我們合作。
Linux中設(shè)置oracle開機自動啟動的方法
在terminal中切換到root用戶
查看/etc/oratab文件的內(nèi)容,其內(nèi)容如下
[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/product/11.2.0/dbhome_1:N
使用命令vi /etc/oratab編輯文件/etc/oratab,在最后添加如下內(nèi)容
##### what I have written is as following
oel63:/home/oracle/app/oracle/product/11.2.0/dbhome_1:Y
#####Finished wrote in 2015-12-24
說明:/home/oracle/app/oracle/product/11.2.0/dbhome_1為oracle的安裝目錄,要根據(jù)實際情況進行修改。
(注意:圖中我用紅色標(biāo)記的N要改成Y)
找到最后的內(nèi)容
oel63:/home/oracle/app/oracle/product/11.2.0/dbhome_1:N
復(fù)制該行oel63:/home/oracle/app/oracle/product/11.2.0/dbhome_1:N并注釋掉
粘貼該行,并將該行
oel63:/home/oracle/app/oracle/product/11.2.0/dbhome_1:N最后的N
改為Y
最后按2次ESC鍵,并輸入:wq并按下enter保存,退出
使用命令vi /etc/rc.d/rc.local編輯rc.local文件,添加如下內(nèi)容
##### what I have written is as following
su oracle -lc "/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start"
su oracle -lc /home/oracle/app/oracle/product/11.2.0/dbhome_1/bin/dbstart
#####Finished wrote in 2015-12-24
說明:因為第一行命令中有空格所以用雙引號(英文的雙引號)
/home/oracle/app/oracle/product/11.2.0/dbhome_1為oracle的安裝目錄,要根據(jù)實際情況進行修改。
最后按2次ESC鍵,并輸入:wq并按下enter保存,退出,重啟機器,驗證成功。
是不是很簡單呢~快跟著我一起學(xué)習(xí)吧!!!如果覺得這篇 文章 不錯的話就給我點一個贊吧。
如果是windows操作系統(tǒng):
右鍵單擊“我的電腦”- 管理 - 服務(wù)和應(yīng)用程序 - 服務(wù) - OracleService****(****是你自己的oracle服務(wù)名)右鍵單擊,選啟動;OracleOraDb****TNSListener右鍵單擊,選啟動;
通常如果在自己本機建立使用數(shù)據(jù)庫啟動這兩個就夠了。如果要進入網(wǎng)頁版的oracle,就將所有oracle開頭的服務(wù)都起來;
1.create table test(id int,starttime date,state int);
2.create or replace procedure sp_update is
cursor cur is select * from test where state=0;
v_id int;
v_starttime date;
v_state int;
begin
open cur;
loop
fetch cur into v_id,v_starttime,v_state;
exit when cur%notfound;
update test set state=1 where starttime=sysdate;
commit;
end loop;
close cur;
end;
/
3.創(chuàng)建JOB
SQL variable job1 number;
SQL
SQL begin
2 dbms_job.submit(:job1,sp_update;',sysdate,'sysdate+1/1440'); --每天1440分鐘,即一分鐘運行sp_update過程一次
3 end;
4 /
PL/SQL 過程已成功完成。
運行JOB
SQL begin
2 dbms_job.run(:job1);
3 end;
4 /
在Windows系統(tǒng)中Oracle會以系統(tǒng)服務(wù)的形式出現(xiàn),通過系統(tǒng)服務(wù)來管理即可。
在Unix/Linux中,要調(diào)度啟動Oracle就需要自己寫shell腳本程序了,然后通過crontab來定時調(diào)度
網(wǎng)站名稱:如何定時啟動oracle 如何定時啟動abaqus軟件
文章來源:http://jinyejixie.com/article26/hepgjg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供響應(yīng)式網(wǎng)站、外貿(mào)建站、網(wǎng)站設(shè)計公司、手機網(wǎng)站建設(shè)、微信公眾號、網(wǎng)站改版
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)