Oracle Linked Server in SQL Server 2017 - sql-server

I'm trying to set up a linked server from a SQL Server 2017 instance to an Oracle database. I have found similar questions where the question is for Visual Studio and the answer was to install ODAC, but the link provided is to a 32 bit ODAC specifically for VS2017.
Other solutions I have found suggest installing the full Oracle Server. I just need the OraOLEDB.Oracle provider for a LinkedServer on SQL Server. I have the TNSNAMES file and everything and have accomplished this before, but only by installing the full Oracle Server, but that feels like overkill. What is the minimum I would need to install and configure on my SQL Server box to accomplish this? This feels like it should be very easy to accomplish, but for some reason it is not for me.
Many thanks!

OK after several hours I figured this out myself. I needed to install the 64 bit ODAC components from the Oracle Website.
Once I had that I needed to unzip and execute the install.bat batch process from command prompt, running cmd.exe as an administrator
d:\oracle\install.bat all c:\oracle odac
*Note above, you can download your ODAC to anywhere, for me it was a directory I created in d:\oracle... and you can install to anywhere, but I think c:\oracle is common.
Once I did that, I needed to add c:\oracle and c:\oracle\bin to my PATH environment variable.
So this was quite simple in the end. Hope this helps someone else trying to navigate the same challenge.

Related

Completely uninstall SQL. Have hidden instance

I have an instance titled 'SQLEXPRESS' remaining, when I try to install SQL 2014.
I have uninstalled every program with SQL in the name from Add/remove programs.
I cannot remove this, how can I perform a complete uninstall?
Maybe try to restart your machine.
Also you can find help on the Microsoft website

Connect to remote Oracle Database

I needed to make an application connect with a oracle database located in the same network (ping the host works fine), but not in the same machine (i.e. an remote server). I developed then a software using Qt and I was able to connect it successfully with that database from my machine, but I'm not being able to do it from the machine my software is supposed to be located during its functioning. I've tried to understand what is so special about my machine that on it my software is able to connect with the Oracle database while it's not able to do the same in the right machine, and it seems that the only different thing is that I've installed the Oracle database here, while I'm not allowed to do the same there.
The error returned by Qt is that I'm simply unable to logon, while the QOCIDriver returns that it wasn't possible to create the environment. Interestingly enough, the same problem was occurring with me on my machine during the time I didn't have the Oracle database installed and neither the Oracle Client something. And this Oracle Client something is already installed in the official machine with no positive results.
So I'ld like to know exactly what I need to do to make my software works. Install the database after all in the official machine? Not viable. Install the Oracle Client? I've already done it. Add the ORACLE_HOME registry/environment variable? Did both. ^^ Copied the dbhome_1/BIN folder with lots of dlls and .exe to the official machine? Did it already, and that only made it began to crash while trying to connect to the database. And now I'm out of solutions...
I'm glad for any help!
Momergil
After some days of trying, finally I was able to solve my problem.
Essentially I had to copy the Oracle database installer to the official computer and active the Oracle Universal Installer choosing the option "Install only the database softwares", i.e., not the database itself. After that, it run fine.

SQL Server 2008 R2 Install Won't Work

I'm trying to install the developer edition of SQL Server 2008 R2. I run the setup as admin, but after it installs the "Setup Support Files", it closes and returns back to the installation center screen.
Any ideas?
I had this same problem and it appears to be something to do with previous versions leaving behind elements in their install/uninstall. I fixed it by running the Microsoft install/uninstall utility linked below. During the process you are asked what program you are trying to install and MSSQL Server 2008 R2 is listed. After running this the install continued after the "Setup Support Files" stage. Hope it helps!
http://support.microsoft.com/mats/Program_Install_and_Uninstall
So does it even installs Support files? You can check it by looking into "Programs and Features" (if using Windows Vista or 7) and if it is not there then it is not even installing support files. In that case may be you are missing components required for Support files itself (e.g. older version of Windows Installer).
Sometimes, SQL Server installer itself acts funny and without any reason it just crashes. Did you tried to run it again? Or try to run the installer after rebooting your system (I know this sound like a too rookie advice but in many cases rebooting OS solves issue).
The problem started when I change the shared folder directory from \Program Files(86)\SQL Server to custom folder. If I could have rename back to default, it should have been fine but I stop the installation and restart the install again assuming it will install fresh, but it did not and it hangs all the time.
I appreciate the comment from Lee, as per his advice I ran the fix it tool from Microsoft. The tool finds SQL Server 2008 R2 installed and I choose to uninstall.
When re-install the SQL Engine, it went through because this time, I did not change the Share Folder location and leave it to the default. I think this is some kind of bug in the SQL Installation. I wonder why Installation has to hang...!
The problem might be the location of the Setup Support Files.
Remove all the Setup Support Files using Control Panel/Uninstall Program.
After that install SQL 2008 from the beginning.

sql server 2008 express setup problem

I previously had sql server 2005 express and uninstalled it.. I also uninstalled any vs related programs and installed visual web developer 2008 express edition with SP1. now that I am trying to install sql server 2008, I am seing error messages like no other and leave that alone without any suggestions..
the latest one which I could not come to a proper solution on the internet is;
consistency validation for sql server registry keys error which suggests
"The SQL Server registry keys from a prior installation cannot be modified. To continue, see SQL Server Setup documentation about how to fix registry keys.
as you might have guessed nothing so informative in the documentation... Also, when I try to delete any sql server related registry key, it does not let me. (yes I stopped all the related services..)
anybody here that can be of any assistance?
You can try with this procedure :
Stop all SQL Server Services
Remove all SQL Server Services with sc delete servicename
Control Panel - Add/Remove Programs - Select and Remove all Microsoft
SQL Server programs
Open regedit and remove all SQL Server folders in this registry key: HKEY_LOCAL_MACHINE/ SOFTWARE/MICROSOFT
Remove SQL Server folders from Program Files directory
Reboot
This procedure should resolve the issue, i've resolved with this procedure ...
i found this to happen if you had an add-in for SSMS installed which hasn't been uninstalled before ssms was uninstalled.
You may need to change the permissions on the relevant registry keys using regedt32 first so that you can then delete the keys via normal regedit
Well actually, I believe, one should not go through such mess in order to accomplish a simple task like this. In the end, I ended up formatting my PC and re-installing SQL Server.
I know this is an old question and you already said in comments that you reformatted the machine. However, I just ran into this exact message and wanted to share my solution because it was so easy, but the error message didn't help at all!
I was using the wrong installation package. I had a 64-bit Intel Windows 7 computer and I was trying to use the x86 version of SQL Server 2008. Once I found the correct version (x64) I did not get this error and the install proceeded normally.
I had a similar problem because I still had some remnants of SQL Server 2005 left - not the services, it was some parts of the IDE. Anyway, to resolve it I used the option to upgrade (sorry, I can't remember the exact option just now). After running the upgrade portion, which took a few minutes, I could then run the full install with no problems.

WMI Configuration Error on SQL 2005 install

SQL Server 2005 is giving me the following error during the "System Check" portion of the initial install: "The SQL Server Configuration Checker cannot be executed due to WMI configuration on the machine Error:2147749907 (0x80041013)."
Machine is a Dell D620 running XP SP2.
I found a batch command online that is supposed to fix the problem, but it didn't work.
Any ideas?
Manju Madhavan on my team finally found the answer:
rundll32.exe setupapi,InstallHinfSection WBEM 132 %windir%\inf\wbemoc.inf
The setup asked for long list of files that I had to search around to find. Some were in the i386 folder on the XP SP3 disk, some in %windir%/system32. As the installer would stop and ask for a file I would search around until I found a copy.
Manju found the answer online and documents it on her blog.
Are you running Microsoft Operations Manager on your server?
May I suggest disabling any services that utilise the WMI interface, so any performance monitoring software you are using, just whilst you install SQL Server.
Cheers, John
Run
type or copy paste rundll32.exe setupapi,InstallHinfSection WBEM 132 %windir%\inf\wbemoc.inf
Connect your Windows XP SP3 CD
Find out "i386" folder and click enter and it will copy some file from there and will ask for a .mof file.
Search for the .mof file in where you installed Windows
Copy the location of that file and click OK.
Start installing the SQL Server 2005 and I'm sure you will face no more problems.
I don't know what script did you find, but the one I ran worked like a
charm. I'm putting here this answer for the ones that got to this post
looking for that error message like I did.
Just execute this .bat file.
Source: Pinal Dave's SQL Authority Blog

Resources