# Repair of corrupted catalogs



## Tomiron

Trying to open a corrupt catalog of mine makes LR freeze forcing me to kill the actual LR-process to proceed. I also need to delete the preference files to start LR again. It is not possible to import any data from the corrupted catalog to a new one. (My latest backup catalog works just fine though, but lacks quite a few hours of work...)

Is there by any chance a way to check integrity or do any other kind of catalogue repair of corrupted catalogs that doesn't open in LR? If I'd been more of a tech-pro I'd might been successful in using sqlite3 or sqlite analyzer to check the database. Now is that not the case..

I'm aware of that holding down the Alt-key (on Win) or Opt-key (on Mac) while simultaneously clicking on the LR icon in the dock cause LR to open but not to open the default catalog. Instead it shows a dialog with a list of available catalogs and an option to create check integrity of each catalog. In my case - this doesn't work. If I choose my corrupted catalog following this procedure this will still cause LR to crash.

Working in LR 4, Win7 64 bit, 4GB RAM, accessing catalog and previews from an external drive, images stored on a multiHD-NAS.


----------



## b_gossweiler

Welcome to the forums, Tomiron, sorry to hear a corrupt catalog leads you to this place.

A few things to try:

Create a fresh, new catalog, and try importing the trouble catalog into it.
If it does not work, do the same but import the trouble catalog in smaller pieces into it.
If it does not work, you could email your catalog (just the *.lrcat file, it zips quite well), and I can try just vacuuming it with SQLite.
If that doesn't work, then there's Dan Tull at Adobe, who is the catalog specialist and might be able to repair.

If option 1 or 2 work for you:

If you're satisfied with the catalog as it is (i.e. if you didn't use published services which will not be imported), you could replace your corrupt catalog by the new one
(replace means rename the corrupt catalog, copy the new catalog to the same location and name it the same as the corrupt catalog was named before)
If you'd rather base your further work on the backup catalog, you could replace the corrupt catalog by a backup, open the backup and then import from catalog those parts (dates) which are not present in the backup yet.
(replace means rename the corrupt catalog, copy the backup catalog to the  same location and name it the same as the corrupt catalog was named  before)

Beat


----------



## Brad Snyder

I think Dan may not be directly connected to the Lr team now. 

http://twitter.com/#!/dantull

But he's always been a very nice guy about this kind of stuff as a last resort. I'm sure Victoria will know all the skinny.... including a direct email address. (I could guess, but I can't find it in my archives anywhere_


----------



## Tomiron

First of all - thanks for your replies!



b_gossweiler said:


> A few things to try:
> 
> Create a fresh, new catalog, and try importing the trouble catalog into it.
> If it does not work, do the same but import the trouble catalog in smaller pieces into it.
> If it does not work, you could email your catalog (just the *.lrcat file, it zips quite well), and I can try just vacuuming it with SQLite.
> If that doesn't work, then there's Dan Tull at Adobe, who is the catalog specialist and might be able to repair.
> 
> Beat



1. Tried with no sucess.
2. How is this done? I don't get any options and at any attempt LR crashes.
3. Much appreciated! Got so interested in this action myself, that I'd like to figure it out for any upcoming needs. Downloaded SQlite3 and tried the actions described here. But my programming skills stops att Basic level as I can't get SQlite to start. What do I get wrong when I, in the Command prompt write: "echo.dump | sqlite3 TOJA.lrcat > TempTOJA.sql" where TOJA is the name of my corrupted catalog? Get the following message: "Error: incomplete SQL: dump"

/T


----------



## Victoria Bampton

Yep, he's moved to another team, but last time I talked to him, he was still quite happy to help out when people are really stuck.  He doesn't get many any more, as he did a load of work on the fixing and prevention.  His email was [email protected] is the other tricks don't work though.


----------



## b_gossweiler

This command is exactly the approach I would have take to vacuum the catalog.



Tomiron said:


> What do I get wrong when I, in the Command prompt write: "echo.dump | sqlite3 TOJA.lrcat > TempTOJA.sql" where TOJA is the name of my corrupted catalog? Get the following message: "Error: incomplete SQL: dump"



You need to enter a space between _echo_ and _.dump_

Beat


----------



## Tomiron

That's right, Beat! The space is significant... 


Went further and managed to start the SQlite cleaning. Got so far as exporting the lrcat to a new sql-file. When trying to bring the data back to a new lrcat-file things start to act funny for me. Initially it all seemes to work. I can see how a new file is being built up right up to about the size of my 1,6 GB original file. SQlite also brings out the attached message concerning drawbacks in the catalog. But right when the process is finished the new lrcat-file is emptied. The file is still there, but with no content and no size.... 
Got in contact with Dan who kindly offered his assistance. A lot of helpful souls out there!
I'll post back.
/Tomas


----------



## b_gossweiler

Tomas,

At least you learnt something on the way here 

The messages indicate an inconsistency in your catalog, obviously the catalog contains rows with non-unique primary keys, which is invalid in a table. I guess SQLite is backing out the load because of these errors.

I'm pretty confident Dan will be able to fix the issue for you.

Beat


----------



## Eden

I recently experienced the same problem. I've been looking for any solution on the web. I have no experience with coding. Would you be willing to try vacuuming it with SQLite for me?


----------



## Victoria Bampton

Hi Eden, welcome to the forum!

Tell us more about the problem you're having?  And are you really on LR2.0?  Updating to 2.7 (last free update) would be worthwhile as they added some extra catalog repair code in along the way.


----------



## screscenzo

Hello.
If any of the LR Gurus in this thread could have a look at my thread I would appreciate it.
I'm not sure if my catalog is corrupted or not. I hope I don't have to get into SQLite. Do you think all the above information is pertinent to my issue? Any guidance would be appreciated.

http://www.lightroomqueen.com/community/showthread.php?17101-Unexpected-Error-opening-catalog

Best,
Stephen


----------



## geecom

Hi all

Another victim of a bust catalog. I've successfully dumped the LR catalog, but when I run the init command, it seems to have just frozen.

Command prompt output is:
  C:\Store\Lightroom\Corrupt>echo .dump | sqlite3 catalog.lrcat > recovered.sql


  C:\Store\Lightroom\Corrupt>sqlite3.exe -init recovered.sql Catalog.lrcat
  -- Loading resources from recovered.sql

Its been like this for a couple of hours now, and going by the last modified stamp on recovered.sql, nothing further has been written to the file either. 

Any recommendations gratefully received.


----------



## Victoria Bampton

Hi geecom, welcome to the forum!

Any backups you could use?  If not, I have a contact at Adobe who should be able to help, but it would likely be after the holidays now.


----------



## geecom

Victoria Bampton said:


> Hi geecom, welcome to the forum!



Thanks!



Victoria Bampton said:


> Any backups you could use?  If not, I have a contact at Adobe who should be able to help, but it would likely be after the holidays now.



As ever, whilst under a week apart, the differences between the current catalog and backup are fairly substantial.

Partial good news though - by renaming and then opening the broken catalog, Lightroom actually loaded it. I could then even change its name back to the original, and it still works. However, if I try to optimize or backup, the task ultimately fails, and then Lightroom refuses to open the catalog again. Quite peculiar!

Unless anyone has any suggestions, I fear a contact at Adobe may be my only help.


----------



## Victoria Bampton

Try creating a clean catalog, and then going to file > import from another catalog and import that one in.  If it still fails, you may find that you can import a chunk at a time to narrow down where the issue's occurred.


----------



## geecom

Victoria Bampton said:


> Try creating a clean catalog, and then going to file > import from another catalog and import that one in.  If it still fails, you may find that you can import a chunk at a time to narrow down where the issue's occurred.




The lovely Dan managed to fix the catalog - something wrong with a metadata index table.  Thanks for all your help!


----------



## Victoria Bampton

Excellent, I'm really pleased to hear it!


----------



## canyonlight

*Also Having Catalog Issues*

I, too, am having difficulties with what I believe to be corruption in my Lightroom catalog. The symptom is that I cannot publish images to Facebook using the furnished Lightroom plug-in. Everything I have read tells me that this is caused by a corrupt catalog file.

I'd like to resolve this problem.

Do you recommend that I start with a first step of creating a new catalog file and attempting to import my current lrcat file into the new one?

Mac OS X 10.8.2; Lightroom 4.3.

Thanks very much,

Stan


----------



## clee01l

canyonlight said:


> I, too, am having difficulties with what I believe to be corruption in my Lightroom catalog. The symptom is that I cannot publish images to Facebook using the furnished Lightroom plug-in. Everything I have read tells me that this is caused by a corrupt catalog file.


Stan what would lead you to believe this is a corrupt catalog. What messages are you getting when you attempt to Publish to FB?


----------



## GetaPhotoFix

Hi, I been using LR for over a year and backing up every 2 weeks.  However for a while LR gets stuck on "testing Integrity" and so I have been cancelling it lately.  Today, quite accidentally I clicked on a backup version of lightroom to see what it loads, when I realised it loads what it saved at that time. I shut down and tried to open my normal LR cat file. Now it comes up that the file needs to be repaired.  (Although I have been loading LR just fine before) I tried to fix, but to no avail.  I then tried to load a couple of months of backups and they are ALL corrupt!  (This must have been why I was getting stuck on the testing integrity part) I tried doing something that was suggested on this forum:  making a new cataloque and then importing the catalogue, but this message popped up:  "The catalog does not appear to be a valid Lightroom catalog."  Is there anything I can do?  Much appreciate any help!


----------



## leventeengel

b_gossweiler said:


> Welcome to the forums, Tomiron, sorry to hear a corrupt catalog leads you to this place.
> 
> A few things to try:
> 
> Create a fresh, new catalog, and try importing the trouble catalog into it.
> If it does not work, do the same but import the trouble catalog in smaller pieces into it.
> If it does not work, you could email your catalog (just the *.lrcat file, it zips quite well), and I can try just vacuuming it with SQLite.
> If that doesn't work, then there's Dan Tull at Adobe, who is the catalog specialist and might be able to repair.
> 
> If option 1 or 2 work for you:
> 
> If you're satisfied with the catalog as it is (i.e. if you didn't use published services which will not be imported), you could replace your corrupt catalog by the new one
> (replace means rename the corrupt catalog, copy the new catalog to the same location and name it the same as the corrupt catalog was named before)
> If you'd rather base your further work on the backup catalog, you could replace the corrupt catalog by a backup, open the backup and then import from catalog those parts (dates) which are not present in the backup yet.
> (replace means rename the corrupt catalog, copy the backup catalog to the  same location and name it the same as the corrupt catalog was named  before)
> 
> Beat




Hello 

I'm runing windows 7 64 bit and lightroom 4.3, I accidently deleted my lightroom catalog but was able to recover it with a recovery sofware but guess what lightroom doesn't open it anymoore.All my work is there in that 150MB catalog.

I have uploaded my lightroom catalog that wont open can you please check it or repair it?All my work is there \

I uploaded my file here => http://dl.transfer.ro/transfer_ro-25apr-05aa9f867dae4.zip

thank you in advance


----------



## Victoria Bampton

Hi leventeengel, welcome to the forum!  Sorry it's a disaster that's brought you here.

I've tried opening your catalog into LR and into an SQL Editor, but it seems to be badly corrupted.  I can't even get it to open in an SQLite Editor.

Do you have a backup we can help you restore?  LR would have been asking you to back up regularly by default.


----------



## leventeengel

unfortunately no  that's why I was digging...I really didn't knew about what's a catalog, at least NOW I do


----------



## Victoria Bampton

I'm so sorry to hear that!


----------



## djeebah

Hello,

Having the same problem with the lrcat catalog.
I've tried: sqlite> echo .dump | sqlite3 dbase.lrcat > TempLRCatName.sql and nothing happens, only ...>
How could I email it to you to have a try?
Many thanks!


----------



## Tomiron

Trying to open a corrupt catalog of mine makes LR freeze forcing me to kill the actual LR-process to proceed. I also need to delete the preference files to start LR again. It is not possible to import any data from the corrupted catalog to a new one. (My latest backup catalog works just fine though, but lacks quite a few hours of work...)

Is there by any chance a way to check integrity or do any other kind of catalogue repair of corrupted catalogs that doesn't open in LR? If I'd been more of a tech-pro I'd might been successful in using sqlite3 or sqlite analyzer to check the database. Now is that not the case..

I'm aware of that holding down the Alt-key (on Win) or Opt-key (on Mac) while simultaneously clicking on the LR icon in the dock cause LR to open but not to open the default catalog. Instead it shows a dialog with a list of available catalogs and an option to create check integrity of each catalog. In my case - this doesn't work. If I choose my corrupted catalog following this procedure this will still cause LR to crash.

Working in LR 4, Win7 64 bit, 4GB RAM, accessing catalog and previews from an external drive, images stored on a multiHD-NAS.


----------



## djeebah

djeebah said:


> Hello,
> 
> Having the same problem with the lrcat catalog.
> I've tried: sqlite> echo .dump | sqlite3 dbase.lrcat > TempLRCatName.sql and nothing happens, only ...>
> How could I email it to you to have a try?
> Many thanks!



HURRAY!!!
It was a space in front of the "echo" command 
After converting the lrcat into sql , I tried to convert it back to lrcat, but after two errors 
Error: near line 7895330: PRIMARY KEY must be unique
Error: near line 7895580: PRIMARY KEY must be unique
it saved a zero bytes lrcat file.

So what I did was, I opened the sql file in notepad and modified the last line from 
ROLLBACK; — due to errors
with the line:
COMMIT TRANSACTION;
And THEN do the 
C:\SQLite>sqlite3 -init tempdbase.sql dbaseRecovered.lrcat
and... SUCCESS!!!


----------



## clee01l

Djeebah,  Welcome to our forum.  I am glad to see more SQL literate users in this forum. And I am glad that you were able to repair your own corrupted catalog.  
I would like to emphasize one important point for many LR users that may find themselves in this situation and be tempted to resolve it with this solution. *Always* before attempting any SQL user spawned updates to the catalog make a copy of the catalog file as a fall back just in case you make things worse instead of better.


----------



## Victoria Bampton

Welcome to the forum Djeebah, glad to have you here!


----------



## greener1

please help! I'm a college student and really nervous because my Lightroom catalog is corrupt and i dont know how to use SQL and have no script writing ability. can someone please help me out! i have tried all they other ways people have suggested and i dont seem to have any effect on recovering the catalog


----------



## Victoria Bampton

Hi Greener, welcome to the forum. Do you not have any catalog backups? And do you know what happened to your catalog to cause it to become corrupted.


----------



## miglio

Hi Girls and Guys!!
I'm victim of Mavericks VS WD bugs do u know?
Now i'm recovering files, and i copy into a Windows 7 system,  I find the catalouge but it's corrupt the name is MATRIMONIO MARIA-METTEO, i use Sqlite but the program don't like the"-" sign...
someone can try for me?

https://www.dropbox.com/s/vn025jei9if84rm/MATRIMONIO MARIA-METTEO.lrcat

Thanks


----------



## clee01l

miglio said:


> I find the catalouge but it's corrupt the name is MATRIMONIO MARIA-METTEO, i use Sqlite but the program don't like the"-" sign...
> someone can try for me?
> 
> https://www.dropbox.com/s/vn025jei9if84rm/MATRIMONIO MARIA-METTEO.lrcat
> 
> Thanks


Welcome to the forum.  You can rename the catalog file to anything that you want without the "-" in the name.  This should get you past the sqlite problem.


----------



## miglio

Thanks i do it, but my original lrcat was 18Mb now is 323Kb and it's empty :(

nobody can help me? 
thanks


----------



## clee01l

I'm afraid it is beyond help.  I tried opening it several different ways including a file dump.  The size difference between the file you posted on dropbox and it's former size should give you an indication that most of the file is missing.  If it is not there, then there is nothing you can do to bring it back.

What kind of system wide backup of your critical data do you have in place?  It is time to go to that for recovery.


----------



## miglio

Thanks Clee

i'm using Iskysoft data recovery in advanced mode


----------



## clee01l

miglio said:


> Thanks Clee
> 
> i'm using Iskysoft data recovery in advanced mode


This is data recovery software not backup software.  I understand that you are trying to recovery the data on the WD corrupt HD, but that is not the question that I asked.  If you primary HD is damaged or destroyed, then you need to fall back to your data backup plan to restore the files that were lost.  So what is/was your backup plan?


----------



## miglio

clee01l said:


> This is data recovery software not backup software.  I understand that you are trying to recovery the data on the WD corrupt HD, but that is not the question that I asked.  If you primary HD is damaged or destroyed, then you need to fall back to your data backup plan to restore the files that were lost.  So what is/was your backup plan?



Thanks,

It's not the primary HD damaged, but an external drive I was working with. I've found everything with this software: the raw files, the folder,  the catalogue and also the folder "LIGHTROOM previews.lrdata". 

Is it ok if I copy this stuff to the primary hd, or should I work with the same configuration? 
-The external Hard Disk linked to the Mac
-The Folders in the same path
etc etc


----------



## rudenc

I have a corrupted catalog. Every time i try these instructions: http://gerhardstrasse.wordpress.com/2010/08/19/recover-from-a-corrupt-adobe-lightroom-catalog-file/ I only get an .sql file with 52 byte size. I also read the suggestions in the comments about checking the file and removing the last line “ROLLBACK TRANSACTION” but i don't have that line and i don't understand how to fix it.


----------



## Victoria Bampton

Hi rudenc, welcome to the forum!  You don't have a recent backup you can revert to?  Do you still have a copy of the corrupted catalog that you haven't messed around with?


----------



## blue

*Need help - having same catalog problems*

Hi guys

I've read through this thread, and have emailed Dan, as I'm not confident enough to mess with SQlite. 

I also read through the posts, and I don't think any of it can help me - unless anybody can have a look please?

My main catalog I've been using for my Photography course all year is corrupt and having problems opening since a couple of weeks ago. The only thing I can think of that caused it was hibernating my laptop while the catalog was still open in LR several times (i.e. not exiting LR and/or ejecting the external HD the catalog's saved on).

I have a couple of other catalogs on the same HD, and they open fine. 

My teachers tried to help me with this catalog in what little time they could spend at the end of class this week, but to no avail.


One teacher tried to optimize the catalog, this didn't help (I think LR stopped responding and shut down).
the same teacher opened a backup from 11 March 2014 of said catalog, but now the backup date is set to 26 March 2014, and it is also corrupt.
The second teacher tried to rename all instances of the catalog file name in the folder and in the text file (I think there were 4 instances all up). This didn't work.

The catalog went through the typical array of integrity, repair, corrupt, etc error messages, and stopped opening on my laptop. I tried opening it in the labs at college after I first encounctered the problem, and it opened fine, but I have never been able to import this catalog into another catalog - and IF I have been able to successfully open this corrupt catalog on another machine, and attempt to import it into another catalog, I can no longer successfully open it on that machine. 

My LR trial expired today, and I bought a copy. The said catalog opened in a fresh install of LR, but again, I tried to import it to another catalog, then it stopped opening (and tried to open it on another laptop with fresh LR install - didn't open).

Any ideas??

I'm bemused by the fact that Adobe hasn't been able to create a solid fix for this problem since LR 1!


----------



## Jknights

How many images are in your catalog ?
How do you hold you catalog ?
Do you import images into the catalog or just reference them in a hard disk location ?

FYI:
I have 120K images in my catalog (845MB) and it is references my images which are on the same disk but in a file directory structure.  I think this is a safer long term route as I can back up bot the LRcat file and the file directory structure onto other disks and restore from these in the event of a catalog corruption or disk drive failure.


----------



## Victoria Bampton

Corrupted catalogs are pretty rare these days, especially ones that the built in routines can't fix.  You're probably right about it being left in an inconsistent state by removing the drive while LR was still open, so definitely one to watch out for.  Dan said a while back that almost all of the corrupted catalogs he sees that can't be fixed automatically are due to hardware issues of one kind or another.  If you don't hear back from Dan, let me know as I have another contact at Adobe who may be able to help.  If you want to zip it up (just the lrcat) and send it to me via www.wetransfer.com to [email protected] I'd be happy to take a quick look too.


----------



## Orwell

Just updated to L5.4: No problems before update. Have had escalating problems with 5.4 locking up, slowing down, not responding. Related? installed critical MS update that stopped from slowing down/not responding. Norton 360: no virus. Norton  Power Eraser found nothing. Malewarebytes Pro finds no issues. Now L5.4 Corrupts catalogs leaving them unrepairable when saving them. Corrupted back up catalogs. Wiped some catalogs of all content. Reinstalled L5.4. Still corrupts them. Run multiple tests with old catalogs and ones created just for this problem. Win7 Home premium, quad core processor, 16GB RAM. Thinking it might be space problem? 1.79 TB drive: 1.5 TB used, 293GB free. Sweating bullets.
Catalog: 740 Mb, on main drive with program. Backups on external hard drive.


----------



## imagemaker

Another busted catalog! Importing to a new catalog doesn't work, I get an error message for the last several backups and then encountered some blank backups. usual problems, won't optimize, shuts down during optimization attempt, etc. V. 5.7.1, Windoz 7. Anybody know where I can buy one of those SQLite vacuums? :surprised:


----------



## Victoria Bampton

Hi imagemaker, send me the catalog using the instructions a couple of post's back, and I'll pass it on to the wizard at Adobe.


----------



## imagemaker

Victoria Bampton said:


> Hi imagemaker, send me the catalog using the instructions a couple of post's back, and I'll pass it on to the wizard at Adobe.



Thanks so much. I did clean out my C Drive this AM and that seemed to solve the issue but I'll double check my backups for a few days to make sure it works.


----------



## Victoria Bampton

That's great news!


----------



## Samuel Cochrane

Lightroom Altruists,

Last week I did the unthinkable and mistakenly deleted a crucial folder on my computer.
Of the _many_ things I've lost, I'm most distraught about my Lightroom 5 library; it's essential for both my work and personal projects.
I've spent three years building and maintaining this library, last week I not only lost it's backup drive but also deleted the original catalogue.
I've been able to revive a degree of my lost content through recovery software, including several .lrcat files, they no longer open however.

I've followed _*b_gossweiler's*_ very concise instructions to no avail, If anyone has any additional advice or would care to take a look at one of the files I would be extremely grateful.

I am so _so_ angry with myself.
Thank you for your time.


----------



## Victoria Bampton

Hi Samuel, welcome to the forum!  Oh dear, sorry to hear that!  I assume you've also checked the trash, etc.

Recovery software's not great at recovering databases, but if you want to zip up the catalogs and use www.wetransfer.com to send them to me at uploads [at] lightroomqueen [dot] com (fixing the at and dot, of course), I'll see if my database magician at Adobe can do anything with them.


----------



## Samuel Cochrane

*Victoria,*

Thank you so much for having a look at these for me.
I've sent the files through to you, I'm very patient so just let me know.


----------



## Tomiron

Trying to open a corrupt catalog of mine makes LR freeze forcing me to kill the actual LR-process to proceed. I also need to delete the preference files to start LR again. It is not possible to import any data from the corrupted catalog to a new one. (My latest backup catalog works just fine though, but lacks quite a few hours of work...)

Is there by any chance a way to check integrity or do any other kind of catalogue repair of corrupted catalogs that doesn't open in LR? If I'd been more of a tech-pro I'd might been successful in using sqlite3 or sqlite analyzer to check the database. Now is that not the case..

I'm aware of that holding down the Alt-key (on Win) or Opt-key (on Mac) while simultaneously clicking on the LR icon in the dock cause LR to open but not to open the default catalog. Instead it shows a dialog with a list of available catalogs and an option to create check integrity of each catalog. In my case - this doesn't work. If I choose my corrupted catalog following this procedure this will still cause LR to crash.

Working in LR 4, Win7 64 bit, 4GB RAM, accessing catalog and previews from an external drive, images stored on a multiHD-NAS.


----------



## naddl

Hi!
I'm trying to recover a corrupted Lightroom catalog using sqlite3. I guess I really don't know what I'm doing with sqlite3. I try running the first command and nothing seems to happen. All I get is "...>"  I don't see any .sql file created. I have entered the following command:
sqlite> echo .dump | sqlite3 LightroomCatalog.lrcat > recoveredcatalog.sql


----------



## clee01l

Welcome to the forum.  Presumably you have no catalog backups to use.  It can be very difficult to recover a corrupt catalog, So recovering corrupt catalogs is a last resort process. 
If you need to use SQLite tools, I strongly recommend that you get a copy of Navicat Essentials for SQLite http://www.navicat.com/download
It is a GUI front end that has a lot of the maintenance functions accessible via the menu.  You can Analyze, Vacuum, & Reindex the database as well as use standard SQL queries to dump and build a new database.  Beyond that, it will take a really knowledgable person to rebuild the corrupt database.  Victoria has contact with some one at Adobe that has been helpful in this regard in the past. 

So, to begin, tell us about your catalog backup situation and how you came to be in this predicament.


----------



## Victoria Bampton

clee01l said:


> Victoria has contact with some one at Adobe that has been helpful in this regard in the past.



Yep, he's still happy for me to pass on problem catalogs, and if anyone can fix it, it'll be Paul.


----------



## swubbe

Hello,

I am new to this forum, but not new to Lightroom. In general, I believe can perform all the basic tasks to process my images. But now I am faced with an issue and google was so kind to point me to this forum.

My laptop experienced a rather unfortunate crash after the Windows 10 update. It could be resolved, but it meant my harddrive had to be cleared. No problem so far, all my images are on a second drive. Just before I wanted to start the installation, I remembered that for some reason I had placed my Lightroom Catalog on the same drive as Windows. So clearing that drive would also clear my catalog. With the aid of a command prompt (what were those magical DOS commands....?) I manage to copy the .lcat file to the Data drive.
Now that my laptop is freshly installed, I also reinstalled my Lightroom 5.7.1 copy and opened my catalog. Not.

LR tells me the catalog is corrupt. I tried to import the content into a new fresh catalog, but still no succes.
So hopefully somebody here can help me. I read things about extracting information from the database, using software, but I know for sure that is out of my leauge.
Any suggestion would be welcome. It would be a shame to loose 3 years of photowork (and typing this, I think I should have made a catalog per year. Reduces the loss in case of emergencies...)

Many thanks for your response (and now I will explore this forum in more details),
Sjoerd


----------



## Johan Elzenga

Sometimes I think that Lightroom should behave a little like 'ransomware'. It should lock your computer completely, and not let go until you've connected an external disk and made a proper backup of your entire hard disk...


----------



## clee01l

swubbe said:


> Hello,
> 
> I am new to this forum, but not new to Lightroom. ...
> LR tells me the catalog is corrupt. I tried to import the content into a new fresh catalog, but still no success...


Welcome to the forum.

This will be your best chance: #53 if you do not have a recent catalog backup.


----------



## swubbe

clee01l said:


> Welcome to the forum.
> 
> This will be your best chance: #53 if you do not have a recent catalog backup.



Thanks. I have taken the liberty to upload my file.

@JohanElzenga: Still do not know why I did not place my catalog on the separate Data-drive (with a backup to my NAS...)

Sjoerd


----------



## AOJ

Hi people, first post here ... and you know why, as you can imagine :(

I was working with Lr doing some brush adjustments, when suddenly a light shortage occurred. Now my catalog is corrupt, and none of what I've tried has worked (the usual new catalog and import, doesn't work nor anything found on the internet right now).
Trying SQLite3 dump and init commands doesn't solve the problem:

echo .dump | ./sqlite3 ~/lightroom_catalog.lrcat > ~/lightroom_catalog.sql
seems ok, having an sql file a little bigger than the .lrcat . Then: 
./sqlite3 -init ~/lightroom_catalog.sql ~/lightroom_catalog_restore.lrcat
 gives me an Error: incomplete SQL:  ■P"

Certainly I'm a bit desesperate, and I have no backup of the catalog (stupid wifi auto backup programs ...)
Your help will be MUCH appreciated. Using Lr 5.3 on Windows 10. 170Mb catalog file.


----------



## hassiman

*Not exactly sure what I am dealing wth her... any ideas?*






  I am in a bit of a pickle.  I have been having NO trouble with LR CC 2015.

  Two weeks ago I got back from a short vacation and imported 277 RAW NEF files from my Nikon D810 into LR CC.  I THOUGHT everything was fine until the next day when I took the same 64GB SanDisk SD card to work to copy the files to my work computer… It said that the files on the SD cared were corrupt and unreadable.  Yikes!

  I went home and started up the MacPro ( New MacPro 4 core, running 16GB RAM and Yosemite. ) Connected the calDigit Thunderbolt 2 RAID 1 TS external which houses my LRCAT data and had a look.  In the Library Module Loupe View You could see the loupe views BUT also a full image display behind the image tiles ( as shown in the attached screen shot. ).  Strangely enough when the library view is open as shown on the images the loupe tile will move around when my mouse cursor moves across the Loupe view display area… 
	

	
	
		
		

		
		
	


	





  Fortunately the NEF files themselves are all there and can be opened.  I was able to find them and copy all 277 files onto a flash drive.

  I was wondering if I should DELETE all 277 images from the LR Catalog through LR and re-import from the flash drive?  

  Some people have said I should delete my LR CC Preference file but I am hoping to avoid that.  I seems as though all of my previously imported files display just normally.

  I was trying to figure out just what happened and all I can think of is that the SanDisk 64GB SD card was an *SDXC *card and with that reader ( 5 years old.) I had only previously used 8 & 32 GB  *SDHC* cards.  Bought a new Hoodman reader…

  What do you think I should do?  REMOVE and re-import from the folders already there?  Delete and re-import from the Flash drive?  Delete the Preference file?  If I have to delete the preference file will I need to re-do the Copyright preset that is applied to all of my images on import?

  Thanks for your time.


----------



## Jim Wilde

If you think the problem was caused by a faulty card reader, and if you still have the original images on the SD card, why not do what was suggested in your other thread? Select the "Previous Import" or, if you've done other imports since, find the folder containing those 277 images, select them all, right-click, select Remove, use the Delete from Disk option.

Before re-importing, does that removal clear up the problem? BTW, is that "chequer-board effect" actually on the screen, or it it just an odd effect from taking a picture of the screen? 

If the problem seems cleared, re-import using the new card reader. 

No, you wouldn't lose your copyright preset if you trash the preferences file....see here.


----------



## hassiman

Thanks Jim.... I will give it a shot.  The original files on the SD card were totally corrupted... even my D810 could not read then so I re-formatted in the camera.  I WAS able to go into my LR catalog area and find those files and copied them to a thumb drive.
So what you are saying is to use the option that will totally delete the imported files from the hard drive and then re-import them from the thumb drive as the originals on the SDXC card no longer exist, correct?


----------



## Jim Wilde

Yes, but if the originals on the sD card are totally corrupted, I'm not sure how the copy of the files on the thumb drive are going to be OK?


----------



## swubbe

*Thanks!*

Maybe not the right place to post, but I just downloaded my repaired catalog and all is well.
Big thank you to the person(s) who helped me out!

~

Sjoerd


----------



## Victoria Bampton

Happy to help Sjoerd! Love the minion!


----------



## RCD

*Another corrupt catalog problem*

I just processed a new batch of photos in Lightroom CC. Was able to edit and deleted photos just fine. I then removed my SD card while Lightroom was still up. All my files and catalog are installed on a Drobo. I think in removing the SD card from my laptop I lifted the edge of it and possibly the connection to the Drobo was lost. I say that because doing troubleshooting a short time later, checking the status of the Drobo it wasn't connected. The long and short is my catalog is corrupt and needs to be fixed. I've tried all the suggestions to no avail. Backups are done weekly but it is corrupt as well. Can I send my catalog file in to have someone look at it? Any help would be most appreciated.

thanks 
Bob


----------



## Victoria Bampton

Yikes.  I can pass it on to my contact at Adobe (he might be at the Max conference this week). Zip up the lrcat file and use www.wetransfer.com or Dropbox to send it to [email protected].

How come the backup's corrupt too?


----------



## Ferdinand

*HELP*

I needed to recover my LR catalog because of a system crash. I got the file back, but it seems to be corrupted. I also restored my backup folder, but the backups seem to be corrupted, too. 

Is there any chance, that i can send my file to any of you guys in order to repair it?

Oh it is a LR 5.6 catalog and i am working on a windows 7 64-bit system.

Got quite an amount of work in that catalog...


Ferdinand


----------



## Victoria Bampton

Yep, follow the instructions above and the magician will see what he can do, but whether it's repairable will depend on how the corruption was caused.  You didn't have a backup on another hard drive I guess?


----------



## Ferdinand

Thank you very much!

No unfortunately i did not... :/


----------



## Ukdalr

Hi Victoria,  I am hoping you can get your Lightroom wizard assist with the recovery of my catalog. I just finished culling a whole stack of images from a recent wedding, I subsequently had my pc lose power on the same day - resulting the "not recoginsed as a valid catalog" issue.  Unfortunately, the backup doesn't contain my most recent updates that I made over the last 3-4 days. Would greatly appreciate any assistance!


----------



## Amraiz Yasin

*Hi Lightroom Queen. I have all my fingers, legs and toes crossed that you can help me. A lovely guy from Germany called Holger has been looking at my corrupt catalog and has been trying to fix it with the SQLight tools / processes. Unfortunately he is struggling somewhat and has referred me to yourselves as the best way to go, I have literally thousands of images that have been edited but not exported as full res JPEGS. Nor have I backuped up the catalog.
Sadly my external hardrive failed and once most of the files were recovered, the lightroom cataolg has not loaded since and I'm very stressed as to how I can fix this. please please help.

*


----------



## holgermischke

Amraiz Yasin said:


> *Hi Lightroom Queen. I have all my fingers, legs and toes crossed that you can help me. A lovely guy from Germany called Holger has been looking at my corrupt catalog and has been trying to fix it with the SQLight tools / processes. Unfortunately he is struggling somewhat and has referred me to yourselves as the best way to go, I have literally thousands of images that have been edited but not exported as full res JPEGS. Nor have I backuped up the catalog.
> Sadly my external hardrive failed and once most of the files were recovered, the lightroom cataolg has not loaded since and I'm very stressed as to how I can fix this. please please help.
> *


Just to provide more info: Amraiz could not open the file anymore. After the recreation of the LRCAT file using sqlite it was only about170 MB (the original file was 417 MB). I managed to open it in Lightroom 5.7.1, but there was nothing there. No reference to any photos at all. I looked at the SQL file extracted from the original catalog file, tried the same procedure without the transaction commands, but still - no images. I hope you all can help Amraiz.


----------



## Victoria Bampton

Hi Amraiz & Holger, welcome to the forum!

No backup catalogs anywhere to be found?  Perhaps on another drive?

If you'd like to zip the original file and send it to using www.wetransfer.com to [email protected], I'll pass it on to a Lightroom engineer, who has the best shot at recovering it, if it's recoverable.


----------



## Amraiz Yasin

Victoria Bampton said:


> Hi Amraiz & Holger, welcome to the forum!
> 
> No backup catalogs anywhere to be found?  Perhaps on another drive?
> 
> If you'd like to zip the original file and send it to using www.wetransfer.com to [email protected], I'll pass it on to a Lightroom engineer, who has the best shot at recovering it, if it's recoverable.




Hi Victoria, thank you so much for the taking the time to reply. sadly I never new the value of backing up the catalog and always 'skipped' that option when closing the application. something I will no doubt live to regret  .

Thanks for email address, I will the original file via we transfer to you.

Admittedly I really didn't think i'd get a response on this forum so I'm really happy that there really are kind people in the world that genuinely like to try and help where they can. Thank you


----------



## Johan Elzenga

Amraiz Yasin said:


> Hi Victoria, thank you so much for the taking the time to reply. sadly I never new the value of backing up the catalog and always 'skipped' that option when closing the application. something I will no doubt live to regret :(.
> 
> Thanks for email address, I will the original file via we transfer to you.
> 
> Admittedly I really didn't think i'd get a response on this forum so I'm really happy that there really are kind people in the world that genuinely like to try and help where they can. Thank you



As you use a Macintosh, don't you have a Time Machine backup? If you don't, buy an external HD *today* and start making backups! No doubt you have more valuable stuff on your HD than just a Lightroom catalog...


----------



## Tomiron

Trying to open a corrupt catalog of mine makes LR freeze forcing me to kill the actual LR-process to proceed. I also need to delete the preference files to start LR again. It is not possible to import any data from the corrupted catalog to a new one. (My latest backup catalog works just fine though, but lacks quite a few hours of work...)

Is there by any chance a way to check integrity or do any other kind of catalogue repair of corrupted catalogs that doesn't open in LR? If I'd been more of a tech-pro I'd might been successful in using sqlite3 or sqlite analyzer to check the database. Now is that not the case..

I'm aware of that holding down the Alt-key (on Win) or Opt-key (on Mac) while simultaneously clicking on the LR icon in the dock cause LR to open but not to open the default catalog. Instead it shows a dialog with a list of available catalogs and an option to create check integrity of each catalog. In my case - this doesn't work. If I choose my corrupted catalog following this procedure this will still cause LR to crash.

Working in LR 4, Win7 64 bit, 4GB RAM, accessing catalog and previews from an external drive, images stored on a multiHD-NAS.


----------



## Amraiz Yasin

JohanElzenga said:


> As you use a Macintosh, don't you have a Time Machine backup? If you don't, buy an external HD *today* and start making backups! No doubt you have more valuable stuff on your HD than just a Lightroom catalog...



Hi Johan, Yes, your very right and I have now started this process. I bought I new hard drive to replace the damaged one so know all the files that were recovered via a DataRecovery company have now been transferred on to my new portable HD. I have also now got another to back up the external HD. Also as an even more back up.. I have just signed upto to BACKBLAZE, an unlimited online cloud storage so that a another backup can be made.


----------



## Amraiz Yasin

Amraiz Yasin said:


> Hi Johan, Yes, your very right and I have now started this process. I bought I new hard drive to replace the damaged one so know all the files that were recovered via a DataRecovery company have now been transferred on to my new portable HD. I have also now got another to back up the external HD. Also as an even more back up.. I have just signed upto to BACKBLAZE, an unlimited online cloud storage so that a another backup can be made.


sadly I did not have a time machine back up.


----------



## Victoria Bampton

Amraiz Yasin said:


> Also as an even more back up



Very sensible. You can't have too many backups!


----------



## Amraiz Yasin

Victoria Bampton said:


> Hi Amraiz & Holger, welcome to the forum!
> 
> No backup catalogs anywhere to be found?  Perhaps on another drive?
> 
> If you'd like to zip the original file and send it to using www.wetransfer.com to [email protected], I'll pass it on to a Lightroom engineer, who has the best shot at recovering it, if it's recoverable.



Hi Victoria, just wanted to let you know that I have sent the files yesterday via wetransfer. Pls do let me know if you receive them . Many Thanks


----------



## Victoria Bampton

Got them and forwarded to Paul. I'll let you know when I hear back (obviously he's off at weekends).


----------



## Violet_Golish

Hi Victoria and all,

I have the same problem as many before me - my Lightroom catalog got corrupted and I'm looking for some help...
Lightroom isn't able to repair the catalog file on its own - it asserts and crashes when I attempt that. I tried the SQLite dump/recreate option and it seems the DB is structurally fine, the dump looks to contain a ton of useful information (history of photo edits etc.) but some indices/SQL constraints seem corrupted - here's what I get when I'm importing the SQL dump file to a new DB:

Error: near line 3154091: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154092: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154093: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154094: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154700: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154701: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154702: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154703: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154704: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154705: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154706: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154707: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154708: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154709: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154710: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154711: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154712: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154713: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 85489365: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489366: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489367: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489368: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489369: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489370: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489371: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489372: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489373: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489374: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489375: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489376: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489377: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489378: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489379: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489380: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489381: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489382: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489383: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489384: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489385: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489386: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489387: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489388: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489389: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489390: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489391: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489392: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489393: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489394: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85527105: UNIQUE constraint failed: AgLibraryImageSyncedAssetData.image, AgLibraryImageSyncedAssetData.payloadKey

Any hints how to debug this further and restore as much information as possible? Alternatively, if a Lightroom engineer could take a look, that would be even better!

I uploaded my corrupted catalog file (~2.38 GB) and the SQL DB dump (~1.94 GB) here:
http://szef.niente.eu.org/~kinia/LR/catalog.lrcat
http://szef.niente.eu.org/~kinia/LR/catalog.sql

Thanks,
Violet.


----------



## Victoria Bampton

I've forwarded it to the engineer Violet.


----------



## Violet_Golish

Victoria Bampton said:


> I've forwarded it to the engineer Violet.


Great, thanks a lot! Let me know how it goes


----------



## Victoria Bampton

Your catalog's on its way back to your outlook email address. Paul said "I was able to recover the majority of the catalog, but there was some corruption in some critical areas so some images may no longer be in the catalog."


----------



## Violet_Golish

That's great news, thanks for your help and quick turnaround!


----------



## Violet_Golish

Victoria, sorry to follow up on this so late but I was only now able to rebuild my OS after a hard disk failure (that's what caused the catalog corruption in the first place, it seems) and try out the repaired catalog. I'm still getting an "assertion failed!" pop-up when trying to open the repaired file, sometimes (but not always which is odd) followed by Lightroom crashing. Any hints how to debug this further? Did the repaired catalog open fine for Paul?

Thanks,
Violet.


----------



## Victoria Bampton

He likely ran it through his repair tools, rather than opening in Lightroom. I've just tried it and it's not looking good here either. It may be the end of the road for the catalog, but I've just pinged him to check whether he has any more ideas.


----------



## Victoria Bampton

Paul's just emailed back. He gave your catalog another shot but said it turned out it was corrupted beyond repair, sorry.


----------



## Violet_Golish

Thanks for your help anyway. 
FWIW: I managed to restore some of the most critical data myself (edits history was what was important for me) by creating a new empty catalog, importing all the original photos into it and transferring the contents of one of the tables from the old catalog to the new one while adjusting file/image IDs. It's not ideal but it's better than losing all the data


----------



## Pekka Reittila

Hi, i have a backup problem propably because of corrupted catalog. I have tried all basic "tricks" but with no success. Here's a screen shot Dropbox - Screenshot 2016-12-10 11.31.08.png 
My other catalogs work fine with same backup disk and folder so it's not disk space issue I think.


----------



## Victoria Bampton

Have you tried backing up to another location, just to humor it? Has this catalog always had issues?


----------



## Pekka Reittila

Yes I have and I also have made a blank new catalog and tried to import the bad one to that. I have also tried to restore from backups but nothing helps.
I noticed this problem after I uppgraded to LR 2015.8. Before that the catalog worked just fine.


----------



## Victoria Bampton

A long shot... what happens if you rename it, removing the ä characters from the name? I'm wondering if there's a bug with accented characters.


----------



## Pekka Reittila

Hi, tried that but didn't help. It wasn't a problem before either. I have of course file and disk backups which are essential in this situation, but of course Light Room's own backup should work too.
Any more ideas ?
Edit: May be i'Il just try to make a new catalog and import the bad one piece by piece so that I can find out what part of the catalog is the cause for the problem...i'll let you know what happens.


----------



## Victoria Bampton

Zip it up and use www.wetransfer.com to send it to me at [email protected] and I'll try it here.


----------



## Pekka Reittila

Hi, did that. Hopefully something can be done  Thank's for quick replies. Goin to shoot some photos meanwhile  Seems to take a while before the upload is done...


----------



## Victoria Bampton

Well the good news - or the bad news - is it backs up perfectly on my Mac but not on my Windows 10 VM. With your permission, I'll attach the catalog (no previews) to the bug so the engineers can reproduce it easily.


----------



## Pekka Reittila

Yes please do that


----------



## Victoria Bampton

Pekka, we have a short-term fix and they'll put the proper fix in the next release. Chandan's posted it publicly in this thread: Warning message on Backup LRCC2015.8 | Photoshop Family Customer Community


----------



## Pekka Reittila

Hello Victoria. First of all thank's for help. I downloaded and copied the config.lua as instructed and it seems to do the job. Excellent   Waiting for the final fix though  One happy man here


----------



## Tomiron

Trying to open a corrupt catalog of mine makes LR freeze forcing me to kill the actual LR-process to proceed. I also need to delete the preference files to start LR again. It is not possible to import any data from the corrupted catalog to a new one. (My latest backup catalog works just fine though, but lacks quite a few hours of work...)

Is there by any chance a way to check integrity or do any other kind of catalogue repair of corrupted catalogs that doesn't open in LR? If I'd been more of a tech-pro I'd might been successful in using sqlite3 or sqlite analyzer to check the database. Now is that not the case..

I'm aware of that holding down the Alt-key (on Win) or Opt-key (on Mac) while simultaneously clicking on the LR icon in the dock cause LR to open but not to open the default catalog. Instead it shows a dialog with a list of available catalogs and an option to create check integrity of each catalog. In my case - this doesn't work. If I choose my corrupted catalog following this procedure this will still cause LR to crash.

Working in LR 4, Win7 64 bit, 4GB RAM, accessing catalog and previews from an external drive, images stored on a multiHD-NAS.


----------



## PamElla

I too have a corrupt LR Catalogue from my desktop crashing.   I've tried the SQLite, but now at the end of the process that I was VERY hopeful would be successful, is a huge body of lines  reading "Error: near line 335733: Expression tree is too large (maximum depth 1000)   (and the 334733 is only one of a gazillion lines with a different number.)   Have I lost all hope at recovering this catalog?  The file is not empty, and what was rebuilt is  also about 792,112 kb, so there is data.   Can anyone help?   Thank you.  I'm new here.


----------



## Victoria Bampton

You're welcome to zip up the catalog (one you haven't played with) and send it to me using www.wetransfer.com to [email protected] and I'll see if the LR engineer has any better luck with it.


----------



## PamElla

Oh Thank you SO much!  Yes, I will upload it this morning!  I truly appreciate it and will be forever grateful if it can be recovered.   
Just the catalog, or do you need preview files or anything?


----------



## Victoria Bampton

Got it Pam. I've forwarded it to the engineer, but it doesn't look promising here, so I think it's probably time to restore one of your backups. (I hope you had backups!!)


----------



## PamElla

um.... no backups...  that's why I'm frantic   Otherwise I would've done that first.


----------



## Victoria Bampton

PamElla said:


> um.... no backups...  that's why I'm frantic   Otherwise I would've done that first.


Oh dear, so sorry to hear that. I guess you'll be paranoid about backups in future!


----------



## PamElla

YES I am.... I have multiple drives and multiple catalogs.  Some are individual, some are a part of a master.  I don't know why, but it was a habit to always skip backups.   Stupid, I know.... don't need scolding, (and you didn't) the thought of losing all of that work is punishment enough.  And I know better, I have also lost whole drives --- one to dropping, the other to just malfunction.  At least the actual image files are all backed up now.  (and yes, DriveSavers recovered the broken one.  The other one just started working again and was backed up immediately)


----------



## PamElla

Victoria Bampton said:


> Got it Pam. I've forwarded it to the engineer, but it doesn't look promising here, so I think it's probably time to restore one of your backups. (I hope you had backups!!)


Thank you so much!   I do appreciate you forwarding it on and looking at it.   I am definitely going to back up from now on, probably as I work.  This is HORRIBLE.  I'm just getting started as a new sole proprietor and I'm at a level of production I didn't expect.  This is crashing and burning before I ever get started.  Ugggh!   Thank you again.  I am so appreciative of your response.


----------



## Victoria Bampton

Oh so sorry to hear that Pam. It's a stressful time for sure!


----------



## Victoria Bampton

In case it helps you get back on your feet, there are companies that can handle the raw processing for you, albeit at a cost.


----------



## Victoria Bampton

Oh PamElla, I've just heard back from Paul. He said he saw your post on the Adobe Forums and has already sent you back a partially repaired catalog. He's not sure how much was lost, as it was badly corrupted, but it's a much better scenario than we hoped for.


----------



## PamElla

It's fixed It's fixed It's fixed!!!!


----------



## PamElla

So far I've only noticed a copy of an edited image was not recoverable.    I've lost not much!  I'm completely over the moon!  Thank you Thank youthank you!!!!!


----------



## RikkFlohr

Paul rocks!  Glad  he was able to get most of it restored.


----------



## PamElla

YES he does!   I'm afraid I ran into an individual who was quite the opposite of Paul, and was not helpful at all.   (actually he was a jerk, and if he is a representative of Adobe, he is a very poor one.)   I gave him that feedback!  Thank you!  this forum was way more friendly!  Thank you!


----------



## Victoria Bampton

PamElla said:


> I'm afraid I ran into an individual who was quite the opposite of Paul, and was not helpful at all.   (actually he was a jerk, and if he is a representative of Adobe, he is a very poor one.)   I gave him that feedback!  Thank you!  this forum was way more friendly!  Thank you!



Thank you, we do our best. We pride ourselves on always being friendly, even if we can't solve the problem (although sometimes don't come over in writing in quite the way we intended!). 

The official Adobe forums get an awful lot of traffic, and sometimes in a rush to cover all posts, things are said without thinking. I've known Jim online a long time, and he's not a bad guy, but yes, he did dig himself into a hole this time. Isn't it always at the worst times, too?!

Anyway, make yourself at home, and hopefully we can help you avoid any further problems. I'm glad it all worked out ok in the end.


----------



## johnbeardy

Having read the exchange, obviously things went on a spiral, but I do feel it's important to avoid mistaking direct questions for rudeness.


----------



## holgermischke

Does anyone have experience with rebuilding catalog files that weren't corrupt to begin with, but were accidentally deleted and the recovered and THAT actually hurt them? I've had no luck rebuilding these catalogs using SQLite in a couple of cases and it seems when you recover a deleted catalog file, it doesn't have the original data. Can anyone confirm that?


----------



## Jim Wilde

I think the only person who might be able to confirm this would be Victoria's contact at Adobe (and Victoria's away at the moment so unlikely to be able to ask him), though from my own experience of such issues I can't recall a catalog being restored successfully after being recovered by a file recovery utility. Some of the other long-standing members here might have a different recollection.


----------



## holgermischke

Hi Jim. Thanks for the quick response. That's exactly what i thought. When i tried rebuilding, it wouldn't even let me open the database in a database viewer. The viewer always asked for a password as it considered the file to be encrypted. I also asked on Stackoverflow and people much more experienced with SQL databases said that a recovery utility would only produce a file full of "garbage data" and it just would not contain the original data. Just what you said. Thanks for confirming so i won't waste more time with those recovered catalogs.


----------



## johnbeardy

Normally, Holger, one would not expect the LR database to be password protected. FYI.


----------



## holgermischke

John, it's not that the Lightroom database is password protected. It's what the recover utility does with the database during the process what makes the database viewer "think" it would be encrypted and password protected. FYI.


----------



## nordychic

holgermischke said:


> Does anyone have experience with rebuilding catalog files that weren't corrupt to begin with, but were accidentally deleted and the recovered and THAT actually hurt them? I've had no luck rebuilding these catalogs using SQLite in a couple of cases and it seems when you recover a deleted catalog file, it doesn't have the original data. Can anyone confirm that?



I've been scouring the internet for over a day trying to figure out how to recover my deleted lrcat (I don't recall deleting it, but it's definitely not on my harddrive, nor are my backup files!) ugh. I downloaded Disk Drill and it recovered many lrcat files - but now I don't know what to do with them (nor figure out which is my last one used). I do have a time machine back up from about a week ago, but I am trying to recover edits from a wedding I just finished yesterday (fingers crossed). Any help would be appreciated. Worst off, I will have to re-edit that wedding and half of another.


----------



## jebir

Upgraded my Windows 10 the day before yesterday and used Lightroom for the first time yetserday. No problems to open the latest catalog (named "2015-2017") and worked for a long time cataloging and deleting a backlog of work. I left the computer with LR opened during the night and it seems like the computer switched off unexpectedly during the night. 
Now this morning, I get the message: The catalog is damaged and that Lightroom will try to repair it. When I click OK and it tries to repair but gets back with the message that it failed and can make a new try. It never succeeds no matter how many tries I ask LR to do. 
So, I first got the impression that something had happened to the catalog "2015-2017" which is my current catalog but then I tried to start Lightroom by opening another catalog that had not been used since a long time back and it behaved exactly the same way. Tried a third catalog, also not used in a while, and it gives the same error messages and suggestions to repair the catalogs. This indicates that the fault is not actually a corrupt catalog but rather somewhere in Lightrooms startup procedure. Could that be the case?
I have tried to search the internet for a solution but never come across this situation where all catalogs give the same error. 

I don't want to fiddle around trying to repair catalogs if the fault is somewhere else. Please give me an advice on how to proceed.

Best regards, Jens Birch


----------



## Johan Elzenga

Could be the Lightroom preferences. How do I reset Lightroom's Preferences? - The Lightroom Queen


----------



## Tomiron

Trying to open a corrupt catalog of mine makes LR freeze forcing me to kill the actual LR-process to proceed. I also need to delete the preference files to start LR again. It is not possible to import any data from the corrupted catalog to a new one. (My latest backup catalog works just fine though, but lacks quite a few hours of work...)

Is there by any chance a way to check integrity or do any other kind of catalogue repair of corrupted catalogs that doesn't open in LR? If I'd been more of a tech-pro I'd might been successful in using sqlite3 or sqlite analyzer to check the database. Now is that not the case..

I'm aware of that holding down the Alt-key (on Win) or Opt-key (on Mac) while simultaneously clicking on the LR icon in the dock cause LR to open but not to open the default catalog. Instead it shows a dialog with a list of available catalogs and an option to create check integrity of each catalog. In my case - this doesn't work. If I choose my corrupted catalog following this procedure this will still cause LR to crash.

Working in LR 4, Win7 64 bit, 4GB RAM, accessing catalog and previews from an external drive, images stored on a multiHD-NAS.


----------



## jebir

Thanks for the tip JohanElzenga. I tried that but it still behaves the same way...

I am clueless how to now find a parrticular photo amongst the >500 000 that I have on the harddrives.


----------



## Johan Elzenga

Next thing to try is uninstall Lightroom and reinstall it again.


----------



## jebir

OK, just a little feedback on how I (didn't) solve the problem:
After resetting LR, I managed to start it by doubleklicking an old catalog that I had not tried to open after the problem started. Before trying to open the "2015-2017" catalog (that was open when the computer was unexpectedly shut down), I could open all other catalogs, but when i finally came to "2015-2017" the same thing happened. Since trying to open this catalog might had caused LR into the state where it wouldn't open any catalogs, I exited LR and then tried starting from the latest (2 weeks old) "2015-2017" backup, which worked. So, instead of hazzling with repairing a very large catalog file, I decided to just re-do the indexing for the past 2 weeks. 

I have been using XMP-sidecars and PNGs so any editing should be recoverable. A question in this regard is if I will have to re-import the edited files to LR in order to see the editing history?


----------



## Jim Wilde

Edit history is one of the things that are NOT included in XMP, so no point in re-importing them for that purpose.


----------



## jebir

OK, yes, you are right, I just meant the latest editing status. Do I need to import again for LR to recognize that if I am using XMP and/or PNG?

Thanks, Jens


----------



## Jim Wilde

If you're using a backup catalog, then you'll need to import any images added since the backup was originally mad. And if you had imported those images into the original catalog, and edited them, AND saved XMP, then yes the edits should be recovered.


----------



## jebir

OK, thanks. Then I'm fine now.


----------



## Alex.krotkov

Hi All, 
I'm having this "not valid" catalog problem, and have gone through the SQLITE process. 
On the final step of "-init", it gave me this text below, and the new .lrcat file in the folder is 0 bytes large.  
Does anyone know what I did wrong and how to fix it? 
Thank you very much in advance!



> Error: near line 325698: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325699: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325700: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325701: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325702: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325703: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325704: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325705: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325706: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325707: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325708: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325709: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325710: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325711: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325712: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325713: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325714: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325715: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325716: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325717: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325718: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325719: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325720: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325721: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325722: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325723: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325724: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325725: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325726: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325727: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325728: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325729: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325730: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325731: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325732: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325733: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325734: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325735: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325736: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325737: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325738: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325739: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325740: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325741: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325742: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325743: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325744: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325745: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325746: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325747: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325748: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325749: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325750: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325751: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325752: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325753: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325754: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325755: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325756: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325757: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325758: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325759: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325760: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325761: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325762: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325763: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325764: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325765: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325766: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325767: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325768: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325769: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325770: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325771: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325772: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325773: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325774: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325775: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325776: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325777: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325778: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325779: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325780: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325781: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325782: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325783: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325784: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325785: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325786: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325787: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325788: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325789: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325790: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325791: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325792: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325793: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325794: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325795: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325796: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325797: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325798: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325799: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325800: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325801: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325802: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325803: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325804: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325805: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325806: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325807: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325808: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325809: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325810: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325811: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325812: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325813: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325814: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325815: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325816: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325817: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325818: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325819: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325820: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325821: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325822: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325823: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325824: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325825: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325826: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325827: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325828: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325829: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325830: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325831: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325832: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325833: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325834: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325835: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325836: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325837: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325838: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325839: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325840: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325841: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image
> 
> Error: near line 325842: NOT NULL constraint failed: AgLibraryImageSyncedAssetData.image


----------



## Victoria Bampton

Hi Alex, welcome to the forum!  We can't give advice on directly editing the database, because it can cause all sorts of unknown issues. However if you want to send me the problem catalog, I can pass it on to the LR engineer at Adobe to see if he can rescue it for you.


----------



## Alex.krotkov

Victoria Bampton said:


> Hi Alex, welcome to the forum!  We can't give advice on directly editing the database, because it can cause all sorts of unknown issues. However if you want to send me the problem catalog, I can pass it on to the LR engineer at Adobe to see if he can rescue it for you.


Hi Victoria! Thank you very much for such a prompt reply! Uploading it right away, could you please let me know if you received the link?


----------



## Victoria Bampton

Got it Alex, and forwarded it on to Paul at Adobe. I'll let you know by email when I hear back.


----------



## Alex.krotkov

Victoria Bampton said:


> Got it Alex, and forwarded it on to Paul at Adobe. I'll let you know by email when I hear back.


Thank you so much Victoria! Hope it works


----------



## Alex.krotkov

Victoria, I can't express how thankful I am, you and the engineers saved me! The fixed file works, haven't found any corrupt files so far, thank you very very much, Lightroom Queen   



Victoria Bampton said:


> Got it Alex, and forwarded it on to Paul at Adobe. I'll let you know by email when I hear back.


----------



## PhilBurton

Alex.krotkov said:


> Victoria, I can't express how thankful I am, you and the engineers saved me! The fixed file works, haven't found any corrupt files so far, thank you very very much, Lightroom Queen


Victoria,

The fix must involve some cleanup and repair of the sqlite database file.  Would it be possible for Adobe to provide users with some guidelines to fix the most common problems? There are several people in this forum (and I'm not one of them) who could easily fix the database with some guidance from Adobe.

Phil


----------



## Victoria Bampton

They decided to keep it in-house so they can see any patterns of corruption and prevent/automatically fix them in future releases.


----------



## Adam Gibson

I can't believe I've just now discovered this forum! So thankful. I’ve followed Holger Mischke's SQLite tutorial several times but end up stuck.  Below is final my result after successfully completing the first steps. There are a few hundred lines below that I didn’t paste but are similar to the last lines. Once the new file is created it is zero bytes. I’d be grateful for any advice!

C:\SQLite>sqlite3 -init tempfile.sql NewFile.lrcat
-- Loading resources from tempfile.sql
Error: near line 122: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 123: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 124: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 125: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 126: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 127: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 128: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 129: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 130: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 150: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 151: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 152: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 153: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 154: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 155: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 156: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 157: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 158: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 159: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 160: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 161: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 162: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 170: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 171: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 172: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 173: UNIQUE constraint failed: Adobe_variablesTable.id_local
Error: near line 1415102: no such table: sqlite_stat4
Error: near line 1415103: no such table: sqlite_stat4
Error: near line 1415104: no such table: sqlite_stat4
Error: near line 1415105: no such table: sqlite_stat4


----------



## Victoria Bampton

Hi Adam. We're unable to help troubleshoot SQLite tricks, but if you want to send me the catalog, I'll pass it on to the Adobe engineer to see if it's possible to rescue.


----------



## Adam Gibson

Absolutely! Thank you so much!


----------



## Adam Gibson

Thanks so much! Please let me know when you've received it.


----------



## Victoria Bampton

Done and returned!


----------



## Adam Gibson

What a day. It's in perfect shape as far as I can tell. I am incredibly grateful!


----------



## PhilBurton

Adam Gibson said:


> What a day. It's in perfect shape as far as I can tell. I am incredibly grateful!


I'm happy that Adam's catalog got fixed.  I can only hope that I never need the kind of service Adam received.

Considering all the AI that Adobe has used in LR 7 for the AUTO exposure settings (which work very well for me!), perhaps Adobe can release a repair tool based on AI and their experience with repairing corrupted databases.  A database gets corrupted because of some subtle combination of workflow that has not been tested, perhaps a very subtle bug, or perhaps some user action that caused the corruption.  Whatever the cause, AI can probably identify the most common patterns and fixes.

Phil Burton


----------



## Victoria Bampton

PhilBurton said:


> perhaps Adobe can release a repair tool based on AI and their experience with repairing corrupted databases



They've actually been doing that for years, not as a separate tool, but as part of the catalog repair process built into Lightroom. That's why we're seeing fewer and fewer cases these days, and why they still want to see the corrupted catalogs. There's more real intelligence involved than artificial, but the principle's the same.


----------



## PhilBurton

That's a great answer.  Really.


----------



## Aimevous

Hi Victoria, 

I have a Catalog that got corrupted after I did a force shutdown on my computer and I haven't been able to repair the file.
Do you think you can assist me?

ses2018.lrcat

Thanks!


----------



## Tomiron

Trying to open a corrupt catalog of mine makes LR freeze forcing me to kill the actual LR-process to proceed. I also need to delete the preference files to start LR again. It is not possible to import any data from the corrupted catalog to a new one. (My latest backup catalog works just fine though, but lacks quite a few hours of work...)

Is there by any chance a way to check integrity or do any other kind of catalogue repair of corrupted catalogs that doesn't open in LR? If I'd been more of a tech-pro I'd might been successful in using sqlite3 or sqlite analyzer to check the database. Now is that not the case..

I'm aware of that holding down the Alt-key (on Win) or Opt-key (on Mac) while simultaneously clicking on the LR icon in the dock cause LR to open but not to open the default catalog. Instead it shows a dialog with a list of available catalogs and an option to create check integrity of each catalog. In my case - this doesn't work. If I choose my corrupted catalog following this procedure this will still cause LR to crash.

Working in LR 4, Win7 64 bit, 4GB RAM, accessing catalog and previews from an external drive, images stored on a multiHD-NAS.


----------



## Victoria Bampton

Aimevous said:


> I have a Catalog that got corrupted after I did a force shutdown on my computer and I haven't been able to repair the file.
> Do you think you can assist me?


I've downloaded and forward it. Adobe US are shut down this week for annual vacation, so there may be a delay in getting it back to you.


----------



## Aimevous

No worries, any help will be greatly appreciated! thanks!


----------



## Victoria Bampton

Aimevous said:


> No worries, any help will be greatly appreciated! thanks!


He wasn't able to recover that one, sorry Aimevous.


----------



## Aimevous

oh darn. thanks anyway...


----------



## Nunki

Hi Victoria, 

I foolishly used my LR5 catalog on a friend's computer that had LR CC installed. The catalog got upgraded and now I can't downgrade it back to be used in LR5.
I've tried the SQLite approach, but it;s still not recognising it.

Any ideas?

Thanks!


----------



## Johan Elzenga

An upgraded catalog is always a copy. The original should still be in the same place too.


----------



## Kumagera

djeebah said:


> HURRAY!!!
> It was a space in front of the "echo" command
> After converting the lrcat into sql , I tried to convert it back to lrcat, but after two errors
> Error: near line 7895330: PRIMARY KEY must be unique
> Error: near line 7895580: PRIMARY KEY must be unique
> it saved a zero bytes lrcat file.
> 
> So what I did was, I opened the sql file in notepad and modified the last line from
> ROLLBACK; — due to errors
> with the line:
> COMMIT TRANSACTION;
> And THEN do the
> C:\SQLite>sqlite3 -init tempdbase.sql dbaseRecovered.lrcat
> and... SUCCESS!!!




AWESOME! this was the info I needed to finally recover my corrupt catalog... (after days of trying) 

This!

_ROLLBACK; — due to errors
with the line:
COMMIT TRANSACTION;
And THEN do the
C:\SQLite>sqlite3 -init tempdbase.sql dbaseRecovered.lrcat_

Thank you very much djeebah, YOU ROCK!


----------



## Stubac

I had a corrupt catalog.  Devastating to think what I could have lost, and has taken hours of research and trial and error but I have got my catalog back and as far as I can tell, I have not lost anything.  

Thanks very much to this forum for getting me started.  I found lots of great ideas through the 6 or so years this catalog corruption has been happening to people.  After the start I got here, I wanted to help people find resources they might find useful.  Some I found through this forum, some by my own searches.

Notes:  Remember that once you are in trouble, stop and think before you do anything.  As soon as my catalog became corrupt, I decided to backup in my usual way, and immediately overwrote what might have been a working recent version of my catalog with the newly corrupt one.  Bother - or words like that!!

Before you start working to try to repair your catalog, take copies (maybe a few copies) of your catalog and work with the copies - not with your originals which you still have and which you may be able to repair fairly easily.  Try the simplest fix options first.  Look at this blog - "Disaster strikes – a corrupted catalog!" - Disaster strikes - a corrupted catalog! | The Lightroom Queen.  It is a good place to start, and will get you thinking in appropriate ways.  From this page, I learnt where to find my backups, and starting to use a recent backup (three shoots-1000 edited pictures - missing in my case) was a great start.  At least you can feel that you are working again and Lightroom will start with a LOT of your work.  I felt better, but was still missing work.  

Look at some of these pages so you can find alternate solutions, and understand what you are trying to do:

How I repaired my corrupt CATALOGUE 
How I Repaired My Corrupt Lightroom Catalog

Recovering corrupt Lightroom Catalogs
Connections: Recovering corrupt Lightroom catalogs
Important idea - look for ROLLBACK; at the end of your SQL file.

Recover from a corrupt Adobe Lightroom catalog file
Recover from a corrupt Adobe Lightroom catalog file

I tried several of the things mentioned above, but my catalog was still corrupt.  In the end, the way I fixed my corrupt catalog was:
Note - These notes are based on working in windows. These notes do not go into how to work in the command shell. These instructions assume a fairly good level of computer knowledge and understanding.
For Reference, this happened in December 2018 with version Lightroom Classic version: 8.0 [ 1193777 ] License: Creative Cloud. The size of the catalog was just over 1 GB

1.  I downloaded and installed the command line version of SQLite3 - DB Browser for SQLite  Check install instructions, because it is vaguely complicated.  This youtube page helped me to install it properly - https://www.youtube.com/watch?v=zOJWL3oXDO8.  There were plenty of other options for this step.

2.  I also downloaded DB Browser for SQLite from DB Browser for SQLite .  This means you do not have to use the command line interface, and makes export of the catalog easier.  I believe that you need both tools to work together.

3.  I saved the corrupt lrcat file to a .SQL file by doing the following things:
a) In the DB browser, I Clicked on File > Open Database (CHANGE the file type it is searching for to All files (*) and then selected the copy of the corrupt catalog I was going to use for this process)
b) The DB Browser shows you a list of the things it has found in the database.  
c) Click on File > Export > Database to SQL file ...
d) Click the Select All button.  Just leave the defaults.  Click on OK
e) Choose the location where you want the file saved, and its new name.  Click on OK.
f) If you want to do that on the command line, use a command like: 
echo .dump | sqlite3 "my Corrupt Catalog.lrcat" > lightroomCatalogue.sql   
echo .dump | sqlite3 [Name of corrupt catalog. Use Quote marks if there are spaces in the name]  >  [Name of the new SQL file]   

4.  I opened the SQL file with Notepad++ which is a text editor - DO NOT USE MICROSOFT WORD - and looked for the problem that the last line of the file contained the word  ROLLBACK;  It did, so I changed those words to  COMMIT TRANSACTION; (see   Connections: Recovering corrupt Lightroom catalogs for more details) and saved the changed file using a new name so that I had a backup copy.

5.  I imported that SQL file to a new file which was to become my new catalog.  This step created a new file for me, but Lightroom did not recognise it as a catalog. I would still try this step first, as it seems for most people it will work.
a) I tried DB Browser, but it kept crashing.  Might just be my computer. If you want to try this, start by clicking on File > Import > Database from SQL file... I know that if you have a database (catalog) open, the import will want to write changes into that file.  If you do not have a database open, it will allow you to create a new file. 
b) I went back to the command prompt.  I used the command:
sqlite3  lightroom_catalog_restore.lrcat -init New_lightroom_catalog.sql 
sqlite3 [Name of new catalog. Use Quote marks if there are spaces in the name]  -init  [Name of the the SQL file]   

I tested the lightroom_catalog_restore.lrcat file in Lightroom.  It did not work for me, but it might for you.

The command that worked for me was to overwrite the corrupted catalogue (use a copy!!) with the data from the SQL file.
sqlite3  "my Corrupt Catalog.lrcat" -init New_lightroom_catalog.sql 

When I tested the result of this, it worked in Lightroom but for whatever reason, I felt like that file was unstable.  What I did in the end was to use the last known good catalog, and from Lightroom, clicked on File > Import from another catalog...  

This has now been working successfully for 4 days.  I have imported and worked on 2 additional shoots without error.

Good luck!!


----------



## johnbeardy

One word you forgot to mention is "Backup"  .

And  let's remember that catalogue corruption is actually rare.


----------



## Roelof Moorlag

Stubac said:


> After the start I got here, I wanted to help people find resources they might find useful. Some I found through this forum, some by my own searches.


Thanks for sharing this information and welcome to this forum Stubac!


----------



## johannrousselot

Hello Victoria,
It's really nice to run such a comprehensive forum and try to help those LR users, who one day or another will face a major issue. So, if I'm here now it's because it's my case of course. As all others before me in this topic, I have a corrupted catalog and no backup worth being used. And I've tried those sqlite things and all, but I'm not good at this. Couldn't fix anything. I read that many people send you their catalog and you see if it's repairable or not. Could you do this for me ? This catalog contains several years of photography... (I can't attach this catalog here, it doesn't let me choose it).


----------



## Victoria Bampton

Hi Johann, yeah, we'll give it a shot.


----------



## kwatkins26

Hello Victoria! I've been sent here by the great Holger! He tried to fix my catalog, to no avail. I'd be so appreciative if you took a shot at it. I've tried everything. I can't believe this is even an issue.


----------



## kwatkins26

Victoria Bampton said:


> Hi Johann, yeah, we'll give it a shot.



If you don't mind... I'd like to send mine too? I'll zip and send tonight and hope for the best!


----------



## Victoria Bampton

Got them both.


----------



## Victoria Bampton

Both dead as a dodo I'm afraid @kwatkins26 and @johannrousselot . Any idea how they got corrupted?


----------



## johannrousselot

Victoria Bampton said:


> Hi Johann, yeah, we'll give it a shot.


And what a nice shot !! Thanks a 1000 times Victoria for helping so generously. You have sent me back, thanks also to Rikk/Adobe, a repaired catalog that has saved me days and days of work ! Thank you so much !!


----------



## PhilBurton

johannrousselot said:


> And what a nice shot !! Thanks a 1000 times Victoria for helping so generously. You have sent me back, thanks also to Rikk/Adobe, a repaired catalog that has saved me days and days of work ! Thank you so much !!


Victoria,

Is there anyone who is a member of this forum who has the skills to compare the corrupted catalog file with the repaired catalog file and draw conclusions?  Conclusions that might lead to a blog post on self-repair of a corrupted catalog?

Phil Burton


----------



## Victoria Bampton

PhilBurton said:


> Victoria,
> 
> Is there anyone who is a member of this forum who has the skills to compare the corrupted catalog file with the repaired catalog file and draw conclusions? Conclusions that might lead to a blog post on self-repair of a corrupted catalog?
> 
> Phil Burton



I'm not about to start recommending self repair until Adobe provides the tools to do so. Passing corrupted catalogs to Adobe helps them spot any patterns and then prevent/automatically fix those issues (although most I see are a result of hardware issues). 


Sent from my iPhone using Tapatalk


----------



## PhilBurton

Victoria Bampton said:


> I'm not about to start recommending self repair until Adobe provides the tools to do so. Passing corrupted catalogs to Adobe helps them spot any patterns and then prevent/automatically fix those issues _(although most I see are a result of hardware issues)._
> 
> 
> Sent from my iPhone using Tapatalk


Victoria,
've underlined part of your message, because that is actually very encouraging.  Hardware issues can cause data corruption in general. Your statement says to me that Lightroom per se isn't the source of most catalog corruption.

phil


----------



## Pidgeoncoop

Hi Victoria,

I run my local historical society's digital catalog on Lightroom CC Classic. It looks like I have disconnected the hard drive from the Mac before it was fully shut down and have corrupted the catalogue. We have a new collection of some 400 scanned images and metadata I have just spent 80 hours on. The photos are probably all OK and most of the metadata but if I use my backup (10 days old) I will lose all the metadata that I inputted directly a few days ago when I returned the negatives to the donor. I have googled solutions and run the SQLite fix suggested by Holger Mischke but it fell over at the end with "Error: near line 871889: no such table sqlite_stat4" and this repeats all the way through until line 872184.

I see you have had some success in having other catalogs repaired by an Adobe contact. Could I please ask if you could see if mine is repairable too. Otherwise I suspect it will be another two weeks potential work to get back to where I was.

I have zipped the file and transferred it to you via wetransfer to [email protected] (LightroomSPACECatalog-2)

Many thanks

Peter
Melbourne Australia


----------



## Victoria Bampton

Got it Peter, I'll let you know what they say.


----------



## Pidgeoncoop

Victoria Bampton said:


> Got it Peter, I'll let you know what they say.


Many thanks Victoria


----------



## Victoria Bampton

No joy, sorry Peter


----------



## Pidgeoncoop

Victoria Bampton said:


> No joy, sorry Peter


Ok, thanks for trying Victoria. At least now I know to get stuck into redoing the metadata on the older catalogue


----------



## Tomiron

Trying to open a corrupt catalog of mine makes LR freeze forcing me to kill the actual LR-process to proceed. I also need to delete the preference files to start LR again. It is not possible to import any data from the corrupted catalog to a new one. (My latest backup catalog works just fine though, but lacks quite a few hours of work...)

Is there by any chance a way to check integrity or do any other kind of catalogue repair of corrupted catalogs that doesn't open in LR? If I'd been more of a tech-pro I'd might been successful in using sqlite3 or sqlite analyzer to check the database. Now is that not the case..

I'm aware of that holding down the Alt-key (on Win) or Opt-key (on Mac) while simultaneously clicking on the LR icon in the dock cause LR to open but not to open the default catalog. Instead it shows a dialog with a list of available catalogs and an option to create check integrity of each catalog. In my case - this doesn't work. If I choose my corrupted catalog following this procedure this will still cause LR to crash.

Working in LR 4, Win7 64 bit, 4GB RAM, accessing catalog and previews from an external drive, images stored on a multiHD-NAS.


----------



## sylviapereira

Hi Victoria, I've tried the SQLite fix and am getting the same errors as some others:
Error: near line 747606: no such table: sqlite_stat4
Error: near line 747607: no such table: sqlite_stat4
Error: near line 747608: no such table: sqlite_stat4
etc.

May I zip and send you the file as well?


----------



## Victoria Bampton

Yes, that's fine Sylvia. I should note that my database repair Adobe contact is out of the office this coming week, so there will be a delay in getting it back to you.


----------



## sylviapereira

Victoria Bampton said:


> Yes, that's fine Sylvia. I should note that my database repair Adobe contact is out of the office this coming week, so there will be a delay in getting it back to you.


Thanks Victoria, much appreciated. I'm crossing my fingers!


----------



## Touchdown

Hello. I appear to have a corrupted Catalog. I've followed the Holger YouTube video and I'm still running into issues.

My corrupted Catalog is 1.53GB in size. When I use the SQLite to create the temporary Catalog it's creating one approximately double in size - 3.1GB

When I attempt to run the second command in SQLite (the -init) it runs through and I get a bunch of errors "no such table: sqlite_stat4"

Any suggestions on what to do?

Thanks!


----------



## Victoria Bampton

I'm happy to pass it on to my guy at Adobe to see if he can recover it, but it sounds like it might be toast. Do you not have a recent backup we can help you restore?


----------



## Touchdown

Thank you. I have a backup but unfortunately not all to recent so ideally I'd like to get this repaired.

I appreciate your offer. How should I get it to you?


----------



## clee01l

Touchdown said:


> Thank you. I have a backup but unfortunately not all to recent so ideally I'd like to get this repaired.
> 
> I appreciate your offer. How should I get it to you?


           #162


----------



## Touchdown

Thank you. I've uploaded the catalog.


----------



## Victoria Bampton

Touchdown said:


> Thank you. I've uploaded the catalog.


Good news - it was recoverable! It's on its way back.


----------



## Touchdown

Awesome! Now to ensure my backup settings are set to a regular schedule!

Thanks so much for your help.


----------



## gustavoh.96

Victoria Bampton said:


> Good news - it was recoverable! It's on its way back.




Hello Victoria, I call Gustavo and send us an email through which we transfer with a Catalog that is corrupted to see if you can help me. I am a photographer and I am desperate because I did nothing, and failed to recover you will lose a month of work. I look forward to your return. :(

[email protected]


----------



## gustavoh.96

Maybe you do not understand much, it is because I am from Brazil and typed by the translator. I do not know what else to do.


----------



## Coloradonewbie

Hi  Victoria, I am new to the forum, I discovered your website researching how  to fix a a corrupted Lightroom Catalog. I spent a ton of time with Adobe Support with no luck. and am hoping against hope your team might be able to help. 

I tried using sqlite; I'm a photographer definitely not a person who can use a command line.

Thanks, Tom

[email protected]


----------



## Victoria Bampton

Hi Tom, welcome to the forum! Happy to pass it on to my Adobe contact, although if Adobe Support have already had a go, the chances aren't great. Worth a try though, zip the lrcat bit and use Dropbox or www.wetransfer.com or similar to send it to me at [email protected]


----------



## Victoria Bampton

Hi Tom, I got it. What was making you think it was corrupted? It opens fine and passes the integrity checks here.


----------



## Coloradonewbie

The file has been constantly locking up, giving the message that "Lightroom must  restart." Additionally, any images were  processed would literally disappear from the catalog. Not a trace.  To make matters worse, all of my keywording, poof. gone. 

Kind of a unique problem.  I am thinking about combining old versions of the catalog, then removing duplicates, in a search for missing processed images and keywords.


----------



## Victoria Bampton

Ok, that's useful, it just gives me something to tell my contact to look for. Let me see if he can find any corruption.


----------



## Coloradonewbie

Thank you very, very much!


----------



## matmielke

Hello,

as you might notice, I'm also new to the forum. I registered as I have huge issues with my LR catalog.
As part of the new LR classic v9 releas, LR always tries to update my catalog and fails with the message "There was a problem updating the format of the Catalog file in Lightroom. This Catalog can not be used with this Lightroom version.".
In the LR classic v8 version, it opens, passes integrity check and everything is fine despite LR showing messages with "? indexing a NIL value"-messages. It just causes serious trouble when I try to create an new catalog and import the old one into it (I'm not sure how the optins is named in an English version, in German it is something like "Import from other catalog"). This fails with an error pointing to a faulty catalog.
I also tried to repair with the method of exporting to SQL-file and building a new one. That fails with messages as follows:


		Code:
	

--- snip (approx 2000 lines in total) ---
Error: near line 4264453: no such table: sqlite_stat4
Error: near line 4264454: no such table: sqlite_stat4
Error: near line 4264455: no such table: sqlite_stat4
Error: near line 4264456: no such table: sqlite_stat4
Error: near line 4264457: no such table: sqlite_stat4
Error: near line 4264458: no such table: sqlite_stat4
Error: near line 4264459: no such table: sqlite_stat4
Error: near line 4264460: no such table: sqlite_stat4
Error: near line 4264461: no such table: sqlite_stat4
Error: near line 4264462: no such table: sqlite_stat4
Error: near line 4264463: no such table: sqlite_stat4
Error: near line 4264464: no such table: sqlite_stat4
Error: near line 4264465: no such table: sqlite_stat4
Error: near line 4264466: no such table: sqlite_stat4
Error: near line 4264467: no such table: sqlite_stat4
Error: near line 4264468: no such table: sqlite_stat4
Error: near line 4264469: no such table: sqlite_stat4
Error: near line 4264470: no such table: sqlite_stat4
Error: near line 4264471: no such table: sqlite_stat4
Error: near line 4264472: no such table: sqlite_stat4
Error: near line 4264473: no such table: sqlite_stat4
Error: near line 4264474: no such table: sqlite_stat4
Error: near line 4264475: no such table: sqlite_stat4
Error: near line 4264476: no such table: sqlite_stat4
Error: near line 4264477: no such table: sqlite_stat4
Error: near line 4264478: no such table: sqlite_stat4
Error: near line 4264479: no such table: sqlite_stat4
Error: near line 4264480: no such table: sqlite_stat4
Error: near line 4264481: no such table: sqlite_stat4
Error: near line 4264482: no such table: sqlite_stat4
Error: near line 4264483: no such table: sqlite_stat4
Error: near line 4264484: no such table: sqlite_stat4
Error: near line 4264485: no such table: sqlite_stat4
Error: near line 4264486: no such table: sqlite_stat4
Error: near line 4264487: no such table: sqlite_stat4
Error: near line 4264488: no such table: sqlite_stat4
Error: near line 4264489: no such table: sqlite_stat4
Error: near line 4264490: no such table: sqlite_stat4
Error: near line 4264491: no such table: sqlite_stat4
Error: near line 4264492: no such table: sqlite_stat4
Error: near line 4264493: no such table: sqlite_stat4
Error: near line 4264494: no such table: sqlite_stat4
Error: near line 4264495: no such table: sqlite_stat4
Error: near line 4264496: no such table: sqlite_stat4
Error: near line 4264497: no such table: sqlite_stat4
Error: near line 4264498: no such table: sqlite_stat4
Error: near line 4264499: no such table: sqlite_stat4
Error: near line 4264500: no such table: sqlite_stat4
Error: near line 4264501: no such table: sqlite_stat4
Error: near line 4264502: no such table: sqlite_stat4
Error: near line 4264503: no such table: sqlite_stat4
Error: near line 4264504: no such table: sqlite_stat4
Error: near line 4264505: no such table: sqlite_stat4
Error: near line 4264506: no such table: sqlite_stat4
Error: near line 4264507: no such table: sqlite_stat4
Error: near line 4264508: no such table: sqlite_stat4
Error: near line 4264509: no such table: sqlite_stat4
Error: near line 4264510: no such table: sqlite_stat4
Error: near line 4264511: no such table: sqlite_stat4
Error: near line 4264512: no such table: sqlite_stat4
Error: near line 4264513: no such table: sqlite_stat4
Error: near line 4264514: no such table: sqlite_stat4
Error: near line 4264515: no such table: sqlite_stat4
Error: near line 4264516: no such table: sqlite_stat4
Error: near line 4264517: no such table: sqlite_stat4
Error: near line 4264518: no such table: sqlite_stat4
Error: near line 4264519: no such table: sqlite_stat4
Error: near line 4264520: no such table: sqlite_stat4
Error: near line 4264521: no such table: sqlite_stat4
Error: near line 4264522: no such table: sqlite_stat4
Error: near line 4264523: no such table: sqlite_stat4
Error: near line 4264524: no such table: sqlite_stat4
Error: near line 4264525: no such table: sqlite_stat4
Error: near line 4264526: no such table: sqlite_stat4
Error: near line 4264527: no such table: sqlite_stat4
Error: near line 4264528: no such table: sqlite_stat4
Error: near line 4264529: no such table: sqlite_stat4
Error: near line 4264530: no such table: sqlite_stat4
Error: near line 4264531: no such table: sqlite_stat4
Error: near line 4264532: no such table: sqlite_stat4
Error: near line 4264533: no such table: sqlite_stat4
Error: near line 4264534: no such table: sqlite_stat4
Error: near line 4264535: no such table: sqlite_stat4
Error: near line 4264536: no such table: sqlite_stat4
Error: near line 4264537: no such table: sqlite_stat4
Error: near line 4264538: no such table: sqlite_stat4
Error: near line 4264539: no such table: sqlite_stat4
Error: near line 4264540: no such table: sqlite_stat4
Error: near line 4264541: no such table: sqlite_stat4
Error: near line 4264542: no such table: sqlite_stat4
Error: near line 4264543: no such table: sqlite_stat4
Error: near line 4264544: no such table: sqlite_stat4
Error: near line 4264545: no such table: sqlite_stat4
Error: near line 4264546: no such table: sqlite_stat4
Error: near line 4264547: no such table: sqlite_stat4
Error: near line 4264548: no such table: sqlite_stat4
Error: near line 4264549: no such table: sqlite_stat4
Error: near line 4264550: no such table: sqlite_stat4
Error: near line 4264551: no such table: sqlite_stat4
Error: near line 4264552: no such table: sqlite_stat4
Error: near line 4264553: no such table: sqlite_stat4
Error: near line 4264554: no such table: sqlite_stat4
Error: near line 4264555: no such table: sqlite_stat4
Error: near line 4264556: no such table: sqlite_stat4
Error: near line 4264557: no such table: sqlite_stat4
Error: near line 4264558: no such table: sqlite_stat4
Error: near line 4264559: no such table: sqlite_stat4
Error: near line 4264560: no such table: sqlite_stat4
Error: near line 4264561: no such table: sqlite_stat4
Error: near line 4264562: no such table: sqlite_stat4
Error: near line 4264563: no such table: sqlite_stat4
Error: near line 4264564: no such table: sqlite_stat4
Error: near line 4264565: no such table: sqlite_stat4
Error: near line 4264566: no such table: sqlite_stat4
Error: near line 4264567: no such table: sqlite_stat4
Error: near line 4264568: no such table: sqlite_stat4
Error: near line 4264569: no such table: sqlite_stat4
Error: near line 4264570: no such table: sqlite_stat4
Error: near line 4264571: no such table: sqlite_stat4
Error: near line 4264572: no such table: sqlite_stat4
Error: near line 4264573: no such table: sqlite_stat4
Error: near line 4264574: no such table: sqlite_stat4
Error: near line 4264575: no such table: sqlite_stat4
Error: near line 4264576: no such table: sqlite_stat4
Error: near line 4264577: no such table: sqlite_stat4
Error: near line 4264578: no such table: sqlite_stat4
Error: near line 4264579: no such table: sqlite_stat4
Error: near line 4264580: no such table: sqlite_stat4
Error: near line 4264581: no such table: sqlite_stat4
Error: near line 4264582: no such table: sqlite_stat4
Error: near line 4264583: no such table: sqlite_stat4
Error: near line 4264584: no such table: sqlite_stat4
Error: near line 4264585: no such table: sqlite_stat4
Error: near line 4264586: no such table: sqlite_stat4
Error: near line 4264587: no such table: sqlite_stat4
Error: near line 4264588: no such table: sqlite_stat4
Error: near line 4264589: no such table: sqlite_stat4
--- snip (approx 2000 lines in total) ---


Do you have any proposal to solve this issue and enable me to use the new LR version without creating a new catalog?
Doing so, I run into serious trouble with all the video files that don't get and metadata stored to the drive but only being maintained in the database.

Thanks a lot and best regards,
Matthias


----------



## Paul McFarlane

matmielke said:


> Hello,
> 
> as you might notice, I'm also new to the forum. I registered as I have huge issues with my LR catalog.
> As part of the new LR classic v9 release, LR always tries to update my catalog and fails with the message "There was a problem updating the format of the Catalog file in Lightroom. This Catalog can not be used with this Lightroom version.".
> In the LR classic v8 version, it opens, passes integrity check and everything is fine despite LR showing messages with "? indexing a NIL value"-messages. It just causes serious trouble when I try to create a new catalog and import the old one into it (I'm not sure how the options is named in an English version, in German it is something like "Import from other catalog"). This fails with an error pointing to a faulty catalog.


Hi Matthias

Welcome to the Forum! Catalog does sound corrupted, hence the inability to convert. One thing that would be interesting would be, instead of trying to import it to a new catalog, open it, select all your photos and Export to new catalog instead. Then try opening and see how it looks. Let us know how you go.


----------



## matmielke

Hi Paul,

thank a lot for your quick reply!
I just checked the proposal with the following result:

The Export itself (without negatives, previews, ...) worked as far as I can see; at least, it did not show any error and created a new file with the ending ".lrcat", filesize 288MB, original catalog file from which the new catalog was 291MB
When I tried to import this newly created catalog into a new empty one, LR shows me an error again (translation from German and therefore not fully accurate: "Lightroom was not able to import this catalog. Unknown error."
Best regards,
Matthias


----------



## Victoria Bampton

Hi matmielke, welcome to the forum! Zip up the original catalog (just the lrcat bit) and use www.wetransfer.com or similar to send it to [email protected] and I'll pass it on to a contact at Adobe to see if he can fix it. There might be a delay as he's out of the office at the Adobe Max conference this week.


----------



## matmielke

Hi Victoria,

the file is on the way. Thanks a lot for the support on this topic!
It would be great to get it working again.

Best regards,
Matthias


----------



## matmielke

Hi Victoria,

thank for your support on this problem and  for sending the catalog back to me.
I tried to use the new one and went through the same steps like before. Unfortunately, it still doesn't work and produces the same errors:
- upgrade to LR v9 --> fails when upgrading catalog
- in latest v8.x: import from this catalog to a new one --> also fails.

Is there anything else I could do?

Thanks and best regards,
Matthias


----------



## Victoria Bampton

Hi Matthias

I've managed to get it upgraded for you, that's on its way back. It still fails to import from catalog, and I'd like to get to the bottom of why. Where are you seeing the ? nil value messages?


----------



## Tomiron

Trying to open a corrupt catalog of mine makes LR freeze forcing me to kill the actual LR-process to proceed. I also need to delete the preference files to start LR again. It is not possible to import any data from the corrupted catalog to a new one. (My latest backup catalog works just fine though, but lacks quite a few hours of work...)

Is there by any chance a way to check integrity or do any other kind of catalogue repair of corrupted catalogs that doesn't open in LR? If I'd been more of a tech-pro I'd might been successful in using sqlite3 or sqlite analyzer to check the database. Now is that not the case..

I'm aware of that holding down the Alt-key (on Win) or Opt-key (on Mac) while simultaneously clicking on the LR icon in the dock cause LR to open but not to open the default catalog. Instead it shows a dialog with a list of available catalogs and an option to create check integrity of each catalog. In my case - this doesn't work. If I choose my corrupted catalog following this procedure this will still cause LR to crash.

Working in LR 4, Win7 64 bit, 4GB RAM, accessing catalog and previews from an external drive, images stored on a multiHD-NAS.


----------



## matmielke

Hi Victoria,

that sounds great. How was it possible to upgrade as my LR always failed to?
Regarding the ? nil-messages: They happened in two cases:

I have an LR plugin named Duplicate Finder. As soon as I start it, I get this kind of error message and it was resproducable since two years - hence I didn't use the plugin anymore since then. There was no specific action I performed before it failed for the first time. But I guess this was when the problems with the catalog started but it had no other negative effect until the upgrade.
Since approx. 3 weeks, I tried to clean up old pictures by marking them with an "x" ("Abgelehnt" in German, no idea how it's called in the English version). After that, I filtered for these and deleted them by marking and removing from catalog and disk at once (normally, bunches of 20-50 were handled that way). This worked normally in every case but at the end of the operarion, it showed also the ? nil-message without any further negative impact.
I hope helps finding what happende there.


Thanks again and best regards,
Matthias


----------



## Victoria Bampton

matmielke said:


> How was it possible to upgrade as my LR always failed to?


Magic! (No, not quite, but I'm not at liberty to say yet)


----------



## matmielke

Ok, magic is always fine for me. I was just wondering if there was something I could have done or something I did wrong. But as my magic is a bit rusty, it seems asking for help was the correct way.

Best regards,
Matthias

Gesendet von meinem ONEPLUS A6000 mit Tapatalk


----------



## Victoria Bampton

You didn't do anything wrong, the catalog not upgrading is a (relatively rare) bug. I suspect there's something more in that catalog that's preventing the catalog import - maybe the ghost images issue we've intermittently seen - but that's still under investigation.


----------



## matmielke

Hi Victoria,

I have to add one occurence of the ? NIL-value message: It happende just now with LR9 and the new catalog you sent when I tried ti synchronize the folder status (Imoprt new / delete missing / sync metadata) directly before showing the import dialog with the new pictures identified.
Furthermore, with the new catalog, all pictures are shown as "changed metadata" and I'm currently importing the metadata back from the disk. It's not a big issue as things are restorable but nevertheless, it might help investigating.

Best regards,
Matthias


----------



## matmielke

Maybe one additional question as the catalog is basically working but has a lot of issues:
I'd like to create a new one from scratch. For the photos, this should be no issue as the metadata is stored on the disk directly. But for the videos, I didn't find any solution to carry over the metadata to the newly to-be-created cataloig. Is there any idea you can think of?
What I tried: Mark all videos, export as catalog and import afterwards. This fails as the import does not work ...
Manuel carryover is a pretty bad solution as I have more than 1000 videos and it would take forever.

Thanks again and best regards,
Matthias


----------



## Victoria Bampton

For that folder that gives you a nil value error, if you scroll through the thumbnails, can you find any that have no metadata showing? If that is the cause of the error, there is a fix available. 

Importing the metadata back from the disk will overwrite the catalog with external data. Are you sure that's what you want to do?

Other than those two noted issues, what other issues are you seeing that makes you want to start over?


----------



## matmielke

Good morning Victoria,

the idea of starting from scratch mainly came from the fact that there are still problems with the current catalog and I have no idea if there will be a solution as it seems to be a pretty rare issue. But of course, it's not the perfect solution and I'll keep on thinking about it.

The funny thing for all the metadata: It shows the statu of being not current but when I import from disk, it's fine but doesn't change the content. I normally write every change of metadata to the xmp or jpg-files directly - only for videos, the metadata status on the disk is different from the database status.

Regarding your first question: The nil-value in most cases happens after deleting. So there is no picture available at that moment on the screen as all picture were deleted. But I can investigate a bit further if there are thumbs without metadata.

Best regards,
Matthias


----------



## matmielke

OK, some interesting news from my investigation:
The catalog you, Victoria, upgraded for me works in general and the problem with the "Lightroom duplicate finder 2"-plugin (? nil-value-error) is gone. So I decides to stick with it.
Sometimes, when deleting files, there is still an error message (? nils-value) but it seems to happen less often now.

What is still not working (but also not needed, at least for the moment):
As I had the plan to start with a new catalog and the metadata of the photos are on my hard drive, I just tried to export all the videos to a catalog. This worked but importing them to a new catalog failed as you mentioned above, too.
As next steps, I tried to narrow down the conflicting video and split up the export in single batches (always halfening the amount of videos).
Example:


		Code:
	

Round 1:
Export videos 1-1000 - Import failed

Round 2:
Export video 1-500 - Import failed
Export video 501-1000 - Import worked

Round 3:
Export video 1-250 - Import worked
Export video 251-500 . Import failed

and so on and so on


What turned out finally: The import of all export worked well except for one with 10 videos. I exported each single video then into a catalog and imported to a newly created catalog - and this also worked. I double-checked with the 10 video-batch and it failed again.
So I'm pretty much surprised about this behaviour as it seems like not a single file/video is causing the issue but the combination of some videos and eventually the additional data (keyword, smart collections, ...).
None of the videos in the 10-videos-batch had visible problems with metadata missing in the original catalog.

For the photos, I didn't repeat this procedure as it's pretty time-consuming.

Does this help in any way understanding the issue?

Best regards,
Matthias


----------



## Victoria Bampton

Very interesting indeed, thanks for sharing. It would be worth reporting to the engineers: How do I send a bug report or feature request to Adobe? | The Lightroom Queen


----------



## bogdanmoisi

Hello

I am new to the forum. I've landed here because i has searching on how to fix a a corrupted Lightroom Catalog.  I tried using sqlite, but no chance.. I'm a photographer btw.

Thanks, Bogdan


----------



## clee01l

bogdanmoisi said:


> Hello
> 
> I am new to the forum. I've landed here because i has searching on how to fix a a corrupted Lightroom Catalog.  I tried using sqlite, but no chance.. I'm a photographer btw.
> 
> Thanks, Bogdan


Welcome to the forum.   We will do our best to get you back up and running 
What messages are you getting with the catalog file?   When did you last create a backup catalog file?


----------



## bogdanmoisi

clee01l said:


> Welcome to the forum.   We will do our best to get you back up and running
> What messages are you getting with the catalog file?   When did you last create a backup catalog file?



I didn't made any backup for this catalog. I was working with smart previews and catalog from my external HDD when lightroom crashed. 
The error: Unexpected error opening catalog.


----------



## clee01l

bogdanmoisi said:


> I didn't made any backup for this catalog. I was working with smart previews and catalog from my external HDD when lightroom crashed.
> The error: Unexpected error opening catalog.


I should have asked:  what version of Lightroom are you running and what version of which Operating system?    How many images do you think were in your catalog?   How long have you been using this catalog file?  
So If I understand correctly, you did not make the standard catalog file copy on exiting Lightroom and you have no system backup app running to protect you and all of your critical files from file corruption or the eventual failure of your primary hard drive. 

Could you open the file with the SQLlite database manager?  

Most often the best solution is to recover from a recent backup catalog file. (This is one reason that Adobe puts the backup process in the file Exit process.  It should not be ignored).

If we are unable to help you via the standard solutions, there is someone at Adobe that Victoria does have a relationship with that might be able to repair your corrupt catalog but this is a last resort option and I do not hold out hope that it would even be successful.


----------



## bogdanmoisi

I am using Lightroom CC, OS: windows..
In my catalog there were about 3000~ pictures from a wedding. I was using it for like 1 month .. i had just that wedding on my catalog.
I've created on my desktop, created smart previews and copy all that folder from my computer to external HDD so i can edit from my laptop when i'm on the move.. I have backup only for my raw images, no backup for catalog.

i tried to create a sql from lrcat with sqlite3, but after i did all that, i had some errors: sqlite_stat4... i have deleted those rows and created my LRCAT again with sqlite but i can't open it in lightroom... i'm getting assertion failed message , but only with that catalog. The others are working fine


----------



## Victoria Bampton




----------



## clee01l

bogdanmoisi said:


> i tried to create a sql from lrcat with sqlite3, but after i did all that, i had some errors: sqlite_stat4... i have deleted those rows and created my LRCAT again with sqlite but i can't open it in lightroom... i'm getting assertion failed message , but only with that catalog. The others are working fine


. The file that you created with SQLlite is probably damaged because you did not know or follow the SQL structure.  You will need to send the ORIGINAL  "lrcat" file that gave the original error to Victoria.   Her source at Adobe does have the necessary understanding of the catalog structure to repair it if that is possible.


----------



## kptv02

Hi. I have a corrupted catalogue that opens for a few minutes (2-5minutes) then will close again and say that it is corrupted. I have a backup that is recent but I dont want to lose all of the 300 or so photos I just took for a friends wedding ceremony. Is there any way I can send it to you guys to have a look at?


----------



## kptv02

kptv02 said:


> Hi. I have a corrupted catalogue that opens for a few minutes (2-5minutes) then will close again and say that it is corrupted. I have a backup that is recent but I dont want to lose all of the 300 or so photos I just took for a friends wedding ceremony. Is there any way I can send it to you guys to have a look at?


I have sent the catalogue via wet transfer for you guys to look into if you can thank you.


----------



## prbimages

kptv02 said:


> I have a backup that is recent but I dont want to lose all of the 300 or so photos I just took for a friends wedding ceremony.


Just to be clear - I hope you realize that you won't lose the _photos _if you use a backup catalog, you will only lose any _edits _you have made to those photos. The photos themselves are not stored in the catalog. Worst case scenario is that you would have to import the photos again into the restored catalog.


----------



## kptv02

prbimages said:


> Just to be clear - I hope you realize that you won't lose the _photos _if you use a backup catalog, you will only lose any _edits _you have made to those photos. The photos themselves are not stored in the catalog. Worst case scenario is that you would have to import the photos again into the restored catalog.


I had not backed up in about 2 days and had a session on the corrupt file that was not backed up in that time. I do not have the photos to reimport


----------



## Victoria Bampton

kptv02 said:


> I had not backed up in about 2 days and had a session on the corrupt file that was not backed up in that time. I do not have the photos to reimport


Got your catalog, and I've forwarded it to Adobe to see if they can fix it. However, prbimages is absolutely right, it would only have contained the edits. The photos wouldn't have been in it. What do you mean by "I do not have the photos to reimport"?


----------



## kptv02

Victoria Bampton said:


> Got your catalog, and I've forwarded it to Adobe to see if they can fix it. However, prbimages is absolutely right, it would only have contained the edits. The photos wouldn't have been in it. What do you mean by "I do not have the photos to reimport"?


Now I'm confused are you saying the pictures are not located in the catalog. only the edits?


----------



## Victoria Bampton

A catalog is just a text database, with some small previews alongside. Photos are never "in" Lightroom, they're stored on your hard drive wherever you chose to put them when you imported them.


----------



## kptv02

Victoria Bampton said:


> A catalog is just a text database, with some small previews alongside. Photos are never "in" Lightroom, they're stored on your hard drive wherever you chose to put them when you imported them.


...wow. I feel so foolish. Thank you


----------



## Tomiron

Trying to open a corrupt catalog of mine makes LR freeze forcing me to kill the actual LR-process to proceed. I also need to delete the preference files to start LR again. It is not possible to import any data from the corrupted catalog to a new one. (My latest backup catalog works just fine though, but lacks quite a few hours of work...)

Is there by any chance a way to check integrity or do any other kind of catalogue repair of corrupted catalogs that doesn't open in LR? If I'd been more of a tech-pro I'd might been successful in using sqlite3 or sqlite analyzer to check the database. Now is that not the case..

I'm aware of that holding down the Alt-key (on Win) or Opt-key (on Mac) while simultaneously clicking on the LR icon in the dock cause LR to open but not to open the default catalog. Instead it shows a dialog with a list of available catalogs and an option to create check integrity of each catalog. In my case - this doesn't work. If I choose my corrupted catalog following this procedure this will still cause LR to crash.

Working in LR 4, Win7 64 bit, 4GB RAM, accessing catalog and previews from an external drive, images stored on a multiHD-NAS.


----------



## Victoria Bampton

That one trips lots of people up. It might help to have a read of the Quick Start eBook, which you'll find under the Downloads tab on the menu, as that'll pad out your understanding a bit.


----------



## smcbsme

I have a catalog that I sent via your earlier instructions. Repaired, sqlite3 with stat4 line errors and a ZERO byte .lrcat output from the process. I sent it to you hopeful you can recover the catalog for me. I haven't backed up since LR asked me to upgrade the catalog where it creates a copy,  probably a couple  months or more. :(


----------



## Victoria Bampton

Got it. I've forwarded it on to my contact at Adobe, but it doesn't look promising I'm afraid.


----------



## smcbsme

*Thank you so much, it is what it is. I've realized that I'll probably have to live with the loss. Attention now on preparedness, starting  a New Catalog based on recently acquired **knowledge**, more frequent backups. Can't let this happen again.*


----------



## Victoria Bampton

That wasn't recoverable, sorry smcbsme


----------



## bverdoorn7

Hello,
New member here.  Having a similar problem to what others have mentioned in this thread.  Trying to open my catalog and getting a "The Lightroom catalog named...can not be opened because it is not valid." error message.  When I look in backups folder there are several backup folders with date/time but no actual .lrcat files in the backup folders, so I am not able to open one of those.  Can anyone help me recover my catalog?
Thank you in advance!
Best,
Brandon


----------



## Jim Wilde

bverdoorn7 said:


> Hello,
> New member here.  Having a similar problem to what others have mentioned in this thread.  Trying to open my catalog and getting a "The Lightroom catalog named...can not be opened because it is not valid." error message.  When I look in backups folder there are several backup folders with date/time but no actual .lrcat files in the backup folders, so I am not able to open one of those.  Can anyone help me recover my catalog?
> Thank you in advance!
> Best,
> Brandon


What version of Lightroom are you using? Later versions of Lightroom automatically compresses the catalog backup, so in those time-stamped backup folders should be a ".zip" file. Unzip that file to access the ".lrcat" catalog backup.


----------



## bverdoorn7

Thank you Jim - was able to get a fairly recent backup that way so have pretty minimal lost work.  Much appreciated!
Brandon


----------



## jwrjrobertson05

We had a power outage over the weekend while my wife was editing photos, and that corrupted the database. I started the sqlite recovery thing and am getting a bunch of the references I have seen in this thread to the sqlite_stat4. So I sent the catalog to you via the wetransfer. Hopefully you can send it to your contact and they can save her edits.


----------



## Victoria Bampton

Got it. I've forwarded it on, and I'll let you know when I hear back.


----------



## jwrjrobertson05

Thank you so much, we look forward to seeing what can be saved.


----------



## Victoria Bampton

It's on it's way back and looks good.


----------



## PhilBurton

jwrjrobertson05 said:


> We had a power outage over the weekend while my wife was editing photos, and that corrupted the database. I started the sqlite recovery thing and am getting a bunch of the references I have seen in this thread to the sqlite_stat4. So I sent the catalog to you via the wetransfer. Hopefully you can send it to your contact and they can save her edits.


Backups?


----------



## jwrjrobertson05

Awesome that it's coming back.

As for the backups, yes, but this was for edits that were literally in progress. I was hoping to save the last chunk of edits. My backups are ... Thorough.  However, I do want to learn more on the Lightroom schema and if it's possible to have it versioned out to the network drive for every commit.


----------



## Hal P Anderson

An  uninterruptible power supply might not be a bad idea.


----------



## jwrjrobertson05

Yeah, I'm using this as an reason to push her over to using the new laptop and dock.  Change is always hard, but it's easier when you know there is some silver lining.


----------



## odysseusnoman

Hi Victoria, I also have a corrupted cataloge. I started the sqlite recovery and am getting a bunch of the references I have seen in this thread to the sqlite_stat4. So I sent the catalog to you via the wetransfer. Hopefully you can send it to your contact and they can recover it.


----------



## Victoria Bampton

odysseusnoman said:


> Hi Victoria, I also have a corrupted cataloge. I started the sqlite recovery and am getting a bunch of the references I have seen in this thread to the sqlite_stat4. So I sent the catalog to you via the wetransfer. Hopefully you can send it to your contact and they can recover it.


Got it. There will be a delay as Adobe Digital Imaging dept is currently on vacation.


----------



## jeremie.granat

Hi,

I've also got a corrupted catalogue I really hope you can help with. I made a backup but it shows exactly the same error  I tried using the sqlite commands shown at the beginning of this thread but didn't get very far.  I've send you the whole thing through wetransfer

Hope you can help...
Jeremie


----------



## Victoria Bampton

jeremie.granat said:


> I've also got a corrupted catalogue I really hope you can help with. I made a backup but it shows exactly the same error I tried using the sqlite commands shown at the beginning of this thread but didn't get very far.  I've send you the whole thing through wetransfer


Got it. Early signs don't look promising but I'll let you know when I hear back from Adobe.


----------



## zak.tozer.27

Hello, thanks for this amazing forum! I have, what seems like, a slightly more unique issue. I have restored the catalogue relatively ok by the looks of it but the Lightroom Classic startup window is getting completely stuck on 'Reading preferences...'. I have just emailed via WeTransfer to Victoria, really hope that you are able to help! Thank you again, I really appreciate it. Zak


----------



## Victoria Bampton

Got it and forwarding on to Adobe. I'll email when I hear back Zak. Welcome to the forum!


----------



## zak.tozer.27

Thank you Victoria!


----------



## David Hird

Hi Victoria,
I have a corrupted catalogue file which I will send you via we transfer. I have tried to repair it using sqlite but without success. I am keeping my fingers crossed.
David


----------



## Victoria Bampton

David Hird said:


> I have a corrupted catalogue file which I will send you via we transfer. I have tried to repair it using sqlite but without success.


Hi David. Sorry, that's dead as a dodo.


----------



## Tomiron

Trying to open a corrupt catalog of mine makes LR freeze forcing me to kill the actual LR-process to proceed. I also need to delete the preference files to start LR again. It is not possible to import any data from the corrupted catalog to a new one. (My latest backup catalog works just fine though, but lacks quite a few hours of work...)

Is there by any chance a way to check integrity or do any other kind of catalogue repair of corrupted catalogs that doesn't open in LR? If I'd been more of a tech-pro I'd might been successful in using sqlite3 or sqlite analyzer to check the database. Now is that not the case..

I'm aware of that holding down the Alt-key (on Win) or Opt-key (on Mac) while simultaneously clicking on the LR icon in the dock cause LR to open but not to open the default catalog. Instead it shows a dialog with a list of available catalogs and an option to create check integrity of each catalog. In my case - this doesn't work. If I choose my corrupted catalog following this procedure this will still cause LR to crash.

Working in LR 4, Win7 64 bit, 4GB RAM, accessing catalog and previews from an external drive, images stored on a multiHD-NAS.


----------



## David Hird

Thank you Victoria.


----------



## PhilBurton

And the moral of this story is, "Back up every single time you shut down Lightroom."  If you quit for the night, that's a great time to do the shutdown.


----------



## clee01l

PhilBurton said:


> And the moral of this story is, "Back up every single time you shut down Lightroom."  If you quit for the night, that's a great time to do the shutdown.


Currently, this thread has over 250  entries.   This may be the longest thread in the forum.  The solution to the corrupt catalog problem is so simple, yet time and time again here we are.    I almost wish Victoria had not made the option possible.  I have not made an analysis on the success rate of repairing corrupt catalogs, but I would guess that the number of successful repairs is small. 
[Begin Rant] The recommendation (rule) is to regularly back up your master catalog file as insurance against corruption.  I don't understand why there are people that think the rules do not apply to them and they deserve special treatment [End Rant]


----------



## David Hird

Thank you Victoria. I feared so.


----------



## David Hird

My corrupt catalogue did not result from not backing up. I backup every time I exit Lightroom Classic. 
I have a removable 2TB Seagate expansion drive which holds my photographs and LRC catalogue and move this drive between a laptop and a desktop PC. I have a main backup of the catalogue and photographs on the desktop PC and when I am away from home a backup of the photographs I had been working on, on the laptop. 
I had been away from home and had been working on the PC. When I got home I connected the removable drive to the desktop to backup the catalogue and found the catalogue folder on the removable drive was corrupted. The catalogue folder also contained the Lightroom exit backups and they were also corrupted.
I then realised how stupid I was to hold the catalogue and its backup in the same folder. In future I will continue to save the catalogue to the removable disk but will save the backup to the internal drive of the PC.
I have a backup copy of the catalogue on my desktop PC but it is about a month old.
It was my process which was the cause of my problem not that I was not backing up.
I do not know what caused the catalogue folder corruption but I do strongly suspect Lightroom.


----------



## PhilBurton

David Hird said:


> My corrupt catalogue did not result from not backing up. I backup every time I exit Lightroom Classic.
> I have a removable 2TB Seagate expansion drive which holds my photographs and LRC catalogue and move this drive between a laptop and a desktop PC. I have a main backup of the catalogue and photographs on the desktop PC and when I am away from home a backup of the photographs I had been working on, on the laptop.
> I had been away from home and had been working on the PC. When I got home I connected the removable drive to the desktop to backup the catalogue and found the catalogue folder on the removable drive was corrupted. The catalogue folder also contained the Lightroom exit backups and they were also corrupted.
> I then realised how stupid I was to hold the catalogue and its backup in the same folder. In future I will continue to save the catalogue to the removable disk but will save the backup to the internal drive of the PC.
> I have a backup copy of the catalogue on my desktop PC but it is about a month old.
> It was my process which was the cause of my problem not that I was not backing up.
> I do not know what caused the catalogue folder corruption but I do strongly suspect Lightroom.


Some people keep old backups going back months.  I think it was Clee who said he had to go back six months to rectify a really bad issue involving the catalog.  A_ 4TB external drive costs less than $100 these days._ Western Digital Desktop External Hard Drives | Newegg.com.  

How much is your time worth to recover from a corrupted catalog?


----------



## jwrjrobertson05

Hi David,

I know I am a bit late on a reply, but from your description, it sounds more like NTFS corruption than just a catalog. Was anything else on the drive or folder corrupted? 

While there is no guarantee, there are companies as well as software that can do filesystem recovery. It just depends on the real root cause. So depending on the criticality of that data, there could be other options.

Another option for your workflow could be to always keep the catalogue on the internal drive and have scripts on the drive to copy the catalog to and from the removable drive. I don't like using external drives like you are because I have seen too many problems with usb connections and they (normally) are not as fast as internal drives.

Best,
Jonathan


----------



## monoworm

Hello, I have a corrupt catalog after lightroom suddenly in the middle of a workflow stated it was missing a file and I can't for the life of me figure out sqlite, is there a way to get help from a wizard. I'm truly desperate. thank you all!


----------



## monoworm

Hello Victoria, I sent you the corrupted .lrtcat via wetransfer! I was in the middle of finishing the work done and uploading and hadn't quit the program to backup during that day hence no backup, well lesson learned to always backup even during a session of power editing. I hope it's okay I sent it through. Having trouble figuring out SQlite on my mac :/

- Monja


----------



## prayagdave28

Paul McFarlane said:


> Okay, please post on the correct forum for future posts (this one relates to Lightroom 1-6)
> 
> We'll take a look.


I'm quite new to this place. Could you please help me out find the correct forum as I couldn't find it?


----------



## Paul McFarlane

prayagdave28 said:


> I'm quite new to this place. Could you please help me out find the correct forum as I couldn't find it?


Lightroom Classic - top on on the list.

We'll let you know on the catalog, it has failed, we'll get some input from a colleague at Adobe.


----------



## prayagdave28

Paul McFarlane said:


> Lightroom Classic - top on on the list.
> 
> We'll let you know on the catalog, it has failed, we'll get some input from a colleague at Adobe.


Okay sure, thank you so much.


----------



## Paul McFarlane

Some repair was possible, but some data was lost. Catalog on it's way back to you.


----------



## Paul McFarlane

ammylee502 said:


> In my case - this doesn't work. If I choose my corrupted catalog following this procedure this will still cause LR to crash.


You'll need to look to use a backup of that catalog then, check how recent that is.

Cletus - this isn't the same poster as the repaired catalog.


----------



## chris_11

Hello, 
I wonder if you might be able to point me in a decent direction please, still on lightroom 6.14 here!

My catalogue has been giving me grief for a long time and I only recently realised I had an actual problem (I've spent a lifetime just thinking lightroom is awful / rubbish etc but not I see that it's not that at all! the downside is that all of my backups are newer than the problem), yes a bit slow on the uptake I know.

My problems are  keywords where sometimes I can take actions (add, remove, edit etc), other times (generally after a couple of actions on keywords but sometimes on startup) the keywords stop responding for instance I cannot move keywords, edit shows a blank box, delete does nothing & the main keyword windows says "waiting...." and if I try to open pictures on a given keyword the main panel just says "loading".

I am assuming that I've got something broken in the keyword tables (but not so badly that lightroom cannot operate) but I don't know how to identify what needs fixing - I understand SQL (the language) but driving sqlite is a challenge (I've just downloaded sqlite3, not a clue what I am doing there yet!).

Is anyone able to point me in a direction to check what might need checking / fixing please - at least identifying what might be the issue!

Yes I have thought about & testing exporting to a new catalog (export works, import doesnt strangley) but I had it in my mind I might be better off fixing the problem before exporting although I wonder if perhaps I am being dim and export would just recreate everything from scratch that it can export and hence I will clean the problem out (I admit it might be easier to recreate my published services that to fix the keywords).

I've waffled I know but any pointers much appreciated.

Thanks

Chris


----------



## chris_11

chris_11 said:


> Hello,
> I wonder if you might be able to point me in a decent direction please, still on lightroom 6.14 here!
> 
> My catalogue has been giving me grief for a long time and I only recently realised I had an actual problem (I've spent a lifetime just thinking lightroom is awful / rubbish etc but not I see that it's not that at all! the downside is that all of my backups are newer than the problem), yes a bit slow on the uptake I know.
> 
> My problems are  keywords where sometimes I can take actions (add, remove, edit etc), other times (generally after a couple of actions on keywords but sometimes on startup) the keywords stop responding for instance I cannot move keywords, edit shows a blank box, delete does nothing & the main keyword windows says "waiting...." and if I try to open pictures on a given keyword the main panel just says "loading".
> 
> I am assuming that I've got something broken in the keyword tables (but not so badly that lightroom cannot operate) but I don't know how to identify what needs fixing - I understand SQL (the language) but driving sqlite is a challenge (I've just downloaded sqlite3, not a clue what I am doing there yet!).
> 
> Is anyone able to point me in a direction to check what might need checking / fixing please - at least identifying what might be the issue!
> 
> Yes I have thought about & testing exporting to a new catalog (export works, import doesnt strangley) but I had it in my mind I might be better off fixing the problem before exporting although I wonder if perhaps I am being dim and export would just recreate everything from scratch that it can export and hence I will clean the problem out (I admit it might be easier to recreate my published services that to fix the keywords).
> 
> I've waffled I know but any pointers much appreciated.
> 
> Thanks
> 
> Chris


Now that's a bit disappointing, created a new catalog and the keywords behave the same, so that's not the fix


----------



## chris_11

chris_11 said:


> Now that's a bit disappointing, created a new catalog and the keywords behave the same, so that's not the fix :(


So I got enthusiastic and installed a new install of LR 6 on my laptop (unimaginably slow), boy that was fun (adobe logins ; lots and was painful turning off 2fa as text messages simply don't happen & you cant get adobe support without logging in!)  - anyway new install and the newly created catalog and within 2 minutes I can recreate the same problem  - so it's not my skanky old PC


----------



## LRList001

chris_11 said:


> So I got enthusiastic and installed a new install of LR 6 on my laptop (unimaginably slow), boy that was fun (adobe logins ; lots and was painful turning off 2fa as text messages simply don't happen & you cant get adobe support without logging in!)  - anyway new install and the newly created catalog and within 2 minutes I can recreate the same problem  - so it's not my skanky old PC


What version of LR 6 are you running?  From memory, LR6 had lots of problems until about 6.10.  Whatever, if you are not running 6.14, you need to find a way of getting to 6.14.  If you are running 6.14, you could try deleting your LR preferences.  Reinstalling LR doesn't necessarily clean up all existing problems and a problem with the preferences is a common problem area.


----------



## chris_11

LRList001 said:


> What version of LR 6 are you running?  From memory, LR6 had lots of problems until about 6.10.  Whatever, if you are not running 6.14, you need to find a way of getting to 6.14.  If you are running 6.14, you could try deleting your LR preferences.  Reinstalling LR doesn't necessarily clean up all existing problems and a problem with the preferences is a common problem area.


Hi, it is 6.14 & I've just installed that onto a different machine so the preferences were a fresh install and made no difference, my PC is getting long in the tooth so I was almost hoping that it would turn out to be my PC that was the problem!

I will try clearing them to see if it makes any odds but not holding my breath


----------



## chris_11

chris_11 said:


> Hi, it is 6.14 & I've just installed that onto a different machine so the preferences were a fresh install and made no difference, my PC is getting long in the tooth so I was almost hoping that it would turn out to be my PC that was the problem!
> 
> I will try clearing them to see if it makes any odds but not holding my breath


Deleting the preferences didn't change a thing unfortunately


----------



## LRList001

chris_11 said:


> Deleting the preferences didn't change a thing unfortunately :(


I don't make serious use of LR's keywording feature, so can't comment further.


----------



## chris_11

Anyway know anything about the database structure? Just rummaging (on a copy I hasten to add) and there are entries in AgLibraryKeywordCooccurrence where Tag1 or Tag2 is not a valid id_local in AgLibraryKeyword so I wonder if I just have a basic integrity issue?

Any points appreciated as I'm clutching at straws


----------

