This section continues with the following: Impdp+dblink technology, which is characterized by saving hard disk space and reducing transmission time.
1. Test with HR user
1) View the information under the host under the HR user (the actual user is the user in the database)
Select Username,default_tablespace from dba_users where USERNAME like ' HR ';
Select Tablespace_name,bytes from dba_data_files where tablespace_name like ' EXAMPLE ';
2) Preparation on the standby library
Create HR users and related tablespaces and authorizations on the standby:
Create tablespace example datafile '/u01/app/oracle/oradata/frank/example01.dbf ' size 200m;
Create user hr identified by HR default example
Grant DBA to HR;
3) Configure the Tnsname.ora file on the standby library
ORCL =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.0.27) (PORT = 1521))
)
(Connect_data =
(service_name = ORCL)
)
)
ORCL1 =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.0.10) (PORT = 1521))
)
(Connect_data =
(service_name = ORCL1)
)
)
4) attempt to connect to the main library from the standby library
Sqlplus sys/[email protected] as Sysdba
5) Create a Dblink on the standby library
Create public database link Hrlink using ' ORCL1 ';
Create DATABASE link Hrlink connect to HR identified by Oracle;
SELECT * from Dba_db_links;
Select COUNT (*) from [email protected];
6) Migrate hr under All table to Standby library
Grant Dba,connect,resource to HR indentified by Oracle;
IMPDP hr Network_link=hrlink schemas=hr cluster=n parallel=2
Database migration (share 11 sequel)