$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jan 31 05:53:51 2008
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> select tablespace_name from dba_tablespaces
2 where status = 'READ ONLY';
no rows selected
SQL> select tablespace_name from dba_tablespaces;
TABLESPACE_NAME
------------------------------
SYSTEM
UNDOTBS1
SYSAUX
TEMP
USERS
EXAMPLE
TBS_1
TBS_2
8 rows selected.
SQL> alter tablespace users read only;
Tablespace altered.
SQL> select tablespace_name from dba_tablespaces
2 where status = 'READ ONLY';
TABLESPACE_NAME
------------------------------
USERS
SQL>
SQL> select file_name from dba_data_files
2 where tablespace_name='USERS'
3 ;
FILE_NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/ORACLE_DB_TEST/datafile/o1_mf_users_3m2opfxl_.dbf
SQL> host pwd
/u01/app/oracle/oraclebackup
SQL> host ls
SQL> host cp /u01/app/oracle/oradata/ORACLE_DB_TEST/datafile/o1_mf_users_3m2opfxl_.dbf ./
SQL> host ls
o1_mf_users_3m2opfxl_.dbf
SQL> alter tablespace users read write;
Tablespace 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