logs

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • daveL

    logs

    hi, i have some huge logs, how do u empty them , from time to time

    DaveL



  • David Portas

    #2
    Re: logs

    "daveL" <vettes_n_jets@ yahoo.comwrote in message
    news:9Deuk.2089 7$89.20832@nlpi 069.nbdc.sbc.co m...
    hi, i have some huge logs, how do u empty them , from time to time
    >
    DaveL
    >
    >
    >
    By backing them up (BACKUP LOG). If you don't require regular log backups
    then select the simple recovery mode, but bear in mind that you will
    generally be at greater risk of data loss under simple recovery.

    --
    David Portas


    Comment

    • AC

      #3
      Re: logs

      if you don't need the log anymore or the data inside it, this will
      shrink it to 10MB.
      DBCC SHRINKFILE (DBNAME_log, 10)

      replace DBName with your DB.

      Amit Chandel

      Comment

      • Erland Sommarskog

        #4
        Re: logs

        AC (amit@desiboy.c om) writes:
        if you don't need the log anymore or the data inside it, this will
        shrink it to 10MB.
        DBCC SHRINKFILE (DBNAME_log, 10)
        But shrinking the log to 10 MB is bad, unless this is just a database
        you fool around in. If you don't backup the log as it should, the log
        may grow overly large, but even if you run with simple recovery of at
        least 100 MB is to recommend, maybe 1GB unless the database is really
        small. With a small log file it will only auto-grow and that will slow
        down operations, and can also lead to fragmentation of the file.


        --
        Erland Sommarskog, SQL Server MVP, esquel@sommarsk og.se

        Links for SQL Server Books Online:
        SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
        SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
        SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

        Comment

        • daveL

          #5
          Re: logs

          this is just a copy of production, for development
          dont need the huge logs

          thanks
          i have set it to simple mode

          Dave L

          "David Portas" <REMOVE_BEFORE_ REPLYING_dporta s@acm.orgwrote in message
          news:eb6dnUrqXu fUHSTVnZ2dnUVZ8 sednZ2d@giganew s.com...
          "daveL" <vettes_n_jets@ yahoo.comwrote in message
          news:9Deuk.2089 7$89.20832@nlpi 069.nbdc.sbc.co m...
          >hi, i have some huge logs, how do u empty them , from time to time
          >>
          >DaveL
          >>
          >>
          >>
          >
          By backing them up (BACKUP LOG). If you don't require regular log backups
          then select the simple recovery mode, but bear in mind that you will
          generally be at greater risk of data loss under simple recovery.
          >
          --
          David Portas
          >
          >

          Comment

          Working...