d365collaborative / d365fo.tools

Tools used for Dynamics 365 Finance and Operations
MIT License
246 stars 101 forks source link

New-D365Bacpac clearing the azure specific objects in the database #438

Closed kai74 closed 3 years ago

kai74 commented 4 years ago

I get the following error when creating a new bacpac file.
Installed product version : 10.0.10 (10.0.420.20010) Installed platform version : Update34 (7.0.5600.41444)

[10:39:28][Invoke-ClearAzureSpecificObjects] Something went wrong while clearing the Azure specific objects in the database. | Exception calling "ExecuteNonQuery" with "0" argument(s): "Invalid object name 'sysglobalconfiguration'." WARNING: [10:39:28][Invoke-ClearAzureSpecificObjects] Stopping because of errors. | Something went wrong while clearing the Azure specific objects in the database.

Splaxi commented 4 years ago

Hi @kai74,

Could you share the command that you executed, along what type of environment are you running on?

kai74 commented 4 years ago

Hi Mötz

New-D365Bacpac -ExportModeTier2 -SqlPwd xxxxxxxx -SqlUser sqladmin -BacpacFile D:\DB_backup\update2devdb.bacpac -DatabaseName xxxxxx -update_axdw_XXXXXXXXX4ec4d6 -DatabaseServer xxxxx-update-appdbserver-XXXXXXX7.database.windows.net -EnableException -NewDatabaseName update2devdb1 -ShowOriginalProgress -Verbose

Best regards Kai

Den fre. 12. jun. 2020 kl. 16.14 skrev Mötz Jensen <notifications@github.com

:

Hi @kai74 https://github.com/kai74,

Could you share the command that you executed, along what type of environment are you running on?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/d365collaborative/d365fo.tools/issues/438#issuecomment-643292625, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOL2IWOEJAHCHSCC5OVINDRWIZ5XANCNFSM4N4GT5XQ .

Splaxi commented 4 years ago

Hi @kai74,

Did you try to use the LCS API to export the bacpac file from your Tier2?

I'll look into the code and get back to you.

kai74 commented 4 years ago

Yes, I did. but it didn't work. I think the size is too big. Works for 15 hours and then stops. Preparation failed

Same happens every time I do it from LCS. :) Thanks for helping:-)

Best regards Kai

Den lør. 13. jun. 2020 kl. 17.36 skrev Mötz Jensen <notifications@github.com

:

Hi @kai74 https://github.com/kai74,

Did you try to use the LCS API to export the bacpac file from your Tier2?

I'll look into the code and get back to you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/d365collaborative/d365fo.tools/issues/438#issuecomment-643639491, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOL2IT3FGVYGQHCSCET7YLRWOMGPANCNFSM4N4GT5XQ .

Splaxi commented 4 years ago

So the error message itself states that the table dbo.SysGlobalConfiguration doesn't exists.

Can you see that a new database is created next to the original database?

Are you able to connect to both the original database via SSMS and the newly created database also via SSMS?

There has been a lot changes for the last year or so, and one of them are moving the databases onto what Microsoft calls SPARTAN. If you are moved to SPARTAN, you can't create a copy of your database or you shouldn't be able to at least.

I just tried to access the database across some of my customers and they are all running PU33 or lower, so it is not a perfect test. But the test shows that they all still contain the dbo.SysGlobalConfiguration table.

Our code tries to cleanup some stuff in the database, to make sure it is prepped and ready for import into a Tier1.

Something that you can try, is the following:

New-D365Bacpac 
-ExportModeTier2 
-SqlPwd xxxxxxxx 
-SqlUser sqladmin
-BacpacFile D:\DB_backup\update2devdb.bacpac 
-DatabaseName xxxxxx-update_axdw_XXXXXXXXX4ec4d6 
-DatabaseServer xxxxx-update-appdbserver-XXXXXXX7.database.windows.net 
-ExportOnly
-EnableException
-ShowOriginalProgress 
-Verbose

-ExportOnly will export the database as is into a bacpac file. Then we can do some magic on the Tier1 when we get it imported.

kai74 commented 4 years ago

Hi Mötz

Spartan is the problem:) So I can't use this function. ;-(

Think we can close this issue.

Thanks for all help

Best regards Kai

Den man. 15. jun. 2020 kl. 08.44 skrev Mötz Jensen <notifications@github.com

:

So the error message itself states that the table dbo.SysGlobalConfiguration doesn't exists.

Can you see that a new database is created next to the original database?

Are you able to connect to both the original database via SSMS and the newly created database also via SSMS?

There has been a lot changes for the last year or so, and one of them are moving the databases onto what Microsoft calls SPARTAN. If you are moved to SPARTAN, you can't create a copy of your database or you shouldn't be able to at least.

I just tried to access the database across some of my customers and they are all running PU33 or lower, so it is not a perfect test. But the test shows that they all still contain the dbo.SysGlobalConfiguration table.

Our code tries to cleanup some stuff in the database, to make sure it is prepped and ready for import into a Tier1.

Something that you can try, is the following:

New-D365Bacpac -ExportModeTier2 -SqlPwd xxxxxxxx -SqlUser sqladmin -BacpacFile D:\DB_backup\update2devdb.bacpac -DatabaseName xxxxxx-update_axdw_XXXXXXXXX4ec4d6 -DatabaseServer xxxxx-update-appdbserver-XXXXXXX7.database.windows.net -ExportOnly -EnableException -ShowOriginalProgress -Verbose

-ExportOnly will export the database as is into a bacpac file. Then we can do some magic on the Tier1 when we get it imported.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/d365collaborative/d365fo.tools/issues/438#issuecomment-643935978, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOL2ISAADZ4CBLQPYMS76DRWW7L3ANCNFSM4N4GT5XQ .

Splaxi commented 4 years ago

Hi @kai74,

Don't give up on the function.

Try and do a run with the exportonly parameter as suggested. When we have the bacpac file we have some options to make it work.

I'm happy to help you!

Splaxi commented 4 years ago

@kai74

Do you want to give it a try to see if we can make it work for you with spartan? Otherwise I'll close it next week.