xp_fixeddrive works fine for getting the free space of a drive, but is there
a clean way to get the size of the drive? chkdsk and fsutil through
xp_cmdshell have been ruled out.There are couple of ways of doing that: You can use SMO/DMO based on SQL
Server version. You can use Powershell/VBScript and get a snapshot of "My
Computer"
Another ugly way of doing is (I dont' recommend) (You can run SRVINFO from
NT resource kit and spit the output in a textfile and get that info in SQL
using SP_ReadErrorLog)
However, there's a good script on how to get SQL Server data/log utilization
report from each drive @.
http://sqlcommunity.com/Default.aspx?grm2id=49&tabid=56
Thank you,
Saleem Hakani
HTTP://WWW.SQLCOMMUNITY.COM (World Wide SQL Server Community)
SQL Tips, Scripts, Articles, Forums, Radio and a lot of SQL Server fun.
"Jay" wrote:
> xp_fixeddrive works fine for getting the free space of a drive, but is there
> a clean way to get the size of the drive? chkdsk and fsutil through
> xp_cmdshell have been ruled out.
>
>|||Well Saleem, nice little script except for a couple things.
- It doesn't pull the capicity of the drive.
- You posted a copy with errors in it.
Intresting site though.
"Saleem Hakani" <SaleemHakani@.discussions.microsoft.com> wrote in message
news:A8CDF944-53AB-4EC1-9CFC-A27AE1F9E0FE@.microsoft.com...
> There are couple of ways of doing that: You can use SMO/DMO based on SQL
> Server version. You can use Powershell/VBScript and get a snapshot of "My
> Computer"
> Another ugly way of doing is (I dont' recommend) (You can run SRVINFO from
> NT resource kit and spit the output in a textfile and get that info in SQL
> using SP_ReadErrorLog)
> However, there's a good script on how to get SQL Server data/log
> utilization
> report from each drive @.
> http://sqlcommunity.com/Default.aspx?grm2id=49&tabid=56
> Thank you,
> Saleem Hakani
> HTTP://WWW.SQLCOMMUNITY.COM (World Wide SQL Server Community)
> SQL Tips, Scripts, Articles, Forums, Radio and a lot of SQL Server fun.
>
> "Jay" wrote:
>> xp_fixeddrive works fine for getting the free space of a drive, but is
>> there
>> a clean way to get the size of the drive? chkdsk and fsutil through
>> xp_cmdshell have been ruled out.
>>|||Hi Jay,
I think this is what you are looking for:
Get the facts about your drives and SQL Server space utilization from SQL
Server: http://www.sqlcommunity.com/Default.aspx?grm2id=53&tabid=56
Hope this helps.
Thank you,
Saleem Hakani
HTTP://WWW.SQLCOMMUNITY.COM (World Wide SQL Server Community)
SQLTips, Scripts, Discussions, Blogs, Articles, Radio and a lot of SQL
Server Fun.
"Jay" wrote:
> Well Saleem, nice little script except for a couple things.
> - It doesn't pull the capicity of the drive.
> - You posted a copy with errors in it.
> Intresting site though.
>
> "Saleem Hakani" <SaleemHakani@.discussions.microsoft.com> wrote in message
> news:A8CDF944-53AB-4EC1-9CFC-A27AE1F9E0FE@.microsoft.com...
> > There are couple of ways of doing that: You can use SMO/DMO based on SQL
> > Server version. You can use Powershell/VBScript and get a snapshot of "My
> > Computer"
> >
> > Another ugly way of doing is (I dont' recommend) (You can run SRVINFO from
> > NT resource kit and spit the output in a textfile and get that info in SQL
> > using SP_ReadErrorLog)
> >
> > However, there's a good script on how to get SQL Server data/log
> > utilization
> > report from each drive @.
> > http://sqlcommunity.com/Default.aspx?grm2id=49&tabid=56
> >
> > Thank you,
> > Saleem Hakani
> > HTTP://WWW.SQLCOMMUNITY.COM (World Wide SQL Server Community)
> > SQL Tips, Scripts, Articles, Forums, Radio and a lot of SQL Server fun.
> >
> >
> > "Jay" wrote:
> >
> >> xp_fixeddrive works fine for getting the free space of a drive, but is
> >> there
> >> a clean way to get the size of the drive? chkdsk and fsutil through
> >> xp_cmdshell have been ruled out.
> >>
> >>
> >>
>
>sql
No comments:
Post a Comment