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

How to read data in a table with "select" statements?

0 Answers  


What is database mirroring?

0 Answers  


What are the steps to insert a table?

0 Answers  


What command do we use to rename a database?

0 Answers  


Can you use order by when defining a view?

0 Answers  






What is side by side migration in sql server?

0 Answers  


What are the filtered indexes?

0 Answers  


Plz tell about backup&recovery?

3 Answers  


Can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible?

0 Answers  


What is the tcp/ip port on which sql server runs?

0 Answers  


Difference between rowid and rownum in SQL?

1 Answers   Virtusa,


Explain intellisense for query editing

0 Answers  


Categories