修改数据文件尺寸
在修改尺寸前,首先要确认文件系统当前的空间使用情况:
1 2 3 4 5 6 7 8 9 |
[oracle@ora12c - allah:~]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 18G 11G 5.4G 68% / /dev/sda1 289M 17M 258M 7% /boot tmpfs 2.0G 506M 1.5G 26% /dev/shm /dev/sr1 4.1G 4.1G 0 100% /iso /dev/sdb2 12G 7.1G 3.5G 68% /ora_data /dev/sr0 29M 29M 0 100% /media/CDROM [oracle@ora12c - allah:~]$ |
开始扩容:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
[root@ora12c ~]# su - oracle [oracle@ora12c - allah:~]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Wed Nov 5 20:39:22 2014 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options SQL> select file_name from dba_data_files; FILE_NAME -------------------------------------------------------------------------------- /ora_data/allah/system01.dbf /ora_data/allah/sysaux01.dbf /ora_data/allah/undotbs01.dbf /ora_data/allah/users01.dbf /ora_data/ALLAH/datafile/o1_mf_allah_b5jmqm12_.dbf /ora_data/ALLAH/datafile/o1_mf_adamhuan_b5jqs1c4_.dbf 6 rows selected. SQL> exit Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options [oracle@ora12c - allah:~]$ du -sh /ora_data/allah/* 9.6M /ora_data/allah/control01.ctl 51M /ora_data/allah/redo01.log 51M /ora_data/allah/redo02.log 51M /ora_data/allah/redo03.log 721M /ora_data/allah/sysaux01.dbf 801M /ora_data/allah/system01.dbf 147M /ora_data/allah/temp01.dbf 136M /ora_data/allah/undotbs01.dbf 5.1M /ora_data/allah/users01.dbf [oracle@ora12c - allah:~]$ du -sh /ora_data/ALLAH/datafile/* 101M /ora_data/ALLAH/datafile/o1_mf_adamhuan_b5jqs1c4_.dbf 101M /ora_data/ALLAH/datafile/o1_mf_allah_b5jmqm12_.dbf [oracle@ora12c - allah:~]$ [oracle@ora12c - allah:~]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Wed Nov 5 20:48:00 2014 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options SQL> alter database datafile '/ora_data/allah/users01.dbf' resize 200m; Database altered. SQL> exit Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options [oracle@ora12c - allah:~]$ du -sh /ora_data/allah/users01.dbf 201M /ora_data/allah/users01.dbf [oracle@ora12c - allah:~]$ |
————————————————————————————————————
Ending。