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)
 Second Transaction Log

Author  Topic 

NewJerseyKing
Starting Member

2 Posts

Posted - 2006-01-08 : 15:36:17
I hope someone can help.

I have accidently when messing about with a SQL Server database, created a second transaction log on a different drive of the server. I thought that the second log would be empty, but it seems to have created a replication of the original transaction log (both are 7GB in size).

Noting my mistake, I decided to try and delete the second transaction log. Unfortunately I received a message to say that the file was currently in use (Access violation), so I couldn't complete a delete.

I am now quite worried what the second transaction log must be doing? I really want to get rid of it so that the SQL database only uses the original log. I realise that the transaction log is a crucial cog of SQL databases. In hindsight, I probably shouldn't mess around with stuff that I'm not 100% clued up on.

What can I do? help?

Da Man
Starting Member

1 Post

Posted - 2006-01-08 : 16:48:06
you may have to configure the db to point to the first log file and then delete the second one. do this after a backup.
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-01-08 : 17:06:52
First, empty the log file you want to delete:
DBCC SHRINKFILE ( 'logical_log_file_name',EMPTYFILE )

You cannot alway shrink the transaction log right away. This link has info on the situation:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_da2_1uzr.asp


Then, remove the empty log file from the database:
ALTER DATABASE database_name
REMOVE FILE logical_log_file_name

You should read about both of these commands in SQL Server Books Online first.







CODO ERGO SUM
Go to Top of Page
   

- Advertisement -