def _add_script_sql(self, path):
        basename = os.path.basename(path)
        match = self.SQL_FILENAME.match(basename)

        if match:
            basename = basename.replace('.sql', '')
            parts = basename.split('_')
            if len(parts) < 3:
                raise exceptions.ScriptError(
                    "Invalid SQL script name %s " % basename + \
                    "(needs to be ###_description_database_operation.sql)")
            version = parts[0]
            op = parts[-1]
            # NOTE(mriedem): check for ibm_db_sa as the database in the name
            if 'ibm_db_sa' in basename:
                if len(parts) == 6:
                    dbms = '_'.join(parts[-4: -1])
                else:
                    raise exceptions.ScriptError(
                        "Invalid ibm_db_sa SQL script name '%s'; "
                        "(needs to be "
                        "###_description_ibm_db_sa_operation.sql)" % basename)
            else:
                dbms = parts[-2]
        else:
            raise exceptions.ScriptError(
                "Invalid SQL script name %s " % basename + \
                "(needs to be ###_description_database_operation.sql)")

        # File the script into a dictionary
        self.sql.setdefault(dbms, {})[op] = script.SqlScript(path)