In Sql Server, I find that, when I mark a database as read only, its existing large transaction log remains. To fix this I have to set it back to writeable, then dbcc shrinkfile on the log file, then set it read-only again.
What is the use of a transaction log if the database is read only? Is there a reason it doesn’t just get deleted/flushed?
If your database is still in full recovery mode, the log will not shrink without a proper backup. You should switch your read-only database to simple recovery.
Also, the log file is needed should you ever decide to detach/attach this database. As noted here: