Operating System - HP-UX
1827807 Members
2307 Online
109969 Solutions
New Discussion

Re: root user cannot login into ORACLE

 
SOLVED
Go to solution

root user cannot login into ORACLE

Hi all:

We have a 2-party cluster with HPD230 servers and Oracle 8.0.4 binaries on each machine. Tablespaces lie on a shared discs box.

root user on machine2 cannot login into ORACLE when machine1´s root can.

Checking up on environment variables was OK (I think so).

Any suggestion on any aditional cheking???

Thanks for your tim
21 REPLIES 21
Graham Cameron_1
Honored Contributor

Re: root user cannot login into ORACLE

There are many possible reasons.
What are you using to connect, and what is the error message?
-- Graham

Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
Mark Grant
Honored Contributor

Re: root user cannot login into ORACLE

How are you logging into oracle from root and also what error message do you get?
Never preceed any demonstration with anything more predictive than "watch this"
Christian Gebhardt
Honored Contributor

Re: root user cannot login into ORACLE

Hi

if you are using "svmgrl" to connect to the database, your root-User have to be in Database Administrator Group (mostly dba)

Christian
T G Manikandan
Honored Contributor

Re: root user cannot login into ORACLE

If you are using sqlplus then you should be able to connect to the database with properly env. settings.

If you are using svrmgrl,then this executable has permissions for user oracle and group dba.

The root should be added to the dba group

Revert

Re: root user cannot login into ORACLE

Hi again:

Just sqlplus for logging.
2 examples, root user and other user:

AS SUPERUSER:

# sqlplus

SQL*Plus: Release 8.0.4.0.0 - Production on Wed Oct 15 11:5:58 2003

(c) Copyright 1997 Oracle Corporation. All rights reserved.

Enter user-name: taller
Enter password:
ERROR:
ORA-12203: TNS:unable to connect to destination


Enter user-name:

AS OTHER USER:

contal2_contal> sqlplus

SQL*Plus: Release 8.0.4.0.0 - Production on Wed Oct 15 11:7:22 2003

(c) Copyright 1997 Oracle Corporation. All rights reserved.

Enter user-name: taller
Enter password:

Connected to:
Oracle8 Enterprise Edition Release 8.0.4.0.0 - Production
PL/SQL Release 8.0.4.0.0 - Production

SQL>
Graham Cameron_1
Honored Contributor

Re: root user cannot login into ORACLE

This looks like TWO_TASK (although I thought that went out with sql*net v1).
Try "echo $TWO_TASK" as OTHER USER.
Then as root, do "export TWO_TASK=VALUE_ABOVE" (no spaces).
Any good ?
-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
Christian Gebhardt
Honored Contributor

Re: root user cannot login into ORACLE

TNS-12203 unable to connect to destination

Cause: Invalid TNS address supplied or destination is not listening. This error can also occur because of underlying network transport problems.

Action: Verify that the service name you entered on the command line was correct. Ensure that the listener is running at the remote node and that the ADDRESS parameters specified in TNSNAMES.ORA are correct. Finally, check that all Interchanges needed to make the connection are up and running.

-------------------

Variable TNS_ADMIN shows where your "tnsnames.ora" is located, if the variable does not exist the file is under $ORACLE_HOME/network/admin

Chris

Re: root user cannot login into ORACLE

Graham:

Nothing to do with TWO_TASK, neither root user nor OTHER_USER user had this variable set.

Christian:

I can search around tnsnames.ora but if there is any mistake with it, whether root user or the others would be affected ¿?

Thanks guy
Justo Exposito
Esteemed Contributor

Re: root user cannot login into ORACLE

Hi Manuel,

If yo have Oracle as a package you have a name for the package and a IP address for that, then in your tnsnames you must define the connexion to this name and IP in both nodes. If you do this you can connect to the database from the other node.

Regards,

Justo.
Help is a Beatiful word
Justo Exposito
Esteemed Contributor

Re: root user cannot login into ORACLE

Sorry adicionally,

can you attach your tnsnames and an output of cmviewcl -v command?

Regards,

Justo.
Help is a Beatiful word
Christian Gebhardt
Honored Contributor

Re: root user cannot login into ORACLE

Can you exactly tell us which connections does not work ?

-Database is running on machine a
-User root and taller have the same environment on both machines

This connections should work:
machine a:
- both user can connect with sqlplus
- both user can connect with sqlplus@

machine b:
- both user have to connect to the database with sqlplus@

Graham Cameron_1
Honored Contributor

Re: root user cannot login into ORACLE

It must be to do with your environment.
Try "env|grep -e ORA -e SQL -e TNS" from both accounts and compare results.
-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.

Re: root user cannot login into ORACLE

Christian:

-Database is running on machine a
-User root and taller have the same environment on both machines
This connections should work:
machine a:
- both user can connect with sqlplus
DOESN´T WORK WITH root USER
- both user can connect with sqlplus@
WORK WITH both USER
machine b:
- both user have to connect to the database with sqlplus@
WORK WITH both USER

Justo & Graham:

I´m working with your suggestio
Christian Gebhardt
Honored Contributor
Solution

Re: root user cannot login into ORACLE

Hi

ok, as mentioned before try to set TWO_TASK (as User root on a):

export TWO_TASK=

then try again.

Chris


Justo Exposito
Esteemed Contributor

Re: root user cannot login into ORACLE

Hi Manuel,

This is the entry on my tnsnames.ora:
SRP5 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = SRP5)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = SRP5)
)
)

Note that SRP5 is the name of the database (SID), this is defined as well in the /etc/hosts file with his own IP address, and the package name is pkgSRP5.

hope this helps,

Justo.
Help is a Beatiful word
Justo Exposito
Esteemed Contributor

Re: root user cannot login into ORACLE

Hi,

You can probe your tnsnames.ora file with the tnsping command.

Regards,

Justo.
Help is a Beatiful word
Sushil Singh_1
Advisor

Re: root user cannot login into ORACLE

Hi Manuel,
We have almost the same setting as u do. Generally, root don't have ORACLE/BIN in the PATH therefore we can logging from root directly, but I think know the problem.

1) Make sure $ORACLE_HOME/bin is in the PATH
2) Make sure root is in the same group as oracle, generally group name is dba.
3) before logging to svrmgrl or sqlplus, just export the ORACLE_SID
eg. export ORACLE_SID=ORCL

Since I have almost the same configuration, please let me know if this works or not.

Thanks
Sushil Singh

Re: root user cannot login into ORACLE

Christian:

Don´t understand anything, but your last TWO_TASK suggestion worked. Any technical explanation?????

There is some things I still don´t understand:

We have machine1 and machine2 both with same user and Oracle config, root user on machine1 doesn´t have set variable TWO_TASK and can do sqlplus taller/control.

Why is needed TWO_TASK on machine2??????

Ghosts?????

Thanks all for your resp
Steven E. Protter
Exalted Contributor

Re: root user cannot login into ORACLE

Oracle recommends, not using the root user for any database operations.

It has the potential to make shared memory inaccessible, and cause all kinds of other nasty issues.

You should immediatly migrate your procedures and practices to use the user that owns the oracle binaries for these operations. If the binaries are owned by root, that setup is NOT supported by Oracle.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Christian Gebhardt
Honored Contributor

Re: root user cannot login into ORACLE

Hi

I have attached a discussion from metalink, short summary:
- without TWO_TASK set you are connecting via pipes to the oracle server
- with TWO_TASK set you are connecting via TCP and using tnsnames.ora (this will convert "sqlplus" to "sqlplus@")

Hope this will help you
Chris
Christian Gebhardt
Honored Contributor

Re: root user cannot login into ORACLE

Hi

The note that will mentioned in the discussion

Chris