File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -213,7 +213,10 @@ Function GenerateDDL-DB {
213213
214214 # Get some info on the SQL Server instance to include in the Babelfisn Compass report
215215 $SrvResourceTag = " SMO_DDL SQL Server info:" # do not change this string, or the variable name below!
216- $SQLSrvName = $ ($MyServer.NetName )
216+ $SQLSrvName = $ ($MyServer.NetName )
217+ if ($SQLSrvName -eq $null -or $SQLSrvName -eq ' ' ) {
218+ $SQLSrvName = $Servername
219+ }
217220 Write-Output " `n --SQL Server Information generated by SMO_DDL.ps1 (do not change these lines):`n " | Add-Content - Path $DDLFilename
218221 Write-Output " DECLARE @srvinfo VARCHAR(MAX)" | Add-Content - Path $DDLFilename
219222 Write-Output " SET @srvinfo = '$SrvResourceTag $ ( $SQLSrvName ) :Edition=$ ( $MyServer.Edition ) '" | Add-Content - Path $DDLFilename
You can’t perform that action at this time.
0 commit comments