Sunday, 15 November 2015

32 vs 64 bit app determination and windows which–two bugbears of mine (what’s a bugbear?)

 

I’ve struggled for this for a while too, in this modern day of transition from 32 to 64 bit, why is not HEAPS easier to tell if a file is 64 bit?  Give me the unix file command any day of the week.  While I’m on a rant, the other thing I dislike about windows is that there is no where command.  If I’m running sqlplus – I want to know which one in the path is being called – not just guess.  This is a common problem on deployment servers where you have e1local that is 64 bit and then you have the 32 bit client component.

Note that one of my prayers have been answered:  which is a command that I use on linux all of the time.  Handy to know what version of sqlplus is being used and therefore what tnsnames to change.  modern windows you can now use where!

C:\Oracle\E1Local\BIN>where sqlplus
C:\Oracle\E1Local\BIN\sqlplus.exe
D:\oracle\product\11.2.0\client_1\BIN\sqlplus.exe

It seems that the consensus online us using dumpbin, this is crap.  No everyone has visual studio just lying around for this purpose.  We don’t want to download noddy little tools to do this stuff.

Wait, both rants might be over.  Thanks to this post:  http://superuser.com/questions/358434/how-to-check-if-a-binary-is-32-or-64-bit-on-windows

clip_image002

64bit

clip_image004

32bit

This is really cool, so I can use the tools that are installed on my machine to determine 64 and 32 bit applications by a simple notepad interrogation.

Note that you can also use findstr if you don’t want to involve notepad:

C:\Oracle\E1Local\BIN>findstr /C:"PE" D:\oracle\product\11.2.0\client_1\BIN\sqlplus.exe |more

clip_image006

See the PE then L in the 2nd page of the results.  Remember that the L means 32 bit

Note that after considering the wikipedia definition of bugbear, I might stop using the word.  It does not seem to make a lot of sense the way I use it…  unless you look right to the end of the actual definition In a modern context, the term bugbear may also mean pet peeve

No comments:

Extending JDE to generative AI