java.sql.Connection.isReadOnly method If you connect to a read-only database, the appropriate isReadOnly DatabaseMetaData value is returned. java.sql.Connection.isReadOnly method

For example, Connections set to read-only using the setReadOnly method, Connections for which the user has been defined as a readOnlyAccess user (with one of the properties), and Connections to databases on read-only media return true.