Get total size of current sql server database
-
Is there a function in MS SQL server to get the total size of the current database (or a single table) in KBs? It's possible to get this information through Enterprise Manager but I would like to get it through C# code.
You may want to investigate the stored procedure called sys.sp_databases It returns all of the databases that are online, along with their size, and any remarks about the database. I hope this is a starting point for you :) Paul
-
You may want to investigate the stored procedure called sys.sp_databases It returns all of the databases that are online, along with their size, and any remarks about the database. I hope this is a starting point for you :) Paul
-
You're very welcome :)
-
You may want to investigate the stored procedure called sys.sp_databases It returns all of the databases that are online, along with their size, and any remarks about the database. I hope this is a starting point for you :) Paul
Hello I would like to know more on how you call Stored Procedures to fill a datagrid? Very new to the SQL / Dev world but would like to try the sys.sp_databases mentioned in this thread. If there is am example that would be great. Thanks.. When people make you see red, be thankful your not colour blind.
-
Hello I would like to know more on how you call Stored Procedures to fill a datagrid? Very new to the SQL / Dev world but would like to try the sys.sp_databases mentioned in this thread. If there is am example that would be great. Thanks.. When people make you see red, be thankful your not colour blind.
This is off topic for this thread - You may wish to start your own thread to start a new topic. ColinMackay.net Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
-
This is off topic for this thread - You may wish to start your own thread to start a new topic. ColinMackay.net Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
-
I was relating it to your original reply regarding sys.sp_databases... But your point it well taken... Thanks for the fast response... When people make you see red, be thankful your not colour blind.
You can fill a datagrid with a stored procedure like the one I mentioned to theaton. Instead of using an SQL query, you'd use the stored procedure and instead of commandType being query, you'd specify that you are calling a stored procedure. I hope this helps some, Paul