Tags » Scripts

A better version of sp_who2

Many of us DBAs are familiar with the sp_who and sp_who2 system stored procedures for interrogating SQL Server activity. Both sp_who2 and sp_who use the old-style terminology and the information returned is not as detailed or as customizable as that returned from the DMOs. 349 more words


(#!/bin/bash ) What exactly is this ?

Welcome Linux users. We often come across this line #!/bin/bash in our day to day work while scripting and other Linux tasks. For many people it just becomes a standard to start any shell script with this line but it is important to understand the reason behind it. 769 more words


Returning cached page count for each database and each object

Sys.dm_os_buffer_descriptors (Transact-SQL)

This DMV returns information about all the data pages that are currently in the SQL Server buffer pool. The output of this view can be used to determine the distribution of database pages in the buffer pool according to database, object, or type. 310 more words


16/09: Juniper's 3rd Meet Up

Me: Hi Junie! Ready for the sleepover?

June: Yes, and I’m so excited for it!

Me: Awesome!

*We put June’s suitcase in the boot and we drive to Aurora Couture* 359 more words


Oracle - Script to monitor RMAN running backup

Script to monitor RMAN running backup.

col Timestarted format a16
set linesize 160
col opname for a18
select sid,opname,trunc((totalwork*8192)/1024/1024) “Total work(MB)”,
trunc((sofar*8192)/1024/1024) “Work Done(MB)”, to_char(start_time, ‘MM-DD-YYYY HH24:MI:SSAM’) “Timestarted”, trunc(time_remaining/60) “Time remaining(min)”,round(elapsed_seconds/60) “Time Elasped(min)”, round(sofar/totalwork*100,2) “% Complete” from v$session_longops… 149 more words


Oracle - List completed RMAN backup timings

Script to List completed RMAN backup timings.

col STATUS format a24
col min format 99999.99
col START_TIME for a20
col END_TIME for a20
set pages 99 linesize 235… 187 more words


On the Tangent Stack

(Epistemic Status: Perfectly normal advice, practical, I literally use it, not even dangerous.)

Talking with me in person, one on one, is a bit of an… 690 more words