The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,262 other subscribers

Archive for May 20th, 2021

I wanted to know the loaded DLLs in a process like Process Explorer shows, but from the console: Sysinternals ListDLLs to the rescue

Posted by jpluimers on 2021/05/20

In Windows, historically most people approach investigation GUI first. Having turned 50 a while ago, I am no exception.

My real roots however are on the command-line and scripting: roughly 1980s Apple DOS, CP/M, SunOS (yay sh Bourne shell!), MS-DOS, 4DOS, and VAX/VMS (yay DCL shell!), from the 1990s on, some Solaris, a little bit of AIX, HP-UX and quite a bit of Linux, MacOS (né OS/XMac OS),  and some BSD descendants derivatives (SunOS, AIX and MacOS are based on the Berkeley Software Distribution), and this century a more growing amount of PowerShell).

So I was glad to find out the makers of Process Explorer also made [WayBack] ListDLLs – Windows Sysinternals | Microsoft Docs (via windows get dlls loaded in process – Google Search)

List all the DLLs that are currently loaded, including where they are loaded and their version numbers.

ListDLLs is a utility that reports the DLLs loaded into processes. You can use it to list all DLLs loaded into all processes, into a specific process, or to list the processes that have a particular DLL loaded. ListDLLs can also display full version information for DLLs, including their digital signature, and can be used to scan processes for unsigned DLLs.

Usage

listdlls [-r] [-v | -u] [processname|pid]
listdlls [-r] [-v] [-d dllname]

Parameter Description
processname Dump DLLs loaded by process (partial name accepted).
pid Dump DLLs associated with the specified process id.
dllname Show only processes that have loaded the specified DLL.
-r Flag DLLs that relocated because they are not loaded at their base address.
-u Only list unsigned DLLs.
-v Show DLL version information.

Download: [WayBack] ListDlls.zip.

Now it is much easier to generate a draft deploy list of DLLs (and for Delphi: BPLs) based on a process running on a development machine.

Example output (the -r flags relocation warnings; the first part is the [WayBack] shim that Chocolatey created around the second which is from SysInternals):

Read the rest of this entry »

Posted in Conference Topics, Conferences, Delphi, Development, Event, History, Software Development, Windows Development | Leave a Comment »

Oracle Instant Client – no chocolatey package for automatic install on Windows (yet?)

Posted by jpluimers on 2021/05/20

I tried finding a chocolatey package for the [WayBack] Oracle Instant Client – Free tools and libraries for connecting to Oracle Database.

The [WayBack] Instant Client editions support light-weight installations of the Oracle database client.

I was especially interested in automating the install of the basic or basic basic light varieties:

Instant Client Package

Description

References

Basic

All files required to run OCI, OCCI, and JDBC-OCI applications for Oracle Database

OCI
OCCI
JDBC-OCI

Basic Light

Smaller version of the Basic package, with only English error messages and Unicode, ASCII, and Western European character set support

OCI
OCCI
JDBC-OCI

Having this is a prerequisite of many DAC layers, including ODBC, although for the latter, you also need this one:

Instant Client Package

Description

References

ODBC

Additional libraries providing ODBC

ODBC

Since there is no chocolatey maintained package for any of these, these are the steps to download them:

  1. Ensure you have a Oracle account
  2. Sign in on www.oracle.com/webapps/redirect/signon?nexturl=https://www.oracle.com/technetwork/developer-tools/sql-developer/downloads
  3. Accept cookies if asked for
  4. Click on the “Downloads” button to go to [WayBack] Oracle Instant Client Downloads
  5. Click on either [WayBack] Instant Client for Microsoft Windows (32-bit) (note that [WayBack] Instant Client for Microsoft Windows (x64) is specific for Win64 applications; many are 32-bit only, especially end-user ones, for instance many supporting Microsoft Office (including Outlook addins, or document storage systems)
  6. Click on the “Accept License Agreement” radio button
  7. Select the version you need.
  8. Download and install the required files.
  9. Unzip and add the directories to the PATH

TNSPING

Note that these downloads not include TNSPING; for some reason, Oracle only adds that to the fat client. So you need to use alternatives:

You can also use sqlplus with sscripting, but that is much harder on Windows than on Linux:

Note there are very distinctive differences between tnsping and sqlplus, see How to do tnsping? | Oracle Community  which I will quote large parts of soon.

For sqlplus: it works with TNSNAMES.ORA, but you can also do without it.

For all the other tnsping substitutes: ensure your TNS_ADMIN points to a directory with a correct TNSNAMES.ORA file.

What I usually do is this:

  1. Create directory a directory ORA under %LOCALAPPDATA%
  2. Store TNSNAMES.ORA inside %LOCALAPPDATA%\ORA
  3. Point TNS_ADMIN environment variable to %LOCALAPPDATA%\ORA
  4. Unzip any of the instantclient-basiclite-nt-*.zip into %LOCALAPPDATA%\ORA\InstantClient
  5. Unzip any of the instantclient-sqlplus-nt-*.zip into %LOCALAPPDATA%\ORA\SqlPlus
  6. Add %LOCALAPPDATA%\ORA\InstantClient;%LOCALAPPDATA%\ORA\SqlPlus to the user PATH

Related

My blog post Chocolatey: installing Oracle SQL Developer and updating the chocolatey package (which works without the instantclient).

[WayBack] Install Oracle Instant Client on Linux and Windows | HelloDog:  Install Oracle instantclient basic and instantclient sqlplus on Linux and Windows (and some tnsping examples).

[Archive.is] oracle – How to set tnsnames.ora location for SQL Developer in Windows 10 – Stack Overflow

–jeroen

Posted in Database Development, Development, ODBC, OracleDB, Software Development | Leave a Comment »

ODAC default install paths for Delphi 10.2 Tokyo

Posted by jpluimers on 2021/05/20

A few notes on the ODAC install:

  1. Download of x.x.x is at [WayBack] www.devart.com/odac/odac25.exe via [WayBack] www.devart.com/odac/download.html

    The 25 is DllSuffix minus trailing zero for Delphi 10.2 Tokyo, or the “real” Delphi version; see Delphi version info table.

  2. It requires local administrator access when installing
  3. When installing it installs the Demos using the %USERPROFILE% directory of the local administrator user that installed it: %USERPROFILE%\Documents\Devart\ODAC for RAD Studio 10.2\Demos
    • You can replace this directory at install time; I prefer %PUBLIC%\Documents\Devart\ODAC for RAD Studio 10.2\Demos
  4. The rest of the files are in the global directory %ProgramFiles(x86)%\Devart\ODAC for RAD Studio 10.2
  5. If your Delphi license does not include certain targets (like Linux) they do not get installed at all.

–jeroen

 

 

Posted in Delphi, Development, Software Development | Leave a Comment »