资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

给表空间增加数据文件,存储在ASM

**管控  10.1.80.174  实例名PGJT2,表空间为ODS已经满了,申请增加数据文件。

成都创新互联公司专注于吴兴网站建设服务及定制,我们拥有丰富的企业做网站经验。 热诚为您提供吴兴营销型网站建设,吴兴网站制作、吴兴网页设计、吴兴网站官网定制、微信小程序服务,打造吴兴网络公司原创品牌,更为您提供吴兴网站排名全网营销落地服务。

col tablespace_name for a15;

select d.tablespace_name,space "sum_space(m)",blocks sum_blocks,space-nvl(free_space,0) "used_space(m)",

round((1-nvl(free_space,0)/space)*100,2) "used_rate(%)",free_space "free_space(m)"                     

from                                                                                                   

(select tablespace_name,round(sum(bytes)/(1024*1024),2) space,sum(blocks) blocks                       

from dba_data_files                                                                                    

group by tablespace_name) d,                                                                            

(select tablespace_name,round(sum(bytes)/(1024*1024),2) free_space                                     

from dba_free_space                                                                                     

group by tablespace_name) f                                                                            

where d.tablespace_name = f.tablespace_name(+) union all                                               

select d.tablespace_name,space "sum_space(m)",blocks sum_blocks,                                       

used_space "used_space(m)",round(nvl(used_space,0)/space*100,2) "used_rate(%)",                        

nvl(free_space,0) "free_space(m)"                                                                       

from                                                                                                   

(select tablespace_name,round(sum(bytes)/(1024*1024),2) space,sum(blocks) blocks                       

from dba_temp_files                                                                                     

group by tablespace_name) d,                                                                       

(select tablespace_name,round(sum(bytes_used)/(1024*1024),2) used_space,                               

round(sum(bytes_free)/(1024*1024),2) free_space                                                        

from v$temp_space_header                                                                               

group by tablespace_name) f                                                                            

where d.tablespace_name = f.tablespace_name(+);

------------ASM-----------------------------

select NAME,TOTAL_MB,FREE_MB from v$asm_diskgroup;

 

查看出 ODS    使用率达到99%      ,DATA 剩余1.3T

Select  file_name,tablespace_name ,status from dba_data_files where tablespace_name=’ODS’;

 

FILE_NAME                            TABLESPACE_NAME          STATUS

+DATA/pgjt/datafile/ods.539.784460919        ODS                    AVAILABLE

如何查找这个路径呢?

ps  -ef | grep  smon

会查找到 asm_smon_+ASM2   

[oracle]$ export  ORACLE_SID=+ASM2

[oracle] $ asmcmd

ASMCMD > lsdg

ASMCMD> cd  data

ASMCMD > ls

ASMCMD > cd  DATAFILE

ASMCMD> ls

发现了ods.539.784460919

增加数据文件   alter tablespace ODS add datafile ‘+DATA‘  size 8G;

(说明:直接加+DATA就可以,不用写/pgjt/datafile/ods.539.784460919,会自动生成。)

验证:用前面的方法还有查看系统日志

 


文章题目:给表空间增加数据文件,存储在ASM
网址分享:http://cdkjz.cn/article/jipijo.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220