Ed Avis <ed (AT) membled (DOT) com> wrote
Quote:
chris_jack (AT) msn (DOT) com (Chris Jack) writes:
Are things like 'create proc' commands logged to the transaction log?
What about things like DDL 'create table' and 'create index'?
AFAIK DDL is not written to the transaction log and cannot be rolled
back. |
I can speak on how ASE does it but not ASA. Which are you asking
about?
The ASE log isn't a log of the commands issued, but rather, the
records in the log reflect the changes in various tables that resulted
from the command. There are many kinds of log records, but the most
basic ones would be begin transaction, insert, update, delete, and end
transaction. A create table command would generate a begin
transaction, an insert into sysobjects, one or more inserts into
sysindexes, one or more inserts into syscolumns, one or more inserts
into sysprotects, [etc.] and a final commit tran. There are many more
kinds of log records (such as index insert, index delete, index page
split, checkpoint, etc.) - this is really a gross simplification. All
the commands you mention would generate log records - pretty much
everything that changes the state of the database does generate log
records. SELECT, since it does not change the database state, does
not generate log records.
-bret