public static boolean isOpenSeparateConnection(DBPDataSourceContainer container) {
        SeparateConnectionBehavior behavior = SeparateConnectionBehavior.parse(
            container.getPreferenceStore().getString(SQLPreferenceConstants.EDITOR_SEPARATE_CONNECTION)
        );
        switch (behavior) {
            case ALWAYS:
                return true;
            case NEVER:
                return false;
            case DEFAULT:
            default: 
                return !container.isForceUseSingleConnection() && !container.getDriver().isEmbedded();
        }
    }
A {@link IResource}'s session property to distinguish between persisted and newly created resources.
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditorUtils.java