Change the Report Datasource in SQL Server

If we deployed the reports on report manager and datasource is different then we need to point the datasource each and every report, using below script we can update the datasource on all reports. 
  1. USE ReportServer;  
  2. GO  
  3.   
  4. Update DataSource set Link = (select ItemID from Catalog where type=5) , name='TestDatasource'  
  5. where name = 'DataSourceTest' and Link is NULL;  
  6.   
  7. GO