Home All Groups Group Topic Archive Search About

List all files and autogrowth option



Author
30 May 2005 5:07 PM
Hassan
Can I get a list of all files a database comprise of and whether the
autogrowth option for the file is turned on or off

Output should be

DbName        FileName        Autogrowth_on_off
ABC               c:\abc.mdf        on
ABC               d:\abc1.ndf       off
ABC               d:\abc2.ndf       on
ABC               e:\abc_log.ldf    on

Author
30 May 2005 5:35 PM
David Portas
EXEC sp_helpfile

or

SELECT *
FROM master.dbo.sysaltfiles

--
David Portas
SQL Server MVP
--
Are all your drivers up to date? click for free checkup

Author
30 May 2005 6:01 PM
Hari Prasad
Hi,

Execute the below stored procedure.

sp_helpdb <DBNAME>


Thanks
Hari
SQL Server MVP

Show quoteHide quote
"Hassan" <fatima***@hotmail.com> wrote in message
news:OUO3JoTZFHA.2996@TK2MSFTNGP10.phx.gbl...
> Can I get a list of all files a database comprise of and whether the
> autogrowth option for the file is turned on or off
>
> Output should be
>
> DbName        FileName        Autogrowth_on_off
> ABC               c:\abc.mdf        on
> ABC               d:\abc1.ndf       off
> ABC               d:\abc2.ndf       on
> ABC               e:\abc_log.ldf    on
>
>
>
>
Author
5 Jun 2005 4:45 AM
Hassan
Guys, none of those options tell me if autogrowth is on or off


Show quoteHide quote
"Hari Prasad" <hari_prasa***@hotmail.com> wrote in message
news:%23MXBnFUZFHA.2884@tk2msftngp13.phx.gbl...
> Hi,
>
> Execute the below stored procedure.
>
> sp_helpdb <DBNAME>
>
>
> Thanks
> Hari
> SQL Server MVP
>
> "Hassan" <fatima***@hotmail.com> wrote in message
> news:OUO3JoTZFHA.2996@TK2MSFTNGP10.phx.gbl...
> > Can I get a list of all files a database comprise of and whether the
> > autogrowth option for the file is turned on or off
> >
> > Output should be
> >
> > DbName        FileName        Autogrowth_on_off
> > ABC               c:\abc.mdf        on
> > ABC               d:\abc1.ndf       off
> > ABC               d:\abc2.ndf       on
> > ABC               e:\abc_log.ldf    on
> >
> >
> >
> >
>
>
Author
5 Jun 2005 1:32 PM
Andrew J. Kelly
I believe the MAXSIZE columnin the sysaltfiles that David pointed you to
determines if Autogrow is on or not.  Another function you might be
interested in for various pieces of information related to the db is
DATABASEPROPERTYEX.

--
Andrew J. Kelly  SQL MVP


Show quoteHide quote
"Hassan" <fatima***@hotmail.com> wrote in message
news:ehW9vlYaFHA.3144@TK2MSFTNGP14.phx.gbl...
> Guys, none of those options tell me if autogrowth is on or off
>
>
> "Hari Prasad" <hari_prasa***@hotmail.com> wrote in message
> news:%23MXBnFUZFHA.2884@tk2msftngp13.phx.gbl...
>> Hi,
>>
>> Execute the below stored procedure.
>>
>> sp_helpdb <DBNAME>
>>
>>
>> Thanks
>> Hari
>> SQL Server MVP
>>
>> "Hassan" <fatima***@hotmail.com> wrote in message
>> news:OUO3JoTZFHA.2996@TK2MSFTNGP10.phx.gbl...
>> > Can I get a list of all files a database comprise of and whether the
>> > autogrowth option for the file is turned on or off
>> >
>> > Output should be
>> >
>> > DbName        FileName        Autogrowth_on_off
>> > ABC               c:\abc.mdf        on
>> > ABC               d:\abc1.ndf       off
>> > ABC               d:\abc2.ndf       on
>> > ABC               e:\abc_log.ldf    on
>> >
>> >
>> >
>> >
>>
>>
>
>
Author
6 Jun 2005 5:25 AM
Hassan
its the growth column in sysaltfiles. A zero indicates no autogrowth. I
could not find any databasepropertyex property to find this out for me

Show quoteHide quote
"Andrew J. Kelly" <sqlmvpnooospam@shadhawk.com> wrote in message
news:OcOOJMdaFHA.2884@tk2msftngp13.phx.gbl...
> I believe the MAXSIZE columnin the sysaltfiles that David pointed you to
> determines if Autogrow is on or not.  Another function you might be
> interested in for various pieces of information related to the db is
> DATABASEPROPERTYEX.
>
> --
> Andrew J. Kelly  SQL MVP
>
>
> "Hassan" <fatima***@hotmail.com> wrote in message
> news:ehW9vlYaFHA.3144@TK2MSFTNGP14.phx.gbl...
> > Guys, none of those options tell me if autogrowth is on or off
> >
> >
> > "Hari Prasad" <hari_prasa***@hotmail.com> wrote in message
> > news:%23MXBnFUZFHA.2884@tk2msftngp13.phx.gbl...
> >> Hi,
> >>
> >> Execute the below stored procedure.
> >>
> >> sp_helpdb <DBNAME>
> >>
> >>
> >> Thanks
> >> Hari
> >> SQL Server MVP
> >>
> >> "Hassan" <fatima***@hotmail.com> wrote in message
> >> news:OUO3JoTZFHA.2996@TK2MSFTNGP10.phx.gbl...
> >> > Can I get a list of all files a database comprise of and whether the
> >> > autogrowth option for the file is turned on or off
> >> >
> >> > Output should be
> >> >
> >> > DbName        FileName        Autogrowth_on_off
> >> > ABC               c:\abc.mdf        on
> >> > ABC               d:\abc1.ndf       off
> >> > ABC               d:\abc2.ndf       on
> >> > ABC               e:\abc_log.ldf    on
> >> >
> >> >
> >> >
> >> >
> >>
> >>
> >
> >
>
>
Author
7 Jun 2005 8:28 PM
Andrew J. Kelly
The DatabaseEx properties was for future references.

--
Andrew J. Kelly  SQL MVP


Show quoteHide quote
"Hassan" <fatima***@hotmail.com> wrote in message
news:eCkMZglaFHA.3132@TK2MSFTNGP09.phx.gbl...
> its the growth column in sysaltfiles. A zero indicates no autogrowth. I
> could not find any databasepropertyex property to find this out for me
>
> "Andrew J. Kelly" <sqlmvpnooospam@shadhawk.com> wrote in message
> news:OcOOJMdaFHA.2884@tk2msftngp13.phx.gbl...
>> I believe the MAXSIZE columnin the sysaltfiles that David pointed you to
>> determines if Autogrow is on or not.  Another function you might be
>> interested in for various pieces of information related to the db is
>> DATABASEPROPERTYEX.
>>
>> --
>> Andrew J. Kelly  SQL MVP
>>
>>
>> "Hassan" <fatima***@hotmail.com> wrote in message
>> news:ehW9vlYaFHA.3144@TK2MSFTNGP14.phx.gbl...
>> > Guys, none of those options tell me if autogrowth is on or off
>> >
>> >
>> > "Hari Prasad" <hari_prasa***@hotmail.com> wrote in message
>> > news:%23MXBnFUZFHA.2884@tk2msftngp13.phx.gbl...
>> >> Hi,
>> >>
>> >> Execute the below stored procedure.
>> >>
>> >> sp_helpdb <DBNAME>
>> >>
>> >>
>> >> Thanks
>> >> Hari
>> >> SQL Server MVP
>> >>
>> >> "Hassan" <fatima***@hotmail.com> wrote in message
>> >> news:OUO3JoTZFHA.2996@TK2MSFTNGP10.phx.gbl...
>> >> > Can I get a list of all files a database comprise of and whether the
>> >> > autogrowth option for the file is turned on or off
>> >> >
>> >> > Output should be
>> >> >
>> >> > DbName        FileName        Autogrowth_on_off
>> >> > ABC               c:\abc.mdf        on
>> >> > ABC               d:\abc1.ndf       off
>> >> > ABC               d:\abc2.ndf       on
>> >> > ABC               e:\abc_log.ldf    on
>> >> >
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>

Bookmark and Share