Featured

Active Directory Listing Software

Hi guys

Today I am going to share a compact software that could generate moderately detailed information about the Windows active directory member computers, servers and users from a single console, that I started developing many years back.

This software helps you to export the fetched details to an excel sheet for future references. While there are no restrictions exclusively attached to the usage of this software, the source code for the application is ONLY available against written requests. Refer the readme.txt file for more details.

Please download the zip file from this link and extract to a single folder. Double click open “WpfWMI” to run the software (No installations required). We are using open source EPPlus.dll for the excel export and you must insure that the dll file is within the same folder of the executable file (WpfWMI.exe)

Pre-requisites: The computer you are running this software MUST have .Net framework 4.5 installed.

Expected bugs:

  • When you are not connected to a domain, software will show you a message “Not connected to Domain, Aborting”. However, the main application will load and trying to load objects will crash. I’ll fix this the earliest possible.
  • If your internal & external domains have same name, for example internal domain name is “abc.com” and your public website is “www.abc.com”, you may experience the above mentioned crash while connected to your network over a VPN connection.
  • Poorly designed About, help sections. I apologize for the same as I never had intensions to release it for public usage. Will try to accommodate as much with next public release.

Test it & post your comments and suggestions.

regards,

rajesh

Featured

Asking questions, following them up

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,

 

 

Featured

Script Copying Instructions

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.

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,

Oracle VirtualBox Guest Addons | kernel headers not found for target kernel

So how many Oracle VirtualBox VM (Virtual Machine)s you do have?

I’ve many. I try many new software & not to break production box, I try them using Virtual Machines. I use Oracle VirtualBox (mostly) for both Windows and Linux machines (and VMWare ESXi for Production servers), as you could see with the above image. VirtualBox and VMWare supply additional software called “Guest Additions” that synchronize the Guest Virtual Machines with Host machine seamlessly. Like Mouse integration that allows your mouse to travel between both host and guest machines without any difficulties.

On Linux OS, installing the Guest Additions could be sometimes challenging. Especially with Oracle Linux that uses UEK kernels. Let us see how to “fix” the common error messages that appears when installing the Guest Additions on Oracle Linux 7 and 8.

The best approach is to update your Linux OS with latest patches before trying the below. I consider you already updated your Linux box, if yes then

yum install kernel-uek-devel

is enough to install the devel package, suffice the kernel headers missing error. Install the package, reboot the box and try to install VirtualBox Guest Additions. This time module should get installed properly. You may need make, gcc & perl already installed for a successful installation of Guest Additions. You will find instructions to install them later in the article.

Now we have another situation when guest add-ons are required, however updating the new Linux box is not possible due to many reasons. Here we will use the Linux OS ISO image. Please note, the ISO file that you are going to use must be the same ISO that you used to install OS and OS was not updated at all. That means your Linux box is as it is after the OS installation.

Attach the ISO file to your Linux box & Switch to

Packages folder for Oracle Linux 7 and “BaseOS\Packages” for Linux 8

Now locate the kernel-uek-devel-xxxxxxxxxxxxxxxxxxxx package and install it. For example, I will execute the following for Linux 8

rpm -ivh kernel-uek-devel-5.4.17-2136.300.7.el8uek.x86_64.rpm

That’s it. Restart the box and try to install the guest add-ons once again and you must be through without other issues. You might need to install gcc, make & perl also to get the guest add-ons installed.

If you are connected to internet, you can install the above packages by issuing the command

yum install gcc make perl -y

Or go through the packages available in the Packages repo, install them.

All the best!

KB5009543 | Jan 2022 cumulative update breaks IKEv2 VPN Connections

KB5009543 or Cumulative update Jan 2022 for Windows 10 and Windows 11 is currently breaking IKEv2 VPN connections. If you are experiencing an unexpected connection failure with a vague error message like “General processing error”, please follow the below steps.

Go to Program and Features -> Installed Updates and uninstall KB5009543. Reboot the box and the VPN connection should start working normally. Optionally you may disable the Windows Update for a period of time so that the same update will not get installed once again. Please note, Microsoft releases updates to their products quite often to resolve issues those were identified. Few times these updates open new issues, like the one happened with this particular KB.

While there are no straight forward methods available to “stop” Windows updates, you can use multiple methods to disable Windows update completely, which we don’t recommend. One of them is using group policies on the local machine.

If you still consider disabling Windows updates temporarily/long term, please refer this excellent tutorial

Hope this helps.

Slow SSH connections from Windows to Linux hosts

Windows built-in firewall does not block SSH connections those are going out & there is no need to create an exception for SSH connections from Windows to LINUX hosts. Still many things could mess up connections.

One of the major culprits being the DNS settings. We had a migration for Primary domain controller from 2008 R2 to Windows Server 2016. Prior the upgrade we brought a temporary VM using VirtualBox to insure that the migration could happen seamlessly. The migration to temporary server happened without issues and we rushed to change the DNS settings for all production servers with the new VM IP address, after removing the IP address for the old PDC from the list.

After the confirmations, we built a fresh VM on VMWare ESXi environment and promoted it as PDC & we ahead with decommissioning the VM built on VirtualBox and forgot that “one thing”. Changing DNS server details for our LINUX servers.

Initially we didn’t give much attention to the SSH connection slowness as these LINUX server(s) running Oracle Applications were known to be slow in responding. However, things didn’t look quite promising as we noticed delays like 40s+ to establish connection to the host while trying to upload files using FileZilla client. It took us almost 8 days to realize that the connection issues were not from the client end, rather from the servers.

Checking the network configurations revealed these servers were still configured with the IP address of the temporary DC at the first entry, that we had for a while. Resetting the DNS entries to existing DNS servers IP addresses resolved the problems instantly.

Side note: No, you cannot overcome this issue by using IP addresses to establish the SSH connection. Regardless, the Linux HOST will try to resolve the client’s IP using the given DNS entries. So the only solution was to correct the DNS entries!

If you ever run into a slow SSH, well, hope know where to look at first after reading this post.

Connecting Oracle Developer 10g to 11G database takes long time

We migrated to 11G R2 (11.2.0.4) for our Oracle Applications R12 few years back, yes few years back (2017) & lived with one of the worst experiences…

Connecting Oracle Developer 10g (Forms/Reports) suite to 11G database.

I have scavenged through community articles for long time before giving up. I hardly came across a single fix for the connection time that used to hang up the Developer suite at times…

Today, I decided to find a solution for the nagging SSH connection issues from Windows 11 to our LINUX application servers and realized that we didn’t update the DNS settings for them once after we decommissioned a domain controller. Once the SSH issues were rectified and addressed, my next attempt was to find a solution for “frmcmp_batch” taking long time to start compiling modules & I landed on the below post.

Credit: Oracle Applications DBA: Form Compilation Against a 11g Database Hangs or Takes a Very Long Time [ID 880660.1] (appsjagan.blogspot.com)

As we are already on 11G R2 11.2.0.4, patching was not required. All I needed was to alter the hidden parameter “_FIX_CONTROL” as mentioned in the article.

SQL> ALTER SYSTEM SET "_FIX_CONTROL"='8560951:ON';

(Use scope=spfile to make this change permanent. This will require you to restart the database.)

I opted to go without spfile for testing & as soon as applied, the “frmcmp_batch” started compiling the modules instantly, against the usual delay that ran into many minutes other times.

Out of curiosity, I tried to connect to the database from Developer 10g & the connection was instant! within a fraction of a second.

So DNS being one of the most important elements establishing successful connections, patches and fixes also play crucial role in providing stable connections. Were you stuck with the same issue? give the solution a try and let us know whether it helped you also.

IIS 7.5+ | Windows Authentication

We decided to retire one of our Windows 2008 (32-Bit) servers, hosting multiple classic ASP intranet applications. Our immediate choice was another VM, that runs Windows 2008 R2, 64-Bit OS with IIS 7.5.x as intermediatory until we setup a brand new VM running Windows 2019 & soon realized that we were in tight spot as any attempt to access intranet application(s) from the new host started prompting for authorization for applications that were using “Windows Authentication”. All our application servers are domain members, so are our clients.

We did an apple to apple comparison between servers/IIS setup, visited dozens of threads & yet were unable to fix the “problem”, that was the site/application asking for authentication for a user who is already authenticated by the Active Directory!

Credits:

Although Midas site article Configuring Web Browsers for Active Directory Integration | MIDAS clearly mentioned about adding the website to local intranet zone, we missed it completely!

After referring third link, had the answer to our problem. Actually, if a client wants to negotiate authentication using “Windows Authentication” through a website by passing currently logged in user credentials, that website should be in Local Intranet zone, which was, for us controlled using a Group policy. This is strictly to make sure that user details are not shared with Internet zones, as a security measure.

Once the new site name was added to the zone list and group policies updated, we were able to access the intranet applications without further issues.

Oracle VirtualBox VM to VMWare ESXi 6+

We had couple of hardware failures, forcing us to build virtual machines using Oracle VirtualBox until we rebuilt the hardware. At organization level we have VMware standardized and according to the plans, initiated migrations from VirtualBox couple of days back.

New machines were created from ESXi 7 host, database backups were restored and applications were online & everything looked fine until we couldn’t get hold of a “chap” who provided us a small MS SQL based application that printed some Governmental forms (Arabic). To insure his “software” wouldn’t be pirated, he had password set to the database user account himself & dictated his own terms.

This forced us to think about alternatives and we decided to build another VM using disks from VirtualBox VM, painfully realizing, it was NOT that easy, however pretty doable.

Credits: Migrate VirtualBox to VMware ESXi 6.5 – VIONBLOG

Few points that I want to add here are:

ESXi creates the machine for EFI boot when much of the VMs you create using VirtualBox are using BIOS for firmware. Hence make sure that you will go to VM Options, Boot Options and select Firmware as “BIOS” before booting the VM after attaching the disks converted from VDI to vmdk following instructions from the above provided link.

Convert the VDI disks to fixed size before converting them to vmdk. This insures marginal performance gains, especially when disks are used for databases.

Use Winscp for large file transfers incase if you are using Windows & uploading disks to ESXi environments. Built-in datastore uploads could error out when file sizes are beyond a particular size. We had 2 vmdk files, exceeding 400GB and the 1st file upload stopped responding after 71%. We managed to upload these files (1 after another) in next 50 minutes using Winscp.

Insure your ESXi datastore has enough free storage because you will be converting the uploaded vmdk disks once again to suite the environment. Another suggestion is, do not convert multiple disks at same time. Going one after another insures that you get the maximum resources to convert files.

Above given link mentions about editing vmdk descriptor to change adapter type. In our case, it was not necessary. Adapter type was set “lsilogi” when we checked those files after last level conversions using vmkfstools. However, you must insure the same.

Install Oracle Developer 10G on Windows 11

Today I re-installed Windows 11 on my computer. Actually I had upgraded from Windows 10 to Windows 11 on October 5th, 2021 the same day Microsoft released the half baked OS to public & all of a sudden I realized that, it was a blunder. So, after regretting over a month, I decided to re-install the OS and started installing all my development tools & you know what, I had to refer my Windows 7 post for installing Oracle Developer Suite 10g on my Windows 11!

Much of the post below is from the earliest post that I had for Windows 7, explaining hacks to install Oracle Database 10g and the Suite. Oracle Database 10g is not anymore significant, hence I removed the database part and posting the rest for few unfortunate Oracle developers out there. Well, 10g is used by many business application as on date & if you are looking for a method to install Oracle Database 10g on Windows 11, Please search the blog for Database 10g and you will land on multiple posts explaining to how (Refer Windows 10 articles)

Step 1 Setup Virtual Memory

If your computer has 8GB or more physical memory, all you need is to setup the Virtual Memory for the name sake. Limit the virtual memory to 2048 (2G) or max 4096 (4G). Please use the below images only for reference purposes. After changing the Virtual Memory, You will be asked to restart the computer and please restart.

Step 2 Setting up the Developer Suite

Depending upon the media that you are using for the installation, Oracle Developer 10g has 2 discs & I have copied the content from both disks inside a folder on my computer. (As you could see in the image above)

Open the Disk 1 folder and locate “Setup.exe’, right click and change the compatibility to Windows XP Service Pack 2 or 3 (doesn’t make any difference)

That’s all. Right click and run “setup.exe” as Administrator. If you have a JAVA installation already on the computer, you might receive a warning message for missing entry point, that you can safely ignore.

Follow the same compatibility setting for patch sets, if you have any. Let me know about your experience through comments.

Install Oracle 21c database on Windows

If you have already installed Oracle 19c following instructions available here, installing Oracle database 21c is not much different. Basically 21c is “Innovation Release” & 19c is going to be the long supported version as on date. It plainly means, there is no need to hurry to upgrade your 19c to 21c as next release will be the next long supported version.

Let us see how to install Oracle 21c on Windows (Installed on Windows 10 21H1) & the instructions are same for Windows 11 also.

You can download the 21c Windows installation media from Oracle Database 21c Download for Microsoft Windows x64

Extract the .zip and change the root folder to something like “Oracle12c” (or a name that prefer. Please avoid using spaces with the folder name, example: “Oracle 21c”)

I used a virtual machine with single drive, hence the zip file was extracted and I renamed the extracted folder root to “Oracle21c”

Once the folder is renamed to your choice, open the folder and execute the “setup.exe” as administrator. Please note, you must start the setup as administrator, regardless whether your Windows user account has administrator privileges on the system.

This will kick start the installation process and depending upon the resources available it could take minutes before the installation GUI appears for you.

Choose “Server class” regardless whether you are installing it on a Server OS or client OS. It’s all about managing the resources.

Now, this is a very interesting perspective. “The software directory is the Oracle Database home directory” & the path that you will mention in the edit box is going to be the Oracle base. I hope, now you understood why renaming the media extracted folder to a very meaningful name is important. As usual Oracle suggests you the defaults, however I recommend you to follow a pattern that you can feel comfortable with.

As you could see, the default installation sets up one pdb. You may rename the default PDB at this level.

Here I left everything to defaults as my intentions were pretty limited to installation. Unless you have a reason to set up Automatic Memory management, go ahead with the well trusted manual management, that gives you granular level control on how the memory is utilized by the database.

You can change the database character set to another from the “Choose from the following list of character sets” (Specifically for Arabic and other left to right languages)

You may choose a different location for the database data files. Just make sure that the current user has full access to the path.

Use the same password for a TEST installation & follow the Oracle recommendations for PRODUCTION environments. Please note, it’s better to use the complex passwords with expiry disabled for the default profile.

That’s all folks. It’s not like the earlier times when one had to hack the installation files to install Oracle database on newer Windows OS. Starting from 11g, Oracle database gets installed on Windows 7 and later OS without complaining as long as the OS is fully patched with updates and .NET components.

Hope this post helps few newbies (& me)

Oracle “directory” object | OS level permissions

We are using Oracle EBS R12 and for a custom module, wanted to log the Oracle seeded API outputs to custom log files for later scrutiny & error corrections.

Following the standard procedure, create the folder like below

create or replace directory OMS_LOGS as '/u01/applmgr/oms_logs'

and started testing the directory using SQL Developer where I am logged in as APPS user

I kept getting the below errors

ERROR at line 1:
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation
ORA-06512: at line 8

and the detailed errors said this could be due to OS level access permissions. Luckily I landed on a stackoverflow discussion & one of the answers clearly said this error “could” be due to the file/folder permissions for user “oracle”.

As “root” I changed the permissions for the path “/u01/applmgr/oms_logs” like below

chmod g+w /u01/applmgr/oms_logs

and that fixed the invalid file operation errors. Hope this helps someone out there!

Windows 11 | Dial a VPN Connection using PowerShell script

I started blogging once after upgrading to Windows 7 & posted mostly about the ridiculous bugs Microsoft exported with that OS. Gradually Windows 7 got matured (hardly ever fixing the yellow triangle network icon issue) & my entire attention switched to what I do for salaries, Oracle development & later much of my posts were about the stack.

Now Microsoft has released another half cooked OS, Windows 11. From a layman perspectives I cannot understand how someone could make such decisions that affect the established stability and ease of use of an OS that creates huge disappointments for general userbase!

Other than cosmetic changes and revamped settings area, I cannot defer Windows 11 from Windows 10, plus the disappointment of losing the start menu that I was getting used to after loads of patience and efforts. Among many of such grievances, connecting to VPN at work is so ridiculous, requiring 4 mouse clicks! So I decided to go with a cmd/powershell script this time to avoid those 4 mouse clicks.

After weighing the possibilities of extending , I decided to go with PowerShell (Version 5)

So let us check how it works. Copy the following in to a text file

rasdial.exe "Your VPN Name"

Save the file as “Dial VPN.ps1” or any other name you prefer with extension “.ps1”.

Make sure you wrap the VPN name using double quotes. “rasdial.exe” is not a powershell cmdlet, an old Windows OS friendly dialer. This executable is generally found in the Windows\System32 folder and there is no need to specify the path, unless you modified the PATH environment variable. Now create a new shortcut on the desktop and type/copy the following (Please adjust the file path as per your setup) as command for the shortcut

powershell.exe -File "C:\scripts\Dial-VPN.ps1"

Usually I keep all my scripts in a folder named “Scripts” on the C: drive. Hence the -File parameter clearly mentions the script’s path.

That’s all, you can double click and open the pre-configured VPN connection without going through the 4 click hassles on Windows 11 (or multiple clicks on other Windows OS versions)

Now, let us look at a fancier version of the above. What if you want to connect if not connected and disconnect if already connected? Please note, this script could be extended beyond this level depending upon specific requirements. I have started with the skeleton and will be happy to receive better scripts from you.

#https://community.spiceworks.com/topic/2271983-auto-connect-vpn
#http://woshub.com/popup-notification-powershell/
            
$vpnname = "Your VPN Name"
$vpnusername = "YOURUSERNAME"
$vpnpassword = "YOURPASSWORD"
$cmd = $env:WINDIR + "\System32\rasdial.exe"
            
try{
$vpn = Get-VpnConnection -Name $vpnname -ErrorAction Stop
Write-Host $vpn.ConnectionStatus
}
catch {
$message = $_
$wshell = New-Object -ComObject Wscript.Shell
$Output = $wshell.Popup("Failed to retrieve Connection status. $message",0,"VPN Connection Status",64)
}
            
if ($vpn.ConnectionStatus -eq "Disconnected")
{
$expression = "$cmd ""$vpnname"" "
Invoke-Expression -Command $expression 
$wshell = New-Object -ComObject Wscript.Shell
$Output = $wshell.Popup("VPN Connected",0,"VPN Connection Status",64)
}
else {
$wshell = New-Object -ComObject Wscript.Shell
$Output = $wshell.Popup("Your VPN Connection will be disconnected, Are you sure?",0,"VPN Connection Status",4+32)

if($Output -eq 6){
$expression = "$cmd ""$vpnname"" /DISCONNECT"
Write-Host $expression
Invoke-Expression -Command $expression 
$wshell = New-Object -ComObject Wscript.Shell
$Output = $wshell.Popup("VPN Disconnected",0,"VPN Connection Status",64)
}

}
#start-sleep -seconds 30
 

Please note, I am a beginner with PowerShell(Also) and always will be. As usual, I have provided the links to original codes & possible other links those helped me to device the above.

The above can, dial your VPN connection, warn you before you disconnect etcetera. For my ease, I prefer to use the extended version of the script as I keep on switching the connections. You may able to extend the script once again by accepting the VPN connection name, so that you can use the same script for dialing different VPN connections (if you have many)

Have suggestions? please pass them to me through the comments section.