Amazon AWS Learning-Deploy data for an Oracle-type RDS Database

Source: Internet
Author: User

For more details on deploying data for RDS, importing and exporting, see [official documentation].

To deploy data for RDS, it is important to note that the RDS database only has 1521 ports open, so all operations can only be done through a 1521 port database connection.

1 Exporting data

In the source database:

--查看数据库目录:select * from dba_directories t;--数据导出(操作系统命令行执行,而不是数据库SQL命令行):expdp TESTDB/TESTDB schemas=TESTDB dumpfile=expdp.dmp directory=DATA_PUMP_DIR
2 Create a tablespace, user, and authorization in the target database

In the target database, which is the RDS database:

--创建表空间:create tablespace TESTDB;--创建用户create user TESTDB identified by TESTDB default tablespace TESTDB;--给用户授权grant connect, resource, dba to TESTDB;
3 Importing Data

In the source database:

--建立dblinkcreate database link to_rds connect to TESTDB identified by TESTDBusing ‘(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<dns or ip address of remote db>)(PORT=1521))(CONNECT_DATA=(SID=orcl)))‘

Note Set the location of the host to the server IP address or domain name.

--Copy the library file to the RDS library: BEGIN dbms_file_transfer. Put_file (source_directory_object = ' Data_pump_dir ', source_file_name = ' E Xpdp.dmp ', destination_directory_object = ' Data_pump_dir ', destination_file_name = ' expdp_copied. DMP ', destination_database = ' to_rds ' ); END;/--Import library (operating system command line execution, not database SQL command line):IMPDP [email protected] dumpfile=expdp_copied. DMP Directory=data_pump_dir full=y--Delete Dblink Drop database link to_rds;

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Amazon AWS Learning-Deploy data for an Oracle-type RDS Database

Related Article

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.