How to back up transaction log file in MS SQL

Discussion in 'MySQL' started by unitedlocalbands, Jan 4, 2008.

  1. #1
    I cant update my database anymore because of an error I'm getting.

    
    Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]The log file for database 'mydatabase' is full. Back up the transaction log for the database to free up some log space. 
    
    
    Code (markup):
    Any thoughts or help would be appreciated.
     
    unitedlocalbands, Jan 4, 2008 IP
  2. kmap

    kmap Well-Known Member

    Messages:
    2,215
    Likes Received:
    29
    Best Answers:
    2
    Trophy Points:
    135
    #2
    what kind of host it is Linux or windows

    Also what kind of hosting u r using shared or dedicated

    Regards

    Alex
     
    kmap, Jan 5, 2008 IP
  3. unitedlocalbands

    unitedlocalbands Well-Known Member

    Messages:
    246
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    128
    #3
    I have CFML on a windows shared sever.

    Last night after some digging around i found a SQL statment

    
    <cfquery datasource="" name="">
    DDBC SHRINKFILE (filename_log, 2)
    </cfquery>
    
    Code (markup):
    This shrunk the file down by 1k and now everything is running again.

    I also saw a SQL that would change the log setting to SIMPLE RECOVERY os something like that.

    It said to only do this if the log was not required for restoring the database.

    thanks for your response

    Here are some other sql's I found

    
    ALTER DATABASE databasename SET RECOVERY SIMPLE
    
    Code (markup):

    
    BACKUP LOG databasename WITH TRUNCATE_ONLY
    
    Code (markup):
     
    unitedlocalbands, Jan 5, 2008 IP