Tuesday, February 13, 2018

getting hardware information on Linux

cat /sys/devices/virtual/dmi/id/product_name

/sys/devices/virtual/dmi/id/sys_vendor

sudo lshw
sudo lshw -short

cat /proc/cpuinfo
cat /proc/meminfo


Friday, February 9, 2018

connecting pdb user to oracle 12c gives error ORA-01033

If you connect to a user in a PDB and u get error ORA-01033

and following query returns MOUNTED

SELECT name, open_mode FROM v$pdbs;

then we need to open it in read write mode and save state so that it would survive a shutdown.



sqlplus / as sysdba

SELECT name, open_mode FROM v$pdbs;


alter pluggable database PDBORCL open read write;


alter pluggable database all save state;



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

SQL> create user rakesh identified by rakesh;
create user rakesh identified by rakesh
            *
ERROR at line 1:
ORA-65096: invalid common user or role name


Fix;

SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT
SQL> select PDB from V$services;

PDB
------------------------------
PDBORCL
CDB$ROOT
CDB$ROOT
CDB$ROOT
CDB$ROOT

SQL> alter session set container=PDBORCL;

Session altered.

SQL> show con_name

CON_NAME
------------------------------
PDBORCL
SQL> create user rakesh identified by rakesh;
create user rakesh identified by rakesh
                                 *
ERROR at line 1:
ORA-01109: database not open


SQL> alter database open;

Database altered.

SQL> create user rakesh identified by rakesh;

User created.


SQL> GRANT CONNECT, RESOURCE, DBA TO rakesh;

Grant succeeded.

SQL>

Followers

About Me

Torrance, CA, United States