Saturday, February 25, 2012

Q:Data file/log file growth

Two questions:
1. How can I know how many times and what dates etc a database file with
automatic growth either in percent or in megabyte has grown?
2. If I specify to automaticly grow by 10 percent. Will the file then each
time grow with 10 percent of the original file size (when created) or with
10 percent of the current size?
/Peter| Two questions:
|
| 1. How can I know how many times and what dates etc a database file with
| automatic growth either in percent or in megabyte has grown?
--
You can capture a profiler trace which includes the Data file autogrow
event.
|
| 2. If I specify to automaticly grow by 10 percent. Will the file then each
| time grow with 10 percent of the original file size (when created) or with
| 10 percent of the current size?
--
From SQL Server Books Online:
"When % is specified, the growth increment size is the specified percentage
of the size of the file at the time the increment occurs. If FILEGROWTH is
not specified, the default value is 10 percent and the minimum value is 64
KB. The size specified is rounded to the nearest 64 KB."
Hope this helps,
--
Eric Cárdenas
SQL Server support|||Ok, but I cant "go back" to look for a specific database for how many times
etc the database file has expanded?
E.g. if i don´t would like to run profiler all the time?
/Peter
"Eric Cardenas" <ecard@.anonymous.com> wrote in message
news:9nx2KpTxDHA.424@.cpmsftngxa07.phx.gbl...
> | Two questions:
> |
> | 1. How can I know how many times and what dates etc a database file with
> | automatic growth either in percent or in megabyte has grown?
> --
> You can capture a profiler trace which includes the Data file autogrow
> event.
> |
> | 2. If I specify to automaticly grow by 10 percent. Will the file then
each
> | time grow with 10 percent of the original file size (when created) or
with
> | 10 percent of the current size?
> --
> From SQL Server Books Online:
> "When % is specified, the growth increment size is the specified
percentage
> of the size of the file at the time the increment occurs. If FILEGROWTH is
> not specified, the default value is 10 percent and the minimum value is 64
> KB. The size specified is rounded to the nearest 64 KB."
> Hope this helps,
> --
> Eric Cárdenas
> SQL Server support
>|||> Ok, but I cant "go back" to look for a specific database for how many times
> etc the database file has expanded?
No, that information is not recorded and stored automatically. If you want to do this at a periodic
bases, I recommend that you run a job with a certain interval which check if size has increased and
run that job periodically.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Peter" <Peter.nospam@.news.com> wrote in message news:OQidQnWxDHA.2000@.TK2MSFTNGP11.phx.gbl...
> Ok, but I cant "go back" to look for a specific database for how many times
> etc the database file has expanded?
> E.g. if i don´t would like to run profiler all the time?
> /Peter
>
> "Eric Cardenas" <ecard@.anonymous.com> wrote in message
> news:9nx2KpTxDHA.424@.cpmsftngxa07.phx.gbl...
> > | Two questions:
> > |
> > | 1. How can I know how many times and what dates etc a database file with
> > | automatic growth either in percent or in megabyte has grown?
> > --
> > You can capture a profiler trace which includes the Data file autogrow
> > event.
> >
> > |
> > | 2. If I specify to automaticly grow by 10 percent. Will the file then
> each
> > | time grow with 10 percent of the original file size (when created) or
> with
> > | 10 percent of the current size?
> > --
> > From SQL Server Books Online:
> >
> > "When % is specified, the growth increment size is the specified
> percentage
> > of the size of the file at the time the increment occurs. If FILEGROWTH is
> > not specified, the default value is 10 percent and the minimum value is 64
> > KB. The size specified is rounded to the nearest 64 KB."
> >
> > Hope this helps,
> >
> > --
> > Eric Cárdenas
> > SQL Server support
> >
>|||> Ok, but I cant "go back" to look for a specific database for how many
times
> etc the database file has expanded?
No, as others have mentioned, SQL Server doesn't track this information.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/

No comments:

Post a Comment