Oracle 更改表空间位置的具体步骤
[oracle]> sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 – Production on Tue Aug 19 03:46:29 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected.
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1977208 bytes
Variable Size 104862856 bytes
Database Buffers 58720256 bytes
Redo Buffers 2211840 bytes
Database mounted.
Database opened.
SQL> alter tablespace users offline;
Tablespace altered.
SQL> host mv /opt/oracle/oradata/ora10g/users01.dbf /opt/oracle/oradata_bak/
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]> ls
control01.ctl control03.ctl redo01.log redo03.log system01.dbf undotbs01.dbf
control02.ctl example01.dbf redo02.log sysaux01.dbf temp01.dbf users01.dbf
[oracle]> mv /opt/oracle/oradata/ora10g/users01.dbf /opt/oracle/oradata_bak/
[oracle]> sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 – Production on Tue Aug 19 03:52:19 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected.
SQL> alter tablespace users
2 rename datafile ‘/opt/oracle/oradata/ora10g/users01.dbf’ to ‘/opt/oracle/oradata_bak/users01.dbf’;
Tablespace altered.
SQL> alter tablespace users online;
Tablespace altered.
见效果
=============================================
RMAN> report schema
2> ;
Report of database schema
List of Permanent Datafiles
===========================
File S
相关文档:
SQL中的单记录函数
1.ASCII
返回与指定的字符对应的十进制数;
SQL> select ascii('A') A,ascii('a') a,ascii('0') zero,ascii(' ') space from dual;
A A ZERO SPACE
--------- --------- --------- ---------
65 97 48 32
2.CHR
给出整数,返回对应的字符;
SQL> select chr(54740) zhao,chr(65) chr6 ......
dba_users 数据库用户信息
dba_segments 表段信息
dba_extents 数据区信息
dba_objects 数据库对象信息
dba_tablespaces 数据库表空间信息
dba_data_files 数据文件设置信息
dba_temp_files 临时数据文件信息
dba_rollback_segs 回滚段信息
dba_ts_quotas 用户表空间配额信息
dba_free_space 数据库空闲空间 ......
关键字: oracle
Oracle安装中的DHCP问题
1.Linux
修改hosts文件 将ip地址与localhost设定就可以了,如下
vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
192.168.193.129 www.myzhtc.com
192.168.193.129 localhost myzhtc.com
......
测试环境:
源: windows 2003, oracle 10202
目标:windows 2000, oracle 10203
注:本文中所说的 schema 和 user 是一个意思。
impdp 的数据源既可以是expdp 导出来的DMP文件,也可以是一数据库,通过netwo ......