Recovery database help

  

Today I deleted my eSpace Core by mistake in the development environment, and after returning the backup it started to use the tables with the end of the name 1
Example
WorkOrder is now called WorkOrder1

My development bank was full of data and it will take a long time to copy it again

I need my core project to call the tables without end 1 in the name, because there the data is right, how do I make this change?

Solution

Hi Alisson,

Since you deleted the eSpace, the recovered eSpace is created as a new eSpace when published. This means that all Entities that are defined in it will be created as new entities. Since there are already tables in the database with those names, they are created with a "1" at the end. There's unfortunately no good way around that, without messing with system tables etc. (which is not guaranteed to work). The only solution would be to restore a backup of the database, instead of the eSpace, if possible, so that the eSpace won't be deleted. Note that this also restores all eSpaces to their state at the time of the backup, so it might not be ideal either.

Solution

How did you return the backup? I'm curious as i have never seen that behavior of renaming that you mentioned or was able to replicate it. Renaming the entities manually will take less time than copying again? :) Might be the fastest way of dealing with it, if the name of the tables is the only problem.

Hi Guilherme,

You can't manually rename the tables. The Platform has internal system tables that map the name as seen in Service Studio to the physical table names. If there's a conflict, it appends a serial number to the end, starting at 1.

In the case of Alisson, I assume he only retrieved the eSpace from the backup and published that, which is a perfectly fine explanation for what he experiences.

I'm curious, is there any undelete functionality?

I've seen some espace marked as espacename(deleted) on check old unused espace page.

It seems deleted espace record were still kept by system.

Hi Harlin,

There's unfortunately no undelete functionality. It is true that everything is still kept, but there's no OutSystems-sanctioned, foolproof way to undelete an eSpace.

Kilian Hekhuis wrote:

Hi Guilherme,

You can't manually rename the tables. The Platform has internal system tables that map the name as seen in Service Studio to the physical table names. If there's a conflict, it appends a serial number to the end, starting at 1.

In the case of Alisson, I assume he only retrieved the eSpace from the backup and published that, which is a perfectly fine explanation for what he experiences.

I said rename the entities, not the tables directly in SQL :) Anyway you already gave a very complete answer to the problem.


Thank you all for your help

We were unable to recover or return the backup, perhaps because we manually restored the backup the first time, and the tables were created under a different name. When we tried to go back through the service center, it created the suffix tables 2

and in other attempts the suffix was increased to 3 and 4.

We tried to solve it in several other ways, for example to directly change the name of the tables in the tables of systems and to rename the tables manually, this solution could solve, but since our base has more than 400 tables, it would take a long time

We did the recalls of the important information by querys, because we could not stay with the team of 8 people stopped until resolve without losing the data.

But I wonder if this mistake was made in production, I hoped the outsystems would have a simpler way of solving it.

Hi Alisson,

It's curious you are talking about a backup, while it apparenlty isn't a full database backup, since the database contains both the eSpaces and the data. As for a simpler way, there isn't any. Just don't delete eSpaces you don't want to get rid of :).

Kilian Hekhuis wrote:

Hi Alisson,

It's curious you are talking about a backup, while it apparenlty isn't a full database backup, since the database contains both the eSpaces and the data. As for a simpler way, there isn't any. Just don't delete eSpaces you don't want to get rid of :).


First you are correct! never delete what you do not want!

However the person tried to delete the Core from the test environment, and by mistake the person deleted the environment from dev.


But if it happens (was not intentional) know that it will not be simple to solve.