(二)docker:建立oracle数据库mount startup

  • 这章其实我想试一下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,成功!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/168199.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

订水商城H5实战教程-02系统登录

目录 1 创建数据源2 创建自定义应用3 创建全局变量4 实现登录功能5 控制弹窗是否显示6 最终的效果 上一篇我们分析了订水商城的功能&#xff0c;功能分析好了之后&#xff0c;就需要开发功能。用户登录商城的第一步就是进行登录&#xff0c;登录的时候需要同意用户协议&#xf…

SpringBoot AOP + Redis 延时双删功能实战

一、业务场景 在多线程并发情况下&#xff0c;假设有两个数据库修改请求&#xff0c;为保证数据库与redis的数据一致性&#xff0c;修改请求的实现中需要修改数据库后&#xff0c;级联修改Redis中的数据。 请求一&#xff1a;A修改数据库数据 B修改Redis数据 请求二&#xff…

修炼k8s+flink+hdfs+dlink(六:学习k8s-pod)

一&#xff1a;增&#xff08;创建&#xff09;。 直接进行创建。 kubectl run nginx --imagenginx使用yaml清单方式进行创建。 直接创建方式&#xff0c;并建立pod。 kubectl create deployment my-nginx-deployment --imagenginx:latest 先创建employment&#xff0c;不…

CSS页面基本布局

前提回顾 1. 超文本标记语言&#xff08;HTML&#xff09;是一种标记语言&#xff0c;用来结构化我们的网页内容并赋予内容含义&#xff1b; &#xff08;超文本标记语言&#xff08;英语&#xff1a;HyperText Markup Language /ˈhaɪpətekst ˈmɑːkʌp ˈlŋɡwɪdʒ /…

由浅到深 : Self-Attention (自注意力机制)

Self-Attention 看到下面的第一个saw是动词&#xff0c;第二个saw是名词。 因为第一个saw和第二个saw在形式上没有任何差别。如果任务是进行词性的判断&#xff0c;把上面的词直接输入给神经网络&#xff0c;那么它肯定不能够正确分析。 想要正确分析词性&#xff0c;那么该…

CRM自动化意味着什么?企业如何从中受益?

客户关系管理&#xff08;CRM&#xff09;软件不再仅仅适用于大公司或销售周期长的行业&#xff0c;它越来越成为各种规模企业的重要工具。 在日常工作中&#xff0c;当你陷入流程的所有细节时&#xff0c;可能会产生不必要的工作。因此&#xff0c;如果你想要CRM提供的组织和…

Redis的持久化策略:RDB与AOF(面试题详解)

文章来源&#xff1a;Redis持久化的两种方式&#xff1a;RDB与AOF&#xff08;详解&#xff09;&#xff0c;订正了一些错误 一、概述&#xff1a; RDB和AOF持久化的由来&#xff1f; 因为Redis中的数据是基于内存的&#xff0c;所以如果出现服务器断电或者服务器宕机&#xf…

数据结构堆详解

[TOC]堆详解 一&#xff0c;堆 1.1堆的概念 堆的性质&#xff1a; 堆中某个节点的值总是不大于或不小于其父节点的值&#xff1b; 堆总是一棵完全二叉树。 1.2堆的存储模式 我们前面的文章提到过&#xff0c;二叉树的两种存储模式&#xff0c;一个是顺序存储&#xff0c;一…

【Java集合类面试八】、 介绍一下HashMap底层的实现原理

文章底部有个人公众号&#xff1a;热爱技术的小郑。主要分享开发知识、学习资料、毕业设计指导等。有兴趣的可以关注一下。为何分享&#xff1f; 踩过的坑没必要让别人在再踩&#xff0c;自己复盘也能加深记忆。利己利人、所谓双赢。 面试官&#xff1a; 介绍一下HashMap底层的…

华为OD技术面试-最短距离矩阵(动态规划、广度优先)

背景 记录2023-10-21 晚华为OD三面的手撕代码题&#xff0c;当时没做出来&#xff0c;给面试官说了我的想法&#xff0c;评价&#xff1a;解法复杂了&#xff0c;只是简单的动态规范 或 广度优先算法&#xff0c;事后找资料记录实现方式。 题目 腐烂的橘子 问题描述&#xff…

怎样找外企/远程的工作

“如果你既不想卷&#xff0c;又不想参与职场的勾心斗角&#xff0c;也不算行业大牛&#xff0c;还不愿意冒太高风险&#xff0c;那还有一种渠道&#xff0c;就是找海外公司的远程工作&#xff0c;比如我有几个程序员朋友&#xff0c;都是拿着硅谷动辄 20w 刀的薪水&#xff0c…

头脑风暴之约瑟夫环问题

一 问题的引入 约瑟夫问题的源头完全可以命名为“自杀游戏”。本着和谐友爱和追求本质的目的&#xff0c;可以把问题描述如下&#xff1a; 现有n个人围成一桌坐下&#xff0c;编号从1到n&#xff0c;从编号为1的人开始报数。报数也从1开始&#xff0c;报到m人离席&#xff0c…

重生奇迹mu宠物带来不一样的体验

重生奇迹mu宠物有什么作用&#xff1f; 全新版本中更是推出了各种宠物&#xff0c;在玩游戏时还可以带着宠物&#xff0c;一起疯狂的刷怪等等&#xff0c;可以为玩家带来非常不错的游戏体验&#xff0c;那么下面就来给大家说说各种宠物适合做什么事情。 1、强化恶魔适合刷怪 …

爱创科技携手洽洽食品,探索渠道数字化最优解!

坚果的下半场&#xff0c;是从吃到喝。 消费升级大潮下&#xff0c;健康养生理念逐渐深入人心。以“天然健康”为核心的食品新消费潮流正加速形成&#xff0c;一个个打着“美味与营养”黄金设定的品类风口正被不断创建&#xff0c;其中人气有增无减的当属植物基饮品。据相关报告…

HarmonyOS鸿蒙原生应用开发设计- HarmonyOS Sans 字体

HarmonyOS设计文档中&#xff0c;为大家提供了独特的字体&#xff0c;开发者可以根据需要直接引用。 开发者直接使用官方提供的字体内容&#xff0c;既可以符合HarmonyOS原生应用的开发上架运营规范&#xff0c;又可以防止使用别人的字体侵权意外情况等&#xff0c;减少自主创…

【Linux驱动】Linux设备树(二)—— 添加设备树节点

了解了设备树的基本语法以后&#xff0c;就可以试着自己手动添加一个节点了&#xff0c;添加完节点以后&#xff0c;需要重新编译生成 .dtb 文件&#xff0c;然后保存到uboot的加载目录下。 目录 1、查看绑定信息文档 2、添加设备树节点 3、编译设备树文件(.dtb) 4、替换设…

JAVA基础(JAVA SE)学习笔记(七)面向对象编程(进阶)

前言 1. 学习视频&#xff1a; 尚硅谷Java零基础全套视频教程(宋红康2023版&#xff0c;java入门自学必备)_哔哩哔哩_bilibili 2023最新Java学习路线 - 哔哩哔哩 第二阶段&#xff1a;Java面向对象编程 6.面向对象编程&#xff08;基础&#xff09; 7.面向对象编程&…

IP协议(下)

目录 一、IP分片 1.为什么需要IP分片 2.IP报头信息 二、分片的组装 1.接收方怎么知道一个报文被分片了 2.同一个报文的分片怎么全部识别出来的 3.报文如何排序&#xff0c;如何得知报文有没有收全 4.怎么将各分片正确组装 5.怎么确定合成的报文是正确的 6.总结 三、…

SSM - Springboot - MyBatis-Plus 全栈体系(三十五)

第八章 项目实战 四、后台功能开发 2. 首页模块开发 2.1 查询首页分类 2.1.1 需求描述 进入新闻首页,查询所有分类并动态展示新闻类别栏位 2.1.2 接口描述 url 地址&#xff1a;portal/findAllTypes 请求方式&#xff1a;get 请求参数&#xff1a;无 响应数据&#xff…