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



When we are using this query to shrink the log file,what exactly it will execute internally? Do we..

Answer / purushothaman

It will remove the uncommitted data

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What are partitioned views and distributed partitioned views?

0 Answers  


Explain about SQL server 2005?

0 Answers  


What are the different ways of moving data/databases between servers and databases in SQL Server?

3 Answers   HCL,


what is a stored procedure and trigger?

3 Answers  


How to test subquery results with the exists operator?

0 Answers  






What are the advantages of using a stored procedure?

0 Answers  


How can sql injection be stopped? : sql server security

0 Answers  


Can you move the resources after pausing the node? : sql server database administration

0 Answers  


How can I check if a view exists in a sql server database?

0 Answers  


How to override dml statements with triggers?

0 Answers  


Explain filtered indexes benefits?

0 Answers  


Which virtual table does a trigger use?

3 Answers  


Categories