Today Siemens released an application example of how to connect to a MS SQL server with a S7-1500.
I haven't tested it, but from what I've seen I think it may also run on a S7-1200 with minor modifications:
https://support.industry.siemens.com/cs/document/109779336
Good find, sir! note on 1200 usage, from the documentation:
Under the following conditions, this module is also functional with an S7 1200 from firmware V4.4 or higher:
•Do not use the archive functionality
•Comment out program line 386 of the "LSql_Microsoft" block. To do this, open the block and click on "Edit type". Now find program line 386 with the "WriteToArrayDB" instruction and comment it out.