Hi.
We have many legacy reports that have not been executed in a long time. I can find these from a persisted version of the ExecutionLogStorage table (or the fact that they are not in there at all but are in the catalog table).
I have tested then renaming these with a TOBEDELETED_YYYYMMDD suffix, as simply as this:
UPDATE
ReportServer.dbo.catalog
SET name = name + '_TOBEDELETED_20210309' , path = Path +'_TOBEDELETED_20210309'
--- where ......
This appears to work completely fine. The reports appear in the SSRS web app with the new names and still run fine. The idea is that in 6 months time I will use a PowerShell script to permanently delete these reports.
Can anyone see any potential problems with this approach? Thanks!
PS. Have more recently spotted (using SQL Profiler when renaming a report from the front end) this proc: ReportServer..MoveObject:
EXECUTE @RC = [dbo].[MoveObject]
@OldPath
,@OldPrefix
,@NewName
,@NewPath
,@NewParentID
,@RenameOnly
,@MaxPathLength
Any thoughts on using that instead?
Lastly PowerSell does not seem to support the MoveItem method, but DotNet does (https://learn.microsoft.com/en-us/dotnet/api/reportservice2010.reportingservice2010.moveitem?redirectedfrom=MSDN&view=sqlserver-2016#ReportService2010_ReportingService2010_MoveItem_System_String_System_String_)
Is anyone aware if I am wrong about this and rename is possible through PowerShell? Thanks