SQL Server – Database Restore Steps thru lenses of errorlog


Wanted to document database restore steps as seen from trail left in SQL Server Instance’s errorlog file.



Step Sub Task Logged Explanation

Start Database (Database started in boot-strap mode )
Starting up database ‘csAnalytics’.

Recovery or NO Recovery
NO Recovery
The database ‘csAnalytics’ is marked RESTORING and is in a state that does not allow recovery to be run. Indicate that we are restoring and will not proceed to actual database recovery; as we would have done during normal SQL Server Instance start.
Recovery is writing a checkpoint in database ‘csAnalytics’ (9). This is an informational message only. No user action is required. Database restore wrote a checkpoint ledger to indicate progress.
2018-03-20 05:46:51.110    spid70    Recovery completed for database rbpivr1 (database ID 42) in 12 second(s) (analysis 5444 ms, redo 20 ms, undo 5171 ms.) This is an informational message only. No user action is required. Informational in terms of duration.

Here is what is logged – Database name, Assigned Database ID, and total time.

Time breakdown – Analysis, redo, undo.

2018-03-20 05:46:51.550    spid70    Filegroup fgLOB in database rbpivr1 is unavailable because it is Offline. Restore or alter the filegroup to be available. In the case of partial restores, the file groups implicitly excluded.
2018-03-20 11:10:58.790    Backup    Database was restored: Database: DBMirror, creation date(time): 2018/03/05(14:52:06), first LSN: 35:341:37, last LSN: 35:360:1, number of dump devices: 1, device information: (FILE=1, TYPE=DISK: {‘C:\Microsoft\SQLServer\Backup\DBMirror.bak’}). Informational message. No user action required. Informational in terms of statistics.

Data logged includes name given to target database, creation time, LSN, number of dump/backup devices, and backup device names.

In-Memory Database ( Hekathon )
[INFO] HkCheckpointCtxtImpl::StartOfflineCkpt(): Database ID: [42]. Starting offline checkpoint worker thread on a hidden SOS scheduler. Hekathon Offline Checkpoint
Check Database
CHECKDB for database ‘csAnalytics’ finished without errors on 2011-08-03 00:06:43.420 (local time). This is an informational message only; no user action is required. Minimal Database Consistency ran.
2018-03-20 05:46:51.950    spid70    Synchronize Database ‘rbpivr1’ (42) with Resource Database. Database system objects aligned with Instance’s Resource Database.

Especially important when database backup file restored from earlier SQL Server version.

Restore Complete
Restore is complete on database ‘rbpivr1’.  The database is now available. Restore Completed

Database Setting
Setting database option MULTI_USER to ON for database csAnalytics. Database transitioned from Single to Multi User


Data logged in the SQL Server Instance log is quite useful in gleaning what is occurring behind the scene when a database is restored.

Comparing logs from different SQL Server Instances and Database setup one will likely notice variations due to following options:

  1. Will the database be recovered or left in no_recovery
    • No recovery basically means transaction log recovery will follow
  2. Fast Database Consistency check occurs
  3. Redo and Undo Log Processing
    • Logs contain both redo and undo portions
      • Redo
        • Once database is fully restored, committed transactions that are still in transaction log, but yet to be checkpoint in database data files are applied to restore database
      • Undo
        • Undo means that data is not committed and still in flight.
        • The data can later be committed ( commit tran ) or discard ( rollback )
  4. In Memory Database
    • In-Memory tables and programmable objects are read from database files into memory

SQL Server – Wait Stats – “BackupThread”


Once our database file has been covered from Prod to QA.

We restore it unto QA.


Wait Stats


BTW, the wait noticed for copying, PREMPTIVE_OS_PIPEOPS, is documented here.




Image #01

Image #02

Image #03


  1. Image#01
    • Time Taken
      • Thus far 6 minutes
    • SQL Text
      • Restore database…
    • Login Name
  2. Image #02
    • wait info
    • CPU/Reads/Writes/Physical Reads/Used Memory
      • Indicated
    • Status
      • suspended
        • A lot of suspension as we are waiting on disk
  3. Image #03
    • Percent Complete
      • Captured
        • At time of capture for us we were at 15%
    • Program Name
      • SQLAgent
        • Process scheduled via MS SQL Server Agent
    • Start Time
      • 5 AM



Reviewing Wait Stats is an important tool in monitoring SQL Server in general and also particular processes.



Image -01

Image -02


We have issued a command through xp_cmdshell.

The command payload is to copy last night’s backup file from Production to QA.


  1. Login Name
    • NT AUTHORITY\Network Service
      • SQL Server Agent Account
  2. CPU
    • Using quite a bit of CPU
  3. Reads/Writes/Physical Reads
    • Negligible
      • OS is handling copy command
      • And, actual usage not account to SQL Server


American Justice



  1. American Justice A Soldier’s Secret
    • Videos
      • YouTube
        • A gay private in the US army is bludgeoned to death by fellow soldiers
          Channel :- Anthony Dukes
          Published On :- 2017-Oct-30th
    • Participants
      • Barry Winchell
      • Calvin Glover
      • Justin Fisher
    • Story
      • Wikipedia
        • Murder of Barry Winchell – Wikipedia
      • Vanity Fair
        • Don’t Ask, Don’t Kill: Inside the Murder of Solider Barry Winchell ..
      • Time
        • “Why Do People Have To Push Me Like That?” – TIME
  2. Death of a Bride
    • Videos
      • YouTube
        • Channel :- Anthony Dukes
          Published On :- 2017-Oct-23rd
    • Participants
      • Gladys Ricart
      • Davis
      • Juan Ricart ( Brother )
      • James Preston ( Fiance )
      • Marie-Ann Liriano
      • Norma Rosario
      • Augustine Garcia
        • Augustine Garcia ( Ex Boyfriend )
        • Natisa Garcia ( Daughter )
  3. Laci & Scott Peterson
    • Videos
      • YouTube
        • Channel :- Uncle Abner
          Published On :- 2017-July-24th
    • Show Listing
      • IMDB
        Season 14, Episode 1
    • Participants
      • Laci Peterson
      • Scott Peterson
  4. Sara & Fred Tokas
    • Videos
      • YouTube
        • The Wife Who Knew Too Much
          Channel :- Ultimate Media TV
          Published On :- 2017-July-24th
    • Participants
      • Tokas
        • Sara Tokas
        • Fred Toksa
    • Stories
      • AJC
        • We survived, thanks to six amazing aunts and one strong grandfather
    •  Date:
      • Untimely :- Nov 29th, 1992
  5. George Lewis
    • Videos
      • YouTube
        • Video #1
          Channel :- Popular Videos American Justice
          Published On :- 2017-July-24th
    • Participants
      • George Lewis
      • Larry
  6. Marion “Mad Dog” Pruett
    • Profile
      • While in the government witness protection program in 1981, Marion “Mad Dog” Pruett goes on a crime spree across several states. AKA Sonny Pearson while in the witness protection program he committed a series of robberies and at least five murders that included his wife Pamela Sue Barker. American Justice looks this case and examines how many blamed the government for allowing this to happen while on their watch.
    • Listing
      • IMDB
        • Dealing with the Devil ( 2011 )
    • Videos
      • YouTube
        • Dealing with the Devil
          Channel :- Popular Videos American Justice
          Published On :- 2017-July-24th
    • Persons
      • Marion “Mad Dog” Pruett
      • Peggy Lo
  7. Bobby Kent
    • Videos
      • YouTube
        • Payback for a Bully – Video #1
          Published On :- 2015-Feb-22nd
  8. Doctor who killed wife
    • Videos
      • YouTube
        • Doctor who killed wife – Video #1
          Published On :- 2018-March-7th



Death of a Bride

  1. In Dominican Republic
    • 1979
  2. Augustine Garcia
    • Met 1992
  3. James Preston
    • Fiancee



Sara & Fred Tokas

We survived, thanks to six amazing aunts and one strong grandfather

We survived, thanks to six amazing aunts and one strong grandfather

Mike Tokars was 4-years-old when his mother, Sara, was shot by a hit man in a 1992 murder case that ultimately led to his father, Fred Tokars. Mike Tokars and his brother, Rick, were raised in Bradenton, Fla. An aspiring journalist, Tokars is an intern for a magazine in New York. This is the first time he has spoken publicly about his mother’s murder.

It wasn’t the heavy and personal nature of this assignment that had me pacing and chain-smoking last Sunday; it was an unavoidable conversation with my brother. Rick and I had not spoken about her — to one another, alone — in 10 years.

I remember it went something like this:

Me: “Hey, it’s the 10th anniversary of Mom …”

Rick: “I know … Wanna go surf? Cold front brought a swell.”

Me: “Yeah.”

And we went surfing.

A decade earlier we were saying, “If Dad had been there [last night], he would’ve shot him.”

And talking about mom ended there.

I realize that this looks sad on paper, but the fact of the matter is, Rick and I don’t need to discuss our lives before Nov. 29, 1992. I know how Rick feels about it. And Rick knows how I feel about it. We remember. We were there. We’ve been thinking about it every day for 20 years, so there is no need to say it out loud.

But this is not to say that Sara Tokars has been absent from our lives during the last two decades; not at all, actually. I speak about my Mother frequently — to close friends who know what happened, and also to acquaintances who don’t.

I never get heavy on it outside of familial zones, and have grown into a habit of talking about her the way other people talk about their mothers who are alive; because it is not necessary to include the horrible detail. Once, I bragged to a cute hipster chick from Colorado that “my Mom went to college in Boulder, in the 70s.” I suppose I do this because — well, I suppose I do this because I wish I was someone with the option of talking about my Mom, as if she were alive.

I do, however, bring up the murder when talking with my aunts — the Ambrusko sisters — who, despite the immeasurable and ongoing sadness they’ve been forced to cope with, continue making extraordinary efforts to keep Sara alive for Rick and me. And I do feel her in all of them — in six separate ways that come from each sister’s similar but unique relationship with my Mom; but there is also an all-encompassing force which they share as a whole. Attempting to describe this internal reaction would be useless; but I have observed the spirit does not come from an individual source, but from all of their efforts combined.

It feels safe, and warm — like Mass on Christmas morning.

When I graduated from University of South Florida last year, not a single aunt missed the commencement. They brought all of the available uncles and cousins, from each corner of America, down to swampy Florida — the land of runaways and fresh-starts, where Rick and I grew up.

All six of the Ambrusko girls sat together, in place of their middle sister, Sara — who I’m told once made a heck of a cheerleader — and cheered for me, the fortunate orphan.

Later that night, at a beach bar near our home in Bradenton, the entire family gathered around a table, drinking and laughing and smiling together, watching me on stage, where I was playing guitar and singing with my band. At one point during our second set, while we were riffing on some instrumental number, I took the opportunity away from the microphone to get a good look at my family.

I lit a cigarette and let the rhythm section carry on for a bit; smiled back, and tipped my bottled-water their way for a subtle “cheers” to all of them, but especially to my aunts.

You might remember them from the extensive media coverage of the murder of Sara Tokars; but for the sake of clarity, and to give credit where it is due, I’m going to list them here:

The Ambrusko girls are: Theresie, Gretchen, Mary, Sara, Joni, Karen, and Krissy.

They are all wonderful and have gone above and beyond for Rick and me. In the wake of such a deranged adversity, we were — and are — very lucky to have them.

And in regard to my father: His name is Dr. John Ambrusko.

My grandfather always wanted boys, and ended up with two as an old man. He is the reason that Rick and I survived. It was through his example that we learned to be strong and composed, to work hard and to pray.


To work hard to pray…



SQL Server – Trigger – Metadata


Need to document our triggers.



; with cteTriggerEvent
    , [type]

                = tblST.object_id

        , [type]

                                + tblSTE_Inner.[type_desc]

                        from sys.trigger_events tblSTE_Inner

                        where  tblST.[object_id]
                                    = tblSTE_Inner.[object_id]

                        for xml path('')
                    , 1
                    , 1
                    , ''


    from sys.triggers tblST



        [object] = 
                    + '.'
                    + object_name(tblST.parent_id)
    , [trigger] 
        = tblST.[name]
    , [disabled]
        = case tblST.[is_disabled]
                when 1 then 'Yes'
                else 'No'

    , [isInsteadofTrigger]
        = case tblST.is_instead_of_trigger
                when 1 then 'Yes'
                else 'No'
    , tblSTE.[type]

from   sys.triggers tblST

inner join cteTriggerEvent tblSTE

        on tblST.[object_id] = tblSTE.[object_id]

order by
        , [object]
        , [trigger]


Output – msdb


Source Control



Life & Rap


Craig Mack passing takes one back at rise and rising.

And, how it will play out for each of us.


  1. Craig Mack
    • Videos
      • YouTube
        • Craig Mack and His NEW RAP – The Video – See it LIVE!
  2. Trevell Coleman
    • Videos
      • YouTube
        • ABC News – Nightline
          • Former Bad Boy Artist G-Dep gives Interview from Prison
        • Steph Lova
          • Black Rob Discusses G-Dep Murder Confession
          • Profile
            • In this exclusive clip, Steph Lova asks Black Rob about G-Dep’s infamous murder confession. Black Rob breaks down how G-Dep felt and why he did what he did
          • Link
        •  djvlad
          • G-Dep Explains Confessing to Murder: “I Didn’t Feel Free and Clear”
            • Profile
              Former Bad Boy artist, “G-Dep,” also known by his real name, Trevell Coleman, spoke to DJ Vlad about why he decided in 2011 to confess to a murder he committed during a robbery attempt in 1993. Although, the rapper had gotten away with the crime for almost 18 years, he says it didn’t feel that way to him, “I didn’t feel free and clear.” He explained, “Every day, I was faced with this memory and this heinous act, that really didn’t have to happen.”Listen to the full interview above to hear about his time in prison and what he has planned for the future.
            • Link
  3. Loon
    • Videos
      • YouTube
        • Why Loon Left Bad Boy
          Loon 2 Amir is a Documentary Short about the transformation of Chauncey Hawkins, better known as Bad Boy Rapper extraordinaire Loon, from a life of discontentment as a Hip Hop star to a life of peace in faith as Amir Muhadith.
          Channel :- West Dawn Media
          Published On :- 2010-Jan-17th
        • Loon talks about Islam and the music industry right before going to prison
          Former Badboy artist Loon speaks about his experience converting to Islam, and why he’s not making music any more right before going to jail
          Channel :- R Lyfe Visuals
          Published On :- 2009-Dec-12th
        • Rapper Loon – When people ask me about Jay Z
          I Don’t play “ask me about Jay-Z”. I play my Sahabaa Rookie Card.
          Channel :- Ibaadur Rahmaan
          Published On :- 2012-May-14th


In depth

G. Dep

G. Dep Says ‘Burden Is Lifted’ After Confessing To Murder!

  1. Betrayed by the last person anyone will ever suspect himself

Reference Work

  1. Loon