Using a script to enable tag history and setting the database

Post code, not pictures of code, it helps others while troubleshooting. Please see Wiki - how to post code on this forum. You can edit your post by clicking the pencil icon in the lower right.

Have you confirmed that the rest of your changes are being applied? Or is the script failing entirely? Have you confirmed that the history provider that you are specifying actually exists as a history provider in your gateway?