select * from table1 where PRO_KEY = '326' (PRO_KEY is numeric data type)
select * from table2 where PRO_KEY = '326'
select * from table3 where PRO_KEY = '326'
select * from table4 where PRO_KEY = '326'
select * from table5 where PRO_KEY = '326'
select * from table170 where PRO_KEY = '326'
The goal is to find what is the total amount of space (in MB/GB) occupied in the database for PRO_KEY 326 in the entire database for the 170 tables.
for example, table1 size is 1.5 GB, and PRO_KEY = '326' is 0.9 GB and PRO_KEY <> '326' is 0.5GB and PRO_KEY = '326' NULL is 0.1 GB.
(we are only interested in the SUM of all the PRO_KEY = '326' data for the 170 tables)
the 170 tables can be derived this way "select * from sys.columns where name ='pro_key'.
right now i can check the total table size by this way:
object_name(so.object_id) AS TableName,
CAST(SUM(ps.reserved_page_count) * 8.0 / (1024.) as Decimal(12,0)) AS Size_MB
sys.dm_db_partition_stats ps JOIN sys.indexes i
ON i.object_id = ps.object_id AND i.index_id = ps.index_id
JOIN sys.objects so
ON i.object_id = so.object_id
WHERE so.type = 'U'
GROUP BY so.object_id
ORDER BY 2 DESC
but does not help me in this quest as there are several pro_key's. The management wants to know how much disk they are going to need if they want to bring another set of pro_key '326' in another environment (these are pretty huge databases)
Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied?
You can use SQL Server Initialize from Backup…
Internet Business Fax to Email Made Easy -
With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number.
You'll receive secure faxes in your email, fr…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message.
In the To field, type your recipient's fax number @efaxsend.com.
You can even send a secure international fax — just include t…