Get size of all tables in database

Copied this script from here. Need this too often.

t.NAME AS TableName,
s.Name AS SchemaName,
p.rows AS RowCounts,
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
sys.tables t
<a href="">INNER JOIN</a>
sys.indexes i ON t.OBJECT_ID = i.object_id
sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id
sys.allocation_units a ON p.partition_id = a.container_id
sys.schemas s ON t.schema_id = s.schema_id
AND t.is_ms_shipped = 0
t.Name, s.Name, p.Rows

I hope that this helps you, I worked really hard on it! I had to spend quite a bit of time in front of the pc working on it. Sometimes it makes me worry, because I know that sitting for long stretches of time can be detrimental to one’s health. I don’t let it bother me too much though. I try to exercise when I can, and I watch what I eat. I even take a natural health supplement that has been working great for me. I highly recommend you check it out if you have been looking for a good one. If you would like to check it out you can find More Information Here.

Subtype: ‘{EF7E3281-CD33-11D4-8326-00C04FA0CE8D}’ is unsupported by this installation.

When you get this message:

<a href="">Microsoft Visual Studio</a>
The project file 'C:\**\AppData\Local\Temp\2\r3trklcs.34z\Temp\BizTalk Server Project3.btproj' cannot be opened.

There is a missing project subtype.
Subtype: '{EF7E3281-CD33-11D4-8326-00C04FA0CE8D}' is unsupported by this installation.
OK Help

Repair your BizTalk installation. You will need the biztalk installation disc.

SAP Adapter error

My integration was not working with only this error in the eventlog:

Microsoft.ServiceModel.Channels.Common.XmlReaderGenerationException: An error occurred when trying to convert the byte array [30-00-30-00-30-00-30-00-30-00-30-00-30-00-30-00] of RFCTYPE RFCTYPE_DATE with length 8 and decimals 0 to XML format. Parameter/field name: REF_DATE   Error message: Year, Month, and Day parameters describe an un-representable DateTime. —> System.ArgumentOutOfRangeException: Year, Month, and Day parameters describe an un-representable DateTime. 

Generating new xsd schemas from the adapter with the option enable safetyping was not helping. Then I changed the document type to rfc:

This worked, the message was received by BIzTalk, but a complete other schema! The setting was set in SAP to put out a Typed document.

You do not see anything happening in BizTalk when this happens only in the evenlog. I was changing the settings of the SAP adapter and every time the SAP guy needed to send the document again. Hope this saves some time for you.



Issue with FTPs on BizTalk 2013 r2

I got this error in BizTalk:

No Client Certificate matching the provided client certificate hash was found. Verify if the certificate is present in the personal store of the corresponding BizTalk host instance user account.

PLaying with the certificate store, thumbprints did not do anything. So I tried it on another dev machine and the event log showed a different error!

The adapter “FTP” raised an error message. Details “Unable to connect to FTP server “”” as user “username”. Inner Exception details: “The server name in the server certificate does not match with the name of the physical server. Make sure you provide the right server name.

Changing the server in the FTP adapter to the DNS name in the certificate did the trick! Without thumbprint the certificate is correct resolved. So when you encounter certificate error also you can check this.

« Older posts

© 2019

Theme by Anders NorenUp ↑