When we are using this query to shrink the log file,what
exactly it will execute internally? Do we lose any data
when we run this script? which data it will truncate in the
log file and where it is saved. Please let me know...

USE DatabaseName
GO
DBCC SHRINKFILE(<TransactionLogName>, 1)
BACKUP LOG <DatabaseName> WITH TRUNCATE_ONLY
DBCC SHRINKFILE(<TransactionLogName>, 1)
GO

Answer Posted / purushothaman

It will remove the uncommitted data

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is star, snowflake and star flake schema? : sql server analysis services, ssas

856


What is a partition key?

676


Where is localdb stored?

731


What is entity data services?

780


What is the latest version of microsoft sql server?

671






How to restore performance issues and how to check?

1710


What are the system database in sql server 2005?

734


Tell me the phases a transaction has to undergo?

714


How many types of schemas are there?

732


what is normalization? Explain different levels of normalization? : Sql server database administration

893


What is advantage data architect?

682


How to create a local temporary stored procedure?

685


What is explicit cursors?

735


What is merge replication?

863


What are data regions?

107