Search code examples
oracle-databaseamazon-web-servicesdirectoryexternalrds

AWS Oracle RDS - Directory in external server


My situation: - I have an AWS Oracle RDS - I have a file in a local server

Target: - In RDS I would like read (for example create an external table) the file in external server, using the directory.

I cannot create a directory like

create or replace directory TEST_DIR
  as '\\server\myfolder';

Because I have an error and, following the AWS documentation (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.Oracle.CommonDBATasks.Misc.html), I have to use rdsadmin.rdsadmin_util.create_directory.

Unfortunately, this procedure create a directory inside the RDS, I cannot to point in my local server.

How can I do to create directories to read files in my server?

Thanks


Solution

    • Install Oracle Express edition on the local server.
    • Create a directory on the local server.
    • Create external tables on the local server.
    • Make a db link on AWS RDS to the local server.

      select * from ext_table@local_server_dblink;