SQLSERVER中,有時(shí)需要知道已經(jīng)建了哪些分區(qū)表,從哪里看?
1、直接用SQL語(yǔ)句查:
--分區(qū)數(shù)大于1的,就是我們想查看的分區(qū)表:
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 > [數(shù)據(jù)庫(kù)名稱(chēng)] 節(jié)點(diǎn) > 存儲(chǔ)(Storage) 節(jié)點(diǎn) >
\\ 分區(qū)架構(gòu)(Partition Schemes ) 節(jié)點(diǎn) > 選中一項(xiàng) > 右鍵 > 查看依賴(lài)
\\ 分區(qū)函數(shù)(Partition Functions ) 節(jié)點(diǎn) > 選中一項(xiàng) > 右鍵 > 生成腳本
3、有作多分區(qū)的表,屬性的 存儲(chǔ)(Storage) 會(huì)有 Partitioning 信息。
分享文章:告訴你sqlserver查看已經(jīng)建了哪些分區(qū)表
網(wǎng)站網(wǎng)址:http://www.rwnh.cn/article38/cpigsp.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供面包屑導(dǎo)航、移動(dòng)網(wǎng)站建設(shè)、ChatGPT、云服務(wù)器、網(wǎng)站排名、微信小程序
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)