Let us first see script which will return us tablename with schema where clustered index is not a primary key.
SQL SERVER – What is WRK file in Log Shipping?
Several customers use log shipping for disaster recovery across a remote data center. If you are reading this blog, I would assume that you already know SQL Server log shipping If you don’t, then please go through online resources to read the basics. Here is an interesting fact which I learned recently about the WRK file in log shipping. I know some of these are around as theory, but there is no concrete way to understand the nuances of what these files actually mean.
What is Difference Between HAVING and WHERE – Interview Question of the Week #068
I do a performance tuning consulting to earn my livelihood. Once in a while, I end up customer who wants to interview me to check if I know SQL. I absolutely have no problem with the interview. This is a good thing and it gives me confidence that they are serious with their project. With said that once in a while the senior guys on the other side are so busy they end up having my interview with junior (novice) experts. I often struggle with this interview question and answer with beginners because my answers are based on experience and they often do not match what they have learned in school/collage.
PowerShell Script – Backup Every Database In SQL Server
Using scripts can be a powerful way to automate things that a GUI will fail in many cases. I was working with a client who wanted to write a PowerShell script that would help him automate his backups. This is a pretty simple requirement that can be easily achieved using SMO as shown below in my scripts. I have been using these scripts for a number of years at various places. Let us see how we can backup every database in SQL Server
The Tale of the Cunning Dev, Encrypted Procedures, DAC and God Mode = ON – Experts Opinion
A few weeks ago, I was puzzling out the logic of a free tool. The thing with the author of the tool turned out to be almost a detective story: he happened to be a developer living in South America. Certainly, the practical effect was not in his biography, but in queries, which his app was sent to the server. Let us see a story of Encrypted Procedures.
SQL SERVER 2016 – Enhancements with AlwaysOn Availability Groups – Notes from the Field #121
[Note from Pinal]: In this episode of the Notes from the Field series database expert Mike Lawell talks about his thoughts and observation about SQL Server 2016 and enhancements with AlwaysOn Availability Groups. When AlwaysOn was newly introduced, I was not able to catch up with the feature. I just thought it was just one of the subject which will not be developed by Microsoft, however, as the new versions of the SQL Server are now taking this feature to the next level, I am very delighted that I should have not worried at all. Let us see what Mike says in his own words about Enhancements with AlwaysOn Availability Groups.
Team Database Development and Version Control with SQL Source Control
Team database development is hard. It throws up questions about who’s responsible for code, how to track changes, and how to share them. For application development, teams can overcome these problems with version control. Databases are different.
MySQL – LEAST and GREATEST Comparison Operators
The biggest challenge which we often face as a database person is to compare the value across multiple columns. Trust me, if there were no comparison operators, we would have never got this task done. MySQL supports many comparison operators like BETWEEN, IN, etc. LEAST and GREATEST is very handy if you want to compare values across many columns.
SELECT One by Two – Why Does SELECT 1/2 Returns 0 – Interview Question of the Week #067
Just like a week, during a user group meeting I was told to ask questions about why the SELECT 1 /2 gives a different answer then one user is expected. Let us see this question in detail about SELECT One by Two as it can be a great learning for many new beginners.