ITPub博客

首页 > 数据库 > Oracle > [20201126]文件相对号与绝对号问题.txt

[20201126]文件相对号与绝对号问题.txt

原创 Oracle 作者:lfree 时间:2020-11-26 19:41:03 0 删除 编辑

[20201126]文件相对号与绝对号问题.txt

--//一般情况两者一致,今天在18c pdb环境遭遇这个问题。
1.环境:
TTT@192.168.2.7:1521/orcl> select banner_full from v$version;
BANNER_FULL
----------------------------------------------------------------------
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0

2.测试:
TTT@192.168.2.7:1521/orcl> create table t1 as select rownum n1, lpad('x',5) v1 from dual connect by level <=5;
Table created.

TTT@192.168.2.7:1521/orcl> alter table t1 add c1 number default 42 not null;
Table altered.

TTT@192.168.2.7:1521/orcl> alter session set statistics_level = all;
Session altered.

TTT@192.168.2.7:1521/orcl> select count(1) from t1 where c1=42;
  COUNT(1)
----------
         5

TTT@192.168.2.7:1521/orcl> select rowid from t1 where rownum=1;
ROWID
------------------
AAA3JfAAMAAAACDAAA

TTT@192.168.2.7:1521/orcl> @ rowid AAA3JfAAMAAAACDAAA
    OBJECT       FILE      BLOCK        ROW ROWID_DBA                      DBA                  TEXT
---------- ---------- ---------- ---------- ------------------------------ -------------------- ----------------------------------------
    225887         12        131          0  0x3000083                     12,131               alter system dump datafile 12 block 131
                                                                                                ;
TTT@192.168.2.7:1521/orcl> alter system dump datafile 12 block 131;
System altered.

3.检查跟踪文件发现:

Error: alter system dump datafile/tempfile: file 12 not readable

TTT@192.168.2.7:1521/orcl> select file#,rfile#,name from v$datafile where name like '%user%';
FILE#       RFILE# NAME
----- ------------ ------------------------------------------------------------------------------------------
   41           12 +DATA/ORCLCDB/74A69DC145F5662BE0558253DD747177/DATAFILE/users.276.985549575

--//绝对文件号是41.不是12.
TTT@192.168.2.7:1521/orcl> alter system dump datafile 41 block 131;
System altered.

--//检查转储ok,也许以后在PDB下会遇到这类问题更多,一般以前存在表空间传输的情况。



来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/267265/viewspace-2737351/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    2819
  • 访问量
    6618560