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 will be the value of @@fetch_status if a row that was a part of the cursor resultset has been deleted from the database after the time the stored procedure that opened the cursor was executed?

0 Answers  


What is the minimum recommended amount of ram for sql server 2012 enterprise?

0 Answers  


How do I find my localdb version?

0 Answers  


How do I create a stored procedure in dbml?

0 Answers  


how to find out the repeated value from table using groupby function?

4 Answers  






what is the difference between sql query and google query?

10 Answers   TCS,


What is difference between count (*) and count column?

0 Answers  


How to use values from other tables in update statements in ms sql server?

0 Answers  


What is nolock hint in sql server 2008

0 Answers   HCL,


Can you pass expressions to stored procedure parameters?

0 Answers  


Explain trigger and its types?

0 Answers  


Can a rule be bound to any column of any data type?

0 Answers  


Categories