Ransomware attackers specifically target and attempt to destroy backup systems to increase the probability of payment. Hardening your system is critical. Please ensure you have reviewed your platform security using the Security Hardening Checklist
Cohesity

COHESITY Documentation

Explore our documentation to get started, discover products & new features, access troubleshooting guides, register sources, platforms support.

Products
Data Security Alliance
Visit Cohesity.com
Demos
Support
Blogs
Developers
Partner Portals
Cohesity Community
© 2026 Cohesity, Inc. All Rights Reserved.
Terms of Use|
Privacy Policy|
Legal|
  1. Home
  2. Veritas NetBackup™ Administrator's Guide, Volume II
  3. NetBackup licensing models and the nbdeployutil utility
  4. Reviewing a capacity licensing report
  5. NetBackup for SQL Server agent
Veritas NetBackup™ Administrator's Guide, Volume II

NetBackup for SQL Server agent

Licensing for SQL Server is specific to the MS-SQL-Server policy type. NetBackup collects the data for any SQL Server backup that can be restored, not including transaction logs.

The following SQL Server queries are used to gather file size information.

  • Get size of entire database

    Given the database name, this query gets the file size in MB, not including the transaction log:

    USE <dbname>;
    SELECT CAST(SUM(dbfile.size) AS FLOAT) / 128.0 AS FileSizeInMB
    FROM sys.database_files AS dbfile
    WHERE dbfile.drop_lsn IS NULL
    AND dbfile.type <> 1;
    
  • Get size of entire database for skip read-only file groups option

    Given the database name, this query gets the file size in MB for skip ReadOnly file groups option:

    USE <database_name>;
    SELECT
    sysFG.name AS FileGroupName,
    SUM(CAST(dbfile.size AS float) / CAST(128 AS float)) AS FileSizeInMB
    FROM
    sys.database_files AS dbfile
    INNER JOIN
    sys.filegroups AS sysFG 
    ON 
    dbfile.data_space_id = sysFG.data_space_id 
    WHERE 
    sysFG.is_read_only = 0 and drop_lsn is null 
    GROUP BY 
    sysFG.name;
    
  • Get the size of file groups for a partial backup

    Given the database name, this query gets the file size in MB for file groups that are specified in the partial list:

    USE <database_name>; 
    SELECT
    sysFG.name AS FileGroupName,
    SUM(CAST(dbfile.size AS float) / 128.0) AS FileSizeInMB
    FROM 
    sys.database_files AS dbfile 
    INNER JOIN 
    sys.filegroups AS sysFG 
    ON 
    dbfile.data_space_id = sysFG.data_space_id 
    WHERE 
    drop_lsn is null 
    and sysFG.name in (<delimited fg name>, ...)
    GROUP BY 
    sysFG.name;
  • Get size of file and corresponding file group name

    Given the file name (object name) and database name, this query gets the file size in MB and the corresponding file group name:

    USE <database name>;
    SELECT 
    sysFG.name AS FileGroupName,
    (CAST(dbfile.size AS float) / 128.0) AS FileSizeInMB
    FROM
    sys.database_files AS dbfile
    INNER JOIN
    sys.filegroups AS sysFG
    ON
    dbfile.data_space_id = sysFG.data_space_id
    WHERE
    dbfile.name = N'<file name>' and drop_lsn is null
  • Get size of file group

    Given the file name (object name) and database name, this query gets the file group size in MB:

    USE <database name>;
    SELECT
    SUM(CAST(dbfile.size AS float) / 128.0) AS FileSizeInMB
    FROM
    sys.database_files AS dbfile
    INNER JOIN
    sys.filegroups AS sysFG
    ON
    dbfile.data_space_id = sysFG.data_space_id
    WHERE
    sysFG.name = N'<filegroup name>' and drop_lsn is null

Feedback

Was this page helpful?
Previous

NetBackup for Oracle server agent

Next

NetBackup for VMware agent

Feedback

Was this page helpful?