暂无图片
暂无图片
暂无图片
暂无图片
暂无图片
dbv检测多个文件.pdf
549
3页
1次
2022-09-09
10墨值下载
2021/5/12 Document 352907.1
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=270173211570856&id=352907.1&_afrWindowMode=0&_adf.ctrl-state=sg5rr
1/3
PowerView is Off
Last Login: May 11, 2021 2:15 PM CST
(0)
lazy (Available) Contact Us Help
Copyright (c) 2021, Oracle. All rights reserved. Oracle Confidential.
In this Document
Purpose
Requirements
Configuring
Instructions
Sample Code
Sample Output
References
APPLIES TO:
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Cloud Schema Service - Version N/A and later
Information in this document applies to any platform.
***Checked for relevance on 30-Apr-2018***
PURPOSE
This script will simplify the task of running DBV against all datafiles of a database.
When a user experiences ORA-01578 / ORA-08103 or any other kind of corrupt messages, this utility can be used to scan the
datafiles at OS level.
REQUIREMENTS
We need to have the database at least in MOUNT stage to perform this operation.
CONFIGURING
Login to your server as the oracle user and create a directory that is going to hold the DBV logs.
mkdir /tmp/dbvlogs
cd /tmp/dbvlogs
In case of Windows, create a directory under relevant drive.
INSTRUCTIONS
As a first step run the following script from sqlplus which will generate the script for DBV.
----- dbvsql.sql ----------
sqlplus /nolog
connect / as sysdba
set feedback off
set head off
set echo off
set linesize 200
set pagesize 2500
spool /tmp/dbvlogs/dbvchk.sh
select 'dbv file=' || name || ' blocksize='|| block_size || ' logfile=' ||
substr(name, instr(name, '/', -1, 1) +1) ||
'.' || file# || '.log' from v$datafile
/
spool off
In case datafiles are on RAW devices, then we need to mention the END parameter in DBV.
You can use the following query in case you are using RAW devices.
Was this document helpful?
Document Details
Type:
Status:
Last Major
Update:
Last
Update:
SAMPLE CODE
PUBLISHED
Aug 4, 2018
Apr 4, 2020
Related Products
Gen 1 Exadata Cloud at
Customer (Oracle Exadata
Database Cloud Machine)
Oracle Cloud Infrastructure
- Database Service
Oracle Database Exadata
Express Cloud Service
Oracle Database Cloud
Exadata Service
Oracle Database Cloud
Schema Service
Show More
Information Centers
Oracle Catalog: Service
Request Data Collections
(SRDCs) for all Products and
Services [51.2]
Oracle Catalog: Information
Centers for All Products and
Services [50.2]
Platform as a Service (PaaS)
and Oracle Cloud
Infrastructure (OCI)
Information Center
[2048297.2]
Index of Oracle Database
Information Centers
[1568043.2]
Information Center:
Overview Database
Server/Client Installation
and Upgrade/Migration
[1351022.2]
Show More
Document References
DBVERIFY - Database file
Verification Utility [35512.1]
FAQ: Physical Corruption
[403747.1]
Recently Viewed
Script To Run DBV On All Datafiles Of the Database (Doc ID 352907.1)
To Bottom
Yes
No
ORA-1578 / ORA-26040
Corrupt blocks by
NOLOGGING - Error
explanation and solution
[794505.1]
ORA-1578 / ORA-26040 -
NOLOGGING 操作引起的
坏块 - 错误解释和解决方
[1623284.1]
Script To Run DBV On All
Datafiles Of the Database
[352907.1]
Steps to recreate a
Give Feedback...
2021/5/12 Document 352907.1
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=270173211570856&id=352907.1&_afrWindowMode=0&_adf.ctrl-state=sg5rr
2/3
select 'dbv file='||name||' blocksize='||block_size||' end='||
(bytes/block_size)||' logfile='||
substr (name, instr (name, '/', -1, 1) + 1)||'.'||file#||'.log'
from v$datafile;
In the case of Windows the file separator will be forward slash '\'
Hence we need to replace the backward slash '/' with the forward slash in
the above script.
-- For Windows the following modification is required
select 'dbv file=' || name || ' blocksize='|| block_size ||
' logfile=' || substr(name, instr(name, '\', -1, 1) +1) ||
'.' || file# || '.log' from v$datafile
/
If ASM storage being used, we need to specify USERID to get authenticated on ASM Instance.
You can use following query if you are running in ASM storage.
select 'dbv file=' || name || ' blocksize='|| block_size || ' USERID=sys/&SYS_PASSWORD logfile='
||
substr(name, instr(name, '/', -1, 1) +1) ||
'.' || file# || '.log' from v$datafile
/
CAUTION
SAMPLE CODE
Now you need to run the dbv commands for all the datafiles, which is spooled to dbvchk.sh.
Please proof read this script before executing the same.
$ cd /tmp/dbvlogs
$ chmod 755 dbvchk.sh
$ ./dbvchk.sh
In case of Windows, just run the above file. It is more appropriate to have a .bat or .cmd extension on windows.
If you have a Service Request logged, then compress the log files, upload the above compressed file to metalink.
$ tar cvf dbvlogs.tar *.log
$ compress dbvlogs.tar.Z
In case of a Windows operating system, simply use the a zip utility (7-Zip or Winzip) to compress the files.
SAMPLE OUTPUT
As per the above script, the dbv logs will be generated under /tmp/dbvlogs directory.
The files will have the name as follows.
For system datafile with the name /tmp/system.dbf and file# 1 the logfile will have the name like.
/tmp/dbvlogs/system.dbf.1.log
Physical Standby
Controlfile [459411.1]
Step By Step Guide On
How To Recreate Standby
Control File When
Datafiles Are On ASM And
Using Oracle Managed
Files [734862.1]
Show More
of 3
10墨值下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

关注
最新上传
暂无内容,敬请期待...
下载排行榜
Top250 周榜 月榜