Microsoft SQL Server how to get a table size

SQL Tips
Microsoft SQL Server how to get a table size Sometimes you need to get the size of a particular table located in a database within the Microsoft Server and the following query can provide you that.  You can run this manually or place it in a stored procedure for numerous tables. The SQL code {{CODE1}} Looking at the actual code it displays the name of the table, schema name, record count (rows), size and additional information pertaining to the space used or not used. This is a nifty way to quickly view which tables are large and growing.  This provides analysis on the database giving a SQL admin a method to adjust what could happen in the future. You can also place this in your source code to call the…
Read More

Idera offers free webinar on data modeling in the cloud

Idera, SQL Tips
Idera offers free webinar on data modeling in the cloud Data modeling is the process of documenting a complex software system design as an easily understood diagram, using text and symbols to represent the way data needs to flow. The diagram can be used as a blueprint for the construction of new software or for re-engineering a legacy application. Traditionally, data models have been built during the analysis and design phases of a project to ensure that the requirements for a new application are fully understood. A data model can be thought of as a flowchart that illustrates the relationships between data. Although capturing all the possible relationships in a data model can be very time-intensive, it's an important step that shouldn't be rushed. Well-documented conceptual, logical and physical data models allow stake-holders to identify errors and…
Read More

Critical SQL Server Patches for Meltdown and Spectre

Microsoft Development, News Items, SQL Tips
Critical SQL Server Patches for Meltdown and Spectre There are two new possible viruses Meltdown and Spectre that can lead to dangerous situations on your SQL server by attacks. The following summary allows you to review and decide how to patch your systems.  All SQL DBAs need to take action to make sure that they have backups as well as protecting the current systems.   SQL Server Versions Affected This is a hardware issue, so every system is affected. SQL Server running on x86 and x64 for these versions: SQL Server 2008 SQL Server 2008R2 SQL Server 2012 SQL Server 2014 SQL Server 2016 SQL Server 2017 Azure SQL Database It is likely that SQL Server 2005, SQL Server 2000, SQL Server 7, SQL Server 6.5 are all affected. No…
Read More

What to do if your database seems slow

Software development Concepts, SQL Tips
What to do if your database seems slow Quite a few times during a business day or even after hours, you have noticed that your database requests or queries tend to be slow with the results.  This could be that your database has become bloated with constant usage.  There are a few things that the IT / DBA or you, can do to resolve these possible serious issues. Databases work almost like people, they tend to keep inactive data that uses disk space, poor design and even the over-indexing of tables which could be some of the reasons for poor performance to outright collapse. Step one - inactive data to archives. The first step is to research whether there is too much inactive data.  This is data that is no…
Read More

How to purge Microsoft SQL email Items

Computer PC Tips - bits and bytes, SQL Tips
How to purge Microsoft SQL email Items There are times that housecleaning older mail in your database needs to be done.  A simple scheduled task can be done every month to purge what is no longer necessary.  SQL Server stores all mails and attachments in msdb database. To avoid unnecessary growth of msdb database you should remove these mail history unless it is required for auditing or other purposes. As always make sure you have your backups done prior to running any sort of removal in the event you did something incorrectly.  By purging you are reducing the amount of wasted space in the msdb database that could be used for other things activities. Simply running the following statement using T-SQL you can check the amount of database mails that have been processed from…
Read More