更新: 2026年2月5日
作成した仮想マシンをOracle Cloud Infrastructureのコンピュート・インスタンスとして実行できるように変更します。
シリアル・コンソールの構成
/etc/default/grubを編集し、シリアル・コンソールで接続できるようにします。
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet numa=off transparent_hugepage=madvise"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
GRUB_TERMINAL="serial console"
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200"
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_CMDLINE_LINUX="crashkernel=1G-64G:448M,64G-:512M resume=/dev/mapper/ol-swap rd.lvm.lv=ol/root rd.lvm.lv=ol/swap numa=off transparent_hugepage=madvise"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
GRUB_TERMINAL="serial console"
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200"
[root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Adding boot menu entry for EFI firmware configuration
done
[root@localhost ~]#
[root@localhost ~]# grubby --update-kernel=ALL --args="console=tty1 console=ttyAMA0,115200n8"
[root@localhost ~]#
ARM 64-bit: systemctl enable serial-getty@ttyAMA0.service
x86_64: systemctl enable serial-getty@ttyS0.service
[root@localhost ~]# systemctl enable serial-getty@ttyAMA0.service
Created symlink /etc/systemd/system/getty.target.wants/serial-getty@ttyAMA0.service → /usr/lib/systemd/system/serial-getty@.service.
[root@localhost ~]#
[root@localhost ~]# shutdown -h now
[root@localhost ~]# Connection to localhost closed by remote host.
Connection to localhost closed.
~ %
% nc localhost 10023
[メッセージ省略]
[ OK ] Started Session c2 of User oracle.
[ OK ] Started Session c3 of User oracle.
[ OK ] Finished Crash recovery kernel arming.
Oracle Linux Server 9.7
Kernel 6.12.0-107.59.3.3.el9uek.x86_64 on an x86_64
localhost login:
dnf -y install cockpit-ws-310.6-1.0.1.el8_10 cockpit-system-310.6-1.0.1.el8_10 cockpit-storaged-310.3-3.0.1.el8_10 cockpit-packagekit-310.3-3.0.1.el8_10 cockpit-310.6-1.0.1.el8_10 cockpit-bridge-310.6-1.0.1.el8_10
[root@localhost ~]# dnf -y install cockpit-ws-310.6-1.0.1.el8_10 cockpit-system-310.6-1.0.1.el8_10 cockpit-storaged-310.3-3.0.1.el8_10 cockpit-packagekit-310.3-3.0.1.el8_10 cockpit-310.6-1.0.1.el8_10 cockpit-bridge-310.6-1.0.1.el8_10
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 4:51:01 ago on Tue Jan 27 12:22:25 2026.
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
cockpit aarch64 310.6-1.0.1.el8_10 ol8_baseos_latest 90 k
cockpit-bridge aarch64 310.6-1.0.1.el8_10 ol8_baseos_latest 485 k
cockpit-packagekit noarch 310.3-3.0.1.el8_10 ol8_appstream 977 k
cockpit-storaged noarch 310.3-3.0.1.el8_10 ol8_appstream 902 k
cockpit-system noarch 310.6-1.0.1.el8_10 ol8_baseos_latest 5.2 M
cockpit-ws aarch64 310.6-1.0.1.el8_10 ol8_baseos_latest 974 k
Installing dependencies:
[中略]
sos-4.10.1-2.0.1.el8_10.noarch
sscg-3.0.0-7.el8.aarch64
tpm2-tools-4.1.1-5.el8.aarch64
tracer-common-1.1-1.el8.noarch
udisks2-iscsi-2.9.0-16.el8_10.1.aarch64
udisks2-lvm2-2.9.0-16.el8_10.1.aarch64
Complete!
[root@localhost ~]#
[root@localhost ~]# systemctl enable cockpit.socket
Created symlink /etc/systemd/system/sockets.target.wants/cockpit.socket → /usr/lib/systemd/system/cockpit.socket.
[root@localhost ~]#
準仮想化ドライバの追加
[root@localhost ~]# dracut --logfile /var/log/dracut.log --force --add-drivers "virtio_blk virtio-rng virtio_console virtio_crypto virtio_net virtio_scsi virtio_pci virtio_pci_legacy_dev virtio_pci_modern_dev virtio_vdpa virtiofs 9pnet_virtio"
[root@localhost ~]#
[root@localhost ~]# dracut --logfile /var/log/dracut.log --force --add qemu
dracut: touch /var/log/dracut.log failed.
[root@localhost ~]#
[root@localhost ~]# lsinitrd | grep virtio
Arguments: --logfile --force --add-drivers 'virtio_blk virtio-rng virtio_console virtio_crypto virtio_net virtio_scsi virtio_pci virtio_pci_legacy_dev virtio_pci_modern_dev virtio_vdpa virtiofs 9pnet_virtio'
-rw-r--r-- 1 root root 16668 Dec 18 14:04 usr/lib/modules/5.15.0-316.196.4.1.el8uek.aarch64/kernel/drivers/block/virtio_blk.ko.xz
-rw-r--r-- 1 root root 8280 Dec 18 14:04 usr/lib/modules/5.15.0-316.196.4.1.el8uek.aarch64/kernel/drivers/char/hw_random/virtio-rng.ko.xz
-rw-r--r-- 1 root root 23164 Dec 18 14:04 usr/lib/modules/5.15.0-316.196.4.1.el8uek.aarch64/kernel/drivers/char/virtio_console.ko.xz
drwxr-xr-x 2 root root 0 Dec 18 14:04 usr/lib/modules/5.15.0-316.196.4.1.el8uek.aarch64/kernel/drivers/crypto/virtio
-rw-r--r-- 1 root root 18796 Dec 18 14:04 usr/lib/modules/5.15.0-316.196.4.1.el8uek.aarch64/kernel/drivers/crypto/virtio/virtio_crypto.ko.xz
-rw-r--r-- 1 root root 54160 Dec 18 14:04 usr/lib/modules/5.15.0-316.196.4.1.el8uek.aarch64/kernel/drivers/net/virtio_net.ko.xz
-rw-r--r-- 1 root root 16044 Dec 18 14:04 usr/lib/modules/5.15.0-316.196.4.1.el8uek.aarch64/kernel/drivers/scsi/virtio_scsi.ko.xz
drwxr-xr-x 2 root root 0 Dec 18 14:04 usr/lib/modules/5.15.0-316.196.4.1.el8uek.aarch64/kernel/drivers/virtio
-rw-r--r-- 1 root root 16092 Dec 18 14:04 usr/lib/modules/5.15.0-316.196.4.1.el8uek.aarch64/kernel/drivers/virtio/virtio_pci.ko.xz
-rw-r--r-- 1 root root 6896 Dec 18 14:04 usr/lib/modules/5.15.0-316.196.4.1.el8uek.aarch64/kernel/drivers/virtio/virtio_pci_legacy_dev.ko.xz
-rw-r--r-- 1 root root 9636 Dec 18 14:04 usr/lib/modules/5.15.0-316.196.4.1.el8uek.aarch64/kernel/drivers/virtio/virtio_pci_modern_dev.ko.xz
-rw-r--r-- 1 root root 28124 Dec 18 14:04 usr/lib/modules/5.15.0-316.196.4.1.el8uek.aarch64/kernel/drivers/virtio/virtio_vdpa.ko.xz
-rw-r--r-- 1 root root 28820 Dec 18 14:04 usr/lib/modules/5.15.0-316.196.4.1.el8uek.aarch64/kernel/fs/fuse/virtiofs.ko.xz
-rw-r--r-- 1 root root 29700 Dec 18 14:04 usr/lib/modules/5.15.0-316.196.4.1.el8uek.aarch64/kernel/net/9p/9pnet_virtio.ko.xz
[root@localhost ~]#
[root@localhost ~]# lsinitrd | grep virtio
-rw-r--r-- 1 root root 16700 Dec 18 22:51 usr/lib/modules/6.12.0-107.59.3.3.el9uek.x86_64/kernel/drivers/block/virtio_blk.ko.xz
-rw-r--r-- 1 root root 4904 Dec 18 22:51 usr/lib/modules/6.12.0-107.59.3.3.el9uek.x86_64/kernel/drivers/char/hw_random/virtio-rng.ko.xz
-rw-r--r-- 1 root root 19888 Dec 18 22:51 usr/lib/modules/6.12.0-107.59.3.3.el9uek.x86_64/kernel/drivers/char/virtio_console.ko.xz
-rw-r--r-- 1 root root 12608 Dec 18 22:51 usr/lib/modules/6.12.0-107.59.3.3.el9uek.x86_64/kernel/drivers/scsi/virtio_scsi.ko.xz
drwxr-xr-x 2 root root 0 Dec 18 22:51 usr/lib/modules/6.12.0-107.59.3.3.el9uek.x86_64/kernel/drivers/virtio
-rw-r--r-- 1 root root 22292 Dec 18 22:51 usr/lib/modules/6.12.0-107.59.3.3.el9uek.x86_64/kernel/drivers/virtio/virtio_mem.ko.xz
-rw-r--r-- 1 root root 19732 Dec 18 22:51 usr/lib/modules/6.12.0-107.59.3.3.el9uek.x86_64/kernel/drivers/virtio/virtio_pci.ko.xz
-rw-r--r-- 1 root root 4300 Dec 18 22:51 usr/lib/modules/6.12.0-107.59.3.3.el9uek.x86_64/kernel/drivers/virtio/virtio_pci_legacy_dev.ko.xz
-rw-r--r-- 1 root root 8156 Dec 18 22:51 usr/lib/modules/6.12.0-107.59.3.3.el9uek.x86_64/kernel/drivers/virtio/virtio_pci_modern_dev.ko.xz
[root@localhost ~]#
ova形式でのエクスポートの前に
[root@localhost ~]# su - oracle
Last login: Fri Jan 30 15:24:30 JST 2026
[oracle@localhost ~]$
[oracle@localhost ~]$ . oraenv
ORACLE_SID = [oracle] ? FREE
The Oracle base has been set to /opt/oracle
[oracle@localhost ~]$ sqlplus sys/oracle@localhost/freepdb1 as sysdba
SQL*Plus: Release 23.26.0.0.0 - Production on Fri Jan 30 15:27:28 2026
Version 23.26.0.0.0
Copyright (c) 1982, 2025, Oracle. All rights reserved.
Connected to:
Oracle AI Database 26ai Free Release 23.26.0.0.0 - Develop, Learn, and Run for Free
Version 23.26.0.0.0
SQL> set serveroutput on
begin
for r in (select * from dba_role_privs)
loop
if r.grantee <> 'SYS' and r.grantee in ('ADMIN','PDBADMIN') then
ords_admin.enable_schema(
p_enabled => true,
p_schema => r.grantee,
p_url_mapping_type => 'BASE_PATH',
p_url_mapping_pattern => lower(r.grantee),
p_auto_rest_auth => true
);
dbms_output.put_line('Schema ' || r.grantee || ' is allowed to connect to SQL Developer Web.');
end if;
end loop;
commit;
end;
/SQL> 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Schema PDBADMIN is allowed to connect to SQL Developer Web.
PL/SQL procedure successfully completed.
SQL> exit
Disconnected from Oracle AI Database 26ai Free Release 23.26.0.0.0 - Develop, Learn, and Run for Free
Version 23.26.0.0.0
[oracle@localhost ~]$
$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -u sys/your-password -force_pdb_mode 'READ WRITE' -b dbms_cloud_install -d $ORACLE_HOME/rdbms/admin/ -l /tmp catclouduser.sql
[oracle@localhost ~]$ $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -u sys/oracle -force_pdb_mode 'READ WRITE' -b dbms_cloud_install -d $ORACLE_HOME/rdbms/admin/ -l /tmp catclouduser.sql
catcon::set_log_file_base_path: ALL catcon-related output will be written to [/tmp/dbms_cloud_install_catcon_3256.lst]
catcon::set_log_file_base_path: catcon: See [/tmp/dbms_cloud_install*.log] files for output generated by scripts
catcon::set_log_file_base_path: catcon: See [/tmp/dbms_cloud_install_*.lst] files for spool files, if any
catcon.pl: completed successfully
[oracle@localhost ~]$
$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -u sys/your-password -force_pdb_mode 'READ WRITE' -b dbms_cloud_install -d $ORACLE_HOME/rdbms/admin/ -l /tmp dbms_cloud_install.sql
[oracle@localhost ~]$ $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -u sys/oracle -force_pdb_mode 'READ WRITE' -b dbms_cloud_install -d $ORACLE_HOME/rdbms/admin/ -l /tmp dbms_cloud_install.sql
catcon::set_log_file_base_path: ALL catcon-related output will be written to [/tmp/dbms_cloud_install_catcon_3393.lst]
catcon::set_log_file_base_path: catcon: See [/tmp/dbms_cloud_install*.log] files for output generated by scripts
catcon::set_log_file_base_path: catcon: See [/tmp/dbms_cloud_install_*.lst] files for spool files, if any
catcon.pl: completed successfully
[oracle@localhost ~]$
dnf -y install epel-release
[root@localhost ~]# dnf -y install epel-release
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 1:22:46 ago on Fri Jan 30 14:16:01 2026.
Dependencies resolved.
===================================================================================================
Package Architecture Version Repository Size
===================================================================================================
Installing:
oracle-epel-release-el8 aarch64 1.0-5.el8 ol8_baseos_latest 15 k
Installing dependencies:
yum-utils noarch 4.0.21-25.0.1.el8 ol8_baseos_latest 75 k
Transaction Summary
===================================================================================================
Install 2 Packages
Total download size: 90 k
Installed size: 41 k
Downloading Packages:
(1/2): oracle-epel-release-el8-1.0-5.el8.aarch64.rpm 2.9 kB/s | 15 kB 00:05
(2/2): yum-utils-4.0.21-25.0.1.el8.noarch.rpm 14 kB/s | 75 kB 00:05
---------------------------------------------------------------------------------------------------
Total 17 kB/s | 90 kB 00:05
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : yum-utils-4.0.21-25.0.1.el8.noarch 1/2
Installing : oracle-epel-release-el8-1.0-5.el8.aarch64 2/2
Running scriptlet: oracle-epel-release-el8-1.0-5.el8.aarch64 2/2
Verifying : oracle-epel-release-el8-1.0-5.el8.aarch64 1/2
Verifying : yum-utils-4.0.21-25.0.1.el8.noarch 2/2
Installed:
oracle-epel-release-el8-1.0-5.el8.aarch64 yum-utils-4.0.21-25.0.1.el8.noarch
Complete!
[root@localhost ~]#
cloud-initの構成
[root@localhost ~]# dnf -y install cloud-init
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 0:16:04 ago on Tue Jan 27 17:16:19 2026.
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
cloud-init noarch 23.4-7.0.2.el8_10.11 ol8_appstream 1.3 M
Installing dependencies:
bind-export-libs aarch64 32:9.11.36-16.el8_10.6 ol8_baseos_latest 1.1 M
dhcp-client aarch64 12:4.3.6-50.el8_10 ol8_baseos_latest 306 k
dhcp-common noarch 12:4.3.6-50.el8_10 ol8_baseos_latest 207 k
dhcp-libs aarch64 12:4.3.6-50.el8_10 ol8_baseos_latest 145 k
ipcalc aarch64 0.2.4-4.el8 ol8_baseos_latest 38 k
[中略]
Installed:
bind-export-libs-32:9.11.36-16.el8_10.6.aarch64
cloud-init-23.4-7.0.2.el8_10.11.noarch
dhcp-client-12:4.3.6-50.el8_10.aarch64
dhcp-common-12:4.3.6-50.el8_10.noarch
dhcp-libs-12:4.3.6-50.el8_10.aarch64
ipcalc-0.2.4-4.el8.aarch64
python3-babel-2.5.1-7.el8.noarch
python3-configobj-5.0.6-11.el8.noarch
python3-jinja2-2.10.1-7.el8_10.noarch
python3-jsonpatch-1.21-2.el8.noarch
python3-jsonpointer-1.10-11.el8.noarch
python3-jsonschema-2.6.0-4.el8.noarch
python3-jwt-1.6.1-2.el8.noarch
python3-markupsafe-0.23-19.el8.aarch64
python3-oauthlib-2.1.0-1.el8.noarch
python3-prettytable-0.7.2-14.el8.noarch
python3-pyserial-3.1.1-9.el8.noarch
python3-pytz-2017.2-11.0.1.el8.noarch
Complete!
[root@localhost ~]#
cd /etc/cloud/cloud.cfg.d
curl -OL https://raw.githubusercontent.com/ujnak/apexapps/refs/heads/master/cloud-init/99_oci.cfg
[root@localhost ~]# cd /etc/cloud/cloud.cfg.d
[root@localhost cloud.cfg.d]# curl -OL https://raw.githubusercontent.com/ujnak/apexapps/refs/heads/master/cloud-init/99_oci.cfg
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1661 100 1661 0 0 311 0 0:00:05 0:00:05 --:--:-- 408
[root@localhost cloud.cfg.d]#
systemctl disable cloud-config.service
systemctl disable cloud-final.service
systemctl disable cloud-init-local.service
[root@localhost ~]# systemctl disable cloud-init.service
Removed "/etc/systemd/system/cloud-init.target.wants/cloud-init.service".
[root@localhost ~]# systemctl disable cloud-config.service
Removed "/etc/systemd/system/cloud-init.target.wants/cloud-config.service".
[root@localhost ~]# systemctl disable cloud-final.service
Removed "/etc/systemd/system/cloud-init.target.wants/cloud-final.service".
[root@localhost ~]# systemctl disable cloud-init-local.service
Removed "/etc/systemd/system/cloud-init.target.wants/cloud-init-local.service".
[root@localhost ~]#
systemctl enable cloud-config.service
systemctl enable cloud-final.service
systemctl enable cloud-init-local.service
[root@localhost ~]# systemctl enable cloud-init.service
Created symlink /etc/systemd/system/cloud-init.target.wants/cloud-init.service → /usr/lib/systemd/system/cloud-init.service.
[root@localhost ~]# systemctl enable cloud-config.service
Created symlink /etc/systemd/system/cloud-init.target.wants/cloud-config.service → /usr/lib/systemd/system/cloud-config.service.
[root@localhost ~]# systemctl enable cloud-final.service
Created symlink /etc/systemd/system/cloud-init.target.wants/cloud-final.service → /usr/lib/systemd/system/cloud-final.service.
[root@localhost ~]# systemctl enable cloud-init-local.service
Created symlink /etc/systemd/system/cloud-init.target.wants/cloud-init-local.service → /usr/lib/systemd/system/cloud-init-local.service.
[root@localhost ~]#
サンプル・スキーマのインストール
curl -OL https://github.com/oracle-samples/db-sample-schemas/archive/refs/tags/v23.3.zip
% curl -OL https://github.com/oracle-samples/db-sample-schemas/archive/refs/tags/v23.3.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 11.6M 0 11.6M 0 0 3706k 0 --:--:-- 0:00:03 --:--:-- 4987k
%
unzip -q v23.3.zip
ls db-sample-schemas-23.3
% unzip -q v23.3.zip
% ls db-sample-schemas-23.3
customer_orders LICENSE.txt product_media README.txt SECURITY.md
human_resources order_entry README.md sales_history
%
sql system@localhost/freepdb1
% cd db-sample-schemas-23.3/human_resources
human_resources % sql system@localhost/freepdb1
SQLcl: 月 2月 02 12:44:29 2026のリリース25.3 Production
Copyright (c) 1982, 2026, Oracle. All rights reserved.
パスワード (**********?) ******
Last Successful login time: 月 2月 02 2026 12:44:31 +09:00
接続先:
Oracle AI Database 26ai Free Release 23.26.0.0.0 - Develop, Learn, and Run for Free
Version 23.26.0.0.0
SQL> @hr_install
Thank you for installing the Oracle Human Resources Sample Schema.
This installation script will automatically exit your database session
at the end of the installation or if any error is encountered.
The entire installation will be logged into the 'hr_install.log' log file.
Enter a password for the user HR: ******
Enter a tablespace for HR [USERS]:
Do you want to overwrite the schema, if it already exists? [YES|no]:
****** Creating REGIONS table ....
Table REGIONSは作成されました。
INDEX REG_ID_PKは作成されました。
Table REGIONSが変更されました。
[中略]
Trigger UPDATE_JOB_HISTORYがコンパイルされました
エラーはありません。
コミットが完了しました。
Installation verification
____________________________
Verification:
Table provided actual
______________ ___________ _________
regions 5 5
countries 25 25
departments 27 27
locations 23 23
employees 107 107
jobs 19 19
job_history 10 10
Thank you!
___________________________________________________________
The installation of the sample schema is now finished.
Please check the installation verification output above.
You will now be disconnected from the database.
Thank you for using Oracle Database!
Oracle AI Database 26ai Free Release 23.26.0.0.0 - Develop, Learn, and Run for Free
Version 23.26.0.0.0から切断されました
human_resources %
APEX workspace name: hr_dev
Database Username: hr
Administrator name for the APEX workspace: hr_admin
Administrator password: ******
Administrator email: 管理者のメール・アドレス
% sql sys@localhost/freepdb1 as sysdba
SQLcl: 月 2月 02 12:57:50 2026のリリース25.3 Production
Copyright (c) 1982, 2026, Oracle. All rights reserved.
パスワード (**********?) ******
接続先:
Oracle AI Database 26ai Free Release 23.26.0.0.0 - Develop, Learn, and Run for Free
Version 23.26.0.0.0
SQL> @create_dbuser_and_workspace.sql
APEX workspace name: hr_dev
Database Username: hr
Administrator name for the APEX workspace: hr_admin
Administrator password: ******
Administrator email: noreply@example.com
旧:declare
l_exist pls_integer;
begin
select 1 into l_exist from apex_workspaces where workspace = upper('&WKSPNAME');
if l_exist > 0 then
raise_application_error(-20001, 'APEX workspace &WKSPNAME exist');
end if;
exception
when no_data_found then
null; -- no workspace created;
end;
新:declare
l_exist pls_integer;
begin
select 1 into l_exist from apex_workspaces where workspace = upper('hr_dev');
if l_exist > 0 then
raise_application_error(-20001, 'APEX workspace hr_dev exist');
end if;
exception
when no_data_found then
null; -- no workspace created;
end;
PL/SQLプロシージャが正常に完了しました。
旧:declare
l_exist pls_integer;
l_sql varchar2(32767);
begin
select 1 into l_exist from all_users where username = upper('&DBUSER');
exception
when no_data_found then
-- Assuming Oracle AI Database 26ai Free, specify the USERS and TEMP tablespaces.
l_sql := 'create user &DBUSER default tablespace users temporary tablespace temp quota unlimited on users';
execute immediate l_sql;
end;
新:declare
l_exist pls_integer;
l_sql varchar2(32767);
begin
select 1 into l_exist from all_users where username = upper('hr');
exception
when no_data_found then
-- Assuming Oracle AI Database 26ai Free, specify the USERS and TEMP tablespaces.
l_sql := 'create user hr default tablespace users temporary tablespace temp quota unlimited on users';
execute immediate l_sql;
end;
PL/SQLプロシージャが正常に完了しました。
旧:begin
for c1 in (
select privilege from sys.dba_sys_privs
where grantee = 'APEX_GRANTS_FOR_NEW_USERS_ROLE'
)
loop
execute immediate 'grant ' || c1.privilege || ' to &DBUSER';
end loop;
end;
新:begin
for c1 in (
select privilege from sys.dba_sys_privs
where grantee = 'APEX_GRANTS_FOR_NEW_USERS_ROLE'
)
loop
execute immediate 'grant ' || c1.privilege || ' to hr';
end loop;
end;
PL/SQLプロシージャが正常に完了しました。
旧:begin
apex_instance_admin.add_workspace(
-- To treat workspaces across different instances as identical,
-- assign the same workspace ID to each workspaces on the instance.
-- p_workspace_id => <workspace_id>,
p_workspace => upper('&WKSPNAME'),
p_primary_schema => upper('&DBUSER')
);
end;
新:begin
apex_instance_admin.add_workspace(
-- To treat workspaces across different instances as identical,
-- assign the same workspace ID to each workspaces on the instance.
-- p_workspace_id => <workspace_id>,
p_workspace => upper('hr_dev'),
p_primary_schema => upper('hr')
);
end;
PL/SQLプロシージャが正常に完了しました。
旧:begin
apex_util.set_workspace('&WKSPNAME');
apex_util.create_user(
p_user_name => '&ADMINNAME',
p_web_password => '&ADMINPASS',
p_developer_privs => 'ADMIN:CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL',
p_email_address => '&ADMINMAIL',
p_default_schema => '&DBUSER',
p_change_password_on_first_use => 'N'
);
end;
新:begin
apex_util.set_workspace('hr_dev');
apex_util.create_user(
p_user_name => 'hr_admin',
p_web_password => 'oracle',
p_developer_privs => 'ADMIN:CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL',
p_email_address => 'noreply@example.com',
p_default_schema => 'hr',
p_change_password_on_first_use => 'N'
);
end;
PL/SQLプロシージャが正常に完了しました。
Oracle AI Database 26ai Free Release 23.26.0.0.0 - Develop, Learn, and Run for Free
Version 23.26.0.0.0から切断されました
ynakakoshi@Ns-Macbook apex-arm %



