1 Reply Latest reply: Oct 23, 2012 2:54 PM by Srini Chavali-Oracle RSS

    ORA-06512: at "SYS.UTL_FILE", line 536 RAC expdp

    joe_irungu
      I want to setup a cronjob to run backup certain schemas for ORCL RAC database on AIX 7.1.The db nodes have multiple dbs thus I will need to use @ORCL to achive this as ORCL
      isnt the default ORACLE_SID in the nodes.

      When I run the backup as below it gives me error


      export DATE=$(date +%Y-%m-%d-%H-%M)

      expdp SYSTEM/<password>@ORCL DIRECTORY=ORCL_DUMP dumpfile=ORCL_${DATE}.dmp logfile=ORCL_${DATE}.log cluster=n schemas=HR,SCOTT


      Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
      With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security,
      OLAP, Data Mining, Oracle Database Vault and Real Application Testing optio
      ORA-39002: invalid operation
      ORA-39070: Unable to open the log file.
      ORA-29283: invalid file operation
      ORA-06512: at "SYS.UTL_FILE", line 536
      ORA-29283: invalid file operation


      Yet if I run without the @ORCL when I export ORACLE_SID=ORCL as below


      export DATE=$(date +%Y-%m-%d-%H-%M)

      expdp SYSTEM/<password>@ORCL DIRECTORY=ORCL_DUMP dumpfile=ORCL_${DATE}.dmp logfile=ORCL_${DATE}.log cluster=n schemas=HR,SCOTT

      The expdp works.

      How can I achieve the backup as a cron without explicitly issuing the command export ORACLE_SID=ORCL

      Thanks.