DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4

Thread: SQL Server

  1. #1
    Becky Guest

    SQL Server


    Hi, Good day!
    I'm using SQL server for my DBMS. My log files is going bigger and bigger
    now. I want to archive my log files in order to reduce the space occupied
    by the database. How can I do to arhive the files regularly so that I can
    maintain the database to its minimum size possible?
    Look forward to your advice and help. Thanking you in advance.

    Bye.

    : ) Becky

  2. #2
    Michael Levy Guest

    Re: SQL Server

    Becky,

    The short answer: you need to truncate your log file to remove the
    information from inactive transactions - that is, information for
    transactions that have already been committed. You have two choices: you can
    backup this information which makes it available in case you need to restore
    the database, or you can just throw it away. Either way, check out the
    BACKUP LOG command in the SQL Server Books Online.

    -Mike
    --
    Michael Levy MCSD, MCDBA, MCT
    Consultant
    GA Sullivan
    michaell@gasullivan.com




  3. #3
    Becky boeykean Guest

    Re: SQL Server


    Dear Michael,
    THank you for your response. REally appreciate that.
    But, I'm not so sure how to truncate the inactive transactions logs. I would
    be much appreciate if you can show me the way. Many thanks again.

    Bye.

    Becky

  4. #4
    Matjaž Primec Guest

    Re: SQL Server


    Hi, there is a possible solution

    You can detach database, erase log file and then attach database. Size of
    a log file will drop to 512 kb. Before you do this I suggest you to make
    a backup of log and dat files. The log file file contains all the transactions
    made and lots of other stuff so when you delete it you erase all transactions
    made in the past and restoring a database to a point of time becomes impossible.

    bye
    Primec Matjaž

    "Becky" <boeykean@hotmail.com> wrote:
    >
    >Hi, Good day!
    >I'm using SQL server for my DBMS. My log files is going bigger and bigger
    >now. I want to archive my log files in order to reduce the space occupied
    >by the database. How can I do to arhive the files regularly so that I can
    >maintain the database to its minimum size possible?
    >Look forward to your advice and help. Thanking you in advance.
    >
    >Bye.
    >
    >: ) Becky



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links