I am trying to login to oracle sqlplus using system/manager but unable to do.
I logged in using sys user and then ran
ALTER USER SYSTEM IDENTIFIED BY manager;
It said user changed but then when I did
CONN SYSTEM/manager
It says invalid login/password.
Please tell me what I am doing wrong
make sure the sec_case_sensitive_logon parameter set to false
Please, post your SQL*Plus session which shows what exactly you did and how Oracle responded - just like in my example:
SQL> show user
USER is "SYS"
SQL> alter user system identified by manager;
User altered.
SQL> conn system/manager
Connected.
SQL>
Related
I'm attempting to run the following command as I am trying to get logminer to log my database. When I run the following command, I get a response of Insufficient Privileges
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
I have to run it as a specific user, so I need to know what Granted Roles and/or System Privileges are required to run this statement.
I'm not a DBA (and stuff like that are supposed to be run by DBA), but: privileged user should grant you (as you said that you'll be running it yourself) the ALTER DATABASE privilege:
scott is just a poor user:
SQL> show user
USER is "SCOTT"
SQL>
SQL> alter database add supplemental log data;
alter database add supplemental log data
*
ERROR at line 1:
ORA-01031: insufficient privileges
A privileged user is SYS (if you don't have any other):
SQL> connect sys as sysdba
Enter password:
Connected.
SQL> grant alter database to scott;
Grant succeeded.
Back to scott, re-run the statement:
SQL> connect scott/tiger
Connected.
SQL> alter database add supplemental log data;
Database altered.
SQL>
That's the minimum. You could have also granted the DBA role to scott, with the same effect (regarding this very statement, but - DBA is much more powerful):
To illustrate it, revoke the privilege first:
SQL> connect sys as sysdba
Enter password:
Connected.
SQL> revoke alter database from scott;
Revoke succeeded.
Does it still work? Of course not:
SQL> connect scott/tiger
Connected.
SQL> alter database add supplemental log data;
alter database add supplemental log data
*
ERROR at line 1:
ORA-01031: insufficient privileges
Grant DBA role:
SQL> connect sys as sysdba
Enter password:
Connected.
SQL> grant dba to scott;
Grant succeeded.
Does it work now? Yes, it does:
SQL> connect scott/tiger
Connected.
SQL> alter database add supplemental log data;
Database altered.
SQL>
whenever I'm trying to connect with scott it is showing invalid username/password,
tried this:
alter user scott account unlock;
SP2-0640: Not connected
alter user scott identified by tiger;
SP2-0640: Not connected
Go to the Installing path of the Oracle 11g In default it is present C: Drive, then move to C:\oraclexe\app\oracle\product\11.2.0\server\rdbms\admin
here you can find a file named scott.sql
Open the SQL Command Line and login as conn system/ (password set during the installation of oracle 11g)
Run the Below script (Note: File name is appended at the end)
# C:\oraclexe\app\oracle\product\11.2.0\server\rdbms\admin\scott.sql
Now you can query the SELECT * FROM all_users; to see the scott schema created
Alternatively you can do this by using SQL developer by creating a connection to SYSTEM and run the above script
After the creation the default username : SCOTT password: TIGER
In the comment part i especially asked for querying
select count(1) from dba_users where username = 'SCOTT';. I'd like to learn if user exists.
For the message you get ORA-01017,
the First possible reason is what message tells us(invalid
username/password).
Secondly, you may not have an account named SCOTT. i.e. the above
query gives 0(zero).
In this case :
you should create mentioned user ( when you're connected to system ):
SQL> conn system/pwd
Connected.
SQL> create user scott identified by tiger;
and grant related privileges :
SQL> grant connect to scott;
SQL> grant resource to scott;
and then you can connect by issuing :
SQL> conn scott/tiger
Connected.
Connect with a DBA Account and Issue an Alter User Command
The error you are seeing indicates you are no longer connected to the database. You were logged in as system#db, but when you tried to connect as scott#db, you no longer have a database connection.
Here I replicate your experience:
SYSTEM#db>conn system#db as sysdba
Enter password:
Connected.
SYS#db>conn scott#db
Enter password:
ERROR:
ORA-01017: invalid username/password; logon denied
#>alter user account scott unlock;
SP2-0640: Not connected
#>alter user scott identified by tiger;
SP2-0640: Not connected
Here I reconnect and then issue an alter user command to unlock the user account and set a new password.
#>conn system#db as sysdba
Enter password:
Connected.
SYS#db>ALTER USER scott IDENTIFIED BY tiger ACCOUNT UNLOCK;
User altered.
SYS#db>conn scott/tiger#db
Connected.
Addendum
My steps provided assumed you had the scott schema installed. If the scott schema does not exist, it would be good to see if the default 11g database sample schemas exist.
The schema account scott is no longer a default schema in the 11g database. The 11g documentation states:
"Oracle used the schema SCOTT with its two prominent tables EMP and
DEPT for many years. With advances in Oracle Database technology,
these tables have become inadequate to show even the most basic
features of Oracle Database and other Oracle products. "
I would recommend reviewing to see if the other default sample schemas are installed. The hr account is most similar to the scott schema.
Here is a list of common sample schema usernames:
username IN (
'HR',
'OE',
'PM',
'SH',
'IX'
)
Check to see if the person whom performed the installation used the database configuration assistant and opted to install the sample schemas.
If the schemas were not created at the time of installation, the document, "Oracle® Database Sample Schemas 11g Release 1 (11.1) B28328-03", describes the steps to do this in chapter 2, Installation.
Open Oracle sql developer.
In the sql developer paste the path of scott.sql file(C:\oraclexe\app\oracle\product\11.2.0\server\rdbms\admin\scott.sql) with '#' infront of it.
# C:\oraclexe\app\oracle\product\11.2.0\server\rdbms\admin\scott.sql
Run script
Script Output -> Connection created by CONNECT script command disconnected
Connect using SQL Command Line
conn scott/TIGER;
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
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.
create user C##TESTDB identified by TESTDB container = all;
ORA-65048: error encountered when processing the current DDL statement in
pluggable database PDBORCL
ORA-01031: insufficient privileges
in my case this worked
alter session set "_oracle_script"=true;
create user C##TESTDB identified by TESTDB;
user created;
> sqlplus / as sysdba
SQL> alter session set container=pdborcl;
SQL> select username, password from dba_users
where username like '%JAVA%';
USERNAME
------------------------------------------------------------
PASSWORD
------------------------------------------------------------
JAVA
C##JAVA
SQL>
when i created the IDs, i set up passwords in JAVA.
i couldn't log in SQL DEVELOPER and i got a error message, ORA-01017.
i tried to enter the password of lowercase and uppercase.
i tried to change the passwords.
SQL> alter user java identified by java;
succeed
SQL> alter user java identified by java11;
succeed
but...... because of same problem, i couldn't log in.
how can i do to solve this trouble?
my oracle is 11g.
I am getting the following error while connecting to db for checking db timings through QTP scripts:
"Cannot update system time with database time due to error: ERROR: [Oracle][ODBC][Ora]ORA-28000: the account is locked"
But the database SID and credentials given are correct and verified the same in some db client. I am not sure why its throwing error in QTP?
Can anyone please help me resolve the issue?
1) Login to your Oracle Database using admin privileges:
cmd> sqlplus / as sysdba
or
cmd> sqlplus system/{systemPassword}#{OracleSID}
2) Unlock your user's account using the following command:
sql> alter user {yourDbUser} account unlock;
3) Still in SQL*Plus command prompt, prevent account locks to not occur again:
sql> ALTER PROFILE "DEFAULT" LIMIT PASSWORD_LIFE_TIME UNLIMITED;
sql> ALTER PROFILE "DEFAULT" LIMIT FAILED_LOGIN_ATTEMPTS UNLIMITED;
Edit due comment
The above instructions should solve your problem. I'm posting an additional command I've found related to this subject you can try (I'm not confident it is the solution though):
sql> grant connect, resource to {yourDbUser};
You can also check for the status of other locked users in your database. Maybe your tool is trying to connect with some other user that, besides the one you are using, still have this issue.
This solution is for Oracle 10g and error ORA-28000:the account is locked
Type in the SQL Command Line:
conn sys as sysdba
enter password
alter user system account unlock;