Link to home
Start Free TrialLog in
Avatar of al4629740
al4629740Flag for United States of America

asked on

find log file name

I am trying to shrink my log file which is huge in SQL.  I am going to use the following to complete the task

USE <db_name>

--find and copy/save the logical name of log file using command below; 
--the first column is the logical file name
EXEC sp_helpfile

ALTER DATABASE <db_name>
    SET RECOVERY SIMPLE

DBCC SHRINKFILE ( 2 )

ALTER DATABASE <db_name>
    MODIFY FILE ( NAME = <logical_file_name_for_log_file>, SIZE = 100MB, FILEGROWTH = 20MB )

Open in new window


Only problem I'm having is , where do I find the logical file name for log file?
ASKER CERTIFIED SOLUTION
Avatar of Tony303
Tony303
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial