.makop加密数据库恢复

联系:手机/微信(+86 17813235971) QQ(107644445)QQ咨询惜分飞

标题:.makop加密数据库恢复

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

有oracle数据库被加密扩展名为:.[77C81F29].[Evilminded@privatemail.com].makop
20211009230012
20211009230342


通过检查发现数据文件损坏情况
20211009230553

基于以上的情况,通过工具快速恢复,然后正常open库,并且导入到新库中
20211009230429
20211009231139

客户测试业务,一切正常,数据基本没丢失(redo数据丢失)
20211009231328

如果此类的数据库(oracle,mysql,sql server)等被加密,需要专业恢复技术支持,请联系我们:
电话/微信:17813235971    Q Q:107644445QQ咨询惜分飞    E-Mail:dba@xifenfei.com

19c 非第一个节点执行root.sh报Error 4 opening dom ASM/Self in 错误

联系:手机/微信(+86 17813235971) QQ(107644445)QQ咨询惜分飞

标题:19c 非第一个节点执行root.sh报Error 4 opening dom ASM/Self in 错误

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

在linux 7.9的系统中安装oracle 19c的rac,在第二个节点执行root.sh报以下错误
Error 4 opening dom ASM/Self in 0x425a470
Domain name to open is ASM/Self
Error 4 opening dom ASM/Self in 0x425a470

[root@rac2 tmp]# /u01/app/19c/grid/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/19c/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/19c/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/rac2/crsconfig/rootcrs_rac2_2021-08-27_10-54-04AM.log
2021/08/27 10:54:07 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2021/08/27 10:54:07 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2021/08/27 10:54:07 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2021/08/27 10:54:07 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2021/08/27 10:54:08 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
Redirecting to /bin/systemctl restart rsyslog.service
2021/08/27 10:54:08 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2021/08/27 10:54:08 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2021/08/27 10:54:09 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2021/08/27 10:54:09 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2021/08/27 10:54:18 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2021/08/27 10:54:18 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2021/08/27 10:54:19 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2021/08/27 10:54:21 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2021/08/27 10:55:06 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2021/08/27 10:55:18 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2021/08/27 10:55:35 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2021/08/27 10:56:07 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2021/08/27 10:56:08 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
2021/08/27 10:56:15 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2021/08/27 10:57:01 CLSRSC-343: Successfully started Oracle Clusterware stack
2021/08/27 10:57:01 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2021/08/27 10:57:10 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2021/08/27 10:57:15 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
Error 4 opening dom ASM/Self in 0x425a470
Domain name to open is ASM/Self 
Error 4 opening dom ASM/Self in 0x425a470
[root@rac2 tmp]# 

通过查询mos,发现相关文档:19C: While Executing Root.sh on Remote Nodes HIT UNEXPECTED “ERROR 4 OPENING DOM ASM/SELF IN 0x57f7d60″ (Doc ID 2571719.1)
20210903084403


确认是oracle一个bug,在20c版本中修复(20c没有对外发布,应该在21c中修复),这个bug不影响,可以忽略

重现sql执行计划SYS_OP_C2C隐式转换

联系:手机/微信(+86 17813235971) QQ(107644445)QQ咨询惜分飞

标题:重现sql执行计划SYS_OP_C2C隐式转换

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

在一次的sql优化中,遇到SYS_OP_C2C函数,通过分析是由于一个表的varchar2和另外一个表的nvarchar2列进行关联导致,通过以下简单使用进行重现.对于这个问题,如果需要使用index,需要创建SYS_OP_C2C的函数index,或者把列类型修改一致.

SQL> create user xff identified by oracle;

用户已创建。

SQL> grant dba to xff;

授权成功。

SQL> create table xff.t1(id number,name varchar2(100));

表已创建。

SQL> insert into xff.t1 select  object_id,object_name from dba_objects;

已创建 89932 行。

SQL> commit;

提交完成。

SQL> create table xff.t2(id number,name nvarchar2(100));

表已创建。

SQL> insert into xff.t2 select  object_id,object_name from dba_objects;

已创建 89933 行。

SQL> commit;

提交完成。


SQL> exec dbms_stats.gather_table_stats('XFF','T1',cascade=>true);

PL/SQL 过程已成功完成。

SQL> exec dbms_stats.gather_table_stats('XFF','T2',cascade=>true);

PL/SQL 过程已成功完成。


SQL> set autot on
SQL>  select count(1) from xff.t1, xff.t2 where t1.name=t2.name;

  COUNT(1)
----------
    160752


执行计划
----------------------------------------------------------
Plan hash value: 906334482

------------------------------------------------------------------------------------
| Id  | Operation           | Name | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT    |      |     1 |    74 |       |   760   (1)| 00:00:10 |
|   1 |  SORT AGGREGATE     |      |     1 |    74 |       |            |          |
|*  2 |   HASH JOIN         |      |   146K|    10M|  3256K|   760   (1)| 00:00:10 |
|   3 |    TABLE ACCESS FULL| T1   | 89932 |  2195K|       |   137   (1)| 00:00:02 |
|   4 |    TABLE ACCESS FULL| T2   | 89933 |  4303K|       |   205   (1)| 00:00:03 |
------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   2 - access("T2"."NAME"=SYS_OP_C2C("T1"."NAME"))

还有一种情况也可能发生该转换,比如使用dblink的访问远程库,本地库和远程库字符集不一致.参考:SQL Statements Performed Across Database Links run Slowly. Explain Plan Shows Function SYS_OP_C2C has been Applied to Predicates, and Query uses a Full Table Scan. (Doc ID 2010872.1)

Oracle 21c强制使用cdb模式

联系:手机/微信(+86 17813235971) QQ(107644445)QQ咨询惜分飞

标题:Oracle 21c强制使用cdb模式

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

在oracle 未正式对外公布的20c版本中已经提及在该版本及其以后版本中不再支持no-cdb模式
20210814204946


在正式对外发布的21c版本中,dbca创建库的过程中确认只能选择cdb模式(灰色,无法去掉)
20210814135605

尝试启动实例设置enable_pluggable_database=false,实例无法启动
20210814213023

证明21c是从软件代码中强制加入了enable_pluggable_database=true参数验证,数据库必须使用cdb模式

Oracle dul 依旧支持Oracle 21c

联系:手机/微信(+86 17813235971) QQ(107644445)QQ咨询惜分飞

标题:Oracle dul 依旧支持Oracle 21c

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

ORACEL 21C版本数据库信息

[oracle@www.xifenfei.com ~]$ ss

SQL*Plus: Release 21.0.0.0.0 - Production on Sat Aug 14 02:05:14 2021
Version 21.3.0.0.0

Copyright (c) 1982, 2021, Oracle.  All rights reserved.


Connected to:
Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/XFF/system01.dbf
/u01/app/oracle/oradata/XFF/sysaux01.dbf
/u01/app/oracle/oradata/XFF/undotbs01.dbf
/u01/app/oracle/oradata/XFF/pdbseed/system01.dbf
/u01/app/oracle/oradata/XFF/pdbseed/sysaux01.dbf
/u01/app/oracle/oradata/XFF/users01.dbf
/u01/app/oracle/oradata/XFF/pdbseed/undotbs01.dbf
/u01/app/oracle/oradata/XFF/XFFpdb1/system01.dbf
/u01/app/oracle/oradata/XFF/XFFpdb1/sysaux01.dbf
/u01/app/oracle/oradata/XFF/XFFpdb1/undotbs01.dbf
/u01/app/oracle/oradata/XFF/XFFpdb1/users01.dbf

11 rows selected.

SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
BANNER_FULL
--------------------------------------------------------------------------------
BANNER_LEGACY
--------------------------------------------------------------------------------
    CON_ID
----------
Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 - Production
Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0
Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 - Production
         0

dul 依旧支持 oracle 12c

[oracle@www.xifenfei.com dul]$ ./dul

Data UnLoader: 12.2.0.0.2 - Internal Only - on Sat Aug 14 02:20:28 2021
with 64-bit io functions and the decompression option

Copyright (c) 1994 2021 Bernard van Duijnen All rights reserved.

 Strictly Oracle Internal Use Only


DUL: Warning: ulimit process stack size is only 33554432
Found db_id = 1608306320
Found db_name = ORCL
DUL> show datafiles;
ts# rf# start   blocks offs open  err file name
  0   1     0   170241    0    1    0 /u01/app/oracle/oradata/XFF/system01.dbf
  1   3     0    74241    0    1    0 /u01/app/oracle/oradata/XFF/sysaux01.dbf
DUL> bootstrap;
Probing file = 1, block = 520
. unloading table                BOOTSTRAP$
DUL: Warning: block number is non zero but marked deferred trying to process it anyhow
      60 rows unloaded
Reading BOOTSTRAP.dat 60 entries loaded
Parsing Bootstrap$ contents
Generating dict.ddl for version 12
 OBJ$: segobjno 18, file 1 block 240
 TAB$: segobjno 2, tabno 1, file 1  block 144
 COL$: segobjno 2, tabno 5, file 1  block 144
 USER$: segobjno 10, tabno 1, file 1  block 208
Running generated file "@dict.ddl" to unload the dictionary tables
. unloading table                      OBJ$   75192 rows unloaded
. unloading table                      TAB$    2389 rows unloaded
. unloading table                      COL$  130794 rows unloaded
. unloading table                     USER$     129 rows unloaded
Reading USER.dat 129 entries loaded
Reading OBJ.dat 75192 entries loaded and sorted 75192 entries
Reading TAB.dat 2389 entries loaded
Reading COL.dat 130794 entries loaded and sorted 130794 entries
Reading BOOTSTRAP.dat 60 entries loaded

DUL: Warning: Recreating file "dict.ddl"
Generating dict.ddl for version 12
 OBJ$: segobjno 18, file 1 block 240
 TAB$: segobjno 2, tabno 1, file 1  block 144
 COL$: segobjno 2, tabno 5, file 1  block 144
 USER$: segobjno 10, tabno 1, file 1  block 208
 TABPART$: segobjno 835, file 1 block 5560
 INDPART$: segobjno 840, file 1 block 5600
 TABCOMPART$: segobjno 857, file 1 block 5736
 INDCOMPART$: segobjno 862, file 1 block 5784
 TABSUBPART$: segobjno 847, file 1 block 5656
 INDSUBPART$: segobjno 852, file 1 block 5696
 IND$: segobjno 2, tabno 3, file 1  block 144
 ICOL$: segobjno 2, tabno 4, file 1  block 144
 LOB$: segobjno 2, tabno 6, file 1  block 144
 COLTYPE$: segobjno 2, tabno 7, file 1  block 144
 TYPE$: segobjno 761, tabno 1, file 1  block 5024
 COLLECTION$: segobjno 761, tabno 2, file 1  block 5024
 ATTRIBUTE$: segobjno 761, tabno 3, file 1  block 5024
 LOBFRAG$: segobjno 868, file 1 block 5832
 LOBCOMPPART$: segobjno 871, file 1 block 5856
 UNDO$: segobjno 15, file 1 block 224
 TS$: segobjno 6, tabno 2, file 1  block 176
 PROPS$: segobjno 127, file 1 block 1320
Running generated file "@dict.ddl" to unload the dictionary tables
. unloading table                      OBJ$
DUL: Warning: Recreating file "OBJ.ctl"
   75192 rows unloaded
. unloading table                      TAB$
DUL: Warning: Recreating file "TAB.ctl"
    2389 rows unloaded
. unloading table                      COL$
DUL: Warning: Recreating file "COL.ctl"
  130794 rows unloaded
. unloading table                     USER$
DUL: Warning: Recreating file "USER.ctl"
     129 rows unloaded
. unloading table                  TABPART$     492 rows unloaded
. unloading table                  INDPART$     365 rows unloaded
. unloading table               TABCOMPART$       1 row  unloaded
. unloading table               INDCOMPART$       0 rows unloaded
. unloading table               TABSUBPART$      32 rows unloaded
. unloading table               INDSUBPART$       0 rows unloaded
. unloading table                      IND$    3095 rows unloaded
. unloading table                     ICOL$    5657 rows unloaded
. unloading table                      LOB$     712 rows unloaded
. unloading table                  COLTYPE$    3251 rows unloaded
. unloading table                     TYPE$    6053 rows unloaded
. unloading table               COLLECTION$    1450 rows unloaded
. unloading table                ATTRIBUTE$   15958 rows unloaded
. unloading table                  LOBFRAG$      19 rows unloaded
. unloading table              LOBCOMPPART$       0 rows unloaded
. unloading table                     UNDO$      21 rows unloaded
. unloading table                       TS$       6 rows unloaded
. unloading table                    PROPS$      45 rows unloaded
Reading USER.dat 129 entries loaded
Reading OBJ.dat 75192 entries loaded and sorted 75192 entries
Reading TAB.dat 2389 entries loaded
Reading COL.dat 130794 entries loaded and sorted 130794 entries
Reading TABPART.dat 492 entries loaded and sorted 492 entries
Reading TABCOMPART.dat 1 entries loaded and sorted 1 entries
Reading TABSUBPART.dat 32 entries loaded and sorted 32 entries
Reading INDPART.dat 365 entries loaded and sorted 365 entries
Reading INDCOMPART.dat 0 entries loaded and sorted 0 entries
Reading INDSUBPART.dat 0 entries loaded and sorted 0 entries
Reading IND.dat 3095 entries loaded
Reading LOB.dat 712 entries loaded
Reading ICOL.dat 5657 entries loaded
Reading COLTYPE.dat 3251 entries loaded
Reading TYPE.dat
DUL: Notice: Increased the size of DC_TYPES from 4096 to 32768 entries
 6053 entries loaded
Reading ATTRIBUTE.dat 15958 entries loaded
Reading COLLECTION.dat
DUL: Notice: Increased the size of DC_COLLECTIONS from 1024 to 8192 entries
 1450 entries loaded
Reading BOOTSTRAP.dat 60 entries loaded
Reading LOBFRAG.dat 19 entries loaded and sorted 19 entries
Reading LOBCOMPPART.dat 0 entries loaded and sorted 0 entries
Reading UNDO.dat 21 entries loaded
Reading TS.dat 6 entries loaded
Reading PROPS.dat 45 entries loaded
Database character set is AL32UTF8
Database national character set is AL16UTF16
DUL> unload table sys.props$;
. unloading table                    PROPS$      45 rows unloaded
DUL> exit

Life is DUL without it
[oracle@www.xifenfei.com dul]$ grep NLS_RDBMS_VERSION SYS_PROPS.dat 
|NLS_RDBMS_VERSION| |21.0.0.0.0| |RDBMS version for NLS parameters|