PDA

Click to See Complete Forum and Search --> : About SQL Server Log File... Help !!!


Wen Lie
Nov 22nd, 1999, 02:34 PM
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

Keiko
Nov 22nd, 1999, 03:24 PM
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