Category: Tips and Tricks

MSSQL: Session and Request info, Blocking sessions

Naveen Nayak September 17, 2018 No Comments MSSQL, Tips and Tricks

Here is a list of queries that can be helpful if you are trying to troubleshoot locks and blocking sessions on SQL server. — to get session and connections on the server SELECT * FROM sys.dm_exec_sessions AS sess JOIN sys.dm_exec_connections AS conn ON ( sess.session_id = conn.session_id ); — another command to see details EXEC […]

SQL substring replacement

Naveen Nayak May 14, 2018 No Comments MySQL, Tips and Tricks

There are times when you need to replace only a part of the string in the database column. You can use the stuff() function in MSSQL or insert() function in MySQL MSSQL Definition: STUFF ( string , start , length , replaceWith ) Example: select stuff(‘My Original String’, 4, 8, ‘Replaced’); Output: My Replaced String […]

PHP Remote CLI Script Debugging with PHPStorm

Naveen Nayak February 9, 2016 No Comments LAMP, Tips and Tricks , , ,

PHPStorm is one of the best IDE’s to develop in PHP. I recently came across tons complex php cli scripts and needed a way to debug them. Follow this PHPStorm Docs¬†post first to set up php storm and the server. Most important things to¬†configure are Set up xdebug correctly on the remote server. Dont use […]

Better Putty Color Scheme for existing Sessions on Windows

Naveen Nayak December 18, 2015 No Comments Tips and Tricks ,

Putty is a versatile tool for remote SSH access – however the color schemes are not too impressive. The blue especially is really bad. You can change the blue color in the settings but what if you already have a ton of putty Saved Sessions. You will have to painfully modify each. There is a […]

Linux Cron not running ?

Naveen Nayak April 13, 2015 No Comments Linux, Tips and Tricks

There are 2 ways to set up periodic cron jobs in linux Put them directly in the crontab Put them in one of the cron directories – below are available /etc/cron.hourly /etc/cron.daily /etc/cron.weekly /etc/cron.monthly So you can create a script and put it in one of the directories and they will run according to schedule […]

Page 1 of 5