No its like opening the back cover on your TV remote before inserting the batteries...
Jokes aside, I'm not 100% sure the Bitcoin-QT client will only accept the Blockchain files after selecting detach database at shutdown. It may only be necessary if just the blockchain files are transferred and not the clients settings but I don't know where they are stored.
To answer your question, the setting is stored in the Windows registry under
HKCU\Software\Bitcoin\Bitcoin-Qt\detachDB.
The detachDB option prepares your blockchain for the move to another computer by making it more idiot-proof (without me having to explain why). To explain why I detail every step above, I guess I'll have to explain what I think might be done by naive users without explicit instruction (or with incorrect instruction):
- Try to copy the database files while Bitcoin might be running, while it is still writing to, or still has locked file handles on, the database files,
- Copy the data directory but not copy/restore the log files subdirectory,
- Not be running the same version/platform/bittiness of Bitcoin on the other computer they copy the datadir to.
When you make a backup of the datadir file (without detachdb), the backup
can be restored on the same machine with the same version of Bitcoin with no problems. This should make sense to you intuitively, because the entire data set will be exactly the same. However, that data may not work correctly on another version of Bitcoin without
preparation.
Why do I specify to run and close Bitcoin with the detachdb option? Read what is performed when you use this option:
Description: DbEnv::lsn_reset
The DbEnv::lsn_reset method allows database files to be moved from one transactional database environment to another.
Database pages in transactional database environments contain references to the environment's log files (that is, log sequence numbers, or LSNs). Copying or moving a database file from one database environment to another, and then modifying it, can result in data corruption if the LSNs are not first cleared.
Note that LSNs should be reset before moving or copying the database file into a new database environment, rather than moving or copying the database file and then resetting the LSNs. Berkeley DB has consistency checks that may be triggered if an application calls DbEnv::lsn_reset on a database in a new environment when the database LSNs still reflect the old environment.
The DbEnv::lsn_reset method modifies the physical file, in-place. Applications should not reset LSNs in files that are currently in use.
The DbEnv::lsn_reset method may be called at any time during the life of the application.
The DbEnv::lsn_reset method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.
Don't do this, what are you likely to see in your db.log file?:
error:file unknown has LSN 333/1994577, past end of log at 1/28
Commonly caused by moving a database from one database environment
to another without clearing the database LSNs, or by removing all of
the log files from a database environment.
Bitcoin doesn't perform this operation on the blockchain database normally, because it takes a long time, and it is likely that the user will interrupt the writing process when they see Bitcoin isn't closing quickly or when they told their computer to shutdown and it's not shutting down due to the database files being written. This will corrupt database files. Enabling detachdb on the new computer in advance of restoration would only prepare database files which will be discarded anyway. Permanently enabling detachdb without knowing what it does or the caveats can increase the chance that the Bitcoin client's blockchain or other database files (uh, wallet?) will become corrupted in the future through end-user action.
You might thing tire-change instructions like these are tedious:
1. Move car to a flat and level surface, do not proceed work at an unstable or unlevel area,
2. Identify that you possess these items: cover pry tool, lug nut wrench, car jack, spare tire (properly inflated), tire chock,
3. Set vehicle parking brake and chock wheels at opposite end of vehicle from tire to be changed,
4. Remove wheel cover by prying at the indent notch at edge of cover with removal tool located in trunk,
5. Loosen each lug nut 1/4 turn by placing lug wrench tool on each lug nut (handle facing to the left) and stepping on it,
6. Locate jacking point on body rail seam weld, it will be an indent in the rail 6" from the wheel-well that can be felt,
7. Place jack under jacking point, raising it so it contacts vehicle by turning handle clockwise,
8. Verify that the jack is contacting vehicle at the notch and is perpendicular to ground,
9. Continue raising jack until tire is off the ground by 1" distance,
10. Remove all lug nuts from wheel and place in a secure location,
11. Remove wheel from lugs by shifting it left to right until it becomes disengaged from vehicle,
12. Place spare tire on lugs by orienting holes to match lugs and lift it into place,
13. Push wheel fully on lugs, ensuring that the center hole of wheel has seated itself around centering ring in spindle,
14. Replace lug nuts, hand tighten all nuts with wrench until turning resistance is met, using tightening pattern in vehicle manual
15. Lower vehicle jack, and tighten lug nuts to the same resistance as loosening them,
16. Place tools, jack, and original wheel in trunk,
17. Do not drive over 50MPH or over 50 miles on temporary spare tire, have tire serviced immediately.
However, at every step there is a way some idiot can screw up or kill themselves. I stopped and helped a ditzy blonde change a tire once, she couldn't get the lug nuts off because the wheel was spinning in the air. Of course I also noted the unstable vehicle wobbling in the air because she put the jack about a foot inside from the edge of the car, jacking up under the body and bending in the passenger footwell about six inches.
A good technical writer knows it is impossible to make anything idiot-proof, because idiots are so ingenious.