Pathping / Day 01

Background

Wanted to talk very little about using pathping to get an idea of the route between one and a destination host.

Syntax

The syntax is generic enough.

Enter pathping and the destination’s hostname or IP Address.

Sample


 pathping Haaretz.com

Output

Tracing Route

pathping.haaretz.01.20190310.0756PM

Computing Statistics

pathping.haaretz.02.20190310.0800PM_x

Interpretation

 

There are two sections to pathping’s output.

The sections are “Tracing Route” and “Computing Statistics“.

 

Tracing Route

Each router that is responsible for forwarding the network packet is listed.

Computing Statistics

Allotted Time

Depending on how many routers are encountered time is allotted for processing.

Each router is pinged one hundred times every 0.25 seconds.

That is, 25 seconds is allotted for each router.

Columns

  1. Hop
    • Increasing number for each router
  2. RTT
    • RTT means Round Trip Time
    • The is how long it took to receive response back from that router
  3. Source to Here / Loss / Sent Percentage ( % )
    • Percentile of packets lost
    • If 100 packets were sent, but only 20 acknowledgement was received
    • This number will be ( 100-20) / 100 or 80%
  4. This Node Link / Loss / Sent Percentage ( % )
    • Packet loss information specific to this router
  5. Address
    • Router’s Address

Summary

  1. If you see 100% packet loss, but entries beyond that point
    • That specific router is likely dropping ICMP traffic

 

SQL Server – Installation – Error – “Cannot open registry key ‘HKLM\SYSTEM\CurrentControlSet\Services\MSSQLSERVER\Performance’. SQL Server performance counters are disabled.”

Background

Ever so often one runs into errors in the area of SQL Server and Performance Counters.

Errors

One of the places where the errors shows up is the MS Windows Event Viewer :-

MS Windows Event Viewer

Log Name :- Application

  1.  Event ID – 8316
    • Event ID :- 8316
    • Source :- MSSQLServer
    • Details :- Cannot open registry key ‘HKLM\SYSTEM\CurrentControlSet\Services\MSSQLSERVER\Performance’. SQL Server performance counters are disabled.
  2. Event ID – 8317
    • Event ID :- 8317
    • Source :- MSSQLServer
    • Details :- Cannot query value ‘First Counter’ associated with registry key ‘HKLM\SYSTEM\CurrentControlSet\Services\MSSQLSERVER\Performance’. SQL Server performance counters are disabled.
  3. Event ID – 3003
    • Event ID :- 3003
    • Source :- LoadPerf
    • Details :- Unable to install counter strings because the SYSTEM\CurrentControlSet\Services\MSSQLServer\Performance key could not be opened or accessed. The first DWORD in the Data section contains the Win32 error code.
  4. Event ID – 3009
    • Event ID :- 3009
    • Source :- LoadPerf
    • Details :- Installing the performance counter strings for service MSSQLServer (SQL Server (MSSQLSERVER)) failed. The first DWORD in the Data section contains the error code.

Remediation

Outline

  1. SQL Server Instance
    • For that specific SQL Server Instance, locate folder where performance counter files are kept and reload them
  2. System
    • Reload OS System counters
      • In command window, change folder to %windows%\system32
      • Reload all OS System Counters
  3. Performance Counters
    • Identify disabled Performance Counters
  4.  Registry
    • In MS Windows Registry, repair or create missing folders and items

Tasks

SQL Server Instance

Script


 @echo off

setlocal

REM Please adjust for you specific SQL Server Instance
set "_folderTarget=C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Binn"

set "_fileExtIni=*.ini"

set _appPgmList=echo

set _appPgmApply=lodctr

set "_service=mssqlserver"

ECHO Unload Performance Counter for %_service%

unlodctr "%_service%"

ECHO Performance Counter for %_service% unloaded

ECHO Targeted Folder %_folderTarget%
ECHO ==============================

forfiles /P "%_folderTarget%." /s  /m %_fileExtIni% /c ^"cmd /c ^
  %_appPgmList% ^
  file name is @FILE ^
^"

REM Apply lodctr

@echo
@echo

forfiles /P "%_folderTarget%." /s  /m %_fileExtIni% /c ^"cmd /c ^
   %_appPgmApply% @PATH ^
^"

endlocal

net stop "Remote Registry"
net start "Remote Registry"

net stop "Performance Logs & Alerts"
net start "Performance Logs & Alerts"

endlocal

OS

Outline

  1. LODCTR
    • Navigate to System Folders
      • SYSTEMROOT
        • %SYSTEMROOT%\SYSTEM32
        • %SYSTEMROOT%\SYSWOW64
    • Issue LODCTR /r
  2. Winmgmt
    • winmgmt.exe /RESYNCPERF

Performance Counters

Is Performance Counter Disabled ?

Script

Syntax

lodctr /q

Sample

lodctr /q | find /i "Performance Counters" | find /i "sql"

Output
Output – Textual

>lodctr /q | find /i "Performance Counters" | find /i "sql"
[.NET Data Provider for SqlServer] Performance Counters (Enabled)
[msftesql] Performance Counters (Enabled)
[msftesqlFD] Performance Counters (Enabled)
[msftesqlIDX] Performance Counters (Enabled)
[MSSQLSERVER] Performance Counters (Enabled)
[MSSQLServerOLAPService] Performance Counters (Enabled)
[SQLBrowser] Performance Counters (Enabled)
[SQLSERVERAGENT] Performance Counters (Enabled)

Output – Image

lodctr.q.20190309.0520PM

Explanation
  1. lodctr
    • If the Counter is disabled, it will be flagged, as such

 

Registry

Regedit

Using regedit, review registry entries

Outline

  1. Registry Key
    • Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
    • Please make sure the performance branches exists under the SQL Server services
      • Default Instance
        • MSSQLSERVER\Performance
        • SQLSERVERAGENT\Performance
      • Named Instance
        • MSSQL$[Instance-Name]\Performance
        • SQLSERVERAGENT$[Instance-Name]\Performance
    • Under each Performance branch, you want to look for
      • Engine
        • PerfIniFile
          • Default Instance
            • sqlctr.ini
          • Named Instance
            • perf-<instance name>sqlctr.ini
      • SQL Server Agent
        • PerfIniFile
          • Default Instance
            • sqlagtctr.ini
          • Named Instance
            • perf-<instance name>sqlagtctr.ini
  2. Create Performance node if absent
  3. Grant permissions to the account running the SQL Server Service ( Engine / Agent / etc )

Registry Entries

Registry Entries – SQL Server Engine
Registry Entries – SQL Server Engine – Initial

MSSQLServer.Engine.01.20190308.1105PM.PNG

Registry Entries – SQL Server Engine – Revised

performanceCounter.sqlServerEngine.20190309.0540PM.PNG

Registry Entries – SQL Server Agent
Registry Entries – SQL Server Agent – Initial

registry.sqlServerAgent.20190308.1101PM.PNG

 

Registry Entries – SQL Server Agent – Revised

performanceCounter.sqlServerAgent.20190309.0533PM.PNG

 

 

References

  1. loganathanvm
    • System counters corrupted issue or LODCTR /R Error Code 2.
      Link

SQL Server – Installation – DISM

Background

Trying to install Microsoft SQL Server, but ran into a familiar error.

Blockers

Microsoft SQL Server 2005 Setup

System Configuration Check

Images

IIS Feature Requirement

sqlServer.v2005.SystemConfigurationCheck.20190308.0558PM.PNG

ASP.Net Version Registration Requirement

sqlServer.v2005.SystemConfigurationCheck.ASPNetRegistration.20190308.0603PM.PNG

Prerequisite

Installation

DISM

Outline

  1. Get
    • dism /online /get-features
    • dism /online /get-featureinfo
  2. Enable Feature
    • Dism /online /Enable-Feature

Tasks

get-features
Syntax

dism /online /get-features 

Sample

dism /online /get-features | find /i "IIS-ASPNET" 

Output

Feature Name : IIS-ASPNET
Feature Name : IIS-ASPNET45

get-featureinfo
Syntax

dism /online /get-featureinfo 

Sample

dism /online /get-featureinfo /featurename:NetFx3

Output

Deployment Image Servicing and Management tool
Version: 10.0.14393.0

Image Version: 10.0.14393.2457

Feature Information:

Feature Name : NetFx3
Display Name : .NET Framework 3.5 (includes .NET 2.0 and 3.0)
Description : .NET Framework 3.5 (includes .NET 2.0 and 3.0)
Restart Required : Possible
State : Enabled

Custom Properties:

FWLink : http://go.microsoft.com/fwlink/?LinkId=296822

The operation completed successfully.
get-featureinfo
Syntax

Dism /online /Enable-Feature /FeatureName:(feature-name) 

Sample

Dism /online /Enable-Feature /FeatureName:NetFx3 /All

Output

Deployment Image Servicing and Management tool
Version: 10.0.14393.0

Image Version: 10.0.14393.2457

Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.

Actual

Here is what we need to do to enable IIS Web Server and the specific features required by SQL Server Engine and Reporting Services.

Enable IIS-Web Server
Code

DISM /Online /Enable-Feature /FeatureName:IIS-WebServer /all
DISM /Online /Enable-Feature /FeatureName:IIS-WebServerManagementTools /all
DISM /Online /Enable-Feature /FeatureName:IIS-WebServerRole /all

Enable IIS-Features
Code

DISM /Online /Enable-Feature /FeatureName:IIS-StaticContent /all
DISM /Online /Enable-Feature /FeatureName:IIS-DefaultDocument /all
DISM /Online /Enable-Feature /FeatureName:IIS-HttpRedirect /all
DISM /Online /Enable-Feature /FeatureName:IIS-DirectoryBrowsing /all

DISM /Online /Enable-Feature /FeatureName:IIS-ASP /all
DISM /Online /Enable-Feature /FeatureName:IIS-ASPNET /all

DISM /Online /Enable-Feature /FeatureName:IIS-ISAPIExtensions /all
DISM /Online /Enable-Feature /FeatureName:IIS-ISAPIFilter /all

DISM /Online /Enable-Feature /FeatureName:IIS-WindowsAuthentication /all

DISM /Online /Enable-Feature /FeatureName:IIS-Metabase /all

DISM /Online /Enable-Feature /FeatureName:IIS-WMICompatibility /all

SQL Server – System Databases

Background

I was reviewing a database and noted that the distribution database is not named distribution, but TSRDistribution.

SQL Server Management Studio ( SSMS)

I wanted to see how SSMS is able to classify the database as a system database.

Image

ssms.outline.20190307.0836AM.PNG

Code

Outline

Ran a trace against the SQL Server Instance and noticed that SSMS issues the query pasted below.

What does the query do :-

  1. sys.databases
    • Name Match
      • Checks the database name and see if it matches
        • master
        • model
        • msdb
        • tempdb
    • Property match
      • Distributor
        • is_distributor

SQL


select
          dtb.[name]
        , dtb.database_id

from   master.sys.databases AS dtb

WHERE
        (
            CAST
                (
                    case
                        when dtb.name in ('master','model','msdb','tempdb') then 1
                        else dtb.is_distributor
                    end
                    AS bit
                ) = 1
        )

ORDER BY
    [name] asc

Summary

Confirmed that SSMS does not check against a specific rule, isSystem, to identify system databases.

SQL Server – Telemetry / QueryStore – Query Error

Background

As part of monitoring our SQL Server noticed an error.

Error

Here is the error :-

  1. Error Number :- 4104
  2. Error Text :- The multi-part identifier “qry.is_internal_query” could not be bound.

Query Text


SELECT db_id() AS database_id,
       COUNT_BIG(1) QueryCount,
       SUM(count_compiles) TotalCompiles,
       MAX(last_compile_duration) MaxLastCompileDuration,
       MIN(last_compile_duration) MinLastCompileDuration,
       AVG(last_compile_duration) AvgLastCompileDuration,
       SUM(last_compile_duration) TotalLastCompileDuration
FROM sys.query_store_query AS Qry
WHERE qry.last_execution_time
         >= DATEADD(HOUR, -24, GETDATE())
  AND qry.is_internal_query = 0

Troubleshoot

The error was straight forward enough to troubleshoot.

Remedy

Outline

  1. Our database is case-sensitive
    • Replace alias Qry with qry

SQL


SELECT db_id() AS database_id,
       COUNT_BIG(1) QueryCount,
       SUM(count_compiles) TotalCompiles,
       MAX(last_compile_duration) MaxLastCompileDuration,
       MIN(last_compile_duration) MinLastCompileDuration,
       AVG(last_compile_duration) AvgLastCompileDuration,
       SUM(last_compile_duration) TotalLastCompileDuration

-- FROM sys.query_store_query AS Qry

FROM sys.query_store_query AS qry

WHERE qry.last_execution_time
        >= DATEADD(HOUR, -24, GETDATE())

AND qry.is_internal_query = 0

 

SQL Server – v2019 – OS Requirements

Background

We are 3 months into 2019, and it is way past time to start evaluating SQL Server v2019.

Product Development Cycle

In terms of community participation, the product engagement cycle is :-

  1. Community Technology Preview ( CTP )
  2. Release Candidate
  3. Release To Manufacturing
  4. Cumulative Updates

Within each of this cycle, there will be tiered releases.

For instance :-

  1. Community Technology Preview ( CTP )
    • CTP 1
    • CTP 2
    • CTP 3
  2. Release Candidate
    • RC 1
    • RC 2
  3. Release To Manufacturing
    • RTM
  4. Cumulative Updates
    • CU 1
    • CU 2
    • CU 3
    • CU [n]

 

Where are we ?

As of today, we are at “SQL Server 2019 CTP 2.3 Evaluation Edition”.

 

Requirements

Blocking issue

Will love to download, install, and start playing and planning along.

But, for this issue :-

evaluationedition.20190304.0515PM.PNG

My OS is MS Windows 2012, but I need to be on at least MS Windows 2016.

Official

Link

hardwareANDsoftwareRequirements.20190304.0635PM

 

Michael O’Neill :- Explaining and Exploring the Miraculous

Author :- Sam Scott
Magazine :- Stanford Magazine
Link

Story

Squint your eyes and Michael O’Neill’s emergence as the “Miracle Hunter” could resemble a typical Silicon Valley tale of pluck and ingenuity. He is, after all, just another Stanford engineering student who went deep with his research, parlayed the results into an innovative website and ran off to a future no one could have imagined a few years prior.

But the details . . . well, O’Neill would be the first to admit his professional life hardly fits a mold. “It’s such a weird topic I’ve devoted my life to,” he says. “If anybody talks to me funny, I hardly blame them.”

O’Neill, ’98, is an expert in miracles—the supernatural Christian kind, not the metaphors for last-gasp touchdowns or billion-dollar start-ups. It’s a multimedia pursuit that includes hosting his own radio show and television series on Catholic networks, conducting research, writing books and providing punditry on secular stages like the Dr. Oz Show and Megyn Kelly Today. And notwithstanding the occasional self-deprecating remark, he takes miracles very seriously.

“I call him the Virgin Mary’s number cruncher,” says Maureen Orth, a longtime writer for Vanity Fair who contacted O’Neill while working on a story for National Geographic about the worldwide devotion to Mary, the Biblical mother of Jesus and the most frequent subject of apparitions. O’Neill provided her with centuries of data to create a global map of thousands of supposed Marian apparitions sorted by their official status, from a small number of sanctioned miracles to the largest group of unconfirmed sightings. “I really respected him because he was very fact-based.”

Miracles—healings, apparitions, bleeding Eucharistic hosts, etc.—may seem a strange business for a mechanical engineer whose education was steeped in the properties of the physical world. For his senior product design project, O’Neill created a photovoltaic umbrella capable of soaking up enough solar rays to run a stereo on the beach, nothing to sniff at in the dawn before iPods and Bluetooth speakers.

Contrary to a lot of people’s expectations, the church is dubious of supernatural claims. It typically investigates them with an eye toward ending the distraction.
But an even higher power had always fascinated O’Neill, who grew up near Chicago in a devout family that placed divine intervention at the center of its lore. O’Neill’s grandmother had lost her faith decades earlier, going so far as to throw away rosary beads and statues. In response, his mother, then a child, prayed for the intercession of Our Lady of Guadalupe, the widely venerated appearance of Mary to a Mexican peasant nearly five centuries prior. When his grandmother returned to the church, his mother pledged herself to retelling the story every year at the feast celebrating the appearances.

It was only at Stanford, though, that O’Neill’s more formal interest in miracles began. His junior year, he took an archaeology class that required him to research an artifact that had impacted the world. He chose the tilma, or cloak, belonging to the man who saw Our Lady of Guadalupe. The cloak, according to believers, was miraculously emblazoned with an iconic image of Mary, starting a devotion that is credited with the conversion of Mexico’s Native population.

In the many hours he spent in Green Library for that project, O’Neill says he began delving into how the Catholic Church reacts to claims of miracles, which were far more common and scrutinized than he had known. Contrary to a lot of people’s expectations, the church is dubious of supernatural claims. It typically investigates them with an eye toward ending the distraction, embracing a scant few only after long inquiry.

Indeed, it’s semi-miraculous that anything ever gets sanctioned as a miracle, O’Neill says. But some do, and this mix of faith, skepticism and, ultimately, certainty intrigued him. “I just couldn’t believe that the institution would stick out its neck and say there were actual miracles happening in the world.”

A year later, when then-provost Condoleezza Rice gave his graduating class some parting advice—“Become an expert in something. Find your sliver of the universe and own it”—O’Neill felt a jolt of inspiration. After graduation, he started MiracleHunter.com as a centralized spot for his research into all things miraculous, adopting a more matter-of-fact approach than the pious tone he’d found elsewhere and creating a depository of information on the topic he says is unrivaled online.

Still, it was primarily a personal hobby aimed at expanding his own knowledge and one he kept secret from friends, girlfriends and even his mother. When people emailed him, he replied as Miracle Hunter, or “M.H.,” mindful of being lumped with UFO and Bigfoot believers.

By day, O’Neill worked for—and later led—the visual communication department of a consulting firm; his graphics and simulations were used in courtroom trials to explain engineering failures. By night, he turned to another realm altogether. “I didn’t want my name out there,” he says. “I was a reputable engineer. I didn’t want to confuse these two worlds too much.”
O’Neill travels the world to interview believers about their miracle claims.Photo: Courtesy Michael O’Neill

But in time, he let the word out to his inner circle and started to get speaking invitations, finding that even skeptics were curious to hear him out. Over the years, O’Neill has adopted an increasingly public presence focused entirely on miracles, much to the occasional bemusement of old acquaintances. “I get some pretty funny emails from old Stanford classmates and friends who say, ‘This is an interesting turn.’”

Of course, nobody hands you a turnkey career as a miracle hunter. O’Neill’s profile has grown thanks to a variety of roles he’s stitched together with a dose of earthly grit. “He beat me down over a three-year period to get a show on the air,” says the Rev. Francis Hoffman, executive director of Relevant Radio, a nationwide Catholic radio network where O’Neill hosts a weekly show, The Miracle Hunter. “What he’s done is 99 percent hard work.”

Hoffman calls O’Neill “an engineer at heart.”

“[T]hat’s the discipline he brings to it,” Hoffman says. “He seems to dominate all the facts when he’s talking about these things. He’s not sensationalist at all. I think that gives him a certain credible following.”

O’Neill’s career involves both explaining and exploring miracles. He’s been as far as the Philippines to interview believers, but he found one of his most engaging cases in his own Chicago backyard—a 20-something man whose recurrent wounds on his feet, hands and head defied his doctors’ explanations, and appear in O’Neill’s eyes to be stigmata, the miraculous appearance of the wounds of Christ.

In other cases, O’Neill allows that more secular explanations may be at play. A few years ago, he tested soil from El Santuario de Chimayo, a New Mexican sanctuary where abandoned crutches and wheelchairs testify to those who say they have been healed by the holy dirt. O’Neill says it’s possible the cures are more about the belief of the healed than anything intrinsic to the location. But he sees overlap between the placebo effect and the power of faith. “Where the line is between those two, we don’t know.”

He readily agrees that the vast majority of miracle claims have material explanation. Part of his job is tamping down the enthusiasm of those too eager to believe in the supernatural, he says. But the many false positives only make it all the more powerful when something passes the church’s scrutiny, he says. He knows how much effort went into trying to avoid that conclusion. Miracles aren’t the center of his faith, but they’re a way to show a hidden God reaching out.

“If I can somehow prove to myself that miracles are in fact happening around the world,” he says, “then that connects me to God somehow.”

Sam Scott is a senior writer at Stanford.

Links

  1. Magazine
    • Michael O’Neill Explains and Explores the Miraculous :- The Virgin Mary’s ‘Number Cruncher’
      Link
  2. Michael O’Neill
    • Miracle Hunter

Videos

  1. Dr. Oz
    • The Mystery of Miracles
      • Profile
        • Medical miracles are astounding and have no explanation but what makes an event miraculous? Dr. Oz welcomes author Michael O’Neill to discuss the parallels between science and religious belief.
          GUESTS: Michael O’Neill , Devon Franklin , Valerie Paters , Marilyn Denis,  Daphne Oz
      • Videos
  2. Rome Reports
    • ROME REPORTS – French fictional film explores Marian apparitions
      • Videos
        • Video #1
          Channel :- ROME REPORTS in English
          Published on Sep 14, 2018
          Link
  3. NBC
    • Today Show
      • Woman Says Her Tumors Disappeared After Visiting Religious Wisconsin Shrine | Megyn Kelly TODAY
        • Profile
          • Megyn Kelly speaks with Nancy Foytik, who was diagnosed with stage four colon cancer. After visiting Wisconsin’s National Shrine of Our Lady of Good Help, the only place in the U.S. recognized by the Catholic church as a site where the virgin Mary appeared, Nancy’s tumors on her left lung disappeared. “We just knew when I walked out of the chapel that day that I was going to be cured,” she said.
        •  Videos
  4. Our Lady of Fatima
    • EWTN
      • EWTN News Nightly – October 5, 2016 “Our Lady of Fatima”
        • Profile
          • EWTN News Nightly – October 5, 2016 “Our Lady of Fatima”
        • Videos
          • Video #1
            Channel :- EWTN ( The Eternal Word Television Network )
            Published On :- 2017-April-20th
            Link
      • Miracles of BI. Francisco and Jacinta
        • Profile
          • Miracles of Bl. Francisco and Jacinta who will be made saints on May 13th.
        • Videos
          • Video #1
            Channel :- EWTN ( The Eternal Word Television Network )
            Published On :- 2017-April-20th
            Link
  5. Our Lady of Good Help
    • Profile
      • Belgian
      • Only approved approved appropriation in the United States
      • Year Occurred :- 1859
    •  EWTN
      • EWTN News Nightly – August 22, 2016 Our Lady of Good Help
        • Profile
          • EWTN’s Brian Patrick interviews “Miracle Hunter” Michael O’Neill about the recent news of the Church-approved apparition site Shrine of Our Lady of Good Help in Champion, Wisconsin receiving National status.
        • Videos
          • Video #1
            Channel :- Miracle Hunter
            Published On :- 2017-August-20th
            Link
  6. Miracle Hunter
    • How the Catholic Church Validates Medical Miracles
      • Profile
        • How does the Church verify miracles used to elevate holy persons to the canon of the Saints? Join “Miracle Hunter” Michael O’Neill as he details the rigorous process used by the Catholic Church to verify medical miracles at the famed Marian apparition site of Lourdes and those attributed to the intercession of those on the path to sainthood.
      • Videos
        • Video #1
          Channel :- TheMiracleHunter
          Published On :- 2017-Feb-11th
          Link
    • Green Bay Local
      • Green Bay Local 5 – Meet the Miracle Hunter
        • Profile
          • “Miracle Hunter” Michael O’Neill interviewed on Green Bay’s Local 5 about his visit to the The National Shrine of Our Lady of Good Help to deliver the keynote address at the National Novena and film the new special “The Miracles of Champion”
        • Videos
          • Video #1
            Channel :- TheMiracleHunter
            Published On :- 2017-Oct-11th
            Link