(二)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.mzph.cn/news/116717.shtml

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

相关文章

php对接飞书机器人

有同事接到对接飞书机器人任务&#xff0c;开发中遇到响应错误&#xff1a; {"code": 19021,"msg": "sign match fail or timestamp is not within one hour from current time" } 意思应该就是签名错误或者时间戳不在有效范围内等&#xff0c…

Java NIO

Java NIO 一&#xff0c;介绍 Java NIO&#xff08;New IO&#xff09;是 JDK 1.4 引入的一组新的 I/O API&#xff0c;用于支持非阻塞式 I/O 操作。相比传统的 Java IO API&#xff0c;NIO 提供了更快、更灵活的 I/O 操作方式&#xff0c;可以用于构建高性能网络应用程序。 …

京东数据分析:2023年9月京东白酒行业品牌销售排行榜

鲸参谋监测的京东平台9月份白酒市场销售数据已出炉&#xff01; 9月白酒市场的整体热度较高&#xff0c;贵州茅台先是与瑞幸联名推出酱香拿铁&#xff0c;后又宣布与德芙推出联名产品酒心巧克力&#xff0c;引起了诸多消费者的关注。在这一热度的加持下&#xff0c;从销售上看&…

深入理解Redis集群模式、协议、元数据维护方式

文章目录 &#x1f34a; 集群模式&#x1f34a; 集群协议&#x1f34a; 元数据维护方式&#x1f389; 集中式&#x1f389; gossip 协议 &#x1f4d5;我是廖志伟&#xff0c;一名Java开发工程师、Java领域优质创作者、CSDN博客专家、51CTO专家博主、阿里云专家博主、清华大学出…

第01章-Java语言概述

目录 1 常见DOS命令 常用指令 相对路径与绝对路径 2 转义字符 3 安装JDK与配置环境变量 JDK与JRE JDK的版本 JDK的下载 JDK的安装 配置path环境变量 4 Java程序的编写与执行 5 Java注释 6 Java API文档 7 Java核心机制&#xff1a;JVM 1 常见DOS命令 DOS&#xff08;…

Lua-http库写一个爬虫程序怎么样 ?

以下是一个使用Lua-http库编写的一个爬虫程序&#xff0c;该爬虫使用Lua语言来抓取www.snapchat.com的内容。 代码必须使用以下代码&#xff1a;get_proxy -- 导入所需的库 local http require("http") local json require("json")-- 定义爬虫IP服务器 …

安装docker ,更换docker版本

docker dockerd & containerd Dockerd&#xff08;Docker 守护进程&#xff09;在其底层使用 Containerd 来管理容器。Containerd 是一个开源的容器运行时管理器&#xff0c;由 Docker 公司于2017年开发并开源&#xff0c;它负责实际的容器生命周期管理。 以下是 Docker 守…

力扣每日一题49:字母异位词分组

题目描述&#xff1a; 给你一个字符串数组&#xff0c;请你将 字母异位词 组合在一起。可以按任意顺序返回结果列表。 字母异位词 是由重新排列源单词的所有字母得到的一个新单词。 示例 1: 输入: strs ["eat", "tea", "tan", "ate&quo…

清华训练营悟道篇之浅谈操作系统

文章目录 前言系统软件执行环境操作系统的功能操作系统组成 前言 操作系统是一个帮助用户和应用程序使用和管理计算机资源的软件&#xff0c;它控制着嵌入式设备、更通用的系统&#xff08;如智能手机、台式计算机和服务器&#xff09;以及巨型机等各种计算机系统 系统软件 …

【前段基础入门之】=>CSS3新增渐变颜色属性

导语&#xff1a; CSS3 新增了&#xff0c;渐变色 的解决方案&#xff0c;这使得我们可以绘制出更加生动的炫酷的的配色效果 线性渐变 多个颜色之间的渐变&#xff0c; 默认从上到下渐变 background-image: linear-gradient(red,yellow,green); /*默认从上到下渐变*/默认从上…

期中考核复现

web 1z_php ?0o0[]1A&OoO[]2023a include "flag.php"&#xff1a;尝试包含名为 "flag.php" 的文件。这意味着它会尝试引入一个名为 "flag.php" 的脚本文件&#xff0c;其中可能包含一些敏感信息或标志。 error_reporting(0)&#xff1a;…

腾讯待办是不是停了?能准时提醒待办事项的APP

有不少网友会使用“腾讯待办”小程序来记录待办的事情&#xff0c;并且设置提醒时间&#xff0c;进行任务管理。不过有不少网友最近在使用腾讯待办小程序的时候&#xff0c;看到了“业务关停通知”的弹窗&#xff0c;想问一下&#xff0c;腾讯待办是不是停了&#xff1f;确实如…

如何在Puppeteer中设置User-Agent来绕过京东的反爬虫机制?

概述 京东作为中国最大的电商平台&#xff0c;为了保护其网站数据的安全性&#xff0c;采取了一系列的反爬虫机制。然而&#xff0c;作为开发者&#xff0c;我们可能需要使用爬虫工具来获取京东的数据。 正文 Puppeteer 是一个由 Google 开发的 Node.js 库&#xff0c;它提供…

VMware虚拟机中ubuntu网络连接不上

VMware虚拟机中ubuntu中网络连接不上 解决方案其他虚拟机网络 解决方案 1.选择VMware中编辑-虚拟网络编辑器-更改&#xff1a; 设置为你喜欢的模式&#xff0c;这里为NET模式 2.选中ubuntu虚拟机&#xff08;关机后的虚拟机&#xff09;&#xff0c;点击&#xff1a;编辑虚拟机…

GoLong的学习之路(八)语法之Map

文章目录 Map初始化方式判断某个键是否存在map的遍历对value值遍历。对key值遍历 使用delete()函数删除键值对按照指定顺序遍历map元素为map的切片值为切片类型的map 做个题吧 Map 哈希表是一种巧妙并且实用的数据结构。它是一个无序的key/value对的集合&#xff0c;其中所有的…

【十四】记一次MySQL宕机恢复过程,MySQL INNODB 损坏恢复

记一次MySQL宕机恢复过程 简介&#xff1a;一个业务数据库疏于运维管理&#xff0c;突然在今天崩溃宕机了&#xff0c;真是让人抓狂&#xff0c;上面也不知道积累了多久的数据&#xff0c;平时也没有定期做好备份&#xff0c;这下岂不是瞎了啊&#xff0c;经过不断的收集信息和…

LeetCode977——有序数组的平方

LeetCode977——有序数组的平方 给你一个按 非递减顺序 排序的整数数组 nums&#xff0c;返回 每个数字的平方 组成的新数组&#xff0c;要求新数组也按 非递减顺序 排序。 输入&#xff1a;nums [-4,-1,0,3,10] 输出&#xff1a;[0,1,9,16,100] 解释&#xff1a;平方后&…

跟着NatureMetabolism学作图:R语言ggplot2转录组差异表达火山图

论文 Independent phenotypic plasticity axes define distinct obesity sub-types https://www.nature.com/articles/s42255-022-00629-2#Sec15 s42255-022-00629-2.pdf 论文中没有公开代码&#xff0c;但是所有作图数据都公开了&#xff0c;我们可以试着用论文中提供的数据…

用长tree方式做等长线

我正在「拾陆楼」和朋友们讨论有趣的话题,你⼀起来吧? 拾陆楼知识星球入口 相关文章链接: 用set_data_check的方式做等长线 前面讲过了如何用set_data_check做等长线,这里再讲一下如何用cts的方式做。 1)写一个sdc,把等长线的起点设置成clock source,用于创建create_…

项目结束需要经历的5个关键步骤

项目结束是项目管理不可或缺的一部分。这是项目的最后阶段&#xff0c;根据关键绩效指标和范围对交付成果进行测试&#xff0c;收尾&#xff0c;总结经验教训&#xff0c;完成交接&#xff0c;并签署项目。 项目结束与启动会议和一样重要。管理人员应为此留出时间&#xff0c;…