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

Write SQL queries on Self Join and Inner Join.

606


plss anybody specify tha constrian management system in dbms

1571


What are the triggers in sql?

553


How to concatenate two binary strings together?

605


Do you know how to store and query spatial data?

601






How can you know if the row fetched from cursor is still valid in underlying table?

513


What is the concept of optimization?

568


Tell me what is difference between clustered and non clustered index?

556


How to create a new table in a given schema?

656


How many clustered indexes can be created on a table? I create a separate index on each column of a table. what are the advantages and disadvantages of this approach?

677


Explain ms sql server reporting services vs crystal reports?

500


where can you add custom error messages to sql server? : Sql server administration

577


Explain what is log shipping?

574


Which trace flags are enabled in sql server?

520


If we delete pack Spec what will be the status of pack Body ?

966