Rdbms fixes for sonar

Made some fixes for internal sonar