Thursday, 26 September 2019

Oracle: Default users

The set of users that get created if db is created using dbca:

Note : Specifically I needed when I needed to cleanup after  impdp

11.2.0.4:
ANONYMOUS
APEX_030200
APEX_PUBLIC_USER
APPQOSSYS
CTXSYS
DBSNMP
DIP
EXFSYS
FLOWS_FILES
MDDATA
MDSYS
MGMT_VIEW
OLAPSYS
ORACLE_OCM
ORDDATA
ORDPLUGINS
ORDSYS
OUTLN
OWBSYS
OWBSYS_AUDIT
SCOTT
SI_INFORMTN_SCHEMA
SPATIAL_CSW_ADMIN_USR
SPATIAL_WFS_ADMIN_USR
SYS
SYSMAN
SYSTEM
WMSYS
XDB
XS$NULL


To drop schema's excluding above:
select 'drop user '||username||' cascade;' from dba_users where username not in ('ANONYMOUS',
'APEX_030200','APEX_PUBLIC_USER','APPQOSSYS','CTXSYS','DBSNMP','DIP',
'EXFSYS','FLOWS_FILES','MDDATA','MDSYS','MGMT_VIEW','OLAPSYS','ORACLE_OCM',
'ORDDATA','ORDPLUGINS','ORDSYS','OUTLN','OWBSYS','OWBSYS_AUDIT','SCOTT',
'SI_INFORMTN_SCHEMA','SPATIAL_CSW_ADMIN_USR','SPATIAL_WFS_ADMIN_USR',
'SYS','SYSMAN','SYSTEM','WMSYS','XDB','XS$NULL');

Oracle: Privileges / Roles need to use expdp

DATAPUMP_EXP_FULL_DATABASE  & DATAPUMP_IMP_FULL_DATABASE 

plus directory

create directory proj as '/somepath/';

grant read,write on proj to <schema>   ;  ---not req is expdp is executed via sys/system

Thursday, 29 August 2019

Oracle: Create oracle install group for installation



groupadd oinstall;
groupadd dba

Path: /usr/sbin/

useradd -m -g oinstall -G dba oracle
if oracle exists
usermod -G dba oracle

Verify:
id oracle
uid=200(oracle) gid=201(oinstall) groups=201(oinstall),8001(dba)

Tuesday, 9 July 2019

ORA-00845: MEMORY_TARGET not supported on this system

Increasing memory_target/max to 8G encountered this error.

Reason:
[oracle@osmdbuat1001 shm]$ df -hP .
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           7.8G     0  7.8G   0% /dev/shm    <====Undersized


ORA-00845: MEMORY_TARGET not supported on this system

Solution:
mount -t tmpfs shmfs -o size=10g /dev/shm <=any value above 8G should work.


After above the instance mount/opens with no issues.