VirtualBoxでOracle Linux 9 + Oracle DB 19c 環境構築（５）データベース作成

:::note
### 構築手順
![7-5_データベース作成.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/e1507deb-a071-4cd5-8a09-7fe2593a2bf8.png)

1. [仮想マシン（Oracle Linux）作成](https://qiita.com/jri-oi/items/29cc151fb8f98298d044)</font>
    1. 仮想マシン作成
    1. Oracle Linux 9.5インストール<
1. [Oracle Databaseインストール事前準備](https://qiita.com/jri-oi/items/5ab379764a5af5658210)
    1. Oracle Preinstallation RPM実行(Oracleユーザ作成)
    1. ディレクトリ作成
    1. Oracle Database ソフトウェア配置
1. [Opatchインストール](https://qiita.com/jri-oi/items/9069717e478644a78e2d)
    1. RU配置
    1. Opatchインストール
1. [Oracle Database インストール](https://qiita.com/jri-oi/items/90c4ee02573eaedcc5ed)
1. [データベース作成](https://qiita.com/jri-oi/items/95d39dd312668e3ae3b2)
:::


## 5-1. dbca（Database Configuration Assistant）実行
```
[oracle@o95db19c ~]$ $ORACLE_HOME/bin/dbca
```




![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/b723e9ce-dee6-c6a1-f3f6-c32e22f0294e.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/6263a90b-f6d7-08cd-4f24-cd505bae6b1f.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/113d93aa-05ff-2d9d-4693-ebaae338b59f.png)


![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/f41c799e-ccf6-05ca-361b-e5d7dea5abff.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/ba143200-ef05-712b-eaeb-df8255f4d81a.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/517db671-cab4-2c26-d51f-626c3a43d45b.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/f9adb232-7322-f4c4-4823-54a012c8971f.png)


![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/32b05367-7f57-1733-1233-38e80ed77772.png)

:::note alert
リスナー作成時に以下のエラーが出た場合、hostsに自ノードが登録されてないのが原因です。
（参照：2-3. hostsの設定）
>[DBT-06103] ポート(1,521)がすでに使用中です。
>アクション - 空きポートを指定してください。 


:::

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/0dd60799-ed5a-ea4e-a0a3-193b4ac9422b.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/5bfa945b-c339-abe2-7220-e2c1e6b3d4c4.png)


![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/9c78a033-c165-1aac-8ba9-bdb1479e5763.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/e1339838-f76d-adc2-ccea-b1dd0a0171fc.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/8034930e-588d-c4e0-613f-9f23f9cc1702.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/6191c74d-7004-f9fc-f333-100a34c5f0f0.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/06a61ee3-41f9-d7bc-1f27-adcc978efe3e.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/99ca7583-c4f3-8c63-45de-281bd3c31b38.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/01e7da53-35ee-ee60-7ae0-049e1a7a9633.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/ee1735d2-a6b2-df59-f739-97d1445e1d6c.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/038548f6-d1dc-e709-a1ca-e7f5edb3e450.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/fffea082-8908-2f83-1b24-afb0d176161a.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/0bc8d0f9-69bc-a82a-796c-b52a3da5ff42.png)

## 5-2. 接続確認
作成したデータベース（SID：orcl）に接続できれば完了です！
```shell-session
[oracle@ol95db19c ~]$ sqlplus / as sysdba;

SQL*Plus: Release 19.0.0.0.0 - Production on 火 1月 28 14:36:05 2025
Version 19.25.0.0.0

Copyright (c) 1982, 2024, Oracle.  All rights reserved.
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.25.0.0.0
に接続されました。
```

:::note
### 構築手順
![7-5_データベース作成.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3491580/b7d23dbd-df9d-445d-8fa4-c9248726bbfd.png)

1. [仮想マシン（Oracle Linux）作成](https://qiita.com/jri-oi/items/29cc151fb8f98298d044)</font>
    1. 仮想マシン作成
    1. Oracle Linux 9.5インストール<
1. [Oracle Databaseインストール事前準備](https://qiita.com/jri-oi/items/5ab379764a5af5658210)
    1. Oracle Preinstallation RPM実行(Oracleユーザ作成)
    1. ディレクトリ作成
    1. Oracle Database ソフトウェア配置
1. [Opatchインストール](https://qiita.com/jri-oi/items/9069717e478644a78e2d)
    1. RU配置
    1. Opatchインストール
1. [Oracle Database インストール](https://qiita.com/jri-oi/items/90c4ee02573eaedcc5ed)
1. [データベース作成](https://qiita.com/jri-oi/items/95d39dd312668e3ae3b2)
:::


### おまけ：Oracle関連プロセス


<details><summary>oracle関連プロセス</summary>

```shell-session
[oracle@ol95db19c ~]$ ps -ef | grep ora
oracle     11002       1  0 01:22 ?        00:00:02 /usr/lib/systemd/systemd --user
oracle     11008   11002  0 01:22 ?        00:00:00 (sd-pam)
oracle     11084       1  0 01:22 ?        00:00:00 /usr/bin/gnome-keyring-daemon --daemonize --login
oracle     11098   10729  0 01:22 tty2     00:00:00 /usr/libexec/gdm-wayland-session --register-session gnome-session
oracle     11102   11002  0 01:22 ?        00:00:00 /usr/bin/dbus-broker-launch --scope user
oracle     11108   11102  0 01:22 ?        00:00:02 dbus-broker --log 4 --controller 9 --machine-id 1601298b92164be8ad3b4c2725c78cd0 --max-bytes 100000000000000 --max-fds 25000000000000 --max-matches 5000000000
oracle     11118   11098  0 01:22 tty2     00:00:00 /usr/libexec/gnome-session-binary
oracle     11235   11002  0 01:22 ?        00:00:00 /usr/libexec/gnome-session-ctl --monitor
oracle     11241   11002  0 01:22 ?        00:00:00 /usr/libexec/gnome-session-binary --systemd-service --session=gnome
oracle     11281   11002  0 01:22 ?        00:05:19 /usr/bin/gnome-shell
oracle     11419   11002  0 01:22 ?        00:00:00 /usr/libexec/gvfsd
oracle     11424   11002  0 01:22 ?        00:00:00 /usr/libexec/gvfsd-fuse /run/user/54321/gvfs -f
oracle     11426   11002  0 01:22 ?        00:00:00 /usr/libexec/at-spi-bus-launcher
oracle     11436   11426  0 01:22 ?        00:00:00 /usr/bin/dbus-broker-launch --config-file=/usr/share/defaults/at-spi2/accessibility.conf --scope user
oracle     11439   11436  0 01:22 ?        00:00:00 dbus-broker --log 4 --controller 9 --machine-id 1601298b92164be8ad3b4c2725c78cd0 --max-bytes 100000000000000 --max-fds 6400000 --max-matches 5000000000
oracle     11587   11002  0 01:22 ?        00:00:00 /usr/libexec/xdg-permission-store
oracle     11588   11002  0 01:22 ?        00:00:00 /usr/libexec/gnome-shell-calendar-server
oracle     11592   11002  0 01:22 ?        00:00:04 /usr/bin/pipewire
oracle     11593   11002  0 01:22 ?        00:00:02 /usr/bin/wireplumber
oracle     11594   11002  0 01:22 ?        00:00:01 /usr/bin/pipewire-pulse
oracle     11610   11002  0 01:22 ?        00:00:00 /usr/libexec/evolution-source-registry
oracle     11612   11002  0 01:22 ?        00:00:00 /usr/libexec/dconf-service
oracle     11636   11002  0 01:22 ?        00:00:00 /usr/libexec/goa-daemon
oracle     11642   11002  0 01:22 ?        00:00:00 /usr/libexec/gvfs-udisks2-volume-monitor
oracle     11655   11002  0 01:22 ?        00:00:00 /usr/libexec/evolution-calendar-factory
oracle     11662   11002  0 01:22 ?        00:00:00 /usr/libexec/gvfs-mtp-volume-monitor
oracle     11665   11002  0 01:22 ?        00:00:08 /usr/libexec/goa-identity-service
oracle     11670   11002  0 01:22 ?        00:00:00 /usr/libexec/gvfs-gphoto2-volume-monitor
oracle     11687   11002  0 01:22 ?        00:00:00 /usr/libexec/gvfs-goa-volume-monitor
oracle     11699   11002  0 01:22 ?        00:00:00 /usr/libexec/evolution-addressbook-factory
oracle     11714   11002  0 01:22 ?        00:00:00 /usr/libexec/at-spi2-registryd --use-gnome-session
oracle     11715   11002  0 01:22 ?        00:00:00 /usr/bin/gjs /usr/share/gnome-shell/org.gnome.Shell.Notifications
oracle     11727   11002  0 01:22 ?        00:00:00 /usr/libexec/gsd-a11y-settings
oracle     11732   11002  0 01:22 ?        00:00:00 /usr/libexec/gsd-color
oracle     11736   11002  0 01:22 ?        00:00:00 /usr/libexec/gsd-datetime
oracle     11740   11002  0 01:22 ?        00:00:02 /usr/libexec/gsd-housekeeping
oracle     11747   11002  0 01:22 ?        00:00:00 /usr/libexec/gsd-keyboard
oracle     11752   11002  0 01:22 ?        00:00:00 /usr/libexec/gsd-media-keys
oracle     11757   11002  0 01:22 ?        00:00:00 /usr/libexec/gsd-power
oracle     11759   11241  0 01:22 ?        00:00:00 /usr/libexec/evolution-data-server/evolution-alarm-notify
oracle     11761   11002  0 01:22 ?        00:00:00 /usr/libexec/gsd-print-notifications
oracle     11767   11002  0 01:22 ?        00:00:00 /usr/libexec/gsd-rfkill
oracle     11771   11002  0 01:22 ?        00:00:00 /usr/libexec/gsd-screensaver-proxy
oracle     11772   11241  0 01:22 ?        00:00:27 /usr/bin/gnome-software --gapplication-service
oracle     11775   11241  0 01:22 ?        00:00:00 /usr/libexec/gsd-disk-utility-notify
oracle     11780   11002  0 01:22 ?        00:00:00 /usr/libexec/gsd-sharing
oracle     11788   11002  0 01:22 ?        00:00:07 /usr/libexec/gsd-smartcard
oracle     11791   11002  0 01:22 ?        00:00:00 /usr/libexec/gsd-sound
oracle     11796   11002  0 01:22 ?        00:00:00 /usr/libexec/gsd-subman
oracle     11801   11002  0 01:22 ?        00:00:00 /usr/libexec/gsd-usb-protection
oracle     11802   11002  0 01:22 ?        00:00:00 /usr/libexec/gsd-wacom
oracle     11858   11002  0 01:22 ?        00:00:00 /usr/libexec/gsd-printer
oracle     11876   11002  0 01:22 ?        00:00:00 /usr/bin/gjs /usr/share/gnome-shell/org.gnome.ScreenSaver
oracle     12065   11002  0 01:22 ?        00:00:02 /usr/libexec/xdg-desktop-portal
oracle     12081   11002  0 01:22 ?        00:00:00 /usr/libexec/xdg-document-portal
oracle     12091   11002  0 01:22 ?        00:00:02 /usr/libexec/xdg-desktop-portal-gnome
oracle     12099   11002  0 01:22 ?        00:00:01 /usr/libexec/xdg-desktop-portal-gtk
oracle     12134   11002  0 01:22 ?        00:00:00 /usr/libexec/gvfsd-metadata
oracle     12338   11281  0 01:23 ?        00:00:14 /usr/bin/Xwayland :0 -rootless -noreset -accessx -core -auth /run/user/54321/.mutter-Xwaylandauth.4RKS02 -listenfd 4 -listenfd 5 -displayfd 6 -initfd 7
oracle     12340   11281  0 01:23 ?        00:00:14 ibus-daemon --panel disable -r --xim
oracle     12342   11002  0 01:23 ?        00:00:02 /usr/libexec/gsd-xsettings
oracle     12354   12340  0 01:23 ?        00:00:00 /usr/libexec/ibus-dconf
oracle     12356   12340  0 01:23 ?        00:00:04 /usr/libexec/ibus-extension-gtk3
oracle     12360   11002  0 01:23 ?        00:00:02 /usr/libexec/ibus-x11 --kill-daemon
oracle     12364   11002  0 01:23 ?        00:00:00 /usr/libexec/ibus-portal
oracle     12373   12340  0 01:23 ?        00:00:03 /usr/libexec/ibus-engine-simple
oracle     13027   11419  0 01:32 ?        00:00:00 /usr/libexec/gvfsd-trash --spawner :1.13 /org/gtk/gvfs/exec_spaw/0
oracle     13044   11419  0 01:32 ?        00:00:00 /usr/libexec/gvfsd-network --spawner :1.13 /org/gtk/gvfs/exec_spaw/1
oracle     13057   11419  0 01:33 ?        00:00:00 /usr/libexec/gvfsd-dnssd --spawner :1.13 /org/gtk/gvfs/exec_spaw/3
oracle     13726   11002  0 01:42 ?        00:00:05 /usr/libexec/gnome-terminal-server
oracle     13758   13726  0 01:42 pts/0    00:00:00 bash
oracle     14498   11002  0 01:50 ?        00:00:03 /u01/app/oracle/product/19.3.0/dbhome_1/bin/tnslsnr LISTENER -inherit
oracle     16693   11002  0 03:07 ?        00:00:07 ora_pmon_orcl
oracle     16697   11002  0 03:07 ?        00:00:02 ora_clmn_orcl
oracle     16701   11002  0 03:07 ?        00:00:25 ora_psp0_orcl
oracle     16705   11002 12 03:07 ?        01:24:03 ora_vktm_orcl
oracle     16711   11002  0 03:07 ?        00:00:04 ora_gen0_orcl
oracle     16715   11002  0 03:07 ?        00:00:02 ora_mman_orcl
oracle     16721   11002  0 03:07 ?        00:00:21 ora_gen1_orcl
oracle     16724   11002  0 03:07 ?        00:00:06 ora_diag_orcl
oracle     16726   11002  0 03:07 ?        00:00:04 ora_ofsd_orcl
oracle     16729   11002  0 03:07 ?        00:00:14 ora_dbrm_orcl
oracle     16733   11002  0 03:07 ?        00:00:02 ora_vkrm_orcl
oracle     16735   11002  0 03:07 ?        00:00:06 ora_svcb_orcl
oracle     16737   11002  0 03:07 ?        00:00:10 ora_pman_orcl
oracle     16741   11002  0 03:07 ?        00:00:46 ora_dia0_orcl
oracle     16743   11002  0 03:07 ?        00:00:06 ora_dbw0_orcl
oracle     16747   11002  0 03:07 ?        00:00:05 ora_lgwr_orcl
oracle     16751   11002  0 03:07 ?        00:00:04 ora_lg00_orcl
oracle     16753   11002  0 03:07 ?        00:00:20 ora_ckpt_orcl
oracle     16757   11002  0 03:07 ?        00:00:03 ora_lg01_orcl
oracle     16759   11002  0 03:07 ?        00:00:03 ora_smon_orcl
oracle     16763   11002  0 03:07 ?        00:00:11 ora_smco_orcl
oracle     16765   11002  0 03:07 ?        00:00:02 ora_reco_orcl
oracle     16767   11002  0 03:07 ?        00:00:03 ora_w000_orcl
oracle     16769   11002  0 03:07 ?        00:00:03 ora_lreg_orcl
oracle     16773   11002  0 03:07 ?        00:00:02 ora_w001_orcl
oracle     16775   11002  0 03:07 ?        00:00:02 ora_pxmn_orcl
oracle     16781   11002  0 03:07 ?        00:00:33 ora_mmon_orcl
oracle     16783   11002  0 03:07 ?        00:00:23 ora_mmnl_orcl
oracle     16785   11002  0 03:07 ?        00:00:01 ora_d000_orcl
oracle     16787   11002  0 03:07 ?        00:00:01 ora_s000_orcl
oracle     16789   11002  0 03:07 ?        00:00:02 ora_tmon_orcl
oracle     16799   11002  0 03:07 ?        00:00:02 ora_arc0_orcl
oracle     16801   11002  0 03:07 ?        00:00:02 ora_tt00_orcl
oracle     16803   11002  0 03:07 ?        00:00:01 ora_tt01_orcl
oracle     16805   11002  0 03:07 ?        00:00:05 ora_tt02_orcl
oracle     16807   11002  0 03:07 ?        00:00:01 ora_arc1_orcl
oracle     16809   11002  0 03:07 ?        00:00:01 ora_arc2_orcl
oracle     16811   11002  0 03:07 ?        00:00:01 ora_arc3_orcl
oracle     16813   11002  0 03:07 ?        00:00:02 ora_w002_orcl
oracle     16815   11002  0 03:07 ?        00:00:01 ora_aqpc_orcl
oracle     16819   11002  0 03:07 ?        00:01:07 ora_cjq0_orcl
oracle     16821   11002  0 03:07 ?        00:00:05 ora_p000_orcl
oracle     16823   11002  0 03:07 ?        00:00:05 ora_p001_orcl
oracle     16825   11002  0 03:07 ?        00:00:05 ora_p002_orcl
oracle     16827   11002  0 03:07 ?        00:00:05 ora_p003_orcl
oracle     16829   11002  0 03:07 ?        00:00:02 ora_w003_orcl
oracle     16834   11002  0 03:07 ?        00:00:03 ora_w004_orcl
oracle     17004   11002  0 03:07 ?        00:00:02 ora_qm02_orcl
oracle     17008   11002  0 03:07 ?        00:00:10 ora_q002_orcl
oracle     17010   11002  0 03:07 ?        00:00:01 ora_q003_orcl
oracle     17024   11002  0 03:07 ?        00:00:02 ora_w005_orcl
oracle     17057   11002  0 03:08 ?        00:00:02 ora_cl00_orcl
oracle     17076   11002  0 03:17 ?        00:00:02 ora_w006_orcl
oracle     17078   11002  0 03:17 ?        00:00:02 ora_w007_orcl
oracle     17610   13758  0 07:23 pts/0    00:00:00 /usr/bin/vim listener.ora
oracle     17691   11002  0 08:12 ?        00:01:42 ora_m002_orcl
oracle     17970   11002  0 11:44 ?        00:00:50 ora_m001_orcl
oracle     18147   11002  0 13:50 ?        00:00:14 ora_m005_orcl
oracle     18154   11002  0 13:55 ?        00:00:12 ora_m003_orcl
root       18206     984  0 14:24 ?        00:00:00 sshd: oracle [priv]
oracle     18210   18206  0 14:24 ?        00:00:00 sshd: oracle@notty
oracle     18211   18210  0 14:24 ?        00:00:00 /usr/libexec/openssh/sftp-server
root       18238     984  0 14:30 ?        00:00:00 sshd: oracle [priv]
oracle     18242   18238  0 14:30 ?        00:00:00 sshd: oracle@pts/1
oracle     18243   18242  0 14:30 pts/1    00:00:00 -bash
oracle     18284   11002  0 14:40 ?        00:00:00 ora_m004_orcl
oracle     18289   18243 99 14:43 pts/1    00:00:00 ps -ef
oracle     18290   18243 99 14:43 pts/1    00:00:00 grep --color=auto ora
```

</details>