Operating System - HP-UX
1752806 Members
5588 Online
108789 Solutions
New Discussion юеВ

Re: sqlplus connection error

 
Ronelle van Niekerk
Regular Advisor

sqlplus connection error

We're a little stumped as to why root does not have "sufficient privelages" when connecting to the database via sqlplus.

[/opt/OV/bin/OpC]openview> sqlplus

SQL*Plus: Release 9.2.0.1.0 - Production on Fri Aug 15 09:58:32 2003

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Enter user-name: / as sysdba
ERROR:
ORA-01031: insufficient privileges


When we run sqlplus as oracle and connect in the same way we can get into the database.

btw: we have to connect from root because the script that is giving us errors has to be run by root.

Any ideas?

-Ronelle
rm -r /it/managers
11 REPLIES 11
Brian Crabtree
Honored Contributor

Re: sqlplus connection error

Root is most likely not in the DBA group (or group that you specified on installation). This is required for a connection as sysdba to occur.

You shouldn't do maintenence from the root account. It is better to work from the oracle or DBA account.

Thanks,

Brian
Ronelle van Niekerk
Regular Advisor

Re: sqlplus connection error

Brian,

Thanks - I tried putting root in the dba group but it still didn't help.

We're running this as root because it is part of the opcconfig script that sets up the database. This script is run by root....
rm -r /it/managers
twang
Honored Contributor

Re: sqlplus connection error

Can this works:

1. login as root
2.change path to the oracle/bin directory
3.su - oracle
4.enter ./sqlplus (If that doesn't work, enter the full pathname: /oracle/bin/sqlplus)
Ronelle van Niekerk
Regular Advisor

Re: sqlplus connection error

Twang,

I mentioned before that the oracle user can connect via sqlplus.

The problem is with the root user connecting via sqlplus.

-Ronelle

rm -r /it/managers
Con O'Kelly
Honored Contributor

Re: sqlplus connection error

Hi Ronelle

I presume you're talking about an OVO (ITO) install here and are trying to setup the Oracle DB?

Its been a while since I did an ITO install but you run the opcconfig script as root & this prompts you for a whole series of questions related to the DB. Is it during the script that the sqlplus connection is failing?
I may be going over you ground you've already covered but prior to running opcconfig I think you need to set $ORACLE_HOME, $ORACLE_SID & maybe a few other Oracle variables?

On my OVO server, when I'm logged in as user root I cannot connect to the DB and get exactly the same error message you posted.

Can you advise when you get this error message, during the script execution or attempting a manual sqlplus connection as user root.

Cheers
Con
twang
Honored Contributor

Re: sqlplus connection error

It is quite common for the 'root' user to be required to have 'connect internal' privilege. Unfortunately it is also common for the root users primary group to be the group 'daemon' which precludes it from being allowed to connect internal. There are two ways to tackle this problem:
a) Make the root users PRIMARY group the DBA group
or b) Where available use the 'newgrp' command to change the users
primary group to the DBA group.
Eg: $ newgrp dbagroup
$ svrmgrl
SVRMGR> connect internal
This can also be used in shellscripts thus:
newgrp dbagroup <
Ronelle van Niekerk
Regular Advisor

Re: sqlplus connection error

Thanks for the replies!

Con, you're right, on the production server we can't connect as root either so this is obviously not where the problem lies.

TYhis is the error from teh opcconfig command that prompted me to test it :

Checking, if Oracle Net listener is already configured ..

Found the following names in tnsnames.ora:
ov_net

NOTE: Oracle Net listener alias ov_net used.
Assuming Oracle Net listener is configured by VPO.
Creating the ITO tables ...
Error opcdbinst(12636) : Database: ORA-01017: invalid username/password; logon d
(OpC50-15)
Could not connect to database ov_net.
Please look if the database processes are running. (OpC50-2)
ERROR: Error occurred in the program opcdbinst during creation of the
database tables.
ERROR: An error ocurred running opcdbsetup
-------> Do you want to continue the configuration (y/n) n


Does anyone have any ideas as to which user opcdbinst is trying to connect as?
Or why it cannot connect
rm -r /it/managers
Con O'Kelly
Honored Contributor

Re: sqlplus connection error

Hi Ronelle

Afraid I can't be much help. The only suggestion I could make would be to go through the Installation Guide again & recheck all the steps ie oracle, opc users set up correctly, correct groups, umask settings, required variables correctly defined, perms on directories/files etc etc. Its possible that its some small little thing like that.

Another thing, I don't know much about TNS Names & SQL*NET setup but might be worth getting a DBA to check this setup etc.

I'd also post this message in the OpenView ITO forums:
http://forums.itrc.hp.com/cm/CategoryHome/1,,162,00.html

Cheers
Con O'Kelly
Honored Contributor

Re: sqlplus connection error

Hi Ronelle

One other thing, opcconfig script has lots of hard coded stuff in it & often relies on a completely standard Oracle DB install. I'd also go back & check the DB install etc.

Have a search on the ITRC forums, there's loads of threads on opcconfig problems/failures etc. One of them might point you in the right direction.

Cheers
Con