Unix Technical Forum

What's in the transaction log

This is a discussion on What's in the transaction log within the Sybase forums, part of the Database Server Software category; --> Are things like 'create proc' commands logged to the transaction log? What about things like DDL 'create table' and ...


Go Back   Unix Technical Forum > Database Server Software > Sybase

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 04:05 PM
Chris Jack
 
Posts: n/a
Default What's in the transaction log

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 04:05 PM
Ed Avis
 
Posts: n/a
Default Re: What's in the transaction log

chris_jack@msn.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.

--
Ed Avis <ed@membled.com>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 04:05 PM
Bret Halford
 
Posts: n/a
Default Re: What's in the transaction log

Ed Avis <ed@membled.com> wrote in message news:<l1he18t0sy.fsf@budvar.future-i.net>...
> chris_jack@msn.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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-08-2008, 04:05 PM
Subhas
 
Posts: n/a
Default Re: What's in the transaction log

Ed Avis <ed@membled.com> wrote in message news:<l1he18t0sy.fsf@budvar.future-i.net>...
> chris_jack@msn.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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-08-2008, 04:05 PM
Ed Avis
 
Posts: n/a
Default Re: What's in the transaction log

bret@sybase.com (Bret Halford) writes:

>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@membled.com>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:37 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com