Posts

Showing posts with the label Restore the database to the development VM using the.bacpac file

Restore the database to the development VM using the.bacpac file

Step by step, as below: 1. Take a Backup of AxDB database from LCS and push it into Development VM 2. Open Command Prompt (Run as Administrator) Run - cd "C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin" 3. Command to Execute SqlPackage.exe /a:import /sf:C:\TEMP\YourDBBackupFile.bacpac /tsn:localhost /tdn:AxDB_DDMMYYYY /p:CommandTimeout=1200 Note: The process will take some more time 4. Open SQL and run the below script CREATE USER axdeployuser FROM LOGIN axdeployuser EXEC sp_addrolemember 'db_owner', 'axdeployuser'  CREATE USER axdbadmin FROM LOGIN axdbadmin EXEC sp_addrolemember 'db_owner', 'axdbadmin'  CREATE USER axmrruntimeuser FROM LOGIN axmrruntimeuser EXEC sp_addrolemember 'db_datareader', 'axmrruntimeuser' EXEC sp_addrolemember 'db_datawriter', 'axmrruntimeuser'  CREATE USER axretaildatasyncuser FROM LOGIN axretaildatasyncuser EXEC sp_addrolemember 'DataSyncUsersRole', 'axretaildatasy...