oracle11g2oracle11g && oracle11g2oracle19c

最近在搞oracle 数据库迁移,全量增量。好久没有搞oracle了,东西忘的差不多,感觉还是整理一下,以后可以直接使用。

oracle11g2oracle11g

11g211g-环境如下

 本来想两边都2G 内存,奈何没钱买好电脑。

11g211g-创建用户

两边同时创建oracle用户daxiong1,daxiong2,daxiong3步骤一样,只列举一个用户(daxiong1)

[oracle@master ~]$ ./oracle_script/bin/create_oracle_user.sh -u daxiong1 -p daxiong1
 Oracle user [ daxiong1 ] created successfully!!! 
[oracle@master ~]$ sqlplus daxiong1/daxiong1

=======================================

[oracle@slave ~]$ ./oracle_script/bin/create_oracle_user.sh -u daxiong1 -p daxiong1
 Oracle user [ daxiong1 ] created successfully!!! 
[oracle@slave ~]$ sqlplus daxiong1/daxiong1
View Code

11g211g-造数

master端造一些数据:

--创建测试表
create table t1(
    id int,
  name varchar(100)
);
--插入几条数据
insert into t1 values(1,'小一');
insert into t1 values(2,'小二');
insert into t1 values(3,'小三');
insert into t1 values(4,'小四');
insert into t1 values(9,'小五');
--查看一下
select * from t1;
View Code

11g211g-exp/imp

master上导出daxiong1用户:

 exp \'sys/oracle as sysdba\' file=/home/oracle/daxiong1.dmp owner=daxiong1 direct=y
View Code

猜你喜欢

转载自www.cnblogs.com/daxiong1314/p/13403104.html