-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDatabase Collation.ps1
More file actions
30 lines (21 loc) · 947 Bytes
/
Database Collation.ps1
File metadata and controls
30 lines (21 loc) · 947 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Get-Help TestDbaDatabaseCollation -ShowWindow
## Test a server
Test-DbaDatabaseCollation -SqlServer ''
## Only show teh mis matching databases
(Test-DbaDatabaseCollation -SqlServer '').Where{$_.IsEqual -eq $false}
## Detailed info
Test-DbaDatabaseCollation -SqlServer '' -Detailed
## Do thigns with results
## Output to a file
Test-DbaDatabaseCollation -SqlServer '' -Detailed |Out-File C:\Temp\CollationCheck.txt
## Output to CSV
Test-DbaDatabaseCollation -SqlServer '' -Detailed |Export-Csv C:\temp\CollationCheck.csv -NoTypeInformation
## Output to JSON
Test-DbaDatabaseCollation -SqlServer '' -Detailed | ConvertTo-Json | Out-file c:\temp\CollationCheck.json
## Look at the files
notepad C:\temp\CollationCheck.json
notepad C:\temp\CollationCheck.csv
notepad C:\temp\CollationCheck.txt
## Linux or SQL Auth
$cred = Get-Credential
Test-DbaDatabaseCollation -SqlServer LinuxvServer -Credential $cred -Detailed | Format-Table -AutoSize