I am having trouble getting the export tool to work:
Setup Details:
BTS SQL Server name: WAV-PWTSQL
BTS Database name: BentleyTransmittalServerDB
PW SQL server name: WAV-PWSQL
PW SQL Database name: PWDATA
User: msaxon.adm – has access to the two SQL databased in question, am logged on to integration server as msaxon.adm
Folder nominated for export and containing the supplied scripts - g:\BTSExport\
Powershell run from Integration server.
Script:
g:\BTSExport\BTS_Export.ps1 -btsDbConnectionString “Server=WAV-PWTSQL;Database=BentleyTransmittalServerDB; Trusted_Connection=True;”
-pwDbConnectionString “Server=WAV-PWSQL;Database=PWDATA;UserId=msaxon.adm;Password=************;” -tryComAutofit
It runs the first half of the script and then prompts me:
PS G:\btsexport> g:\BTSExport\BTS_Export.ps1 -btsDbConnectionString “Server=WAV-PWTSQL;Database=BentleyTransmittalServerDB; Trusted_Connection=True;”-pwDbConnectionString “Server=WAV-PWSQL;Database=PWDATA;UserId=msaxon.adm;Password=*************;” -tryComAutofitcmdlet BTS_Export.ps1 at command pipeline position 1Supply values for the following parameters:
If I then manually enter the -pwDbConnectionString I get
Exception calling ".ctor" with "1" argument(s): "Keyword not supported: '“server'."At G:\BTSExport\BTS_Export.ps1:132 char:5+ $pwDbConnection = [System.Data.SQLClient.SQLConnection]::new($pwD ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : ArgumentException You cannot call a method on a null-valued expression.At G:\BTSExport\BTS_Export.ps1:137 char:1+ $pwDbConnection.Open()+ ~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull No connection to the database detected. Run command ConnectToDB first.At G:\BTSExport\BTS_Export.ps1:51 char:13+ Throw "No connection to the database detected. Run comman ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (No connection t...nectToDB first.:String) [], RuntimeException + FullyQualifiedErrorId : No connection to the database detected. Run command ConnectToDB first.
Hi Matthew,For question about the ProjectWise scripts, please post your question to the ProjectWise Content management - Projectwise PowerShell extensions Forum as mentioned below:
https://communities.bentley.com/products/projectwise/content_management/f/343592#pi20290=1