Skip to main content

Hey there! 

If your users run into this issue 
https://kb.tableau.com/articles/issue/error-ora-21561-oid-generation-failed-connecting-to-oracle-from-mac
"Error "ORA-21561: OID generation failed" Connecting to Oracle with a Mac"

Tableau has a solution, edit the hosts file to include local computer name by adding the computer name to the end of the 127.0.0.1 line

Which is wonderful! and helped us out. But we did not want users to have to edit this manually. So we made a script and deployed it to Tableau users via self service.  

This script will add the entry, or remove it if the entry is already there. It uses jamf helper to show the user a nice notification window

 

 

 

 

#!/bin/bash # Developed by bizzaredm - 2020 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # SYSTEM VARIABLES # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # jamfHelper="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfhelper" networkConnectIcon="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ConnectToIcon.icns" alertIcon="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertCautionIcon.icns" whatsMyHostName=$(hostname) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # APPLICATION # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # if grep -q "#This next line is for Tableau." /etc/hosts; then #Check for exit code, TODO remove after debug echo $? echo "Redirect exists for Tableau, removing..." # Remove line awk '/Tableau/ {while (/Tableau/ && getline>0) ; next} 1' /etc/hosts > /etc/hostscleaned mv /etc/hosts /etc/host.bak mv /etc/hostscleaned /etc/hosts # Reset DNS #/usr/bin/killall -HUP mDNSResponder windowType="hud" # [hud | utility | fs] windowPosition="" # [ul | ll | ur | lr] title="Host Updater" # "string" heading="" # "string" description="Host Tableau Entry Removed" # "string" icon="$networkConnectIcon" # path iconSize="125" # pixels timeout="" # seconds "$jamfHelper" -windowType "$windowType" -windowPosition "$windowPosition" -title "$title" -heading "$heading" -description "$description" -icon "$icon" -iconSize "$iconSize" -button1 Okay -defaultButton 1 -cancelButton "0" -countdown "$timeout" -timeout "$timeout" else echo "Redirect does not exist for Tableau, adding it now..." # Add redirect echo "#This next line is for Tableau." >> /etc/hosts echo "127.0.0.1 localhost" "$whatsMyHostName" >> /etc/hosts # Reset DNS #/usr/bin/killall -HUP mDNSResponder windowType="hud" # [hud | utility | fs] windowPosition="" # [ul | ll | ur | lr] title="Host Updater" # "string" heading="" # "string" description="Host Tableau Entry Added" # "string" icon="$networkConnectIcon" # path iconSize="125" # pixels timeout="" # seconds "$jamfHelper" -windowType "$windowType" -windowPosition "$windowPosition" -title "$title" -heading "$heading" -description "$description" -icon "$icon" -iconSize "$iconSize" -button1 Okay -defaultButton 1 -cancelButton "0" -countdown "$timeout" -timeout "$timeout" fi

 

 

 

 

 

Be the first to reply!