Hi
with inspec we can write
sql = mssql_session(user: ‘my_user’, password: ‘password’)
describe sql.query(“SELECT SERVERPROPERTY(‘ProductVersion’) as result”).row(0).column(‘result’) do
its(“value”) { should cmp > ‘12.00.4457’ }
endref:https://www.inspec.io/docs/reference/resources/mssql_session/
Is there a similar elegant way of using something like mssql_session in a chef recipe to run transact-sql command to configure a MSSQL server ?
if not what’s the best way to do the same in a chef recipe? is running sql scripts from a template to power shell session the only way any help appreciated!