Oracle

ORA-65096: create 12c user without c## problem

I am trying to create a user in Oracle 12c .  When I try to create a user with the c## prefix I get the dreaded ORA-65096 error:

create user dba_exchange identified by dba_exchange _123;
ORA-65096: invalid common user or role name

solution:

connect system/manager as sysdba

SQL> alter session set "_ORACLE_SCRIPT"=true;

Session altered.

create user dba_exchange identified by dba_exchange _123;

user created.

Advertisements
Standard
Oracle

Configuring cron Jobs – Oracle crontab

With the exception of the environment setup, each line in the crontab file represents a scheduled task by using the following syntax:

field          allowed values
—–          ————–
minute         0-59
hour           0-23
day of month   1-31
month          1-12
day of week    0-7 (both 0 and 7 are Sunday)
user           Valid OS user
command        Valid command or script.
 
crontab format : 
 
* * * * *  from left to right = minute, hour, day, month, day. 
 
Capture
 
basic scripts link 
 
crontab -e : edit 
crontab -l : list 
 
sysntax :

0-59/5  *  *  *  1-5  *  command
example : 
 
00 06  * * *  this script will run every day at 06 am
 
00 06  * * * /home/oracle/scripts/inspirit/cleanup_trc.sh > /home/oracle/scripts/dba_clean/log/cleanup_trc.log 2>&1
 
 
Br. Erman. 
 
Standard
Oracle

ORA-01655: unable to extend cluster SYS.SMON_SCN_TO_TIME_AUX

While we were checking our Alert.log for possible error, we noticed that there was an error that was saying that our tablespace was having a lack of space:

———-
Errors in file /u01/install/PROD/11.2.0/admin/TEST_DBMACHINE/diag/rdbms/test/TEST/trace/TEST_smon_1166.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-01655: unable to extend cluster SYS.SMON_SCN_TO_TIME_AUX by 128 in tablespace SYSAUX
Wed Mar 11 11:36:24 2015

Solution:

We added a datafile to the system in order to add more space to the tablespace:

The following is the sql:

—————–
ALTER TABLESPACE SYSAUX ADD DATAFILE
‘/u01/oracle/PROD/data/sysaux03.dbf’
SIZE 1024M
AUTOEXTEND ON
NEXT 50M
MAXSIZE UNLIMITED;

ref : Tablespace Clauses:
http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_3002.htm#SQLRF01002

Standard
Linux

Drop Oracle datafile

Dropping a Tablespace: Example 

The following statement drops the sunvt01 tablespace and drops all referential integrity constraints that refer to primary and unique keys inside sunvt01

Show All tablespace on database :

Set pagessize 999

Set linesize 999

Select * from v$datafile; or

Select name from v$datafile;

DROP TABLESPACE sunvt01

INCLUDING CONTENTS

CASCADE CONSTRAINTS;

Deleting Operating System Files: Example 

The following example drops the sunvt01 tablespace and deletes all associated operating system datafiles:

DROP TABLESPACE sunvt01

INCLUDING CONTENTS AND DATAFILES;

Standard
Linux

Oracle Database – Software|InstallationOwner (oracle, grid)

The software owner is the user who owned/performed the installation of an oracle database (single or rac database).

command:

id user_name,

[oracle@xxxx1~]$ id oracle
uid=54321(oracle) gid=54421(oinstall) groups=54327(asmdba),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba),54421(oinstall)
[oracle@xqaytidmdbprod1 ~]$ id grid
uid=54322(grid) gid=54421(oinstall) groups=54329(asmadmin),54327(asmdba),54328(asmoper),54322(dba),54330(racdba),54421(oinstall)
[oracle@xxxx1~]$

 

 

Br. erman.

Standard
Linux

Determine Oracle Linux version

Oracle Linux is based on Red Hat Enterprise Linux. At first, it may be confusing to determine what specific operating system is running. This is because both have the /etc/redhat-release file.

cat /etc/oracle-release
or
ls -l /etc/*-release.

demo 1 :

[oracle@xxxxx1~]$ cat /etc/oracle-release
Oracle Linux Server release 7.5
[oracle@xxxxx1~]$

demo 2 :
[oracle@xxxxx1~]$ ls -l /etc/*-release
-rw-r–r–. 1 root root 32 May 1 01:30 /etc/oracle-release
-rw-r–r–. 1 root root 398 May 1 01:30 /etc/os-release
-rw-r–r–. 1 root root 52 May 1 01:30 /etc/redhat-release
lrwxrwxrwx. 1 root root 14 Jul 4 21:14 /etc/system-release -> oracle-release
[oracle@xqaytidmdbprod2 ~]$ ls -l /etc/oracle-release
-rw-r–r–. 1 root root 32 May 1 01:30 /etc/oracle-release
[oracle@xxxxx1~]$

br. Erman

Standard
Linux

How to Disable the Firewall for Oracle Linux or Red Hat Enterprise Linux

  1. Stop the ipchains service:
    # service ipchains stop
  2. Stop the iptables service:
    # service iptables stop
  3. Stop the ipchains service from starting when you restart the server:
    # chkconfig ipchains off
  4. Stop the iptables service from starting when you restart the server:
    # chkconfig iptables off
    

# chkconfig –list
Output :

iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
ip6tables 0:off 1:off 2:off 3:off 4:off 5:off 6:off

Br. Erman.

Standard