Create New Aeros Database from Master Database

Create New Aeros Database from Master Database

Login into SQL Studio and Connect to Agrisoft-TB2 instance.
Start a New Query
Backup Master Database Desired. (This includes Ext, Audit and Attachment) - ie: ERP_Master_323
exec sp_backupdatabase 'ERP_Master_323'
exec sp_backupdatabase 'ERP_Master_323_Attachment'
exec sp_backupdatabase 'ERP_Master_323_Audit'
exec sp_backupdatabase 'ERP_Master_323_Ext'
Backup files are created.
ERP_Master_323_Backup_201407171200.bak
ERP_Master_323_Attachment_Backup_201407171200.bak
ERP_Master_323_Audit_Backup_201407171200.bak
ERP_Master_323_Ext_Backup_201407171200.bak
Login into SQL Studio to desired New Database location. ie: Agrisoft-TB2\SUPPORT.
Start a New Query
Restore Master Database to desired New Database. (This includes Ext, Audit and Attachment)
exec sp_restoredatabase 'ERP_xxxxxxxx_323', 'ERP_Master_323_Backup_201407171200.bak'
exec sp_restoredatabase 'ERP_xxxxxxxx_323_Attachment', 'ERP_Master_323_Attachment_Backup_201407171200.bak'
exec sp_restoredatabase 'ERP_xxxxxxxx_323Audit', 'ERP_Master_323_Audit_Backup_201407171200.bak'
exec sp_restoredatabase 'ERP_xxxxxxxx_323Ext', 'ERP_Master_323_Ext_Backup_201407171200.bak'
Select new database in SQL.
Start a New Query.
Run exec spSetSynonyms under the new database connection.



RDP to Citrix server (Agrisoft-Citrix) and login.
Navigate to C:\Program Files (x86)\Cultura\Aeros 3.2.3
Find ERPConnections.xml file. 
Right Click on file and select Edit.
Copy an existing connection string and paste back into file.<Connection Title="Demo">
<ServerName>agrisoft-tb2\support</ServerName>
<DatabaseName>ERP_Demo_323</DatabaseName>
<UserName>erp_appuser</UserName>
<Password>Grandizergo1</Password>
<Default>false</Default>
<ADServer></ADServer>
<PBSource>C:\Program Files (x86)\Cultura\Aeros 3.2.3\PBD</PBSource>
<INIPath>%MYDOCUMENTS%\fab.ini</INIPath>
<Domain></Domain>
</Connection>
Modify 'Connection Title' and 'DatabaseName' tags. <Connection Title="New Database">
<ServerName>agrisoft-tb2\support</ServerName>
<DatabaseName>ERP_xxxxxxxx_323</DatabaseName>
<UserName>erp_appuser</UserName>
<Password>Grandizergo1</Password>
<Default>false</Default>
<ADServer></ADServer>
<PBSource>C:\Program Files (x86)\Cultura\Aeros 3.2.3\PBD</PBSource>
<INIPath>%MYDOCUMENTS%\fab.ini</INIPath>
<Domain></Domain>
</Connection>
Save Edit.
Run Aeros Build and Select New Database.