Rip's Domain

More Oracle 0x80004005 errors with linked server

Posted in Oracle, TechSupport by rip747 on January 4, 2008

Yeah… Oracle sucks.

For some reason, I was continuing to get the famous 0x80004005 error even after I got everything to work. When the computer started up, I could perform queries to the linked Oracle server. After a little while though, it would start throwing errors at me and for no reason whatsoever. I searched all over and couldn’t find a solution, so I found it on my own. Here’s what I did.

First thing I did was look at my tnsnames.ora file to see what my configuration was, below is what it looked like (hostnames changed to protect the innocent):

FDEV.EXAMPLE.COM =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = erpdev1.EXAMPLE.COM)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = fdev)
)
)

My sqlnet.ora file was also setup correctly with:

NAMES.DIRECTORY_PATH= (TNSNAMES, HOSTNAME)

Now I could ping erpdev1.example.com and if I ran Net Configuration Assistant I would pass the connection test to fdev.example.com. Thing was though I couldn’t perform a tnsping to fdev.example.com for some reason. On a hunch I opened up my hosts file (c:\windows\system32\drivers\etc) and added an entry. I mapped fdev.example.com to the same ip as erpdev1.example.com and saved. Tried again and everything worked!

To sum up, if you run into this weird problem just add an entry into your hosts file to point your service name to the same ip address as your host.

UPDATE:

I ran into this problem again. It seems like many things cause it. This time I received error #7399. The trick into solving this one for me was to open up my SQLNET.ORA file and to comment my NAMES.DEFAULT_DOMAIN section. Seems that this was confusing oracle when accessing the service name.

Now while commenting out the line fixed my problem. You may have to add something to it. Point is to just make sure it is correct. You will know by trying to make a connection through SQLPLUS and if you get an error complaining that it cannot access the service name, you know the problem.

One Response

Subscribe to comments with RSS.

  1. […] my linked server connection to the Oracle database (if you haven’t been following the saga.. read up on it) and then it just stopped […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: