You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scripts/collector/sqlserver/instanceReview.ps1
+32-9Lines changed: 32 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,8 @@
37
37
Note the script will attempt to collect VM specs using the current users regardless. (default:false)
38
38
.PARAMETERuseWindowsAuthentication
39
39
Specifies if the loging to the database will utilize the current Windows Authenticated User or the supplied username / password for SQL Authentication (default:false)
40
+
.PARAMETERoutputDirectory
41
+
User specified output directory if desired to be different from the $PSScriptRoot default
40
42
.EXAMPLE
41
43
To use a specific username / password combination for a named instance:
42
44
instanceReview.ps1 -serverName [server name / ip address]\[instance name] -collectionUserName [collection username] -collectionUserPass [collection username password] -ignorePerfmon [true/false] -dmaManualId [string]
WriteLog -logLocation $foldername\$logFile-logMessage "Specified $outputDirectory is not valid. Zipping Output to default directory $PSScriptRoot\$zippedopfolder..."-logOperation "BOTH"
exec('INSERT INTO #serverProperties SELECT ''AvailabilityGroupCount'', ''0''');
263
+
ENDCATCH
258
264
exec('INSERT INTO #serverProperties SELECT ''HostPlatform'', ''Azure VM''');
259
265
exec('INSERT INTO #serverProperties SELECT ''HostDistribution'', ''Linux''');
260
266
exec('INSERT INTO #serverProperties SELECT ''HostRelease'', ''UNKNOWN''');
@@ -357,6 +363,7 @@ BEGIN
357
363
exec('INSERT INTO #serverProperties SELECT ''SQLServerMemoryTargetInMB'', CONVERT(NVARCHAR(255), committed_target_kb/1024) FROM sys.dm_os_sys_info /* SQL Server 2012 (11.x) above */');
358
364
/* Must Query a different column for committed memory in versions above 10.x */
359
365
exec('INSERT INTO #serverProperties SELECT ''TotalSQLServerCommittedMemoryMB'', CONVERT(NVARCHAR(255), committed_target_kb/1024) FROM sys.dm_os_sys_info')
366
+
exec('INSERT INTO #serverProperties SELECT ''AvailabilityGroupCount'', count(*) FROM sys.availability_groups /* SQL Server 2012 (11.x) and above */')
0 commit comments