We have successfully creating a first time backup with the command: New-D365Bacpac -ExportModeTier1 -BackupDirectory J:\MSSQL_BACKUP -NewDatabaseName BaseLine -BacpacFile "J:\MSSQL_BACKUP\BaseLine_20211202.bacpac" -Verbose
If we run it a second time it fails:
VERBOSE: [08:12:33][Invoke-TimeSignal] The command 'New-D365Bacpac' was already taking part in time measurement. The
entry has been update with current date and time.
VERBOSE: [08:12:33][Test-TrustedConnection] Capabilities based on the centralized logic in the psm1 file.
VERBOSE: [08:12:33][New-D365Bacpac] Invoking the Tier 1 - SQL backup & restore process
VERBOSE: [08:12:33][Get-SQLCommand] Building the SQL connection string.
VERBOSE: [08:14:17][Invoke-SqlBackupRestore] Total time spent inside the function was 00:01:43.4071232
VERBOSE: [08:14:17][New-D365Bacpac] Invoking the Tier 1 - Clear SQL objects
VERBOSE: [08:14:17][Get-SQLCommand] Building the SQL connection string.
[08:14:17][Get-SQLCommand] Something went wrong while working with the sql server connection objects | Exception setting "ConnectionString": "The value's length for key 'password' exceeds it's limit of '128'."
WARNING: [08:14:17][Get-SQLCommand] Stopping because of errors
The property 'CommandText' cannot be found on this object. Verify that the property exists and can be set.
At line:4107 char:5
[08:14:17][Invoke-ClearSqlSpecificObjects] Something went wrong while clearing the SQL specific objects in the database. | You cannot call a method on a null-valued expression.
WARNING: [08:14:17][Invoke-ClearSqlSpecificObjects] Stopping because of errors. | Something went wrong while clearing
the SQL specific objects in the database.
You cannot call a method on a null-valued expression.
At line:4126 char:13
Stop-PSFFunction : Something went wrong while clearing the SQL specific objects in the database.
At line:4121 char:9
Stop-PSFFunction -Message "Stopping because of errors." -Exce ...
+ CategoryInfo : InvalidOperation: (:) [Write-Error], Exception
+ FullyQualifiedErrorId : d365fo.tools_Invoke-ClearSqlSpecificObjects,Stop-PSFFunction
You cannot call a method on a null-valued expression.
At line:4112 char:9
Stop-PSFFunction : Something went wrong while removing the Database.
At line:27590 char:9
Stop-PSFFunction -Message "Stopping because of errors." -Exce ...
+ CategoryInfo : NotSpecified: (:) [Write-Error], Exception
+ FullyQualifiedErrorId : d365fo.tools_Remove-D365Database,Stop-PSFFunction
Exception calling "KillAllProcesses" with "1" argument(s): "Drop all active database connections failed for Server
'dev1537729b16-1'. "
At line:27580 char:13
Stop-PSFFunction : Something went wrong while clearing the SQL specific objects in the database.
At line:4121 char:9
Stop-PSFFunction -Message "Stopping because of errors." -Exce ...
+ CategoryInfo : InvalidOperation: (:) [Write-Error], Exception
+ FullyQualifiedErrorId : d365fo.tools_Invoke-ClearSqlSpecificObjects,Stop-PSFFunction
You cannot call a method on a null-valued expression.
At line:4112 char:9
Stop-PSFFunction : Something went wrong while clearing the SQL specific objects in the database.
At line:4121 char:9
Stop-PSFFunction -Message "Stopping because of errors." -Exce ...
+ CategoryInfo : InvalidOperation: (:) [Write-Error], Exception
+ FullyQualifiedErrorId : d365fo.tools_Invoke-ClearSqlSpecificObjects,Stop-PSFFunction
You cannot call a method on a null-valued expression.
At line:4112 char:9
We have successfully creating a first time backup with the command: New-D365Bacpac -ExportModeTier1 -BackupDirectory J:\MSSQL_BACKUP -NewDatabaseName BaseLine -BacpacFile "J:\MSSQL_BACKUP\BaseLine_20211202.bacpac" -Verbose
If we run it a second time it fails:
VERBOSE: [08:12:33][Invoke-TimeSignal] The command 'New-D365Bacpac' was already taking part in time measurement. The entry has been update with current date and time. VERBOSE: [08:12:33][Test-TrustedConnection] Capabilities based on the centralized logic in the psm1 file. VERBOSE: [08:12:33][New-D365Bacpac] Invoking the Tier 1 - SQL backup & restore process VERBOSE: [08:12:33][Get-SQLCommand] Building the SQL connection string. VERBOSE: [08:14:17][Invoke-SqlBackupRestore] Total time spent inside the function was 00:01:43.4071232 VERBOSE: [08:14:17][New-D365Bacpac] Invoking the Tier 1 - Clear SQL objects VERBOSE: [08:14:17][Get-SQLCommand] Building the SQL connection string. [08:14:17][Get-SQLCommand] Something went wrong while working with the sql server connection objects | Exception setting "ConnectionString": "The value's length for key 'password' exceeds it's limit of '128'." WARNING: [08:14:17][Get-SQLCommand] Stopping because of errors The property 'CommandText' cannot be found on this object. Verify that the property exists and can be set. At line:4107 char:5
[08:14:17][Invoke-ClearSqlSpecificObjects] Something went wrong while clearing the SQL specific objects in the database. | You cannot call a method on a null-valued expression. WARNING: [08:14:17][Invoke-ClearSqlSpecificObjects] Stopping because of errors. | Something went wrong while clearing the SQL specific objects in the database. You cannot call a method on a null-valued expression. At line:4126 char:13
You cannot call a method on a null-valued expression. At line:4129 char:9
The output of $error:
You cannot call a method on a null-valued expression. At line:4129 char:9
You cannot call a method on a null-valued expression. At line:4126 char:13
Stop-PSFFunction : Something went wrong while clearing the SQL specific objects in the database. At line:4121 char:9
The property 'CommandText' cannot be found on this object. Verify that the property exists and can be set. At line:4107 char:5
Stop-PSFFunction : Stopping because of errors At line:2994 char:9
Stop-PSFFunction : Something went wrong while removing the Database. At line:27590 char:9
Remove-D365Database : A parameter cannot be found that matches parameter name 'Name'. At line:1 char:21
You cannot call a method on a null-valued expression. At line:4129 char:9
You cannot call a method on a null-valued expression. At line:4126 char:13
Stop-PSFFunction : Something went wrong while clearing the SQL specific objects in the database. At line:4121 char:9
The property 'CommandText' cannot be found on this object. Verify that the property exists and can be set. At line:4107 char:5
Stop-PSFFunction : Stopping because of errors At line:2994 char:9
You cannot call a method on a null-valued expression. At line:4129 char:9
You cannot call a method on a null-valued expression. At line:4126 char:13
Stop-PSFFunction : Something went wrong while clearing the SQL specific objects in the database. At line:4121 char:9
The property 'CommandText' cannot be found on this object. Verify that the property exists and can be set. At line:4107 char:5
Stop-PSFFunction : Stopping because of errors At line:2994 char:9