SQL LOADER IN AWS RDS ORACLE

0

To Connect to AWSRDS Oracle I usually type sqlplus on the EC2 instance and I get a prompt user-name and I enter all the connection string and can connected

Example

[oracle@ip-xx-xx-xx-xx eeop]$ sqlplus

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Jan 27 15:45:52 2023 Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle. All rights reserved.

Enter user-name: Enter user-name: bhardwar/xxxxxxx@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=oxxxx-yxxxxxx.xxxxxxx.rds.amazonaws.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=xxxx))) Last Successful login time: Fri Jan 27 2023 15:13:27 -05:00

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.17.0.0.0

When I use sqlldr command I get an error from the EC2 Instance sqlldr user_id=bhardwar/xxxxxxx@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=xxxx-xxxx-xxxxx-xxxx.amazonaws.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=xxxx))) control=/app/loaddata/eeop/load_ocom_data.ctl log=/app/loaddata/eeop/load_ocom_data.log
[oracle@ip-xx-xx-xx-xx]$ sqlldr user_id=bhardwar/xxxxxxx@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=xxxx-xxxx-xxxxx-xxxx.amazonaws.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=xxxx))) control=/app/loaddata/eeop/load_ocom_data.ctl log=/app/loaddata/eeop/load_ocom_data.log
-bash: syntax error near unexpected token `('

How to use SQL LOADER to load data into an AWS RDS Oracle database?

Thanks Rajan

2 Answers
0
Accepted Answer

The error "-bash: syntax error near unexpected token `('" implies that the problem is with the bash shell and not sql loader.
I suggest you try:

  • using the easy connect format: @//host:port/SERVICE_NAME
  • quoting and escaping the quotes and brackets the connection string: \"\(DESCRIPTION=\(ADDRESS_LIST=\(ADDRESS=\(PROTOCOL=TCP\)\(HOST=xxxx-xxxx-xxxxx-xxxx.amazonaws.com\)\(PORT=1521\)\)\)\(CONNECT_DATA=\(SERVICE_NAME=xxxx\)\)\) control=/app/loaddata\"
  • using the easy connect format: //host:port/SERVICE_NAME
  • putting the userid into a parfile (may still need quotes or escaping)
AWS
Mark_G
answered a year ago
profile picture
EXPERT
reviewed a month ago
0

The option using the easy connect format: @//host:port/SERVICE_NAME worked.

Thanks for your help

raja
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions