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 type of Index will get created after executing the above statement?

0 Answers  


What are the steps to follow to configure SQL*Net?

0 Answers   Tech Mahindra,


How to set the current database in ms sql server?

0 Answers  


What do you mean by an execution plan?

0 Answers  


Do you know query execution plan?

0 Answers  






What is the difference between distinct clause and group by clause?

2 Answers   HHH, Value Labs,


How to rename an existing column with sql server management studio?

0 Answers  


How will you find out if there are expensive SQL statements running or not?

0 Answers   Atos Origin,


How can you set the threshold at which sql server will generate keysets asynchronously?

0 Answers  


What are the requirements on sql server network connections?

0 Answers  


What will happen when a Rollback statement is executed inside a trigger?

1 Answers   Flextronics, Hexaware,


When would you use the stored procedures or functions?

0 Answers  


Categories