Database Reference
In-Depth Information
exeRCiSe 2.2 (continued)
Database altered.
SQL> alter system switch logfile;
System altered.
SQL> host cp /oracle01/backup/arch/* /oracle01/backup/orcl/*
SQL> alter database backup controlfile to trace;
Database altered.
SQL> alter database backup controlfile to '/oracle01/oradata/orcl/control1.bak';
Database altered.
3. Now remove all data files from the database. On some operating-system platforms
(Linux, for example), you can do this with the database up and running, and on others
(Windows) you will have to shut down the database.
SQL> quit
Disconnected from Oracle Database 12c Enterprise Edition
Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing
options [oracle@localhost orcl]$ pwd
/oracle01/oradata/orcl
[oracle@localhost orcl]$ ls -al *.dbf
-rw-r----- 1 oracle oinstall 104865792 Aug 17 15:49 example01.dbf
-rw-r----- 1 oracle oinstall 104865792 Aug 17 15:49
my_second_secure_tbs_01.dbf
-rw-r----- 1 oracle oinstall 104865792 Aug 17 15:49 my_secure_tbs_01.dbf
-rw-r----- 1 oracle oinstall 104865792 Aug 17 15:49 retention_archives_01.
dbf
-rw-r----- 1 oracle oinstall 778051584 Aug 17 15:49 sysaux01.dbf
-rw-r----- 1 oracle oinstall 744497152 Aug 17 15:49 system01.dbf
-rw-r----- 1 oracle oinstall 182525952 Aug 17 14:03 temp01.dbf
-rw-r----- 1 oracle oinstall 1121984512 Aug 17 15:49 undotbs01.dbf
-rw-r----- 1 oracle oinstall 159326208 Aug 17 15:49 users01.dbf
[oracle@localhost orcl]$ rm *.dbf
4. Connect to the database and shut it down. It may be possible that you will not be
able to connect to the database, and yet the database will still be running. In this case
you will have to manually kill the Oracle processes if you are running in Unix or shut
down the database service in Windows. In our case, we are not able to log into the
database, so we kill the LGWR process.
[oracle@localhost trace]$ sqlplus "/ as sysdba"
SQL*Plus: Release 12.1.0.1.0 Production on Fri Dec 27 10:20:57 2013
Search WWH ::




Custom Search