本文介绍了[已解决]如何通过MS SQL Server的架构获得总存储空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello All,



我正在尝试查找MS Sql Server的数据库实例使用了多少存储空间以及每天增加多少存储空间。



以下是用于获取Oracle数据库实例的查询:



Hello All,

I am trying to find how much storage space is used by my MS Sql Server's database instance and how much increasing day-by-day.

Below is the query used to get for Oracle DB instance:

SELECT SUM(bytes)/1024/1024/1024 SCHEMA_SIZE_GB FROM USER_SEGMENTS; 





如何为MS Sql Server找到相同的内容。任何有关这方面的帮助将不胜感激。谢谢。



How can I find the same for MS Sql Server. Any help on this would be appreciated. Thanks.

推荐答案

SELECT DB_NAME(database_id) AS DatabaseName,
Name AS Logical_Name,
Physical_Name, (size*8)/1024 SizeMB
FROM sys.master_files
WHERE DB_NAME(database_id) = 'AdventureWorks'
GO





通过管理工作室很容易找到这些信息:

[]



希望有所帮助^ _ ^



It is very easy to find this info via the management studio:
https://www.simple-talk.com/sql/database-administration/sql-server-database-growth-and-autogrowth-settings/[^]

Hope that helps ^_^


这篇关于[已解决]如何通过MS SQL Server的架构获得总存储空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 23:26