Tag Archives: query

Create SQL Script to restore Transaction logs

I was part of a Major incident this week and we had to restore days worth of transaction logs on multiple databases. Created SQL Query which generates the restore script Advertisements

Posted in Script, SQL, SQL Query, SQL Server, Uncategorized | Tagged , , , , , , | Leave a comment

SQL Query to check when databases were backedup

This query can be used to analyze how the databases are backed up!

Posted in Productivity, Script, SQL, SQL Query, SQL Server, Uncategorized | Tagged , , , , | Leave a comment

Execute As in SQL (Similar to Runas in Windows context)

When we need to execute any SQL statement with other user context we have to use EXECUTE AS statement to impersonate other user access. Impersonation can be done as different login or different user.This is similar to RunAs in windows … Continue reading

Posted in Referene, SQL, SQL Query, Uncategorized | Tagged , , , | Leave a comment

Script to find all Cross database dependencies in SQL

As part of one of the Database migration analysis we wanted to find all cross database dependencies on the Server. I end up writing a script to search all modules. This is the first version and please let me know … Continue reading

Posted in Productivity, SQL, SQL Query, SQL Server, Uncategorized | Tagged , , , | Leave a comment

Frequently used Windows Operating System commands

Different commands in windows operating system I user frequently • How to find the Serial Number of Laptop/ Server/ System • Check who logged in remote Server and kill other user sessions • Search for some text in file: • … Continue reading

Posted in commands | Tagged , , , , , , , , , , , , , , , , | Leave a comment

How to find Active connections in Windows/NLB/Server

I am trying to club independent requirements in this blog but I hope it will be handy! • NETSTAT Command: I use this command to identify network connections established between my Server/Machine to different Servers/Sites, netstat –nb is one of … Continue reading

Posted in commands, Network | Tagged , , , , , | 1 Comment

TSQL to Rollup multiple rows into single row and column

In my team, we mange multiple Applications and Servers. As part of Application migrations, Server consolidations, failovers application Server mapping will always be changing. I always depend on Application Server mapping during analysis but my major challenge was with multiple … Continue reading

Posted in Productivity, Script, SQL, SQL Query | Tagged , , , , , | Leave a comment