KJV said:
It sounds like until you "Commit" something, it's more or less temporary
That is true for
Data-Manipulation-Language (DML) commands. If you successfully perform
Data-Definition-Language (DDL) commands (e.g., CREATE, ALTER, DROP, RENAME, et cetera) or
Data-Control-Language (DCL) commands (e.g., GRANT or REVOKE), then they carry with them an automatic COMMIT both before execution and after execution.
KJV said:
Then, once you commit it, it's stored to the disk
Oracle architecture can appear rather counter-intuitive (when compared, for example, to SQL Server and other-vendors' db architectures). When the Oracle Instance is up and running against a database, database data can reside either (or both) on physical disk, and/or in the
Database Buffer Cache (in memory).
If your Oracle session requests to see or manipulate data, then your assigned Oracle-server process checks first to see if the data you request in "in memory" (i.e., the database buffer cache). If the data is not in memory, then your server process reads the data from disk, into the database buffer cache. At that point, your processing request continues.
Any changes you perform take place on data in the database buffer cache. Then, if/when you COMMIT, your assigned server process copies the changed data block(s) from memory to the LOG_BUFFER and the LGWR (Log Writer process) writes the contents of the LOG_BUFFER to the current On-Line Redo Log File. Because the COMMITted changes appear on the On-Line Redo Log file,
Oracle does not require the COMMITted data blocks to be written immediately to the Database Data File(s). Oracle's DBWR (Database Writer process(es)) write blocks from the database buffer cache, back to the database data file(s), on a schedule/basis that does not depend upon COMMITs. In fact, Oracle's DBWR process can even write un-COMMITted changed blocks from memory back to the database data file(s)! (How's that for counter-intuitive?) The reason that this is acceptable is because the
real, COMMITted data resides in the on-line (or archive) redo log files. So if disaster strikes (and a recovery occurs), Oracle recovers from a combination of backed up data files and the contents of the redo log files.
So, in summary of this topic (in the Oracle World):[ul][li]Committed data does not need to be written immediately to database data files, and[/li][li]Un-committed data can be (and often
is) written to database data files.[/li][/ul](Interesting [and a little weird], huh?)
KJV said:
...for the purposes of what I would need it for (in my current job), then it wouldn't need to be committed. I'd just need it available long enough to be grabbed by MS Access
Ah,
KJV, there's the rub...
if data is not COMMITted, then it is not yet visible to ANY other session, whether it is an Access session or even another session that the changing user owns. This is a very important point to understand in the Oracle World.
[ul]Explanation: If Oracle User "A" modifies Oracle data, the assigned server process writes a pre-change copy of the data to an Oracle
Rollback Segment. Next, the assigned server process makes requested changes to a copy of the data in the
Database Buffer Cache. Until "COMMIT happens" <grin>, any other process (e.g. User "B", User "C", et cetera) that requests to see data from a row that User "A" has changed (but not yet COMMITted) will see only a copy of the pre-change image that resides in the Oracle Rollback Segment...The other users will not see User "A"'s changed copy of the data.
Therefore, if you want Access (or any other process, Oracle or not) to see results of INSERTs, UPDATEs, or DELETEs, you must first COMMIT the data. (The "changer" of the data is the only process that can "see" the results of their changes.) And as I mentioned in my earlier response, neither Access, nor any other process requesting to see/modify Oracle data, can see/access the contents of an Oracle (Global) Temporary Table.[/ul]
Let us know if this clarifies/answers the issues you posted, above.
![[santa] [santa] [santa]](/data/assets/smilies/santa.gif)
Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services:
www.dasages.com]
“Beware of those that seek to protect you from harm or risk. The cost will be your freedoms and your liberty.”