How to get MS SQL database size using API

Hi,

How to get MS SQL database size using API
You connect to SQL server using one of several methods: Named pipes, shared memory, TCP/IP. Once you connect, you communicate with the server using the application-defined protocol called Tabular Data Streams (http://en.wikipedia.org/wiki/Tabular_Data_Stream).

Now the question: Is all of this available as API? I don't know. Maybe. The fact is, however, that nobody uses them, and instead you connect to SQL Server using ADO or a simila technology.

With an ADO Command object you can query the size of a database by running the SQL stored procedure sp_spaceused (http://msdn.microsoft.com/en-us/library/ms188776%28SQL.90%29.aspx).

I think there is another stored procedure that you can use, I just don't remember it right now.
Topic archived. No new replies allowed.