Wednesday, February 1, 2023

Creat DB snapshot in order to reuse the test data

 --Taking the snapshot

CREATE DATABASE AxDB_Snapshot ON  
( NAME = <DB Logical name>, FILENAME =  
'J:\MSSQL_BACKUP\AX_Snapshot2.ss' )  
AS SNAPSHOT OF AxDB;
It took me around 2 mins to create the snapshot

--Restoring the database from the snapshot
ALTER DATABASE AxDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
RESTORE DATABASE AxDB from  
DATABASE_SNAPSHOT = 'AxDB_Snapshot';  
ALTER DATABASE AxDB SET MULTI_USER;

No comments:

Post a Comment

Import an ISV licese file into Dev environment using Power Shell

 K:\AOSService\PackagesLocalDirectory\Bin\Microsoft.Dynamics.AX.Deployment.Setup.exe --setupmode importlicensefile --metadatadir K:\aosservi...