How to Disable SELinux or Set SELinux to Permissive Mode

Make sure to disable SELinux or set SELinux to permissive mode for Oracle GI/RAC Linux servers.

It is recommended by Oracle to disable SELinux or set SELinux to permissive mode for Oracle GI/RAC. Otherwise you might get similar below errors:

Disk "ASM_DISK1" does not exist or is not instantiated
Writing disk header: done
Instantiating disk: oracleasm-instantiate-disk: Unable to open manager: No such file or directory 
failed
Clearing disk header: done

Subscribe to get access

Read more of this content when you subscribe today.

ORA-15260: permission denied on ASM disk group

PROBLEM

Try to set ASM diskgroup attribute, then get the following errors:

$ sqlplus / as sysdba
...
..
.
SQL> alter diskgroup OCR_VOTE SET ATTRIBUTE 'compatible.asm' ='11.2.0.2';
alter diskgroup OCR_VOTE SET ATTRIBUTE 'compatible.asm' ='11.2.0.2'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15260: permission denied on ASM disk group

Subscribe to get access

Read more of this content when you subscribe today.

CRS-4995: The command ‘Delete resource’ is invalid in crsctl

SITUATION

Trying to delete the database resource “ora.RACTEST.db” by using CRSCTL, because ORACLE_HOME has been uninstalled, but the following error occurs.

$crsctl delete resource ora.RACTEST.db
CRS-4995: The command 'Delete resource' is invalid in crsctl. Use srvctl for this command.

Subscribe to get access

Read more of this content when you subscribe today.

SP2-0027: Input is too long (> 2499 characters) – line ignored

Maximum length of command line sql script is 2499 characters.

Sometimes execute SQL scripts from SQL*PLUS, then  get below error:

SP2-0027: Input is too long (> 2499 characters) - line ignored

WORKAROUND

  1. To make one line sql script into different lines, which have less than 2500 characters fir each line.
  2. Use tools like SQL Developer, which does not have 2500 characters limitation.

How to Monitor DataPump

A couple of ways to monitor DataPump job

Get DataPump job details from database

SQL>select JOB_NAME,OPERATION,JOB_MODE,DEGREE,
           ATTACHED_SESSIONS,STATE 
     from dba_datapump_jobs

JOB_NAME             OPERATION JOB_MODE DEGREE ATTAC..TIONS STATE
-------------------- --------- -------- ------ ------------ ------
SYS_EXPORT_SCHEMA_01 EXPORT    SCHEMA   4       1          EXECUTING

Find job name from the DataPump log file

...
..
.
Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
Starting "SYS"."SYS_EXPORT_SCHEMA_01": directory= ..... PARALLEL=4

Query V$SESSION_LONGOPS

SQL> select inst_id, username,target_desc,sofar,
            totalwork,TIME_REMAINING 
      from gV$SESSION_LONGOPS 
     where TIME_REMAINING>1000;

INST_ID USERNAME TARGET_DESC SOFAR   TOTALWORK   TIME_REMAINING
------- -------- ----------- ------- ----------- --------------
 4      SYS                  248779  4294967296  28121732
 3      SYS                  467021  4294967296  15108237
 3      SYS      EXPORT      8824    21597       2335
 2      SYS                  313184  4294967296  22351992

Attach to the running DataPump job

$ expdp ATTACH=SYS_EXPORT_SCHEMA_01

Export> help
...
..
.
 ------------------------------------------------------------------------------
HELP
 Summarize interactive commands.

KILL_JOB
 Detach and delete job.

PARALLEL
 Change the number of active workers for current job.

REUSE_DUMPFILES
 Overwrite destination dump file if it exists [NO].

START_JOB
 Start or resume current job.
 Valid keyword values are: SKIP_CURRENT.

STATUS
 Frequency (secs) job status is to be monitored where
 the default [0] will show new status when available.

STOP_JOB
 Orderly shutdown of job execution and exits the client.
 Valid keyword values are: IMMEDIATE.

$status
...
..
.

Kill the running DataPump job

Export> KILL_JOB
Are you sure you wish to stop this job ([yes]/no): yes