Tagged Questions
1
vote
2answers
80 views
Missing or lost transaction and no errors to show what went wrong
I have 2 missing records in SQL Server and I am trying to identify the problem that caused this issue.
New records are inserted using a stored procedure, which will return an error code to the ...
6
votes
2answers
97 views
SQL Server 2012 Simple Recovery Model with LOG_BACKUP log_reuse_wait_desc
While I'm doing my own investigation, does anyone know why a database in SIMPLE recovery model has a LOG_BACKUP for the log_reuse_wait_desc?
SQL Server 2012 SP1. No replication, no mirroring, no log ...
4
votes
1answer
67 views
When performing a cross-database transaction, in which transaction log(s) is the information stored?
Given the following snippet:
-- error checking omitted for brevity
begin tran
exec database1..my_stored_procedure
exec database2..my_other_stored_procedure
if (@@error <> 0)
rollback
...
1
vote
4answers
85 views
Shrinking the log file does not reduce size
I have a database which had mdf size of 350 MB and ldf size 4.9 GB
When i try to shrink the log file it's not shrinking. I know shrinking a database is not good and it should not be done. But still i ...
3
votes
1answer
57 views
Does creating / updating statistics have an impact on the transaction log?
Does creating or updating statistics, assuming on a large table, create significant (or at all) transaction log churn? I would think not as it does not change the underlying data or structure.
If it ...
6
votes
1answer
86 views
Can I shrink the transaction log file on a mirror database?
This is a followup question to a previous question about why I couldn't shrink the log file on the principal database.
To make a long story short, I setup database mirroring but forgot to make sure ...
5
votes
1answer
102 views
How do I shrink the physical Transaction Log file when it's the principal in a mirror?
We setup database mirroring over the weekend, and forgot to re-enable the job that backs up the transaction logs. When I came in this morning, the transaction log had ballooned to 58GB, and was taking ...
3
votes
2answers
55 views
Time to apply transaction logs: does it matter how many logs?
When restoring from a backup in SQL Server, the procedure is to restore the .bak file and then apply any .trn files since the last full backup.
Does it make a difference how many .trn files there ...
1
vote
2answers
130 views
Reducing high VLF count
I have been using Brent Ozar's sp_blitz script to review our database setup and have found that the VLF count is high (13562!) on the primary DB since changing to Full recovery model.
I ran a full ...
5
votes
1answer
63 views
When REBUILDing indexes on SQL Server, what bearing does tempdb & LOG disk speed have?
Say I have the a data disk that is 50x faster than the LOG and tempdb (measured by Random Write speed) disk. (Don't ask why that's something we'll be fixing if needed)
I have a table that's got 19 ...
2
votes
1answer
67 views
Restoring a database back to a point in time before full backup was made
A problem with one of our database tables arose at the end of last week and I wanted to restore that database to a server in order to retrieve the table. We only have the last backup, and a full set ...
3
votes
1answer
87 views
SQL availability groups log maintenance
I have a AG with 2 nodes in a site in sync mode and 1 offsite in async mode. I'm having trouble understanding how the logspace is maintained in this scenario. For instance, I'm taking log backups ...
4
votes
1answer
117 views
Transaction Log maintenance on Mirror database
SQL Server Version: 2008 R2 Enterprise SP2
I am trying to get a handle on our SQL Server maintenance and I came across something I think is incorrect. We have a single production instance with 3 ...
1
vote
2answers
78 views
Who changed the size of the transaction log?
Can I know, who and when changed size of database transation log?
5
votes
1answer
122 views
Why did my transaction log grow so much? [duplicate]
Possible Duplicate:
Why Does the Transaction Log Keep Growing or Run Out of Space?
About a month ago I migrated my SQL Server 2008 R2 database to a new schema. I ran scripts to migrate the ...
3
votes
0answers
150 views
Why can't I read my transaction log backup file using fn_dump_dblog?
I'm using this blog on sqlskills.com as a guide to practice finding the relevant LSN in a transaction log backup for point in time recovery.
After backing up the transaction log, I attempt to read it ...
5
votes
2answers
151 views
SQL Server Transaction Logs in the Cloud
It is a common practice to place the transaction logs (*.ldf) on a separate physical disk system than database files (*.mdf, *.ndf).
In a virtual machine cloud environment, is it okay to put the ...
0
votes
2answers
118 views
Restore to a point between two full SQL Server backups
I have two SQL Server database backups from Server1. Backup1 was made on, say, 2013-01-01 and Backup2 was made on 2013-01-03. What I want to do is restore Server2 to the intermediate state on ...
1
vote
1answer
212 views
SQL Server - how transactions and transaction log work (simplified)
I have a theory on how transactions work, but I would like if someone could verify it or correct some points if possible. Let's consider we have a database with full recovery model.
Now, everything ...
1
vote
3answers
183 views
Point in time recovery from the same database - what does it mean?
I have two questions. I have a database in full recovery mode. Lets call transaction log an LDF file for short.
SQL Server allows me to restore to point in time in the past when restoring from ...
3
votes
1answer
300 views
SQL Server - contents of transaction log file in more detail
I have a question regarding transaction log (let’s just call it LDF for short) contents. I am assuming a database with full recovery model.
I have read that LDF file contains (logs) each and every ...
11
votes
2answers
4k views
Why Does the Transaction Log Keep Growing or Run Out of Space?
This one seems to be a common question in most forums and all over the web, it is asked here in many formats that typically sound like this:
In SQL Server -
What are some reasons the ...
2
votes
3answers
453 views
ASPState Log file growing tremendously - SQL Server 2008
Microsoft SQL Server 2008 (SP3) - 10.0.5500.0 (X64) Web Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1)
I have an ASPState database online, and its log file ASPState_log is growing ...
2
votes
1answer
128 views
Shrink a large log file for a “Throw Away” database
I have a copy of my prod database on a development server. I am using it to test a deployment script.
But when I run it, it says that the log file is full.
I checked and it is at 10 GB (Almost the ...
29
votes
4answers
2k views
Why does ALTER COLUMN to NOT NULL cause massive log file growth?
I have a table with 64m rows taking 4.3 GB on disk for its data.
Each row is about 30 bytes of integer columns, plus a variable NVARCHAR(255) column for text.
I added a a NULLABLE column with ...
3
votes
4answers
144 views
Does it make sense to use full recovery if the data and log files are on the same HD?
We have a database that was set up to use full recovery and my guess is that the reasoning was only to prevent data loss if a failure happened between backups.
We make daily full backups of the ...
4
votes
3answers
171 views
Disabling logging on certain tables
I'm using SQL Server 2005. I have two tables that contain aggregate information. The information is constantly being updated, generating almost 5GB of log data a day. (That's larger than the entire ...
0
votes
2answers
93 views
SQL Server transaction log [duplicate]
Possible Duplicate:
Why Does the Transaction Log Keep Growing or Run Out of Space?
Is it possible to have SQL Server 2008 R2 reset the transaction log for certain databases when the ...
2
votes
3answers
144 views
Transaction Log file .ldf is too small
Current database is almost 200GB however the transaction log file is only 4.1GB.
I am worried if this influences the performance of databse and how could it be solved.
When I do this query
DECLARE ...
4
votes
2answers
160 views
How do I tell what is filling up the transaction log?
We have a transaction log on a sql database and for some reason it has filled up to 50GB when our live system only has about 2GB. Is there any way I can profile sql or the transaction log to try and ...
4
votes
3answers
728 views
SQL Server virtual log size
I'm somewhat of an accidental DBA, being a developer who inherited a couple of database servers (2005 and 2008) from someone who knew little about database administration, and seemingly had even less ...
5
votes
1answer
89 views
Can We Perform an “Up-To-The-Minute Restore” After Taking Transaction Log Backups?
The Setup:
Say we have a Database in Full Recovery Mode that does a nightly Database Backup, Transaction Log Backup, and Transaction Log Shrink.
Now the Transaction Log grows so quickly during the ...
2
votes
2answers
262 views
How can I find databases with a large number of virtual log files?
I have several databases on a production server that are in the hundreds of gigabytes, and have many thousands of transactions running through them on a daily basis.
Almost all these databases are ...
6
votes
1answer
606 views
SQL Server transaction log file refuses to grow
Problem: I have a SQL Server database sitting on a 1 TB drive. The log will not grow past 5 MB even when the MAXSIZE is set much larger than 5 MB.
Error received:
The transaction log for database ...
5
votes
2answers
536 views
SQL Server 2008 transaction log full
We have a large database, with a size of approx 400GB. We are using bulk insert (from upstream system) with the following parameters:
`Driver=/IIS/Appl/Server/branded_odbc/lib/VMsqls24.so`
...
6
votes
2answers
798 views
SQL Server 'Create Database' statement. How to inherit autogrowth settings?
I am using SQL Server 2008 R2 and creating databases through continuous deployment.
In our system, the default 1Mb/10% autogrowth settings in SQL Server work badly with our data. Particularly as we ...
12
votes
2answers
634 views
SQL Server how to get around the transaction log filling up when updating a column to an int
I have a SQL Server 2005 table called BRITTNEY_SPEARS_MARRIAGES and it has the following columns:
MarrigeId tinyint,
HusbandName varchar(500),
MarrigeLength int
Now I have another table ...
3
votes
3answers
283 views
Is it possible to recover day's worth of queries from sql server log file?
I lost all data entered and edited in my system yesterday, and my ISP has announced to me that last night's backup is corrupt and cannot be recovered.
Is there any way to access the database's log ...
4
votes
2answers
488 views
Transaction Log and mirroring - looking for dumbest explanation possible
First of all I must admit that I struggle with concept of Transaction Log. I mean - I do understand that it is Log of all Transactions that happen on database, but when it comes to properly putting it ...
6
votes
3answers
1k views
View delete statements in the Transaction log
Is it possible to view delete statements that have recently occurred in the Transaction Log?
7
votes
3answers
246 views
Is there a performance benefit to placing transaction log files on a separate drive?
There are many blog posts and best practice articles extolling the virtues of placing the SQL Server data file on one hard drive and the transaction log on another. The reason given is that that the ...
6
votes
1answer
369 views
DBCC CHECKDB firing every 20 - 60 seconds
I have a dev environment that is rapidly approaching deployment into production and have noticed in the logs that roughly every 20 seconds I see the message:
Starting up database 'dbname'
CHECKDB for ...
-4
votes
5answers
2k views
Safely deleting a SQL Server log file (.LDF)
I can make sure my app is in a consistent state.
I can rollback all the uncompleted transactions if any (just in case) it's ok
I can DETACH the database
What do I need the log file for after that?
...
0
votes
1answer
331 views
How to manage a large SQL Server database: transaction log, reduce size, alter table
Hello I have some confusion on how to manage a large SQL Server database.
Let's say size is 15GB, with 3GB available, in simple recovery mode.
Server is not managed by me, I cannot change the size, ...
3
votes
2answers
2k views
How to monitor SQL Server data and log file growth?
I'm trying to find a way to monitor data and log file size from SQL Server databases (within an SQL Server instance). I would not want to use third party tools, but simply pure SQL or PowerShell. I ...
3
votes
2answers
379 views
What is the undo pass that SQL Server does during a RESTORE WITH STANDBY operation?
It's my understanding that SQL Server generates undo files when applying a restore to a database using the RESTORE WITH STANDBY.
From the MSDN documentation (Emphasis mine):
The standby file is ...
2
votes
4answers
332 views
Does a full transaction log cause a rollback?
Will a transaction that is trying to write something into the transaction log be rolled back if the transaction log is full?
2
votes
1answer
711 views
Disable SQL Server Log Shipping to nonexistent destination
I am administering a SQL Server 2008 instance in a dev environment. At some point before I became an administrator, someone enabled log shipping from one of the databases on this dev instance to ...
4
votes
1answer
1k views
Whats the difference between Transaction logs and Binary logs?
Coming from a SQL Server shop, I now work with MySQL and I was curious.
What are the differences between MySQL's binary log and MSSQL's transaction log?
By the outlook thus far, it seems that there ...
2
votes
5answers
2k views
Keep transaction log size under control during batch processing
tl;dr
I think my verbosity has obscured the real question I'm asking here, so I apologise for that. My main issue is that the checkpoint command appeared to be working for at least 800 iterations of ...
