oracle表空间管理

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

用oracle企业管理器登陆oracle,选择表空间,查看oracle表空间的使用率
重点查看bpms_data bpms_index temp这三个表空间,如果表空间使用率达到80%,就须扩容.
扩容命令如下:
例:给bpms_data扩容20G
1.在datadg1逻辑卷组分配新的逻辑卷bpms_data4
vxassist -g datadg1 -U gen make BPMS_data4 20g &
2.将权限分配给oracle用户和dba组
vxedit -g datadg set user=oracle group=dba mode=644 BPMS_data4
3.将空间分配给oracle表空间
ALTER TABLESPACE "BPMS_DA TA" ADD
DA TAFILE '/dev/vx/rdsk/datadg/BPMS_data4' SIZE 10000M
以前扩容命令如下:
vxassist -g datadg1 -U gen make BPMS_data 20g &
vxassist -g datadg1 -U gen make BPMS_data2 20g &
vxassist -g datadg1 -U gen make BPMS_data3 20g &
vxassist -g datadg1 -U gen make BPMS_index 20g &
vxassist -g datadg1 -U gen make BPMS_index2 20g &
vxassist -g datadg1 -U gen make BPMS_index3 20g &
vxassist -g datadg1 -U gen make PERFSTAT_DA TA 500m & vxassist -g datadg1 -U gen make config 1g & vxassist -g datadg1 -U gen make control1 256m & vxassist -g datadg1 -U gen make control2 256m & vxassist -g datadg1 -U gen make control3 256m & vxassist -g datadg1 -U gen make cwmlite1 100m & vxassist -g datadg1 -U gen make data_recover 11g & vxassist -g datadg1 -U gen make drsys1 200m & vxassist -g datadg1 -U gen make example1 160m & vxassist -g datadg1 -U gen make indx1 100m & vxassist -g datadg1 -U gen make odm1 100m & vxassist -g datadg1 -U gen make redo1_1 128m & vxassist -g datadg1 -U gen make redo1_1_02 128m & vxassist -g datadg1 -U gen make redo1_2 128m & vxassist -g datadg1 -U gen make redo1_2_02 128m & vxassist -g datadg1 -U gen make redo1_3 128m & vxassist -g datadg1 -U gen make redo1_3_02 128m & vxassist -g datadg1 -U gen make redo2_1 128m & vxassist -g datadg1 -U gen make redo2_1_02 128m & vxassist -g datadg1 -U gen make redo2_2 128m & vxassist -g datadg1 -U gen make redo2_2_02 128m & vxassist -g datadg1 -U gen make redo2_3 128m & vxassist -g datadg1 -U gen make redo2_3_02 128m & vxassist -g datadg1 -U gen make spfile1 100m & vxassist -g datadg1 -U gen make system1 2g & vxassist -g datadg1 -U gen make temp1 4g & vxassist -g datadg1 -U gen make temp2 4g &
vxassist -g datadg1 -U gen make test_0902 5g & vxassist -g datadg1 -U gen make tools 50m & vxassist -g datadg1 -U gen make undotbs1 4g & vxassist -g datadg1 -U gen make undotbs2 4g & vxassist -g datadg1 -U gen make undotbs3 4g & vxassist -g datadg1 -U gen make undotbs4 4g & vxassist -g datadg1 -U gen make user1 500m & vxassist -g datadg1 -U gen make xdb1 100m & vxassist -g datadg1 -U gen make file_data 10g & vxassist -g datadg1 -U gen make file_index 10g & vxassist -g datadg1 -U gen make file_blob 10g & vxedit -g datadg set user=oracle group=dba mode=644 temp4
#省公司RAC 裸设备文件的管理命令。

vxassist -g datadg -U gen make BPMS_index4 5000m &
vxedit -g datadg set group=dba user=oracle mode=660 BPMS_index4 &
由于OA系统的使用锣设备存储数据文件,所以需要先创建裸卷
用Root用户登陆查看当前裸设备情况(vxprint)
分配新的裸设备并设置相应的权限,
增加6个裸卷. 由于生产上redo裸卷的大小为245760,所以新建也以此大小建立
vxassist -g datadg -U gen make redo1_1_02 245760
vxassist -g datadg -U gen make redo1_2_02 245760
vxassist -g datadg -U gen make redo1_3_02 245760
vxassist -g datadg -U gen make redo2_1_02 245760
vxassist -g datadg -U gen make redo2_2_02 245760
vxassist -g datadg -U gen make redo2_3_02 245760
设置相应的权限
vxedit -g datadg set user=oracle group=dba mode=644 redo1_1_02
vxedit -g datadg set user=oracle group=dba mode=644 redo2_1_02
vxedit -g datadg set user=oracle group=dba mode=644 redo1_2_02
vxedit -g datadg set user=oracle group=dba mode=644 redo2_2_02
vxedit -g datadg set user=oracle group=dba mode=644 redo1_3_02
vxedit -g datadg set user=oracle group=dba mode=644 redo2_3_02 mode=644 为其他人的写权限, 为其他人的读权限, 0040为组的读权限相加而来0002为所有者的写权限,0004为所有者的读权限,0020为组的写权限,0040为组的读权限,0200为其他人的写权限,0400为其他人的读权限,切换为数据库用户后登陆到sqlplus创建redo日志成员alter database add logfile member '/dev x/rdsk/datadg/redo1_1_02' to group 1;
alter database add logfile member '/dev x/rdsk/datadg/redo1_2_02' to group 2;
alter database add logfile member '/dev x/rdsk/datadg/redo1_3_02' to group 3;
alter database add logfile member '/dev x/rdsk/datadg/redo2_1_02' to group 4;
alter database add logfile member '/dev x/rdsk/datadg/redo2_2_02' to group 5;
alter database add logfile member '/dev x/rdsk/datadg/redo2_3_02' to group 6;
具体可以select * from v$logfile; 查看,看到当前的日志成员的状态是INV ALID可以通过切换日志文件后再查看.
vxassist -g datadg -U gen make BPMS_data4 20g
vxassist -g datadg -U gen make temp4 4g
vxedit -g datadg set user=oracle group=dba mode=644 temp4
vxedit -g datadg set user=oracle group=dba mode=644 BPMS_data4
alter database add datafile '/dev x/rdsk/datadg/BPMS_data4' size 20g
vxassist -g datadg -U gen make BPMS_data5 20g
vxedit -g datadg set user=oracle group=dba mode=644 BPMS_data5
ALTER TABLESPACE "BPMS_DA TA" ADD
DA TAFILE '/dev/vx/rdsk/datadg/BPMS_data5' SIZE 1000M
vxassist -g datadg -U gen make BPMS_index4 10g
vxedit -g datadg set user=oracle group=dba mode=644 BPMS_index4
vxassist -g datadg -U gen make BPMS_index5 10g
vxedit -g datadg set user=oracle group=dba mode=644 BPMS_index5。

相关文档
最新文档