LPS-34682 Adding defensive code to prevent NPEs in case of strange creole source
LPS-34682 SF
LPS-34574 During an upgrade process we can not call services so we have to set the proper database before running the SQL