欧美一级特黄大片做受成人-亚洲成人一区二区电影-激情熟女一区二区三区-日韩专区欧美专区国产专区

sql中怎么查看所有表大小

sql中怎么查看所有表大小,針對這個問題,這篇文章詳細(xì)介紹了相對應(yīng)的分析和解答,希望可以幫助更多想解決這個問題的小伙伴找到更簡單易行的方法。

目前創(chuàng)新互聯(lián)已為上1000家的企業(yè)提供了網(wǎng)站建設(shè)、域名、虛擬主機(jī)、網(wǎng)站改版維護(hù)、企業(yè)網(wǎng)站設(shè)計、鋼城網(wǎng)站維護(hù)等服務(wù),公司將堅(jiān)持客戶導(dǎo)向、應(yīng)用為本的策略,正道將秉承"和諧、參與、激情"的文化,與客戶和合作伙伴齊心協(xié)力一起成長,共同發(fā)展。

代碼如下: 

declare @id intdeclare @type character(2) declare @pages int declare @dbname sysnamedeclare @dbsize dec(15,0)declare @bytesperpage dec(15,0)declare @pagesperMB dec(15,0)

create table #spt_space( [objid] int null, [rows] int null, [reserved] dec(15) null, [data] dec(15) null, [indexp] dec(15) null, [unused] dec(15) null)

set nocount on

-- Create a cursor to loop through the user tables

declare c_tables cursor forselect id from sysobjects where xtype = 'U'

open c_tables fetch next from c_tables into @id

while @@fetch_status = 0begin /* Code from sp_spaceused */ insert into #spt_space (objid, reserved) select objid = @id, sum(reserved) from sysindexes where indid in (0, 1, 255) and id = @id  select @pages = sum(dpages) from sysindexes where indid < 2 and id = @id select @pages = @pages + isnull(sum(used), 0) from sysindexes where indid = 255 and id = @id update #spt_space set data = @pages where objid = @id /* index: sum(used) where indid in (0, 1, 255) - data */ update #spt_space set indexp = (select sum(used) from sysindexes where indid in (0, 1, 255) and id = @id) - data where objid = @id /* unused: sum(reserved) - sum(used) where indid in (0, 1, 255) */ update #spt_space set unused = reserved - ( select sum(used) from sysindexes where indid in (0, 1, 255) and id = @id ) where objid = @id update #spt_space set [rows] = i.[rows] from sysindexes i where i.indid < 2 and i.id = @id and objid = @id  fetch next from c_tables into @idend

select TableName = (select left(name,60) from sysobjects where id = objid), [Rows] = convert(char(11), rows), ReservedKB = ltrim(str(reserved * d.low / 1024.,15,0) + ' ' + 'KB'), DataKB = ltrim(str(data * d.low / 1024.,15,0) + ' ' + 'KB'), IndexSizeKB = ltrim(str(indexp * d.low / 1024.,15,0) + ' ' + 'KB'), UnusedKB = ltrim(str(unused * d.low / 1024.,15,0) + ' ' + 'KB')from #spt_space, master.dbo.spt_values dwhere d.number = 1and d.type = 'E'

order by reserved desc

drop table #spt_spaceclose c_tablesdeallocate c_tables

關(guān)于sql中怎么查看所有表大小問題的解答就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,如果你還有很多疑惑沒有解開,可以關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道了解更多相關(guān)知識。

當(dāng)前標(biāo)題:sql中怎么查看所有表大小
網(wǎng)頁路徑:http://aaarwkj.com/article42/jeijec.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供域名注冊商城網(wǎng)站、ChatGPT、微信小程序、響應(yīng)式網(wǎng)站、網(wǎng)站策劃

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都網(wǎng)頁設(shè)計公司
国产传媒在线观看精品| 亚洲成熟中老妇女视频| 亚洲一区二区三区日本久久| 91黑丝国产在线播放| 国产av手机自拍看片| av在线中文字幕剧情| 亚洲精品综合在线二区| 天堂av在线资源观看| 爱高潮www亚洲精品| 男男啪啪猛进猛出无遮挡| 开裆丝袜高跟啪啪高潮av| 精品欧美熟妇高潮喷水特黄| 亚洲福利视频在线观看免费| 雪白肥臀视频一区二区三区| 欧美偷拍一区二区三区| 日韩欧美一区二区不卡在线| 欧美一区二区三区精美| 夜色一区二区av人片| 色一区欧美一区亚洲一区| 蜜臀av一区二区在线观看| 在线观看高清免费国产| 97视频在线视频免费| 亚洲av永久精品一区二区三区 | 日日摸夜夜添添出白浆| 92国产精品午夜福利| 98精品偷拍视频一区二区三区| 国产一级黄色性生活片| 日本中文字幕一区二区视频| 四虎在线观看免费资源| 91午夜精品亚洲一区二区三区| 激情五月开心五月麻豆| 妇女自拍偷自拍亚洲精品| 欧美丝袜熟女日韩亚洲| 亚洲国产成人欧美日韩另类| 91嫩草中文字幕在线| 亚洲精品一区二区三区中文字幕| 国产午夜精品一区二区三区| 国产精品亚洲av性色| 亚洲一区二区日韩在线| 天堂av日韩在线播放| 欧美久久精品在线观看|