I was wondering if someone could give me some pointers on how to connect to an Oracle Database from stored procedure in SQL Server.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Firstly on your SQL Server server you will need to install Oracle Client Tools, the reason behind this is any machine that wants access to a Oracle Database will need the necessary Oracle Client Tools installed to access it.
Secondly you will need to configure the file “tnsnames.ora” that is installed with the above configured to point to the required Oracle Server/Database that you want to connect to.
Now you will need to create a Linked Server from your SQL Server management studio for that server to the oracle server.
Then in your stored procedure you have to follow the rule of:
[SERVER_NAME].[DATABASE].[OWNER].[OBJECT] in order of accessing thing on the oracle database, but keep in mind this is SQL Server syntax and there might be some minor twiking needed.
This is a rough outline and I hope it has set you on your way.