Found better way to determine cenozo database name in sql script

Instead of relying on string replacements the cenozo database is
being found using the role_has_operation table's foreign key constraint
to the role table in the cenozo database.