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

Why does sql studio use a single registered database repository? : sql server management studio

1 Answers  


What is hierarchy, what are its types and difference between them? : sql server analysis services, ssas

1 Answers  


How to select some specific rows from a table in ms sql server?

1 Answers  


How do I view a stored procedure in sql server?

1 Answers  


What is indexed views? plz explain with example?

2 Answers  


Explain query editor regions

1 Answers  


What is molap and its advantage? : sql server analysis services, ssas

1 Answers  


Is INSTEAD OF trigger directly applicable to Table ?

1 Answers  


Can foreign key be duplicate?

1 Answers  


What is normalization of database? What are its benefits?

1 Answers  


Can you leave a union at any time?

1 Answers  


What is sql server programming?

1 Answers  


Categories