When I'm attempting to tnsping my database from the server it is stored on, I keep getting error code 3509, however I can ping my database from clients. I've checked naming in tnsnames.ora and all is as it should be. Any ideas???

Things to check:

More than one installation of oracle on the server or more than one oracle_home. If so you will have multiple tnsnames.ora files. If this is not the case then try setting TNS_ADMIN to point to the Oracle_home\network\admin directory.

Regards

Alistair

Wish I could change the title of this thread now! Under orders from my supervisor, I stopped the database from services and killed the db to reinstall a fresh. Ran our scripts to build the bare bones shell of our db but nothing else and attempted to tnsping from our client which we knew to work 1st time round but got error saying there was no listner service. Checked services and although the db listner service (not replication one) was set to Automatic, it hadn't started and failed to start manually saying "Error 2140: An internal Windows NT error occured" - naturally, tnsping from server to its own db doesn't work either. I have a feeling I may have to re-build the server from scratch if daniweb users don't turn up any solutions, which may not be all bad as I can get an image of a pre-db server off a colleague who I'm working alongside.

Okay, go to the oracle_home\network\admin directory and check that you have a listener.ora file and tnsnames.ora file. If not then use the Net Manager utility to configure the listener and start it from the command line using

c:\> lsnrctl start

This should create the service and start the listener. The database should self register with the listener if you have service_names parameter set.

Regards

Alistair

Yeah, listner.ora & tnsnames.ora are in the oracle_home/network/admin directory and opening they are pointing at the right db and at the right host/key name. Replies will have to be to this thread unfortunately Alistair, as I'm leaving work for the night (have no hair left to tear out!).

Btw, the cmd line given below just threw up a TON of errors, too many to list...

Yes, it would. It shows that the listener is failing. Can you post the contents of the listener, tnsnames and sqlnet.ora files or email them to me? I will have a look at them.

I will also need hostname / ip address and database instance name.

Cheers

Alistair

I'm sorry, I can't give you that information. Giving you these details may just help me solve my problem, but will more than likely result in serious diciplinary action too. Thanks anyway though! I'll just do it the long way, not good fault finding but saves me losing my job.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.