0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【開発環境構築メモ】SQLもはじめました(Oracle Database XE 21c)

0
Last updated at Posted at 2026-02-08

1. はじめに

 Javaと並行してSQLの勉強も進めています。テキストがOracleベースのためOracle環境を手元のPCにセットアップしたので、手順をメモとして残しておきます。

本記事では以下のOSで動作確認を行っています。

2. ソフトウェアのインストール

 Oracle Database XEをインストールします。Linux環境ではDockerを使用します。

Linux Mint ソフトウェアマネージャ
Docker.io
Linux Mint
sudo docker run --name oracle-xe \
  -p 1521:1521 \
  -e ORACLE_PWD=パスワード \
  container-registry.oracle.com/database/express:21.3.0-xe
Windows PC ダウンロード
Oracle Database XE - https://www.oracle.com/jp/database/technologies/appdev/xe.html
Windows PC
Start-Process powershell -Verb RunAs `
  -ArgumentList 'Get-Service Oracle* | Set-Service -StartupType Manual'
Start-Process powershell -Verb RunAs `
  -ArgumentList 'Stop-Service Oracle* -Force'

3. Oracle Databaseの起動と停止

 Oracle Databaseはメモリの使用量がアレなので、必要なときだけ起動します。

Linux Mint
sudo docker start oracle-xe
sudo docker stop oracle-xe
Windows PC
Start-Process powershell -Verb RunAs -ArgumentList 'Start-Service Oracle*'
Start-Process powershell -Verb RunAs -ArgumentList 'Stop-Service Oracle* -Force'

4. 拡張機能のインストール

 VSCodeを起動して、以下の拡張機能をインストールします。

Visual Studio Code 拡張機能
Oracle SQL Developer Extension for VS Code

 サイドバーのSQL Developerから、以下の設定で接続できます。

項目 設定
Connection Name oracle-xe
User Info Role Default
Username SYSTEM
Password パスワード
Save Password
Connection Type Basic
Details Hostname localhost
Port 1521
Type Service Name
Service Name XE

5. おわりに

 ソフトウェアのセットアップだけでクソほど重い。拡張機能の起動も遅い。これが、絶対に止まってはいけないシステム向けのデータベース実装ってやつか…。

◀️ 前の記事 次の記事 ▶️
【開発環境構築メモ】Javaはじめました 【サーバ構築メモ】ローカルサーバでのmDNS活用方法
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?