Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error Message: attempt to write a readonly database

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Error Message: attempt to write a readonly database

    Hello. I get this error when trying to reset the database and when trying to use playback. When I load playback the message appears and then the program crashes. It does not crash when I try to reset the database. This has been an issue for quite some time i have tried reinstalling NT from scratch numerous times and have no problems for a time and then the error starts again. I've tried removing or renaming my sqlite files and that works for a time but then the error starts again. Please advise.

    #2
    Any additional error messages in the Control Center's Log tab?

    What about error messages in your log and trace files?
    Use Notepad to look at latest files here,
    NinjaTrader 8/log
    NinjaTrader 8/trace


    Each message in those files has a timestamp, try to find
    the time when the error occurred and see what messages
    were sent to the log/trace files. That might help you to
    understand the issue better.

    -=o=-

    Is OneDrive installed?

    -=o=-

    You'll probably need to send your log and trace
    files to Support for their analysis.

    Comment


      #3
      Hi bitdavid. I appreciate your reply. My control center log has lots of messages. Primarily that the sim10.txt. the simulation.txt, and the playback.txt files are unable to be removed or accessed. The readonly database error is also noted. The log and trace files have the same messages plus several other likely relatable entries that I can't decipher. I definitely plan to provide the files if support asks for them. Thanks.

      Comment


        #4
        Are you using OneDrive?

        Comment


          #5
          I do not have OneDrive.

          Comment


            #6
            Hello jamart69 ​,

            Thank you for reaching out.

            There would be a 2 part solution to this.

            The first part that you already know how to do, is renaming/deleting the "NinjaTrader.sqlite" file. This generally fixes database issues.

            However, since yours is re-ocurring and is a "Read only" error, this points to how your local system is currently set up to handle files.


            1. You may rename your database to resolve this using the following steps:
            • Shutdown NinjaTrader, and navigate to the Windows File Explorer (Windows Key + E)
            • Go to the Documents/NinjaTrader 8/db folder
            • Right-click on "NinjaTrader.sqlite" and rename it to "NinjaTrader OLD.sqlite"
            • Here is a reference video: Renaming the Database File


            When you restart NinjaTrader, a fresh database file will automatically be created by the software. You should then be able to connect and your Charts should be loading properly.
            • Unfortunately, the following items stored in the old database will be lost - custom Trading Hours templates, custom Instruments/Instrument Lists, historical trade execution data, and saved Strategy Analyzer backtest results
            • Locally added Sim accounts will be removed, Sim101 will be reset, and any strategies will need to be re-added to the Strategies tab

            To prevent running into situations where you can potentially lose important data, we advise running regular backups via the built-in Backup feature in NinjaTrader.


            2. To try to prevent these errors in the future:

            Windows Firewall/Anti-Virus

            First, please check for any virus protection, firewall, and backup software you may be running, and add exceptions for NinjaTrader so that they do not interfere with NinjaTrader's operation.


            Disable Controlled Folder Access

            Next, press the "Windows Key" on your keyboard > Search for "Controlled Folder Access" > Click on "Controlled Folder Access" > Turn "Controlled Folder Access" off if it is enabled
            • This can be restricted by administrator settings. If you are unable to access this setting, please contact your network/PC administrator.
            • Additional information on Controlled Folder Access may be read at this publicly-available link from Microsoft's website: https://support.microsoft.com/en-us/...ndows-security



            "Hidden" and "Read-only" Folder Settings

            Next, try to adjust the read/write protection for NinjaTrader 8's documents folder:
            • Go to your Computer\Documents folder > right-click on the NinjaTrader 8 folder > select "Properties".
            • From the Folder properties, ensure that the Attributes have both "Read-only" and "Hidden" unchecked.
            • When prompted to Confirm Attribute Changes, please make sure to select "apply changes to this folder, subfolders, and files" and press OK.
            • Re-open the platform to see if the error persists

            Update your Windows
            • Before restarting NinjaTrader, be sure all available updates are installed to your PC from the Windows Settings > Update and Security page.
              • Be sure to manually check for updates here, and reboot after any updates are installed.


            Please let me know if these solutions work for you, and feel free to ask any questions you may have as you work.​​
            Erick P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            57 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            37 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            18 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            20 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            49 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X