Link to home
Start Free TrialLog in
Avatar of Varshini S
Varshini S

asked on

How to set the autogrow file name and size in SQL SERVER for my production Database ?

I am using SQL Server 2008 r2. How to  modify  the autogrow file name and size in SQL SERVER  for my production Database  ?
ASKER CERTIFIED SOLUTION
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland 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
Avatar of Varshini S
Varshini S

ASKER

When I execute this query, I can see the FileName in the output. Is it possible to modify the log file name ?

SELECT
    DatabaseName,
    [FileName],
    SPID,
    Duration,
    StartTime,
    EndTime,
    FileType = CASE EventClass WHEN 92 THEN 'Data' ELSE 'Log' END
 FROM sys.fn_trace_gettable(@path, DEFAULT)
It's possible but you need to stop the database to do that.

But why you want to change a file name?
I have some other databases in the same server.
But the log file names are generated with time stamp so I want to change the name to my log file.
Vitor Montalvão ,

For changing the log file should I have to stop SQL server service ?
No. You just need to stop the database that are using the log file. You can't do any operation on files if the database is online.