Enter the key words to find the related topics

AX DB restore sql command

1. Take backup file and save it into J:\MSSQL_BACKUP\MSSQL_BACKUP_4132020.bak(Optional path)

2. Take custom XPO file save it into C:\Users\Admin70e4cf8d85\Desktop\Manikanta\ADBMSalesInvoiceReport_04132020.axpp

3. Open the SQL server run the command to restore the database, before that we need to stop the service (World wide publishing services, Microsoft d365 Batch management service, Data import-export and SQL Reporting Service)

Command:
 ALTER DATABASE AxDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
RESTORE DATABASE AxDB FROM DISK ='J:\8.1.2\8_1_PROCESSTEST.bak' with replace
GO
ALTER DATABASE AxDB SET MULTI_USER        


4. Now-Again restarts the services and do Full DB compile and DB sync.

5. To add Admin user, navigate to K:\AosService\PackagesLocalDirectory\Bin and run the AdminUserProvisioning file and EmailId.