max_dump_file_size in 12c

MAX_DUMP_FILE_SIZE specifies the maximum size of trace files (excluding the alert log).

ModifiableALTER SESSION, ALTER SYSTEM
  • A numeric value for MAX_DUMP_FILE_SIZE specifies the maximum size in operating system blocks.
  • A numeric value followed by a K or M or G suffix specifies the file size in kilobytes, megabytes, or gigabytes.
  • The special value string UNLIMITED means that there is no upper limit on trace file size. Thus, dump files can be as large as the operating system permits.

The trace file can be split into a maximum of 5 segments, and the size of each segment will typically be 1/5th of the trace file limit.

ORA-02085: database link DBLINK_TEST connects to TESTDB

If parameter global_names =TRUE, the database link name has to match the remote database name.

Try to query a remote table through a database link:

SQL> select count(*) from testuser.test@dblink_test;
select count(*) from testuser.test@dblink_test;
*
ERROR at line 1:
ORA-02085: database link UDBLINK_TEST connects to TESTDB

REASON

Check database parameter global_names =TRUE. If parameter global_names =TRUE, the database link name has to match the remote database name( TESTDB).

WORKAROUND

Turn off  global_names in session level, then it should be ok.

SQL>alter session set global_names=false;
Session altered.

SQL>select count(*) from testuser.test@dblink_test;

 COUNT(*)
----------
       100

ORA-27125: unable to create shared memory segment Linux-x86_64 Error: 28: No space left on device

When starting up an Oracle database, the below errors occur:

ORA-27125: unable to create shared memory segment
Linux-x86_64 Error: 28: No space left on device
Additional information: 3773
Additional information: 3221225472

Subscribe to get access

Read more of this content when you subscribe today.

Temporary Tablespace Group

Temporary Tablespace and Temporary Tablespace Group

Create a temporary tablespace, and implicitly add it to a temporary tablespace group.

SQL>CREATE BIGFILE TEMPORARY TABLESPACE TEMP01 TEMPFILE '+DATA1' 
    SIZE 100M AUTOEXTEND ON NEXT 100M MAXSIZE 32G EXTENT MANAGEMENT 
    LOCAL UNIFORM SIZE 1M TABLESPACE GROUP TEMP_GRP;

Add a temporary tablespace to the temporary tablespace group.

SQL>ALTER TABLESPACE temp02 TABLESPACE GROUP TEMP_GRP;

Remove a temporary tablespace from a temporary tablespace group.

SQL>ALTER TABLESPACE temp03 TABLESPACE GROUP '';

Assign a user to a default temporary tablespace group.

SQL>ALTER USER TESTUSER TEMPORARY TABLESPACE TEMP_GRP;

Assign database a  default temporary tablespace group.

SQL>ALTER PLUGGABLE DATABASE DEFAULT TEMPORARY TABLESPACE TEMP_GRP;

Pluggable database altered.

Check temporary tablespace and its files.

SQL> select tablespace_name,FILE_ID,file_name,AUTOEXTENSIBLE,
     MAXBYTES/1024/1024/1024, INCREMENT_BY,USER_BYTES/1024/1024/1024 
     from dba_temp_files;

Check temporary tablespace and group.

SQL>select * from DBA_TABLESPACE_GROUPS;

Check who is using temporary tablespace.

SQL> select INST_ID,USERNAME,TABLESPACE,CONTENTS,SQL_ID,BLOCKS 
     from gv$SORT_USAGE;

Drop temporary tablespace.

SQL> drop tablespace temp02 including contents and datafiles;
drop tablespace temp02 including contents and datafiles
*
ERROR at line 1:
ORA-10921: Cannot drop tablespace belonging to default temporary 
           tablespace group

Drop  temporary tablespace group.

After remove all the temporary tablespace from temporary tablespace group, 
the temporary tablespace group will be dropped from database automatically.

ERROR: Unable to get logical block size for spfile

Always make sure the referenced pfile or spfile exists and accessible.

Created 12.1.0.2 CDB/PDB database through DBCA, there are a lot of errors in alert.log.

...
..
.
ERROR: Unable to get logical block size for spfile '+DATA1/RACTEST/spfileRACTEST.ora'.
Mon Oct 24 23:33:11 2016
ERROR: Unable to get logical block size for spfile '+DATA1/RACTEST/spfileRACTEST.ora'.

Go to $ORACLE_HOME/dbs and check initRACTEST1.ora file, which was created by DBCA.

$cd $ORACLE_HOMEdbs
$cat initRACTEST1.ora
'+DATA1/RACTEST/spfileRACTEST.ora'

--- DBCA scripts
---
[RACTEST1] oracle@racnode1:/u01/app/oracle/admin/RACTEST/scripts$ cat RACTEST1.sql
set verify off
ACCEPT sysPassword CHAR PROMPT 'Enter new password for SYS: ' HIDE
ACCEPT systemPassword CHAR PROMPT 'Enter new password for SYSTEM: ' HIDE
ACCEPT dbsnmpPassword CHAR PROMPT 'Enter new password for DBSNMP: ' HIDE
host /u01/app/oracle/product/12.1.0/dbhome_1/bin/orapwd file=+DATA1/RACTEST/orapwRACTEST force=y format=12 dbuniquename=RACTEST
host /u01/app/12.1.0.2/grid/bin/setasmgidwrap o=/u01/app/oracle/product/12.1.0/dbhome_1/bin/oracle
host /u01/app/oracle/product/12.1.0/dbhome_1/bin/srvctl add database -d RACTEST -pwfile +DATA1/RACTEST/orapwRACTEST -o /u01/app/oracle/product/12.1.0/dbhome_1 -p +DATA1/RACTEST/spfileRACTEST.ora -n RACTEST -a "DATA1,FRA"
host /u01/app/oracle/product/12.1.0/dbhome_1/bin/srvctl add instance -d RACTEST -i RACTEST1 -n racnode1
host /u01/app/oracle/product/12.1.0/dbhome_1/bin/srvctl add instance -d RACTEST -i RACTEST2 -n racnode2
host /u01/app/oracle/product/12.1.0/dbhome_1/bin/srvctl add instance -d RACTEST -i RACTEST3 -n racnode3
host /u01/app/oracle/product/12.1.0/dbhome_1/bin/srvctl add instance -d RACTEST -i RACTEST4 -n racnode4
host /u01/app/oracle/product/12.1.0/dbhome_1/bin/srvctl disable database -d RACTEST
@/u01/app/oracle/admin/RACTEST/scripts/CreateDB.sql
@/u01/app/oracle/admin/RACTEST/scripts/CreateDBFiles.sql
@/u01/app/oracle/admin/RACTEST/scripts/CreateDBCatalog.sql
@/u01/app/oracle/admin/RACTEST/scripts/JServer.sql
@/u01/app/oracle/admin/RACTEST/scripts/context.sql
@/u01/app/oracle/admin/RACTEST/scripts/ordinst.sql
@/u01/app/oracle/admin/RACTEST/scripts/interMedia.sql
@/u01/app/oracle/admin/RACTEST/scripts/cwmlite.sql
@/u01/app/oracle/admin/RACTEST/scripts/spatial.sql
@/u01/app/oracle/admin/RACTEST/scripts/labelSecurity.sql
@/u01/app/oracle/admin/RACTEST/scripts/apex.sql
@/u01/app/oracle/admin/RACTEST/scripts/datavault.sql
@/u01/app/oracle/admin/RACTEST/scripts/CreateClustDBViews.sql
host echo "SPFILE='+DATA1/RACTEST/spfileRACTEST.ora'" > /u01/app/oracle/product/12.1.0/dbhome_1/dbs/initRACTEST1.ora
@/u01/app/oracle/admin/RACTEST/scripts/lockAccount.sql
@/u01/app/oracle/admin/RACTEST/scripts/postDBCreation.sql
@/u01/app/oracle/admin/RACTEST/scripts/PDBCreation.sql
@/u01/app/oracle/admin/RACTEST/scripts/plug_RACTESTPDB.sql
@/u01/app/oracle/admin/RACTEST/scripts/postPDBCreation_RACTESTPDB.sql

Check ASM files, there is no ‘+DATA1/RACTEST/spfileRACTEST.ora’ file existed.

ASMCMD> cd RACTEST/
ASMCMD> ls -l

Type Redund Striped Time Sys Name
 Y 3F9BD96544BC0349E053530F040A8320/
 Y 3F9C860784456287E053530F040ADB20/
 Y CONTROLFILE/
 Y DATAFILE/
 Y ONLINELOG/
 Y PARAMETERFILE/
 Y PASSWORD/
 Y TEMPFILE/
PASSWORD UNPROT COARSE OCT 24 15:00:00 N orapwractest=> +DATA1/RACTEST/PASSWORD/pwdractest.1427.926092135

ASMCMD> cd PARAMETERFILE/
ASMCMD> pwd
+data1/RACTEST/PARAMETERFILE
ASMCMD> ls -l
Type Redund Striped Time Sys Name
PARAMETERFILE UNPROT COARSE OCT 25 10:00:00 Y spfile.1438.926119495

SOLUTION

  1. Give right path and name for spfile in pfile. Get the right spfile name and path from alert.log when instance startup everytime.
$cat initRACTEST1.ora
'+data1/RACTEST/PARAMETERFILE/spfile.1438.926119495'

2. Or remove initRACTE1.ora from $ORACLE_HOME/dbs if pfile is not referenced at all.