After you have restored the mirror database and configured Data mirroring, when you start the mirroring it throws this error. The solution to resolving this is to restore the backup of the transaction log to the Mirror database. 1. Take backup of the TLOG at Principal site BACKUP LOG TO DISK = N'E:\transaction_log_bkp\Tlog_Bkp.trn' WITH NOFORMAT, … Continue reading The mirror database has insufficient transaction log data
TRANSACTION LOG
Attach Deattach Database T-SQL SQL Server 2005 2008
-- Attach a database USE master; GO CREATE DATABASE ON (FILENAME = 'd:\sql data\dbname.mdf'), (FILENAME = 'd:\sql data\dbname_Log.ldf') FOR ATTACH; GO -- Dettach database and take offline -- USE master; GO ALTER DATABASE SET OFFLINE WITH ROLLBACK IMMEDIATE go EXEC sp_detach_db @dbname = N'dbname'; GO
Managing Transaction Logs
What is the Transaction Log? At its simplest, the transaction log is a log of all transactions run against a database and all database modifications made by those transactions. The transaction log is a critical part of the database’s architecture. The transaction log is not an audit log. It’s not there so that the DBA … Continue reading Managing Transaction Logs
Trucate Transaction Log in SQL Server 2000/2005
In SQL Server, it is important to keep the size of the transaction log at a decent size. If the transaction log fills up your disk drive. It can hang up the database. T-log is like archived redo log files in oracle database. Instead of storing multiple files, SQL server stores the t-log as a … Continue reading Trucate Transaction Log in SQL Server 2000/2005