I have just gone through my own catalog corruption, and managed to solve it. In my case, on macOS Sierra, I opened up my "Main" Catalog in Capture One Pro (Sony). Upon opening the catalog, the application froze, I had the spinning beachball of death, and after waiting several minutes, I decided it must have simply hung, so I force-quit and relaunched it. Upon relaunching, I got the following error:
"Database connection FAILED. The requested document type is not recognized. The provided database is of an unknown type"
By using the Finder (Windows explorer for Windows users) I was able to locate my catalog, in the location I originally saved it when I created it. I then right clicked and selected "Show package contents" (On windows, I think the Catalog files are all in a folder in the location you saved your catalog in to start with). This showed me the catalog files. Inside, there were the following files:
-The catalog file itself, which is the name I gave it with ".cocatalogdb" appended to the end.
-Two folders, "Adjustments" and "Cache"
-A file called "writelock"
-A file with the same name as the catalog file, with -journal on the end
The folders and catalog file are normal.
The "writelock" file is normal, if you are looking in this location when the catalog is currently open in Capture One that is. If you do not have Capture One open and there is a "writelock" file, it means the catalog did not close down properly last time it closed, and Capture One didn't delete this file like it should because of that. What this file does, is to lock out anyone else trying to open the catalog at the same time as you, say for instance another user. If if two people tried to edit the catalog at the same time, this could result in corruption, so the way Capture One handles this is to show an error message and not let you open the catalog if there is a "writelock" file in the catalog folder. The "writelock" file should be deleted whenever the catalog successfully closes, so that the next user to open the catalog is able to do so. If the "writelock" file is not deleted, then although nobody actually has the catalog open, Capture One will think somebody does, and will not let you open it. So the fix for this is, if you have a "writelock" file and the catalog is not currently open anywhere else, move the "writelock" file to the trash.
The other problem file is the file named the same as the library file, with "-journal" appended. Eg, for my catalog named "Main", this file was called "Main.cocatalogdb-journal". This is where the main problem in my case was stemming from. This file is generated when a "transaction" is being processed with the main catalog file (which is an SQL database, and this -journal is a function of SQL databases called "hot journaling"). A "transaction" is effectively Capture One trying to update something in the database. It may be many things. From what I understand, this "-journal" file serves as a "rollback" or "backup" for whatever data is being changed in the database, in case something goes wrong with the transaction. It is only created when Capture One tries to change something in the database, exists as long as the database is being written to, and then is deleted when the database has been successfully updated. If, like me, you have this file present when your catalog is not open in Capture One, it means when the catalog last closed, it was in the middle of a "transaction". Now, when you try and open your catalog in Capture One, it will give you errors, because the database was halfway through writing when it was last shut down, and is now effectively corrupt. The "-journal" file is our saviour now, as it holds the critical information to "rollback" the half completed "transaction" information in the catalog. The key is to get these transactions rolled back using the info from the "-journal" file. This is where I would expect Capture One to be able to repair it's own catalog, as all the information is there. For some reason though, Capture One hasn't been built to be able to rollback transaction errors using the "-journal" file, so we must use a different SQL application to open the database. In my case, I used an open-source application called "DB Browser for SQLite". I believe they have a version for Windows, as well as the MacOS version I used. It can be downloaded at the following link:
http://sqlitebrowser.orgSteps to repair database using "DB Browser for SQLite"
1.) Copy your whole catalog to a new location, to serve as a backup. This means the file you right clicked and clicked "Show Package Contents" on in the steps above, NOT the much smaller sized ".cocatalogdb" file inside the this location.
2.) Make a new empty folder on your desktop, what you call it doesn't matter.
3.) Once the catalog has finished copying, right click on the original catalog (not the copied one, the copied one is just a backup) and select "Show Package Contents".
3.) Move the "(your catalog name).cocatalogdb" and the "(your catalog name).cocatalogdb-journal" files to the empty folder on the desktop you made in step 2
4.) Launch "DB Browser for SQLite", then in the menu bar, select "File", "Open Database".
5.) Select the catalog file in the folder on the desktop, and click open.
6.) The catalog database will now open. Once it has opened, you can close "DB Browser for SQLite". The magic has already happened, just by opening the catalog file with this program!
7.) If you look in the folder on the desktop, you should now find that the "(your catalog name).cocatalogdb-journal" file has disappeared. There should only be one file in the folder now, "(your catalog name).cocatalogdb". If this is the case, you have been successful so far.
8.) Now, right click on the original catalog and select "Show Package Contents" once more
9.) Inside the catalog, move the "(your catalog name).cocatalogdb" and "(your catalog name).cocatalogdb-journal" files to the trash (also the "writelock" file if there is one).
10.) Lastly, move the "(your catalog name).cocatalogdb" file from the folder on the desktop into the catalog (where you just trashed the files from).
11.) You should now be able to successfully open the catalog. If you do so, BACKUP THE CATALOG and make good habits to back up often! Congratulations on saving your ass!

Hope this helps somebody, I am personally so relieved to have fixed my catalog, I will now always back up religiously
