GenerateDatabaseCreationScript -- error #7385
Unanswered
birojnayak
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Experts,
We are working on a an automation to upgrade SQL Server from 2012 - 2016 (inplace). The problem that we see is mentioned here https://blog.sqlauthority.com/2015/09/25/sql-server-failed-rule-valid-dsn-and-valid-database-compatibility-level-and-successful-connection/ . But the solution is manual and we are trying to automate. We are trying to use WmiObject to generate RS DB script in below way, but the GenerateDatabaseCreationScript throwing error "Failed to generate the database creation script from the report server using WMI. Errorcode: -2147023181" . Any insight on this would be helpful ? Else if there is a script in this repo which can solve this problem, please point me in that direction.
'
function Get-ConfigSet()
{
return Get-WmiObject –namespace "root\Microsoft\SqlServer\ReportServer\RS_MSSQLSERVER\v12\Admin" `
-class MSReportServer_ConfigurationSetting -ComputerName localhost
}
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
$configset = Get-ConfigSet
$result = $configset.GenerateDatabaseCreationScript("Report Server", 1033, $false)
'
Beta Was this translation helpful? Give feedback.
All reactions