There was not any good, current documentation anywhere regarding how to do this. Lots of old, vague, or incomplete information exists. This documentation will be a detailed and tested sequence of steps for configuring a linked server from SQL Server to Oracle.
The below steps were tested on Windows Server 2016 and SQL Server 2019.
The first thing you need to do is download and install the "Oracle Client" on your SQL Server. Of course there are 10 different things at oracle.com that are similar to "oracle client", so here is the specific link:
There are still many different things that can be downloaded on this page. Download the file named: WINDOWS.X64_193000_client.zip (for installation on a 64-bit Windows server/PC)
You will need to have or create an oracle.com account in order to download files from oracle.com.
Apparently, the client should match your database version and this link is appropriate for the database version used in my case. The DBA for your Oracle server should be able to direct you to the right download link for your Oracle version.
Next, make a folder on your server at: C:\ORACLE
We'll use this in a minute.
Unzip the download (WINDOWS.X64_193000_client.zip) and run setup.exe as administrator.
In the installation wizard:
Click Next and Prerequisite Checks will be performed. On the Summary screen, click "Install".
After a few minutes the installation will complete. Click Close.
Reboot.
Open Powershell and type: "sqlplus" You should some sqlplus version information and not an error message. This indicates the Oracle Client installed correctly.
Navigate to this folder using File Explorer: C:\Oracle\app\client\product\19.0.0\client_1\network\admin
Create an empty file in that location named: tnsnames.ora
Copy the contents from APPENDIX A below into the tnsnames.ora file. Your Oracle DBA will need to give you the proper values for HOST and SERVICE_NAME.
Open Powershell and enter: tnsping ORACLEPROD
You should get a quick response that says "Used TNSNAMES adapter to resolve the alias". If you get "failed to resolve name" something isn't correct.
Open Powershell enter: dir env: to show all environment variables. If you don't see "ORACLE_HOME" listed, you will need to add it.
Enter: $env:ORACLE_HOME = "C:\Oracle\app\client\product\19.0.0\client_1"
(note this can also be added via File Explorer -> This PC -> Properties -> Advanced System Settings -> Environment Variables)
Again enter: dir env: to confirm ORACLE_HOME is now listed.
In the Windows search bar, search for and open "ODBC Data Sources (64-bit)".
Click on the System DSN tab. Click Add... Select the Oracle driver, named like "Oracle in OraClient 19Home 1". Click Finish.
Enter:
Click "Test Connection". Enter the password for the Oracle User ID. Make sure that you see a connection successful message. Click Ok.
Connect to your SQL Server instance from a PC that has SQL Server Managment Studio (SSMS) installed using an account with sysadmin permissions.
Under Server Objects select New -> Linked Server
Enter (on General page):
Enter (on Security page):
Get a schema and table name from the Oracle DBA.
Open a new query window and run a select query using this syntax: SELECT * FROM OPENQUERY(ORACLEPROD, 'select * from [schema].[table]')
You should see rows of data returned from the Oracle database.
Making a linked server connection to Oracle is not nearly as straight foward as to SQL Server or MYSQL, but it is possible.
ORACLEPROD= (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=[your server IP or name])(PORT=1521))(CONNECT_DATA=(SERVER=dedicated)(SERVICE_NAME=oracleprod)) )