In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
How to install Oracle and create the AWS RDS of Oracle will not be discussed in detail here. Simply create some simple data in the local Oracle, and then try to import RDS.
Step 1: Grant permissions
Log in to the local Oracle and enter the following command:
SQL > grant unlimited tablespace to SCOTT;SQL > grant read,write on directory data_pump_dir to SCOTT;SQL > grant execute on dbms_datapump to SCOTT;SQL > @ / usr/oracle/dumpscott.sql
PL/SQL procedure successfully completed.
Dumpscott.sql content:
DECLAREhdnl NUMBER;BEGINhdnl: = DBMS_DATAPUMP.open (operation = > 'EXPORT', job_mode = >' SCHEMA', job_name= > null); DBMS_DATAPUMP.ADD_FILE (handle = > hdnl, filename = > 'scott.dmp', directory = >' DATA_PUMP_DIR', filetype = > dbms_datapump.ku$_file_type_dump_file); DBMS_DATAPUMP.add_file (handle = > hdnl, filename = > 'exp.log', directory = >' DATA_PUMP_DIR', filetype = > dbms_datapump.ku$_file_type_log_file) DBMS_DATAPUMP.METADATA_FILTER (hdnl,'SCHEMA_EXPR','IN ('SCOTT'')'); DBMS_DATAPUMP.start_job (hdnl); END;/Step 4: use DBMS_FILE_TRANSFER to transfer dump file to Amazon RDS DB
BEGIN
DBMS_FILE_TRANSFER.PUT_FILE (
Source_directory_object = > 'DATA_PUMP_DIR'
Source_file_name = > 'scott.dmp'
Destination_directory_object = > 'DATA_PUMP_DIR'
Destination_file_name = > 'scott_copied.dmp'
Destination_database = > 'to_rds'
);
END
/
In sqlplus, line the SQL file:
SQL > @ / usr/oracle/putscott.sql
PL/SQL procedure successfully completed.
Step 4: using Data pump to import data to RDS
Impdp @ DUMPFILE=user1copied.dmpDIRECTORY=DATA_PUMP_DIR full=y
Enter the following:
Impdp user@RDS_DB DUMPFILE=scott_copied.dmp DIRECTORY=DATA_PUMP_DIR full=y
The upload and import process will be completed automatically when prompted for a password. Then connect to RDS to query the emp table of SCOTT and other grass operations. There will be two error here, but can be ignored.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.