Oracle DB:v$controlfile_record_section中的【ARCHIVED LOG】的【RECORDS_TOTAL】
看看一个比较有意思的视图:v$controlfile_record_section
在非归档模式下:
在归档模式下:
可以看到,归档与非归档并不影响视图【v$controlfile_record_section】的【RECORDS_TOTAL】
从上面的视图的结果[……]
Adamhuan's Data Center - 【逻辑驱动数据】
数据玩物、代码屋、1/0游戏:(零和博弈)/ 禅宗意志 / 规则战争 / 解放数据力量 / 技术的飞速发展并没有改变这个世界,因为,这个世界从没有变,它只是越来越趋近于它本来的模样。
看看一个比较有意思的视图:v$controlfile_record_section
在非归档模式下:
在归档模式下:
可以看到,归档与非归档并不影响视图【v$controlfile_record_section】的【RECORDS_TOTAL】
从上面的视图的结果[……]
需求如题所示。
下面,先看看当前数据库的状态:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
[oracle@rhel69 ~]$ ps -ef | grep pmon oracle 218637 1 0 15:54 ? 00:00:00 ora_pmon_orcl oracle 218852 218821 0 16:25 pts/4 00:00:00 grep pmon [oracle@rhel69 ~]$ [oracle@rhel69 ~]$ export ORACLE_SID=orcl [oracle@rhel69 ~]$ [oracle@rhel69 ~]$ env | grep SID ORACLE_SID=orcl [oracle@rhel69 ~]$ [oracle@rhel69 ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Fri Mar 15 16:26:03 2019 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> SQL> show parameter control NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ control_file_record_keep_time integer 7 control_files string /callcenter/oradata/control01. ctl, /callcenter/oradata/contr ol02.ctl, /callcenter/oradata/ control03.ctl SQL> SQL> select instance_name,status from v$instance; INSTANCE_NAME STATUS ---------------- ------------ orcl MOUNTED SQL> select name,dbid from v$database; NAME DBID --------- ---------- orcl 13087093 SQL> |
由上可以看到:
我们要dump的控制文件 在:
/callcenter/oradata/control01.ctl
开启对ALERT日志的实时查看:
[crayon[……]
今天,在我的实验环境中遇到了这么一个问题:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
[oracle@dg12c1 ~]$ rman target / Recovery Manager: Release 12.2.0.1.0 - Production on Sat Nov 4 00:34:50 2017 Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved. connected to target database: LENKA (DBID=2000990868) RMAN> list restore point all; using target database control file instead of recovery catalog SCN RSP Time Type Time Name ---------------- --------- ---------- --------- ---- 5555959 GUARANTEED 02-NOV-17 BEFORE_SWITCH???H_OVER 6050990 04-NOV-17 helloworld_?????? 6051159 04-NOV-17 ?????? RMAN> [oracle@dg12c1 ~]$ sqlplus / as sysdba SQL*Plus: Release 12.2.0.1.0 Production on Fri Nov 3 23:46:47 2017 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production SQL> SQL> col name for a24 SQL> SQL> select scn,name,storage_size,database_incarnation# from v$restore_point; SCN NAME STORAGE_SIZE DATABASE_INCARNATION# ---------- ------------------------ ------------ --------------------- 5555959 BEFORE_SWITCH???H_OVER 419430400 2 6050990 helloworld_?????? 0 3 6051159 ?????? 0 3 SQL> |
可以看到还原点(Restore point)的名字包含乱码。
而在Oracle中,对还原点的操作,目前都是需要【NAME】作为唯一选择的方法。
但现在,这个【NAME】有乱码了[……]
备份控制文件的脚本到TRACE:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
[oracle@dg12c1 lenka]$ sqlplus / as sysdba SQL*Plus: Release 12.2.0.1.0 Production on Sat Nov 4 00:45:17 2017 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production SQL> SQL> alter database backup controlfile to trace; Database altered. SQL> |
后台ALERT日志
1 2 3 4 5 |
2017-11-04T00:45:41.058203+08:00 alter database backup controlfile to trace 2017-11-04T00:45:41.061303+08:00 Backup controlfile written to trace file /u01/app/oracle/diag/rdbms/lenka_primary/lenka/trace/lenka_ora_14627.trc Completed: alter database backup controlfile to trace |
可以看到,生成的TRACE文件是:/u01/app/oracle/diag/rdbms/len[……]
如题所示的问题,发生在我的12c的多租户数据库启动的时候,具体表现如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
[oracle@rhel7 ~]$ env | grep SID ORACLE_SID=callah [oracle@rhel7 ~]$ [oracle@rhel7 ~]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Thu Apr 21 11:19:37 2016 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 251658240 bytes Fixed Size 2923096 bytes Variable Size 192939432 bytes Database Buffers 50331648 bytes Redo Buffers 5464064 bytes ORA-00205: error in identifying control file, check alert log for more info SQL> |
这个时候,我的后台日志(alert日志)的报错是这样的:
1 2 3 4 5 6 7 8 |
alter database mount Thu Apr 21 11:23:44 2016 ORA-00210: cannot open the specified control file ORA-00202: control file: '/u01/app/oracle/product/12/db_1/dbs/cntrlcallah.dbf' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-205 signalled during: alter database mount... |
报错中,提到的控[……]