A developer called me up and asked whether I could access the database. I did a quick check. Nope. So I told him that I could not. Upon hearing that, the developer declared that there was no way to do his work. He then gave up. What? That can't be it. At the very least you got to tell someone else and have them resolve the problem.
I decided to do a little digging. The way I knew there was no database access was that I tried a "tnsping". That command checks to see if the database can be contacted. I got back an error that the target host or object does not exist. Now that might mean that the actual database was down. However I tried accessing the database from another machine and found that it was up and running.
So I dug a little deeper. We configure our workstations to use a tnsnames file to resolve database aliases. I ensured that we were using the configuration file that that DBAs set up. Then I made sure that file existed. So far so good. Finally I checked that our database alias was in that configuration file. It was.
Next I looked at the configuration data for our alias. The config file just translates the alias to a domain name and a port on that machine where the database listens. I tried a regular ping of the domain name of the server. Bamm. My machine could not resolve the domain name. Well I found out the IP address of our server. When I plugged that into a local copy of the config file, the door was opened. Full access to the database.
The problem must be some sort of Domain Name Server issue. Ping cannot resolve my well known domain name. Time to get the network guys involed. I don't even have to bother my DBA team.
Reproducing a Race Condition
-
We have a job at work that runs every Wednesday night. All of a sudden, it
aborted the last 2 weeks. This caused some critical data to be late. The
main ...