Results 1 to 2 of 2

Thread: About SQL Server Log File... Help !!!

  1. #1

    Thread Starter
    Fanatic Member Wen Lie's Avatar
    Join Date
    Jul 1999
    Location
    Singapore
    Posts
    524

    Post

    Dear All,

    My last posted about SQL Server has been answered. But, now, I have one more question about this.

    I was told to clean up the log by using this statement at SQL Query Analyzer (at Server of course). The statement is like this :

    DUMP TRANSACTION yourdtbname WITH NO_LOG

    It works... But, only if I run it at my NT server. Now, I want to run it from my SQL Server at my PC. Is it possible ??

    And if I want to make an application with Visual Basic to clean up all database log file, can I use the statement ??? If I couldn't use it, so... what should I do ???

    Thx a lot...

    BRgds,
    Wille
    Junior VB Programmer

  2. #2
    Addicted Member
    Join Date
    Sep 1999
    Posts
    229

    Post


    Hi Wen Lie,

    Yes you can execute "DUMP TRANSACTION"
    from your PC, but you must have System Admin Privilege.

    Do this ...

    ' replace yourODBCsetting with your setting
    ' and yourdtbname with your database name

    Public gWrSp As Workspace
    Public yourconnection As Connection

    Set gWrSp = CreateWorkspace("ODBCWorkSpace", "", "", dbUseODBC)
    Set yourconnection = gWrSp.OpenConnection("", dbDriverNoPrompt, True, yourODBCsetting)

    yourconnection.Execute ("DUMP TRANSACTION yourdtbname WITH NO_LOG")

    Does it help ?

    ps: be careful in using System Admin ID.

    Regards

Posting Permissions

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



Click Here to Expand Forum to Full Width