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

news2024/11/17 5:59:45
  • 这章其实我想试一下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-xe

Parameters:
   --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/oradata
                  The 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/startup
                  Optional: 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/setup
                  Optional: 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 IMMEDIATE
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_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 255
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_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 255
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_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 IMMEDIATE
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_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 255
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_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 255
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_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.coloradmin.cn/o/1118817.html

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

相关文章

ES6 Promise 详解

目录 一、Promise基本介绍 二、Promise实现多次请求 1.传统Ajax方式实现多次请求 : 1.1 json数据准备 1.2 JQuery操作Ajax 2.使用ES6新特性Promise方式 : 三、Promise代码重排优化 1.问题分析 : 2.代码优化 : 2.1 数据准备 2.2 代码重排 一、Promise基本介绍 (1) Ajax方…

四川农业大学就业指南←缺失的就业指导课

推荐 125页就业指南&#xff0c; 包含就业去向、就业政策介绍&#xff0c; 也有毕业生常见问题&#xff0c; 就业协议与劳动合同的阐释&#xff0c; 帮助毕业生系统梳理庞杂的各类就业信息&#xff0c; 人文温度冲淡就业惨淡的灰冷阴霾。 有这样一群人&#xff0c;在2023&…

联邦学习的梯度重构

梯度泄露的攻击方法&#xff1a;深度泄露梯度&#xff08;DLG&#xff09;——>在高度压缩的场景下是失效的 原因&#xff1a;梯度压缩&#xff08;可减小通信开销&#xff09;——>存在信息损失<——从而DLG方法效果有限 但是这本身存在的信息损失怎么解决呢&#x…

前端刷题 | 网站

W3Cschoolhttps://www.w3cschool.cn/exam 计算机方面的知识涵盖较全 牛客网 应届生招聘题库&#xff0c;校招实习笔试面试真题 力扣 前端方面的题目较为基础&#xff0c;基本不考复杂算法题 稀土掘金https://juejin.cn/search?query%E5%89%8D%E7%AB%AF%E9%9D%A2%E8%AF%95&a…

基因表达分析聚类分析

基因表达分析聚类&分析 1. Introduction to gene expression analysis Technology: microarrays vs. RNAseq. Resulting data matricesSupervised (Clustering) vs. unsupervised (classification) learning 微阵列技术&#xff1a; 制备DNA探针阵列并进行互补性杂交。 …

(2)Nmap

笔记目录 渗透测试工具(1)wireshark 渗透测试工具(2)Nmap渗透测试工具(3)Burpsuite 1.工具简介 (1)定义 ①功能 网络扫描和嗅探工具包&#xff0c;三个主要基本功能&#xff1a; 探测一组主机是否在线 扫描主机端口、嗅探所提供的网络服务 推断出主机所用的操作系统 ②namp …

配置Linux

首先安装VMware&#xff1a; 安装说明&#xff1a;&#xff08;含许可证的key&#xff09; https://mp.weixin.qq.com/s/XE-BmeKHlhfiRA1bkNHTtg 给大家提供了VMware Workstation Pro16&#xff1a; 链接&#xff1a;https://pan.baidu.com/s/1q8VE3TkPzDnM3u9bkTdA_g 提取码&…

【【萌新的FPGA学习之快速回顾 水 水 】】

萌新的FPGA学习之快速回顾 水 水 上一条FPGA的更新在9 25 并且2个礼拜没写 verilog 了 正好 刷新一下记忆 FPGA CPU DSP 的对比 在数字电路发展多年以来&#xff0c;出现了 CPU、DSP 和 FPGA 三种经典器件&#xff0c;每个都是具有划时代意义的器件。CPU、DSP 和 FPGA 都有各…

[SQL开发笔记]在windows系统安装Postgres

一、软件简介 PostgreSQL是一种自由软件的对象-关系型数据库管理系统&#xff08;ORDBMS&#xff09;&#xff0c;它以加州大学计算机系开发的POSTGRES&#xff0c;4.2版本为基础。PostgreSQL支持大部分的SQL标准并且提供了很多其他现代特性&#xff0c;如复杂查询、外键、触发…

5G来临,迎客莱带你探索运营商大数据的应用

随着5G时代的来临&#xff0c;不仅在算力的基础上得到了加强和保障&#xff0c;同时也丰富了计算的方式和模式&#xff0c;如边缘计算、霾计算等。计算方式和模式的改变&#xff0c;对于运营商来说&#xff0c;意味着更丰富的数据维度&#xff0c;更鲜活的数据和更强大的数据处…

1021 个位数统计

#include<bits/stdc.h> using namespace std; map<int,int>mp; int main(){string str;cin>>str;for(auto t:str){int kt-0;mp[k];}for(auto t:mp){cout<<t.first<<":"<<t.second<<endl;} }

find_element_by_id()方法的使用上。这个方法已经被弃用,建议使用find_element()方法替代。

from selenium import webdriver path chromedriver.exe browser webdriver.Chrome(path) url https://www.baidu.com browser.get(url) button browser.find_element_by_id(su) print(button) 修改后代码 from selenium import webdriver path chromedriver.exe browse…

国密https访问

前言 现在的SSL的加密算法实际上主要是国际算法&#xff0c;包括JDK&#xff0c;Go等语言也仅支持国际算法加密&#xff08;毕竟是国外开源项目&#xff09;&#xff0c;hash。随着国密算法的普及&#xff0c;比如openssl就支持国密了&#xff0c;还要新版本的Linux内核也开始…

识别准确率竟如此高,实时语音识别服务

前言 本文将介绍一个准确率非常高的语音识别框架&#xff0c;那就是FunASR&#xff0c;这个框架的模型训练数据超过几万个小时&#xff0c;经过测试&#xff0c;准确率非常高。本文将介绍如何启动WebSocket服务和Android调用这个服务来实时识别&#xff0c;一边说话一边出结果…

2.卷积神经网络(CNN)

一句话引入&#xff1a; 如果我们要做图像识别&#xff0c;用的是一个200x200的图片&#xff0c;那么BP神经网络的输入层就需要40000个神经元&#xff0c;因为是全连接&#xff0c;所以整个BP神经网络的参数量就是160亿个&#xff0c;显然不能这样来训练网络&#xff0c;所以我…

【RNA structures】RNA转录的重构和前沿测序技术

文章目录 RNA转录重建1 先简单介绍一下测序相关技术2 Map to Genome Methods2.1 Step1 Mapping reads to the genome2.2 Step2 Deal with spliced reads2.3 Step 3 Resolve individual transcripts and their expression levels 3 Align-de-novo approaches3.1 Step 1: Generat…

MySQL——八、MySQL索引视图

MySQL 一、视图1、什么是视图2、为什么需要视图3、视图的作用和优点4、创建视图5、视图使用规则6、修改视图7、删除视图 二、索引1、什么是索引2、索引优缺点3、索引分类4、索引的设计原则5、创建索引5.1 创建表是创建索引5.2 create index5.3 ALTER TABLE 6、删除索引7、MySQL…

英语——歌诀篇——歌诀记忆法

介词用法速记歌 年月季前要用in&#xff0c; 日子前面却不行。 遇到几号要用on&#xff0c; 上午下午又用in。 要说某时上下午&#xff0c; 用on换in才可行。 午夜黄昏和黎明&#xff0c; 要用at不用in。 差儿分到几点&#xff0c; 写个“to”在中间。 若是几点过几分&#xf…

操作系统【OS】进程的通信

共享存储 各个进程对共享空间的访问应该是互斥的&#xff08;可以使用P、V操作&#xff09;低级通信 基于数据结构的共享速度慢、限制多高级通信 基于存储区的共享数据的形式、存放的位置由通信进程控制速度快 消息传递 进程间的数据交换以格式化的消息为单位 消息头&#…

《windows核心编程》第2章 UNICODE字符

一、基础内容 1.1 UNICODE和UTF-8 下面是我个人的理解 UNICODE用2个字节来代表一个字符 UTF-8用1-4个字节来表示一个字符。可变长度的实现原理是ASCII字符只有7位&#xff0c;首位如果是1表示不是ASCII&#xff0c;说明这个字符和后面的字符联合起来形成新字符。 1.2 字符的…