FreeSQL.com lets you use a free, hosted Oracle AI Database instance right from your browser. But, FreeSQL can also be used as a remote database for testing, POCs, and more!
In this article, we’ll walk though how to connect to a FreeSQL database from your local machine, no database setup required.
Login to FreeSQL.com
To use FreeSQL as a remote database, you’ll need to login using your Oracle account. If you don’t have an Oracle account, create a free account here.
From the FreeSQL homepage, click “Sign In” in the top right corner:

Generate database connection string
Once you’re logged in, click the “Connect” button on the top right nav bar:

This opens a model dialogue to generate your connection string:
- Click “Regenerate” to create a new FreeSQL password.
- Copy the SQLcl or code sample of your preferred language, which will be populated with the newly generated password
- Connect!

Connect!
For SQLcl, connecting to FreeSQL looks like this:
sql '<SCHEMA>/<PASSWORD>@//db.freesql.com:1521/26ai_un3c1'If you’re using Java, you can create a Java DataSource like this:
import java.sql.*;
public class OracleConnection {
public static void main(String[] args) {
String host = "jdbc:oracle:thin:@db.freesql.com:1521/26ai_un3c1";
String username = "<SCHEMA>";
String password = "<PASSWORD>";
try {
Connection conn = DriverManager.getConnection(host, username, password);
System.out.println("Connected to Oracle database");
} catch (SQLException e) {
System.out.println("Failed to connect to Oracle database");
e.printStackTrace();
}
}
}Once you’re connected, you can test out features of Oracle AI Database using the tools or programming of your choice!

Leave a Reply