Results 1 to 12 of 12

Thread: Truncate transaction log through sql query analyser

  1. #1
    Join Date
    Oct 2005
    Posts
    6

    Question Truncate transaction log through sql query analyser

    Hi guys

    My website is in asp and sql2000. My problem is the ISP gave access to database through query analyser. some days the transaction log is growing too high. so i want to clear it. i call up them and clear it. My question is can truncate the log file through query analyser ?
    I had limited access to database.

    Jini

  2. #2
    Join Date
    Dec 2004
    Posts
    502
    BACKUP LOG database_name WITH TRUNCATE_ONLY

  3. #3
    Join Date
    Sep 2002
    Posts
    5,938
    You'd better to backup log to disk for db recovery purpose.

  4. #4
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    Backup does not reduce the size of the transaction log file, you have to use DBCC SHRINKDATABASE or DBCC SHRINKFILE

  5. #5
    Join Date
    Oct 2005
    Posts
    6
    dear skhanal

    It is worked once. but not it not working. the error message returns "please contact your administrator"

    What to do ?

    jini

  6. #6
    Join Date
    Sep 2002
    Posts
    5,938
    Any error message?

  7. #7
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    Everytime you run DBCC you will see
    "DBCC execution completed. If DBCC printed error messages, contact your system administrator."
    message, so if there is no error then you are fine.

  8. #8
    Join Date
    Oct 2005
    Posts
    6
    yes skhanal, you are right.
    err is same. but nothing is happening.

    what to do ?

  9. #9
    Join Date
    Sep 2002
    Posts
    5,938
    "DBCC execution completed. If DBCC printed error messages, contact your system administrator." is not error message.

  10. #10
    Join Date
    Oct 2005
    Posts
    6
    rmiao,

    then how can i solve my problem ?

  11. #11
    Join Date
    Sep 2002
    Posts
    5,938
    What's your problem? Any error message?

  12. #12
    Join Date
    Nov 2005
    Posts
    1
    Quote Originally Posted by JINIJOSE
    Hi guys

    My website is in asp and sql2000. My problem is the ISP gave access to database through query analyser. some days the transaction log is growing too high. so i want to clear it. i call up them and clear it. My question is can truncate the log file through query analyser ?
    I had limited access to database.

    Jini
    Backup log to disk for database recovery purpose.

Posting Permissions

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