SQLSERVER中,有时需要知道已经建了哪些分区表,从哪里看?
1、直接用SQL语句查:
–分区数大于1的,就是我们想查看的分区表:
SELECT p.*,\\\’|\\\’ AS SP ,t.* FROM sys.partitions AS p
inner JOIN sys.tables AS t ON p.object_id = t.object_id
inner join (
select object_id as object_id2,index_id, count(*) AS CNT FROM sys.partitions
group by object_id,index_id
having count(*)>1
) s on s.object_id2 = p.object_id
WHERE p.partition_id IS NOT NULL
order by t.name;
2、在管理器中查看:
Databases > [数据库名称] 节点 > 存储(Storage) 节点 >
\\\\ 分区架构(Partition Schemes ) 节点 > 选中一项 > 右键 > 查看依赖
\\\\ 分区函数(Partition Functions ) 节点 > 选中一项 > 右键 > 生成脚本
3、有作多分区的表,属性的 存储(Storage) 会有 Partitioning 信息。
更多关于云服务器,域名注册,虚拟主机的问题,请访问西部数码官网:www.west.cn