SQL connection done

With above code, it is able to connect to SQL, automatically get the current active partition and output the content needed to construct a Syslog message.