DB Engine :: Analyzing What Is Causing The Log File To Grow

Aug 20, 2015

For one of our database we have an issue where its log file got increased rapidly last week on Fri and Sat. The database is on SQL  server 2008 R2 with compatibility level at 80. Please see below log grow events :

First, we thought Index maintenance like Re-index and update stats could have been the reason, but when check the schedule that job ran on 16th using below code:

USE ABC
GO
EXEC sp_MSforeachtable @command1="print '?' DBCC DBREINDEX ('?', ' ', 80)"
GOEXEC sp_updatestatsGO

I know above is OLD fashioned, but we believe that should not be the major cause here? How can i determine what happened on 14th and 15th which cause the event to trigger and log file bumps to 80 and 70 GB both days.

View 8 Replies


ADVERTISEMENT

DB Engine :: Why Does Log File Grow When Recovery Mode Is Simple

Jul 30, 2015

My understanding is that the log file is not supposed to grow if the database is under simple recovery mode.I am in a situation where the log grows if do any inserts that involve millions of rows.How do i make sure that it does not grow?

View 11 Replies View Related

DB Engine :: Analyzing Wait Stats

Aug 4, 2015

For one of our SQL server 2005 Ent edition 64 bit SP4 which has transnational replication set up and used for heavy reporting, i was trying to counter out the performance of slow running queries which basically runs and get suspended and most often are seeing waiting:So i tried to analyse the wait stats and come up with below stats where ASYNC_NETWORK_IO dominated for a collection of two weeks data.

View 15 Replies View Related

LDF File Does Not Grow..

Jun 27, 2007

Bear with me - My SQL Server 2005 Maintenance is as good as a Newbie..

I was running a Very Large Transaction over the weekend (Say 10Mill Inserts)..
And after waiting for 3/4 Hrs for the transaction to complete -- Checked the LDF File, I has grown to a 100 GB.

After that i discovered that i had the Recovery Model as FULL .. So Killed the Job and Changed the recovery mode from Full -> Simple.

Now i see that the LDF file is not growing in size even though there are many transactions that were complete successfully (Still Very slow though)...

What am i missing here - Iam clueless as to why my LDF is not growing in size?

Any Ideas??

View 4 Replies View Related

Automatically Grow File

Jan 8, 2004

Hello everyone,
I have 45 GB db with
-Automatically grow file by 10 %
- full recovery
-log shipping every 5 minutes.
-full backup every 24 hrs

database grown from 33GB to 45 GB for 1 year period
4-5 times a year massive insert
done to database(no specific dates)

if I change autogrow to by 300MB or 4%

1.how would it affect insert process ?
2.how it affect daily performance ?

Thank you
Alex

View 3 Replies View Related

Automaticallly Grow File

Oct 1, 2004

What is the best option to set for File Growth?

Is it in megabytes or by percent?

View 3 Replies View Related

Sql 2005 Log File Grow Too Much

Oct 9, 2007



Hello,

I'm running a long and heavy query. during the running the log file of the DB is growing more than 20 GB and i'm running out of disk space consequently. Is there a way to restrict the log file size without demaging my query?

Thanks.

View 9 Replies View Related

My Log File Has Grow The Disk Full

Mar 20, 2004

My logfile has grow the disk full - the logfil is 25 gb and I have 4 gb free.

I can't shrink the log fil !

Can I set the log file to null ??

I have backup my datafil successfully!

Help!

View 9 Replies View Related

Auto Grow Enabled But DB Won't Grow

Jan 15, 2005

I've been through the forum and read a number of threads on people's DBs not growing and the answer usually is they don't have auotmatically grow data file. Unfortunately I have this on, but when I look at the properties of the database it reports the space available is 0.00 MB? Up until about two weeks ago I was showing appx 48% space utilization. When I ran an SP to show growth, it tells me that it was expanded by 20% yesterday, but SQL Server is still telling me the space available is zero.

The log file is also set for auto growth. The DB is 14.5 GB in size and the drives still have around 92 GB of space.

Has anyone experienced this before? Any ideas? Does anyone know of an SPs that can give me detailed info on internal data file size compared to stated size (i.e. wasted space in data file)? Is SQL Server doing something funny in the way it is seeing the database or data files individually? Any help is appreciated.

View 6 Replies View Related

Proactively Grow Data File Size

Jan 9, 2008

My primary (and only) data file has reached the point where it is auto growing. I would like to grow this file in one big chunk at an off peak time. I can't seem to find the code I need to make the file grow when I want it to?

View 1 Replies View Related

How Data File And Log File Grow?

Jul 20, 2005

Greetings,The following shows how the Properties of a database look like:Data Files:File Name: student_datLocation: e:dataMSSQLDatastudent.mdfSpace allocated (MB): 62'Automatically grow file' checkedFile growth: 'By percent 10%' checkedMaximum file size: 'Unrestricted file growth' checkedTransaction Log:File Name: student_logLocation: e:dataMSSQLDatastudent.ldfSpace allocated (MB): 52'Automatically grow file' checkedFile growth: 'By percent 10%' checkedMaximum file size: 'Unrestricted file growth' checkedThe physical files look like this:Name Size Type Modified------------------------------------------------student.ldf 52,416 KB Database File 2/11/2004 10:34PMstudent.mdf 63,424 KB Database File 2/11/2004 10:34PMMy question is now that it has been specified 'Unrestricted file growth'for both the data and the log file, why both haven't increased any insize since 2/11/2004? Actually, the modified timestamps of some otherdatabases files are also '2/11/2004 10:34PM'. That's weird.I found the following message that's relevent to the above timestamp inthe SQL Server Logs:=====2004-02-11 22:34:10.12 server SQL Server terminating because ofsystem shutdown.=====I'm pretty sure there have been a lot updates taking place on thisdatabase. We don't hear any complaints from the customers that theyhave had any problems (such as, no space left) with the databases.Did the SQL server write the data and log somewhere else?Any insight on what's going on would be appreciated.Bing

View 7 Replies View Related

SQL Server 2012 :: Dynamically Grow A Data File?

Dec 5, 2014

Is it possible to dynamically grow a data file for TempDB?

I have some TSQL that I want to execute (this is raw tsql, not something I'd typically share) when I get an alert that TempDB is growing.

SET NOCOUNT ON;
DECLARE @TempDB TABLE (FileID tinyint, name varchar(50), size bigint)
DECLARE @TotalSize decimal(19,4), @TotalFiles int, @CurrentTempDBSize bigint, @SQL varchar(1000), @DBName varchar(50)
SET @SQL = ''
INSERT INTO @TempDB

[code]....

ENDThe code runs fine, but doesn't actually increase the size of the file.

View 7 Replies View Related

Integration Services :: Source Excel File Causing Failure In Agent

Aug 13, 2015

I have a package from SQL Server 2008 R2, that loads data from .xlsx file to database table.There are total 15 columns and 14000 rows in the .xlsx. The package runs fine in BIDS. But the same package in SQL Agent fails with error "omponent "Excel Source" (1)" failed validation and returned validation status "VS_ISBROKEN".

When I tried to run the package by deleting the half of the records for first 7000 rows it ran successfully in agent. Then the second half (last 7000 rows) also succeed from agent job. So, there is no issue with the data/datatypes.The agent job is able to run with record upyo 11000 rows in .xlsx. When I am running for 12000 rows it is failing.Is there any problem with the number of records in .xlsx or size through SQL Agent?

I am running the package from a Proxy account in sql agent job.

ERROR:
Error: Executed as user: PROXY_ID. Microsoft (R) SQL Server Execute Package Utility Version 10.50.6000.34 for 32-bit Copyright (C) Microsoft Corporation 2010. All rights reserved. Started: 10:36:09 AM Error: 2015-08-10 10:36:10.87 Code: 0xC0202009 Source:
XX Connection manager "Excel Connection Manager 1"

[code]....

View 5 Replies View Related

DB Engine :: Recommended Size And File Growth For A Database And Log File?

Sep 22, 2015

What is the recommended size and file growth for a database and log file? We will be storing approx 10000 records a day.Currently we have the following:

CREATE DATABASE Dummy
ON 
PRIMARY
( NAME = Dummy_data,
    FILENAME = 'D:....DATADummy.mdf',
    SIZE = 250MB,
    FILEGROWTH = 25MB )
LOG ON
( NAME = Dummy_log,
    FILENAME = 'D:....DATADummy_log.ldf',
    SIZE = 50MB,
    FILEGROWTH = 5MB ) ;
GO

View 3 Replies View Related

DB Engine :: How To Restore From Current LDF Log File And Old BAK Backup File

Jun 11, 2015

My customer got a total hard drive failure.After sending it to drive recovery specialist we were able to recover the LDF log file (MyDB_0.LDF).But the MDF file was completely destroyed (MyDB.MDF).They have a good full backup from a month ago.

1) Installed SQL Server 2012 on a new PC
2) Created a new database of same name (MyDB) - with same MDF and LDF file names as original
3) Took the new database offline
4) deleted the MDF and LDF files of the new database
5) put "MyDB_0.LDF" in the place of the LDF file I just deleted 
6) put the database back on-line
7) after hitting F5 to refresh databases - it shows "MyDB (Recovery Pending)"
8) tried to do Tail Log Backup with this command
   BACKUP LOG [MyDB] TO DISK = N'C:BACKUPMyDB_TailLog.bak'
WITH NO_TRUNCATE

And I get this error...

Msg 3447, Level 16, State 1, Line 3
Could not activate or scan all of the log files for database 'MyDB'.

The sad thing is I know we can get this data back using ApexSQL-Log. I can see all the transactions since the last full backup in this program - so the log file is not damaged. But my client doesn't want to pay the $2000 fee for this software.There has to be a way to restore this data, without having to purchase a third party tool.

View 13 Replies View Related

How To Analyzing Db Log?

May 15, 2004

Hi knights,
Pls tell me how to analyzing the db log. I'd appreciate your help!

View 2 Replies View Related

DB Engine :: Extension FILE Among Backup File

May 8, 2015

I checked quickly one network  and I ran into the folders; I found out the folder MSSQL backup, nothing strange so far. Within that folder, anyway, I found out several backup and one very huge file (datawarehouse) with extension FILE. I am wondering what can be? I got datawarehouse mdf of course and datawarehouse log but what is that huge file (1 TB)?

View 6 Replies View Related

DB Engine :: Cannot Create A File When That File Already Exists

Aug 18, 2014

Executed as user: S233683-AD01S233683NJ3SQL05. ...at file already exists.' [SQLSTATE 42000] (Error 22048)  ERROR -- Could not backup database: master - BACKUP DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 50000)  xp_create_subdir() returned error 183, 'Cannot create a file when that file already exists.'

View 2 Replies View Related

Analyzing Db Growth Per Day

Feb 14, 2005

Well my question is how do i analyze db growth per day. is there a tool i can use or a method. I mean i do take a look at the task view and the files but per day it doesnt move in MB wich is weird since this is a warehouse and their are nightly loads to it inserting maybe 30000 record a night on avg.

Any help would be grately aprreciated.

View 3 Replies View Related

Analyzing Sysjobhistory

Apr 6, 2004

Has anyone written routines to analyze sysjobhistory? I'm looking for a tool/routine to analyze jobs for failures, trends (such as constantly increasing run times) and other information. It's not as straighforward as I had originally hoped it would be.

I am specifically prohibited from using any 3rd-party tools (too expensive per mgmt).

I would be grateful for any input/insight.

Regards,

hmscott

View 2 Replies View Related

Analyzing SQL Profiler Trace

Mar 26, 2007

Hi All,

I am going over the output of a Profiler trace and I've found that the duration for many occurrences of EventClass 15 (Logout) is several seconds, up to a maximum of 20 seconds. That seems excessive just to complete a logout, so my question is, does the duration figure reflect only the time to complete the logout operation or does it include the total time that the connection has been active for?

Thanks in advance
Lempster

View 3 Replies View Related

Analyzing Sql Profiler Results

Jun 17, 2008

sql server was using a lot of the cpu so I ran a trace.

Now i see the results and there are lines with high cpu number with textdata NULL and AppicationName Internet Information Services

how can i figure out what this is?

View 7 Replies View Related

Analyzing A Query In SQL Server

Oct 31, 2006

I have to duplicate a bunch of reports that were produced by a VB6 app. Now I'm using C#, ASP.net and Crystal Reports via VS2003. Each executes a stored procedure in SQL Server (before and now).

For each report I have a Stored Procedure and a View. The View's SQL code is identical to the Stored Procedure except that the two input parameters (startDate and endDate) are removed because Views don't allow parameters.

Some of the reports work perfectly right off the bat. But others are timing out. My initial test of the timing out is to just display the View. If it fails then I know that the the report engine will fail too.

So now I'm trying out the SQL Query Analyzer tool to execute the code in one of the Views. It's now at 29 minutes and still going - at least it hasn't timed out!

My question is this: Is there a way I could examine what's going on with the query to see why it's taking so long?

Robert Werner

View 4 Replies View Related

Tracing , History And Analyzing DTS Package

Nov 15, 2007

Hi guys,
We have 2 databases: DataBaseSource and DatabaseDestination. We need to truncate all the data in DatabaseDestination and put all the data from DataBaseSource into DatabaseDestination.

What is the best way to do that, we have a lot of data?
And what is the best way if we also need to keep a trace of what happened in case we wanna go back and see what happened.

Also , pls, if we use DTS, is it possible that if someone wants to see what the DTS does, is it possible to read the DTS? I mean if I give a dts to sompeone, a new DBA guy in 2 years for example, how can he know what a certain DTS does? I mean does SQL 2005 put the DTS packaege scripts somewhere or is there a friendly way to know what a DTS dsoes exactly?

Also the trace to see if something went bad is important for us?

Sory if i didn t express myself well enough, and thanks a lot for your help.

Rachid.

View 7 Replies View Related

Data Mining In Analyzing Servers

Aug 7, 2006

I am trying to setup a means to analyze our servers using SQL Server 2005 Data Mining. I will be collecting all the logs from the Event Log of each server and store them in a SQL Server database for analysis.

Has anybody done this before? Can you give some pointers? I would appreciate your assistance.

View 1 Replies View Related

Analyzing Lock Order Of Queries Against Same Table To Prevent Deadlocks

Aug 5, 2014

I need to discover the actual order in which locks are acquired on a table during a query.

This with a goal of analyzing the lock order of queries against the same table to prevent deadlocks.

I'm using SQL Server 2008 R2.

From Management Studio I execute:

begin transaction
<my query>
exec sp_lock
rollback transaction

In the output I see interesting information about which locks are acquired, but:

- are this locks ordered by the time they're acquired? That is, can I be sure that lock at row n is acquired before lock at row n+1?
- if not, how can I get this information?

View 4 Replies View Related

DB Engine :: When Is Log File Cleared

Jun 9, 2015

Recovery model: Simple with Full backups

begin transaction
begin try
        insert into [EthnicRace] select * from [OEPRD].[CIS_Source_Data].[dbo].[EthnicRace];
        insert into [MilestoneOwner] select * from [OEPRD].[CIS_Source_Data].[dbo].[MilestoneOwner];
        insert into [PS_ACAD_CALTRM_TBL] select * from [OEPRD].[CIS_Source_Data].[dbo].[PS_ACAD_CALTRM_TBL];
        insert into [PS_ACAD_DEGR] select * from [OEPRD].[CIS_Source_Data].[dbo].[PS_ACAD_DEGR];
end try

A job on our production server goes out to Oracle and gets raw data from our student system once per night. A job on our development server then uses the above coding to copy that raw data from production to the tables in our development system. My question is, will the log continue to grow until the "end try" is encountered or is it cleared at the end of each INSERT statement?

View 5 Replies View Related

DB Engine :: Not Able To Shrink Log File

Nov 24, 2015

I am trying to shrink the log file as it is eating my disk space. increased to 100GB..message after running the query"Cannot shrink log file 2 (mydatabase_log) because the logical log file located at the end of the file is in use.

(1 row(s) affected)
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
"
(1)use mydatabase alter database mydatabase set recovery simple with no_wait dbcc shrinkfile(mydatabase_log,1) database [mydatabase] set recovery full with no_wait

(2)USE mydatabase;
GO
Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE mydatabase
SET RECOVERY SIMPLE;
GO
Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (mydatabase_log, 1);
GO
-- Reset the database recovery model.
ALTER DATABASE mydatabase
SET RECOVERY FULL;
GO

View 9 Replies View Related

DB Engine :: Deleting A Log File Permanently?

Jul 6, 2015

In SQL 2012 I'm trying to delete a log file (both physically and logically). There are two log files and one of them is unnecessary. When I click 'remove' in SSMS it will delete the log file, but then when I go back under database properties it's still showing up even though the file has been physically removed from the OS. I'm wondering what steps I can take to get rid of the file permanently?

View 12 Replies View Related

DB Engine :: Trace File Rollover

Nov 4, 2015

If we want to change something about a custom server side trace in SQL 2012, do we wipe the current trace with sp_trace_setstatus <trace_id>, 2 and then re-create it with the new definition? It looks like there's no way to modify it in place.

View 6 Replies View Related

DB Engine :: Restore Database Only With MDF File?

Jun 25, 2015

One of our database came to Restoring mode. I suddenly stop my SQL service and Copied only MDF files again Started SQL service ,unexpectedly i dropped the Database. Now i cant able to attach the database only with my MDF file.

I tried below Scripts. All scripts shows same error.

EXEC sp_attach_single_file_db @dbname='PhoenixPolice',
@physname=N'C:Program FilesMicrosoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLPhoenixPolice.mdf'
GO
CREATE DATABASE PhoenixPolice ON
    (NAME = N'PhoenixPolice',
    FILENAME = N'C:Program FilesMicrosoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLPhoenixPolice.mdf')
FOR ATTACH_REBUILD_LOG
GO
CREATE DATABASE phoenixPolice ON (FILENAME = N'C:Program FilesMicrosoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLPhoenixPolice.mdf')
FOR ATTACH

All scripts shows below error

File activation failure. The physical file name "F:Microsoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLDATAPhoenixPolice_1.ldf" may be incorrect.

The log cannot be rebuilt because there were open transactions/users when the database was shutdown, no checkpoint occurred to the database, or the database was read-only. This error could occur if the transaction log file was manually deleted or lost due to a hardware or environment failure.

Msg 1813, Level 16, State 2, Line 1

Could not open new database 'PhoenixPolice'. CREATE DATABASE is aborted.

View 4 Replies View Related

DB Engine :: Cannot Restore BAK File On Server 2012

Aug 6, 2015

i have  .bak file  downloaded from internet , and i also have istalled  sql server  2012.my problem that i can not restore  this  .bak file and get this error massage :

System.Data.SqlClient.SqlError: The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'C:Program FilesMicrosoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLDATASRO_VT_SHARD.mdf'. (Microsoft.SqlServer.SmoExtended)
- .bak file  version  = 661  10  50  1600 = sql server  2008R
- my sql version     = Microsoft SQL Server 2012 - 11.0.2100.60 (Intel X86)

View 4 Replies View Related

DB Engine :: Can't Shrink MSDB Log File - Data Is 3GB But LDF Is 300 GB

Sep 26, 2015

On one of our SQL Server 2008R2 instances the MSDB log file (MSDBLog.ldf) has grown to 300GB+.  The data (.mdf) file is only 3GB.

Neither DBCC Shrinkfile(MSDBLog) nor an interactive "Tasks / Shrink / ..."

I've already deleted much of the historyThe MSDB database is in "Simple" recovery modeI've done a full backup (in case the log was "waiting" for a backup)

I hesitate to do things (such as as Detach / Attach) with MSDB that I might do with a user database.

View 7 Replies View Related







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