﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SQL Server Tablo Boyutu Hesaplama &#8211; SQL Server Eğitimleri</title>
	<atom:link href="https://sqlserveregitimleri.com/etiket/sql-server-tablo-boyutu-hesaplama/feed" rel="self" type="application/rss+xml" />
	<link>https://sqlserveregitimleri.com</link>
	<description>SQL Server ile ilgili her şey</description>
	<lastBuildDate>Tue, 27 Dec 2022 07:46:26 +0000</lastBuildDate>
	<language>tr</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.1</generator>
	<item>
		<title>SQL Server&#8217;da Tablo İsmine Göre Satır ve Boyut Kontrolü</title>
		<link>https://sqlserveregitimleri.com/sql-serverda-tablo-ismine-gore-satir-ve-boyut-kontrolu</link>
		
		<dc:creator><![CDATA[Yavuz Selim Kart]]></dc:creator>
		<pubDate>Tue, 27 Dec 2022 07:46:26 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Satır Saydırma]]></category>
		<category><![CDATA[SQL Server Tablo Boyutu Hesaplama]]></category>
		<category><![CDATA[SQL Server'da Tablo İsmine Göre Satır ve Boyut Kontrolü]]></category>
		<guid isPermaLink="false">https://sqlserveregitimleri.com/?p=14652</guid>

					<description><![CDATA[Herkese merhaba, Bu yazıda SQL Server’da tablo ismine göre satır ve boyut kontrolü ile ilgili bilgi vermeye çalışacağım. SQL Server&#8217;da bazı durumlarda tablo ismine göre...]]></description>
										<content:encoded><![CDATA[<p>Herkese merhaba,</p>
<p>Bu yazıda SQL Server’da tablo ismine göre satır ve boyut kontrolü ile ilgili bilgi vermeye çalışacağım.</p>
<p>SQL Server&#8217;da bazı durumlarda tablo ismine göre satır ve boyut kontrolü yapmak isteyebiliriz.</p>
<p>Aşağıdaki kodu kullanarak siz de bu işlemi rahatlıkla yapabilirsiniz.</p>
<pre class="line-numbers"><code class="language-sql">SELECT t.NAME AS TableName,
       s.Name AS SchemaName,
       p.rows,
       SUM(a.total_pages) * 8 AS TotalSpaceKB,
       CAST(ROUND(((SUM(a.total_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS TotalSpaceMB,
       SUM(a.used_pages) * 8 AS UsedSpaceKB,
       CAST(ROUND(((SUM(a.used_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS UsedSpaceMB,
       (SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS UnusedSpaceKB,
       CAST(ROUND(((SUM(a.total_pages) - SUM(a.used_pages)) * 8) / 1024.00, 2) AS NUMERIC(36, 2)) AS UnusedSpaceMB
FROM sys.tables t
    INNER JOIN sys.indexes i
        ON t.OBJECT_ID = i.object_id
    INNER JOIN sys.partitions p
        ON i.object_id = p.OBJECT_ID
           AND i.index_id = p.index_id
    INNER JOIN sys.allocation_units a
        ON p.partition_id = a.container_id
    LEFT OUTER JOIN sys.schemas s
        ON t.schema_id = s.schema_id
WHERE

    --t.NAME NOT LIKE 'dt%'

    --AND t.is_ms_shipped = 0

    -- AND i.OBJECT_ID &gt; 255

    t.name LIKE '%Buraya Yazılacak%' --aramak istediğiniz tablo ismini burada yazabilirsiniz

GROUP BY t.Name,
         s.Name,
         p.Rows
ORDER BY TotalSpaceMB DESC,
         t.Name</code></pre>
<p>Herkese çalışma hayatında ve yaşamında başarılar kolaylıklar.</p>
<div class='epvc-post-count'><span class='epvc-eye'></span>  <span class="epvc-count"> 216</span><span class='epvc-label'> Kez Okundu</span></div>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
