SQL Server根据分区表名查找所在的文件及文件组实

2023年 4月 19日 37.4k 0

SELECT ps.name AS PSName, dds.destination_idAS PartitionNumber, fg.name AS FileGroupName,fg.name, t.name, f.name as filename FROM (((sys.tables AS t INNER JOIN sys.indexes AS i ON (t.object_id = i.object_id)) INNER JOIN sys.partition_scheme

SELECT ps.name AS PSName,
dds.destination_idAS PartitionNumber,
fg.name AS FileGroupName,fg.name,
t.name,
f.name as filename
FROM (((sys.tables AS t
INNER JOIN sys.indexes AS i
ON (t.object_id = i.object_id))
INNER JOIN sys.partition_schemes AS ps
ON (i.data_space_id = ps.data_space_id))
INNER JOIN sys.destination_data_spacesAS dds
ON (ps.data_space_id = dds.partition_scheme_id))
INNER JOIN sys.filegroups AS fg
ONdds.data_space_id =fg.data_space_id
innerjoin sys.database_files f on f.data_space_id = fg.data_space_id
where t.name='salesOrder'

相关文章

Oracle如何使用授予和撤销权限的语法和示例
Awesome Project: 探索 MatrixOrigin 云原生分布式数据库
下载丨66页PDF,云和恩墨技术通讯(2024年7月刊)
社区版oceanbase安装
Oracle 导出CSV工具-sqluldr2
ETL数据集成丨快速将MySQL数据迁移至Doris数据库

发布评论