As Microsoft releases platform updates, we need, somehow, to use old backups from environments of older versions, for data import on Tier 1 developer environments.
This instruction can be used to import and work with databases for different projects.
Import database
To import database a developer needs to have the database backup.Important! For this operation you need to use Tier 1 database backup (.bak).
Get database backup
You need to have it to the SQLBACKUP(.bak file) on Tier 1 DEV machine.
Create new database
Create new database in your DEV box and name it as AxDB_New
ALTER DATABASE AxDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE
--rename database to db_old
ALTER DATABASE AxDB MODIFY NAME = AxDB_old
--set the old database to multi user
ALTER DATABASE AxDB_old SET MULTI_USER
--rename the new database to the main database name
ALTER DATABASE AxDB_new MODIFY NAME = AxDB
Synchronize the database
Syncrhonize the database either from Visual studio as shown below:
K:\AOSService\webroot\bin\Microsoft.Dynamics.AX.Deployment.Setup.exe
-bindir "K:\AosService\PackagesLocalDirectory"
metadatadir "K:\AosService\PackagesLocalDirectory"
-sqluser "axdbadmin" -sqlserver "." -sqldatabase "AxDB"
-setupmode "sync" -syncmode "fullall"
-isazuresql "false" -sqlpwd "*************"
-logfilename "H:\MSSQL_LOGS\AxDB_log.log"
Now your environment is ready to perform data upgrade operation.
No comments:
Post a Comment