- This article explains the step by step procedure to install Oracle 12c Release 2 (12.2.0.1) database software on oracle linux 6 x86-64 or redhat enterprise linux 6 x86-64 with pictorial representation. Installation Option 3. Here Three options are available in this screen.
- Oracle Database 19c. Oracle Database 19c offers market-leading performance, scalability, reliability, and security both on-premises and in the cloud. And since it’s the Long Term Release of the Oracle Database 12c and 18c family of products, it provides the highest level of release stability and longest time frame for support and bug fixes.
- Starting with Oracle Grid Infrastructure 12 c Release 2 (12.2), the installation media is replaced with a zip file for the Oracle Grid Infrastructure installer. Run the installation wizard after extracting the zip file into the target home path. At any time during installation, if you have a question about what you are being asked to do, or what input you are required to provide during.
In this section, you will be installing the Oracle Database and creating an Oracle Home User account. Expand the database folder that you extracted in the previous section. Double-click setup. Click Yes in the User Account Control window to continue with the installation. The Configure Security Updates window appears.
-->This article describes how to set up a linked server from a computer that is running Microsoft SQL Server to an Oracle database and provides basic troubleshooting steps for common errors you may experience when you set up a linked server to an Oracle database.
Original product version: Microsoft SQL Server 2005 Standard Edition, Microsoft SQL Server 2005 Developer Edition, Microsoft SQL Server 2005 Enterprise Edition, Microsoft SQL Server 2005 Express Edition, Microsoft SQL Server 2005 Workgroup Edition
Original KB number: 280106

Summary
This article describes how to set up a linked server from a computer that is running Microsoft SQL Server to an Oracle database and provides basic troubleshooting steps for common errors you may experience when you set up a linked server to Oracle. Most of the information in this article is applicable to environments that are configured to use Microsoft OLEDB Provider for Oracle (MSDAORA). Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Instead, use Oracle's OLE DB provider.
For more information on configuring a linked server using Oracle’s OLEDB provider review How to get up and running with Oracle and Linked Servers.
Important
The current version of the Microsoft ODBC Driver for Oracle complies with the ODBC 2.5 specification, while the OLE DB Provider for Oracle is a native Oracle 7 OCI API provider. Both the driver and provider use the SQL*Net Client (or Net8 client for Oracle 8x) and the Oracle Call Interface (OCI) library, and other Oracle client components, to connect to Oracle databases and retrieve data. The Oracle client components are important, and must be configured correctly to successfully connect to Oracle databases using both the driver and the provider.
From Microsoft Data Access Components (MDAC) version 2.5 and later versions, both the Microsoft ODBC Driver and OLE DB Provider support ONLY Oracle 7 and Oracle 8i with the following limitations:
Oracle 8.x-specific data types, such as CLOB, BLOB, BFILE, NCHAR, NCLOB, and NVARCHAR2, are not supported.
The Unicode feature against Oracle 7.x and 8.x servers is not supported.
Multiple Oracle client instances, or multiple Oracle homes, are not supported because they rely on the first occurrence of the Oracle home in the SYSTEM PATH variable.
Returning multiple resultsets from a stored procedure or batch SQL statement is not supported using ADO or OLEDB.
Nested outer joins are not supported.
XML persistence is not supported.
Version greater than 8i are not supported using these drivers.
Note
The third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.
Steps to set up a linked server to Oracle
You must install the Oracle client software on the computer that is running SQL Server where the linked server is set up.
Install the driver you want on the computer that is running SQL Server. Microsoft only supports Microsoft OLE DB Provider for Oracle and Microsoft ODBC Driver for Oracle. If you use a third-party provider or a third-party driver to connect to Oracle, you must contact the respective vendor for any problems that you may experience by using their provider or driver.
If you use Microsoft OLE DB Provider for Oracle and Microsoft ODBC Driver for Oracle, consider the following:
Both the OLE DB provider and the ODBC driver that are included with Microsoft Data Access Components (MDAC) require SQL*Net 2.3.x, or a later version. You must install the Oracle 7.3.x client software, or a later version, on the client computer. The client computer is the computer that is running SQL Server.
Make sure that you have MDAC 2.5, or a later version, installed on the computer that is running SQL Server. With MDAC 2.1, or with an earlier version, you cannot connect to databases that use Oracle 8. x or a later version.
To enable MDAC 2.5, or later versions, to work with Oracle client software, the registry must be modified on the client computer that is running SQL Server as indicated in the following table.
Restart the computer that is running SQL Server after you install the Oracle client software.
On the computer that is running SQL Server, set up a linked server by using the following script.
Note
If you use Microsoft ODBC Driver for Oracle, you can use the
@datasrcparameter to specify a DSN name. For a DSN-less connection, the provider string is supplied through the *@provstr* parameter. With Microsoft OLE DB Provider for Oracle, use the Oracle server alias that is configured in the TNSNames.Ora file for the *@datasrc* parameter. For more information, see the 'sp_addlinkedserver' topic in SQL Server Books Online.

Common error messages and how to troubleshoot them
Important
This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base: 322756 How to back up and restore the registry in Windows
You can use either of the following two methods to retrieve extended information about any error that you experience when you execute a distributed query.
Method 1
Connect to SQL Server using SQL Server Management Studio and run the following code to turn on trace flag 7300.
Method 2
Capture the 'OLEDB Errors' event that is located in the 'Errors and Warnings' event category in SQL Profiler. The error message format is the following:
Interface::Method failed with hex-error code.
You can look up hex-error code in the Oledberr.h file that is included with the MDAC Software Development Kit (SDK).
The following is a list of common error messages that may occur, together with information about how to troubleshoot the error message.
Option Oracle Download
Note
If you are using SQL Server 2005 or later versions, these error messages may be slightly different. However, the error IDs of these error messages are same as them in older versions of SQL Server. Therefore, you can identify them by the error IDs.For performance-related issues, search SQL Server Books Online for the Optimizing Distributed Queries topic.
Message 1
Error 7399: The OLE DB provider '%ls' for linked server '%ls' reported an error. %ls
Turn on trace flag 7300 or use SQL Profiler to capture the OLEDB Errors event to retrieve extended OLEDB error information.
Message 2a
'ORA-12154: TNS:could not resolve service name'
Message 2b
'The Oracle(tm) client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 (or greater) client software installation'
These errors occur when there is a connectivity issue to Oracle server. Review Techniques to troubleshoot connectivity issues to Oracle server section below for additional troubleshooting.
Message 3
Error 7302: Cannot create an instance of OLE DB provider ‘MSDAORA’ for linked server '%ls'.
Make sure that the MSDAORA.dll file is registered correctly. (The MSDAORA.dll file is the Microsoft OLE DB provider for Oracle file.) Use RegSvr32.exe to register Microsoft OLE DB Provider for Oracle.
Note
If you use a third-party Oracle provider, and your Oracle provider cannot run outside a SQL Server process, enable it to run in-process by changing the provider options. To change the provider options, use one of the following methods.
Method 1Locate the following registry key. Then, change the value of the AllowInProcess (DWORD) entry to 1. This registry key is located under the corresponding provider name:
HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSSQLServerProvidersProviderName.Method 2Set the Allow InProcess option directly through SQL Server Enterprise Manager when you add a new linked server. Click Provider Options , and then click to select the Allow InProcess check box.
Message 4
Error 7303: Cannot initialize the data source object of OLE DB provider ‘MSDAORA’ for linked server '%ls'. [OLE/DB provider returned message: ORA-01017: invalid username/password; logon denied] OLE DB error trace [OLE/DB Provider 'MSDAORA' IDBInitialize::Initialize returned 0x80040e4d].
This error message indicates that the linked server does not have correct login mapping. You can execute the
sp_helplinkedsrvloginstored procedure to set the login information correctly. Also, verify that you have specified the correct parameters for the linked server configuration.Message 5
Error 7306: Cannot open the table ' %ls' from OLE DB provider 'MSDAORA' for linked server '%ls'. The specified table does not exist. [OLE/DB provider returned message: Table does not exist.][OLE/DB provider returned message: ORA-00942: table or view does not exist] OLE DB error trace [OLE/DB Provider 'MSDAORA' IOpenRowset::OpenRowset returned 0x80040e37: The specified table does not exist.].
Error 7312: Invalid use of schema and/or catalog for OLE DB provider '%ls' for linked server '%ls'. A four-part name was supplied, but the provider does not expose the necessary interfaces to use a catalog and/or schema.
Error 7313: An invalid schema or catalog was specified for the provider '%ls' for linked server '%ls'.
Error 7314: The OLE DB provider '%ls' for linked server '%ls' does not contain the table '%ls'. The table either does not exist or the current user does not have permissions on that table.
If you receive these error messages, a table may be missing in the Oracle schema or you may not have permissions on that table. Verify that the schema name has been typed by using uppercase. The alphabetical case of the table and of the columns should be as specified in the Oracle system tables.
On the Oracle side, a table or a column that is created without double quotation marks is stored in uppercase. If the table or the column is enclosed in double quotation marks, the table or the column is stored as is.
The following call shows if the table exists in the Oracle schema. This call also shows the exact table name.
Message 6
Error 7413: Could not connect to linked server '%ls' (OLE DB Provider '%ls'). Enable delegation or use a remote SQL Server login for the current user. Msg 18456, Level 14, State 1, Line 1 Login failed for user '.
This error message indicates that a distributed query is being attempted for a Microsoft Windows authenticated login without an explicit login mapping. In an operating-system environment in which security delegation is not supported, Windows NT authenticated logins need an explicit mapping to a remote login and password created using
sp_addlinkedsrvlogin.Message 7
Error 7391: The operation could not be performed because OLE DB provider 'MSDAORA' for linked server '%ls' was unable to begin a distributed transaction. OLE DB error trace [OLE/DB Provider 'MSDAORA' ITransactionJoin::JoinTransaction returned 0x8004d01b]
Verify that the OCI versions are registered correctly as described earlier in this article.
Note
If the registry entries are all correct, the MtxOCI.dll file is loaded. If the MtxOCI.dll file is not loaded, you cannot perform distributed transactions against Oracle by using Microsoft OLE DB Provider for Oracle or by using Microsoft ODBC Driver for Oracle. If you are using a third-party provider and you receive Error 7391, verify that the OLE DB provider that you are using supports distributed transactions. If the OLE DB provider does support distributed transactions, verify that the Microsoft Distributed Transaction Coordinator (MSDTC) is running and has network access enabled.
Message 8
Error 7392: Cannot start a transaction for OLE DB provider 'MSDAORA'for linked server '%ls'. OLE DB error trace [OLE/DB Provider 'MSDAORA' ITransactionLocal::StartTransaction returned 0x8004d013: ISOLEVEL=4096].
The OLE DB provider returned error 7392 because only one transaction can be active for this session. This error indicates that a data modification statement is being attempted against an OLE DB provider when the connection is in an explicit or implicit transaction, and the OLE DB provider does not support nested transactions. SQL Server requires this support so that, on certain error conditions, it can terminate the effects of the data modification statement while continuing with the transaction.
If
SET XACT_ABORTis ON, SQL Server does not require nested transaction support from the OLE DB provider. Therefore, executeSET XACT_ABORT ONbefore you execute data modification statements against remote tables in an implicit or explicit transaction. Do this in case the OLE DB provider that you are using does not support nested transactions.
Techniques to troubleshoot connectivity issues to Oracle server
To debug the Oracle connectivity issues with either the Microsoft ODBC driver for Oracle or the Microsoft OLE DB Provider for Oracle, follow these steps:
Use the Oracle SQL Plus utility (a command line-based query utility) to verify that you can connect to Oracle and retrieve data.
Note
If you cannot connect to Oracle and retrieve data, you either have a bad install or configuration of the Oracle Client Components or you have not correctly created a Transparent Network Substrate (TNS) service alias for the Oracle server when you used the SQL*Net Easy Configuration or Oracle Net8 Easy Configuration utility. Contact your Oracle database administrator (DBA) to verify that the Oracle components that you must have are correctly installed and configured.
Verify the version of the Oracle client (SQL*Net version) that is installed on the computer. Both the Microsoft ODBC driver for Oracle and the Microsoft OLE DB Provider for Oracle require the installation of SQL*Net version 2.3 or later on the client computer.
The connectivity from SQL Plus (the Oracle client query tool) may appear to function, but you must restart your computer for the ODBC/OLE DB connectivity to function correctly.
Note
When you use Oracle 8i, the .rgs file is empty.
If the Oracle client is installed, and you receive an error that indicates that Oracle Client Components 7.3 or later must be installed on the computer, then verify that the environmental variable PATH on the client computer contains the folder in which the Oracle client was installed such as, Oracle_RootBin. If you cannot find this folder, then add the folder to the PATH variable to resolve the error.
Verify that the Ociw32.dll file is in the Oracle_Rootbin folder. This .dll file cannot exist at any other location on the client computer. Make sure that the Oracle Client Component DLLs (for example, the Core40.dll file and the Ora*.dll file) do not exist outside the Oracle_Root folder or subfolders.
Verify that a single Oracle client version is installed on the computer. Multiple versions of SQL*Net cannot exist on the same client computer with interferes and with critical operations (for example, TNS and alias lookups).
Microsoft recommends that you have a local install of the Oracle client and not do this by mapping a remote Oracle client on your computer and then include it in the path of the system to connect to Oracle through ODBC/OLE DB. But the provider and driver are tested with a locally installed Oracle client and not on a network share.
See Also
Complete this procedure to install Oracle Grid Infrastructure software for Oracle Domain Services Cluster.
Starting with Oracle Grid Infrastructure 12c Release 2 (12.2), the installation media is replaced with a zip file for the Oracle Grid Infrastructure installer. Run the installation wizard after extracting the zip file into the target home path.
At any time during installation, if you have a question about what you are being asked to do, or what input you are required to provide during installation, click the Help button on the installer page.
You should have your network information, storage information, and operating system users and groups available to you before you start installation, and you should be prepared to run root scripts.
As the user that owns the software for Oracle Grid Infrastructure for a cluster (grid) on the first node, install Oracle Grid Infrastructure for a cluster. Note that the installer uses Secure Shell (SSH) to copy the binary files from this node to the other nodes during the installation. During installation, in the Cluster Node Information window, when you specify the nodes in your cluster, you can click SSH Connectivity and the installer configures SSH connectivity between the specified nodes for you.
Note:
These installation instructions assume you do not already have any Oracle software installed on your system.To install the software for Oracle Domain Services Cluster:
- As the
griduser, download the Oracle Grid Infrastructure image files and extract the files into the Grid home. For example:grid.zipis the name of the Oracle Grid Infrastructure image zip file. For example, on Linux systems, the name of the Oracle Grid Infrastructure image zip file islinuxx64_12201_grid_home.zip.Note:
You must extract the zip image software into the directory where you want your Grid home to be located.
Download and copy the Oracle Grid Infrastructure image files to the local node only. During installation, the software is copied and installed on all other nodes in the cluster.
- Log in as the
griduser, and start the Oracle Grid Infrastructure installer by running the following command:The installer starts and the Select Configuration Option window appears. - Choose the option Configure Grid Infrastructure for a New Cluster, then click Next.
- Choose the option Configure an Oracle Domain Services Cluster, then click Next.The Grid Plug and Play Information window appears.
- In the Cluster Name and SCAN Name fields, enter the names for your cluster and cluster scan that are unique throughout your entire enterprise network.
You can select Configure GNS if you have configured your domain name server (DNS) to send to the GNS virtual IP address name resolution requests for the subdomain GNS serves, as explained in this guide.
For cluster member node public and VIP network addresses, provide the information required depending on the kind of cluster you are configuring:
If you plan to use automatic cluster configuration with DHCP addresses configured and resolved through GNS, then you only need to provide the GNS VIP names as configured on your DNS.
If you plan to use manual cluster configuration, with fixed IP addresses configured and resolved on your DNS, then provide the SCAN names for the cluster, and the public names, and VIP names for each cluster member node. For example, you can choose a name that is based on the node names' common prefix. This example uses the cluster name
myclusterand the cluster SCAN name ofmycluster-scan.
The Cluster Node Information screen appears. - In the Public Hostname column of the table of cluster nodes, you should see your local node, for example
node1.example.com.The following is a list of additional information about node IP addresses:
For the local node only, OUI automatically fills in public and VIP fields. If your system uses vendor clusterware, then OUI may fill additional fields.
Host names and virtual host names are not domain-qualified. If you provide a domain in the address field during installation, then OUI removes the domain from the address.
Interfaces identified as private for private IP addresses should not be accessible as public interfaces. Using public interfaces for Cache Fusion can cause performance problems.
When you enter the public node name, use the primary host name of each node. In other words, use the name displayed by the
/bin/hostnamecommand.
- Click Add to add another node to the cluster.
- Enter the second node's public name (
node2), and virtual IP name (node2-vip), then click OK.You are returned to the Cluster Node Information window. You should now see all nodes listed in the table of cluster nodes. Make sure the Role column is set to HUB for both nodes. To add Leaf Nodes, you must configure GNS. - Make sure all nodes are selected, then click the SSH Connectivity button at the bottom of the window.The bottom panel of the window displays the SSH Connectivity information.
- Enter the operating system user name and password for the Oracle software owner (
grid). Select the option If you have configured SSH connectivity between the nodes, then select the Reuse private and public keys existing in user home option. Click Setup.A message window appears, indicating that it might take several minutes to configure SSH connectivity between the nodes. After a short period, another message window appears indicating that passwordless SSH connectivity has been established between the cluster nodes. Click OK to continue. - When returned to the Cluster Node Information window, click Next to continue.
- Select the usage type for each network interface displayed.Verify that each interface has the correct interface type associated with it. If you have network interfaces that should not be used by Oracle Clusterware, then set the network interface type to Do Not Use. For example, if you have only two network interfaces, then set the public interface to have a Use For value of Public and set the private network interface to have a Use For value of ASM & Private.Click Next. The Create ASM Disk Group window appears.
- Provide the name and specifications for the Oracle ASM disk group.
- In the Disk Group Name field, enter a name for the disk group, for example DATA.
- Choose the Redundancy level for this disk group. Normal is the recommended option.
- In the Add Disks section, choose the disks to add to this disk group.
When you have finished providing the information for the disk group, click Next.The Grid Infrastructure Management Repository Option window appears - Provide the name and specifications for the GIMR disk group.
- In the Disk Group Name field, enter a name for the disk group, for example
DATA1. - Choose the Redundancy level for this disk group. Normal is the recommended option.
- In the Add Disks section, choose the disks to add to this disk group.
- Select the Configure Rapid Home Provisioning Server option to configure a Rapid Home Provisioning Server as part of the Oracle Domain Services Cluster. Rapid Home Provisioning enables you to install clusters, and provision, patch, and upgrade Oracle Grid Infrastructure and Oracle Database homes.
When you have finished providing the information for the disk group, click Next. - In the Disk Group Name field, enter a name for the disk group, for example
- Choose the same password for the Oracle ASM SYS and ASMSNMP account, or specify different passwords for each account, then click Next.The Failure Isolation Support window appears.
- Select the option Do not use Intelligent Platform Management Interface (IPMI), then click Next.
- If you have Enterprise Manager Cloud Control installed in your enterprise, then choose the option Register with Enterprise Manager (EM) Cloud Control and provide the EM configuration information. If you do not have Enterprise Manager Cloud Control installed in your enterprise, then click Next to continue.You can manage Oracle Grid Infrastructure and Oracle Automatic Storage Management (Oracle ASM) using Oracle Enterprise Manager Cloud Control. To register the Oracle Grid Infrastructure cluster with Oracle Enterprise Manager, ensure that Oracle Management Agent is installed and running on all nodes of the cluster.The Privileged Operating System Groups window appears.
- Accept the default operating system group names for Oracle ASM administration and click Next.
- Specify the directory to use for the Oracle base for the Oracle Grid Infrastructure installation, then click Next. The Oracle base directory must be different from the Oracle home directory.If you copied the Oracle Grid Infrastructure installation files into the Oracle Grid home directory as directed in Step 1, then the default location for the Oracle base directory should display as
/u01/app/grid.If you have not installed Oracle software previously on this computer, then the Create Inventory window appears. - Change the path for the inventory directory, if required. Then, click Next.If you are using the same directory names as the examples in this book, then it should show a value of
/u01/app/oraInventory. The group name for theoraInventorydirectory should showoinstall.The Root Script Execution Configuration window appears. - Select the option to Automatically run configuration scripts. Enter the credentials for the root user or a sudo account, then click Next.Alternatively, you can Run the scripts manually as the
rootuser at the end of the installation process when prompted by the installer. - If any of the checks have a status of Failed and are not Fixable, then you must manually correct these issues. After you have fixed the issue, you can click the Check Again button to have the installer recheck the requirement and update the status. Repeat as needed until all the checks have a status of Succeeded. Click Next.
The Summary window appears.
- Review the contents of the Summary window and then click Install. The installer displays a progress indicator enabling you to monitor the installation process.
- If you did not configure automation of the root scripts, then you are required to run certain scripts as the
rootuser, as specified in the Execute Configuration Scripts window appears. Do not click OK until you have run the scripts. Run the scripts on all nodes as directed, in the order shown.For example, on Oracle Linux you perform the following steps (note that for clarity, the examples show the current user, node and directory in the prompt):
As the
oracleuser onnode1, open a terminal window, and enter the following commands:Enter the password for the
rootuser, and then enter the following command to run the first script onnode1:After the
orainstRoot.shscript finishes onnode1, open another terminal window, and as theoracleuser, enter the following commands:Enter the password for the
rootuser, and then enter the following command to run the first script onnode2:After the
orainstRoot.shscript finishes onnode2, go to the terminal window you opened in part a of this step. As therootuser onnode1, enter the following commands to run the second script,root.sh:Press Enter at the prompt to accept the default value.
Note:
You must run the
root.shscript on the first node and wait for it to finish. f your cluster has three or more nodes, thenroot.shcan be run concurrently on all nodes but the first. Node numbers are assigned according to the order of runningroot.sh. If you want to create a particular node number assignment, then run the root scripts in the order of the node assignments you want to make, and wait for the script to finish running on each node before proceeding to run the script on the next node. However, Oracle system identifier, or SID, for your Oracle RAC databases, do not follow the node numbers.After the
root.shscript finishes onnode1, go to the terminal window you opened in part c of this step. As therootuser onnode2, enter the following commands:After the
root.shscript completes, return to the OUI window where the Installer prompted you to run theorainstRoot.shandroot.shscripts. Click OK.The software installation monitoring window reappears.
When you run
root.shduring Oracle Grid Infrastructure installation, the Trace File Analyzer (TFA) Collector is also installed in the directory.grid_home/tfa. - After
root.shruns on all the nodes, OUI runs Net Configuration Assistant (netca) and Cluster Verification Utility. These programs run without user intervention. - During the installation, Oracle Automatic Storage Management Configuration Assistant (
asmca) configures Oracle ASM for storage. - Continue monitoring the installation until the Finish window appears. Then click Close to complete the installation process and exit the installer.
Caution:
After installation is complete, do not remove manually or run cron jobs that remove /tmp/.oracle or /var/tmp/.oracle directories or their files while Oracle software is running on the server. If you remove these files, then the Oracle software can encounter intermittent hangs. Oracle Clusterware installations can fail with the error:
CRS-0184: Cannot communicate with the CRS daemon.
Install Procedural Option Oracle Sql
After your Oracle Domain Services Cluster installation is complete, you can install Oracle Member Clusters for Oracle Databases and Oracle Member Clusters for Applications.

Install Procedural Option Oracle Vm
Parent topic:Installing Oracle Grid Infrastructure for a New Cluster