Sunday, May 14, 2017

ORA-65096: invalid common user or role name oracle database 12c



              ORA-65096: invalid common user or role name



Cause: when you create a common user in oracle database 12c  it was  invalid for common users or roles. 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.

SQL> create user tra identified by tra default tablespace users;
create user tra identified by tra default Tablespace users
            *
ERROR at line 1:
ORA-65096: invalid common user or role name










Action: Specify a valid common user or role name.
The solution to the ORA-06596 is to set a hidden parameter "_oracle_script".  When you set the undocumented (hidden) parameter "_oracle_script"=true  you can create the tra user without a C## in from of the user ID.  therefore this user will not used useful in a pluggable/container database.

SQL> alter session set "_ORACLE_SCRIPT"=true;

Session altered.


SQL> create user tra identified by tra ;

User created.

SQL> grant dba to tra;

Grant succeeded.



Tuesday, May 2, 2017

IN Oracle sql How to count different values in one column of table in Oracle 10g,11g,12c



 IN Oracle  sql How to count different values in one column of table in Oracle 10g,11g,12c


wher you want to select multiple values from single oracle filed just use the below sql query with group by clause.



"""SELECT ssc_dakhil, count(*)
FROM test_teacher_ssc_info
GROUP BY ssc_dakhil;   '''''



linux cpu core and socket count

[root@db-oracle-node1 ~]# grep -c ^processor /proc/cpuinfo
24
[root@db-oracle-node1 ~]# nproc --all
24
[root@db-oracle-node1 ~]#  lscpu | grep 'socket'
Core(s) per socket:    6