Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2003
    Posts
    2

    Unanswered: Temp Tables and Logging

    Are updates/inserts to Temp Tables 'Logged' operations?

    I will not be able to perform a SELECT INTO statement so I'll be using an INSERT INTO instead many times throughout the day. If it is logged, it may fill up the log file.

  2. #2
    Join Date
    Jul 2002
    Location
    Village, MD
    Posts
    621

    Re: Temp Tables and Logging

    Originally posted by cncnole
    Are updates/inserts to Temp Tables 'Logged' operations?

    I will not be able to perform a SELECT INTO statement so I'll be using an INSERT INTO instead many times throughout the day. If it is logged, it may fill up the log file.
    Check this out:

    create table #tmp(id int)
    begin tran
    insert #tmp values(1)
    select * from #tmp
    rollback
    select * from #tmp

  3. #3
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322

    Re: Temp Tables and Logging

    Originally posted by snail
    Check this out:

    create table #tmp(id int)
    begin tran
    insert #tmp values(1)
    select * from #tmp
    rollback
    select * from #tmp
    I guess s/he's trying to say that yes..they are logged

    what's your recovery model set to?

  4. #4
    Join Date
    Oct 2003
    Posts
    2
    recovery mode is FULL. I would think that transactions against temp tables are NOT logged, but couldn't find any definitive answer anywhere.

  5. #5
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Originally posted by cncnole
    recovery mode is FULL. I would think that transactions against temp tables are NOT logged, but couldn't find any definitive answer anywhere.
    No they are logged...why are you worried that your logs will blow out?

    How often do you dump your transaction logs, and how much space did you allocate? Did you set it for unrestricted growth? (I wouldn't...)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •