Forum Discussion
How to migrate SSRS reports to Power BI Report Server?
Using the source server url, Please run the Powershell script on the source server and see it works. It should work.
It may sound repeatitive task, but want to check the source server, powershell works fine.
$ReportServerUri = 'http://<your report server>/Reports/ReportService2010.asmx'
$SourceFolderPath = '/' # Replace with the folder path you have access. without "/" at the end, Say /BI_Finance
$items = $null
$Proxy = $null
$Proxy = New-WebServiceProxy -Uri $ReportServerUri -Namespace SSRS.ReportingService2010 -UseDefaultCredential
$items = $Proxy.ListChildren($sourceFolderPath, $true) | Select-Object Type, Path, Name
if ($items -eq $null) {
Write-Host "No Items found!"
}
else {
$items
}
# ------------------------------------
Write-Host "----------------------------------"
Write-Host "ReportServerUri: " $ReportServerUri
Write-Host "SourceFolderPath: " $SourceFolderPath
Write-Host "----------------------------------"
Write-Host "Proxy: " $Proxy
Write-Host "----------------------------------"
Write-Host "Items:"
$items
Write-Host "----------------------------------"
When you repeat the same from target server, and using the source server URL, it will fail, based on your previous posts. If this is true, please let me know. This indicates that target server cannot access the source server.
Okay, I tested the script again.
Public Sub Main()
DIM results as String
TRY
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
results = rs.GetReportServerConfigInfo("FALSE")
Console.WriteLine(results)
Catch e As IOException
Console.WriteLine(e.Message)
End Try
End SubAnd the result is successful.
However, when I ran the actual migration script, I got this.
I don't think it the issue is low disk since it still shows 15GB free space on the hard drive and the reports are not that much. As for the connection failure, I'm not sure if it's referring to failing to connect to source server or target. Also, do I need to change the folder name on either source or target? It's now set to /ReportServer/ instead of /Budget/.
- sevenhills4 years ago
Super User
A) I cannot read the image ... not sure what is the error
B) Can you check the Event viewer logs on both servers and SSRS logs (%ProgramFiles%\Microsoft SQL Server\MSSQL.x\Reporting Services\LogFiles) and see anything
C) Let us do one more thing, try to get the reports to your local computer and see the source server is good ...
Out-RsFolderContent -Proxy $proxy -RsFolder "/Budget" -Destination 'C:\SSRS_Out' -RecurseIf you see the reports, datasources as files ... that means the source server is exporting properly.
- lorcz4 years ago
Helper I
A: I think if you clicked on the image, it'll zoom in for you. But here's the error.
Retrieve and report the list of items that will be migrated. You can cancel the script after step 1 if you do not want to start the actual migration.
Retrieving schedules:
Unhandled exception:
An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database.B: I don't think this log message is related to the issue but here's the log.
On the source: "C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\LogFiles\RSHostingService_2022_05_20_00_00_00.log"
2022-05-20 11:24:29.0347|INFO|51|Deleting expired log file: C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\LogFiles\RSPortal_2022_04_29_04_55_26.log Last written: 4/29/2022 4:55:26 AM
2022-05-20 11:24:29.0347|WARN|51|Exception deleting expired log fileSystem.IO.IOException: The process cannot access the file 'C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\LogFiles\RSPortal_2022_04_29_04_55_26.log' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at Microsoft.BIServer.HostingEnvironment.Logger.DeleteExpiredFilesInternal(Int32 keepUntilDays, FileInfo[] logFiles)
2022-05-20 11:24:39.0569|INFO|22|Deleting expired log file: C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\LogFiles\RSPortal_2022_04_29_04_55_26.log Last written: 4/29/2022 4:55:26 AM
2022-05-20 11:24:39.0569|WARN|22|Exception deleting expired log fileSystem.IO.IOException: The process cannot access the fileOn the target: "C:\Program Files\Microsoft Power BI Report Server\PBIRS\LogFiles\RSHostingService_2022_05_20_00_00_03.log"
2022-05-20 11:24:26.1215|INFO|58|Catalog max connection pool size: 100
2022-05-20 11:24:26.1215|INFO|58|Deleting expired log file: C:\Program Files\Microsoft Power BI Report Server\PBIRS\LogFiles\msmdsrv.log Last written: 5/3/2022 1:09:34 PM
2022-05-20 11:24:26.1371|WARN|58|Exception deleting expired log fileSystem.IO.IOException: The process cannot access the file 'C:\Program Files\Microsoft Power BI Report Server\PBIRS\LogFiles\msmdsrv.log' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at Microsoft.BIServer.HostingEnvironment.Logger.DeleteExpiredFilesInternal(Int32 keepUntilDays, FileInfo[] logFiles)
2022-05-20 11:24:36.1625|INFO|58|Catalog max connection pool size: 100
2022-05-20 11:24:36.1782|INFO|58|Deleting expired log file: C:\Program Files\Microsoft Power BI Report Server\PBIRS\LogFiles\msmdsrv.log Last written: 5/3/2022 1:09:34 PM
2022-05-20 11:24:36.1782|WARN|58|Exception deleting expired log fileSystem.IO.IOException: The process cannot access the fileC: Do I simply run this code in PowerShell on the source server?
Out-RsFolderContent -Proxy $proxy -RsFolder "/Budget" -Destination 'C:\SSRS_Out' -Recurse - sevenhills4 years ago
Super User
Related to (A) and (B) it needs some attention, looks like something is going on. you need to check the logs (Event viewer, PBIRS logs)
Related to (C), you need to use the before powershell code and this line ... executing alone that line wont work.
$ReportServerUri = 'http://db22/ReportServer/ReportService2010.asmx' $SourceFolderPath = '/Budget' $Proxy = $null $Proxy = New-WebServiceProxy -Uri $ReportServerUri -Namespace SSRS.ReportingService2010 -UseDefaultCredential Out-RsFolderContent -Proxy $proxy -RsFolder "/Budget" -Destination 'C:\SSRS_Out' -RecurseIdea is to get all the report server content to a local drive and test it works or not.
If this works, atleast you can take a backup or get a copy of all reports, datasets, datasources and more from the source.
- lorcz4 years ago
Helper I
Okay, finally have the time to work on this issue again.
This is the error I got from this execution.
I'm curious, how does it know which server to grab/copy the "Budget" report from if I'm not specifying the server name in this script?