Database migration (share 11 sequel)

Source: Internet
Author: User
Tags dba

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.