why is this showing error..
SQL> create user nisar identified by kk ;
create user nisar identified by kk
*
ERROR at line 1:
ORA-65096: invalid common user or role name
I had used below command. It's very useful. So, I would like to recommend to you.
alter session set "_ORACLE_SCRIPT"=true;
For more information, see:
http://www.dba-oracle.com/t_ora_65096_create_user_12c_without_c_prefix.htm
You're trying to create a common user, not a container user, with an invalid name:
ORA-65096: invalid common user or role name
Cause: An attempt was made to create a common user or role with a name that wass not valid for common users or roles. In addition to the usual rules for user and role names, common user and role names must start with C## or c## and consist only of ASCII characters.
Action: Specify a valid common user or role name.
If you want to create a user in a particular container then you can use the alter session set container first, so your create is applied within that container. If you really do want a common user, follow the naming rules above.
Read more in the documentation.
Related
question post to StackExchange;
Please help my study for Role assignment. ClickHouse is using two methods of Role assignment;
GRANT
SET
eg 1: GRANT admin TO user1
eg 2: SET ROLE admin TO user1
I can't find difference of these two. Please advice if you have any knlowledge of it. Thanks!
It is two different commands:
GRANT assigns a role to user accounts not apply / activate it
SET ROLE activates role to the current user so that role be used
Example (see https://clickhouse.tech/docs/en/sql-reference/statements/create/role/#create-role-examples):
CREATE ROLE accountant;
GRANT SELECT ON db.* TO accountant;
GRANT accountant TO user1;
/* login as user1 */
/* activate the role and use related privileges */
SET ROLE accountant;
SELECT * FROM db.*;
To avoid calling SET ROLE each time after user login it needs to add role to the default list by SET DEFAULT ROLE.
Hello I want to know what's different between
Create User C##USERNAME
and
Create user USERNAME
in oracle database? Oracle 19c
In versions you tagged (10g and 11g), none (except that it makes your life more complicated than it should be).
In later Oracle database versions, it is related to CDB. From CREATE USER (19c version, as edited question suggests):
(user:) Specify the name of the user to be created. This name can contain only characters from your database character set and must follow the rules described in the section "Database Object Naming Rules". Oracle recommends that the user name contain at least one single-byte character regardless of whether the database character set also contains multibyte characters.
In a non-CDB, a user name cannot begin with C## or c##.
In a CDB, the requirements for a user name are as follows:
The name of a common user must begin with characters that are a case-insensitive match to the prefix specified by the COMMON_USER_PREFIX initialization parameter. By default, the prefix is C##.
The name of a local user must not begin with characters that are a case-insensitive match to the prefix specified by the COMMON_USER_PREFIX initialization parameter. Regardless of the value of COMMON_USER_PREFIX, the name of a local user can never begin with C## or c##.
I'm trying to change the password for Oracle DB user but I'm getting below error:
ORA-28003: password verification for the specified password
ORA-20002: YOU ARE NOT ALLOWED TO CHANGE THE PASSWORD FOR CRITICAL SCHEMAS
I've tried to change the password using sys user and got same error.
DB version: 12.2.0.1.0
Client: SQLPlus
Please help
The exception is being raised by a password verification function, assigned to the user via a profile.
You can see the profile name and the function being applied by querying:
select du.profile, dp.limit
from dba_users du
join dba_profiles dp on dp.profile = du.profile
where du.username = '<YOUR_USER>'
and dp.resource_name = 'PASSWORD_VERIFY_FUNCTION';
You can then see what the function is actually doing by looking at its source, using the name identified in the previous query:
select text
from dba_source
where owner = 'SYS'
and name = '<FUNCTION_NAME>'
order by line;
From there you can see when and why it's happening, by looking for a line like:
raise_application_error(-20002, 'YOU ARE NOT ALLOWED TO CHANGE THE PASSWORD FOR CRITICAL SCHEMAS');
and seeing what logic leads to it being raised.
You'll need to decide whether that rule is (still) appropriate for that user - clearly it's there for a reason so don't remove it or change the user's profile without really understanding it, and discussing with the DBA and/or application owner etc. - basically anyone with an interest in that user account.
I am getting the subjected error while trying to install data miner repository in SQL developer.
after double clickitng the connection in data miner tab as in the below screenshot I followed the following path to install the data miner repository
step 01
step 02
step 03
step 04
step 05
step 06
then it gets the following error.
Error starting at line : 19 in command -
create user ODMRSYS identified by Alxv19x default tablespace &&1 temporary tablespace &&2 quota UNLIMITED on &&1 PASSWORD EXPIRE
Error report -
ORA-65096: invalid common user or role name
65096. 00000 - "invalid common user or role name"
*Cause: An attempt was made to create a common user or role with a name
that was not valid for common users or roles. In addition to
the usual rules for user and role names, common user and role
names must start with C## or c## and consist only of ASCII
characters.
*Action: Specify a valid common user or role name.
could someone help me please ?
We got the same issue once before, the solution is as follows:
go to your sqldeveloper directory.
open the dataminer directory.
edit the script file named instodmrsyssql.
go to the line where exists the following sql query:
create user ODMRSYS identified by Alxv19x default tablespace &&1 temporary tablespace &&2 quota UNLIMITED on &&1 PASSWORD EXPIRE;
add before the mentioned query the following:
alter session set "_oracle_script"=true;
the final result is:
alter session set "_oracle_script"=true;
create user ODMRSYS identified by Alxv19x default tablespace &&1 temporary tablespace &&2 quota UNLIMITED on &&1 PASSWORD EXPIRE;
save it
then if you have sqldeveloper already opened, just close it and
reopen it and re-run the process.
(Excuse any ignorance of mine here - I'm not a seasoned Oracle user.)
I'm attempting to use the DBMS_METADATA.GET_DDL function (in conjunction with ALL_OBJECTS or some such) to get the DDL for all of the tables in a particular schema. When I do this (either for all objects or for a single specific object) I get an ORA-31603 error ("object "FOO" of type TABLE not found in schema "SCHEMA").
I assume this means that the user I'm logged in with doesn't have whatever privilege is necessary to read the metadata needed for GET_DDL. What privilege is this that's needed? Is there a way when logged in to confirm that the current user does/does not have this privilege?
thanks!
Lee
Read this document, but basically, you need SELECT_CATALOG_ROLE
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_metada.htm#i1016867