tempdb database

  • How does the data files and log files get used seperately in tempdb

    database?I mean when does the data file gets used and when does the log?

    I read articles where they say when you use cursors, group by , order by and so on ,the tempdb log gets full but isnt it the user database log which fills up?

    Also what the most appropriate thing to do when tempdb log fills up? any

    help will be greatly appreciated?

    TIA

  • This was removed by the editor as SPAM

  • The log is used just like a database log. It stores information about the transactions that are in use. Since there isn't really a recovery when you restart, the tempdb database is usually in simple mode, which means that it checkpoints and trunactes the inactive log every 5 minutes or so.

    However, if you run a long/complex query, it runs inside tempdb as a single transaction for the group by,order by, etc. That means that it doesn't get truncated until it's complete. It also means that a lot of worktables, or large worktables needed for the operation could generate lots of insert/update/delete activity. That translates to lots of log records.

    So you want to set your tempdb db and log to be the largest you need. If you get out of space errors, you don't have enough space dedicated or available for tempdb.

  • hi!

      steve  here's  here answer

    temp  DB  you  create  a  database  and  which  is  temporary  it is  not  saved implicitly

    compared  to  master data base

    regards

    ardent

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply