dbTalk Databases Forums  

What's in the transaction log

comp.databases.sybase comp.databases.sybase


Discuss What's in the transaction log in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Chris Jack
 
Posts: n/a

Default What's in the transaction log - 11-13-2003 , 07:20 AM






Are things like 'create proc' commands logged to the transaction log?
What about things like DDL 'create table' and 'create index'?

I have looked through the manuals and am unable to find direct answers
to these questions.

TIA
Chris

Reply With Quote
  #2  
Old   
Ed Avis
 
Posts: n/a

Default Re: What's in the transaction log - 11-13-2003 , 03:29 PM






chris_jack (AT) msn (DOT) com (Chris Jack) writes:

Quote:
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.

--
Ed Avis <ed (AT) membled (DOT) com>


Reply With Quote
  #3  
Old   
Bret Halford
 
Posts: n/a

Default Re: What's in the transaction log - 11-14-2003 , 10:31 AM



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


Reply With Quote
  #4  
Old   
Subhas
 
Posts: n/a

Default Re: What's in the transaction log - 11-14-2003 , 01:17 PM



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.
Hi,
If that would have been the case, then we would'nt have been able to
do any point in time restores in case of dropping tables by mistake.

Thanks

dba


Reply With Quote
  #5  
Old   
Ed Avis
 
Posts: n/a

Default Re: What's in the transaction log - 11-15-2003 , 08:34 AM



bret (AT) sybase (DOT) com (Bret Halford) writes:

Quote:
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.
Thanks for the correction. I assumed that 'create table' etc. could
not be rolled back so I didn't think about the necessary changes to
sysobjects etc., which of course will go into the database's
transaction log.

--
Ed Avis <ed (AT) membled (DOT) com>


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.