Hi all,
We're currently using SQL Server Express that has a 10GB limit, and we're looking to automate the generation of the 'Disk Usage by Top Tables' standard report found within SQL Server Management Studio.
Using Telerik's JustDecompile, I managed to find the SQL for the standard report in the file 'Disk_Usage_Top_Objects.rdlc'. I've saved this as a variable within PowerShell.
However, when going to run it with the following command:
Powershell
Invoke-Sqlcmd-Query$SQLQquery-ServerInstance"Titian13\VEEAMSQL2012"-Database"VeeamBackup"
I receive the error:
Powershell
Anexpressionofnon-booleantypespecifiedinacontextwhereaconditionisexpected,near';'.Incorrectsyntaxnear';'.Incorrectsyntaxnearthekeyword'AS'.Msg4145,Level15,State1,Procedure,Line10.
I'm not sure why it'snotworking, considering it's...