Error
ORA-01031: insufficient privileges
Solution
Give sysdba role to sys
SQL> grant sysdba to sys;
If you get this error ->
ORA-01994: GRANT failed: password file missing or disabled
Run following command;
$ orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=alper entries=2 force=y
-> entries; number of users can login as sysdba role
-> force; enable to overwrite current pwd file
Check remote_login parameter
SQL> show parameter remote_login_passwordfile;
If remote_login_passwordfile is not "EXCLUSIVE";
Change it permanently:
add this into init.ora file;
*.remote_login_passwordfile='EXCLUSIVE'
Check who has sysdba role in database lastly
SQL> select * from V$PWFILE_USERS;