博客首页 注册 建议与交流 排行榜 加入友情链接
推荐 投诉 搜索: 帮助

XStorage

eXceed Storage ,edited by XiaoMao 持续不断地尽最大努力去做事。
xiaomao2006.cublog.cn


Oracle系列之用户管理的只读表空间备份
$ 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

发表于: 2008-01-31 ,修改于: 2008-01-31 21:08,已浏览485次,有评论0条 推荐 投诉


网友评论

发表评论