I have installed oracle 12C version (OS: windows 7), in SQL DEVELOPER I connected as SYS user, now i need create new user.
For this I do:
CREATE USER C##OTO_USER
IDENTIFIED BY oto_user_pass;
GRANT ALL PRIVILEGES TO C##OTO_USER;
User created and granted successfully.
Then i logged out as SYS user and trying greate new connection with user C##OTO_USER, but i cant connect with this user, please see error message on screenshot
Where I am wrong?
Related
I just installed Oracle 12C on my home machine and didn't remember it asking to create any credentials during installation. Now, when I'm trying to connect to sample ORCL database, it's prompting one and not letting me in without!
Log on to the Oracle DB server machine as a user who installed it, so that you can access the db as SYS using:
sqlplus / as sysdba
When you get connected, you will be able to reset password for all the other users, including SYSTEM and the other “built-in” users as bellow:
ALTER USER user_name IDENTIFIED BY new_password;
I have one user in my database, and he is locked. I want to unlock account, but for this I must log in as administrator, when I input in command prompt:
sqlplus "/as sysdba" I got the error ORA 01031: insufficient privileges. Say me please, how I can unlock my account..
If you've forgotten all your passwords (!?!?) You won't be able to do this remotely. Log on to the database server with an account that is a member of the OS 'dba' group ('ora_dba' on Windows). This will be the OS account used to install Oracle. Then you should be able to 'sqlplus / as sysdba'. That will connect you as 'sys', using OS authentication. The 'ora-1031' indicates you are trying to connect remotely with a password.
I just finished up installing 11g on my laptop and I got a link which showed up the login page. The installation did ask me for a password and that does work for system.
So, I tried logging in to sqlplus using command prompt like this :
sqlplus / as sysdba
which gives the error : insufficient privileges, but it did ask me for username and password after that to which I typed in system as username and the password I used at the time of installation.
Now it does log me in but I don't have privileges for more privileged commands.
I thought I should login as sys but I get error like : connection as sys should be as sysdba or sysoper.
Just give me a start on how I can login and how I can start interacting with my database right on.
Thanks in advance.
When you use
sqlplus / as sysdba
your current operating system user must be either a privileged user (e.g. root in Linux "Administrator" in Windows) or must be part of the DBA group, otherwise you are not allowed to login without credentials.
If you don't want to change the current OS user, you need to supply the username and password on the commandline:
sqlplus sys/password as sysdba
The user SYS is special because you can only log in as sysdba with that user. On the other hand the SYSTEM user is not allowed to login as sysdba.
Btw: I hope you didn't plan to use SYS or SYSTEM to play around with Oracle. You should never create any tables in those schemas. Create a new user and use that to create tables and basically "use" Oracle.
Use user SYS (as SYSDBA) with password you specified during installation.
I have shared computer, where admin install Oracle XE. But I cannot e.g. create new user, because I have not rights in OS, afaik.
In Oracle documentation written that DBA should be member of administrator group.
Does exists way that I can manage local instance XE without admin rights?
I need start/stop database, connect/disconnect, kill session etc. It is need for test my Java application.
Thanks.
You don't need an OS user with admin right (once Oracle is installed and running).
Just connect as SYSDBA then you can create new Oracle users and manage the complete database..
(I do that on XP as well - working with regular user, but connecting as SYSTEM or SYS with the SYSDBA role if I need to configure something in Oracle)
Does exists way that I can manage local instance XE without admin rights?
Probably not ... if that's what the Oracle documentation says.
A sensible strategy would be to discuss your problem with the admins. Point out that it makes it difficult for you to do your job if you don't have access rights. If they won't grant you system Admin rights, ask them to suggest alternatives that will allow you to do your job.
It may be simply that they need to grant you additional rights in Oracle.
How about getting admin rights in a Virtual Machine? See virtualbox.org.
From XE manual here :
" On each platform, if the OS authentication user group does not already exist, it is automatically created when you install Oracle Database XE. In addition, upon installation on the Linux platform, the user account oracle is automatically created and placed in the dba group. Upon installation on the Windows platform, the user performing the installation is automatically added to the ORA_DBA group. On both platforms, you can add other host users to the OS authentication user group to enable them to connect to the database with the SYSDBA privilege. "
Since installation on windows needs admin user which I assume you are not, so it renders the automatic addition of that admin user to ORA_DBA group useless for you.
So what your admin can do immediately after XE installation on this shared machine is just add your non-admin OS user (local or domain level, whatever) to the newly created OS local group "ORA_DBA". Once this is done, you can simply open the sqlplus prompt and connect with SYSDBA privilege using your own non-admin user in future:
connect / as sysdba
However, you will still not be able to restart the Oracle service or the TNS listener, even if you are in the ORA_DBA group.
I just installed Oracle 11g R2 on windows 7 machine. I am able to login using my sys as sysdba account.
Using the sys account I created a user as follows
create user testuser identified by testuser;
When I try to connect to database with testuser as Normal user it says that 'user testuser lacks CREATE SESSION privilege; logon denied' which is understandable since I have not granted any permissions so far to testuser.
But when I try to login to database using testuser as sysdba, it allows me to connect to database and the selected schema seems to me as SYS schema.
Is there something I am missing because I think user testuser should not be able to even login let alone login to SYS schema. I have also found that I can connect as sysdba with any username regardless of if it is present in the database.
How can I create a regular oracle user which does not have access to any other schema?
Your windows user is part of the dba group (oradba). It uses Windows authentification to connect as sysdba. See this thread on AskTom:
"as sysdba" is extremely powerful, it uses OS AUTHENTICATION, it does
not require database authentication (it is used to login before there
is a "database" or even an "instance"!)
As a member of the dba group, you can login as sysdba with any database user. You can even login without a user: sqlplus / as sysdba.
This is how I would normally create a new user:
create user &1
identified by &2
default tablespace &3
temporary tablespace &4;
grant connect, resource to &1;
grant alter session to &1;
** get the picture; also include other default privileges like "create ... " : sequence, synonym, table, view, database link select_catalog_role etc.