Incresses AutoGrowth By Using Script

  • Hi Friends,

    can some one please help me with script which data file auto growth is not set to 5gb and Log file auto growth is not set to 8gb, So by using our script Datafile autogrowth should be set to 5gb which datafile auto growth is not 5gb and in the same way which log file auto growth file is not set to 8gb, by using our script log file should set to 8gb. For User DBS?

    Thanks,

    Maddy

  • First, you can retrieve information about current autogrowth parameter in sys.database_files

    if is_percent_growth = 1 or growth <> 655360 (it means 655360 pages of 8 kb = 655360 * 8 \ 1024 Mb = 5 Gb)

    change it with

    ALTER DATABASE [YourDb] MODIFY FILE ( NAME = N'your_file_name', FILEGROWTH = 5Gb )

    GO

    your_file_name come from sys.database_files as well

    use type or type_desc to check if you're dealing with log or data file

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply