相思资源网 Design By www.200059.com
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'

标签:
SQL,Server,分区表,查找,文件,文件组

相思资源网 Design By www.200059.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
相思资源网 Design By www.200059.com

评论“SQL Server根据分区表名查找所在的文件及文件组实现脚本”

暂无SQL Server根据分区表名查找所在的文件及文件组实现脚本的评论...