Question: How to Write in Text File from T-SQL in SQL Server?
The question above was actually asked in an interview and also was not asked in the same word.
SQL SERVER – SQL Agent Job and Backslash – Strange Behavior
Today’s blog post is about SQL Agent Job and Backslash. I was surprised to see this behavior. Here are the steps to reproduce this behavior.
SQL SERVER – Script to Get Compiled Plan with Parameters From Cache
Lots of people often ask me as I share pretty everything on the blog – Do I have any Business Secrets. Actually, the answer is no, I never keep any secrets. I always share everything I know and I want my customers and readers learn along with me. Today I will share another script which I have written which I frequently use with my consulting engagement Comprehensive Database Performance Health Check.
SQL SERVER – How to Generate Random Password? – Enhanced Version
Earlier last month, I posted an interview question – How to Generate Random Passwords in SQL Server? – Interview Question of the Week #181. Though, my efforts were honest my answer was not complete in that blog post. Thankfully, SQL Server Expert Tim Cartwright noticed the error in the blog post and decided to send me to follow up email with the accurate script to generate a random password.
SQL SERVER – Quick Introduction to Startup Procedures
In today’s blog we are going to talk about the SQL Server feature which actually exists for a quite a while but interestingly enough it is not known much. Let us have a quick introduction to startup procedures.Â
SQL SERVER – Execution Plan Ignores Tabs, Spaces and Comments
Just another day I was delivering my training SQL Server Performance Tuning Practical Workshop, I noticed that organizations had many stored procedures but none of the SP had any comments. When I asked them why their Stored Procedures does not have comments, their point was that they believed because of the comments, the size of the execution plan increases. Not True, when SQL Server builds an execution plan, it ignores tabs, spaces, and all the comments.