当前位置:网站首页>如何清理v$rman_backup_job_details视图 报错ORA-02030
如何清理v$rman_backup_job_details视图 报错ORA-02030
2022-07-03 09:46:00 【喝醉酒的小白】
delete from v$rman_backup_job_details where session_key=4;

truncate table v$rman_backup_job_details;

SELECT view_definition FROM v$fixed_view_definition WHERE lower(view_name)='v$rman_backup_job_details';
SELECT /*+ rule */ a.session_key,
a.session_recid,
a.session_stamp,
a.command_id,
a.start_time,
a.end_time,
a.input_bytes,
a.output_bytes,
a.status_weight,
a.optimized_weight,
a.object_type_weight,
a.output_device_type,
a.autobackup_count,
a.backed_by_osb,
a.autobackup_done,
a.status,
a.input_type,
a.optimized,
a.elapsed_seconds,
a.compression_ratio,
a.input_bytes_per_sec,
a.output_bytes_per_sec,
sys.dbms_rcvman.num2displaysize(input_bytes) input_bytes_display,
sys.dbms_rcvman.num2displaysize(output_bytes) output_bytes_display,
sys.dbms_rcvman.num2displaysize(input_bytes_per_sec) input_bytes_per_sec_display,
sys.dbms_rcvman.num2displaysize(output_bytes_per_sec) output_bytes_per_sec_display, sys.dbms_rcvman.sec2displaytime(elapsed_seconds)time_taken_display, a.con_id
FROM
( SELECT unique a.session_recid session_key, a.*, decode(autobackup_count, 0, 'NO', 'YES') autobackup_done, decode(status_weight, 2000, 'FAILED', 1900, 'RUNNING WITH ERRORS', 1500, 'RUNNING WITH WARNINGS', 1001, 'RUNNING', 900, 'COMPLETED WITH ERRORS', 500, 'COMPLETED WITH WARNINGS', 001, 'COMPLETED', 'FAILED') status, decode(object_type_weight, 9, 'DB FULL', 8, 'RECVR AREA', 7, 'DB INCR', 6, 'DATAFILE FULL', 5, 'DATAFILE INCR', 4, 'ARCHIVELOG', 3, 'CONTROLFILE', 2, 'SPFILE', 1, 'BACKUPSET', null) input_type, decode(optimized_weight, 1, 'YES', 'NO') optimized, abs(a.end_time-a.start_time)*86400 elapsed_seconds,
CASE
WHEN a.input_bytes/decode(a.output_bytes, 0, null, a.output_bytes) > 1
THEN a.input_bytes/decode(a.output_bytes, 0, null, a.output_bytes)
ELSE 1
END compression_ratio, a.input_bytes/(decode(a.end_time-a.start_time, 0, 1, abs(a.end_time-a.start_time)*86400)) input_bytes_per_sec, a.output_bytes/(decode(a.end_time-a.start_time, 0, 1, abs(a.end_time-a.start_time)*86400)) output_bytes_per_sec
FROM
( SELECT session_recid, session_stamp, command_id, min(start_time)
OVER (partition by session_recid, session_stamp) start_time, max(end_time)
OVER (partition by session_recid, session_stamp) end_time, sum(input_bytes)
OVER (partition by session_recid, session_stamp) input_bytes, sum(output_bytes)
OVER (partition by session_recid, session_stamp) output_bytes, max(status_weight)
OVER (partition by session_recid, session_stamp)status_weight, max(optimized_weight)
OVER (partition by session_recid, session_stamp) optimized_weight, max(object_type_weight)
OVER (partition by session_recid, session_stamp) object_type_weight, decode(count(distinct output_device_type)
OVER (partition by session_recid, session_stamp), 1, first_value(output_device_type)
OVER (partition by session_recid, session_stamp), 0, null, '*') output_device_type, sum(autobackup_count)
OVER (partition by session_recid, session_stamp) autobackup_count, backed_by_osb, con_id
FROM V$RMAN_BACKUP_SUBJOB_DETAILS) a)a
http://www.itpub.net/thread-2102497-1-1.html
边栏推荐
- My understanding of testing (summarized by senior testers)
- 软件测试(测试用例)编写之俗手、本手、妙手
- ExecutorException: Statement returned more than one row, where no more than one was expected.
- After 8 years of industry thinking, the test director has a deeper understanding of test thinking
- Some abilities can't be learned from work. Look at this article, more than 90% of peers
- “测试人”,有哪些厉害之处?
- Qt:qss custom qradiobutton instance
- ByteDance layoffs, test engineers were almost destroyed: how terrible is the routine behind the recruitment of large factories?
- QT:QSS自定义 QTreeView实例
- In the middle of the year, I have prepared a small number of automated interview questions. Welcome to the self-test
猜你喜欢

Software testing redis database

QT: QSS custom qtabwidget and qtabbar instances

QT:QSS自定义QTableView实例

软件测试必学基本理论知识——APP测试

Large scale e-commerce project - environment construction

那些一門心思研究自動化測試的人,後來怎樣了?

MAUI Developer Day in GCR

Que se passe - t - il ensuite pour ceux qui se sont concentrés sur les tests automatisés?

嵌入式軟件測試怎麼實現自動化測試?

你真的需要自动化测试吗?
随机推荐
Cache routing component
IIS修改配置信息后不生效
Comment réaliser des tests automatisés pour les tests logiciels embarqués?
Exclusive analysis | truth about resume and interview
可以写进简历的软件测试电商项目,不进来get一下?
月薪过万的测试员,是一种什么样的生活状态?
Use ml.net+onnx pre training model to liven the classic "Huaqiang buys melons" in station B
Extern keyword
.Net Core-做一个微信公众号的排队系统
glassfish org. h2.server. Shutdownhandler classnotfoundexception exception exception handling
What are the strengths of "testers"?
年中了,准备了少量的自动化面试题,欢迎来自测
What is the salary level of 17k? Let's take a look at the whole interview process of post-95 Test Engineers
Inexplicable problems in the nesting of constraintlayout and relativelayout
QT: QSS custom qtableview instance
Have you learned the new technology to improve sales in 2021?
Que se passe - t - il ensuite pour ceux qui se sont concentrés sur les tests automatisés?
Qt:qss custom qradiobutton instance
软件测试工程师的5年之痒,讲述两年突破瓶颈经验
Logstash backup tracks the data records reported