Yeni projelere başlamaktan ve yenilikçi zihinlerle iş birliği yapmaktan her zaman heyecan duyuyorum.

Telefon

+90 532 474 22 11

Email

ben@ozgurfidan.com

Website

https://ozgurfidan.com

Adres

Çankaya / Ankara

Social Links

Oracle

Oracle Database Auto Start

Oracle Database Auto Start - Oracle Database Otomatik Başlatma

Oracle Database Auto Start

# mcedit /etc/oratab 

cdb1:/u01/app/oracle/product/12.1.0.2/db_1:Y

Database startup

# mcedit /etc/sysconfig/env.oracledb

# define environment variables
ORACLE_BASE=/opt/oracle
ORACLE_HOME=/opt/oracle/product/12.1.0.2/db_1
ORACLE_SID=ORCL

---control

# cat /etc/sysconfig/env.oracledb

# mcedit /usr/lib/systemd/system/oracle_network.service

[Unit]
Description=Oracle listener
After=network.target

[Service]
Type=forking
EnvironmentFile=/etc/sysconfig/env.oracledb
ExecStart=/opt/oracle/product/12.1.0.2/db_1/bin/lsnrctl start
ExecStop=/opt/oracle/product/12.1.0.2/db_1/bin/lsnrctl stop
User=oracle

[Install]
WantedBy=multi-user.target

---control
# cat /usr/lib/systemd/system/oracle_network.service

# mcedit /usr/lib/systemd/system/oracledb.service

[Unit]
Description=Oracle databases service
After=network.target oracle_network.service

[Service]
Type=forking
EnvironmentFile=/etc/sysconfig/env.oracledb
ExecStart=/opt/oracle/product/12.1.0.2/db_1/bin/dbstart /opt/oracle/product/12.1.0.2/db_1
ExecStop=/opt/oracle/product/12.1.0.2/db_1/bin/dbshut /opt/oracle/product/12.1.0.2/db_1
User=oracle

[Install]
WantedBy=multi-user.target

---control

# cat /usr/lib/systemd/system/oracledb.service

# systemctl daemon-reload

---control

# systemctl list-unit-files --type service|grep oracle

  ---oracle_network.service                      disabled
  ---oracledb.service                            disabled

# systemctl enable oracle_network.service oracledb.service

  ---Created symlink from /etc/systemd/system/multi-user.target.wants/oracle_network.service to /usr/lib/systemd/system/oracle_network.service.
  ---Created symlink from /etc/systemd/system/multi-user.target.wants/oracledb.service to /usr/lib/systemd/system/oracledb.service.


# systemctl start oracle_network.service
# systemctl start oracledb
  ---control
# systemctl status oracledb

---control

systemctl status oracle_network.service

 

 

2 min read
Feb 09, 2025
By Ozgur Fidan
Share

Leave a comment

Your email address will not be published. Required fields are marked *

Related posts

Feb 09, 2025 • 1 min read
Oracle Apex Şifre Sıfırlama

Oracle Apex Password Reset

Feb 09, 2025 • 1 min read
centos Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlis

centos Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist:...

Feb 09, 2025 • 1 min read
Oracle Apex Türkçeleştirme

Oracle Apex Türkçeleştirme