Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 dump transaction

Author  Topic 

vicki
Posting Yak Master

117 Posts

Posted - 2002-04-09 : 15:46:47
Hi,
I don't know how to dump the transaclion log for SQL 2000. I look at BOL for help regarding for the dump transaction but it doesn't give me the instruction of how to do it.

I know how to do in SQL 6.5 just go to database wizward the click on truncate the it will truncate the transaclion log for you
OR using the query below
dump transaction dbname
with no_log

How do I dump the the log or truncate the log in sql 2000?
Thanks

setbasedisthetruepath
Used SQL Salesman

992 Posts

Posted - 2002-04-09 : 15:54:21
look up the BACKUP LOG command in BOL

setBasedIsTheTruepath
<O>
Go to Top of Page

vicki
Posting Yak Master

117 Posts

Posted - 2002-04-09 : 16:12:37
Why do I need to bakup the log? Suppose I don't need to then what is the command for truncate the log?

Thanks

Go to Top of Page

setbasedisthetruepath
Used SQL Salesman

992 Posts

Posted - 2002-04-09 : 16:18:02
Well Vicki this is where you'll have to "think outside the box" ... I know it sounds strange, but trust me. It's with the BACKUP LOG command that you have an option to truncate the log ...

setBasedIsTheTruepath
<O>
Go to Top of Page

vicki
Posting Yak Master

117 Posts

Posted - 2002-04-09 : 16:40:45
Here is the example comand from BOL for back up transactio log but I don't see any thing related to truncate the log?

BACKUP LOG MyNwind
TO MyNwind_log1
GO


Thanks

Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-04-09 : 16:54:53
BACKUP LOG MyNwind WITH NO_LOG

This will not back up the log, but rather truncate it.

Go to Top of Page

vicki
Posting Yak Master

117 Posts

Posted - 2002-04-11 : 13:12:46
After I ran this command but then I check back the transaction log and the number is the same as before . How do I to find out that after I excute
BACKUP LOG DB WITH NO_LOG then I have more free space

thanks

Go to Top of Page

izaltsman
A custom title

1139 Posts

Posted - 2002-04-11 : 13:24:41
After you truncate the log, the file size doesn't change...
If you want to release the space you freed up to the operating system, you can use DBCC SHRINKFILE (but remember, the file will start growing again, once the log begins to fill up).
If you don't need to release the free space on disk, but simply want to verify that log was truncated successfully, run DBCC SQLPERF (LOGSPACE)


---------------
Strong SQL Developer wanted in the Boston area. Please e-mail if interested.
Go to Top of Page
   

- Advertisement -