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 are data regions?

92


What is intellisense?

589


What is clustered vs nonclustered index?

509


What is the server name for sql management studio?

477


What are the benefits and tasks of object explorer? : sql server management studio

610






Can you explain what is sql server english query?

541


Is candidate a key?

536


Explain the advantages of merge replication?

516


Is the primary key column of a table an index in ms sql server?

540


What are click through reports?

99


How does stuff differ from the replace function?

555


What are distinctive joins find as a part of sql?

558


What is normalization and its types?

539


I create a separate index on each column of a table. What are the advantages and disadvantages of this approach? : Sql server database administration

585


What the different components of Replication and what is their use?

560