Misunderstanding #28: Several misunderstandings about the large capacity transaction log recovery model
A common DML operation can be "minimal log"
No. In the bulk transaction log recovery model, only a small number of bulk operations can be "minimally logged", and a list
space), thus saving time in future recovery.
Lazy writer makes better use of the buffer pool. It regularly checks the data cache, writes unused dirty pages to the disk according to the LRU algorithm, and clears dirty pages to release memory space.
The Eager writer exists for batch inserts such as BCP. This process writes dirty data pages associated with non-log operations (such as large-capacity insertion and selection of insertion. This process allo
information, see Considerations for switching from the full or bulk-logged recovery model. In SQL SERVER 2008, BACKUP log with truncate_only is no longer supported, and to shrink the database log, you first need to truncate the file by setting the database recovery mode to simple. The statements are as follows: --BACK
shrinkfile, you must restart SQL Server in single-user mode. For more information about the DBCC SHRINKFILE, see the section stated performing DBCC SHRINKDATABASE or dbccshrinkfile when using Tempdb. 1. Determine the desired size of the master data file (tempdb.mdf), log file (templog.ldf), and/or other files added to tempdb. Make sure that the space used in the
Label:Restore a full backup first, but be sure to select with Nonerecovery in the full backup (option 2nd in Enterprise Manager) The SQL statement is: Restore Database MyData from disk = ' C:\temp\movedb.bak ' WITH NORECOVERY The database then becomes the recovery mode, so you can restore the trn file by adding it in one piece. Statement is: Restore log Mydata from disk =
"D:\Program Files\Microsoft
. Active_backup_or_restore: Data backup or restore in progress, preventing log truncation 5. Active_transaction: Transaction is active 6. Database_mirring: Database mirroring is paused or the repository log is behind the main library The above is the enumeration value used by version 2008, and after SQL
The SQL Server transaction log may be filled, which blocks subsequent database operations, including update, DELETE, INSERT, and checkpoint.
Full transaction log fills can cause 1105 errors:
Can ' t allocate space for object sys
Label: Method One:
Use [master]
GO
ALTER DATABASE dnname SET RECOVERY simple with no_wait
GO
ALTER DATABASE dnname SET RECOVERY Simple--Easy mode
GO
Use Dnname
GO
DBCC shrinkfile (N ' Dnname_log ', one, truncateonly)
GO
Use [master]
GO
ALTER DATABASE dnname SET RECOVERY full with no_wait
GO
ALTER DATABASE dnname SET RECOVERY Full--Revert to complete mode
GO
Method Two: Error: Database .... The
successful repair ( turn off other query windows if an error occurs )
ALTER DATABASE Bigdata_testinfo set Multi_userYou refresh the database and you find out, okay ~
Scared to the point, quickly check the data there is no problem (formerly)
The size of the wood is also changed
Expand:
Someone attached to the time found ... Tips for rejecting xxx
Uh.. is actually not open permission:
Leave the current user's permission open and OK.
If y
A valid method is to execute the following script: (Bigdata is the database name) use database name; go alter database database name set RECOVERY Simple; -- Set the simple recovery model go DBCC Shrinkfile (database name _log, 1 go alter database database name set RECOVERY full ; -- revert to original mode go Back up the database first before executing. Reference: http://www.cnblogs.com/downmoon/archive/2009/12/13/1623004.html[Go] How to
Tags: task color file Type Center LSE serve automatic logging modeSQL Server transaction log is full solutionOne. Manual shrinkage:1. Database Right-click Properties-Options-recovery mode-drop-down selection simple-last hit OK2. Right-click Database-Task-shrink-File Type-dropdown Select log-shrink operation-not used in
Tags: style tar ext c Get fileWhen doing the project to get a only 280M database backup, but in SQL Server 2000 recovery time to wait for a half a day before the recovery is complete, it feels very strange, so suspect there is something fishy. To the directory of the data file next look, sure enough to claim a close to 10G database log file! Databases that have n
When doing a project to get a only 280M database backup, but in SQL Server 2000 recovery when waiting for a long time did not recover complete, it is incredible, so suspect there is something fishy. To the data file directory next look, sure enough to claim a close to 10G database log files! Databases that have never done so much data before, and have not done a
when using SQL Server High availability features, for example,the XenDesktop site database uses the full transaction logging mode to run database mirroring. transaction logs that run through the full transaction logging mode grow too large until the database space is filled
Brief introductionThis article describes what information is logged in the transaction log of SQL Server and how to read the information in these transaction logs. First, a Microsoft is not exposed to the function Fn_dblog, in the next part of the article mainly use this fun
damaged, you will not be able to take a backup of the transaction log from the disk. Another problem is that when your data is using the bulk-logged recovery model, the current transaction log includes only the minimized log transactions. In this case, a
misunderstanding #28: Several misunderstandings about the large capacity transaction log Recovery Model
A common DML operation can be "minimal log"
No. Only a small number of bulk operations can be "minimally logged" under the bulk transaction log recovery model, and the l
point at which the Point-in-time is recorded in the transaction log to obtain a CKP starting point LSN. When the dirty data is written, CKP also records an end point LSN in the log file. The checkpoint also records a minimum recovery LSN (MinLSN), MinLSN must exist in the checkpoint record to successfully roll back (roll Back/undo), and MinLSN tells
of more than 500 kb.
Then set the database to automatically contract 2. Clear logs Dump transaction database name WITH NO_LOG Again: Enterprise Manager -- Right-click the database you want to compress -- all tasks -- contract database -- contract file -- Select log file -- select to contract to XXM in the contract mode, here we will provide a minimum number of M
CATCH block, COMMIT transaction
IF @ @TRANCOUNT > 0
commit TRANSACTION;
GO Of course the end result is that the transaction is rolled back, and none of the data is inserted into the data table, so all failures fail at the same time, ensuring the atomicity of the transaction. Mode two-ensure the atomicity of the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.