davidkhala / oracle-database-collection

collection of Oracle Database tools, documentation and notes
Apache License 2.0
0 stars 0 forks source link

TrueCache stash #16

Open davidkhala opened 5 months ago

davidkhala commented 5 months ago
@Test // TODO WIP
    void localhostDockerTrueCache() throws SQLException {
        Properties props = new Properties();
        props.setProperty("oracle.jdbc.useTrueCacheDriverConnection", "true");
        RawConnect db = new RawConnect("oracle:thin:@//localhost:1521/FREE", "sys", "password", props);
        db.connect();
        db.connection.setReadOnly(true);
        db.disconnect();
    }

    @Test
    void trueCache() throws SQLException {
        Properties props = new Properties();
        props.setProperty("oracle.jdbc.useTrueCacheDriverConnection", "true");
        RawConnect rawConnect = new RawConnect(adwConnectionString, "ADMIN", System.getenv("adw_password"), props);
        try {
            rawConnect.connect(); rawConnect.connection.setReadOnly(true);
        }catch (java.sql.SQLException e){
            assert e.getMessage().contains("ORA-18719: The database does not support True Cache. Minimum supported version is 23ai");
        }

    }