@@ -95,19 +95,21 @@ sqlserver::login{'WIN-D95P1A3V103\localAccount':
95
95
}
96
96
```
97
97
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:
99
101
100
- To use ` sqlserver_tsql ` as a trigger to other defined types in order to trigger other workflows
101
102
```
102
103
sqlserver_tsql{ 'Query Logging DB Status':
103
104
instance => 'MSSQLSERVER',
104
105
onlyif => "IF (SELECT count(*) FROM myDb.dbo.logging_table WHERE
105
106
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
+ }
108
109
```
109
110
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
+
111
113
```
112
114
sqlserver_tsql{ 'Cleanup Old Logs':
113
115
instance => 'MSSQLSERVER',
@@ -117,7 +119,8 @@ sqlserver_tsql{ 'Cleanup Old Logs':
117
119
}
118
120
```
119
121
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
+
121
124
```
122
125
sqlserver_tsql{ 'Always running':
123
126
instance => 'MSSQLSERVER',
@@ -170,9 +173,9 @@ Terminology differs somewhat between various database systems; please refer to t
170
173
* ` sql_sysadmin_accounts ` : The Windows or SQL account(s) to provision as SQL Server system administrators.
171
174
172
175
####sqlserver_tsql
173
- * ` command ` : TSQL to execute on a potentially conditional basis
176
+ * ` command ` : The TSQL statement to execute.
174
177
* ` 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.
176
179
177
180
### Defined Types
178
181
0 commit comments