Shrink a log file for a database:
- 
In Object Explorer, connect to an instance of the SQL Server  Database Engine and then expand that instance.
 
- 
Expand Databases and then right-click the database that you  want to shrink.
 
- 
Point to Tasks, point to Shrink, and then click Files.
 
- 
Select the Log file that need to be shrunk.
 
Using the Transact SQL Query:
To shrink a data or log file using the Transact SQL Query:
- 
Connect to the Database Engine.
 
- 
From the Standard bar, click New Query.
 
USE <UserDB>;
GO
DBCC SHRINKFILE (UserDB_Log, 1);
 
No comments:
Post a Comment