Query to Find ByteSize of All the Tables in Database
This was my second blog post and today I do not remember what was the business need which has made me build this query. It was built for SQL Server 2000 and it will not directly run on SQL Server 2005 or later version now. It measured the byte size of the tables in the database. This can be done in many different ways as well for example SP_HELPDB as well SP_HELP. I wish to build similar script in 2005 and later version.
SQL SERVER Versions, CodeNames, Year of Release
When I started with SQL Server I did not know all the names correctly for each version and I often used to get confused with this. However, as time passed by I started to remember all the codename as well. In this blog post I have not included SQL Server 2012’s code name as it was not released at the time. SQL Server 2012’s code name is Denali. Here is the question for you – anyone know what is the internal name of the SQL Server’s next version?
Searching String in Stored Procedure
I have already started to work with 2005 by this time and I was personally converting each of my stored procedures to SQL Server 2005 compatible. As we were upgrading from SQL Server 2000 to SQL Server 2005 we had to search each of the stored procedures and make sure that we remove incompatible code from it. For example, syscolumns of SQL Server 2000 was now being replaced by sys.columns of SQL Server 2005. This stored procedure was pretty helpful at that time. Later on I build few additional versions of the same stored procedure.
Version 1: This version finds the Stored Procedures related to Table
Version 2: This is specific version which works with SQL Server 2005 and later version
Clear Drop Down List of Recent Connection From SQL Server Management Studio
It happens to all of us when we connected to some remote client server and we never ever have to connect to it again. However, it keeps on bothering us that the name shows up in the list all the time. In this blog post I covered a quick tip about how we can remove the same.
Stored Procedure are Compiled on First Run – SP is taking Longer to Run First Time
A myth is quite prevailing in the industry that Stored Procedures are pre-compiled and they should always run faster. It is not true. Stored procedures are compiled on very first execution of it and that is the reason why it takes longer when it executes first time. In this blog post I had a great time discussing the same concept. If you do not agree with it, you are welcome to read this blog post.
Removing Key Lookup – Seek Predicate – Predicate – An Interesting Observation Related to Datatypes
Performance Tuning is an interesting concept and my personal favorite one. In many blog posts I have described how to do performance tuning and how to improve the performance of the queries. In this quick quick tip I have explained how one can remove the Key Lookup and improve performance.
Recycle Error Log – Create New Log file without a Server Restart
During one of the consulting assignments I noticed DBA restarting server to create new log file. This is absolutely not necessary and restarting server might have many other negative impacts. There is a common sp_cycle_errorlog which can do the same task efficiently and properly. Have you ever used this SP or feature?
Additionally I had a great time presenting on SQL Server Best Practices in SharePoint Conference.
SSMS 2012 Reset Keyboard Shortcuts to Default
It is very much possible that we mix up various SQL Server shortcuts and at times we feel like resetting it to default. In SQL Server 2012 it is not easy to do it, there is a process to follow and I enjoyed blogging about it.
Fundamentals of Columnstore Index
Columnstore index is introduced in SQL Server 2012 and have been a very popular subject. It increases the speed of the server dramatically as well can be an extremely useful feature with Datawharehousing. However updating the columnstore index is not as simple as a simple UPDATE statement. Read in a detailed blog post about how Update works with Columnstore Index. Additionally, you can watch a Quick Video on this subject.
SQL Server 2012 New Features
I had decided to explore SQL Server 2012 features last year and went through pretty much every single concept introduced in separate blog posts. Here are two blog posts where I describe how SQL Server 2012 functions works.
- Introduction to CUME_DIST – Analytic Functions
- Introduction to FIRST _VALUE and LAST_VALUE – Analytic Functions
- OVER clause with FIRST_VALUE and LAST_VALUE – Analytic Functions
I indeed enjoyed writing about SQL Server 2012 functions last year. Have you gone through all the new features which are introduced in SQL Server 2012? If not, it is still not late to go through them.
Reference: Pinal Dave (https://blog.sqlauthority.com)