Commit cd63a61
Export-DbaUser - Use server version instead of db compat level for scripting
When no -DestinationVersion is specified, use the actual SQL Server instance
version (VersionMajor) rather than the database compatibility level as the
SMO scripting target. This fixes an error where databases on newer SQL Server
instances (e.g., 2022) with a lower compatibility level (e.g., 120/SQL2014)
could not export users that use features not available at the compat level,
such as External users introduced in SQL Server 2016.
Fixes #10343
(do Export-DbaUser)
Co-authored-by: Andreas Jordan <andreasjordan@users.noreply.github.com>1 parent 74a2d1a commit cd63a61
1 file changed
Lines changed: 26 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
219 | 234 | | |
220 | 235 | | |
221 | 236 | | |
| |||
232 | 247 | | |
233 | 248 | | |
234 | 249 | | |
235 | | - | |
236 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
237 | 261 | | |
238 | 262 | | |
239 | 263 | | |
| |||
0 commit comments