5 Replies Latest reply on Oct 22, 2013 8:25 AM by philmodjunk

    Locked Files

      Title

      Locked Files

      Post

           We have a Filemaker database that consists of 4 linked databases for Contacts, Products and producing quotations. My computer hosts the databases and there is a startup script in the main database which opens all the databases.

           Most of the time all 4 load well, but every now and then, at random and for no apparent reason, one of the databases will load without the ablility to modify any of the fields or add new records. You can browse and search, export etc, but not modify.  This can be diagnosed by looking at file/ file optionswhich will be greyed out. Closing Filemaker and re-opening or completely re-starting the computer can sometimes load the file normally.

           But the only sure way to get the file loading properly is to save a backup copy, dump the old file as a backup, rename the new file by removing the copy part of the file name and then restart filemaker.

           Every morning I have to go through the routing of checking each database to ensure it is working and it's getting a little tiresome. Does anyone have any suggestions? Thanks

        • 1. Re: Locked Files
          philmodjunk

               Sounds like you may have a damaged file--assuming that you are opening the file in exactly the same way each morning. If the file is somehow getting opened with a different privilege set with restricted access privileges, however, the same behavior would show. Don't know what all your startup script does nor exactly how you open the files each time, so that option may be impossible, unlikely, or the source of your trouble.

               If you've ruled out that possibility, recover your file and see if the recovered file behaves any differently (even if recover reports no problems found).

               Things to keep in mind about Recover:

               While Recover almost always detects and fully corrects any problems with your file...

                 
          1.           The recovered copy may behave differently even if recover reports "no problems found".
          2.      
          3.           Recover does not detect all problems
          4.      
          5.           Recover doesn't always fix all problems correctly
          6.      
          7.           Best Practice is to never put a recovered copy back into regular use or development. Instead, replace the damaged file with an undamaged back up copy if this is at all possible. You may have to save a clone of the back up copy and import all data from your recovered copy to get a working copy with the most up to date information possible.

                

               And here's a knowledgebase article that you may find useful: What to do when your file is corrupt (KB5421).

          • 2. Re: Locked Files

                 I really do not think the file is damaged, but will try saving a clone and then importing all the data. The one that causes the most problems is the biggest (Quote Numbers) at around 0.4 gb as it has a lot of embedded pdf files. I have yet to get my head around linking only and the ability to view the resultant file.

                  

                 Here are the scripts, the trigger script first which is the script included in the sample layout with small modifications. Excuse the small errors they were caused by the poor OCR conversion. The syntax is fine.

                 Script Name: Trigger i On First Window Open


                 Show/Hide Toolbars [Show]
                 If [PatternCount { Get { Applicationversion ); iPad' )]
                 Go to Layout ['Company" (Companies)]
                 Else If [PathernCount { Get { Applicationversion ); "Pro" )]
                 Go to Layout ["Company" {Companies)]
                 Else
                 Go to Layout ['Contacts l iPhone" [Contacts}]
                 Show/Hide Toolbars [Hide]
                 end If
                 If [Get { SystemPlatform} > 2]
                 Show/Hide Toolbars [Hide]
                 Set Zoom Level [Lock; 100%]
                 Else
                 Set Zoom Level [100%]
                 End If
                 If [Get { FoundCount) = 0]
                 New Record/Reguest
                 end If
                 If [Get { UserName) = "David"]
                 Perform Script ["Open all']
                 End If

                  

                  

                 Then “Open all”

                 Script Name: Open all


                 Open File["ProdCat"]
                 Open File ["Quote Numbers"]
                 Open File ["Returns"]
                 Open File ["Contacts"]

                  

                 Nothing to them really to cause any problems

            • 3. Re: Locked Files
              philmodjunk

                   I figured that script issues were a long shot.

                   Saving a clone and importing the data rebuilds indexes but this does not fix any other possible damage to your file. I suggest that you run a recover on the file, check for any problems reported and test the recovered copy even if recover reports no records found.

              • 4. Re: Locked Files

                     I can close this one out now as I have discovered the culprit.

                      

                     The problem is my backup software. When the computer starts, the backup software loads automatically and looks for files that have changed. As Filemaker is updated all the time it tackles those files immediately. If Filemaker then tries to open a file that is being backed up it cannot open the file for editing and thus it opens locked.

                     Disabling the backup software when opening Filemaker has cured the problem.

                • 5. Re: Locked Files
                  philmodjunk

                       You should not set backup software to back up FileMaker files that are currently open. There's a good chance that the back up copies thus produced will be damaged. At best, you'll find that FileMaker sees the copies as "improperly closed" and you'll have to wait through a consistency check when opening the back up copy for the first time.