Technology Encyclopedia Home >How to view the data file size of the business database of TencentDB for SQL Server?

How to view the data file size of the business database of TencentDB for SQL Server?

To view the data file size of the business database in TencentDB for SQL Server, you can use SQL Server Management Studio (SSMS) or query system views directly. Here’s how:

  1. Using SSMS:

    • Connect to your TencentDB for SQL Server instance via SSMS.
    • Right-click the database you want to check, select "Reports" > "Standard Reports" > "Disk Usage". This report shows data and log file sizes.
  2. Using T-SQL Query:
    Run the following query to get detailed file sizes:

    SELECT 
        name AS FileName,
        size * 8 / 1024 AS SizeMB,
        physical_name AS FilePath
    FROM sys.database_files;
    

    This query lists all data and log files, their sizes in MB, and physical paths.

For TencentDB for SQL Server, you can also use the Tencent Cloud Console to monitor database storage metrics. Navigate to the TencentDB for SQL Server section, select your instance, and check the "Storage" or "Monitoring" tab for real-time data file usage.

If you need automated alerts for storage thresholds, Tencent Cloud provides Cloud Monitor to set up notifications when disk usage exceeds limits.