Solution:
1. Double check the script is been run with STAT schema, not SYSTEM nor SYS. You MUST use the STAT credential in order to run the scripts.
2. If issues persist, you would need to review the permissions and grants given to the STAT user account, most likely we don't have enough privileges.
Other prerequisites for running this script is the following:
-- ** - First verify the Initialization Parameter nls_length_semantics is set to CHAR (not the default of BYTE)
-- ** -- select * from v$nls_parameters where PARAMETER='NLS_LENGTH_SEMANTICS';
-- ** and the Character Sets should be set to Unicode (Database Character Set AL32UTF8) National Character Set AL16UTF16
-- ** - If running Oracle 12c, the SQLNET_ALLOWED_LOGON_VERSION parameter should be set in your Oracle 12c server's
-- ** SQLNET.ORA file to values that matches the minimum version supported in the system
-- ** for the Stat Oracle Agent to start successfully