![]() |
#1 |
Участник
|
Dynamics AXBR: Preserving the MorphX VCS when a Backup / Restore is needed.
Источник: http://feedproxy.google.com/~r/daxbr/~3/wF45_T8XS0s/
============== Hello, A very common situation is when developers need update their database with fresh data from test or production environments, but the problem begins when you use the MorphX VCS and need to keep this data. Below I show the shortest and fastest way that I’ve found to do that: First, we need make a backup of VCS data, for that, connect at the SQL using the Microsoft SQL Server Management Studio, choose the database that you need to update with the fresh data and then run the commands: 1234567--Creating a temp database to use on our processCREATE DATABASE MyTempBackup --Backuping the dataSELECT * INTO MyTempBackup.dbo.SysVersionControlMorphXItemTable FROM SysVersionControlMorphXItemTableSELECT * INTO MyTempBackup.dbo.SysVersionControlMorphXLockTable FROM SysVersionControlMorphXLockTableSELECT * INTO MyTempBackup.dbo.SysVersionControlMorphXRevisionTable FROM SysVersionControlMorphXRevisionTable Now you can restore the fresh data on DEV’s environment and then we can restore our backuped data. 123456789101112--Just to ensure that there is no trash on tables, you can skip this stepTRUNCATE TABLE SysVersionControlMorphXItemTableTRUNCATE TABLE SysVersionControlMorphXLockTableTRUNCATE TABLE SysVersionControlMorphXRevisionTable --Restoring the dataINSERT INTO SysVersionControlMorphXItemTable SELECT * FROM MyTempBackup.dbo.SysVersionControlMorphXItemTableINSERT INTO SysVersionControlMorphXLockTable SELECT * FROM MyTempBackup.dbo.SysVersionControlMorphXLockTableINSERT INTO SysVersionControlMorphXRevisionTable SELECT * FROM MyTempBackup.dbo.SysVersionControlMorphXRevisionTable --Removing the temp databaseDROP DATABASE MyTempBackup See ya, Pichler Источник: http://feedproxy.google.com/~r/daxbr/~3/wF45_T8XS0s/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|