allow to set codec only if database is not open