Oracle归档配置及检查
- 配置归档位置到 USE_DB_RECOVERY_FILE_DEST,并设置存储大小
startup mount;
!mkdir /db/archivelog
ALTER SYSTEM SET db_recovery_file_dest_size=100G SCOPE=BOTH;
ALTER SYSTEM SET db_recovery_file_dest='/db/archivelog' SCOPE=BOTH;
ALTER SYSTEM SET log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST' scope=both;
ALTER DATABASE ARCHIVELOG;
select name,value from v$parameter where name like 'db_recovery_file_dest' or name='log_archive_dest' or name='log_archive_dest_1' or name='log_archive_dest_2'
union
select name,to_char(value/1024/1024/1024)||' GB' from v$parameter where name='db_recovery_file_dest_size' order by name;

- 查看归档占用空间及归档个数
set line 900 COLSEP '|' pagesize 50
col name for a40
col value for a100
!clear
select * from v$flash_recovery_area_usage;
archive log list;

- 24小时的归档数量检查

set line 900 COLSEP '|' pagesize 50
col Data for a10
col day format a10
col total format 99999
col h00 format 9999
col h01 format 9999
col h02 format 9999
col h03 format 9999
col h04 format 9999
col h04 format 9999
col h05 format 9999
col h06 format 9999
col h07 format 9999
col h08 format 9999
col h09 format 9999
col h10 format 9999
col h11 format 9999
col h12 format 9999
col h13 format 9999
col h14 format 9999
col h15 format 9999
col h16 format 9999
col h17 format 9999
col h18 format 9999
col h19 format 9999
col h20 format 9999
col h21 format 9999
col h22 format 9999
col h23 format 9999
col h24 format 9999
break on report
compute max of "total" on report
compute max of "h00" on report
compute max of "h01" on report
compute max of "h02" on report
compute max of "h03" on report
compute max of "h04" on report
compute max of "h05" on report
compute max of "h06" on report
compute max of "h07" on report
compute max of "h08" on report
compute max of "h09" on report
compute max of "h10" on report
compute max of "h11" on report
compute max of "h12" on report
compute max of "h13" on report
compute max of "h14" on report
compute max of "h15" on report
compute max of "h16" on report
compute max of "h17" on report
compute max of "h18" on report
compute max of "h19" on report
compute max of "h20" on report
compute max of "h21" on report
compute max of "h22" on report
compute max of "h23" on report
compute max of "Avg" on report
compute sum of NUM on report
compute sum of GB on report
compute sum of MB on report
compute sum of KB on report
SELECT thread#,TRUNC(first_time) "Date",TO_CHAR(first_time, 'Dy') "Day",COUNT(1) "Total",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '00', 1, 0)) "h00",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '01', 1, 0)) "h01",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '02', 1, 0)) "h02",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '03', 1, 0)) "h03",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '04', 1, 0)) "h04",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '05', 1, 0)) "h05",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '06', 1, 0)) "h06",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '07', 1, 0)) "h07",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '08', 1, 0)) "h08",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '09', 1, 0)) "h09",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '10', 1, 0)) "h10",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '11', 1, 0)) "h11",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '12', 1, 0)) "h12",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '13', 1, 0)) "h13",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '14', 1, 0)) "h14",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '15', 1, 0)) "h15",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '16', 1, 0)) "h16",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '17', 1, 0)) "h17",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '18', 1, 0)) "h18",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '19', 1, 0)) "h19",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '20', 1, 0)) "h20",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '21', 1, 0)) "h21",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '22', 1, 0)) "h22",
SUM(DECODE(TO_CHAR(first_time, 'hh24'), '23', 1, 0)) "h23",
ROUND(COUNT(1) / 24, 2) "Avg" FROM gv$log_history WHERE thread# = inst_id GROUP BY thread#,TRUNC(first_time), TO_CHAR(first_time, 'Dy') ORDER BY 1;
- 每天的归档数量及大小

set line 900 COLSEP '|' pagesize 50
compute max of "NUM" on report
compute max of "GB" on report
compute max of "MB" on report
compute max of "KB" on report
select THREAD#, trunc(completion_time) as "DATE",count(1) num,trunc(sum(blocks*block_size)/1024/1024/1024) as GB,trunc(sum(blocks*block_size)/1024/1024) as MB,
round(sum(blocks*block_size)/1024,0) as KB from v$archived_log where first_time > trunc(sysdate-10) and dest_id = (select dest_id from V$ARCHIVE_DEST_STATUS
where status='VALID' and type='LOCAL') group by thread#, trunc(completion_time) order by 2,1;
年归档数量及大小

set line 900 COLSEP '|' pagesize 50
select round(min(sum(blocks*block_size)/1024/1024/1024)) MIN_Gb,round(max(sum(blocks*block_size)/1024/1024/1024)) MAX_Gb,
round(avg(sum(blocks*block_size)/1024/1024/1024)) AVG_Gb from (select a.THREAD#,trunc(first_time) as logtime,a.BLOCKS,
a.BLOCK_SIZE from v$archived_log a where a.DEST_ID = 1 and a.FIRST_TIME between sysdate-365 and sysdate) group by
logtime order by logtime desc;
月归档数量

set line 900 COLSEP '|' pagesize 100
select a_date,a_count from (select to_char(first_time,'YYYY-MM-DD') a_date,count(*) a_count
from gv$log_history group by to_char(first_time,'YYYY-MM-DD') order by 1 ) where rownum<=31;
相关文章:
Oracle归档配置及检查
配置归档位置到 USE_DB_RECOVERY_FILE_DEST,并设置存储大小 startup mount; !mkdir /db/archivelog ALTER SYSTEM SET db_recovery_file_dest_size100G SCOPEBOTH; ALTER SYSTEM SET db_recovery_file_dest/db/archivelog SCOPEBOTH; ALTER SYSTEM SET log_archive…...
计算机二级:函数基础题
函数基础题 第一题 rinput("请输入半径:") c3.1415926*r*2 print("{:.0f}".format(c))输出: Type Error第二题 a7 b2 print(a%2)输出 1第三题 ab4 def my_ab(ab,xy):abpow(ab,xy)print(ab,end"\n") my_ab(ab,2)prin…...
Python爬虫-爬取AliExpress商品搜索词排名数据
前言 本文是该专栏的第49篇,后面会持续分享python爬虫干货知识,记得关注。 本文,笔者以AliExpress平台为例。基于Python爬虫,通过某个指定的“搜索关键词”,批量获取该“搜索关键词”的商品排名数据。 具体实现思路和详细逻辑,笔者将在正文结合完整代码进行详细介绍。废…...
AI 时代,我们需要什么样的数据库?
AI 时代,我们需要什么样的数据库? 人工智能正在悄然改变软件开发的方式。过去一年间,诸如 GitHub Spark、Replit 和 Bolt 等新兴 AI 工具层出不穷,能够快速生成简单的前端应用,甚至无需传统意义上的后端服务就能部署上…...
刷机维修进阶教程-----adb禁用错了系统app导致无法开机 如何保数据无损恢复机型
在刷机维修过程中 。我们会遇到一些由于客户使用adb指令来禁用手机app而导致手机无法开机进入系统的故障机型。通常此类问题机型有好几种解决方法。但如果客户需要保数据来恢复机型。其实操作也是很简单的.还有类似误删除应用导致不开机等等如何保数据。 通过博文了解💝💝�…...
Vue3 实战:基于 mxGraph 与 WebSocket 的动态流程图构建
本文将详细介绍如何在 Vue3 项目中集成 mxGraph 可视化库,并通过 WebSocket 实现画布元素的实时更新。适合有 Vue 基础的前端开发者学习参考。 一、技术栈准备 Vue3:采用 Composition API 开发mxGraph:JavaScript 流程图库(版本 …...
Ubuntu AX200 iwlwifi-cc-46.3cfab8da.0.tgz无法下载的解决办法
文章目录 前言一、检查网卡是否被识别二、确认内核模块是否可用1.AX200 wifi 要求内核5.12.检查 iwlwifi.ko 是否存在:3.如果未找到,可能是内核模块未正确生成。尝试安装 linux-modules-extra:4.再次检查 iwlwifi.ko 是否存在:5.确…...
蓝桥杯,利用 Vue.js 构建简易任务管理器
在日常开发中,我们经常需要处理各种任务和计划。一个简单且高效的任务管理器可以帮助我们更好地组织和安排时间。今天,我将向大家展示如何使用 Vue.js 构建一个简易的任务管理器。这个项目不仅能够帮助我们更好地理解 Vue.js 的基本语法和功能࿰…...
国际机构Gartner发布2025年网络安全趋势
转自:中国新闻网 中新网北京3月14日电 国际机构高德纳(Gartner)14日发布的消息称,网络安全和风险管理在2025年“面临挑战与机遇并存的局面”,“实现转型和提高弹性”对确保企业在快速变化的数字世界中,实现安全且可持续的创新至关…...
【设计模式】单件模式
七、单件模式 单件(Singleton) 模式也称单例模式/单态模式,是一种创建型模式,用于创建只能产生 一个对象实例 的类。该模式比较特殊,其实现代码中没有用到设计模式中经常提起的抽象概念,而是使用了一种比较特殊的语法结构&#x…...
Elasticsearch + Docker:实现容器化部署指南
Elasticsearch是一款强大的分布式搜索和分析引擎,广泛应用于日志分析、全文检索、实时数据分析等场景。而Docker作为一种轻量级的容器化技术,能够帮助开发者快速部署和管理应用。将Elasticsearch与Docker结合,不仅可以简化部署流程࿰…...
win32汇编环境,网络编程入门之十一
;win32汇编环境,网络编程入门之十一 ;在上一教程里,我们学习了如何读取大容量的网页内容,在这一教程里,我们学习一下如何在wininet或winhttp机制中提取网页中的超链接 ;>>>>>>>>>>>>>>>>>…...
穿越之程序员周树人的狂人日记Part3__人机共生纪元
穿越之程序员周树人的狂人日记Part3__人机共生纪元 代码知识点:协程、内存管理、版本控制 故事一【协程陷阱】择偶标准的多核运算 故事二【内存泄漏】中产幻觉的垃圾回收 故事三【版本控制】人设仓库的强制推送 故事四【容器化生存】:员工生存之现状 静夜…...
后端——AOP异步日志
需求分析 在SpringBoot系统中,一般会对访问系统的请求做日志记录的需求,确保系统的安全维护以及查看接口的调用情况,可以使用AOP对controller层的接口进行增强,作日志记录。日志保存在数据库当中,为了避免影响接口的响…...
【C#语言】深入理解C#多线程编程:从基础到高性能实践
文章目录 ⭐前言⭐一、多线程的本质价值🌟1、现代计算需求🌟2、C#线程演进史 ⭐二、线程实现方案对比🌟1、传统线程模型🌟2、现代任务模型(推荐)🌟3、异步编程范式 ⭐三、线程安全深度解析&…...
第十四章:模板实例化_《C++ Templates》notes
模板实例化 核心知识点解析多选题设计题关键点总结 核心知识点解析 两阶段查找(Two-Phase Lookup) 原理: 模板在编译时分两个阶段处理: 第一阶段(定义时):检查模板语法和非依赖名称࿰…...
循环查询指定服务器开放端口(Python)
循环查询指定服务器开放端口列表 # Time : 2025/3/22 # Author : cookie # Desc :import socket import concurrent.futures from datetime import datetime# 设置目标IP和端口范围 target_ip input("请输入目标IP地址: ") start_port int(input("请输入…...
算法 | 蜣螂优化算法原理,引言,公式,算法改进综述,应用场景及matlab完整代码
蜣螂优化算法(Dung Beetle Optimizer, DBO)详解 1. 算法原理 蜣螂优化算法(DBO)是一种基于自然界蜣螂行为的元启发式优化算法,灵感来源于蜣螂的滚球、繁殖、觅食和偷窃行为。其核心思想是通过模拟蜣螂在复杂环境中的协作与竞争机制,解决全局优化问题。关键行为模拟: 滚球…...
排序复习_代码纯享
头文件 #pragma once #include<iostream> #include<vector> #include<utility> using std::vector; using std::cout; using std::cin; using std::endl; using std::swap;//插入排序 //1、直接插入排序(稳定) void InsertSort(vecto…...
【STM32】第一个工程的创建
目录 1、获取 KEIL5 安装包2、开始安装 KEIL52.1、 激活2.2、安装DFP库 3、工程创建4、搭建框架5、开始编写代码 1、获取 KEIL5 安装包 要想获得 KEIL5 的安装包,在百度里面搜索“KEIL5 下载”即可找到很多网友提供的下载文件,或者到 KEIL 的官网下载&a…...
SpringBoot+策略模式+枚举类,优雅消除if-else
需求分析 公司做物联网系统的,使用nettry进行设备连接,对设备进行数据采集,根据设备的协议对数据进行解析,解析完成之后存放数据库,但是不同厂家的设备协议不同。公司系统使用了使用了函数式编程的去写了一个解析类&am…...
前端框架学习路径与注意事项
学习前端框架是一个系统化的过程,需要结合理论、实践和工具链的综合掌握。以下是学习路径的关键方面和注意事项: 一、学习路径的核心方面 1. 基础概念与核心思想 组件化开发:理解组件的作用(复用性、隔离性)、组件通信…...
kubeval结合kube-score实现k8s yaml文件校验
一、工具定位与互补性 工具核心能力检查范围kubeval校验 YAML 语法和 API 版本兼容性确保资源配置符合 Kubernetes 版本规范kube-score检查安全配置与最佳实践识别资源限制缺失、权限过高等问题 协同作用: kubeval 确保配置文件的语法正确性,避免低级错…...
Linux驱动开发-①platform平台②MISC字符驱动框架③input框架
Linux驱动开发-①platform平台②MISC字符驱动框架③input框架 一,platform1.1 platform框架(设备树下)1.2 platform框架(配置设备函数) 二,MISC字符驱动框架三,input框架 一,platfor…...
【mysql】唯一性约束unique
文章目录 唯一性约束 1. 作用2. 关键字3. 特点4. 添加唯一约束5. 关于复合唯一约束 唯一性约束 1. 作用 用来限制某个字段/某列的值不能重复。 2. 关键字 UNIQUE3. 特点 同一个表可以有多个唯一约束。唯一约束可以是某一个列的值唯一,也可以多个列组合的值唯…...
pytest的测试报告allure
1、安装jdk,安装allure、下载allure,配置环境变量 1.1、下载地址:https://repo.maven.apache.org/maven2/io/qameta/allure/allurecommandline 找到最新版本下载即可 【下载zip包】解压到任意目录,建议目录不要在C盘 不要太深 最好不要有中文;进入allure解压后的目录,找到…...
常见中间件漏洞:Jboss篇
CVE-2015-7501 环境搭建 cd vulhub-master/jboss/JMXInvokerServlet-deserialization docker-compose up -d 过程 访问网址,存在页面说明接口存在且存在反序列化漏洞 http://8.130.17.222:8080/invoker/JMXInvokerServlet 2.下载 ysoserial ⼯具进⾏漏洞利⽤…...
2025年优化算法:龙卷风优化算法(Tornado optimizer with Coriolis force,TOC)
龙卷风优化算法(Tornado optimizer with Coriolis force)是发表在中科院二区期刊“ARTIFICIAL INTELLIGENCE REVIEW”(IF:11.7)的2025年智能优化算法 01.引言 当自然界的狂暴之力,化身数字世界的智慧引擎&…...
3.24-3 接口测试断言
一.postman 断言 1.断言再test中 #状态码是否等于200 tests["Status code is 200"] responseCode.code 200; #断言响应时间小于200ms tests["Response time is less than 200ms"] responseTime < 200; #断言响应体包含内容 tests["Body…...
DeepSeek面试——模型架构和主要创新点
本文将介绍DeepSeek的模型架构多头潜在注意力(MLA)技术,混合专家(MoE)架构, 无辅助损失负载均衡技术,多Token 预测(MTP)策略。 一、模型架构 DeepSeek-R1的基本架构沿用…...
