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!
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:
Will produce the below, syntax highlighted code block for you
your code here
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
DataGridView1.DataSource = ds.Tables(0)
DataGridView1.Columns(0).HeaderText = "Id"
DataGridView1.Columns(1).HeaderText = "VM Name"
DataGridView1.Columns(2).HeaderText = "Shutoff Mode"
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:
matlab (keywords only)
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.
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.
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 "e 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.
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
Support “Like” operator
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]
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
This should register the OLE DB driver for you.
Step#2: Check your OS PATH environment element, your client/database bin bath 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)
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]
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]
insert into [PRODBAK]..[APPS].[XXFPPUNCHM]
Step#3: Now we will try to initiate a “Distributed Transaction” with the new registry 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 developed 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.
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.
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]
insert into [XYZ].[APPS].[XXFPPUNCHM]
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.
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
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.
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)
No 5.1 channel sounds while trying to setup a on-board “RealTek” audio output? Just forget about 5.1 & setup the speaker as 7.1 channel. For some reasons, Selecting the speaker as 5.1 causes the processor to channel the rear audio to “side speakers” which are actually not “existing” in 5.1 setup.
My nvidia GT-520 PCIE 2.0X16 card has finally failed & that altogether started a new story, a new finding and possibly a lousy solution as well.
My OEM motherboard from Intel ( DH67CL) has both Video & Audio integrated along with one NIC. More than enough to start with a PC without additional cards, which is NOT always what you want. You want to game, you need a card. You want to listen to your games, you need better audio processors, so you need another card.
Now, there are no guarantees that these cards will “Work for anyone” forever. The vendors will stop developing drivers, the product itself start having technical difficulties and your BOX as a computer will start experiencing issues as the box itself ages.
So after I removed the nvidia graphics card from my box and hooked up the Samsung LED monitor to the on-board intel HD display(HD 2000), I noticed many sparkling white dots
especially over the taskbar area & almost everywhere the box tends to see gray or darker shades. I knew that the HDMI port on board is version 1.1, when the cable that I used and the monitor are HDMI 2.0 capable. So I hooked up a normal VGA cable and was surprised to see that nothing changed! The sparkling white dots were persistent and I started googling, to find a proper solution.
Almost all solutions were about securing the cables, checking the driver, assuming the MB being faulty & even raising fingers at the PSU!
I wanted to check Windows 10 settings and to find out something to reset the display settings (I was hoping to find some) & after few minutes I landed on Settings -> Colors
I kept on toggling switches and finally toggled the “Transparency Effects” switch, which was ON. Immediately the white sparkling dots disappeared (99% as I could still see few of them against pitch black BOLD letters)
It looks like Windows 10’s video processing has issues with older hardware, especially with older base boards. Hope this is a “kinda” solution for you also, if you are reading this post :)
Starting from Notepad++ 7.5.x “Plugin Manager” is not bundled with this editor & you would find why and associated reasons here
So how do we have this “Plugin” configured for managing the plugins? Well the solution is pretty straight forward, download the latest version of the plugin manager from here
Please note, after downloading the plugin which is a zip archive, you need to extract it and there will be two folders, one for the Plugin Manager plugin & other one for the updater. Check the below image:
Note: The instructions given below are specific to 32-Bit version of Notepad++
Now, copy “PluginManager.dll” from plugins folder to “C:\Program Files (x86)\Notepad++\plugins” (default installation location, adjust to suite your environment)
Copy “gpup.exe” from “updater” folder to “C:\Program Files (x86)\Notepad++\updater” (Mandatory)
Now you are all set to start using Plugin Manager once again.