Oracle 查询表空间使用情况及收缩数据文件
本文介绍Oracle收缩数据文件的相关操作,运维工作中有时会需要通过收缩数据文件来释放磁盘空间。
数据文件初始化方式:
1.我们创建表空间一般有两种方式初始化其数据文件,即指定初始大小为32G(很大的值)或指定初始大小为100M(很小的值)然后通过自动扩展方式慢慢按需增长。
2.第一种初始数据文件方法坏处就是开始不管你用不用到那么大,都会占用这么大的磁盘空间(这种数据迁移的时候可以使用)。第二种初始化方法按需增长,比较好的监控实际使用磁盘空间,所以推荐初始值很小,使用自动扩展慢慢增长的方式。
一、查看表空间使用情况
1.查询除temp外表空间使用情况
SELECT a.tablespace_name "tb_name",total / (1024 * 1024 * 1024) "tb_sizeG)",free / (1024 * 1024 * 1024) "tb_free_size(G)",(total - free) / (1024 * 1024 * 1024) "tb_used_size(G)",round((total - free) / total, 4) * 100 "tb_usage %"FROM (SELECT tablespace_name, SUM(bytes) freeFROM dba_free_spaceGROUP BY tablespace_name) a,(SELECT tablespace_name, SUM(bytes) totalFROM dba_data_filesGROUP BY tablespace_name) bWHERE a.tablespace_name = b.tablespace_name;
或
select a.tablespace_name tnm,b.FILE_PATH,--b.autoextensible,b.cnt,trunc(a.bytes/1024/1024/1024) total_G,trunc(a.bytes/1024/1024/1024/b.cnt) avg_G,trunc(c.bytes/1024/1024/1024) free_G,trunc((a.bytes-c.bytes)*100/a.bytes,2) used--,(c.bytes*100)/a.bytes "% FREE"from SYS.SM$TS_AVAIL A,SYS.SM$TS_FREE C,(select tablespace_name,substr(file_name,1,instr(file_name,'/',2)) FILE_PATH, --f.autoextensible,count(*) cnt from dba_data_files f group by
tablespace_name,substr(file_name,1,instr(file_name,'/',2))--,autoextensible) bWHERE A.TABLESPACE_NAME=C.TABLESPACE_NAME(+)AND A.TABLESPACE_NAME=B.TABLESPACE_NAME-- AND A.TABLESPACE_NAME IN (select distinct tablespace_name from dba_tablespaces)order by avg_g desc;
2.查询包含temp在内的所有表空间使用情况
SELECT *FROM (SELECT a.tablespace_name,to_char(a.bytes / 1024 / 1024, '999,999,999') || 'M' total_bytes,to_char(b.bytes / 1024 / 1024, '999,999,999') || 'M' free_bytes,to_char(a.bytes / 1024 / 1024 - b.bytes / 1024 / 1024,'999,999,999') || 'M' use_bytes,to_char((1 - b.bytes / a.bytes) * 100, '990.99') || '%' USEFROM (SELECT tablespace_name, sum(bytes) bytesFROM dba_data_filesGROUP BY tablespace_name) a,(SELECT tablespace_name, sum(bytes) bytesFROM dba_free_spaceGROUP BY tablespace_name) bWHERE a.tablespace_name = b.tablespace_nameUNION ALLSELECT c.tablespace_name,to_char(c.bytes / 1024 / 1024, '999,999,999') || 'M' total_bytes,to_char((c.bytes - d.bytes_used) / 1024 / 1024, '999,999,999') || 'M' free_bytes,to_char(d.bytes_used / 1024 / 1024, '999,999,999') || 'M' use_bytes,to_char(d.bytes_used * 100 / c.bytes, '990.99') || '%' USEFROM (SELECT tablespace_name, sum(bytes) bytesFROM dba_temp_filesGROUP BY tablespace_name) c,(SELECT tablespace_name, sum(bytes_cached) bytes_usedFROM v$temp_extent_poolGROUP BY tablespace_name) dWHERE c.tablespace_name = d.tablespace_name);
或
select d.tablespace_name,decode(d.status, 'ONLINE', 'OLN', 'READ ONLY', 'R/O', d.status) status,d.extent_management,decode(d.allocation_type, 'USER', '', d.allocation_type) allocation_type,(casewhen initial_extent < 1048576 thenlpad(round(initial_extent / 1024, 0), 3) || 'K'elselpad(round(initial_extent / 1024 / 1024, 0), 3) || 'M'end) Ext_Size,NVL(a.bytes / 1024 / 1024, 0) MB,NVL(f.bytes / 1024 / 1024, 0) free,(NVL(a.bytes / 1024 / 1024, 0) - NVL(f.bytes / 1024 / 1024, 0)) used,NVL(l.large / 1024 / 1024, 0) largest,d.MAX_EXTENTS,lpad(round((f.bytes / a.bytes) * 100, 0), 3) pfree,(casewhen round(f.bytes / a.bytes * 100, 0) >= 20 then' 'else'*'end) alrtFROM sys.dba_tablespaces d,(SELECT tablespace_name, SUM(bytes) bytesFROM dba_data_filesGROUP BY tablespace_name) a,(SELECT tablespace_name, SUM(bytes) bytesFROM dba_free_spaceGROUP BY tablespace_name) f,(SELECT tablespace_name, MAX(bytes) largeFROM dba_free_spaceGROUP BY tablespace_name) lWHERE d.tablespace_name = a.tablespace_name(+)AND d.tablespace_name = f.tablespace_name(+)AND d.tablespace_name = l.tablespace_name(+)AND NOT(d.extent_management LIKE 'LOCAL' AND d.contents LIKE 'TEMPORARY')
UNION ALL
select d.tablespace_name,decode(d.status, 'ONLINE', 'OLN', 'READ ONLY', 'R/O', d.status) status,d.extent_management,decode(d.allocation_type,'UNIFORM','U','SYSTEM','A','USER','',d.allocation_type) allocation_type,(casewhen initial_extent < 1048576 thenlpad(round(initial_extent / 1024, 0), 3) || 'K'elselpad(round(initial_extent / 1024 / 1024, 0), 3) || 'M'end) Ext_Size,NVL(a.bytes / 1024 / 1024, 0) MB,(NVL(a.bytes / 1024 / 1024, 0) - NVL(t.bytes / 1024 / 1024, 0)) free,NVL(t.bytes / 1024 / 1024, 0) used,NVL(l.large / 1024 / 1024, 0) largest,d.MAX_EXTENTS,lpad(round(nvl(((a.bytes - t.bytes) / NVL(a.bytes, 0)) * 100, 100),0),3) pfree,(casewhen nvl(round(((a.bytes - t.bytes) / NVL(a.bytes, 0)) * 100, 0),100) >= 20 then' 'else'*'end) alrtFROM sys.dba_tablespaces d,(SELECT tablespace_name, SUM(bytes) bytesFROM dba_temp_filesGROUP BY tablespace_nameorder by tablespace_name) a,(SELECT tablespace_name, SUM(bytes_used) bytesFROM v$temp_extent_poolGROUP BY tablespace_name) t,(SELECT tablespace_name, MAX(bytes_cached) largeFROM v$temp_extent_poolGROUP BY tablespace_nameorder by tablespace_name) lWHERE d.tablespace_name = a.tablespace_name(+)AND d.tablespace_name = t.tablespace_name(+)AND d.tablespace_name = l.tablespace_name(+)AND d.extent_management LIKE 'LOCAL'AND d.contents LIKE 'TEMPORARY'ORDER by 1
二、收缩数据文件
如果通过上述SQL查询出表空间的使用率较低,剩余空间较大,此时我们可以考虑通过收缩数据文件来释放空闲空间。
1.使用 resize check脚本生成执行SQL
可先通过如下脚本查询有哪些数据文件可以释放,该脚本成功执行后会提供可执行的语句,直接复制便可执行已收缩数据文件。
REM Script is meant for Oracle version 9 and higher
REM -----------------------------------------------set serveroutput on
exec dbms_output.enable(1000000);declarecursor c_dbfile is
select f.tablespace_name,f.file_name,f.file_id,f.blocks,t.block_size
,decode(t.allocation_type,'UNIFORM',t.initial_extent/t.block_size,0) uni_extent
,decode(t.allocation_type,'UNIFORM',(128+(t.initial_extent/t.block_size)),128) file_min_size
from dba_data_files f,
dba_tablespaces t
where f.tablespace_name = t.tablespace_name
and t.status = 'ONLINE'
order by f.tablespace_name,f.file_id;cursor c_freespace(v_file_id in number) is
select block_id, block_id+blocks max_block
from dba_free_space
where file_id = v_file_id
order by block_id desc;/* variables to check settings/values */
dummy number;
checkval varchar2(10);
block_correction1 number;
block_correction2 number;/* running variable to show (possible) end-of-file */
file_min_block number;/* variables to check if recycle_bin is on and if extent as checked is in ... */
recycle_bin boolean:=false;
extent_in_recycle_bin boolean;/* exception handler needed for non-existing tables note:344940.1 */
sqlstr varchar2(100);
table_does_not_exist exception;
pragma exception_init(table_does_not_exist,-942);/* variable to spot space wastage in datafile of uniform tablespace */
space_wastage number;begin/* recyclebin is present in Oracle 10.2 and higher and might contain extent as checked */
begin
select value into checkval from v$parameter where name = 'recyclebin';
if checkval = 'on'
then
recycle_bin := true;
end if;
exception
when no_data_found
then
recycle_bin := false;
end;/* main loop */
for c_file in c_dbfile
loop
/* initialization of loop variables */
dummy :=0;
extent_in_recycle_bin := false;
file_min_block := c_file.blocks;beginspace_wastage:=0; /* reset for every file check */<<check_free>>for c_free in c_freespace(c_file.file_id)
loop
/* if blocks is an uneven value there is a need to correct
with -1 to compare with end-of-file which is even */
block_correction1 := (0-mod(c_free.max_block,2));
block_correction2 := (0-mod(c_file.blocks,2));
if file_min_block+block_correction2 = c_free.max_block+block_correction1
then/* free extent is at end so file can be resized */
file_min_block := c_free.block_id;/* Uniform sized tablespace check if space at end of file
is less then uniform extent size */
elsif (c_file.uni_extent !=0) and ((c_file.blocks - c_free.max_block) < c_file.uni_extent)
then/* uniform tablespace which has a wastage of space in datafile
due to fact that space at end of file is smaller than uniform extent size */space_wastage:=c_file.blocks - c_free.max_block;
file_min_block := c_free.block_id;else
/* no more free extent at end of file, file cannot be further resized */
exit check_free;
end if;
end loop;
end;/* check if file can be resized, minimal size of file 128 {+ initial_extent} blocks */
if (file_min_block = c_file.blocks) or (c_file.blocks <= c_file.file_min_size)
thendbms_output.put_line('Tablespace: '||c_file.tablespace_name||' Datafile: '||c_file.file_name);
dbms_output.put_line('cannot be resized no free extents found');
dbms_output.put_line('Note: for some cases, dba_free_spaces data is not accurate, and this script does not work for such cases. You may want to manually check if the datafile is feasible to be resized');
dbms_output.put_line('.');else/* file needs minimal no of blocks which does vary over versions,
using safe value of 128 {+ initial_extent} */
if file_min_block < c_file.file_min_size
then
file_min_block := c_file.file_min_size;
end if;dbms_output.put_line('Tablespace: '||c_file.tablespace_name||' Datafile: '||c_file.file_name);
dbms_output.put_line('current size: '||(c_file.blocks*c_file.block_size)/1024||'K'||' can be resized to: '||round((file_min_block*c_file.block_size)/1024)||'K (reduction of: '||round(((c_file.blocks-file_min_block)/c_file.blocks)*100,2)||' %)');/* below is only true if recyclebin is on */
if recycle_bin
then
begin
sqlstr:='select distinct 1 from recyclebin$ where file#='||c_file.file_id;
execute immediate sqlstr into dummy;if dummy > 0
thendbms_output.put_line('Extents found in recyclebin for above file/tablespace');
dbms_output.put_line('Implying that purge of recyclebin might be needed in order to resize');
dbms_output.put_line('SQL> purge tablespace '||c_file.tablespace_name||';');
end if;
exception
when no_data_found
then null;
when table_does_not_exist
then null;
end;
end if;
dbms_output.put_line('SQL> alter database datafile '''||c_file.file_name||''' resize '||round((file_min_block*c_file.block_size)/1024)||'K;');if space_wastage!=0
then
dbms_output.put_line('Datafile belongs to uniform sized tablespace and is not optimally sized.');
dbms_output.put_line('Size of datafile is not a multiple of NN*uniform_extent_size + overhead');
dbms_output.put_line('Space that cannot be used (space wastage): '||round((space_wastage*c_file.block_size)/1024)||'K');
dbms_output.put_line('For optimal usage of space in file either resize OR increase to: '||round(((c_file.blocks+(c_file.uni_extent-space_wastage))*c_file.block_size)/1024)||'K');
end if;dbms_output.put_line('.');end if;end loop;end;
/
比如执行结果如下:
Tablespace: BLOBS Datafile: /Data/STUDY/datafile/studyblobs01.dbf
current size: 33553408K can be resized to: 33548288K (reduction of: .02 %)
SQL> alter database datafile '/Data/STUDY/datafile/studyblobs01.dbf' resize 33548288K;
.
Tablespace: BLOBS Datafile: /Data/STUDY/datafile/studyblobs02.dbf
cannot be resized no free extents found
Note: for some cases, dba_free_spaces data is not accurate, and this script does not work for such cases. You may want to manually check if the datafile is feasible to be resized
.
Tablespace: BLOBS Datafile: /Data/STUDY/datafile/studyblobs03.dbf
cannot be resized no free extents found
Note: for some cases, dba_free_spaces data is not accurate, and this script does not work for such cases. You may want to manually check if the datafile is feasible to be resized
.
Tablespace: INDX Datafile: /Data/STUDY/datafile/studyindex01.dbf
current size: 33553408K can be resized to: 32640000K (reduction of: 2.72 %)
SQL> alter database datafile '/Data/STUDY/datafile/studyindex01.dbf' resize 32640000K;
.
Tablespace: INDX Datafile: /Data/STUDY/datafile/studyindex02.dbf
cannot be resized no free extents found
Note: for some cases, dba_free_spaces data is not accurate, and this script does not work for such cases. You may want to manually check if the datafile is feasible to be resized
.
Tablespace: SYSAUX Datafile: /Data/STUDY/datafile/studysysaux01.dbf
current size: 4741120K can be resized to: 4734976K (reduction of: .13 %)
SQL> alter database datafile '/Data/STUDY/datafile/studysysaux01.dbf' resize 4734976K;
.
Tablespace: SYSAUX Datafile: /Data/STUDY/datafile/studysysaux02.dbf
current size: 4608000K can be resized to: 4250624K (reduction of: 7.76 %)
SQL> alter database datafile '/Data/STUDY/datafile/studysysaux02.dbf' resize 4250624K;
.
Tablespace: SYSTEM Datafile: /Data/STUDY/datafile/studysystem01.dbf
current size: 1843200K can be resized to: 790528K (reduction of: 57.11 %)
SQL> alter database datafile '/Data/STUDY/datafile/studysystem01.dbf' resize 790528K;
.
Tablespace: UNDOTBS1 Datafile: /Data/STUDY/datafile/studyundotbs01.dbf
current size: 33553408K can be resized to: 2811904K (reduction of: 91.62 %)
SQL> alter database datafile '/Data/STUDY/datafile/studyundotbs01.dbf' resize 2811904K;
.
Tablespace: UNDOTBS1 Datafile: /Data/STUDY/datafile/studyundotbs02.dbf
cannot be resized no free extents found
Note: for some cases, dba_free_spaces data is not accurate, and this script does not work for such cases. You may want to manually check if the datafile is feasible to be resized
.
Tablespace: USERS Datafile: /Data/STUDY/datafile/studyusers01.dbf
cannot be resized no free extents found
Note: for some cases, dba_free_spaces data is not accurate, and this script does not work for such cases. You may want to manually check if the datafile is feasible to be resized
.
Tablespace: USERS Datafile: /Data/STUDY/datafile/studyusers02.dbf
cannot be resized no free extents found
Note: for some cases, dba_free_spaces data is not accurate, and this script does not work for such cases. You may want to manually check if the datafile is feasible to be resized
.
Tablespace: USERS Datafile: /Data/STUDY/datafile/studyusers03.dbf
cannot be resized no free extents found
Note: for some cases, dba_free_spaces data is not accurate, and this script does not work for such cases. You may want to manually check if the datafile is feasible to be resized
.
Tablespace: WCAUDIT Datafile: /Data/STUDY/datafile/studywcaudit01.dbf
current size: 9832064K can be resized to: 9818112K (reduction of: .14 %)
SQL> alter database datafile '/Data/STUDY/datafile/studywcaudit01.dbf' resize 9818112K;
.PL/SQL procedure successfully completedSQL>
可提炼出如下 SQL 用以收缩数据文件(根据实际需求选择执行):
SQL> alter database datafile '/Data/STUDY/datafile/studyblobs01.dbf' resize 33548288K;
SQL> alter database datafile '/Data/STUDY/datafile/studyindex01.dbf' resize 32640000K;
SQL> alter database datafile '/Data/STUDY/datafile/studysysaux01.dbf' resize 4734976K;
SQL> alter database datafile '/Data/STUDY/datafile/studysysaux02.dbf' resize 4250624K;
SQL> alter database datafile '/Data/STUDY/datafile/studysystem01.dbf' resize 790528K;
SQL> alter database datafile '/Data/STUDY/datafile/studyundotbs01.dbf' resize 2811904K;
SQL> alter database datafile '/Data/STUDY/datafile/studywcaudit01.dbf' resize 9818112K;
2.通过查询dba_data_files表自己写执行SQL
select file_name,user_bytes from dba_data_files;
比如查询结果中的这一行:
我们可以执行如下语句来收缩表空间:
SQL> alter database datafile ‘/Data/STUDY/datafile/studyblobs01.dbf’ resize 26213351424;
如遇到“ORA-03297: file contains used data beyond requested RESIZE value”错误,可以resize后的值稍微调大一些再次执行。
参考文章:
https://www.cnblogs.com/rangle/p/9263505.html
相关文章:

Oracle 查询表空间使用情况及收缩数据文件
本文介绍Oracle收缩数据文件的相关操作,运维工作中有时会需要通过收缩数据文件来释放磁盘空间。 数据文件初始化方式: 1.我们创建表空间一般有两种方式初始化其数据文件,即指定初始大小为32G(很大的值)或指定初始大小为…...
Transformer 代码剖析1 - 数据处理 (pytorch实现)
引言 Transformer 架构自《Attention Is All You Need》论文发表以来,在自然语言处理领域引起了巨大的变革。它摒弃了传统的循环结构,完全基于注意力机制,显著提高了处理序列数据的效率和性能。本文将通过对一个具体的项目代码结构进行详细分…...
Python异常处理面试题及参考答案
目录 什么是 Python 中的异常?程序为什么需要异常处理机制? 解释 BaseException 和 Exception 的区别 Python 的异常处理与传统的错误代码返回机制相比有哪些优势? 列出至少 5 个 Python 内置异常类型并说明触发场景 语法错误 (SyntaxError) 与运行时异常 (Runtime Erro…...

Python多线程知多少
目录 目标 Python版本 官方文档 概述 线程 守护线程 线程同步 事件对象(Event Object) 实战 创建线程的基本语法 阻塞线程 守护线程 线程同步的方法 互斥锁(排他锁) 信号量(Semaphore) 事件…...
C++ Qt常见面试题(8):C++ Qt中的线程同步与互斥
在C++ Qt中,线程同步和互斥通常通过 QMutex 和 QMutexLocker 来实现。线程同步确保多个线程不会同时访问共享资源,而互斥机制通过锁定一个资源,确保在任何给定时刻只有一个线程能够访问它。 以下是一个使用 QMutex 来同步和互斥访问共享资源的详细示例代码: 1. 使用 QMut…...

数字内容个性化推荐的关键是什么?
智能算法交互体系构建 构建数字内容体验的智能推荐系统,本质上是实现数据驱动与算法响应的动态协同。其核心在于建立多维度用户数据与机器学习模型的深度交互链路——通过实时采集用户点击、停留时长、交互路径等行为特征,结合设备属性、场景状态等上下…...

DeepSeek-OpenSourceWeek-第三天-Release of DeepGEMM
DeepGEMM:这是一款专为高效的 FP8(8 位浮点)通用矩阵乘法(GEMMs)而开发的尖端库。GEMMs 是许多 AI 工作负载(尤其是深度学习)中的基本操作。 特点: 支持稠密和 MoE GEMMs:它可以处理标准的稠密矩阵乘法以及混合专家(MoE)模型中使用的矩阵乘法。MoE 是一种神经网络架…...
LeetCode 1472.设计浏览器历史记录:一个数组完成模拟,单次操作均O(1)
【LetMeFly】1472.设计浏览器历史记录:一个数组完成模拟,单次操作均O(1) 力扣题目链接:https://leetcode.cn/problems/design-browser-history/ 你有一个只支持单个标签页的 浏览器 ,最开始你浏览的网页是 homepage ,…...

AI+游戏,正在进行时!
2月,DeepSeek引领的AI浪潮对游戏行业造成了巨大冲击。 2月17日马斯克在社交平台宣布,xAI将成立一家AI游戏工作室,高调宣布两大核心理念,打破大公司的垄断,利用AI重构游戏体验。随后的新闻中还表示,团队计划…...

贪心算法精品题
1.找钱问题 本题的贪心策略在于我们希望就可能的保留作用大的5元 class Solution { public:bool lemonadeChange(vector<int>& bills) {std::map<int ,int> _map;for(auto ch:bills){if(ch 5) _map[ch];else if(ch 10){if(_map[5] 0) return false;else{_m…...
sql server 复制从备份初始化数据
参考 : 从备份初始化订阅(事务) - SQL Server | Microsoft Learn sql server 复制默认是用快照初始化数据的,也支持从备份初始化数据,参考如上...

【蓝桥杯】1.k倍区间
前缀和 #include <iostream> using namespace std; const int N100010; long long a[N]; int cnt[N]; int main(){int n, m;cnt[0] 1;cin >> n >> m;long long res 0;for(int i 1; i < n; i){scanf("%d", &a[i]);a[i] a[i-1];res cnt…...
Qt互斥锁(QMutex)的使用、QMutexLocker的使用
Qt互斥锁【QMutex】的使用、QMutexLocker的使用 Chapter1 Qt互斥锁(QMutex)的使用、QMutexLocker的使用一、QMutexLocker和QMutex实现示例图二、QMutex和QMutexLocker的关系(个人理解)三、QMutex使用和QMutexLocker使用1.QMutex的使用2.QMutexLocker的使…...

具身智能(Embodied AI)的物理交互基准测试:构建真实世界的智能体评估体系
文章目录 引言:从虚拟到物理的智能跃迁一、具身智能测试体系设计1.1 评估维度矩阵1.2 测试平台技术栈二、核心测试场景构建2.1 基础运动能力测试集2.2 复杂操作任务设计三、物理仿真引擎关键技术3.1 高精度接触力学模型3.2 传感器噪声模拟四、评估指标体系4.1 量化指标公式4.2…...

Javaweb后端数据库多表关系一对多,外键,一对一
多表关系 一对多 多的表里,要有一表里的主键 外键 多的表上,添加外键 一对一 多对多 案例...

鸿蒙 ArkUI 实现敲木鱼小游戏
敲木鱼是一款具有禅意的趣味小游戏,本文将通过鸿蒙 ArkUI 框架的实现代码,逐步解析其核心技术点,包括动画驱动、状态管理、音效震动反馈等。 一、架构设计与工程搭建 1.1 项目结构解析 完整项目包含以下核心模块: ├── entry…...
cv2.solvePnP 报错 求相机位姿
目录 报错信息及解决: cv2.solvePnP 使用例子: 设置初始值效果也不好 cv2.projectPoints 函数效果不好 报错信息及解决: File "/shared_disk/users/lbg/project/human_4d/nlf_pose/render_demo_pkl2_cal.py", line 236, in <…...

Linux实操——在服务器上直接从百度网盘下载(/上传)文件
Linux Linux实操——在服务器上直接从百度网盘下载(/上传)文件 文章目录 Linux前言一、下载并安装bypy工具二、认证并授权网盘账号三、将所需文件转移至目的文件夹下四、下载文件五、上传文件六、更换绑定的百度云盘账户 前言 最近收到一批很大的数据&…...

2004-2024年光刻机系统及性能研究领域国内外发展历史、差距、研究难点热点、进展突破及下一个十年研究热点方向2025.2.27
一.光刻机概述 1.1 定义与原理 光刻机是 集成电路芯片制造的核心设备 ,其工作原理基于 光学成像和化学反应 。它通过 曝光系统 将掩模版上的图形精确地转移到涂覆于硅片表面的光刻胶上。这个过程涉及复杂的物理和化学反应,主要包括以下几个步骤: 涂胶 :在硅片表面均匀涂抹…...
请求Geoserver的WTMS服务返回200不返回图片问题-跨域导致
今天碰到个奇怪问题,改了个页面标题再打包布署GeoServer发现调用WTMS服务失败,请求返回状态码200,返回包大小0,使用postman模拟请求是可以正常返回图片的。 跟之前版本对比如下: 正常Response请求: HTTP/1.1 200X-Fr…...

基于距离变化能量开销动态调整的WSN低功耗拓扑控制开销算法matlab仿真
目录 1.程序功能描述 2.测试软件版本以及运行结果展示 3.核心程序 4.算法仿真参数 5.算法理论概述 6.参考文献 7.完整程序 1.程序功能描述 通过动态调整节点通信的能量开销,平衡网络负载,延长WSN生命周期。具体通过建立基于距离的能量消耗模型&am…...

React第五十七节 Router中RouterProvider使用详解及注意事项
前言 在 React Router v6.4 中,RouterProvider 是一个核心组件,用于提供基于数据路由(data routers)的新型路由方案。 它替代了传统的 <BrowserRouter>,支持更强大的数据加载和操作功能(如 loader 和…...
在HarmonyOS ArkTS ArkUI-X 5.0及以上版本中,手势开发全攻略:
在 HarmonyOS 应用开发中,手势交互是连接用户与设备的核心纽带。ArkTS 框架提供了丰富的手势处理能力,既支持点击、长按、拖拽等基础单一手势的精细控制,也能通过多种绑定策略解决父子组件的手势竞争问题。本文将结合官方开发文档,…...

Mybatis逆向工程,动态创建实体类、条件扩展类、Mapper接口、Mapper.xml映射文件
今天呢,博主的学习进度也是步入了Java Mybatis 框架,目前正在逐步杨帆旗航。 那么接下来就给大家出一期有关 Mybatis 逆向工程的教学,希望能对大家有所帮助,也特别欢迎大家指点不足之处,小生很乐意接受正确的建议&…...
数据链路层的主要功能是什么
数据链路层(OSI模型第2层)的核心功能是在相邻网络节点(如交换机、主机)间提供可靠的数据帧传输服务,主要职责包括: 🔑 核心功能详解: 帧封装与解封装 封装: 将网络层下发…...
【决胜公务员考试】求职OMG——见面课测验1
2025最新版!!!6.8截至答题,大家注意呀! 博主码字不易点个关注吧,祝期末顺利~~ 1.单选题(2分) 下列说法错误的是:( B ) A.选调生属于公务员系统 B.公务员属于事业编 C.选调生有基层锻炼的要求 D…...
相机Camera日志分析之三十一:高通Camx HAL十种流程基础分析关键字汇总(后续持续更新中)
【关注我,后续持续新增专题博文,谢谢!!!】 上一篇我们讲了:有对最普通的场景进行各个日志注释讲解,但相机场景太多,日志差异也巨大。后面将展示各种场景下的日志。 通过notepad++打开场景下的日志,通过下列分类关键字搜索,即可清晰的分析不同场景的相机运行流程差异…...

多种风格导航菜单 HTML 实现(附源码)
下面我将为您展示 6 种不同风格的导航菜单实现,每种都包含完整 HTML、CSS 和 JavaScript 代码。 1. 简约水平导航栏 <!DOCTYPE html> <html lang"zh-CN"> <head><meta charset"UTF-8"><meta name"viewport&qu…...
CMake控制VS2022项目文件分组
我们可以通过 CMake 控制源文件的组织结构,使它们在 VS 解决方案资源管理器中以“组”(Filter)的形式进行分类展示。 🎯 目标 通过 CMake 脚本将 .cpp、.h 等源文件分组显示在 Visual Studio 2022 的解决方案资源管理器中。 ✅ 支持的方法汇总(共4种) 方法描述是否推荐…...
【碎碎念】宝可梦 Mesh GO : 基于MESH网络的口袋妖怪 宝可梦GO游戏自组网系统
目录 游戏说明《宝可梦 Mesh GO》 —— 局域宝可梦探索Pokmon GO 类游戏核心理念应用场景Mesh 特性 宝可梦玩法融合设计游戏构想要素1. 地图探索(基于物理空间 广播范围)2. 野生宝可梦生成与广播3. 对战系统4. 道具与通信5. 延伸玩法 安全性设计 技术选…...