Automatic Truncating Logs

Jan 31, 2008

Hi,
I am a new DBA is small company. Some of the databases grows by few GB everyday, so I am thinking to set automatic truncating for those databases.

Is this a best practise?

Can you please recommend Ideal Recovery model after reading my current model:

1. I do Full backup every night.
2. After 6 hrs, Differential backup.
3. After 1 hr Log backup.

Also please suggest me how many time should I do Re-Indexing?

Thanks,Dipak

View 3 Replies


ADVERTISEMENT

Truncating Transaction Logs.

Jun 7, 2001

I am having trouble Truncating a Transaction Log. I`ve tried everything in Book Online.
I`ve backed up the database, I`ve tried DBCC SHRINKFILE, DBCC SHRINKDATABASE, BACKUP LOG TRUNCATE_ONLY ...etc, but it will not shrink. Any suggestions ? Thanks.

View 1 Replies View Related

Truncating Transaction Logs

Mar 1, 2007

Hi

I just wanted to know can you truncate transaction logs in SqlServer 2000 and if so how is this done?

Thanks

View 1 Replies View Related

Backup Without Truncating Logs?

Dec 20, 2007

I've got a Sql server 2000 box that currently backs up to tape in full every night. I also want to back the box up off site but not in full (as 30GB is a little too much to transfer every evening).

So my plan was to do a full backup to tape at 7pm then a differential at 8pm (to transfer off site).

The problem I am having is that after my differential has been done the logs get truncated so if I want to replay them for any reason I need to get that differential back to site.

Anyone have any suggestions please?

View 7 Replies View Related

Truncating Logs In Logshipping

Sep 20, 2007

How can you truncate database logs without disrupting log shipping configuration on that database

View 2 Replies View Related

SQL 2012 :: Schedule Truncating Of Logs?

Mar 19, 2014

We have many customers with a large database, many workers and many database transactions. Every night the databases are "full backupped". Regularly the logfiles (dbname_log.ldf) grow very large, for example a database (dbname.mdf) of 60GB and a logfile equal in size. When the drive becomes too full, I truncate these logfiles to free diskspace.

Question: is it a good decision to run a script that, after the daily full backup, truncates the logfile if it is larger than for example 10GB?

View 4 Replies View Related

Commiting Transactions/Truncating Transactional Logs/Replication Latency

Feb 22, 2008

Hi,

I have multiple questions and would appreciate any suggestions in resolving them. I'm a novice to these issues.

1) First of all, what is the exact command to setup the trunc. log on chkpt. option on for a transactional log of a SQL Server 2000 database? Is this option on by default? I have noticed for one of the databases I'm managing that the transaction log was over 12 GB, while the db was only 425 MB.

2) How's it possible to run a DBCC TRACEON to see the content of the transaction log to see if we are having any issues with any uncommitted transactions, i.e. updates, inserts, and/or deletes.

3) What are the commands to truncate inactive transactions and increasing the readbatchsize?

4) lastly, how do I validate transactional replication via checksum and find valid latency between a small number of changes that need to be committed between publisher and subscriber.

Thank you so much in advance!
Sincerely,
Alla

View 3 Replies View Related

DB Engine :: Write Logs To Windows Event Logs?

Aug 6, 2015

OS: Windows 2012 Enterprise

SQL Server: 2012 Enterprise

I was wondering if there is any way all SQL Server error log entries could be automatically written to Windows Event Log. 

View 3 Replies View Related

SSIS Logs Vs Custom Logs Components

Feb 12, 2007

Hi,

In my case I have to log the errors raised by any task in a package to either windows event log, text file or SQL server. Also I need to send an email notifications to a group of people telling them about the error.

Now can I use SSIS package logging for logging the errors into the required destinations. I mean right clicking on the package and selecting Logging, then adding the required log providers and enabling the events for logging into those. I think I have to upfront select the log providers to log the error, I will not have the liberty to log the error to the destination, the name of which is passed as a variable to the package. This is okay with me though.

Now what will a custom log provider help me to do in this case. Also can I somehow configure my package to call the send mail task everytime an error is raised.

Also, one more option can be developing a package that only does the error handling. It will take in the paramters or the error codes and descriptions, the destination to write to and a flag to send mail or not for that particular type of error.

What do you think? Kindly advise.

Thanks in advance for your help and time.

Regards,

$wapnil

View 3 Replies View Related

SQL Server Logs (error Logs)

Aug 28, 2001

When looking at SQL Server error logs, I noticed that the current error
log had grown to 1MB whereas most of the files are only a few KB.

QUESTION 1: Can I set the max size for an error log file? If so, how?

QUESTION 2: If not, is there a workaround?

Thanks

View 1 Replies View Related

Help Truncating Log

Oct 18, 2001

I have a large database and I can only do a tape backup, and I have 10 GIG log file on sql2000. Is there a way to truncate it.

Thanks

View 3 Replies View Related

Truncating

Feb 19, 2006

Hi.I have a multiplier that multiplies 2 floating point numbers with 7bits exponent and 10 bits mantissa.so its output has 7 bits exponentand 20 bits mantissa.now its output must return to its input in order to compute anothermultiplication.on the other hand its output must be truncated to 10bits. how can I do this? please help me.thanks.

View 1 Replies View Related

Truncating

Feb 7, 2008

Does anyone have experience with truncating an expression like the Excel TRUNC?

For example in Excel, you might have something like =TRUNC(IF($AE11=0,1,X11/$AE11),5) which drops off a certain amount of the results after the decimal point. 87.5659321 becomes 87.565 instead of the result of a rounding.

View 9 Replies View Related

Truncating A Table

Nov 2, 2006

What is the best way to delete ALL data in a table without the transaction log filling up? I do not need to log the deletions.Truncate Table ReportSearchRecordSets with NO_LOG?Delete * from table with NO_LOG?Thanks SQL Server 2005 newbie

View 3 Replies View Related

Truncating The Log File

Dec 11, 2001

Can someone please tell me where in SQL2000 I can truncate the log file and
set the database to truncate the log at checkpoint?

Thanks,
Dianne

View 3 Replies View Related

Truncating The Transaction Log

Mar 19, 2001

Hi all,
This is a database on which there are continuous inserts and updates. Data is loaded into this database in bulk at regular intervals. I do not back up the transaction log. For these reasons, I have set the options, 'select into/bulk copy' and 'truncate log on checkpoint'. When the 'truncate log on checkpoint' option was not set, the log file would grow very huge and fill up the entire disk space(file growth is unlimited). But, even after the 'truncate log on checkpoint' option has been set, the log file does grow at times to fill up the entire disk. I assumed that since the 'truncate log on checkpoint' option was set, the inactive portion of the log would be truncated every 1 minute(ie, during every checkpoint). Could someone please explain the reason for this behaviour?

Thanks in advance,
Praveena

View 6 Replies View Related

Truncating The Transaction Log

Jun 22, 2001

hello,
Daily, after a database backup done in the evening, around 3am we have a lot of flat files to integrate in tables and then process.

The question is : We want to free the space used by the transation log.
Then, we use "backup log with no_log" and/or "backup log with truncate_only"
We look at the size of the transaction log with "dbcc sqlperf( logspace )" but the 'Log space used %' stays the same.

Could you give us some informations or tips on this.

Thank you from Paris
Patrick

View 4 Replies View Related

Truncating All The Tables

Aug 3, 2000

How to truncate all the tables in the databases at once,if there are 200 tables?Any help is appreciated!
Thanks.

View 1 Replies View Related

Truncating A Field

Nov 2, 2000

I am trying to truncate one field within a table and replace it with data from another database. Creating the data and inserting it is no problem, does anyone have any way of completing the truncate could I use an update or a delete as an alternative method?

View 2 Replies View Related

Truncating The Log File

Dec 8, 2001

Hi everyone,

Although I truncate the log file and I have no pending transactions, its size does not shrink at all (it stays a 0.5 GB).

Does anyone know why or what can I do to solve this issue.

Thanks,
Vasilis

View 1 Replies View Related

Truncating Log File

Jan 30, 2004

Hi,

I am having a problem with growing transaction log size, it has grown to 10 gb and I need to truncate it. How can I do it without interfering the users since it's our production database with 24/7 operational service.

Thanks in advance!!!

View 4 Replies View Related

Truncating Log File

Sep 16, 2004

I have a Database of size 200 MB and my transactio log is 13GB(very high).So can I truncate the log file by taking a fresh full backup?

Thanks.

View 3 Replies View Related

SQL 6.5 Truncating Transaction Log

Jan 28, 2004

Recently I start working with SQL 6.5 server on NT4 (sp6)

Before me someone make abnormal reinstallation of this SQL server.
after that server need to be restarted every day

On the database edit window I have seen that Avaluable Log Space is 0
and in the course of working with device have seen that device definition
is erroneous. the path to file is different from the name of file,
i.e. in device defined (D:aaa03_log) and actually present file
(D:aaalog_03)

and as result every operation on device get the error.
I have change the name of the file to match the sql device definitions but
first this don't helped.
I have added new device and expanded the database log on it, but Avaluable Log Space remains 0.
After a number of restarts I noticed that old erroneous device is now
become visible and I can work with it, for instance expand it. But Avaluable Log Space remains 0 and in the sql monitor I also see that log occupied 100% of avaluable space.

May be transaction log located with data and I just can't see that ?

There is option on database edit window: Truncate transaction Log
and I want run it. The organisation don't interested in log. main thing is that the data will be safe.

Is it the right thing to do?

Tanks to everyone who can help

View 1 Replies View Related

Truncating Numbers

Feb 20, 2006

Hi!

I have field1 decimal(11,0) containing number 1234567 and
I must get the last six digits to int-field, eg. I want field2 int containing 234567 as result. How should I do that with functions? And it should work regardless of the length of the field1, eg field1 = 123456789 -> field2 = 456789

Makkaramestari

View 20 Replies View Related

Truncating A File

Feb 8, 2007

Hi,

I'm using sp_OAMethod to write to a text file, like this:

DECLARE @i INT, @File VARCHAR(1000), @FS INT, @RC INT, @FileID INT, @Date DATETIME

SET @File = 'E: extfile.txt'

EXEC @RC = sp_OACreate 'Scripting.FileSystemObject', @FS OUT

EXEC @RC = sp_OAMethod @FS, 'OpenTextFile', @FileID OUT, @File, 8, 1

EXEC @RC = sp_OAMethod @FileID, 'WriteLine', Null, @Date

This always appends to the file. I want to truncate the file and write to it afresh.

Please inform me how to do that.

View 3 Replies View Related

Checkpoint Not Being Set? Log Not Truncating?

Oct 26, 2007

Hi,

I've set up a number of jobs (not a maintenance plan) via a script in SQL 2005. These jobs do the following:

1) Full backup every sunday night
2) Differential backup every weeknight
3) Log backup every hour

The database is obviously in the full recovery model.

The backups all seem to be running, with one issue - the log file is still growing and is not being truncated. I was under the impression that a log backup should result in the log being truncated after each full backup. However, this does not seem to be the case.

Is there anything obvious I've missed that needs to be set up, or is there a way I can check that the full backup is actually setting the appropriate checkpoint and that the log backups are 'seeing' these checkpoints?

Thanks

View 2 Replies View Related

Truncating A Transaction Log

Feb 4, 2008

2 Questions?

1. When I do a full backup, does that truncate my transaction log? Or does only a backup of transaction log will truncate a transaction log?

View 6 Replies View Related

Truncate On Checkpoint Not Truncating

Dec 30, 1998

The log on one of my databases keeps filling up, even though I have it set to truncate on checkpoint. the only real difference between this database and the others on my server is that it is built from the dump of another database (on another server) where the tables are marked for replication.

I'm wondering if the fact it is built from a replicating database could be causing this. I've noticed I can't drop any of the table, even though my database isn't set to replicate (or publish).

two questions
1) Any ideas?
2) Is there anyway I can make my server realize I'm not replicating so it will let me drop those tables? (nothing in Enterprise manager indicates that my database is replicating or publishing).


Thanks,
Jim

View 2 Replies View Related

INSERT Into TEXT Is Truncating

Nov 3, 2005

I have an application that issues the following against a SQL server table called SQLTEST:

sqltest.TT_MEMO is a TEXT type field
mmvar has about 5k worth of character data

INSERT INTO SQLTEST (TT_MEMO) values (?mmvar)

PROBLEM: the mmvar is getting truncated to 1024 characters

What can I do to rid the truncation?

Thanks,

Peter

View 5 Replies View Related

Display Truncating On SQL Profiler

Jan 20, 2004

Greetings,

I am having a problem debugging an XML error we are getting in our production environment because I can't view the entire call to the stored procedure in Profiler. I have successfully traced the error, but when I go to the line with the call to the SP that caused the error, it doesn't show me the entire call. It only shows me the 'exec sproc_name and then the first 16 characters of the XML string parameter that is being passed to the proc. For some reason it's doing this to ONLY the stored procs that have XML parameters...on procs that use standard parameters, it displays the entire call correctly.

I have looked for some type of setting that controls this, but haven't been able to find it. I also have looked through many forums for this issue but to no avail. Does anyone know why this is happening? And, is there a workaround/fix?

Thanks in advance...

SB

View 1 Replies View Related

Truncating Log Files Daily ..

Apr 21, 2004

Hello -

How can I truncate log files of all Databases daily automatically.

Thanks

View 4 Replies View Related

Doubt In Truncating Decimals..

May 22, 2008

Hello

I need a help ..
I need to convert 45.4593251 to 45.46

How to achieve it.
Can any one help me please..

Thanks
Ganesh

Solutions are easy. Understanding the problem, now, that's the hard part

View 3 Replies View Related

Does Database Need To Shrink After Truncating?

Mar 15, 2007

There is a table need truncate and then insert a huge data (more than million rows) every day. Does database grow up every day?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved