Oracle users can tnsping, ordinary users tnsping the problem of error

Source: Internet
Author: User
Tags reserved file permissions linux

I had an interesting question today.

Oracle users can tnsping, ordinary users tnsping error

When you tnsping a database with a regular user

tns-03505:failed to resolve name

and tnsping the database with an Oracle user, you can ping it.

<34 linux-sit:/home/smsds>tnsping Orarpt

TNS Ping Utility for linux:version 11.1.0.6.0-production on 24-dec-2011 15:33:18

Copyright (c) 1997, 2007, Oracle. All rights reserved.

Used parameter files:

/home/oracle/product/11.1.0/db_1/network/admin/sqlnet.ora

tns-03505:failed to resolve name

Oracle@linux-sit:~/product/11.1.0/db_1/network/admin> tnsping Orarpt

TNS Ping Utility for linux:version 11.1.0.6.0-production on 24-dec-2011 15:35:42

Copyright (c) 1997, 2007, Oracle. All rights reserved.

Used parameter files:

/home/oracle/product/11.1.0/db_1/network/admin/sqlnet.ora

Used TNSNAMES Adapter to resolve the alias

Attempting to contacts (DESCRIPTION = (address = (PROTOCOL = TCP) (HOST = 192.168.0.39) (PORT = 1521)) (Connect_data = (SERVE R = dedicated) (service_name = orarpt)))

OK (0 msec)

What's the reason for that, check the Tnsnames.ora and find out?

oracle@linux-sit:~/product/11.1.0/db_1/network/admin> more Tnsnames.ora

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/

# Tnsnames.ora Network Configuration File:/home/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

Orarpt =

(DESCRIPTION =

(address = (PROTOCOL = TCP) (HOST = 192.168.0.39) (PORT = 1521))

(Connect_data =

(SERVER = dedicated)

(service_name = orarpt)

)

)

Check the file permissions and find the problem here, Tnsnames.ora permissions are problematic

Oracle@linux-sit:~/product/11.1.0/db_1/network/admin> LL

Total 16

-rw-r--r--1 Oracle Oinstall 335 2011-12-22 15:58 Listener.ora

Drwxr-xr-x 2 Oracle Oinstall 144 2011-12-22 15:18 samples

-rw-r--r--1 Oracle Oinstall 187 2007-05-07 23:03 Shrept.lst

-rw-r--r--1 Oracle Oinstall 188 2011-12-22 15:58 Sqlnet.ora

-RW-R-----1 Oracle oinstall 328 2011-12-24 15:21 Tnsnames.ora

Try to modify chmod 755 Tnsnames.ora

Then use ordinary user tnsping, problem solving

<34 linux-sit:/home/smsds>tnsping Orarpt

TNS Ping Utility for linux:version 11.1.0.6.0-production on 24-dec-2011 17:11:50

Copyright (c) 1997, 2007, Oracle. All rights reserved.

Used parameter files:

/home/oracle/product/11.1.0/db_1/network/admin/sqlnet.ora

Used TNSNAMES Adapter to resolve the alias

Attempting to contacts (DESCRIPTION = (address = (PROTOCOL = TCP) (HOST = 192.168.0.39) (PORT = 1521)) (Connect_data = (SERVE R = dedicated) (service_name = orarpt)))

OK (0 msec)

This article is from "Richard's notes-accumulate micro Cheng" blog, please be sure to keep this source http://zxf261.blog.51cto.com/701797/750308

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.