What’s New #
Starting in 1.31, the application can update itself by running sqldsc update
.
BETA: 1.37.15 (16 November 2020) #
- Improved SQL Server Agent job schedules and steps including weekly jobs
- Can
capture_output
of job steps - Made field names for Logins consistent in
login
blocks - Added
agent
resource block to set job history step retention
1.37.11 (11 November 2020) #
- Resource blocks now merge instead of overwriting previous blocks. Please see Resource Block Precendence
- Added
user_databases
blocks to the PRO Edition - Added
login
blocks to the PRO Edition - Added
variables
to the PRO Edition
1.36.2 (10 October 2020) #
- BREAKING CHANGE: How roles are processed has changed. Please see Roles
1.35.1 (18 September 2020) #
- Improve handling of resource blocks
- Breaking changes to
server_role_member
andserver_permission
schemas. Please see Resource Block Schema
1.35 (14 September 2020) #
- Add support for schemas
- Add support for schema permissions
1.34 (10 September 2020) #
- Start support for Azure “SQL Databases”. Please see the Azure section. Only those resources listed in the Azure section have been tested against Azure SQL Databases.
- Add limited support for SQL Server Agent Jobs. Please see the Resource Block Schema section.
- Add support for Database Roles. Please see the Resource Block Schema section.
1.32.5 (4 July 2020) #
- The application logging format has changed to make it easier to read. Please install the NDJSON Colorizer to better view the logs. There’s also a way to dump logs for inclusion in change control documents. See Logging
- Targets support SQL Server logins. Please see the section on Targets
- Targets can define
roles
which override the default Roles oradded_roles
which add to the default Roles. Please see Roles for more details. - Both test and apply stop processing on errors. Originally they would stop the current target but process other targets. However the safest action is to stop immediately if there’s a problem. If the
test
is running multi-threaded, each thread will finish its target but won’t start new a one. - Testing a password in the Vault can test both passwords and password hashes.
1.32.2 (22 June 2020) #
- Improved handling of SQL Server logins. See SQL Server Logins for details.
- Capture and reuse SIDs
- Store hashed passwords in the Credential Vault
- Get the SID and hashed password from an existing login
- If a database isn’t writeable, any changes for that database are silently skipped.
1.31.2 (19 June 2020) #
- The application checks if a user is in the
sysadmin
role. If they are not, the target is skipped. This better supports running with two different accounts. - The PRO edition can configure the multi-threaded settings using a settings file. Please see the Application Settings section.
- The application can update itself by running
sqldsc update
. If there is a newer version, it will prompt you to install it. sqldsc init
will create a.vscode
directory with the suggested extensions.
1.31 (31 May 2020) #
- Add a
--parallel
flag for the PRO. This sets the number of testing threads equal to the number of targets. Applying is always done sequentially.
1.27 (5 May 2020) #
- Better permissions when you init a new directory structure
- Improved error handling and reporting
1.26 (4 May 2020) #
- Previously, when running,
sqldsc apply
, all servers are first tested, then all servers go through the apply phase. Now, only those servers that indicate a change will go through the apply phase. This can be overridden with the--applyall
flag. This flag forces all servers to go through the apply phase. - If the PRO features are enabled (see the README_Pro), the
--threads
flag will allow you to set the number of concurrent threads that will be used for the test phase. The apply phase is always done single-threaded.
1.25 (28 April 2020) #
sqldsc info
prints a summary table that lists the target files and target counts and the resource files and resource counts
1.24.1 (26 April 2020) #
- Logging is now is written to individual files in a dir tree: YYYY/sqldsc_YYYY_01_Domain_User.log. This should prevent duplicates and eliminate the need to merge files.
1.23 (24 April 2020) #
- Cleaned up logging. There are now three levels that provide increased detail: Verbose, then Debug, then Trace. Verbose is really just printing the SQL statements.
- Add
expected_rows
to thesql_script
resource. If thetest_query
returns a different number of rows than this, the script will be run. - Add properties for
target
for dial timeout and connect timeout. - Add a
target_defaults
block to set defaults for all targets in the file.
1.22 (22 April 2020) #
- Resource Blocks now overwrite previous definitions. Prior to this they would be merged. It’s just too complicated to figure out where different settings come from in files. For example, assume you define a database resource for a “DBA” database in defaults.hcl. Then in a node-specific configuration file, you define a “DBA” database with a different set of properties. The later more specific resource will now completely overwrite the newer resource. That newer resource will then be applied to the database.
1.21 (19 April 2020) #
- Assorted bug fixes and package updates
1.20.1 (17 April 2020) #
- Add an
object_permission
resource to set permissions on database objects
1.18 (12 April 2020) #
- The
sql_file
resource has been renamed tosql_script
. Please rename thesql
directory directory toscripts
. The attribute names have also changed. Please see the schema document. - If no
ensure
attribute is found, default topresent
. - For logins, if no
name
attribute is found, default to the Resouce Name. - For agent operators, if no
name
attribute is found, default to the Resouce Name. - For databases, if no
name
attribute is found, default to the Resouce Name. - For configurations, if no
name
attribute is found, default to the Resouce Name.
1.17 (9 April 2020) #
- Add
database_permission
resource blocks - Fix messages on existing user when changing database owner
- Generate error if the same resource is defined twice in a single file
- Moved the Resource Block schema to a separate document
- In the
sql_file
resource, the file name is justfile
instead offile_name
1.16 (4 April 2020) #
- Add
database_role_member
resource blocks - Clean up attribute names so that a “_name” suffix isn’t requried for SQL Server objects such as logins and roles
1.0.15 (24 March 2020) #
- Add
vault
to store encrypted passwords locally - Add attributes to the
login
resource including the SID, expiration check, policy check, and default database. - Add a
sql_file
resource to create common procedures or objects on servers - Add
database_user
resource - Add syntax check for .hcl files at the start of processing
- Switched SQL Server drivers. If you experience connectivity issues, please contact me
1.0.14 (15 March 2020) #
- Moved the audit logs to a
logs
directory - Allow single backslashes in server and login names
- A Test is run before Applying unless you specify the –confirm flag
1.0.12 (14 March 2020) #
- The message and SQL script are printed before executing
- Important strings are trimmed
- Switched the instance filter to a target filter
1.0.11 (8 March 2020) #
- Add
server_role_member
resource - Add domain filtering for Professional edition
- Add domian targets for Professional edition
- Switch to
defaults.hcl
1.0.10 (3 March 2020) #
- Add role filtering for Professional edition
- Add instance filtering