What are the challenges you face when working across database platforms? Take the survey
Options

Quick PowerShell hack to view IncludeObjectsInDataSync

MondayMonday Posts: 77 Silver 3
edited February 19, 2019 6:31PM in SQL Change Automation
We have a need to view which tables are set to include data and the current UI is awful for finding this in visual studio. I opened a user voice for this  but until this is implemented, here is a quick powershell script to display in a gidview which can be filtered, sorted, etc,

$Path = 'C:\DEV\EAM_DB_SQLChangeAutomation\EAM_DB_SQLChangeAutomation\EAM_DB_SQLChangeAutomation.sqlproj'

$xml = [xml](get-content $Path)

$attr = $xml.GetElementsByTagName('IncludeObjectsInDataSync') |Select-Object
$test = $attr.'#text'.replace("Table=","").replace(";","").Split([Environment]::NewLine::RemoveEmptyEntries) | Sort-Object
$test.Where({ $_ -ne "" }) | Out-GridView -Title "IncludeObjectsInDataSync"


Sign In or Register to comment.