[oracle@centos5 dbs]$ export ORACLE_SID=xccheese
[oracle@centos5 dbs]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Dec 22 12:32:22 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 2020224 bytes
Variable Size 92277888 bytes
Database Buffers 188743680 bytes
Redo Buffers 2170880 bytes
Database mounted.
SQL> alter system archive log;
alter system archive log
*
ERROR at line 1:
ORA-01974: Illegal archive option
SQL> alter system archivelog;
alter system archivelog
*
ERROR at line 1:
ORA-02065: illegal option for ALTER SYSTEM
SQL> alter database archivelog;
Database altered.
SQL>
SQL>
SQL>
SQL> desc v$database;
Name Null? Type
----------------------------------------- -------- ----------------------------
DBID NUMBER
NAME VARCHAR2(9)
CREATED DATE
RESETLOGS_CHANGE# NUMBER
RESETLOGS_TIME DATE
PRIOR_RESETLOGS_CHANGE# NUMBER
PRIOR_RESETLOGS_TIME DATE
LOG_MODE VARCHAR2(12)
CHECKPOINT_CHANGE# NUMBER
ARCHIVE_CHANGE# NUMBER
CONTROLFILE_TYPE VARCHAR2(7)
CONTROLFILE_CREATED DATE
CONTROLFILE_SEQUENCE# NUMBER
CONTROLFILE_CHANGE# NUMBER
CONTROLFILE_TIME DATE
OPEN_RESETLOGS VARCHAR2(11)
VERSION_TIME DATE
OPEN_MODE VARCHAR2(10)
PROTECTION_MODE VARCHAR2(20)
PROTECTION_LEVEL VARCHAR2(20)
REMOTE_ARCHIVE VARCHAR2(8)
ACTIVATION# NUMBER
SWITCHOVER# NUMBER
DATABASE_ROLE VARCHAR2(16)
ARCHIVELOG_CHANGE# NUMBER
ARCHIVELOG_COMPRESSION VARCHAR2(8)
SWITCHOVER_STATUS VARCHAR2(20)
DATAGUARD_BROKER VARCHAR2(8)
GUARD_STATUS VARCHAR2(7)
SUPPLEMENTAL_LOG_DATA_MIN VARCHAR2(8)
SUPPLEMENTAL_LOG_DATA_PK VARCHAR2(3)
SUPPLEMENTAL_LOG_DATA_UI VARCHAR2(3)
FORCE_LOGGING VARCHAR2(3)
PLATFORM_ID NUMBER
PLATFORM_NAME VARCHAR2(101)
RECOVERY_TARGET_INCARNATION# NUMBER
LAST_OPEN_INCARNATION# NUMBER
CURRENT_SCN NUMBER
FLASHBACK_ON VARCHAR2(18)
SUPPLEMENTAL_LOG_DATA_FK VARCHAR2(3)
SUPPLEMENTAL_LOG_DATA_ALL VARCHAR2(3)
DB_UNIQUE_NAME VARCHAR2(30)
STANDBY_BECAME_PRIMARY_SCN NUMBER
FS_FAILOVER_STATUS VARCHAR2(21)
FS_FAILOVER_CURRENT_TARGET VARCHAR2(30)
FS_FAILOVER_THRESHOLD NUMBER
FS_FAILOVER_OBSERVER_PRESENT VARCHAR2(7)
FS_FAILOVER_OBSERVER_HOST VARCHAR2(512)
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 0
Next log sequence to archive 1
Current log sequence 1
SQL> alter database open;
Database altered.
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
/u01/oradata/xccheese/system01.dbf
/u01/oradata/xccheese/undotbs01.dbf
/u01/oradata/xccheese/sysaux01.dbf
/u01/oradata/xccheese/users01.dbf
SQL> alter tablespace users add datafile '/u01/oradata/xccheese/users02.dbf';
alter tablespace users add datafile '/u01/oradata/xccheese/users02.dbf'
*
ERROR at line 1:
ORA-01119: error in creating database file '/u01/oradata/xccheese/users02.dbf'
ORA-17610: file '/u01/oradata/xccheese/users02.dbf' does not exist and no size
specified
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
SQL> alter tablespace users add datafile '/u01/oradata/xccheese/users02.dbf';
alter tablespace users add datafile '/u01/oradata/xccheese/users02.dbf'
*
ERROR at line 1:
ORA-01119: error in creating database file '/u01/oradata/xccheese/users02.dbf'
ORA-17610: file '/u01/oradata/xccheese/users02.dbf' does not exist and no size
specified
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
SQL>
SQL>
SQL> alter tablespace users add datafile '/u01/oradata/xccheese/users02.dbf' 10M;
alter tablespace users add datafile '/u01/oradata/xccheese/users02.dbf' 10M
*
ERROR at line 1:
ORA-00933: SQL command not properly ended
SQL> alter tablespace users add datafile '/u01/oradata/xccheese/users02.dbf' size 10M;
Tablespace altered.
SQL> alter system switch log;
alter system switch log
*
ERROR at line 1:
ORA-01900: LOGFILE keyword expected
SQL> alter system switch logfile;
System altered.
SQL> /
System altered.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
[oracle@centos5 dbs]$ cd /u01/oradata/xccheese/
[oracle@centos5 xccheese]$ ls
control01.ctl control03.ctl redo02.log sysaux01.dbf temp01.dbf users01.dbf
control02.ctl redo01.log redo03.log system01.dbf undotbs01.dbf users02.dbf
[oracle@centos5 xccheese]$ mv users02.dbf users02.dbf.bak
[oracle@centos5 xccheese]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Dec 22 12:40:21 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> shutdown immediate
ORA-01116: error in opening database file 5
ORA-01110: data file 5: '/u01/oradata/xccheese/users02.dbf'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
SQL> recover datafile 5;
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 5: '/u01/oradata/xccheese/users02.dbf'
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01110: data file 5: '/u01/oradata/xccheese/users02.dbf'
SQL> alter database create datafile 5 as '/u01/oradata/xccheese/users02.dbf';
Database altered.
SQL>
SQL>
SQL>
SQL> select file_name,status from dba_data_files where tablespace_name='USERS';
FILE_NAME
--------------------------------------------------------------------------------
STATUS
---------
/u01/oradata/xccheese/users01.dbf
AVAILABLE
/u01/oradata/xccheese/users02.dbf
AVAILABLE
SQL> select name,status from v$datafile where file#=5;
NAME
--------------------------------------------------------------------------------
STATUS
-------
/u01/oradata/xccheese/users02.dbf
RECOVER
SQL> recover datafile 5;
Media recovery complete.
SQL> select name,status from v$datafile where file#=5;
NAME
--------------------------------------------------------------------------------
STATUS
-------
/u01/oradata/xccheese/users02.dbf
OFFLINE
SQL> !ls
control01.ctl control03.ctl redo02.log sysaux01.dbf temp01.dbf users01.dbf users02.dbf.bak
control02.ctl redo01.log redo03.log system01.dbf undotbs01.dbf users02.dbf
SQL> !mv users01.dbf users01.dbf.bak
SQL>
SQL>
SQL>
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> !ls
control01.ctl control03.ctl redo02.log sysaux01.dbf temp01.dbf users01.dbf.bak users02.dbf.bak
control02.ctl redo01.log redo03.log system01.dbf undotbs01.dbf users02.dbf
SQL> startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 2020224 bytes
Variable Size 96472192 bytes
Database Buffers 184549376 bytes
Redo Buffers 2170880 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
ORA-01110: data file 4: '/u01/oradata/xccheese/users01.dbf'
SQL>