summarylogtreecommitdiffstats
path: root/oracle-xe.service
blob: a9d2c6774a8428ed36831ff4129b946f6734272e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[Unit]
Description=Oracle Database Express Edition

[Service]
Environment=ORACLE_HOME=/opt/oracle/product/18c/dbhomeXE
Environment=ORACLE_SID=XE
User=oracle
Group=oinstall
LimitNOFILE=65536
LimitNPROC=16384
LimitSTACK=33554432
LimitMEMLOCK=134217728
Type=oneshot
ExecStartPre=/opt/oracle/product/18c/dbhomeXE/bin/lsnrctl start LISTENER
ExecStart=bash -c 'echo -e "connect / as sysdba\nstartup\nalter pluggable database all open\nexit;" | /opt/oracle/product/18c/dbhomeXE/bin/sqlplus -s /nolog'
ExecStop=bash -c 'echo -e "connect / as sysdba\nshutdown immediate\nexit;" | /opt/oracle/product/18c/dbhomeXE/bin/sqlplus -s /nolog'
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target