--SHRINKFILE and TRUNCATE Log File in SQL Server
SELECT
DB_NAME(database_id) AS DatabaseName,
Physical_Name,
Name AS Logical_Name, (size*8)/1024 SizeMB
FROM sys.master_files WHERE DB_NAME(database_id) = 'DHL_ETL'
GO
ALTER DATABASE DHL_ETL
SET RECOVERY SIMPLE WITH NO_WAIT;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE(DHL_ETL_log, 1); --file_name is the logical name of the file to be shrink
GO
-- Reset the database recovery model.
ALTER DATABASE DHL_ETL
SET RECOVERY FULL WITH NO_WAIT;
GO
Subscribe to:
Post Comments (Atom)
Search This Blog
DAX - Grouping on multiple columns and the count
Please go thorugh the below URL for entire soultion. http://community.powerbi.com/t5/Desktop/DAX-Grouping-on-multiple-columns-and-the-cou...
-
Database is a collection of objects such as table, view, stored procedure, function, trigger, etc. In MS SQL Server, two types of databa...
-
UNION: To select related information from two tables UNION command is used. It is similar to JOIN command. • UNION All: The UNION ALL comm...
-
Created a table called SegmentDetails. It has 2 columns Segment and Details. Segment contains the category name while Details contains the ...
No comments:
Post a Comment