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 回答
0
已接受的回答

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
已回答 1 年前
profile picture
专家
已审核 1 个月前
0

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

Thanks for your help

raja
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则