What does Database Repair even do?

I have sat thru many a repair to wonder, whats the purpose? Does it exist to file new assets into my database? Why, when it does this, does it have to make some of my rolling stock have "errors"? I don't see how integrating stuff requires some stuff to be made erroneous.
 
Database repairs are mainly to make sure that everything is where it should be in the database. Part of it involves validation though, so sometimes it can make content faulty when it's not - simply revalidating the assets usually fixes that.

Shane
 
Does that mean doing another repair? Usually that helps. I noticed that these are assets that I had to modify to work in TS2 Mac because it needs something to be .texture instead of .tga.
 
It can be especially helpful to "rebuild" it, especially if you do not delete anything in over 2 years, and it re-caches everything, and makes the file smaller.
 
It can be especially helpful to "rebuild" it, especially if you do not delete anything in over 2 years, and it re-caches everything, and makes the file smaller.

This is called database compression and re-indexing, and is done on the big databases periodically as well. A database is made up of tables, which we can think of as a bunch of cubby holes that contain the various data. The data is key-indexed by a unique item, such as in our case the asset KUID or Kind. This allows the database engine (TADDaemon) or MSSQL database manager on the big MSSQL database, find the data quickly as we build queries to find information.

As the data is deleted from the database, these fields are left open in some databases, like someone removed an item from the mailboxes in a corporate mail center. Over time this can make the database sluggish because the searches take longer to wade through the empty parts to find the data. Wen the database is re-indexed, it removes all the empty places, so there is no longer any wasted time looking at nothing.

Shane covered the other things that the database repair does...

John
 
Database Repairs are overrated. Unless you've really gunked up Trainz real good chances are you don't need to do one, quick or extended. I haven't had to sit through one with 49922 in almost a year now.
 
I think it has something to do with deps. I had to "download" grain HP even though I already had it, for a route. I think Grain HP is a dep of the hoppers, and the 40ft boxcars which also load grain. This is going to be fun.

Edit: Grain HP was made faulty, so the grain hoppers had faulty deps, and they weren't faulty themselves.
 
Last edited:
Back
Top