- 这章其实我想试一下startup部分做mount,因为前一章在建完数据库容器后,需要手动创建用户,授权,建表等,好像正好这部分可以放到startup里,在创建容器时直接做好;因为setup部分我实在没想出来能做什么,所以那部分就不做试验了。后边的链接是官方文档里的描述,主要根据这部分做。
/opt/oracle/scripts/startup
Running scripts after setup and on startup
Running Oracle Database 21c/18c Express Edition in a container
To run your Oracle Database 21c, or 18c Express Edition container image use the docker run command as follows:docker run --name <container name> \
-p <host port>:1521 -p <host port>:5500 \
-e ORACLE_PWD=<your database passwords> \
-e ORACLE_CHARACTERSET=<your character set> \
-v [<host mount point>:]/opt/oracle/oradata \
oracle/database:21.3.0-xeParameters:--name: The name of the container (default: auto generated)-p: The port mapping of the host port to the container port.Two ports are exposed: 1521 (Oracle Listener), 5500 (EM Express)-e ORACLE_PWD: The Oracle Database SYS, SYSTEM and PDB_ADMIN password (default: auto generated)-e ORACLE_CHARACTERSET:The character set to use when creating the database (default: AL32UTF8)-v /opt/oracle/oradataThe data volume to use for the database.Has to be writable by the Unix "oracle" (uid: 54321) user inside the container!If omitted the database will not be persisted over container recreation.-v /opt/oracle/scripts/startup | /docker-entrypoint-initdb.d/startupOptional: A volume with custom scripts to be run after database startup.For further details see the "Running scripts after setup and on startup" section below.-v /opt/oracle/scripts/setup | /docker-entrypoint-initdb.d/setupOptional: A volume with custom scripts to be run after database setup.For further details see the "Running scripts after setup and on startup" section below.
1.首先将前一章创建的容器停止,删除
sixdog@sixiaodong oracle %
sixdog@sixiaodong oracle % docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0aa0fc400733 oracle/database:21.3.0-xe "/bin/bash -c $ORACL…" 5 hours ago Up 5 hours (healthy) 0.0.0.0:1521->1521/tcp, 0.0.0.0:5500->5500/tcp oracle21
sixdog@sixiaodong oracle % docker stop oracle21
oracle21
sixdog@sixiaodong oracle % docker rm oracle21
oracle21
sixdog@sixiaodong oracle % docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
sixdog@sixiaodong oracle %
2.目录结构
在本地电脑的创建的oracle目录下的树形结构
├── oradata
├── scripts
│ ├── setup
│ └── startup
│ ├── 01_create.sql
│ ├── 02_dept.sql
│ └── 03_emp.sql
01-03 sql文件里的内容就是前一章创建用户权限以及创建表的sql
3.创建并启动容器
这里需要注意,我是拿前一章我写的命令改的,但是复制到命令窗口就报:docker: invalid reference format.错误,应该是有些什么格式被拷到命令行了,完全手打一边执行就好了
sixdog@sixiaodong oracle % docker run -d \
--name oracle21 \
-p 1521:1521 -p 5500:5500 \
-e ORACLE_PWD:123456 \
-v ./oradata:/opt/oracle/oradata \
-v ./scripts/startup:/opt/oracle/scripts/startup \
oracle/database:21.3.0-xe
35493050254a5b507d281467771986cd28b61873c555abe2df6023500bef832a
4.三个sql文件的内容
4.1.vi ./scripts/startup/01_create.sql
alter session set container = XEPDB1;
CREATE USER SIXDOG IDENTIFIED BY 123456;
GRANT CONNECT, RESOURCE, DBA TO SIXDOG;
4.2.vi ./scripts/startup/02_dept.sql
alter session set container = XEPDB1;--------------------------------------------------------
-- 文件已创建 - 星期六-十月-21-2023
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table DEPT
--------------------------------------------------------CREATE TABLE "SIXDOG"."DEPT"( "DEPTNO" NUMBER(2,0),"DNAME" VARCHAR2(14 BYTE),"LOC" VARCHAR2(13 BYTE)) SEGMENT CREATION IMMEDIATEPCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255NOCOMPRESS LOGGINGSTORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)TABLESPACE "USERS" ;
REM INSERTING into SIXDOG.DEPT
SET DEFINE OFF;
Insert into SIXDOG.DEPT (DEPTNO,DNAME,LOC) values (10,'ACCOUNTING','NEW YORK');
Insert into SIXDOG.DEPT (DEPTNO,DNAME,LOC) values (20,'RESEARCH','DALLAS');
Insert into SIXDOG.DEPT (DEPTNO,DNAME,LOC) values (30,'SALES','CHICAGO');
Insert into SIXDOG.DEPT (DEPTNO,DNAME,LOC) values (40,'OPERATIONS','BOSTON');
--------------------------------------------------------
-- DDL for Index PK_DEPT
--------------------------------------------------------CREATE UNIQUE INDEX "SIXDOG"."PK_DEPT" ON "SIXDOG"."DEPT" ("DEPTNO")PCTFREE 10 INITRANS 2 MAXTRANS 255STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)TABLESPACE "USERS" ;
--------------------------------------------------------
-- Constraints for Table DEPT
--------------------------------------------------------ALTER TABLE "SIXDOG"."DEPT" ADD CONSTRAINT "PK_DEPT" PRIMARY KEY ("DEPTNO")USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)TABLESPACE "USERS" ENABLE;commit;
4.3.vi ./scripts/startup/03_emp.sql
alter session set container = XEPDB1;
--------------------------------------------------------
-- 文件已创建 - 星期六-十月-21-2023
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table EMP
--------------------------------------------------------CREATE TABLE "SIXDOG"."EMP"( "EMPNO" NUMBER(4,0),"ENAME" VARCHAR2(10 BYTE),"JOB" VARCHAR2(9 BYTE),"MGR" NUMBER(4,0),"HIREDATE" DATE,"SAL" NUMBER(7,2),"COMM" NUMBER(7,2),"DEPTNO" NUMBER(2,0)) SEGMENT CREATION IMMEDIATEPCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255NOCOMPRESS LOGGINGSTORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)TABLESPACE "USERS" ;
REM INSERTING into SIXDOG.EMP
SET DEFINE OFF;
insert into SIXDOG.emp values( 7839, 'KING', 'PRESIDENT', null, to_date('17-11-1981','dd-mm-yyyy'), 5000, null, 10 );
insert into SIXDOG.emp values( 7698, 'BLAKE', 'MANAGER', 7839, to_date('1-5-1981','dd-mm-yyyy'), 2850, null, 30 );
insert into SIXDOG.emp values( 7782, 'CLARK', 'MANAGER', 7839, to_date('9-6-1981','dd-mm-yyyy'), 2450, null, 10 );
insert into SIXDOG.emp values( 7566, 'JONES', 'MANAGER', 7839, to_date('2-4-1981','dd-mm-yyyy'), 2975, null, 20 );
insert into SIXDOG.emp values( 7788, 'SCOTT', 'ANALYST', 7566, to_date('13-7-87','dd-mm-rr') - 85, 3000, null, 20 );
insert into SIXDOG.emp values( 7902, 'FORD', 'ANALYST', 7566, to_date('3-12-1981','dd-mm-yyyy'), 3000, null, 20 );
insert into SIXDOG.emp values( 7369, 'SMITH', 'CLERK', 7902, to_date('17-12-1980','dd-mm-yyyy'), 800, null, 20 );
insert into SIXDOG.emp values( 7499, 'ALLEN', 'SALESMAN', 7698, to_date('20-2-1981','dd-mm-yyyy'), 1600, 300, 30 );
insert into SIXDOG.emp values( 7521, 'WARD', 'SALESMAN', 7698, to_date('22-2-1981','dd-mm-yyyy'), 1250, 500, 30 );
insert into SIXDOG.emp values( 7654, 'MARTIN', 'SALESMAN', 7698, to_date('28-9-1981','dd-mm-yyyy'), 1250, 1400, 30 );
insert into SIXDOG.emp values( 7844, 'TURNER', 'SALESMAN', 7698, to_date('8-9-1981','dd-mm-yyyy'), 1500, 0, 30 );
insert into SIXDOG.emp values( 7876, 'ADAMS', 'CLERK', 7788, to_date('13-7-87', 'dd-mm-rr') - 51, 1100, null, 20 );
insert into SIXDOG.emp values( 7900, 'JAMES', 'CLERK', 7698, to_date('3-12-1981','dd-mm-yyyy'), 950, null, 30 );
insert into SIXDOG.emp values( 7934, 'MILLER', 'CLERK', 7782, to_date('23-1-1982','dd-mm-yyyy'), 1300, null, 10 );--------------------------------------------------------
-- DDL for Index PK_EMP
--------------------------------------------------------CREATE UNIQUE INDEX "SIXDOG"."PK_EMP" ON "SIXDOG"."EMP" ("EMPNO")PCTFREE 10 INITRANS 2 MAXTRANS 255STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)TABLESPACE "USERS" ;
--------------------------------------------------------
-- Constraints for Table EMP
--------------------------------------------------------ALTER TABLE "SIXDOG"."EMP" ADD CONSTRAINT "PK_EMP" PRIMARY KEY ("EMPNO")USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)TABLESPACE "USERS" ENABLE;
--------------------------------------------------------
-- Ref Constraints for Table EMP
--------------------------------------------------------ALTER TABLE "SIXDOG"."EMP" ADD CONSTRAINT "FK_DEPTNO" FOREIGN KEY ("DEPTNO")REFERENCES "SIXDOG"."DEPT" ("DEPTNO") ENABLE;commit;
4.4.仔细看会发现每个sql文件里都加了这句sql:alter session set container = XEPDB1;这是因为当执行完01的sql后,在02执行时又变回未变更的状态,记得是什么cbd,所以第二个文件执行书会报错,找不到01里创建的sixdog用户,因此每个sql文件开头都要执行下alter session set container = XEPDB1;这句话,才能后边正常执行完
5.启动时的log,能看到startip的sql的执行结果等信息
sixdog@sixiaodong oracle % docker logs -f -t --tail=200 oracle21
2023-10-21T13:14:21.122127328Z Specify a password to be used for database accounts. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. Note that the same password will be used for SYS, SYSTEM and PDBADMIN accounts:
2023-10-21T13:14:21.122205148Z Confirm the password:
2023-10-21T13:14:21.125179095Z Configuring Oracle Listener.
2023-10-21T13:14:22.170274929Z Listener configuration succeeded.
2023-10-21T13:14:22.170293197Z Configuring Oracle Database XE.
2023-10-21T13:14:27.431078459Z Enter SYS user password:
2023-10-21T13:14:27.431797591Z ******************
2023-10-21T13:14:27.432183957Z Enter SYSTEM user password:
2023-10-21T13:14:27.433604612Z ****************
2023-10-21T13:14:27.434078778Z Enter PDBADMIN User Password:
2023-10-21T13:14:27.435423640Z *******************
2023-10-21T13:14:32.338077207Z Prepare for db operation
2023-10-21T13:14:32.447725526Z 7% complete
2023-10-21T13:14:32.448756267Z Copying database files
2023-10-21T13:15:30.528078655Z 29% complete
2023-10-21T13:15:30.528738192Z Creating and starting Oracle instance
2023-10-21T13:15:31.399441903Z 30% complete
2023-10-21T13:15:35.816375473Z 33% complete
2023-10-21T13:18:09.118585435Z 37% complete
2023-10-21T13:18:09.392835416Z 40% complete
2023-10-21T13:18:38.738733843Z 43% complete
2023-10-21T13:18:38.738941299Z Completing Database Creation
2023-10-21T13:18:39.965427557Z 47% complete
2023-10-21T13:20:26.284353176Z 50% complete
2023-10-21T13:20:26.285642082Z Creating Pluggable Databases
2023-10-21T13:20:36.479225831Z 54% complete
2023-10-21T13:20:36.479553205Z 71% complete
2023-10-21T13:20:36.480084657Z Executing Post Configuration Actions
2023-10-21T13:20:36.480585492Z 93% complete
2023-10-21T13:20:36.481269227Z Running Custom Scripts
2023-10-21T13:20:37.341984478Z 100% complete
2023-10-21T13:20:37.343098621Z Database creation complete. For details check the logfiles at:
2023-10-21T13:20:37.343115107Z /opt/oracle/cfgtoollogs/dbca/XE.
2023-10-21T13:20:37.343122165Z Database Information:
2023-10-21T13:20:37.343130299Z Global Database Name:XE
2023-10-21T13:20:37.343134676Z System Identifier(SID):XE
2023-10-21T13:20:37.346008056Z Look at the log file "/opt/oracle/cfgtoollogs/dbca/XE/XE.log" for further details.
2023-10-21T13:20:37.710223931Z
2023-10-21T13:20:37.724147696Z Connect to Oracle Database using one of the connect strings:
2023-10-21T13:20:37.724166410Z Pluggable database: 35493050254a/XEPDB1
2023-10-21T13:20:37.724180637Z Multitenant container database: 35493050254a
2023-10-21T13:20:37.724183312Z Use https://localhost:5500/em to access Oracle Enterprise Manager for Oracle Database XE
2023-10-21T13:20:37.735017669Z
2023-10-21T13:20:37.735076915Z SQL*Plus: Release 21.0.0.0.0 - Production on Sat Oct 21 13:20:37 2023
2023-10-21T13:20:37.735084400Z Version 21.3.0.0.0
2023-10-21T13:20:37.735086955Z
2023-10-21T13:20:37.735088957Z Copyright (c) 1982, 2021, Oracle. All rights reserved.
2023-10-21T13:20:37.735090961Z
2023-10-21T13:20:37.779185240Z
2023-10-21T13:20:37.779206298Z Connected to:
2023-10-21T13:20:37.779209146Z Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production
2023-10-21T13:20:37.779211365Z Version 21.3.0.0.0
2023-10-21T13:20:37.779213319Z
2023-10-21T13:20:37.799757965Z SQL>
2023-10-21T13:20:37.799839527Z System altered.
2023-10-21T13:20:37.799847394Z
2023-10-21T13:20:37.818350175Z SQL>
2023-10-21T13:20:37.818380568Z System altered.
2023-10-21T13:20:37.818383592Z
2023-10-21T13:20:37.832978864Z SQL>
2023-10-21T13:20:37.833043587Z Pluggable database altered.
2023-10-21T13:20:37.833055564Z
2023-10-21T13:20:37.953638976Z SQL>
2023-10-21T13:20:37.953663825Z PL/SQL procedure successfully completed.
2023-10-21T13:20:37.953667379Z
2023-10-21T13:20:37.954561400Z SQL> SQL>
2023-10-21T13:20:37.954578271Z Session altered.
2023-10-21T13:20:37.954581370Z
2023-10-21T13:20:37.988116413Z SQL>
2023-10-21T13:20:37.988138506Z User created.
2023-10-21T13:20:37.988141479Z
2023-10-21T13:20:37.997585183Z SQL>
2023-10-21T13:20:37.997606753Z Grant succeeded.
2023-10-21T13:20:37.997610047Z
2023-10-21T13:20:38.027503674Z SQL>
2023-10-21T13:20:38.027551906Z Grant succeeded.
2023-10-21T13:20:38.027559235Z
2023-10-21T13:20:38.041915587Z SQL>
2023-10-21T13:20:38.042085919Z Grant succeeded.
2023-10-21T13:20:38.042113900Z
2023-10-21T13:20:38.052054079Z SQL>
2023-10-21T13:20:38.052076380Z User altered.
2023-10-21T13:20:38.052079478Z
2023-10-21T13:20:38.054248698Z SQL> SQL> Disconnected from Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production
2023-10-21T13:20:38.054267456Z Version 21.3.0.0.0
2023-10-21T13:20:38.064175825Z
2023-10-21T13:20:38.064196359Z SQL*Plus: Release 21.0.0.0.0 - Production on Sat Oct 21 13:20:38 2023
2023-10-21T13:20:38.064208466Z Version 21.3.0.0.0
2023-10-21T13:20:38.064210797Z
2023-10-21T13:20:38.064212732Z Copyright (c) 1982, 2021, Oracle. All rights reserved.
2023-10-21T13:20:38.064214745Z
2023-10-21T13:20:38.094925444Z
2023-10-21T13:20:38.094945962Z Connected to:
2023-10-21T13:20:38.094949031Z Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production
2023-10-21T13:20:38.094951413Z Version 21.3.0.0.0
2023-10-21T13:20:38.094953490Z
2023-10-21T13:20:38.153361362Z SQL>
2023-10-21T13:20:38.153383521Z PL/SQL procedure successfully completed.
2023-10-21T13:20:38.153386644Z
2023-10-21T13:20:38.155045301Z SQL> Disconnected from Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production
2023-10-21T13:20:38.155063894Z Version 21.3.0.0.0
2023-10-21T13:20:38.170215533Z The Oracle base remains unchanged with value /opt/oracle
2023-10-21T13:20:38.353386413Z The Oracle base remains unchanged with value /opt/oracle
2023-10-21T13:20:38.451122990Z #########################
2023-10-21T13:20:38.451146204Z DATABASE IS READY TO USE!
2023-10-21T13:20:38.451150177Z #########################
2023-10-21T13:20:38.458289969Z
2023-10-21T13:20:38.458363508Z Executing user defined scripts
2023-10-21T13:20:38.459129203Z /opt/oracle/runUserScripts.sh: running /opt/oracle/scripts/startup/01_create.sql
2023-10-21T13:20:38.577575694Z
2023-10-21T13:20:38.577593539Z Session altered.
2023-10-21T13:20:38.577596448Z
2023-10-21T13:20:38.697569152Z
2023-10-21T13:20:38.697595114Z User created.
2023-10-21T13:20:38.697598534Z
2023-10-21T13:20:38.709579959Z
2023-10-21T13:20:38.709607819Z Grant succeeded.
2023-10-21T13:20:38.709614822Z
2023-10-21T13:20:38.712083354Z
2023-10-21T13:20:38.712102217Z
2023-10-21T13:20:38.712105469Z /opt/oracle/runUserScripts.sh: running /opt/oracle/scripts/startup/02_dept.sql
2023-10-21T13:20:38.754994131Z
2023-10-21T13:20:38.755013344Z Session altered.
2023-10-21T13:20:38.755016207Z
2023-10-21T13:20:39.524282554Z
2023-10-21T13:20:39.524307249Z Table created.
2023-10-21T13:20:39.524310831Z
2023-10-21T13:20:39.529534041Z
2023-10-21T13:20:39.529555468Z 1 row created.
2023-10-21T13:20:39.529558762Z
2023-10-21T13:20:39.530490912Z
2023-10-21T13:20:39.530521095Z 1 row created.
2023-10-21T13:20:39.530645955Z
2023-10-21T13:20:39.531657233Z
2023-10-21T13:20:39.531671160Z 1 row created.
2023-10-21T13:20:39.531673879Z
2023-10-21T13:20:39.532556601Z
2023-10-21T13:20:39.532569384Z 1 row created.
2023-10-21T13:20:39.532572118Z
2023-10-21T13:20:39.553528886Z
2023-10-21T13:20:39.553550820Z Index created.
2023-10-21T13:20:39.553553750Z
2023-10-21T13:20:39.616002309Z
2023-10-21T13:20:39.616038649Z Table altered.
2023-10-21T13:20:39.616042965Z
2023-10-21T13:20:39.616527761Z
2023-10-21T13:20:39.616545175Z Commit complete.
2023-10-21T13:20:39.616550413Z
2023-10-21T13:20:39.619908927Z
2023-10-21T13:20:39.619946046Z
2023-10-21T13:20:39.619952773Z /opt/oracle/runUserScripts.sh: running /opt/oracle/scripts/startup/03_emp.sql
2023-10-21T13:20:39.663941954Z
2023-10-21T13:20:39.663973429Z Session altered.
2023-10-21T13:20:39.663978939Z
2023-10-21T13:20:39.682552373Z
2023-10-21T13:20:39.682605415Z Table created.
2023-10-21T13:20:39.682612553Z
2023-10-21T13:20:39.685820831Z
2023-10-21T13:20:39.685841309Z 1 row created.
2023-10-21T13:20:39.685844372Z
2023-10-21T13:20:39.687053680Z
2023-10-21T13:20:39.687068893Z 1 row created.
2023-10-21T13:20:39.687072478Z
2023-10-21T13:20:39.688332356Z
2023-10-21T13:20:39.688346240Z 1 row created.
2023-10-21T13:20:39.688348930Z
2023-10-21T13:20:39.689552873Z
2023-10-21T13:20:39.689568292Z 1 row created.
2023-10-21T13:20:39.689574128Z
2023-10-21T13:20:39.690735517Z
2023-10-21T13:20:39.690775905Z 1 row created.
2023-10-21T13:20:39.690782551Z
2023-10-21T13:20:39.691759649Z
2023-10-21T13:20:39.691772139Z 1 row created.
2023-10-21T13:20:39.691774823Z
2023-10-21T13:20:39.693302713Z
2023-10-21T13:20:39.693316161Z 1 row created.
2023-10-21T13:20:39.693318938Z
2023-10-21T13:20:39.694130277Z
2023-10-21T13:20:39.694143434Z 1 row created.
2023-10-21T13:20:39.694146282Z
2023-10-21T13:20:39.695387687Z
2023-10-21T13:20:39.695401444Z 1 row created.
2023-10-21T13:20:39.695403986Z
2023-10-21T13:20:39.696347720Z
2023-10-21T13:20:39.696370274Z 1 row created.
2023-10-21T13:20:39.696373093Z
2023-10-21T13:20:39.697666397Z
2023-10-21T13:20:39.697681239Z 1 row created.
2023-10-21T13:20:39.697683941Z
2023-10-21T13:20:39.698633514Z
2023-10-21T13:20:39.698685685Z 1 row created.
2023-10-21T13:20:39.698693709Z
2023-10-21T13:20:39.700066338Z
2023-10-21T13:20:39.700122568Z 1 row created.
2023-10-21T13:20:39.700133319Z
2023-10-21T13:20:39.701774785Z
2023-10-21T13:20:39.701841707Z 1 row created.
2023-10-21T13:20:39.701849451Z
2023-10-21T13:20:39.711369030Z
2023-10-21T13:20:39.711399066Z Index created.
2023-10-21T13:20:39.711404466Z
2023-10-21T13:20:39.722503272Z
2023-10-21T13:20:39.722532388Z Table altered.
2023-10-21T13:20:39.722535656Z
2023-10-21T13:20:39.735012744Z
2023-10-21T13:20:39.735036580Z Table altered.
2023-10-21T13:20:39.735041588Z
2023-10-21T13:20:39.735377936Z
2023-10-21T13:20:39.735418523Z Commit complete.
2023-10-21T13:20:39.735432204Z
2023-10-21T13:20:39.738078540Z
2023-10-21T13:20:39.738097892Z
2023-10-21T13:20:39.738100866Z DONE: Executing user defined scripts
2023-10-21T13:20:39.738103114Z
2023-10-21T13:20:39.738561858Z The following output is now a tail of the alert.log:
2023-10-21T13:20:39.739961363Z 2023-10-21T13:20:37.793437+00:00
2023-10-21T13:20:39.739980593Z ALTER SYSTEM SET control_files='/opt/oracle/oradata/XE/control01.ctl' SCOPE=SPFILE;
2023-10-21T13:20:39.739983557Z 2023-10-21T13:20:37.815907+00:00
2023-10-21T13:20:39.739985839Z ALTER SYSTEM SET local_listener='' SCOPE=BOTH;
2023-10-21T13:20:39.739987851Z ALTER PLUGGABLE DATABASE XEPDB1 SAVE STATE
2023-10-21T13:20:39.739989767Z Completed: ALTER PLUGGABLE DATABASE XEPDB1 SAVE STATE
2023-10-21T13:20:39.739991704Z 2023-10-21T13:20:38.832451+00:00
2023-10-21T13:20:39.739993721Z XEPDB1(3):Resize operation completed for file# 10, fname /opt/oracle/oradata/XE/XEPDB1/sysaux01.dbf, old size 337920K, new size 348160K
2023-10-21T13:20:39.739995793Z 2023-10-21T13:20:38.895745+00:00
2023-10-21T13:20:39.739997693Z XEPDB1(3):Resize operation completed for file# 10, fname /opt/oracle/oradata/XE/XEPDB1/sysaux01.dbf, old size 348160K, new size 358400K
6.DBeaver连接确认
7,成功!