真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

怎么隨系統(tǒng)systemctl啟動(dòng)數(shù)據(jù)庫(kù)

本篇內(nèi)容主要講解“怎么隨系統(tǒng)systemctl啟動(dòng)數(shù)據(jù)庫(kù)”,感興趣的朋友不妨來(lái)看看。本文介紹的方法操作簡(jiǎn)單快捷,實(shí)用性強(qiáng)。下面就讓小編來(lái)帶大家學(xué)習(xí)“怎么隨系統(tǒng)systemctl啟動(dòng)數(shù)據(jù)庫(kù)”吧!

成都創(chuàng)新互聯(lián)公司專注于企業(yè)成都全網(wǎng)營(yíng)銷推廣、網(wǎng)站重做改版、江西網(wǎng)站定制設(shè)計(jì)、自適應(yīng)品牌網(wǎng)站建設(shè)、H5技術(shù)、購(gòu)物商城網(wǎng)站建設(shè)、集團(tuán)公司官網(wǎng)建設(shè)、外貿(mào)營(yíng)銷網(wǎng)站建設(shè)、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁(yè)設(shè)計(jì)等建站業(yè)務(wù),價(jià)格優(yōu)惠性價(jià)比高,為江西等各大城市提供網(wǎng)站開(kāi)發(fā)制作服務(wù)。

一、          修改oratab文件

[root@adg19c ~]# grep woo /etc/oratab 
woo:/DBSoft/oracle/product/19.3/dbhome_1:N
 
[root@adg19c ~]# sed -i 's/:N/:Y/' /etc/oratab 
[root@adg19c ~]# grep woo /etc/oratab 
woo:/DBSoft/oracle/product/19.3/dbhome_1:Y

二、          編輯ora19c調(diào)用文件

[root@adg19c ~]# cat /usr/local/ora19c.sh
#! /bin/bash
echo ################################
echo #  script  For orac19c.service #
echo ################################
 
/DBSoft/oracle/product/19.3/dbhome_1/lsnrctl start
/DBSoft/oracle/product/19.3/dbhome_1/bin/dbstart /DBSoft/oracle/product/19.3/dbhome_1/
~
[root@adg19c ~]# chmod +x /usr/local/ora19c.sh

三、          編輯ora19c服務(wù)配置文件

[root@adg19c ~]# cat /etc/systemd/system/ora19c.service
[Unit]
Description=Oracle19c
After=syslog.target network.target
[Service]
LimitMEMLOCK=infinity
LimitNOFILE=65535
Type=oneshot
RemainAfterExit=yes
User=oracle
Environment="ORACLE_HOME=/DBSoft/oracle/product/19.3/dbhome_1"
ExecStart=/usr/local/ora19c.sh
[Install]
WantedBy=multi-user.target

四、          啟動(dòng)數(shù)據(jù)庫(kù)

[root@adg19c ~]# systemctl enable ora19c.service
[root@adg19c ~]# systemctl start ora19c.service
[root@adg19c ~]# systemctl status ora19c.service
* ora19c.service - Oracle19c
   Loaded: loaded (/etc/systemd/system/ora19c.service; enabled; vendor preset: disabled)
   Active: active (exited) since Thu 2020-03-12 18:26:26 CST; 11s ago
  Process: 4607 ExecStart=/usr/local/ora19c.sh (code=exited, status=0/SUCCESS)
 Main PID: 4607 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/ora19c.service
           `-4611 /DBSoft/oracle/product/19.3/dbhome_1/bin/tnslsnr LISTENER -inherit
 
Mar 12 18:26:25 adg19c ora19c.sh[4607]: SNMP                      OFF
Mar 12 18:26:25 adg19c ora19c.sh[4607]: Listener Parameter File   /DBSoft/oracle/product/19.3/dbhome_1/network/admin/listener.ora
Mar 12 18:26:25 adg19c ora19c.sh[4607]: Listener Log File         /DBSoft/oracle/diag/tnslsnr/adg19c/listener/alert/log.xml
Mar 12 18:26:25 adg19c ora19c.sh[4607]: Listening Endpoints Summary...
Mar 12 18:26:25 adg19c ora19c.sh[4607]: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adg19c)(PORT=1521)))
Mar 12 18:26:25 adg19c ora19c.sh[4607]: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Mar 12 18:26:25 adg19c ora19c.sh[4607]: The listener supports no services
Mar 12 18:26:25 adg19c ora19c.sh[4607]: The command completed successfully
Mar 12 18:26:25 adg19c ora19c.sh[4607]: Processing Database instance "woo": log file /DBSoft/oracle/product/19.3/dbhome_1/rd...tup.log
Mar 12 18:26:26 adg19c systemd[1]: Started Oracle19c.
Hint: Some lines were ellipsized, use -l to show in full.

五、          完全啟動(dòng)之后狀態(tài):

[root@adg19c ~]# systemctl status ora19c.service
* ora19c.service - Oracle19c
   Loaded: loaded (/etc/systemd/system/ora19c.service; enabled; vendor preset: disabled)
   Active: active (exited) since Thu 2020-03-12 18:30:01 CST; 57min ago
  Process: 1177 ExecStart=/usr/local/ora19c.sh (code=exited, status=0/SUCCESS)
 Main PID: 1177 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/ora19c.service
           |-1350 /DBSoft/oracle/product/19.3/dbhome_1/bin/tnslsnr LISTENER -inherit
           |-1481 ora_pmon_woo
           |-1483 ora_clmn_woo
           |-1485 ora_psp0_woo
           |-1490 ora_vktm_woo
           |-1494 ora_gen0_woo
           |-1496 ora_mman_woo
           |-1500 ora_gen1_woo
           |-1503 ora_diag_woo
           |-1505 ora_ofsd_woo
           |-1508 ora_dbrm_woo
           |-1510 ora_vkrm_woo
           |-1512 ora_svcb_woo
           |-1514 ora_pman_woo
           |-1516 ora_dia0_woo
           |-1518 ora_dbw0_woo
           |-1520 ora_lgwr_woo
           |-1522 ora_ckpt_woo
           |-1524 ora_lg00_woo
           |-1526 ora_smon_woo
           |-1528 ora_lg01_woo
           |-1530 ora_smco_woo
           |-1532 ora_reco_woo
           |-1534 ora_w000_woo
           |-1536 ora_lreg_woo
           |-1538 ora_w001_woo
           |-1540 ora_pxmn_woo
           |-1544 ora_mmon_woo
           |-1546 ora_mmnl_woo
           |-1548 ora_d000_woo
           |-1550 ora_s000_woo
           |-1552 ora_tmon_woo
           |-1575 ora_m000_woo
           |-1579 ora_p000_woo
           |-1581 ora_p001_woo
           |-1583 ora_p002_woo
           |-1585 ora_tt00_woo
           |-1588 ora_tt01_woo
           |-1590 ora_tt02_woo
           |-1594 ora_aqpc_woo
           |-1598 ora_p003_woo
           |-1600 ora_p004_woo
           |-1602 ora_p005_woo
           |-1604 ora_p006_woo
           |-1606 ora_p007_woo
           |-1609 ora_cjq0_woo
           |-1611 ora_w002_woo
           |-1858 ora_m001_woo
           |-1860 ora_m002_woo
           |-1862 ora_m003_woo
           |-1890 ora_w003_woo
           |-1898 ora_w004_woo
           |-1900 ora_qm02_woo
           |-1906 ora_q003_woo
           |-1947 ora_q00f_woo
           |-2456 ora_w005_woo
           |-2460 ora_w006_woo
           `-2469 ora_w007_woo
 
Mar 12 18:29:48 adg19c ora19c.sh[1177]: SNMP                      OFF
Mar 12 18:29:48 adg19c ora19c.sh[1177]: Listener Parameter File   /DBSoft/oracle/product/19.3/dbhome_1/network/admin/listener.ora
Mar 12 18:29:48 adg19c ora19c.sh[1177]: Listener Log File         /DBSoft/oracle/diag/tnslsnr/adg19c/listener/alert/log.xml
Mar 12 18:29:48 adg19c ora19c.sh[1177]: Listening Endpoints Summary...
Mar 12 18:29:48 adg19c ora19c.sh[1177]: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adg19c)(PORT=1521)))
Mar 12 18:29:48 adg19c ora19c.sh[1177]: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Mar 12 18:29:48 adg19c ora19c.sh[1177]: The listener supports no services
Mar 12 18:29:48 adg19c ora19c.sh[1177]: The command completed successfully
Mar 12 18:29:48 adg19c ora19c.sh[1177]: Processing Database instance "woo": log file /DBSoft/oracle/product/19.3/dbhome_1/rd...tup.log
Mar 12 18:30:01 adg19c systemd[1]: Started Oracle19c.
Hint: Some lines were ellipsized, use -l to show in full.

六、          登錄數(shù)據(jù)庫(kù)驗(yàn)證

[root@adg19c ~]# su - oracle
[oracle@adg19c ~]$ sqlplus / as sysdba
 
SQL*Plus: Release 19.0.0.0.0 - Production on Thu Mar 12 18:30:42 2020
Version 19.3.0.0.0
 
Copyright (c) 1982, 2019, Oracle.  All rights reserved.
 
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
 
SQL> select instance_name,status from gv$instance;
 
INSTANCE_NAME    STATUS
---------------- ------------
woo              OPEN
 
SQL>

七、          方法二,時(shí)候老版本Linux

7.1     編輯/etc/oratab

[root@adg19c ~]# grep woo /etc/oratab 
woo:/DBSoft/oracle/product/19.3/dbhome_1:N
 
[root@adg19c ~]# sed -i 's/:N/:Y/' /etc/oratab 
[root@adg19c ~]# grep woo /etc/oratab 
woo:/DBSoft/oracle/product/19.3/dbhome_1:Y

7.2      編輯dbora服務(wù)文件

[root@adg19c ~]# vi /etc/init.d/dbora 
#! /bin/sh
# description: Oracle auto start-stop script.
#
# Set ORA_HOME to be equivalent to the $ORACLE_HOME
# from which you wish to execute dbstart and dbshut;
#
# Set ORA_OWNER to the user id of the owner of the
# Oracle database in ORACLE_HOME.
 
ORA_HOME=/DBSoft/oracle/product/19.3/dbhome_1
ORA_OWNER=oracle
 
case "$1" in
'start') 
    # Start the Oracle databases:
    # The following command assumes that the oracle login
    # will not prompt the user for any values
# Remove "&" if you don't want startup as a background process.
    su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME" &
    touch /var/lock/subsys/dbora
    ;;
 
'stop')
    # Stop the Oracle databases:
    # The following command assumes that the oracle login
    # will not prompt the user for any values
    su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut $ORA_HOME" &
    rm -f /var/lock/subsys/dbora
    ;;
Esac

7.3     修改文件權(quán)限

[root@adg19c ~]# chgrp dba /etc/init.d/dbora 
[root@adg19c ~]# chmod 750 /etc/init.d/dbora

7.4     添加到啟動(dòng)文件中

[root@adg19c init.d]# ln -s /etc/init.d/dbora /etc/rc.d/rc0.d/K01dbora
[root@adg19c init.d]# ln -s /etc/init.d/dbora /etc/rc.d/rc3.d/S99dbora
[root@adg19c init.d]# ln -s /etc/init.d/dbora /etc/rc.d/rc5.d/S99dbora

到此,相信大家對(duì)“怎么隨系統(tǒng)systemctl啟動(dòng)數(shù)據(jù)庫(kù)”有了更深的了解,不妨來(lái)實(shí)際操作一番吧!這里是創(chuàng)新互聯(lián)網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢,關(guān)注我們,繼續(xù)學(xué)習(xí)!


分享題目:怎么隨系統(tǒng)systemctl啟動(dòng)數(shù)據(jù)庫(kù)
URL地址:http://weahome.cn/article/gojigg.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部