Oraoledb oracle не удается найти указанный поставщик
В этой теме рассматривается ряд вопросов, которые могут возникнуть при настройке и использовании издателя Oracle.
Возникает ошибка SQL Server 21684
«Разрешений, связанных с именем входа администратора для издателя Oracle «%s», недостаточно».
Чтобы проверить разрешения, предоставленные пользователю, выполните следующий запрос: SELECT * from session_privs . Результат выполнения должен быть аналогичен следующему:
CREATE PUBLIC SYNONYM
DROP PUBLIC SYNONYM
14 Answers 14
I had the same issue after installing the 64 bit Oracle client on Windows 7 64 bit. The solution that worked for me:
- Open a command prompt in administrator mode
- cd \oracle\product\11.2.0\client_64\BIN
- c:\Windows\system32\regsvr32.exe OraOLEDB11.dll
If you have multiple different Oracle products across several versions then you might also need to use regsrv32.exe on those other versions as well, depending on which Oracle client is causing the exception.
For those who've stumbled on this post but have the 32-bit Oracle client on a Win 7 64-bit machine, be sure to use the path: C:\Windows\SysWOW64\Regsvr32.exe (and of course refer to the proper Oracle 32-bit BIN dir)
At a command prompt, cd is the command for "change directory". Not all machines will have Oracle installed in the same place, so you may have to modify step 2 to match your installation folder.
I had the same issue using IIS.
Make sure the option 'Enable 32bit Applications' is set to true on Advanced Configuration of the Application Pool.
Do the following test:
Open a Command Prompt and type: tnsping instance_name
where instance_name is the name of the instance you want to connect (if it's a XE database, use "tnsping xe"
If it returns ok, follow steps of Der Wolf's answer. If doesn't return ok, follow steps of Annjawn's answer.
It solved for me in both cases.
- Right Click on My Computer
- Click on properties
- Click on Advanced System Settings
- Click on "Environment Variables" button.
- In the system Variable section find the "PATH" variable
- Edit the "PATH" variable and add Oracle installation path to it (from your local machine) like ;C:\oracle\product\10.2.0\client_1\bin
If you have windows 64 bits, try to install oracle driver 32 bits first then 64 bits driver, thats what i do and is working
It only worked for me after I changed the 'Platform target' to 'x64' (considering I'm using Oracle 12c 64 bits)
To do that, I did:
Right click on the project name (at the Solution Explorer panel locate, in general, at the left)
Clicked on 'Build' (in the new opened window)
Changed the 'Platform target' from 'Any CPU' to 'x64'
That solved the problem.
I had the same issue but my solution was to keep the Platform target as Any CPU and UNCHECK Prefer 32-bit checkbox. After I unchecked it I was able to open a connection with the provider.
After spend hours to fix that; and for some who installed it uncorrectly, you need to uninstall current version and reinstall it again as Administrator
Full "Administrator" Client is not required. You can also use "Custom" where you have to enable component "Oracle Provider for OLE DB"
just check for which architecture you installed the driver
open Powershell both in 32 and 64 (seperate instance) and fire up:
If you find that you are running in 64-Bit mode, you may want to try switching to 32-Bit (or vice versa). You can follow this guide to force your application to run as 64 or 32 bit (X64 and X86 respectively). You have to make sure that Platform Target in your project properties is not set to Any CPU and that it is explicitley set.
Switching that option from Any CPU to X86 resolved my error and I was able to connect to the Oracle provider.
My team would stumble upon this issue every now and then in random machines that we would try to install our platform in (we use oracle drivers 12c ver 12.2.0.4 but we came across this bug with other versions as well)
After quite a bit of experimentation we realized what was wrong:
Said machines would have apps that were using the machine-wide oracle drivers silently locking them and preventing the oracle driver-installer from working its magic when would attempt to upgrade/reinstall said oracle-drivers. The sneakiest "app" would be websites running in IIS and the like because these apps essentially auto-start on reboot. To counter this we do the following:
- Disable IIS from starting automagically on restart. Do the same for any other apps/services that auto-start themselves on reboot.
- Uninstall any previous Oracle driver and double-check that there are no traces left behind in registry or folders.
- Reboot the machine
- (Re)Install the Oracle drivers and re-enable IIS and other auto-start apps.
- Reboot the machine
If this doesn't work then rinse repeat until the OLE DB drivers work. Hope this helps someone out there struggling to figure out what's going on.
I am almost not familiar with VBA (have had some courses back at school and that's it). Now I need to connect to Oracle database (which is running on remote server) from Excel file. I've goggled around and found some examples. So, there is the following code I have written so far:
I believe there are many problems in this code, but at the moment it fails when trying to execute .Open, saying, that "Provider cannot be found. It may not be properly installed" . After that I've found that I need to download and install ORAOLEDB.dll. I did this by installing ORAOledb11.dll (I've tried both 32 bit and 64 bit, thou my machine is 64 bit). I've installed it by executing regsvr32 OraOLEDB11.dll .
Unfortunately the problem is till there. So, what could be the steps to troubleshoot this problem? Can I somehow ensure, that Oraoledb is properly installed on my machine?
Any tips would be greatly appreciated.
I believe that should help: dzone.com/snippets/excel-make-query-oracle In general, connecting Oracle to Excel is much more complicated than e.g. "native" MSSQL. Good luck!
Go into Regedit and see if the key HKEY_CLASSES_ROOT\OraOLEDB.Oracle exists. The OLEDB driver is not installed by default when you install an Oracle client (you have installed an Oracle Client haven't you?). Incidentally this syntax is also wrong the Data Source is the entry in the TNSNAMES file that refers to your database. But this will not give you the error you're getting.
Ошибка Oracle ORA-01000
Репликация использует курсоры в издателе Oracle в процессе добавления статей в публикацию. Во время этого процесса возможно превышение максимально допустимого количества курсоров, доступных на издателе. Если это происходит, возникает следующая ошибка:
«ORA-01000: превышение максимального числа открытых курсоров»
Для исключения этой проблемы необходимо убедиться, что для параметра max_open_cursors в базах данных Oracle установлено достаточно большое число (по меньшей мере, 1 000). Дополнительные сведения об этой установке приводятся в документации Oracle.
Ошибка SQL Server 21624 или 21629
Если используется клиентское программное обеспечение Oracle версии 10g, поставщиком является OraOLEDB10.dll, для версии 9i — это OraOLEDB.dll. Поставщик устанавливается в каталог %ORACLE_HOME%\BIN (например, в «C:\oracle\product\10.1.0\Client_1\bin»). Если обнаружено, что поставщик Oracle OLEDB не установлен на распространителе, установите его с установочного диска клиентского программного обеспечения Oracle, предоставляемого корпорацией Oracle. Дополнительные сведения см. в статье Настройка издателя Oracle.
- regsvr32 OraOLEDB10.dll или regsvr32 OraOLEDB.dll .
Ошибка Oracle ORA-01555
Следующая ошибка базы данных Oracle относится не к репликации моментального снимка, а к тому, как Oracle строит подходящие для чтения представления данных:
"ORA-01555: слишком старый моментальный снимок"
При помощи объектов, называемых сегментами отката, Oracle создает пригодные для чтения представления данных на момент выдачи инструкции SQL. Ошибка «слишком старый моментальный снимок» может возникнуть, если данные отката переписываются другими, одновременно выполняющими сеансами. До версии Oracle 9i для уменьшения частоты появления этой ошибки рекомендовался метод увеличения размера или количества сегментов отката и назначения больших транзакций для определенных сегментов отката.
В Oracle 9i корпорация Oracle ввела концепцию табличного пространства UNDO, заменяющую сегмент отката. Для предотвращения ошибки «слишком старый моментальный снимок» в Oracle 9i рекомендуется следующее:
Создайте табличное пространство UNDO с достаточным количеством свободного места.
Установите гарантию хранения для табличного пространства (для версий Oracle 10G и выше).
Настройте параметры инициализации Oracle UNDO_MANAGEMENT и UNDO_RETENTION.
Дополнительные сведения об исключении причин ошибки «слишком старый моментальный снимок» см. в документации Oracle.
Ошибка Oracle ORA-22285
Если в таблице имеется столбец BFILE, данные для столбца хранятся в файловой системе. Административной учетной записи репликации должно быть предоставлено право доступа в каталог, в котором хранятся данные. С этой целью должно использоваться следующее синтаксическое выражение:
GRANT READ ON DIRECTORY TO
«ORA-22285: несуществующий каталог или файл для операции FILEOPEN»
Ошибка SQL Server 21620
При соединении с базой данных Oracle, версия которой предшествует версии 8.1, для публикации Oracle необходимо, чтобы версия клиентского программного обеспечения Oracle, установленного на распространителе, была не ниже 9. При соединении с базой данных Oracle 8.1 или более поздней версии рекомендуется, чтобы версия клиентского программного обеспечения Oracle была не ниже 10.
«Версия SQL*PLUS, доступная через переменную системного пути, в настоящее время недостаточна для поддержки публикации Oracle. Убедитесь, что на распространителе установлена текущая версия клиентской программы Oracle».
Если на распространителе установлено несколько версий клиентского программного обеспечения Oracle, убедитесь, что самая последняя версия не ниже 9, и что переменная системного пути ссылается вначале на эту версию (ссылки на другие версии могут использоваться, если самая последняя версия располагается первой). Дополнительные сведения о редактировании переменной системного пути см. в приводимом выше разделе «Ошибка SQL Server 21617».
3 Answers
If you are trying to use Oracle OLEDB provider, what is the point to test ODBC connection?
They have nothing to do with each other.
I would suggest to create a udl flle, and check there what OLEDB provider is installed.
And upon selection a proper Oracle OLEDB provider, you can test the connection.
You should see something like below. I don't have Oracle OLEDB provider installed on my machine, but you should see and select Oracle's provider, and proceed to the Connection tab to test the connection.
UPDATE
Upon testing your connections successfully via udl file, you can open that udl file in notepad. It will reveal for you the entire connection string that is working. You can go now to SSIS, and compare its Oracle connection properties vs. connection in the udl file. Specially the provider attribute of the connection in SSIS. If there is a discrepancy, you can adjust it to match what is in the udl file.
I created a udl-oracle file as you suggested and the test connection was successful for oracle procider for OLE DB
However when I try to test connection on SSIS it still fails with the error "
Test connection failed because of an error in initializing provider. The 'OraOLEDB.Oracle.1' provider is not registered on the local machine."
OraOLEDB.Oracle.1' is not registered on local machine SSIS
][1]
I have uninstalled and reinstalled oracle client,
I installed both 32 & 64 bit drivers to local machine,
made sure the ODBC test connection is working but I still get the error
Ошибка, касающаяся клиентского и сетевого программного обеспечения Oracle
«Не удалось подключиться к серверу с помощью [поставщика Microsoft OLE DB для Oracle]. Клиентские и сетевые компоненты Oracle не найдены. Эти компоненты поставляются корпорацией Oracle и являются частью установочного пакета клиентского программного обеспечения Oracle 7.3.3 или более поздней версии. Поставщик не может функционировать, пока эти компоненты не будут установлены».
Если на распространителе устанавливается подходящее клиентское программное обеспечение Oracle, то убедитесь в том, что SQL Server остановлен, а затем перезапустите его после завершения установки клиентского ПО. Это необходимо SQL Server для распознавания клиентских компонентов.
Если проверено, что эти разрешения предоставлены и что компоненты установлены должным образом, но эта ошибка продолжает возникать, убедитесь в правильности значений настроек в разделе реестра HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI.
Для Oracle 10g правильными являются следующие значения настроек:
Для Oracle 9i правильными являются следующие значения настроек:
Ошибка SQL Server 21642, связанная с повторяющимся именем входа связанного сервера
«Для разнородных издателей необходим связанный сервер. Связанный сервер с именем " " уже существует. Удалите связанный сервер или выберите другое имя издателя».
Эта ошибка может возникнуть при попытке непосредственно создать связанный сервер, или если ранее была удалена связь между издателем Oracle и распространителем SQL Server , и теперь предпринимается попытка перенастроить издатель. Если эта ошибка возникает при попытке перенастроить издатель, удалите связанный сервер с помощью sp_dropserver (Transact-SQL).
Если вам нужно подключиться к издателю Oracle через подключение связанного сервера, создайте другое имя службы TNS и используйте это имя при вызове процедуры sp_addlinkedserver (Transact-SQL). Сведения о создании имен службы TNS см. в документации Oracle.
2 Answers 2
32-bit OS
I managed to get this working on Windows XP virtual machine by downloading oracle OLEDB provider from Oracle official website Oracle10g Provider for OLE DB Version 10.1.0.4.0. Current working link OLEDB for older OS (32 - bit)
But be aware it will replace JDK and JRE to lower version (It can be prevented by playing with the configuration xml - products.xml - I did not have enough of mental health potion, so I did full install instead). Afterwards you need to delete reference in environment variables as it may effect other programs. After installation, I registered OraOLEDBxx.dll with regsvc32
I was connecting to oracle db 11G with excel 2003. :)
Connection string
I had to enable extensions (ActiveX Data Object and record libraries). My function returning connection was:
64-bit OS but 32-bit Office
When our VMs migrated to 64-bit Windows 7 with Excel 2010. Make sure you will download ODAC - Oracle Data Access Components - for right -bit version of your excel installation because I had 32-bit excel installed and thought it was 64-bit (as windows is 64-bit) so I was giving birth trying to get this working with 64-bit ODAC version. Afterwards I did download 32-bit version and it works just as before. For installation just follow install instructions included in downloaded archive folder.
Currently, I have an excel 2010 application that users on Windows XP 32 bit are using to connect to an Oracle 32-bit database and extract data back into Excel. Each time they open the Excel file, the VBA code automatically creates a new connection using Provider =ORA.OLEDB.Oracle Provider. All users using the Excel file have installed Oracle 9.2.1 run-time client on their machine. All of that works well currently for over 100+ users on Windows XP 32-bit
Starting very shortly our company is moving to Windows 7 64-bit. We acquired a test PC with Windows 7 64-bit and Excel 2010 32-bit. We tried to install Oracle 9.0.2 run-time client but we couldn't connect to the database ( even with Sql Plus). We therefore downloaded Oracle 10g 10.2.04 Run-time client. With this installed, we were able to connect to via SQL Plus to the database. However, using the same Excel file and the following same VBA code.
-------
Set cn = New ADODB.Connection
cn.Open ThisWorkbook.getDBCon()
Public Function getDBCon()
getDBCon = "Provider=OraOLEDB.Oracle;" & _
"Data Source=MyOracleDB;" & _
"User ;Password Provider Not Found error". The VBA code and file work perfect in XP 32-bit. It seems going over to Windows 64-bit has caused issues with the file's macro. I am looking for help assessing if I have more of an Oracle Client issue or a Microsoft ADO issue. Any input would be greatly appreciated. Thank You.
Распространителю SQL Server не удается подключиться к экземпляру базы данных Oracle
Если распространителю SQL Server не удается подключиться к издателю Oracle, необходимо убедиться в следующем:
Необходимое программное обеспечение Oracle установлено на распространителе.
База данных Oracle доступна в режиме в «сети» и к ней не удается подключиться при помощи такого средства, как SQL*Plus.
Имя входа, которое репликация использует для подключения к издателю Oracle, имеет достаточно разрешений. Дополнительные сведения см. в статье Настройка издателя Oracle.
Имена TNS, определенные во время настройки издателя Oracle, приводятся в файле tnsnames.ora.
Используются правильные значения Oracle Home и пути. Даже если есть только один набор исполняемых файлов Oracle, установленных на распространителе SQL Server , проверьте, чтобы были правильно установлены переменные среды, относящиеся к Oracle Home. При изменении значений переменных среды необходимо остановить и перезапустить SQL Server , чтобы эти изменения вступили в действие.
Дополнительные сведения о настройке и проверке подключения см. в подразделе "Установка и настройка клиентского сетевого программного обеспечения Oracle на распространителе SQL Server" раздела Настройка издателя Oracle.
Ошибка SQL Server 21628
«Не удалось обновить реестр распространителя "%s", чтобы позволить поставщику OLEDB для Oracle (OraOLEDB.Oracle) запускаться в процессе с SQL Server. Убедитесь, что пользователю с текущим именем входа разрешается вносить изменения в разделы реестра, принадлежащие SQL Server ».
Для системы публикации Oracle необходимо, чтобы запись реестра существовала и была установлена в 1 для 64-разрядных распространителей. Если запись не существует, SQL Server будет пытаться создать ее. Если запись существует, но установлена в 0, установка не изменится, и настройка издателя Oracle завершится неудачей.
Для просмотра и изменения установки реестра выполните следующие действия:
В диалоговом окне Выполнить введите regedit, затем нажмите кнопку OK.
Перейдите к папке HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\ \Providers.
В папке для поставщиков (Providers) должна находиться папка с именем OraOLEDB.Oracle. В этой папке должна присутствовать DWORD-переменная с именем AllowInProcess, которой присвоено значение 1.
Если обнаружено, что переменная AllowInProcess установлена в 0, обновите запись реестра до 1:
Щелкните правой кнопкой мыши запись, затем щелкните Изменить.
В диалоговом окне Изменение строкового параметра введите 1 в поле Значение поля .
Издатель Oracle связан с другим распространителем
«Экземпляр "OraclePublisherName>" сервера Oracle ранее использовал "SQLServerDistributorName>" в качестве распространителя. Чтобы использовать "NewSQLServerDistributorName>" в качестве его распространителя, необходимо удалить текущую конфигурацию репликации на экземпляре сервера Oracle, в результате чего будут удалены все публикации на этом экземпляре сервера».
«Сервер Oracle "OracleServerName>" уже определен в качестве издателя "OraclePublisherName>" на распространителе "SQLServerDistributorName>. ". Для повторного создания удалите издатель или открытый синоним " "».
При удалении издателя Oracle объекты репликации в базе данных Oracle автоматически очищаются. Однако в некоторых случаях необходима ручная очистка объектов репликации Oracle. Для ручной очистки объектов репликации Oracle, созданных при репликации, выполните следующее:
Подключитесь к издателю Oracle с разрешениями администратора базы данных.
Выполните команду SQL DROP PUBLIC SYNONYM MSSQLSERVERDISTRIBUTOR; .
Answers
The last time Oracle 9.anything was fully supported dinosaurs still roamed the earth.
Oracle 10.anything was put into extended support mode many months ago.
If you are going to do anything use currently supported versions . that means 11.0.7 or 11.2.0.3.
That said I am still struggling to understand how, in 2012, anyone can justify connecting an Excel spreadsheet to an Oracle database. Consider using the right tool for the job . and no matter what the job is . Excel isn't it.
Yea agreed with Excel to Oracle comment. This is due to issues with global implementation of an ERP system and the disconnets between IT and Business. Therefore the business intelligence tables in oracle are most easily pulled and acted on by novice PC users via Excel. In the business, Excel is the standard tool novice non-IT people feel comfortable in to share and act on data. Most of these users have no IT knowledge whatsoever, so we create buttons and filters for them to query and then massage in Excel as they see fit.
Having said that, still wondering if it's a ADO or Oracle Client issue. This is something beyond my knowledge. I wouldn't imagine it's the Visual Basic issue since this same file works in Windows XP. I am not in the position to just scrap Excel as the business relies on this in production and I am the only support. What could 64 bit vs 32 bit differences be having here? Thank You.
If the data is from an ERP system and you are in either North America, Europe, or Japan (probably other countries too) you can not legally make decisions based on data where the providence is in question.
Oracle data is audited and secured. Once numbers are in an Excel spreadsheet there is no way to verify their accuracy.
Ok. I guess I am asking the wrong question perhaps. My question is not about legality of data or security. That would be a separate topic here. My concern is not about people altering data in Excel. This was a solution developed by a Gold Certified Oracle professional as a quick solution to get data to the business( fully aware there's better ways to do it).
My concern is why isn't the ORAOLEDB.Oracle provider working in a 64 bit environment based on the error the vba code is generating. I have installed the Oracle Client. The only difference is the 64-bit OS. Has anyone had similair issues? Thank You again. I am not an IT professional, but responsible for this, so any help fixing my particular problem would be much appreciated. Thank You.
I am having the same problem with a macro I am supporting, but my case is slightly different. The same macro works fine both in XP and Win7 (new machine). However, for those who just upgraded to Win7 with Oracle client already installed, the macro simply can't find the OraOLEDB provider. Were you able to find a solution to your problem back in March if don't mind sharing it? For now, I asked the user to get HelpDesk to reinstall Oracle 11g Client.
Возникает ошибка SQL Server 21626 или 21627
- «Невозможно подключиться к серверу базы данных Oracle "%s" с помощью поставщика OLEDB для Oracle (OraOLEDB.Oracle)».
Ошибка SQL Server 21663 возникает из-за отсутствия первичного ключа
«Не найден правильный первичный ключ для исходной таблицы [TableOwner>].[TableName>]»
Сведения о требованиях для первичных ключей см. в подразделе «Уникальные индексы и ограничения» раздела Design Considerations and Limitations for Oracle Publishers.
Ошибка SQL Server 21617
«Не удается запустить SQL*PLUS. Убедитесь, что на распространителе установлена текущая версия клиентской программы Oracle».
Попытайтесь найти SQL*PLUS на распространителе. Для установки клиента Oracle 10g имя этого исполняемого файла — sqlplus.exe. Обычно данная программа устанавливается в каталог %ORACLE_HOME%/bin. Чтобы убедиться, что путь SQL*PLUS содержится в системном пути, проверьте значение системной переменной Path:
Щелкните правой кнопкой мыши Мой компьютер, затем выберите Свойства.
Перейдите на вкладку Дополнительно , затем щелкните Переменные среды.
В диалоговом окне Переменные среды , в списке Системные переменные выберите переменную Path и щелкните Изменить.
В диалоговом окне Изменение системной переменной выполните следующие действия: если в текстовом поле Значение переменной путь к папке, содержащей sqlplus.exe, отсутствует, измените строку, чтобы она содержала этот путь.
Если на распространителе не удается найти sqlplus.exe, установите на распространителе текущую версию клиентского программного обеспечения Oracle. Дополнительные сведения см. в статье Настройка издателя Oracle.
Проблемы, связанные с разрешениями для пользовательской схемы репликации
Пользовательская схема репликации должна иметь разрешения, описанные в подразделе "Создание пользовательской схемы вручную" раздела Настройка издателя Oracle.
Выполнены изменения, требующие перенастройки издателя
Для изменения таблиц метаданных репликации или процедур необходимо удалить и перенастроить издатель. Чтобы перенастроить издатель, необходимо удалить издатель и настроить его вновь при помощи среды SQL Server Management Studio, Transact-SQL или объектов RMO. Дополнительные сведения о настройке издателя см. в разделе Настройка издателя Oracle.
Удаление издателя Oracle (среда SQL Server Management Studio )
Подключитесь к распространителю для издателя Oracle в среде SQL Server Management Studio , а затем раскройте узел сервера.
Щелкните правой кнопкой мыши Репликация, затем щелкните Свойства распространителя.
На странице Издатели диалогового окна Свойства распространителя снимите флажок для издателя Oracle.
When I hit a button to connect to the database I run into the error regarding the oracle provider not being registered on my local machine.
A clear, step by step outline of how I can fix this quickly would be much appreciated.
The exact error message is:
'OraOLEDB.Oracle.1' provider is not registered on the local machine
Читайте также: