Asking questions, following them up

November 8, 2016

Hello Guys

Not all situations, however for certain interesting cases, I spend loads of time out of my professional and personal life to nail down the concerns, situations you highlight through the comments and I feel neglected and insulted when YOU don’t respond to my queries on timely manner. No, it doesn’t mean I am not going to respond to your specific questions, however I may not follow up the progresses you have made unless I see a keen involvement.

Further, many instances I contact you through the emails provided with your comments and other than 1-2 instances, I have never received replies. I send you emails to insure that your private information are not being visible through the comments area. Hence, please make sure that you will be using regularly used email accounts while commenting or asking questions.

Please follow the below guidelines if you are keen about getting answered

  • Provide me an email address that you are frequently checking
  • Regularly check for the comment replies (You get a notification on email when I reply to your comment)

If I am not supported by YOU as the initiator, please be informed that, I do have better things to do :)

Sorry for the “Attitude”, however, that is going to save me some precious time!

regards,

 

 

Advertisements

Posting Code Blocks with your free WordPress Blog

February 27, 2015

Please visit https://en.support.wordpress.com/code/posting-source-code/ for detailed information about how to post source code blocks with your free wordpress.com blog.
A tip from me: Have a look at the source code of wordpress support page opened ;) you “MAY” get more ideas. Okay I didn’t say that!
Let us look at some samples:

1

Will produce the below, syntax highlighted code block for you

your code here

2

Refer the above image, the usage of additional tags within the code tag will syntax highlight a short VB script, avoiding the gutter (line numbers)

Public Class Form1
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Dim xmlFile As XmlReader
        xmlFile = XmlReader.Create("MyVMS.xml", New XmlReaderSettings())
        Dim ds As New DataSet
        ds.ReadXml(xmlFile)
        DataGridView1.DataSource = ds.Tables(0)
        DataGridView1.Columns(0).HeaderText = "Id"
        DataGridView1.Columns(1).HeaderText = "VM Name"
        DataGridView1.Columns(2).HeaderText = "Shutoff Mode"
  
    End Sub
End Class

Avoid leaving spaces between tags inside “code” tag, as doing so could totally mess-up the code blocks. Just put everything tightly spaced like following

language=”VB” gutter=”false”, there are no spaces between language & = or = & the opening ”

The language (or lang) parameter controls how the code is syntax highlighted. The following languages are supported:

  • actionscript3
  • bash
  • clojure
  • coldfusion
  • cpp
  • csharp
  • css
  • delphi
  • erlang
  • fsharp
  • diff
  • groovy
  • html
  • javascript
  • java
  • javafx
  • matlab (keywords only)
  • objc
  • perl
  • php
  • text
  • powershell
  • python
  • r
  • ruby
  • scala
  • sql
  • vb
  • xml

If the language parameter is not set, it will default to “text” (no syntax highlighting).

Code in between the source code tags will automatically be encoded for display, you don’t need to worry about HTML entities or anything.

Configuration Parameters

The shortcodes also accept a variety of configuration parameters that you may use to customize the output. All are completely optional.

  • autolinks (true/false) — Makes all URLs in your posted code clickable. Defaults to true.
  • collapse (true/false) — If true, the code box will be collapsed when the page loads, requiring the visitor to click to expand it. Good for large code posts. Defaults to false.
  • firstline (number) — Use this to change what number the line numbering starts at. It defaults to 1.
  • gutter (true/false) — If false, the line numbering on the left side will be hidden. Defaults to true.
  • highlight (comma-seperated list of numbers) — You can list the line numbers you want to be highlighted. For example “4,7,19”.
  • htmlscript (true/false) — If true, any HTML/XML in your code will be highlighted. This is useful when you are mixing code into HTML, such as PHP inside of HTML. Defaults to false and will only work with certain code languages.
  • light (true/false) — If true, the gutter (line numbering) and toolbar (see below) will be hidden. This is helpful when posting only one or two lines of code. Defaults to false.
  • padlinenumbers (true/false/integer) — Allows you to control the line number padding. true will result in automatic padding, false will result in no padding, and entering a number will force a specific amount of padding.
  • title (string) — Set a label for your code block. Can be useful when combined with the collapse parameter.

regards,

rajesh


Windows7bugs | Script Copying Instructions

November 9, 2014

Hello guys

Once in a while we receive complaints about scripts copied from our blog causing issues. We regret those issues and apologizing to everyone who suffered due to. Our blog is totally free until date and unfortunately, different browsers behave differently while parsing the code tags.

We were using

 [ code ] [ /code ]

tag for long time, found that few scripts getting totally messed up with double quotes being showsn and &quote etc. This has forced us to start using

[ sourcecode ] [ /sourcecode ] 

and realized if we have more than one block of scripts, the 2nd and consecutive scripts blocks being totally garbled.

With reference to above said, we request you to kindly make sure that the scripts those you copy from our posts are thoroughly checked for special characters prior applied. Especially registry related scripts as such attempts could completely wreck your Windows registry databases.

We hope you read us clearly and continue supporting us.

Regards,


WordPress Themes | A simple hack for hiding static header

January 29, 2019

Update: 29-Jan-2019

After the hack(s) below, I realized that the X-Business Plus theme has 15px white space between the header and content sections. It took a while to crack it, well finally I was able to patch the style.css file to fix that last “annoyance” also (These hacks are applicable to most of the themes available in the market, only few name changes inside the style.css files and different names for functions those are called)

White space fix. Copy the style.css file to a new file (for backup)

Open the style.css file with a decent text editor like “Notepad++”

Go to # Content & locate the following code

.page-content,
.entry-content,
.entry-summary {
margin: 15px 0 0;
}

Change the same to something like following:

.page-content,
.entry-content,
.entry-summary {
/* margin: 15px 0 0; Margin value was changed by Rajesh on 29th Jan 2019 to fix the white space between header and page content */
margin: 0 0 0;
}

Save the CSS file & you are all good. Enjoy ;)

Hi guys

Recently we decided to revamp our Joomla based corporate website & as we don’t do any e-commerce stuff through our existing website, chose “WordPress” for the CMS

After cross examining couple of dozen WordPress themes, we decided to go with “X Business Plus”, that looked apt for our requirements. The biggest challenge came when we started designing pages for our subsidiary companies. All looked good, except the Header region that didn’t have a toggle switch to show or not to show on specific pages and much of the header region was not necessary for the business pages, except the main menu.

The developer has confirmed that, with the current release of their theme, it is not doable and the ONLY possible solution in front of me was to “hack” the theme to achieve what we were planning (We have had another option, go with another theme that supports toggling the header on and off for specific pages)

After couple of google searches I landed on this page https://developer.wordpress.org/reference/functions/get_header/ & decided to give it a try.

Step #1

Create a new template. Every theme that you install will have standard structure(as far I know) & the templates those you associate with pages are available under

“wp-content\themes\<<theme-name>>\templates” path.

Following instructions about how to copy a template to new one, I copied the full-width-page.php to a new PHP file called corp-width-page.php & changed the name of the template within the newly created template file.

Although it looks like another comment, Template Name: is the string that WordPress reads to populate the available templates for the page. Notice the get_header(‘corp’) call within the 1st PHP block. I will come to that later. Once after the new template created, I copied the existing header.php to “header-corp.php” (This is in reference to the guidelines I obtained from WordPress developer document, that I mentioned earlier in this post)

Whatever string you will add after “header-” will be read by the template for the header part & that is the real hack. So in our case “corp” string forces the get_header() function to look for a header file named “header-corp.php” and if found, loads it, else loads the default header.php file!

Once after creating the new header-corp.php file, I started commenting do_action calls one after another until I came to the intended result…”hide the header on chosen pages”

So here is how it works. Open the page that you don’t want to see the theme header, change the page template to your newly defined template name. My case “Corporate Page” (Use WordPress’s “Edit” to make this change, which is neat and less confusing than a professional editor like Elementor)

Update the page. My new template is already calling ‘corp’ header page through get_header() function call, which has limited actions to suite the requirements.

One major issue I had with such a hack was, the header section was having the site’s primary menu. By not displaying the header, we lost access to the menu. So I had to add a navigation menu with every page that didn’t show the header. Easily doable with “Elementor” and navigation menu element.

Beside the thrill of another “hack”, I am eager to know how these hacks will affect the site when the theme is updated by the developer in the future. So to save some frustration, I have made a copy of everything that I copied and altered and kept in a safe place…who knows that would be waiting for me :)

regards,

rajesh


Oracle APEX 18.x Installation | Windows

January 27, 2019

Hello guys

Referenced documents:

https://matthiashoys.wordpress.com/2012/04/06/uninstallation-of-apex-from-a-default-oracle-11gr2-database/

https://www.oracledbwr.com/oracle-apex/oracle-application-express-18-1-installation/

Let us see how Oracle APEX (Which will eventually replace Oracle FORMS (regardless whether you like that fact or not) for small to medium applications) could be installed on your Windows 10/Server this time.

We’ll be trying the latest version of ORACLE APEX 18.2 & Windows 10 Pro running the latest version 1809 (as on date, fully patched) and Oracle database 11g R2 (11.2.0.4). Oracle depends upon VC++ components loads, so make sure your Windows box is fully patched.

Step #1

Download Oracle APEX installer from APEX repository. Please note, for APEX 18.x, you MUST have 11G R2 11.2.0.4 or later database. 11g R2 11.2.0.4 is only available for customers with valid support, hence if you are a student, freelancer, you best bet is 12c database, that is still freely available to download.

Step #2

Unzip the downloaded .zip file to a finely structured directory. For example, you can extract the zip file to D:\APEX, that will create another “apex” folder within “D:\APEX\”. Check the attached image

I usually keep all the Oracle Installers under a single folder, called “D:\Oracle_Installers”. So basically the rest of the instructions, I will be using the same directory structure. Please don’t get confused.

Step #3

Switch to the apex folder from an elevated command prompt, in my case to “D:\Oracle_Installers\apex_18.2\apex”. Source the database environment (eg: SET ORACLE_SID=ORCL) in case if you have multiple Oracle products installed in the same box

Step #4

Start SQLPLUS as sysdba

A default installation of 11g R2 installs APEX, which you should remove at this stage. If you are too eager to know which version is installed, you my run the following query

select version from dba_registry where comp_id='APEX';

If you haven’t removed the APEX installation, it should return you a row with installed version information of APEX

You should remove the existing APEX prior installing the 18.x version(s). To remove the installed version, please execute as following

@apxremov.sql

Wait for the uninstallation to complete, exit SQL and start SQLPLUS once again as sysdba (Mandatory)

Now we can start the installation of APEX 18.x. Prior starting the installation let us create a dedicated tablespace for APEX.

CREATE TABLESPACE APEX DATAFILE 'D:\ORADATA\ORCL\apex01.db' SIZE 1G;

Now execute the SQL for installing APEX 18.x

@apexins APEX APEX TEMP /i/

(Note the forward slash "/")

Wait for the installation to finish. My box has a SSD, hence the installation completes in few minutes time (3-5 minutes I believe). It may take bit more time, depending upon the hardware resources available.

Once the installation completes successfully, we have to configure the APEX. To configure execute “apex_epg_config.sql” that is available in the current path. Please note, here is the catch, as with the installation, Oracle expects forward slashes around the parent folder where you have the image files. So, I have extracted the installation files to “D:\Oracle_Installers\apex_18.2\” & this is the PARENT directory for apex installer. Hence we will call the EPG script as below (correct your path appropriately)

@apex_epg_config.sql D:/Oracle_Installers/apex_18.2/

(Note all back slashes are replaced with forward slashes)

Once the script finally exists after successfully copying the image files to APEX repositories, you need to unlock the following Oracle database schemas

ALTER USER anonymous ACCOUNT UNLOCK;
ALTER USER xdb ACCOUNT UNLOCK;
ALTER USER apex_public_user ACCOUNT UNLOCK;
ALTER USER flows_files ACCOUNT UNLOCK;

Now, go ahead with the last configuration by executing

@apxconf.sql

This script will ask for ADMIN user details, Select ADMIN as admin user and provide an email address. Please note, you must provide a punctuation symbol for the password and allowed punctuations are as below

(!"#$%&()``*+,-/:;?_).

That’s all folks. If there are no errors, you are all good to go. You may need to configure your database server for better performances, which we will discuss bit later.

Now try to access the APEX installation. Unless you have changed the ports, you should able to access the portal by visiting http://localhost:8080/apex/apex_admin

regards,

rajesh


Uninstallation of APEX from a default Oracle 11gR2 database

January 27, 2019

Matthias Hoys

Environment: Oracle Linux 6.2, Oracle database 11gR2 11.2.0.3, APEX 3.2.1

If you use the graphical dbca utility to create a new Oracle 11gR2 database, you will have noticed that this includes Application Express by default, and there is no way to deselect that option (to my knowledge) during the installation process. Here I will explain how you can remove APEX from the 11g database after the installation.

First, you need to figure out what version of APEX is installed. You can do this by looking at the name of the APEX_xxxxxx schema, or by executing the following query (with user SYS as SYSDBA):

SQL> select version from dba_registry where comp_id=’APEX’;

VERSION
——————————————————————————–
3.2.1.00.12

Next, you need to download the exact same version of the software (in this case: version 3.2.1) from Oracle’s website. The last version of APEX as of writing is 4.1.1, but the uninstallation won’t work with…

View original post 147 more words


Oracle Linked Server | MS SQL

December 31, 2018

Hi guys

As Organizations grow, will end up with multiple software solutions taking care of different areas of the business. Based on the availability, there would be situations where business will end up with different database technologies and data exchanges between such will become a mandatory element to avoid duplication and additional efforts.

Today we will discuss about a requirement that involves MS SQL Server and Oracle database. While Microsoft has well established solutions called as Linked Servers, that allows the MS SQL to connect with heterogeneous database technologies, Oracle’s approach is pretty tedious and may require more efforts that one could anticipate. Yes, I am talking about Oracle “Golden Gate”, which allows an Oracle database to access other database technologies through a “gateway”

Instead of discussing the complex “Golden Gate”, we will see how simple (& complex at the same time) it is to setup Linked Servers from Microsoft SQL Server (for Oracle)

Install the client

Depending upon your OS architecture(32Bit/64Bit), you need to install the appropriate Oracle client. I suggest, install 64Bit Oracle Client on 64Bit OS and 32Bit client over 32Bit OS. You save loads of efforts by doing so. I always do a full installation of the Oracle client and later add missing components those are mandatory for “Distributed Transactions”. So what is a distributed transaction?

  • Your MS SQL Database table receives a row (record)
  • Your expectation is to replicate the same row to Oracle table
  • You have an “after insert” trigger defined with the MS SQL Table

A full installation of Oracle client (Administration) doesn’t install the mandatory component to facilitate the above requirement. You must install “Oracle Services for Microsoft Transaction Server” in order to do such a distributed transaction from MS SQL to Oracle database, after invoking the Client Installer. Make sure while the installer kicks in, you select the already existing Oracle home to make sure that the installation will not create another home for the additional components those you will install. Cross check whether the Oracle OLE DB driver is installed & install the Oracle Services for Microsoft Transaction Server component.

Analyze your Oracle provider and make changes to the stack

Make sure your provider, in our case, “OraOLEDB.Oracle” is configured prior you create linked servers.

Enable the following options

  • Allow inprocess
  • Nested Queries
  • Support “Like” operator

and disable

  • Index as access path. Disabling this option is mandatory for “Distributed Transaction”. If your Oracle table has indexes and this option is not disabled, an insert attempt from table trigger will fail with the following error

The OLE DB provider “OraOLEDB.Oracle” for linked server “ERPPROD” returned a “NON-CLUSTERED and NOT INTEGRATED” index “XXFPPUNCHM_N1” with the incorrect bookmark ordinal 0.

Create a linked Server

Right click on the “Linked Server” node and select “New Linked Server…”. I am providing you details of a linked server that is already created at my end. Adjust your linked server details accordingly. Make sure, the Oracle client installation folder is your “PATH” & that the tnsnames.ora file has an entry for the Oracle service (that you will enter in “Provider string” column.

If you have entered the mandatory elements correct, you have successfully created a linked server. If anything goes wrong you will be prompted about it, and address them. Please note, you can always revisit and change the Server options at later stages. However, options under “General” cannot be modified. If requires modifications, you need to drop and recreate the linked server once again.

Test the newly created linked Server

The actual issues starts from now. Please note, my laptop that I use for all developments has multiple versions of Oracle database and clients installed in addition to .Net development tools, Android, PHP etc to name few. If you are planning to implement the linked server solution for a production environment, make sure you have only one Oracle product installed along with MS SQL server. On the other hand you are going to have end number of complexities, few of which are not easily addressed.

For example, my development machine has:

  • Oracle database 11g
  • Oracle Client 12c (12.1)
  • Oracle Database 12c (12.2)

Which is a more than complex situation to address when it is all about MS SQL linked servers. One of the toughest issues to address is the following error

The OLE DB provider “OraOLEDB.Oracle” for linked server “” supplied inconsistent metadata for a column. The column “” (compile-time ordinal 2) of object “””.””” was reported to have a “DBCOLUMNFLAGS_ISFIXEDLENGTH” of 16 at compile time and 0 at run time.

It took me almost 1.5 days to figure out what could be wrong as a simple SQL query like following against the newly created linked server continuously provided me the above error.

Select count(*) from [ERPTEST]..[APPS].[XXFPPUNCHM]
go

I’ve come across a post over stackoverflow.com which said, this could be due multiple Oracle products being installed in the same box & there were few instructions to overcome, which didn’t workout for me. However, I was successful with the production server, in which I only had the Oracle 11g client installed. To insure the real time replication of the data from MS SQL to Oracle database, I had to alter few registry values & restart the server. To my utter surprises, the same scenario I tested over three different boxes & all three experiences were different from each other.

  • The production server where I have SQL Server 2014 standard edition would not post rows to Oracle database, that is a part of “Distributed Transaction” without the registry hacks.
  • My development laptop wouldn’t even fetch rows from Oracle database without tweaking the PATH environment element & registry with proper .dll paths
  • My home PC does everything without having to tweak the path of registry where I have almost the same setup like my development laptop. The ONLY one difference with my home PC is, instead of Oracle client 12c, I have 11g client.

Now we will address each of such situations. Please note, the following exercises require you to make registry changes, so please make sure that you take a full backup of the registry prior attempting any given possible solutions. (If you are having ONLY one Oracle product installed (Database or Client, please move to Step#2 )

Step#1: Register Oracle OLEDB driver (This is to insure that we are using the same stack across the solution). Only one version of OLEDB driver could be activated at a time, regardless how many Oracle products are installed. If you had 12c installed after 11g, you must be having the 12c OLEDB driver activated.

From an elevated command prompt, switch to Oracle Client/Database BIN folder (eg: D:\oracle\product\11.2.0\dbhome_1\BIN)

Issue the following command

regsvr32 OraOLEDB11.dll

This should register the OLE DB driver for you.

Step#2: Check your OS PATH environment element, your client/database bin path must be the first Oracle product entry, eg:

This will insure that tnsnames.ora will be sought in this path, in addition to Oracle dlls. As we are using Oracle database 11g as the first product from the list of other Oracle products installed in the environment element PATH (refer the image above), we will hack the registry with all elements related to the specific product (Again, please make a backup of the registry, minimum the specific key)

Registry key: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI

Refer the image above and adjust the entries as per your Oracle installation. Once the registry is modified, restart your computer (mandatory)

Once the box restarted, try to insert a row into the Oracle table. Example

insert into [PRODBAK]..[APPS].[XXFPPUNCHM]
(PUNCH_TIME,MACHINE_NAME,EMPLOYEE_NUMBER,PUNCH_TYPE)
VALUES(GETDATE(),'IT Office','0046','0')
go

SQL Management studio must stop complaining about “The OLE DB provider “OraOLEDB.Oracle” for linked server “” supplied inconsistent metadata for a column. The column “” (compile-time ordinal 2) of object “””.””” was reported to have a “DBCOLUMNFLAGS_ISFIXEDLENGTH” of 16 at compile time and 0 at run time.” right after setting up the correct .dll files and the relevant paths in the registry.

Now create your table trigger, through which you want to push a row to the Oracle table. A simple after insert trigger could be defined like following:

create trigger addRecordsToERPTable2 on [UNIS].[dbo].[tRajesh]
after insert
as
begin
insert into [PRODBAK]..[APPS].[XXFPPUNCHM]
(PUNCH_TIME,MACHINE_NAME,EMPLOYEE_NUMBER,PUNCH_TYPE)
Select PUNCH_TIME,MACHINE_NAME,EMPLOYEE_NUMBER,PUNCH_TYPE
FROM inserted
end
go

Step#3: Now we will try to initiate a “Distributed Transaction” with the new registry and other hacks

You may come across an error while a distributed transaction is initiated, Management Studio complaining about “Msg 8501, Level 16, State 3, Procedure addRecordsToERPTable2, Line 13
MSDTC on server ” is unavailable.” This is a pretty simple error to address. Open the Windows Services & check whether the service “Distributed Transaction Coordinator” has started. My development machine initially had this service startup mode set as “Manual”, I changed it to “Automatic delayed start” and started the service. Adjust according to your situation.

Basically the above few things should address most of the common issues you would face with Oracle Linked Server from MS SQL.

Finally, Oracle clearly states, there are limitations using their driver for Linked Servers from MS SQL. So, expect for unexpected while using such a setup. For me, it was simple transactions. If you are expecting rapid replications based on complex business requirements, please do test your scenarios as much as possible prior adapting the above hacks.

regards,

rajesh



The OLE DB provider “OraOLEDB.Oracle” for linked server “” returned a “NON-CLUSTERED and NOT INTEGRATED” index “” with the incorrect bookmark ordinal 0

December 29, 2018

My Blog

The good thing with linked servers is, you can write queries to fetch the data from a remote server (via linked) in your sql procedures and more.

We happened to test the connectivity of a oracle server due to an upgrade. When a new Linked server connection is created using the UI and ran a sql to fetch the data from a oracle table, Sqlserver connection throw ed an error message

Msg 7319, Level 16, State 1, Line 1
The OLE DB provider “OraOLEDB.Oracle” for linked server “ORACLEUAT” returned a “NON-CLUSTERED and NOT INTEGRATED” index “O_AD_EM” with the incorrect bookmark ordinal 0.

The solution to this problem is to force the oracle indexes to be ignored by changing the option “Index as access path” on the OraOLEDB.Oracle provider.

NONCLUSTEREDandNOTINTEGRATED

View original post


OLE DB provider “OraOLEDB.Oracle” for linked server “” returned message “New transaction cannot enlist in the specified transaction coordinator.”

December 27, 2018

Hi guys

A pretty long title? Well, recently I came across a situation where I needed a trigger with MS SQL server table to insert some information into our Oracle database.

The MS SQL Server is hosted in a Windows 64 bit OS, with Oracle 11g 64Bit client installed (For 64Bit OS, you must install Oracle client 64Bit for the Oracle OLEDB provider)

I did some sample inserts using the Management studio and created a trigger like following with one of the sample tables:

create trigger addRecordsToERPTable on [UNIS].[dbo].[tRajesh]
after insert
as
begin
  insert into [XYZ].[APPS].[XXFPPUNCHM] 
  (PUNCH_TIME,MACHINE_NAME,EMPLOYEE_NUMBER,PUNCH_TYPE)
  Select PUNCH_TIME,MACHINE_NAME,EMPLOYEE_NUMBER,PUNCH_TYPE
  FROM inserted
end
go

So the idea was pretty simple, like an audit, as soon as the SQL table “rRajesh” has a new row inserted, the after insert trigger should sent the same row to underlying table over Oracle. Instead I started getting the following error:

OLE DB provider “OraOLEDB.Oracle” for linked server “XYZ” returned message “New transaction cannot enlist in the specified transaction coordinator. “.
Msg 7391, Level 16, State 2, Procedure addRecordsToERPTable, Line 5
The operation could not be performed because OLE DB provider “OraOLEDB.Oracle” for linked server “XYZ” was unable to begin a distributed transaction.

I’m not very familiar with MS SQL or the complexities related to Linked Server environments. So, started my next series of Google searches. I referred tons of discussions, however was not getting anywhere with the dreaded situation. During the frantic search for a solution, I executed the instructions available over different links.

https://stackoverflow.com/questions/6999906/distributed-transaction-error

https://community.oracle.com/thread/2265534

Even after making changes as mentioned with the above threads, I still kept on receiving the same errors while a row was inserted into my SQL sample table. So I continued searching for a solution and came across a thread

https://microsoft.public.sqlserver.security.narkive.com/WDGBVTrk/msdaora-was-unable-to-begin-a-distributed-transaction-why-sql-oracle

This thread was pointing towards a Microsoft’s post addressing this particular situation.

http://support.microsoft.com/kb/280106

Although the article addresses pretty Old OS and Oracle environments, the solution is still applicable on later OS and Oracle clients. For example, My MS SQL Server is installed over Windows 2008 R2 and the Oracle client I am using with the server is 11G R2 64Bit.

Let us see quickly what Microsoft provides as a solution.

I checked the registry of my server and found something pretty interesting like below:

Now, Oracle names almost all their major dll files in a particular fashion. Most of the times you will find the dll files having the major version numbers by the end of the filename, for example, if your Oracle database is 8.0, your client dll file will be “Oraclient8.dll” and if you are using Oracle 11g, the filename would be “Oraclient11.dll”

After taking a full backup of the registry, I modified the values with 11g specific & restarted the Server (as per the instructions available for Oracle 8.1 in the Microsoft document.)

Once the server started, I went ahead and tried to insert a new row into my sample table and that was it. No more errors and the row was inserted to both MS SQL table and Oracle table at the same time.

So if you were frantically searching for a solution, this post may help you to resolve it.

regards,

rajesh


kernel-power|Event id 41 | Windows 10

November 20, 2018

Hi guys

So? You have few years old hardware & opted to upgrade to Windows 10, when it was offered free? don’t worry, you made a wise choice. Although the OS is not perfect, it is better than Windows 8.x, definitely feature richer than predecessors…until your box starts rebooting once in few minutes or few times per day.

Your event logs for system will plainly say “kernel-power” and about an unclean restart, which is a critical event.

There could be a number of reasons, starting from the OS’s new power management “features” conflicting with your legacy hardware, components like additional audio or video cards behaving strangely after being there for last many years etc. This post is not a single stop solution for all your “kernel-power” issues, instead, few guidelines those may help you to narrow down the issues and resolve them in a timely manner.

My semi-server type desktop machine is 6+ years old. I never bought myself a branded desktop machine as I always needed powerful (please read affordable to my budgets) boxes for database development & virtual machines. I opted to go with the free Windows 10 upgrade when it was offered and never had many issues with the box or OS until last month. My kids (who are using the desktop mostly now days for their entertainment) started complaining about the machine rebooting quite often & I suspected the poor wall point (which truly required a replacement along with the extension board) & immediately changed it. Things were better for a while and then came the October update build 1809. The unexpected reboots were sporadic, sometimes once in just few minutes time! I scavenged through the event logs and found multiple “kernel-power” event entries. So I started going through many articles those were patiently explaining what are the factors those could cause “kernel-power” events

  • Bad power supply units
  • Conflicting Audio components
  • Old base boards (motherboards)
  • Bad power sockets
  • and Windows power management

I was sure that my XFX 850W PSU cannot be wrong ;), so without wasting much time, I moved on to audio. My motherboard has RealTek audio built-in and I have extended my box with a Creative Sound Blaster Zx card almost year back when my Audigy gave up. So I removed the Creative sound card and the box started behaving properly for approximately one and half days before giving up to random reboots.

Slowly I started building up a pattern for the reboots. I noticed that the machine only rebooted when I was streaming youtube videos and ONLY while I played videos the box rebooted. My box had a nvidia GT 520 card to play the only one game ever owned “Swat 4”!

I opened up the box again and removed the PCIE2.0x16 card out to realize that the card was totally packed with dust. Without giving it another chance booted the box with on-board display to insure that the issues were related to the GPU (This was the wild guess part)

Well, for me, all the kernel-power events stopped ever since I removed the nvidia card from the box. Not a single reboot after hours of streaming or playing downloaded video clips.

So, is my nvidia display card really faulty? I don’t know for sure. Nvidia didn’t push new drivers for this card from last many months & the issues could be from conflicting software components between the OS and the card driver (could be!). I’ve to find some time very soon to be sure!

In the same scenarios, you can try the following in case if you also own an extended desktop that experiences “kernel-power” events once after upgrading to recent builds of Windows 10

  • Remove all additional cards from the box
  • Remove all software related to the cards those you have removed from the box
  • Make sure to dust off your box from inside (Use a powerful blower, and from a safe distance to dust off)
  • Insure all the cables are tightened securely in places
  • Keep playing videos for extended periods of time (To insure there are no reboots)

In addition to above few, a computer could start acting weird when any  of the component used within starts having hardware or software issues. If none of the above tests resolves your issues, may be it is the time to start thinking about a new box (unfortunately)

I hope few out there find the above useful!

regards,

rajesh