How to recover/undelete an eSpace?

How to recover/undelete an eSpace?

  
There might be a time when you accidently replaced or deleted an eSpace and want to recover them!

Here is how to recover (undelete) your eSpace.

0) Remember to backup your database before you make any manual changes to your database.
1) Open SQL Server management Studio and connect to your agile platform database server.
2) Under the "outsystems" database find the table "dbo.ossys.Espace"
3) Right click on "dbo.ossys.Espace" and select the "Open table" option
4) You will now be presented with a list of records, find your eSpace under the "Name" column.
Note: If you deleted an eSpace with the name "Account" you should find that your "Account" eSpace has been renamed to "Account(deletedN)" where N is the number of deleted eSpace with the same name.
5) Find and replace the following values for the deleted eSpace record.
Find "Is_Active" and replace it's value with "True"
Find "Locked_Date" and replace it's value with "NULL"
Find "DBCatalog_Id" and replace it's value with "1"
6) Done you have recovered your deleted eSpace, now Login to ServiceCenter, and download the eSpace you just recovered.
7) (remember to delete the recovered eSpace again via Service Center).

 
This is a good "open only in case of emergency" tip, but it is important to stress your last point

After downloading it, Remember to delete the recovered eSpace again via Service Center!

You should NOT keep using the manually undeleted eSpace as if you had not deleted it in the first place! There are other changes to the model when an eSpace is deleted and raising an eSpace from the dead like this will leave things woefully inconsistent at runtime.

Remember, OutSystems will not give support to errors arising from manual changes to the data model, filesystem etc


Miguel
Remember to backup your database before you make any manual changes to your database.