LPS-34574

LPS-34574 During an upgrade process we can not call services so we have to set the proper database before run the SQL