views:

106

answers:

2

Okay. Forgive me, but I'm going to vent a little here. Visual Studio doesn't recognize my TNSnames for oracle so I can't connect to my database. I believe the problem is that I have multiple homes on my machine, one for me (In C:/app/{UserName}/product/11.1.0) and one general one which was already installed on my machine (In C:/oracle/product/11.1.0) and I don't have access to. I don't know why they can't just giv eme rights to my machine (Its not like I would abuse that power, but rather user it to cut hinderences like not being able to edit your freaking TNSNames file).

Anyway. I need to know if there is a way to change my oracle home for visual studio. I edited my PATH variable in the terminal to point first to MY oracle home (C:/app/...) but that didn't work. So is there another way to change the oracle home for visual studio so I can connect to my database. (Maybe in the .vssettings file???)

Thanks for your support. You guys here at stackoverflow are a great community and I am extremely appreciative of your assistance.

-Matt

+1  A: 

You don't need to change your Oracle HOME directory. Just make sure there's a tnsnames.ora file in the current HOME directory (the one pointed to by the system PATH) with the propery connection settings. Here's a blog post that walks through the entire process of connecting to Oracle in Visual Studio.

Kevin Babcock
A: 

If you have the ability to set a user environment variable, then try setting the variable TNS_ADMIN to a directory where you can create files. Just edit a copy of the current tnsnames.ora so that it contains the entry you need, and place it in the directory pointed at by TNS_ADMIN.

DCookie
Thank you. This was very useful!
Matthew