ºìÁªLinuxÃÅ»§
Linux°ïÖú

Ò»´Î»Ö¸´oracleµÄ³¢ÊÔ

·¢²¼Ê±¼ä:2006-10-17 23:15:04À´Ô´:ºìÁª×÷Õß:linuxcms
żµÄһ̨²âÊÔ»úÉÏ×°Á˸öoracle815 for solarisµÄ°æ±¾¡£ÒòΪҲÊDzâÊÔ£¬ËùÒÔ¾ÍûÔõô¹Ü¡£

»·¾³ÈçÏ£º
Oracle815
¹éµµÄ£Ê½¡£

ÎÊÌâÈçÏ£º
oracle×°ÔÚ/opt/oracleÏ£¬µ«ÊÇÓÐһЩÊý¾ÝÎļþ·ÅÔÚÁË/export/home/oracleÏÂÃæ¡£
ÒòΪ´ÅÅ̹ÊÕÏ£¬/export/home·ÖÇø²»¿ÉʹÓÃÁË¡£
Ö»ÊǺóÆô¶¯oracleºó±¨´í˵¼¸¸öÊý¾ÝÎļþ²»¿ÉÓÃÁË¡£





»Ö¸´¹ý³Ì£º

³ö´í£º
SQL> startup
ORACLE instance started.

Total System Global Area 72007056 bytes
Fixed Size 64912 bytes
Variable Size 54992896 bytes
Database Buffers 16777216 bytes
Redo Buffers 172032 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 10 - see DBWR trace file
ORA-01110: data file 10: '/export/home/oracle/DATA/DISK4/data01.dbf'

ÌáʾÕÒ²»µ½Êý¾ÝÎļþ¡£
¾­¹ý²éÕÒ£¬·¢ÏÖ/export/homeÔ­À´¹ÒÔصÄÎļþ¶¼ÒѾ­Ïûʧ¡£

»Ö¸´£º

/opt/oracle/oradata/dbora815/system01.dbf SYSTEM
/opt/oracle/oradata/dbora815/oemrep01.dbf ONLINE
/opt/oracle/oradata/dbora815/rbs01.dbf ONLINE
/opt/oracle/oradata/dbora815/temp01.dbf ONLINE
/opt/oracle/oradata/dbora815/users01.dbf ONLINE
/opt/oracle/oradata/dbora815/indx01.dbf ONLINE
/opt/oracle/oradata/dbora815/app_data_01.dbf ONLINE
/opt/oracle/oradata/dbora815/app_data_02.dbf ONLINE
/opt/oracle/oradata/dbora815/query01.dbf ONLINE
/export/home/oracle/DATA/DISK4/data01.dbf ONLINE
/export/home/oracle/DATA/DISK5/data02.dbf ONLINE
/export/home/oracle/DATA/DISK3/indx01.dbf ONLINE
/export/home/oracle/DATA/DISK1/ronly.dbf ONLINE

·¢ÏÖÓÐËĸöÎļþÔÚ/export/homeĿ¼Ï¡£

ÏÈ°ÑÕâËĸöÎļþoffline.

SQL> alter database datafile '/export/home/oracle/DATA/DISK4/data01.dbf' offline;
Database altered.
SQL> alter database datafile '/export/home/oracle/DATA/DISK5/data02.dbf' offline;
Database altered.
SQL> alter database datafile '/export/home/oracle/DATA/DISK3/indx01.dbf' offline;
Database altered.
SQL> alter database datafile '/export/home/oracle/DATA/DISK1/ronly.dbf' offline;
Database altered.

È»ºó»Ö¸´

SQL> alter database create datafile '/export/home/oracle/DATA/DISK4/data01.dbf';
alter database create datafile '/export/home/oracle/DATA/DISK4/data01.dbf'
*
ERROR at line 1:
ORA-01119: error in creating database file '/export/home/oracle/DATA/DISK4/data01.dbf'
ORA-27040: skgfrcre: create error, unable to create file
SVR4 Error: 2: No such file or directory

´íÁË£¿²éÒ»ÏÂ

bash-2.03$ oerr ora 01119
01119, 00000, "error in creating database file '%s'"
// *Cause: Usually due to not having enough space on the device.
// *Action:

Ô­À´ÊÇÕâ¸öÎļþµÄÉÏÒ»¼¶Ä¿Â¼Ò²²»´æÔÚ£¬½¨ÉÏÁËÒÔºóÔÙ×ö¡£

SQL> alter database create datafile '/export/home/oracle/DATA/DISK4/data01.dbf';
Database altered.
SQL> alter database create datafile '/export/home/oracle/DATA/DISK5/data02.dbf';
Database altered.
SQL> alter database create datafile '/export/home/oracle/DATA/DISK3/indx01.dbf';
Database altered.
SQL> alter database create datafile '/export/home/oracle/DATA/DISK1/ronly.dbf';
Database altered.

×öÒ»ÏÂrecover

SQL> recover datafile '/export/home/oracle/DATA/DISK1/ronly.dbf'
SQL> recover datafile '/export/home/oracle/DATA/DISK3/indx01.dbf'
SQL> recover datafile '/export/home/oracle/DATA/DISK5/data02.dbf';
SQL> recover datafile '/export/home/oracle/DATA/DISK4/data01.dbf'

½«datafileÉÏÏß

SQL> alter database datafile '/export/home/oracle/DATA/DISK1/ronly.dbf' online;
Database altered.
SQL> alter database datafile '/export/home/oracle/DATA/DISK3/indx01.dbf' online;
Database altered.
SQL> alter database datafile '/export/home/oracle/DATA/DISK5/data02.dbf' online;
Database altered.
SQL> alter database datafile '/export/home/oracle/DATA/DISK4/data01.dbf' online;
Database altered.

·¢ÏÖ´ÅÅ̲»¹»ÁË£¬ÒòΪÏÖÔÚÕâЩн¨µÄÎļþ¶¼ÊÇÔÚ/·ÖÇøÏ£¬±¾À´/opt¾ÍºÜ´óÁË¡£
ºÃ°É£¬½«ÕâЩ¸öÊý¾ÝÎļþÖØÐÂresizeһϣ¬Ã¿¸ö20M.

ÏÈopenÊý¾Ý¿â

SQL> alter database open;
Database altered.

resize

alter database datafile '/export/home/oracle/DATA/DISK1/ronly.dbf' resize 20m;
Database altered.
alter database datafile '/export/home/oracle/DATA/DISK3/indx01.dbf' resize 20m;
Database altered.
alter database datafile '/export/home/oracle/DATA/DISK5/data02.dbf' resize 20m;
Database altered.
alter database datafile '/export/home/oracle/DATA/DISK4/data01.dbf' resize 20m;
Database altered.

ºÇºÇ£¬³ÉÁË¡£
¿ÉÊÇż²»ÖªµÀ£¬Õâ¸öÊDz»ÊÇ¿ÉÒÔ°ÑÊý¾Ý¶¼ÍêÈ«»Ö¸´¡£ËäÈ»Óй鵵Îļþ¡£


²¹³ä£ºÈç¹ûÓй鵵Îļþ£¬¶øûÓб¸·ÝÎļþ£¬¶ªÊ§Êý¾ÝÎļþÒ²ÊÇ¿ÉÒÔ°ÑÊý¾ÝÍêÈ«»Ö¸´µÄ£¨µ±È»¶ªÊ§systemÊý¾ÝÎļþÁ˾Ͳ»Äָܻ´ÁË£©¡£
ʹÓãº
alter database create datafile '/export/home/oracle/DATA/DISK5/data02.dbf' as '/export/home/oracle/DATA/DISK5/data02.dbf';
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ