Environment - Codemap
1) Login with partner
2) Add company
3) Fill mandatory details -> Save and continue
4) system throws server error
ErrorID : 0
ErrorSource : ControllerAppTier.Clone->WORKTERRAControllerAppTier.Clone->Company.Clone->Company.AddCompany->Company.BackupAndRestoreNewCompany
ErrorMessage: User does not have permission to alter database 'TestCompany1_13551', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
The file 'D:\MSSQL\Data\MasterCompanyDB.mdf' cannot be overwritten. It is being used by database 'MasterCompanyDB'.
File 'MasterCompanyDB_Data' cannot be restored to 'D:\MSSQL\Data\MasterCompanyDB.mdf'. Use WITH MOVE to identify a valid location for the file.
The file 'D:\MSSQL\Log\MasterCompanyDB.ldf' cannot be overwritten. It is being used by database 'MasterCompanyDB'.
File 'MasterCompanyDB_Log' cannot be restored to 'D:\MSSQL\Log\MasterCompanyDB.ldf'. Use WITH MOVE to identify a valid location for the file.
Problems were identified while planning for the RESTORE statement. Previous messages provide details.
RESTORE DATABASE is terminating abnormally.
User does not have permission to alter database 'TestCompany1_13551', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.