Skip to content

Commit ac27cfc

Browse files
committed
Merge pull request #66 from jbondpdx/master
DOC-1510: edit tsql additions
2 parents 4684578 + 27c79e3 commit ac27cfc

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

README.md

+11-8
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,21 @@ sqlserver::login{'WIN-D95P1A3V103\localAccount':
9595
}
9696
```
9797

98-
###To run custom TSQL statements
98+
###To run custom TSQL statements:
99+
100+
To use `sqlserver_tsql` to trigger other classes or defined types:
99101

100-
To use `sqlserver_tsql` as a trigger to other defined types in order to trigger other workflows
101102
```
102103
sqlserver_tsql{ 'Query Logging DB Status':
103104
instance => 'MSSQLSERVER',
104105
onlyif => "IF (SELECT count(*) FROM myDb.dbo.logging_table WHERE
105106
message like 'FATAL%') > 1000 THROW 50000, 'Fatal Exceptions in Logging', 10",
106-
notify => Exec['To Many Fatal Errors']
107-
}
107+
notify => Exec['Too Many Fatal Errors']
108+
}
108109
```
109110

110-
It can also be used to help clean up regular logs with conditional checks
111+
To clean up regular logs with conditional checks:
112+
111113
```
112114
sqlserver_tsql{ 'Cleanup Old Logs':
113115
instance => 'MSSQLSERVER',
@@ -117,7 +119,8 @@ sqlserver_tsql{ 'Cleanup Old Logs':
117119
}
118120
```
119121

120-
In the event you want something to always execute you can also leave the `onlyif` parameter out and have it execute every time
122+
If you want something to always execute, you can leave out the `onlyif` parameter:
123+
121124
```
122125
sqlserver_tsql{ 'Always running':
123126
instance => 'MSSQLSERVER',
@@ -170,9 +173,9 @@ Terminology differs somewhat between various database systems; please refer to t
170173
* `sql_sysadmin_accounts`: The Windows or SQL account(s) to provision as SQL Server system administrators.
171174

172175
####sqlserver_tsql
173-
* `command`: TSQL to execute on a potentially conditional basis
176+
* `command`: The TSQL statement to execute.
174177
* `onlyif`: TSQL to execute as a check to see if we should proceed and run the command parameter, should encounter a throw or error to trigger
175-
* `instance`: SQL Server instance that we should execute against
178+
* `instance`: The SQL Server instance you want to execute against.
176179

177180
### Defined Types
178181

0 commit comments

Comments
 (0)