Oracle 11g can't log with sys user - oracle

Today i meet a werid thing:I can't log on remote server Oracle database with sys user!
The username/password is sys/123,and my colleage could!this situation maintained still now.
But i can log on with an normal user,not a system dba.This is no privilege limit.Why? It's so werid.
This error info:
ORA-01017:invalid username/password;logon denied.
The oracle version:11g.
Log on tool:PL/SQL
need other info?Is local install oracle 10g cause the problem?
On the command line:
SQL>show parameter remote_login_passwordfile The value is:EXCLUSIVE

Solved:This problem bother me 2 day.Now the problem has fixed in 3 steps:
1.login the remote server and login as sys/123 as sysdba.
2.reset the password ( alter user sys identified by 123;)
3.relogin the oracle use sys,done!

Related

I can't login to oracle system account

I recently installed oracle 12c and can't access the system local generated connection. (Ora-01017 error) eventhough I know for a fact its correct because I changed the password. Anyway, someone else on stackoverflow redirected me to this https://iwikte.wordpress.com/2008/11/28/unlock-oracle-system-account/, and I don't know how to set up these environment variables. I need help. If it makes any difference i'm using windows 10.
If these environment variables are not set automatically, do it manually
(export ORACLE_HOME=/opt/oracle/VIS/db/tech_st/10.2.0
export ORACLE_SID=VIS
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin)
Please first try without setting variables.
Please run SQLPlus as administrator and connect as sysdba without giving password. If your variables are set properly you can just type sqlplus in cmd if not please find SqlPlus in your programs. Then type:
conn / as sysdba
If that won't. Please go to your ORACLE HOME directory and edit %ORACLE_HOME%\network\admin\sqlnet.ora file and check if there is SQLNET.AUTHENTICATION_SERVICES = (NTS) if not NTS change to NTS and restart database. Then retry with conn / as sysdba
When connected you can just call:
alter user sys identified by YOUR_NEW_PASS; or for SYSTEM user alter user SYSTEM identified by YOUR_NEW_PASS account unlock; and login with new password.
By the way why do you need to log as SYSTEM? Not just sys as sysdba? Some comparison about system accounts.
The instruction you got is for linux. In Windows one set environmental variables like shown here
from oracle version 12.2.x users cannot login using case insensitive passwords, even though SEC_CASE_SENSITIVE_LOGON = FALSE if PASSWORD_VERSIONS of user is not 10g.
following sql should show the PASSWORD_VERSIONS for a user.
select USERNAME,ACCOUNT_STATUS,PASSWORD_VERSIONS from dba_users;
USERNAME ACCOUNT_STATUS PASSWORD_VERSIONS
--------------- -------------- -----------------
dummyuser OPEN 11G 12C
to make PASSWORD_VERSIONS compatible with 10g
add/modify line in sqlnet.ora of database to have SQLNET.ALLOWED_LOGON_VERSION_SERVER=8
restart database
change/expire password for existing user
new users created will also have same settings
after above steps PASSWORD_VERSIONS should be something like this
select USERNAME,ACCOUNT_STATUS,PASSWORD_VERSIONS from dba_users;
USERNAME ACCOUNT_STATUS PASSWORD_VERSIONS
--------------- -------------- -----------------
dummyuser OPEN 10G 11G 12C

Oracle 11g XE initialization on ubuntu 12.04

I was following this tutorial:
http://sysadminnotebook.blogspot.com/2012/10/installing-oracle-11g-r2-express.html
and I sucessfully installed and started oracle database. Now I wanted to connect to that DB from bash, so I found that command:
sqlplus sys as sysdba
It asks for password, which in my case is oracle, and after I supply it, I get:
ORA-01031: insufficient privileges
What should I do?
EDIT:
I needed to add group dba and add myself to that group. However I've got other problem now. I wanted to create user, so I did:
CREATE USER myuser IDENTIFIED BY password
default tablespace users
temporary tablespace temp;
And I got: ORA-01034: ORACLE not available.
I tried: STARTUP But I got:
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/xe/dbs/initXE.ora'
I have '/u01/app/oracle/product/11.2.0/xe/dbs/init.ora' file but not initXE.ora
Is the o/s user a member of the dba group?
If this is a new installed Oracle and you do not have initXE.ora parameter file here /u01/app/oracle/product/11.2.0/xe/dbs/, that means you need to create XE DB first. To do that run /u01/app/oracle/product/11.2.0/xe/bin/createdb.sh script first.

Unable to log in to database as SYS with Oracle SQL Developer

I've worked with Oracle for some time but very much a noob with the Admin side of things and am learning, so bear with me.
I cannot log on to my database (orcl_test) with SQL Developer with the SYS username. I can log on just fine in SQLPlus with SYS as SYSDBA - when I try with SQL Developer I get an error:
ORA-01017: invalid username/password; logon denied.
Logging on as SYS as SYSDBA in SQLPlus, I created a test table within the database and granted the test user SCOTT with SELECT permissions. The Scott user can log on through SQL Developer w/o problem and access the allowed tables.
I have checked that the Scott user and SYS are logging in using the same settings -
Hostname: (ip address)
Port: 1521
SID: orcl_test
For SYS I flag the role SYSDBA - but otherwise the settings are the same.
Any thoughts on why I can't log on using SYS? Am I just overlooking something or have I configured my db incorrectly?
Not sure if this is relevant but I cannot use 'localhost' for the hostname, I have to enter the IP address. Where do I configure Oracle to recognize localhost?
This is a new installation of Oracle 11.2.0.1.0 on a standalone test box running Windows XP. Running Oracle SQL Developer 1.5.5.
From the The SYSDBA System Privilege and (Logging In and Connecting to the Database as SYSDBA:
1--Connecting AS SYSDBA invokes the SYSDBA privilege. If you omit the AS
SYSDBA clause when logging in as user SYS, the SQL Command Line
rejects the login attempt.
2--Using SQL Developer, open a database connection to the SYS user AS SYSDBA.
So - if this works for you:
sqlplus sys/Oracle_1#pdborcl as sysdba;
Try: "SYS AS SYSDBA" as below:
Alternatively:
you can type in: "SYS" and select from dropdown-menu ROLE: SYSDBA.
If I understand correctly the database is on the same host as the SQL Developer installation? Are you fully qualifying the connection when testing with SQLPlus:
sqlplus "sys/password#database as sysdba"
It may be the case that the error is correct. Make sure you've created a password file.
The sys password that you are using is not valid.
But because you are connecting to oracle by command on an Oracle machine, Oracle does not check your password even though your password is not right.
Just change the sys password and try again.
su - oracle
orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=Euro2016 entries=5
which means: write to a file $ORACLE_HOME/dbs/orapw$ORACLE_SID a password Euro2016 which is used by SYSDBA
Now you can connect with sqldeveloper: username sys, password Euro2016 with chosen SYSDBA , hostname, port, sid from $ORACLE_SID

cant connect to oracle - ora-01017

i installed Oracle 11.2.0 64bit & Oracle SQL developer 2.1.1.64 on Windows-7 64bit
i try to connect to database like this:
username: scott
password: tiger
role : sysdba
hostname: localhost
port : 1521
sid : ORCL
and i got this error: ora-01017 invalid username/password; logon denied
what can be the problem ? what to check ?
thanks in advance
11g allows for case-sensitive passwords, so firstly check the password TIGER (and maybe Tiger)
since the database is on your local machine, easiest is to connect to it using os authentication and reset the password to a known value and then use that to connect using the tool you want. On windows you can do this in the *nix style. First find where your oracle rdbms installation is located and assign that value to the ORACLE_HOME environment variable. Use the commandline tool.
ORACLE_HOME=d:\somwehere\on\your\disk
PATH=%ORACLE_HOME%\bin
ORACLE_SID=ORCL
sqlplus "/ as sysdba"
alter user scott identified by koffie;
(make sure you remember the password this time, including case as since 11g passwords are case sensitive.) sqlplus should be in %ORACLE_HOME%\bin. Check this before.
I hope this helps.
Is the account unlocked? As a privileged (SYS account) try running:
SELECT USERNAME, ACCOUNT_STATUS
FROM DBA_USERS
WHERE USERNAME = 'SCOTT';
If the account is locked, try:
ALTER USER SCOTT ACCOUNT UNLOCK;
Also it appears you are trying to connect to the database as SYSDBA using the SCOTT account. I believe by default this schema lacks the necessary account privileges. Try logging in as SCOTT/TIGER connecting as "normal", not "sysdba".
-CJ
Use:
orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=Euro2016 entries=5
grant sysdba to scott;
Now you can connect...

How to connect to newly installed Oracle XE instance?

I have installed Oracle XE on Win7 x64 machine. Installation completed successfully without problem, or perhaps installer didn't tell about them. But after installation I can't connect to database; its web interface is not working. I have looked through list of open ports, and there is no 8080 port as was noted during installation. Also I can't connect via SQLPlus.
SQL> connect SYSTEM
Enter password:
ERROR:
ORA-12638: Credential retrieval failed
Somewhere in the web it was told to edit sqlnet.ora file, I have changed it in the following way:
# SQLNET.AUTHENTICATION_SERVICES = (NTS)
SQLNET.AUTHENTICATION_SERVICES = (NONE)
and now I get next error
SQL> connect SYSTEM
Enter password:
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
What do I need to change so that I can connect to it?
I figured out the issue.
I was using domain login to install Oracle XE. If you are using domain login to install Oracle XE then the database creation will fail (though you may not get any error messages on that regard).
Solution:
Install Oracle using a local admin user.
Change SQLNET.AUTHENTICATION_SERVICES to (NONE) in sqlnet.ora.
Now login with your domain user to use oracle XE.
Check the Oracle services are started
Did you set your ORACLE_SID environment variable to the name of the instance you're connecting to?
Make sure oracle service is started.
did to ran netca after installation? - if not you can ran it from cmd
You can't connect using system if the instacne is down only as sysdba (user sys)
Make sure your ORACLE_HOME,ORACLE_SID,PATH environment variables are ok
If everything was ok then you can try to start/connect to the instance manually
Sample:
C:\Documents and Settings\asafm>
C:\Documents and Settings\asafm>
C:\Documents and Settings\asafm>sqlplus "sys as sysdba"
SQL*Plus: Release 11.2.0.1.0 Production on Fri May 11 16:21:42
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter password:
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 535662592 bytes
Fixed Size 1375792 bytes
Variable Size 360710608 bytes
Database Buffers 167772160 bytes
Redo Buffers 5804032 bytes
Database mounted.
Database opened.
SQL>
SQL>
SQL>select status from v$instance;
As Rejeev Divakaran said, installing oracle XE with local windows user, and switching back to domain user account, started db, able to connect.
Config
Office Laptop
Windows 7 64 Bit
Oracle 11g XE
Can you connect this way from the command line:
sqlplus / as sysdba
if so at the SQL prompt enter
SQL>startup
If the command returns ok then try to connect with a username and password.
This error message usually occurs when the database could not be started. The windows service may be running, but still Oracle might not be able to spawn server threads and hand out client connections.
Have a Look into app\oracle\admin\xe\bdump\alert_xe.log for any error messages during the last start of the Oracle service.
Just in case someone is as "lucky" as me: I recently couldn't install Oracle with a local user (as suggested here before) because the target machine (Win2k8 x64) was also the Domain Controller of that network.
All users were in domain - no local users available :(
Here are the steps I performed:
Installed Oracle XE in my local machine (that works fine). Made a backup (using the built-in backup.bat);
Transferred the fast_recovery_area folder to my target machine;
Installed the Oracle XE in the target machine normally;
Edited the %ORA_HOME%\network\admin\sqlnet.ora file and performed this well-known edit:
SQLNET.AUTHENTICATION_SERVICES= (NONE)
Edited the %ORA_HOME%\bin\restore.bat file:
Replaced every entry rman target / (...) by rman target sys/MySysDbaPass (...)
Replaced every entry (...) connect / as sysdba^; by (...) connect sys/MySysDbaPass as sysdba^;
Runned restore.bat - when prompted, pointed to the fast_recovery_area I've transferred before.
Done! (pheew!)
Sorry for answering this YEARS old question, but I managed to make it work...
Make sqlnet.ora change.
Run StopDB.bat
Run MakeDB.bat
This will create a demo database, reset the password to 'oracle', and will also allow you to connect without error.

Resources