I am attempting to automate the installation of SQL Server 2016 Express.
I have a chef cookbook to install SQL Server Express using the chocolatey package.
The same command as a chef resource
chocolatey_package 'sql-server-express' do
action :install
options '--cachelocation c:\temp\choco'
end
Equivalent PowerShell command
choco install sql-server-express --cachelocation c:\temp\choco
If I install SQL Server Express normally with the install wizard, I can authenticate and create / modify databases no problem.
If I install SQL Server Express with chocolatey / chef, I am not able to create or modify databases.
The error when trying to create a new database
CREATE DATABASE permission denied in database 'master'
The error when trying to modify an existing database
The server principal "Foo\Bar" is not able to access the database "foobar" under the current security context
I've tried logging in as the 'sa' user. mixed authentication is not enabled, and I can't enable it.
How can I get chocolatey installations of SQL Server Express users the same as a normal installation?