Dbinfo

greenspun.com : LUSENET : SQL Server Database Administration : One Thread

I am using sql server 7 . I want to extract following information for each datbase .

dbname , size , allocated size , free size

Please help me

Also i want to know what kind of setup i need to connect sql server from perl ?

-- Anonymous, May 06, 2002

Answers

Shrinivas,

Use sp_spaceused to find this information. If you need to know the details, examine the source code of sp_spaceused. It sums values found in the sysindexes table.

Regarding PERL, Neil Pike from Protech Computing Ltd. writes on usenet that "ODBC will be the way. There are also dblib lib's for PERL available, but I shouldn't think they work under Unix - well you could try using the Sybase open-client libs with them I guess."

Hope this helps,

Eric

-- Anonymous, May 06, 2002


Moderation questions? read the FAQ