Oracle 在同一台主机上建立用户管理的复制数据库
Oracle在同一台主机上建立用户管理的复制数据库
下面给出一些步骤
1.备份主数据库(rau)的所有数据文件,备份控制文件到跟踪文件。(rau为主数据库)。
[oracle@source ~]$ sqlplus / as sysdba
SQL> select instance_name from v$instance;
INSTANCE_NAME
--------------------------------
rau
SQL> select name from v$datafile;
NAME
-------------------------------------------------------------------------
/home/oracle/oradata/rau/system01.dbf
/home/oracle/oradata/rau/undotbs01.dbf
/home/oracle/oradata/rau/sysaux01.dbf
/home/oracle/oradata/rau/users01.dbf
SQL> alter database begin backup;
Database altered.
SQL> host cp /home/oracle/oradata/rau/*.dbf /home/oracle/duplicate_backup/
SQL> host ls -l /home/oracle/duplicate_backup/
total 768876
-rw-r----- 1 oracle oinstall 251666432 May 6 01:00 sysaux01.dbf
-rw-r----- 1 oracle oinstall 503324672 May 6 01:01 system01.dbf
-rw-r----- 1 oracle oinstall 20979712 May 6 01:01 temp01.dbf
-rw-r----- 1 oracle oinstall 26222592 May 6 01:01 undotbs01.dbf
-rw-r----- 1 oracle oinstall 5251072 May 6 01:01 users01.dbf
SQL> alter database end backup;
Database altered.
SQL> alter system archive log current;
System altered.
SQL> alter database backup controlfile to trace resetlogs;
Database altered.
下面给出一些步骤
1.备份主数据库(rau)的所有数据文件,备份控制文件到跟踪文件。(rau为主数据库)。
[oracle@source ~]$ sqlplus / as sysdba
SQL> select instance_name from v$instance;
INSTANCE_NAME
--------------------------------
rau
SQL> select name from v$datafile;
NAME
-------------------------------------------------------------------------
/home/oracle/oradata/rau/system01.dbf
/home/oracle/oradata/rau/undotbs01.dbf
/home/oracle/oradata/rau/sysaux01.dbf
/home/oracle/oradata/rau/users01.dbf
SQL> alter database begin backup;
Database altered.
SQL> host cp /home/oracle/oradata/rau/*.dbf /home/oracle/duplicate_backup/
SQL> host ls -l /home/oracle/duplicate_backup/
total 768876
-rw-r----- 1 oracle oinstall 251666432 May 6 01:00 sysaux01.dbf
-rw-r----- 1 oracle oinstall 503324672 May 6 01:01 system01.dbf
-rw-r----- 1 oracle oinstall 20979712 May 6 01:01 temp01.dbf
-rw-r----- 1 oracle oinstall 26222592 May 6 01:01 undotbs01.dbf
-rw-r----- 1 oracle oinstall 5251072 May 6 01:01 users01.dbf
SQL> alter database end backup;
Database altered.
SQL> alter system archive log current;
System altered.
SQL> alter database backup controlfile to trace resetlogs;
Database altered.
相关推荐
周嘉笙 2020-11-09
zhuzhufxz 2020-09-16
lklong 2020-11-22
oraclemch 2020-11-06
shilukun 2020-10-10
bfcady 2020-08-16
Hody 2020-08-16
FightFourEggs 2020-08-16
数据库设计 2020-08-16
yanghuatong 2020-08-16
dbasunny 2020-08-16
罗罗 2020-08-16
ihuaqiang 2020-08-16
choice0 2020-07-30
娜娜 2020-07-28
solarspot 2020-07-28
踩风火轮的乌龟 2020-07-26
娜娜 2020-07-20
xwb 2020-07-19
娜娜 2020-07-18
流云追风 2020-07-04
dataminer 2020-06-25
娜娜 2020-06-22
zhangchaoming 2020-06-21