Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle can only login as sysdba / can't login with configured user?

Tags:

oracle

So I created the user w3038519 in the Oracle database configuration as I was installing Oracle yet it does not let me login with it.

C:\Users\Chris>sqlplus w13038519/mypass

SQL*Plus: Release 12.1.0.1.0 Production on Fri Aug 14 00:26:16 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

ERROR:
ORA-01017: invalid username/password; logon denied

Could the account be locked somehow? Is there any way I can unlock it or create another user? The following doesn't work

sqlplus w13038519/mypass as sysdba
sqlplus osauthentication/anyuserpass as sysdba

SQL> create user chris
  2  identified by chrispass
  3  ;
create user chris
            *
ERROR at line 1:
ORA-65096: invalid common user or role name

SQL> create user C##chris
  2  identified by chrispass
  3  ;
create user C##chris
*
ERROR at line 1:
ORA-65048: error encountered when processing the current DDL statement in
pluggable database PDBORCL
ORA-01031: insufficient privileges

I can't do anything I need to with sysdba because you can't create triggers logged in sysdba

I watched some tutorial and the person just setup sysdba as I have done and now can't use triggers.

I hate oracle so much. It's so retarded to use the most unideal platform there is

like image 646
Polarbearz Avatar asked Nov 09 '22 07:11

Polarbearz


1 Answers

You have created a container database instead of a traditional one. In this case, When you use / as sysdba, you connect to the root container, where you can not create reguler users, only common users (starting with c##), so your user w13038519 can not exist in the root container. Run the below query:

select con_id from cdb_users where username = 'W13038519';

    CON_ID
----------
         3

This should return the container database where your user was created. If you get no result, your user does not exist. To find the name of the container:

SQL> select name from v$pdbs where con_id = 3;

NAME
------------------------------
PDB1

If you have a TNS entry pointing to that container database, you can connect as:

sqlplus w13038519/september23@PDB1

If you do not need the Multitenant Architechture specifically, you will save yourself a lot of trouble by creating a traditional database.

like image 116
Balazs Papp Avatar answered Nov 15 '22 09:11

Balazs Papp