• If the restore is happening the only thing left is the ChageDBOwner function. Make any modifications there? Try sending $SQLQuery out to a file and check that it's valid and what you expect.