문제

I'm trying to use this command to be able to login in sqlplus directly(without inputting username and password)

sqlplus /@db_name

but i'm experiencing this error

ORA-01017: invalid username/password; logon denied

i granted to an OPS$ user

GRANT CONNECT TO ops$user;

올바른 솔루션이 없습니다

다른 팁

OK, as database is on local machine, you shouldn't have to use @db_name, "sqlplus /" should work fine - just ensure that environment variable ORACLE_SID is setup correctly. Note please ensure that when creating user you specified "IDENTIFIED EXTERNALLY". Note you have to be logged in to machine as "user"; I recall if on Windows may also need domain as part of Oracle username.

This is the script I use to login as an os authenticated user. Please pay attention to the init setting "os_authent_prefix". If it is set to "OPS$" and you want to keep it that way, you will have to modify the script so the username you create is prefixed by "OPS$".

Best of luck!

--------------------------------------------------------------------------------
-- name:    create_os_user.sql
-- purpose:
-- author:  Bjarte Brandt
-- date:    25.10.2010
-- remarks:
--   alter system set os_authent_prefix='' scope=spfile;
--------------------------------------------------------------------------------
set ver off

prompt parameter OS_AUTHENT_PREFIX has to be empty.
prompt

show parameter os_authent_prefix

set term off

column col noprint new_value os_user
select upper(SYS_CONTEXT('USERENV','OS_USER')) col from dual;

set term on

prompt
prompt Create user: "&os_user"
create user "&os_user" identified externally;
grant dba to "&os_user";


set ver on
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top