Welcome Guest, Not a member yet? Register   Sign In
Oracle Cloud Autonomous Database Support
#1

I was hoping to use Oracle's autonomous database free tier with a CodeIgniter application.  This is something that's entirely new to me so I may have a complete misunderstanding of what's supposed to happen.
Does the CodeIgniter oracle db driver support the autonomous database?  The Oracle docs mention a wallet file but I don't see any mention of a wallet file in the driver.  Is there a different way it needs to be used? (does it even need to be used?)

Thanks
Reply
#2

Quote:05. How do I connect to the Autonomous Database?

ADB is built upon the Oracle Database, therefore, applications and tools that support Oracle Database also support ADB. These tools and applications connect to the service using standard database connectivity.

https://docs.oracle.com/cd/E52319_01/inf...b_faq.html

https://docs.oracle.com/en-us/iaas/auton...ation.html
It seems it uses oci_pconnect() to connect, so you can use CI for Autonomous Database.
Reply
#3

Okay, thank you.

One thing I noticed is that Oracle seems to like capitalized column names and the use of quotes in the query makes things case sensitive. Is there a "best practices" way of handling the case sensitivity? I.e., create an "OracleBaseModel" which will capitalize all the column names before a query is run?
Reply
#4

Yes, the CodeIgniter Oracle DB driver supports the Oracle Autonomous Database. Instead of using a wallet file, you can configure the necessary credentials and connection details in the database configuration file. Once correctly configured, you can seamlessly interact with the Oracle Autonomous Database in your CodeIgniter application. Remember to test the connection and ensure your application can perform desired database operations by clicking on relevant buttons or links.
Reply
#5

Hi there,

Using Oracle's Autonomous Database Free Tier with a CodeIgniter application is definitely possible. The CodeIgniter database driver for Oracle should support connecting to an Autonomous Database. However, there are a few considerations to keep in mind.

Wallet File: The Oracle Autonomous Database typically requires a wallet file for secure connection. The wallet file contains the necessary credentials and security certificates. While the CodeIgniter Oracle driver does not directly mention a wallet file, you still need to configure the connection settings properly to establish a secure connection.

Connection Configuration: To connect to an Autonomous Database, you'll need to provide the appropriate connection details in your CodeIgniter configuration file (database.php). These details include the database hostname, port, service name, username, and password. Additionally, you may need to specify the appropriate encryption and authentication settings, depending on the requirements of your Autonomous Database.

Here's an example of a CodeIgniter configuration for connecting to an Oracle Autonomous Database:

$db['default'] = array(
'dsn' => '',
'hostname' => '<autonomous_db_hostname>:<port>/<service_name>',
'username' => '<username>',
'password' => '<password>',
'database' => '',
'dbdriver' => 'oci8',
'dbprefix' => '',
'pconnect' => false,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => false,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => 'ssl', // or 'tls' depending on the requirements
'compress' => false,
'stricton' => false,
'failover' => array(),
'save_queries' => true
);
Make sure to replace the <autonomous_db_hostname>, <port>, <service_name>, <username>, and <password> placeholders with the appropriate values provided by Oracle for your Autonomous Database.

Remember to also enable the Oracle database driver in your CodeIgniter configuration file by setting 'dbdriver' => 'oci8'.

Oracle Instant Client: To establish a connection to Oracle databases, including Autonomous Database, you'll need to have Oracle Instant Client installed on your server or development environment. Ensure that you have the required Oracle client libraries installed and properly configured on your system. This includes having the necessary environment variables set up, such as ORACLE_HOME and LD_LIBRARY_PATH on Linux.
By configuring the connection settings in CodeIgniter and ensuring the appropriate Oracle client libraries are available, you should be able to establish a connection to Oracle's Autonomous Database Free Tier successfully.

If you encounter any specific errors or issues during the configuration process, feel free to provide more details, and I'll be happy to assist you further.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB