WordPress – Post – Convert to PDF Document

Background

Recently I wrote a document using WordPress.

Really should have used Google Docs as the document is really too big for WordPress.

Besides, Google Docs has much nicer and accessible Convert to other document formats options.

 

Too late

Too late to cry over spilled milk.

Besides, it is only Monday and like Bangles Tuesdays are my fun day.

 

Convert

Would rather have the document as Doc or Docx, as in Word for Windows.

But, for now having as a PDF will get me halfway.

 

Convert To PDF

Options

Here are some options for converting the document to PDF.

  1. printFriendly
    • Web Site
      Link
    • Chrome Extension
      • Print Friendly & PDF
        Link
  2.  wk<html>topdf
    • Links

 

Indepth

printfriendly – web site

Steps
  1. Please go here
  2. Enter the URL you will like captured
Screen Shots

print Friendly & PDF – Chrome Extension

Install
  1. Launch Chrome
  2. Access Extension
    • Visit here 
    • Or google for “print friendly chrome extension
Screen Shots

 

 

wk<html>topdf

Script – MS Windows

set "_folderApp=C:\Program Files\wkhtmltopdf\bin"
set "_appName=wkhtmltopdf.exe"

set "_appNameFull=%_folderApp%\%_appName%"

set "_url=http://biblehub.com/numbers/11-15.htm"
set "_title=c:\temp\linopen.pdf"

"%_appNameFull%" %_url%  %_title%

Dedicated

Dedicating to Traffic Generation Cafe, as they pointed me to the PrintFriendly.com

How to Convert Blog Post Into PDF
Link

What makes PrintFriendly so awesome?

Link

 

Words Said

Background

There has been so much said in the last few days.

Sometimes it is not quite topical.

It is really just people hijacking issues and wanting something to say.

Whether it is school shooting or whatever else is trending, it really does not matter.

People are angry, frustrated and just wanting to let off.

 

Friendships & Ties

Not having friends, associates, and ties to communities sometimes allows and excuses us to paint with bigger brushes than we otherwise would have.

When we are among friends we sometimes take the liberties we otherwise wouldn’t.

Physical spaces affords us that intimacy, but now sometimes now it is Web Communities.

 

Almost Naivete

We are probably at that point where speaking against someone that people look up to, will cause a bit of rancor.

In as much possible, just don’t to do it.

The stakes are high and will likely only get higher.

 

Words do matter

Words do matter.

  1. Miranda Rights
    •  You have the right to remain silent. Anything you say can and will be used against you in a court of law. You have the right to an attorney. If you cannot afford an attorney, one will be provided for you.
  2. Good Book
    • Gossips
      • Whoever would foster love covers over an offense, but whoever repeats the matter separates close friends. ( Proverbs 17: 9 )
      • Do not let any unwholesome talk come out of your mouths, but only what is helpful for building others up according to their needs, that it may benefit those who listen. ( Ephesians 4:29 )
      • But let your ‘Yes’ be ‘Yes,’ and your ‘No,’ ‘No.’ For whatever is more than these is from the evil one. ( Matthew 5: 37 )
      • But I say unto you, That every idle word that men shall speak, they shall give account thereof in the day of judgment.
        For by thy words thou shalt be justified, and by thy words thou shalt be condemned. ( Matthew 12:36-37 )
    • Uncareness
      • Whoever does not gather with me scatters. ( Matthew 12:33 )
    • Anger
      • …Therefore each of you must put off falsehood and speak truthfully to his neighbor, for we are members of one another.
        Be angry, yet do not sin.” Do not let the sun set upon your anger,
        and do not give the devil a foothold.…
      • Tremble, and do not sin; Meditate in your heart upon your bed, and be still. Selah. ( Psalm 4:4 )
      • for man’s anger does not bring about the righteousness that God desires. ( James 1:2 )
    • Walk
      • Act worldly of your calling ( Ephesians 4:1 )
    • Heart
      • Out of the abundance of the heart, the mind speaks ( Luke 6:45 )
    •  Doubt
      • an oath given as confirmation is an end of every dispute ( Hebrew 6:16 )

Public Spaces

With difficulties and sometimes headstrongness we come into our public spaces.

And, think that if we say things a certain way, we might make our points.

We sometimes riddle the other side.

 

Gaps

The truth of the matter is that we have gaps.

Some are obvious.

Parenting Gaps

We are experiencing a parenting gap.

And, it translates to economic gap, and within a generation or two into education deficits.

Uncorrected we feel and get comfortable with being who we are, where we live, what we do, and the words we use.

Peoples read into words and and take the viewpoint that “If you don’t care about me, reading from how you speak to or about me, why should I care about you“.

It is vitally important to our conduct how we dissect how much care about us.

If read wrong, our conduct is a bit forced or withdrawn.

 

Role Modeling

I think it is important to step in and help these young men as they are role models, whether they are ill prepared or not.

In too many cases they are all we have.

 

Affords

I hope that life affords you the opportunities to take some words back.  But, more so to care where you did not as much.

To re-arrange things and if unable to, to pray and hope God sends those more able.

 

Work to do….

Just the other day, one young man said

I still have a lot of work to do….

Don’t we all.

There is just too much to do that we ought not to waste “put downs“.

Undeserved put-downs are sometimes just what one needs.

Things said sometimes acts as great reminder and reasons to work harder.

 

Dedicated

Dedicating to Colicchie

Come Back Home
Link

You never run your mouth, and that’s a great quality
you never talking __ that’s something that you never see
Any issue, you just speak about yourself
do you understand all the people that you have helped

SQL Server – Linked Server – TroubleShooting

Background

There are a variety of avenues for diagnosing Linked Server related connectivity issues.

 

Follow Up

As a quick follow up to earlier conversations on SQL Server and heterogeneous data sources:

  1. SQL Server / Linked Server – Oracle ODAC
    Link

 

Outline

Here are some of the tools for diagnosis heterogenous data related issues:

  1. Query
    • DBCC
      • Trace Flag 7300
  2. SQL Server Profiler
  3. Event Viewer
  4. SysInternals
    • Process Explorer

 

 

Query

DBCC

Trace Flag 7300

Query
Syntax

dbcc traceon(7300) 
	with no_infomsgs
	;
go

dbcc traceoff(7300)
	with no_infomsgs
	;
go


Sample

dbcc traceon(7300) 
	with no_infomsgs
	;
go

declare @linkedServer sysname

set @linkedServer = 'HRDB';

exec sp_tables_ex
		@table_server = @linkedServer

go

dbcc traceoff(7300)
	with no_infomsgs
	;
go


Sample – Grid
Sample – Textual

OLE DB provider "OraOLEDB.Oracle" for linked server "PRD" returned message "ORA-12170: TNS:Connect timeout occurred".
Msg 7303, Level 16, State 1, Procedure sp_tables_ex, Line 41 [Batch Start Line 4]
Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "PRD".


Explanation
  1. Error Message
    • OLE DB provider “OraOLEDB.Oracle” for linked server “PRD” returned message
      • “ORA-12170: TNS:Connect timeout occurred”.
    • Cannot initialize the data source object of OLE DB provider “OraOLEDB.Oracle” for linked server “PRD”.
  2. Using DBCC TraceOn (7300)
    • Allows us to see that we are experiencing connection timeout to the Oracle Server
    • Likely means network or TNS configuation error

 

 

SQL Server Profiler

Trace Properties

Trace Event Selections

Here are the events that we will be tracing on…

Event Category Event Event Description
Errors and Warnings
ErrorLog  Indicates error events logged in the SQL Server error log.
EventLog  Indicates events logged in the Windows application event log.
Exception  Indicates that an exception has occurred in SQL Server.
Execution Warnings  Indicates any warnings that occurred during the execution of a SQL Server statement or stored procedure.
User Error Message  Displays the error message as seen by the user in the case or an error or exception. The error message text appears in the TextData field.
OLEDB
OLEDB Call Event Includes event classes produced by the execution of stored procedures.
OLEDB Data Read Event Displays OLE DB IRowset::GetData calls made by SQL Server for fetching row data for distributed queries and remote stored procedures.
OLEDB Errors Indicates that an OLE DB error has occurred.
OLEDB Provider Information Occurs when a distributed query is run and collects information corresponding to the provider connection. This event class contains all the properties collected from the remote provider using various property sets such as DBPROPSET_DATASOURCEINFO, SQLPROPSET_OPTHINTS, DBPROPSET_SQLSERVERDATASOURCEINFO (SQL Server only), DBPROPSET_SQLSERVERDBINIT (SQL Server only) and DBPROPSET_ROWSET and interface IDBInfo.
OLEDB Query Interface Event Displays OLE DB IUnknown::QueryInterface calls made by SQL Server for distributed queries and remote stored procedures.
Security Audit
Audit Login Collects all new connection events since the trace was started, such as when a client requests a connection to a server running an instance of SQL Server.
Audit Logout Collects all new disconnect events since the trace was started, such as when a client issues a disconnect command.
Stored Procedures
RPC:Completed Occurs when a remote procedure call has been completed.
TSQL
SQL:BatchCompleted Occurs when the Transact-SQL statement has completed.
SQL:BatchStarting Occurs when a Transact-SQL batch is starting.

 

 

Traces

Sample Traces

Sample Trace #01
Image – Full Conversation

Image – OLEDB Call Event
Explanation
  1. SQL:BatchStarting
    • Issues sp_tables_ex
    • Query Linked Server asking for a listing of tables
  2. OLEDB QueryInterface Event
    • IID_IDBProperties
      • <ppunk>0x0000003C47F941D8</ppunk>
        • Set ppunk to 0x0000003C47F941D8
  3. OLEDB Call Event
    • Property
      • DBPROP_INIT_TIMEOUT
      • DBPROP_INIT_GENERALTIMEOUT
      • DBPROP_INIT_DATASOURCE
      • DBPROP_AUTH_USERID
      • DBPROP_AUTH_PASSWORD
    • Result
      • hresult
        • 265946
          • ???
  4. OLEDB QueryInterface Event
    • IID_IDBInitialize
      • input
        • IID_IDBInitialize
      • hresult
        • 0
      • ppunk
        • <ppunk>0x0000003C47F941E0</ppunk>
          • returns 0x0000003C47F941E0
    • IID_ISSAsynchStatus
      • input
        • IID_ISSAsynchStatus
      • hresult
        • -2147467262
  5. OLEDB Errors
    • hresult
      • -2147467259
  6. OLEDB Query Interface Event
    • input
      • IID_ISupportErrorInfo
    • hresult
      • 0
    • outputs
      • 0x00000044686EBFC0
  7. OLEDB Call Event
    • input
      • IID_IDBInitialize
    • hresult
      • 0
  8. User Error Message
    • OLE DB provider “OraOLEDB.Oracle” for linked server “PRD” returned message “ORA-12170: TNS:Connect timeout occurred“.
  9. Exception
    • Cannot initialize the data source object of OLE DB provider “OraOLEDB.Oracle” for linked server “PRD”.
  10. User Error Message
    • Cannot initialize the data source object of OLE DB provider “OraOLEDB.Oracle” for linked server “PRD”.

 

Event Viewer

Security

Filter

Tabulate

Courtesy of SANS.org:

SANS Institute
InfoSec Reading Room
Windows Logon Forensics
Link

Event  ID = Windows XP / Windows 2000 Windows 2008/2012/2014, etc Event Description
 528 4624 Successful logon: A user successfully logged on to a computer. For
information about the type of logon, see the next section
 529 4625  Logon failure. A logon attempt was made with an unknown user name
or a known user name with a bad password. For Windows 2008 and
above, event ID 4625 logs every failed logon attempt with failure status
code regardless of logon type or type of account
530 4625 Logon failure for a logon attempt to log on outside of the allowed time
 531 4625  Logon failure for a logon attempt using a disabled account.
 532 4625  Displays the error message as seen by the user in the case or an error or exception. The error message text appears in the TextData field.
 533  4625 Logon failure. A logon attempt was made by a user who is not allowed
to log on at this computer.
 534 4625 Logon failure. The user attempted to log on with a type that is not allowed.
 535 4625 Logon failure. The password for the specified account has expired.
 536 4625 Logon failure. The Net Logon service is not active
 537 4634 Logon failure. The logon attempt failed for other reasons. In some
cases, the reason for the logon failure may not be known.
 538 4634 The logoff process was completed for a user.
 538/551 4647 A user initiated the logoff process. It is logged for Interactive and
RemoteInteractive logons in place of logoff event 538/4634.
 539 4625 Logon failure. The account was locked out at the logon
 540 4624 Successful network logon: A user successfully logged on over a
network.
 552 4648 A user successfully logged on to a computer using explicit credentials while already logged on as a different user
 638 4778 A user has reconnected to a disconnected terminal session.
 683 4625 A user disconnected a terminal session without logging off.

 

Image

 

Sample
Sample 01
Image – Top

Image – Bottom
Explanation
  1. Security ID
    • NULL SID
  2. Logon Type
    • Logon Type 3 is Network
  3. Impersonation Level
    • Impersonation
  4. New Logon
    • Security ID
      • LAB\dadeniji
    • Account Name
      • dadeniji
    • Account Domain
      • LAB
  5. Network Information
    • Workstation Name
      • DADENIJI
    • Source Network Address
      • w.x.y.z
    • Source Network Port
      • #####
  6. Detailed Authentication
    • Logon Type
      • NtLmSsp
    • Authentication Package
      • NTLM
    • Package Name (NTLM only)
      • NTLM V2
    • Key Length
      • 128

SysInternals

Process Explorer

Application Context

OLE-DB Provider can be configured to run in process or out of process.

If run in process we need to track the sql server service.

When ran out of process, we need to track via dllhost.exe

Sample

Sample – 01
Image

Explanation
  1. dllhost.exe
    • COM Class
      • MSDAINITIALIZE Class
      • c:\program files\common files\system32\ole db\oledb32.dll
      • OLEDB Core Services

References

  1. Microsoft
    • Microsoft Developer
      • SQL BI / Data Access Technologies
        • Snehadeep
          • Troubleshooting “Cannot create an instance of OLE DB provider”
            Link
    • CSS SQL Server Engineers
      • pssql
        • How to get up and running with Oracle and Linked Servers
          Link
  2. Event Viewer
    • Sans Institute
      • Windows Login Forensics
        Link

Casey Newton :- … The danger of Facebook’s focus on Groups

Background

In a broadly applicable short article Casey Newton points out the danger of group attachment…

 

Background

Author :- Casey Newton
Subject :- The Mueller indictment exposes the danger of Facebook’s focus on Groups
Web Site :- The Verge
Link

A year ago this past Friday, Mark Zuckerberg published a lengthy post titled “Building a Global Community.” It offered a comprehensive statement from the Facebook CEO on how he planned to move the company away from its longtime mission of making the world “more open and connected” to instead create “the social infrastructure … to build a global community.” He identified a number of challenges to realizing his mission, and ranking high among them was the political polarization of his user base.

“Social media is a short-form medium where resonant messages get amplified many times,” Zuckerberg wrote. “This rewards simplicity and discourages nuance. At its best, this focuses messages and exposes people to different ideas. At its worst, it oversimplifies important topics and pushes us towards extremes.”

By that standard, Robert Mueller’s indictment of a Russian troll farm last week showed social media at its worst. The special counsel filed conspiracy and fraud charges against 13 Russian nationals and three organizations as part of a widespread, multimillion-dollar effort to influence the US election. Adopting US identities and personas, they created a variety of groups and pages across Facebook, Instagram, Twitter, and YouTube for the express purpose of pushing Americans to extremes.

Facebook has estimated that 126 million users saw Russian disinformation on the platform during the 2016 campaign. The effects of that disinformation went beyond Likes, comments, and shares. Coordinating with unwitting Americans through social media platforms, Russians staged rallies and paid Americans to participate in them. In one case, they hired Americans to build a cage on a flatbed truck and dress up in a Hillary Clinton costume to promote the idea that she should be put in jail.

News of the indictments come at a time when Facebook is investing more in its products for groups. Last year, Facebook said 100 million people are in what the company callsvery meaningful” groups, or groups that are a primary part of the user’s social networking experience and extend to offline interactions. A parenting group might be very meaningful to a young family, for example. In his post last year, Zuckerberg said Facebook hoped to increase the number of people in very meaningful groups to 1 billion.

But what if those very meaningful groups are run by foreign actors working to make the country more polarized? It’s impossible to say how “meaningful” the groups Russia created were to its members, but the troll farms worked to create pages around subjects that generate the maximum level of emotion. Often, they were tied to identity. For immigration matters, there was a page called “Secured Borders.” For Black Lives Matter, there was “Blacktivist.” For religion, there were “United Muslims of America” and “Army of Jesus.” By 2016, those pages collectively had hundreds of thousands of American followers.

Russians spent thousands of dollars a month promoting those groups on Facebook and other sites, according to the indictment. They meticulously tracked the growth of their audience, creating and distributing reports on their growing influence. They worked to make their posts seem more authentically American, and to create posts more likely to spread virally through the mechanisms of the social networks.

Facebook greeted the Mueller indictment as a kind of vindication. (As did President Donald Trump, who eagerly promoted some tweets by the company’s vice president of ad products that criticized media coverage of Russian ad spending on Facebook.) “We proactively disclosed the IRA activity to the Special Counsel, Congress, and the public, and have worked with them to give the public a fuller understanding of what occurred,” said Joel Kaplan, Facebook’s vice president of global policy, in a statement. “We’re grateful the US government is now taking this aggressive action against those who abused our service and exploited the openness of our democratic process.

Kaplan added, “We know we have more to do to prevent against future attacks.” He added that the number of people working on security at Facebook would double this year, to 20,000. “We’re committed to staying ahead of this kind of deceptive and malevolent activity going forward,” he wrote.

In the meantime, the dark side of “developing the social infrastructure for community” is now all too visible. The tools that are so useful for organizing a parenting group are just as effective at coercing large groups of Americans into yelling at each other. Facebook dreams of serving one global community, when in fact it serves — and enables —countless agitated tribes. The more Facebook pushes us into groups, the more it risks encouraging the kind of polarization that Russia so eagerly exploited.

Blasphemy of the Holy Spirit

Introduction

There is a phrase that comes across in various forms, such as:

  1. Blasphemy of the Holy Spirit
  2. Unforgivable Sin

Let us see how different theologians identify and tackle it.

Bible Verses

Matthew
Unpardonable Sin ( Matthew 12:31-32 ) ( Link )

“Therefore I say to you, every sin and blasphemy [every evil, abusive, injurious speaking, or indignity against sacred things] will be forgiven people, but blasphemy against the [Holy] Spirit will not be forgiven.

Whoever speaks a word against the Son of Man will be forgiven; but whoever speaks against the Holy Spirit [by attributing the miracles done by Me to Satan] will not be forgiven, either in this age or in the age to come.”

 

Mark
Mark 3:28-30  ( Link )

“I assure you and most solemnly say to you, all sins will be forgiven the sons of men, and all the abusive and blasphemous things they say; but whoever blasphemes against the Holy Spirit and His power [by attributing the miracles done by Me to Satan] never has forgiveness, but is guilty of an everlasting sin [a sin which is unforgivable in this present age as well as in the age to come]”— [Jesus said this] because the scribes and Pharisees were [attributing His miracles to Satan by] saying, “He has an unclean spirit.”

 

Luke
Confessing Christ  – Luke 12:9-10 ( Link )

…But whoever denies Me before men will be denied before the angels of God.

And everyone who speaks a word against the Son of Man will be forgiven, but whoever blasphemes against the Holy Spirit will not be forgiven.

Vidoes

  1. Jewels of Judaism
    • Ki Teitzei
      • What is the sin that leads to death? – Ki Teitzei
        There are some verses in the Bible that are difficult to understand. 1 John 5:16 is one of those verses. What is the sin that leads to death? Watch this video now to learn a reasonable answer to this question from this week’s Torah Portion.
        Link
  2. Michael Heiser
    • What is Blasphemy against the Holy Spirit
      Channel :- Sentinel Apologetics
      Date Published :- 2017-June-9th
      Link
  3. Rob J Hyndman
    • The Watchman
      • What is blasphemy against the Holy Spirit?
        Link
  4. Jacob Prasch: Blasphemy of the Holy Spirit
    • Jacob Prasch: Blasphemy of the Holy Spirit
      Channel :- Moriel Ministries
      Published On :- 2015-April-17th
      Link
  5. Spirit Church, David Diga Hernandez
    • What is the Blasphemy of the Holy Spirit?
      Channel :- Encounter TV
      Published On :- 2016-Jan-17th
      Link
  6. Father Anthony Messeh
    • A sermon given by Father Anthony Messeh at St. Marks Coptic Orthodox Church of Washington D.C on June 27, 2010.
      Channel  :- Orthodox Sermons
      Published  :- 2011-March-10th
      Link
  7. Doug Batchelor
    • Doug Batchelor – What is the Unpardonable Sin ?
      Link
    • The Unpardonable Sin: Part 2- (Doug Batchelor) AmazingFacts ©
      Link
  8. Tim Conway
    • I will be Honest
      • The Unpardonable Sin – Blasphemy Against the Holy Spirit
        Link
  9. Matt Slick
    • What is blasphemy of the Holy Spirit? Can a Christian commit it?
      Link
  10. Don Carson
    • Don Carson on the Unforgivable Sin
      Published On :- 2016-August-3rd
      Link

 

Indepth

The Watchman ( Answered by Rob J Hyndman )

  1. Law of Moses
    • Leviticus 24:16
      • Anyone who blasphemes sin
        • Anyone who blasphemes the name of the LORD is to be put to death. The entire assembly must stone them. Whether foreigner or native-born, when they blaspheme the Name they are to be put to death.
        • Verse Link
  2. Verses
    • Matthew 12:31-32
      • 31 “Therefore I say to you, every sin and blasphemy [every evil, abusive, injurious speaking, or indignity against sacred things] will be forgiven people, but [a]blasphemy against the [Holy] Spirit will not be forgiven.
        32 Whoever speaks a word against the Son of Man will be forgiven; but whoever speaks against the Holy Spirit [by attributing the miracles done by Me to Satan] will not be forgiven, either in this age or in the age to 
    • Mark 3:28
      • Indeed, no one can enter a strong man’s house to steal his possessions unless he first ties up the strong man. Then he can plunder his house.
        Truly I tell you, the sons of men will be forgiven all sins and blasphemies, as many as they utter.
        But whoever blasphemes against the Holy Spirit will never be forgiven; he is guilty of eternal sin.”…
    • Luke 12:-11
      • But whoever denies Me before men will be denied before the angels of God.
        And everyone who speaks a word against the Son of Man will be forgiven, but whoever blasphemes against the Holy Spirit will not be forgiven.
        When you are brought before the synagogues, rulers, and authorities, do not worry about how to defend yourselves or what to say.…
  3. Consciously and deliberately showing contempt for the Power of God
    • Miracles by Holy Spirit
    • Claimed to be pagan deity
    • Considered and deliberate
    • Knew it was not true
    • Done for Political Reason

 

Jewels of Judaism

What is the sin that leads to death? – Ki Teitzei

  1. 1st John 5:6
    • If any man see his brother sin a sin which is not to death, he shall ask, and he shall give him life for them that sin not to death. There is a sin to death: I do not say that he shall pray for it.
      • Bible Hub Commentary
        Link
  2. Deuteronomy 21:
    • Bible Verse Link
      • Bible Gateway
        Link
    • Broken down
      • 18
        • “If any man has a stubborn and rebellious son who will not obey the voice of his father or of his mother, and when they reprimand and discipline him, he will not listen to them,
      • 19
        • then his father and mother shall take hold of him, and bring him out to the elders of his city at the gateway of his hometown.
      • 20
        • They shall say to the elders of his city, ‘This son of ours is stubborn and rebellious; he will not obey us, he is a glutton and a drunkard.’
      • 21
        • Then all the men of his city shall stone him to death; so you shall remove the evil from among you, and all Israel will hear of it and be afraid.
  3. How did it come to this
    • Not willing to turn from sin, which ultimately leads to death
    • Though Disciplined
    • Continuing Unrepentant Spirit
    • God wants us to wrestle with it and know the inner content

 

Spirit Church, David Diga Hernandez

  1. 2 Corinthians 5:11-12
    • Link
      • ESV
        • BibleGateway.com
          Link
    • Verses
      1. Therefore, knowing the fear of the Lord, we persuade others. But what we are is known to God, and I hope it is known also to your conscience.
      2. We are not commending ourselves to you again but giving you cause to boast about us, so that you may be able to answer those who boast about outward appearance and not about what is in the heart.
  2. Greater judgement on those who teach the word
  3. Religious people are trying to trap Christ in an enigma
  4. Casting out demons by Spirit of God
  5. Angry that he is drawing people to God
  6. Fault
    • Rejecting Power of Holy Spirit
    • Identity of Christ
  7. Attribution of the Holy Spirit Work to Demonic Spirit
    • Intentional

 

SQL Server / Linked Server – Oracle ODAC

Background

Need to do something that comes up every couple of years.

And, that it is to get SQL Server to interoperate with Oracle.

 

Options

There are a couple of Oracle Client tools that we can use.  For this particular exercise we will use “Oracle Data Access Components (ODAC)“.

 

Oracle Data Access Components (ODAC)

Download

64-bit ODAC is available here.

It was released on 2017-June-1st.

Image

Tabulate

Item 64-bit ODAC 12.2c Release 1 (12.2.0.1.0) Xcopy for Windows x64 64-bit ODAC 12.2c Release 1 (12.2.0.1.0) for Windows x64
Artifacts

 

ODP.NET_Managed_ODAC122cR1.zip – 2.98 MB
ODAC122010Xcopy_x64.zip – 77.0 MB (77 MB)
ODAC122010_x64.zip – 415 MB

 

Choice

We chose “64-bit ODAC 12.2c Release 1 (12.2.0.1.0) for Windows x64“.

Not in the mood for Xcopy and install notes.

Download File Extract

Using 7-Zip extract the compressed (zip) file.

 

Install

Install Steps

Outline

  1. Select Product Languages
    • Selected Languages
      • English
  2. Oracle Home User Selection
    • Use Windows Built-In Account
      • Implicitly chosen as “Local Service
  3. Specify Installation Location
    • Oracle Base
      • E:\app\oracle\client
    • Software Location
      • E:\app\oracle\client\product\12.2.0\client_1
  4. Available Product Components
    • Here are the components with the ones chosen checked
      • Oracle Data provider for .Net
      • Oracle Providers for ASP.Net
      • Oracle Provider for OLE DB 
      • Oracle Services for Microsoft Transaction Server 
      • Oracle Data Access Components for Visual Studio
      • Oracle Data Access Component Samples
  5. DB Connection Configuration
    • Skipped for later
    • Will manually update the tnsnames.ora file once install is done
  6. Perform prerequisite checks
    • Nothing to do the system performs check
  7. Summary
    • Review Settings
      • Source Locaton
      • Install Type
      • Oracle Home Location
      • Oracle Home User Selection
  8. Install Product
  9. Finish

 

Image

Select Product Languages

Oracle Home User Selection

Specify Installation Location
Original

Revised

 

Available Product Components
Original

Revised

 

DB Connection Configuration

 

Perform Prerequisite Checks

Summary

 

Install Product

 

Finish

 

Configuration

TNSNAMES.ORA


hrdb =
(
	DESCRIPTION =
	(ADDRESS_LIST =
		(
                   ADDRESS = 
                           (PROTOCOL = TCP)
                           (HOST = hrdbORCLProd)
                           (PORT = 1521)
                )
	)
	(CONNECT_DATA =
		(SERVICE_NAME =hrdb)
	)
)

 

Configuration

Component Services

There are two levels of Component Services that we need to review and configure.

Those two areas are computer and individual component(s).

 

Definitions

 

Group Item Definition
Authentication Level
Connect The normal authentication handshake occurs between the client and server, and a session key is established but that key is never used for communication between the client and server. All communication after the handshake is nonsecure.
Impersonation Level
Identify The system default level. The server can obtain the client’s identity, and the server can impersonate the client to do ACL checks.
Connect The normal authentication handshake occurs between the client and server, and a session key is established but that key is never used for communication between the client and server. All communication after the handshake is nonsecure.
Permission Types
Launch & Activation Permission Launch and Activation permissions governs who can launch and activate DCOM Objects.
Access Data from the sourced provider needs to be marshalled into SQL Server.
This is performed through the SQL Server Process Account.

 

 

Launch Component Services

Please launch “Component Services” from Control Panel \ Administrators group.

 

Configuration – Computer

Objective

This section deals with the computer’s configuration and the default configuration for components.

And, will serve as the component’s setting unless otherwise over-written for the specific component.

Steps
  1. Tab – Default Properties
    • Enable Distributed COM on this computer
      • Enabled
    • Default Distributed COM Communication Properties
      • Default Authentication Level
        • Connect
          • Connect (RPC_C_AUTHN_LEVEL_CONNECT) ( Link )
            • The normal authentication handshake occurs between the client and server, and a session key is established but that key is never used for communication between the client and server. All communication after the handshake is nonsecure.
      • Default Impersonation Level
        • Identify
          • identify (RPC_C_IMP_LEVEL_IDENTIFY) ( Link )
            • The system default level. The server can obtain the client’s identity, and the server can impersonate the client to do ACL checks.
        • Impersonate
          • impersonate (RPC_C_IMP_LEVEL_IMPERSONATE) ( Link )
            • The server can impersonate the client’s security context while acting on behalf of the client. The server can access local resources as the client. If the server is local, it can access network resources as the client. If the server is remote, it can access only resources that are on the same computer as the server.
  2. Tab – COM Security
    • This area governs limits and defaults for components where they have not been explicitly defined for specific components
    • Permission Types
      • Launch and Activation Permission
        • Launch and Activation permissions governs who can launch and activate DCOM Objects
      • Access Permissions
        • Data from the sourced provider needs to be marshalled into SQL Server.
          This is performed through the SQL Server Process Account.
    • Permission Properties
      • Limits
        • Defines Limits for “Access” and define limits for “Launch and Activation
      • Default
        • Defines Default for “Access” and define default for “Launch and Activation

 

Image
Image – Tab – Default Properties

 

Configuration – Component – MSDAInitialize

Objective

In this section we cover our principal component, MSDAInitialize.

What is MSDAInitialize?
Snehadeep Chowdhury

Let us roll with Snehadeep Chowdhury on this one:

Permissions needed to set up linked server with out-of-process provider
Link

MSDAINITIALIZE is a COM class that is provided by OLE DB. This class can parse OLE DB connection strings and load/initialize the provider based on property values in the connection string.

MSDAINITILIAZE is initiated by users connected to SQL Server. If windows authentication is used to connect to SQL Server, then the provider is initialized under the logged in user account. If the logged in user is a SQL login, then provider is initialized under SQL Server service account.

 

Permission Set
Snehadeep Chowdhury

He continues…

Based on the type of login used, permissions on MSDAINITIALIZE have to be provided accordingly.

There are certain permissions that have to be set on MSDAINITIALIZE to be able to initialize the provider out-of-process and run linked server queries successfully locally and remotely.

Steps

Again, launch Component Services and from the “DCOM Config” list, please choose MSDAInitialize.

Outline
  1. Tab – General
    • Application Name :- MSDAINITIALIZE
    • Application ID :- 2206CDB0-19C1-11D1-89E0-00C04FD7A829
    • Application Type :- Local Server
  2. Tab – Security
    • Group Boxes
      • Launch and Activation Permissions
        • Initial
          • System ( Local Launch, Remote Launch, Local Activation, and Remote Activation )
          • Administrators ( Local Launch, Remote Launch, Local Activation, and Remote Activation )
          • Interactive ( Local Launch, Remote Launch, Local Activation, and Remote Activation )
        • Augment
          • Add specially crafted Active Directory Group
            • Grant
              • Local Launch
              • Local Activation
            • Leave as is
              • Remote Launch
              • Remote Activation
          • Add SQL Server Engine Account
            • Grant
              • Local Launch
              • Local Activation
            • Leave as is
              • Remote Launch
              • Remote Activation
      • Access Permissions
        • Initial
          • Self ( Local Access and Remote Access )
          • System ( Local Access )
          • Administrators ( Local Access and Remote Access )
        • Augment
          • Account running SQL Server Services
            • SQL Server Engine
            • SQL Server Analysis Services
      • Configuration Permissions
        • Left as is
Images
Image  – Tab – General

 

Image  – Tab – Security – Original

The original setting is to use default settings set for the computer.

Image  – Tab – Security – Launch And Activation permissions
Image  – Tab – Security – Launch And Activation permissions ( Original )

SYSTEM, Administrators, and Interactive have access.

Image  – Tab – Security – Launch And Activation permissions ( Add Users & Groups )

Here we are adding users from our local “Distributed COM Users” group.

 

Image  – Tab – Security – Launch And Activation permissions ( Revised )

Local “Distributed COM Users” group granted Local Launch and Local Activation permission.

SQL Server Engine Account granted Local Launch and Local Activation permission.

 

Image  – Tab – Security – Access permissions
Image  – Tab – Security – Access permissions ( Original )

SELF, SYSTEM, and Administrators have full Local and Remote Access.

 

Image  – Tab – Security – Launch And Activation permissions ( Add Users & Groups )

Here we are adding the account that is running the SQL Server Service…

 

Image  – Tab – Security – Access Permissions ( Revised )

Granted the SQL Server Engine Service Account, “Local Access” permission to the MSDAInitialize Object.

SQL Server Management Studio ( SSMS )

Linked Server

Linked Server Providers

Reviewed the providers under Linked Server.

Objective

We want to make sure that OraOLEDB.Oracle is listed

Image

Objective – Configure Provider – Configuration

We want to make sure that the “Oracle Provider for OLE DB” provider option is configured as follow:

  1. Allow in-process
    • Enable

 

Image – Before

Image – After

 

Linked Servers
Tab – General

Tab – Security
Tab – Security –  Image

Tab – Security – Code – SQL

declare @server sysname
declare @remoteAccount varchar(30)
declare @remoteAccountPassword varchar(30)

set @server = 'PRD'
set @remoteAccount = 'mssql'
set @remoteAccountPassword = 'helloPWD'

EXEC sp_addlinkedsrvlogin @server
		, 'false'
		, 'LAB\dadeniji'
		,  @remoteAccount
		,  @remoteAccountPassword

 

Tab – Server Options
Tab – Server Options – Image

Linked Server – Test Connectivity
sp_testlinkedsever
Syntax

declare @server sysname

set @server = 'HRDB';

exec sp_testlinkedserver 
		@server = @server

Output

Linked Server – Data Dictionary
sp_tables_ex

List objects on remote server.

Syntax
declare @server sysname
declare @tableType sysname

set @server = 'HRDB';
set @tableType = 'TABLE'

-- exec sp_help sp_tables_ex
exec sp_tables_ex
@table_server = @server
, @table_type = @tableType

Output

TroubleShooting

ODBC

Here ODBC is your friend.

Please launch ODBC Administrator from Control Panel Administrator Applet

Review

Tab – Drivers

Review list of drivers

You want to make sure that:

  1. Name : – OracleinOraClient12
    • Based on version installed
  2. Version :-
    • Version :- 12.02.00.01
      • Based on the version we installed
  3. File :- SQORA32.dll
  4. Date
    • 3/7/2017
      • Based on the version we installed

 

Configure

System Data Sources
Add / Manage/ Test Data Source

Test Connection

Test Connection – Connection Successful

Test Connection – Connection Failed
Image

Textual

ORA-01017 : invalid username/password; logon denied

 

Oracle

TNSPING

TNSPING is not installed with ODAC, but if able to get and install it, it is invaluable.

Syntax


tnsping HRDB

 

Output

Output – Image

Output – Successful

TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 16-FEB-2
018 14:53:25

Copyright (c) 1997, 2010, Oracle.  All rights reserved.

Used parameter files:
E:\app\Oracle\product\11.2.0\client_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = hrdbprod.lab)(PORT = 1521))) (CONNECT_DATA = (S
ERVICE_NAME = hrdbprod)))
OK (160 msec)

C:\>

Microsoft

Modules Loaded

Let us make sure that the Oracle components are loaded into the SQL Server Memory Address Space.

tasklist
syntax

tasklist /m /fi "Imagename eq sqlservr.exe"

output

Explanation

We see the Oracle specific dlls coming up at the rear of our list.

The file names being:

  1. OraOLEDB12.DLL
  2. OraOLEDBgmr12.dll
  3. OraOLEDBrst12.dll
  4. OraOLEDButl12.dll
  5. OCI.dll
  6. OraOCIEI12.dll
  7. oraons.dll
  8. OraOLEDB12us.dll
  9. OraOLEDBpus12.dll
Sysinternals – process Explorer

Summary

There is a lot here.

Most of all it unnecessary.

But, since it is something I only do every few years, it is good to be open minded and see how things have changed; especially in terms of commentary by “Do Good” bloggers.

 

Reference

  1. Microsoft
    • Microsoft Developer
      • SQL BI / Data Access Technologies
        ( SSIS, SSRS, SSAS, Data Access, SSMA, LINQ, System.Data … )

        • Sneha Deep Chowdhury ( Snehadeep )
          • Permissions needed to set up linked server with out-of-process provider
            Link
    • Windows Dev Center
      • Security in COM > Security Values > Delegation and Impersonation
        • Impersonation Levels
          Link
  2. National Instruments
    • NI Test Stand
      • DCOM Settings for the Remote Computer for Accessing Synchronization Objects Remotely
        Link
  3. OSISoft
    • Tech Support
      • KB01144 – How to set up a PI OLEDB or PI OLEDB Enterprise Linked Server to run out-of-process
        Link
  4. Cody Konior
    • MSDAINITIALIZE minimum required permissions
      Link

 

.Net / Error “log4net:ERROR [AdoNetAppender] Failed in DoAppend System.TypeInitializationException: The type initializer for ‘log4net.GlobalContext’ threw an exception”

Background

Ran into a nice easy to fix error.

Error

Here is the error:

Image

Text


-- More  -- log4net:ERROR [AdoNetAppender] Failed in DoAppend
System.TypeInitializationException: The type initializer for 'log4net.GlobalContext' threw an exception. ---> System.Con
figuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.Configurati
onErrorsException: Only one <configSections> element allowed per config file and if present must be the first child of the root <configuration> element. 
(hello.exe.Config line 11)
   at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
   at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
   at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
   --- End of inner exception stack trace ---
   at System.Configuration.ConfigurationManager.PrepareConfigSystem()
   at System.Configuration.ConfigurationManager.GetSection(String sectionName)
   at System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName)
   at System.Net.Configuration.SettingsSectionInternal.get_Section()
   at System.Net.Sockets.Socket.InitializeSockets()
   at System.Net.Dns.GetHostName()
   at log4net.Util.SystemInfo.get_HostName()
   at log4net.GlobalContext..cctor()
   --- End of inner exception stack trace ---
   at log4net.GlobalContext.get_Properties()
   at log4net.Core.LoggingEvent.CreateCompositeProperties()
   at log4net.Core.LoggingEvent.CacheProperties()
   at log4net.Core.LoggingEvent.FixVolatileData(FixFlags flags)
   at log4net.Appender.BufferingAppenderSkeleton.Append(LoggingEvent loggingEvent)
   at log4net.Appender.AppenderSkeleton.DoAppend(LoggingEvent loggingEvent)



 

TroubleShooting / Remediation

Error Message

The key data from our error message is highlighted below:

System.TypeInitializationException: The type initializer for ‘log4net.GlobalContext’ threw an exception. —>
System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize —> System.Configuration.ConfigurationErrorsException:
Only one <configSections> element allowed per config file and if present must be the first child of the root <configuration> element.
(hello.exe.Config line 11)

 

Configuration File

[app].config

Original


<?xml version="1.0" encoding="utf-8" ?>
<configuration>

    <appSettings>
        <add key="fileDebug" value="debug" />
    </appSettings>
  
    <configSections>
        

<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
    </configSections>
    
    <log4net debug="false">
       
        <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender" >
            <layout type="log4net.Layout.PatternLayout">
                <conversionPattern value="%message%newline" />
            </layout>
        </appender>

        ....
        ....

Revision


<?xml version="1.0" encoding="utf-8" ?>
<configuration>

    <!--
        <appSettings>
            <add key="fileDebug" value="debug" />
        </appSettings>
    -->  
    
    <configSections>
        
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
    </configSections>
    
    <log4net debug="false">
    

        <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender" >
            <layout type="log4net.Layout.PatternLayout">
                <conversionPattern value="%message%newline" />
            </layout>
        </appender>
               
         
    </log4net>

    <!-- moved here on 2018-02-13 by dadeniji --> 
    <appSettings>
        <add key="fileDebug" value="debug" />
    </appSettings>
    
</configuration>

 

Summary

Again, the fix is to make sure that nothing comes before the configSections element/section in our App’s configuration file ( *.exe.config).

Log4Net just happens to be the scapegoat here…