- Newest
- Most votes
- Most comments
The sql script should be on the host where you are running sqlplus on, not on the database (RDS) server.
The steps you've followed to download the script from an S3 bucket and create a directory in the RDS instance are correct. However, there seems to be an issue with the execution of the script.
To execute the SQL script, you can use the @ command followed by the path of the script file. In this case, the path of the script file is '/rdsdbdata/userdirs/01/deploy-1.sql'
The error message "SP2-0310: unable to open file "/rdsdbdata/userdirs/01/deploy-1.sql"" suggests that the SQLPlus client is unable to access the file. This could be due to file permissions or a lack of read access to the file. You should check the permissions of the file to ensure that the user running SQLPlus has read access to it.
Another way to execute the script is to use the SQL*Plus command line utility, which can be run on the RDS instance or on a local machine to connect to the RDS instance. You can use the command: sqlplus -S <username>/<password>@<hostname>:<port>/<sid> @/rdsdbdata/userdirs/01/deploy-1.sql
Another utility that can be used is the Oracle SQL Developer, which is a free GUI tool provided by Oracle for managing and executing SQL scripts on Oracle databases. It can be used to connect to the RDS instance and execute the script.
Lastly, it is important to note that RDS instances have certain limitations, like the lack of access to the underlying file system. So, it is better to use a method that does not rely on the file system, such as using the SQL*Plus command line utility or SQL Developer to directly execute the script.
Yes, thanks I I uploaded the sql script on the HOST where I am running sqlplus ran the scripts and it worked. I dont know why I thought I had to upload it onto the AWS RDS server.
Thanks a lot! Appreciate it
Relevant content
- asked 2 years ago
- asked 8 months ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated 2 years ago