473,796 Members | 2,509 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Second Transaction Log File

Hi All,

I have a dillema that I created 2 transaction file before I started to
take log back. Now I changed my recovery model from simple to full. Do
I still need to keep my second transaction file? If I remove it would
it be a problem for my system and log back up?

If somebody responds me I really appreciate it

Regards

Jul 18 '06 #1
5 5932
laststubborn (ar*********@gm ail.com) writes:
I have a dillema that I created 2 transaction file before I started to
take log back. Now I changed my recovery model from simple to full. Do
I still need to keep my second transaction file? If I remove it would
it be a problem for my system and log back up?
You can remove it if you like, but you should do it properly with
DBCC SHRINKFILE (EMPTYFILE) and ALTER DATABASE.

--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Jul 18 '06 #2
Could you please give me an example how to do it properly?

Thanks,

Erland Sommarskog wrote:
laststubborn (ar*********@gm ail.com) writes:
I have a dillema that I created 2 transaction file before I started to
take log back. Now I changed my recovery model from simple to full. Do
I still need to keep my second transaction file? If I remove it would
it be a problem for my system and log back up?

You can remove it if you like, but you should do it properly with
DBCC SHRINKFILE (EMPTYFILE) and ALTER DATABASE.

--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Jul 19 '06 #3
laststubborn (ar*********@gm ail.com) writes:
Could you please give me an example how to do it properly?
Let's see, then I would have to look up the exact syntax in Books Online,
since I don't know it by heart. As I said, use DBCC SHIRNKFILE with the
EMPTYFILE option, and then ALTER DATABASE with REMOVE FILE. Please check
Books Online for the exact syntax. There is also some good text that
explains what EMPTYFILE is all about.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Jul 19 '06 #4
What do you think is it good or bad to remove the second log file ?
what would you do keep the log file or delete it? Is it gonna have any
negative effect on my log back and its size?

by the way this is the code that you recommended

-- Empty the data file
DBCC SHRINKFILE ('Test1data', EMPTYFILE);
GO
-- Remove the data file from the database
ALTER DATABASE AdventureWorks
REMOVE FILE Test1data;
GO
Erland Sommarskog wrote:
laststubborn (ar*********@gm ail.com) writes:
Could you please give me an example how to do it properly?

Let's see, then I would have to look up the exact syntax in Books Online,
since I don't know it by heart. As I said, use DBCC SHIRNKFILE with the
EMPTYFILE option, and then ALTER DATABASE with REMOVE FILE. Please check
Books Online for the exact syntax. There is also some good text that
explains what EMPTYFILE is all about.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Jul 19 '06 #5
laststubborn (ar*********@gm ail.com) writes:
What do you think is it good or bad to remove the second log file ?
what would you do keep the log file or delete it? Is it gonna have any
negative effect on my log back and its size?

The main reason for having multiple log files is to spread the load
over disks. Or handle the situation when the transaction log outgrows
its disk.

The log backup will not be very much affected of whether there are one or
two log files. The size of the log backup will depend on much is written
to the transaction log.

I can't really say whether you should keep the second log file, because
I don't know what your database is about, nor do I know the sizes of the
database or the log. But if the log grew, because you failed to back it
up, there is a fair chance that you by now have an over-dimensioned log.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Jul 19 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
13351
by: TZoner | last post by:
1) Can one find the location of the 'Transaction Log' at: <Hard Disk>\Program Files\Microsoft SQL Server\MSSQL\Data\MyDb_Log.ldf? 2) Is it safe to delete it, as SQL will create a new Transaction Log when it realises none already exist? 3) When trying to do 2) I get error message that file is in use, even though SQL Server is closed. Any suggestions? 4) Can anyone shed light on the error message 'Write on ... <my path
1
1636
by: jeffreyv | last post by:
Hi! I'm studying to have my MCSE 70-228 certification and I'm trying some things with backing up transaction logs and shrinking it. Here's what I do: There is no activity in the database by the way. I have a transaction log of 1792 kb...
2
7415
by: richardshen | last post by:
What command should should I use get the load on DB2? SNAPSHOT? EVENTMONITOR?
4
1492
by: Ron | last post by:
Hi All I've got 2 files, transactions and comments, linked by a clientID as a FK in the clients file and as a FK in the comments file (PK in the 'client' file of course). The comments don't necessarily have to have anything to do with the transactions, but usually they do (explanations about when payment will be sent, who in the office has talked to the client about the bill and what was said, etc). The comments, rather than being a...
6
348
by: Chris Fink | last post by:
I have the need to perform an atomic operation in two systems, a database and an ftp site. The process is two step; 1. insert a row into oracle, 2. delete a file from a remote ftp site. I need to make these steps atomic...either they both succeed or both fail. Any suggestions on how I create a transaction that bridges these two steps (systems) using C#? Thanks in advance!
1
2148
by: Hubert Fröhlich | last post by:
Hi list, when doing a large Insert I get in the logfile: 2004-08-03 07:23:46 LOG: recycled transaction log file "000001BA000000BD" 2004-08-03 07:34:00 LOG: recycled transaction log file "000001BA000000C2" 2004-08-03 07:34:00 LOG: recycled transaction log file "000001BA000000C3" 2004-08-03 07:34:00 LOG: recycled transaction log file "000001BA000000C4" 2004-08-03 07:34:00 LOG: recycled transaction log file "000001BA000000C5"...
2
3793
by: Christian Stooker | last post by:
Part one: ====== Hi ! I want to use SQLite database like the FireBird database: with big isolation level. What's that meaning ? I have an application that periodically check some input directory,
4
13226
by: yashgt | last post by:
Hi, We have created a SQL server 2000 database. We observe that the transaction log keeps growing over time. We are now about to run out of space. We have been periodically shrinking the database. Nevertheless the size has increased. I would imagine that a transaction log can be eliminated if we stop the database. Can that be done? Is there a way to completely wipe off the transaction log? Thanks,
2
3977
by: =?Utf-8?B?Q2hyaXMgRmluaw==?= | last post by:
I have the following requirements and am looking to make this into a c# transaction. 1. Read from a file into a memory stream 2. Insert the stream into a DB 3. Delete the file Is it possible to perform a transaction on both a File action and a DB insert?
0
9680
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9528
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10230
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10174
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7548
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.