dbms_backup_restore

Hi all

on 11.2.0.4 on Win 2008 Server

It's the definition of the package:

() dbms_backup_restore.settablespaceexclude
TSID IN directory,
Directory flag);


Is the same tsid that: TS # in v$ tablespace?


I want to exclude UNDOTBS1 backup.

so, what should be the values for:
( ) tsid IN directory.
Directory flag);

Thank you.

Thank you.

Let's try this:

Example of CONFIGURATION EXCLUDE for the TABLESPACE;

Kind regards.

Tags: Database

Similar Questions

  • dbms_backup_restore.deviceallocate

    what I am doing wrong? I know other better options for the rman restore but I just want to test these too


    SQL > declare
    devtype 2 varchar2 (256);
    Boolean done 3;
    4 start
    5 devtype: = dbms_backup_restore.deviceallocate (type = > "sbt", params = > ' ENV = (TDPO_OPTFILE = / usr/tivoli/tsm/customer/oracle/bi))
    N64/TDPO.opt)', ident = > 't1 ';
    6 dbms_backup_restore.restoresetdatafile;
    dbms_backup_restore.restorecontrolfileto('/tmp/test/controlfile_name.CTL');
    7 8 dbms_backup_restore.restorebackuppiece ('c-1031094670-20100618-01', IS = > result);
    9 dbms_backup_restore.devicedeallocate('t1');
    10 end;
    11.
    devtype: = dbms_backup_restore.deviceallocate (type = > "sbt", params = > ' ENV = (TDPO_OPTFILE = / usr/tivoli/tsm/customer/oracle/bin64/t))
    DPO.opt)', ident = > 't1 ';

    *
    ERROR on line 5:
    ORA-06550: line 5, column 143:
    PLS-00103: encountered the symbol ";" when expecting one of the following values:
    ), * & = - + <>/ is mod remains not rem
    < an exponent (*) > <>or! = or ~ = > = < = <>and or LIKE2_
    LIKE4_ LIKEC_ between | Member of multiset SUBMULTISET_
    The symbol ")" has been replaced by a ';' to continue.

    what I am doing wrong?

    missing closing parenthesis?

  • RMAN handle with dbms_backup_restore package - ORA-19633

    Hello

    I want to delete all the old newspapers archived with a pl/sql package.

    My database, run as archivelog without a catalog. The backupsets and archived newspapers to register on the controlfile.

    Database: Oracle 10 g 2
    Version: 10.2.0.1.0

    PROCEDURE delete_archivelog
    IS
    v_validated directory.

    CURSOR v_resetlog
    IS
    SELECT recid, NAME, stamp, thread #, sequence #, resetlogs_change #,.
    FIRST_CHANGE #, blocks
    V $ archived_log
    While the deleted = 'NO '.
    AND completion_time < SYSDATE - 5 / (24 60) *.
    ORDER BY ASC recid;
    BEGIN
    FOR rec_resetlog IN v_resetlog
    LOOP
    v_validated: =.
    DBMS_BACKUP_RESTORE.validatearchivedlog
    * (recid = > rec_resetlog.recid, *)
    stamp = > rec_resetlog.stamp,
    fname = > rec_resetlog.NAME,
    THREAD = > rec_resetlog.thread #,.
    SEQUENCE = > rec_resetlog.sequence #,.
    resetlogs_change = > rec_resetlog.resetlogs_change #,.
    FIRST_CHANGE = > rec_resetlog.first_change #,.
    BLKSIZE = > rec_resetlog.blocks
    *);*

    IF v_validated = 0
    THEN
    BEGIN
    DBMS_BACKUP_RESTORE.deletearchivedlog
    * (recid = > rec_resetlog.recid, *)
    stamp = > rec_resetlog.stamp,
    fname = > rec_resetlog.NAME,
    THREAD = > rec_resetlog.thread #,.
    SEQUENCE = > rec_resetlog.sequence #,.
    resetlogs_change = > rec_resetlog.resetlogs_change #,.
    FIRST_CHANGE = > rec_resetlog.first_change #,.
    BLKSIZE = > rec_resetlog.blocks
    *);*
    Dbms_output.put_line (rec_resetlog.NAME
    *|| ' - '*
    *|| rec_resetlog. RecId *.
    *);*
    EXCEPTION
    WHILE OTHERS
    THEN
    Dbms_output.put_line (SUBSTR ('error'
    *|| TO_CHAR (SQLCODE) *.
    *|| ': '*
    *|| SQLERRM, *.
    * 1, *
    * 255 *.
    *)*
    *);*
    END;
    END IF;

    Dbms_output.put_line (rec_resetlog.NAME |) ' - ' || v_validated);
    END LOOP;
    END;

    But the v_validated is still 6. It should be 0.

    Without dbms_backup_restore.validatearchivedlog throws an exception.
    ORA-19633: record controlfile is out of sync with the recovery catalog

    But the controlfile is recid.

    What's the harm?

    Thank you
    Micsigen

    Published by: user990822 on 2009.11.29. 17:58

    Dear user!

    DBMS_BACKUP_RESTORE is a package without papers, which means that you shouldn't use it. Instead you should think about using only a centralized catalogue-RMAN and stored scripts RMAN. You can write scripts overall. This kind of script is not related to a database. This means that you can use it with all of you 1500 DBs.

    Please take a look at this:

    [http://youngcow.net/doc/oracle10g/backup.102/b14191/rcmcatdb005.htm]

    Yours sincerely

    Florian W.

    Published by: Florian W. 30.11.2009 08:02

  • Attempt to upgrade post to restoreBackupPiece

    Hello

    I recently updated my software database for Oracle 12 c, it clean without bodies or database on the subject.

    The machine is Windows Server R2 2012.

    When I try to run the script (after the upgrade), I get the following error:

    Script:

    WHENEVER SQLERROR EXIT SQL.SQLCODE ROLLBACK
    WHENEVER OSERROR EXIT FAILURE ROLLBACK
    
    
    -- PARAMS:
    define NN_ORA_INSTALL_DIR = &1;
    define ORACLE_SID = &2;
    define ORACLE_SYS_BASE = &3;
    define ORACLE_HOME = &4;
    define SYSPASS = &5;
    
    
    
    
    connect SYS/&SYSPASS as SYSDBA
    set echo on;
    spool &NN_ORA_INSTALL_DIR\rmanRestoreDatafiles.log
    startup nomount;
    set echo off;
    set serveroutput on;
    select TO_CHAR(systimestamp,'YYYYMMDD HH:MI:SS') from dual;
    variable devicename varchar2(255);
    declare
    omfname varchar2(512) := NULL;
      done boolean;
      begin
        dbms_output.put_line(' ');
        dbms_output.put_line(' Allocating device.... ');
        dbms_output.put_line(' Specifying datafiles... ');
           :devicename := dbms_backup_restore.deviceAllocate;
        dbms_output.put_line(' Specifing datafiles... ');
        dbms_backup_restore.restoreSetDataFile;
          dbms_backup_restore.restoreDataFileTo(1, '&ORACLE_SYS_BASE\oradata\&ORACLE_SID\SYSTEM01.DBF', 0, 'SYSTEM');
          dbms_backup_restore.restoreDataFileTo(2, '&ORACLE_SYS_BASE\oradata\&ORACLE_SID\SYSAUX01.DBF', 0, 'SYSAUX');
          dbms_backup_restore.restoreDataFileTo(3, '&ORACLE_SYS_BASE\oradata\&ORACLE_SID\UNDOTBS01.DBF', 0, 'UNDOTBS1');
          dbms_backup_restore.restoreDataFileTo(4, '&ORACLE_SYS_BASE\oradata\&ORACLE_SID\USERS01.DBF', 0, 'USERS');
        dbms_output.put_line(' Restoring ... ');
        dbms_backup_restore.restoreBackupPiece('&ORACLE_HOME\assistants\dbca\templates\Seed_Database.dfb', done);
        if done then
            dbms_output.put_line(' Restore done.');
        else
            dbms_output.put_line(' ORA-XXXX: Restore failed ');
        end if;
        dbms_backup_restore.deviceDeallocate;
      end;
    /
    select TO_CHAR(systimestamp,'YYYYMMDD HH:MI:SS') from dual;
    spool off;
    exit;
    
    

    The error I get is:

    Distribute the device...

    Specification of data files...

    Specifying data files...

    Restoration...

    declare

    *

    ERROR on line 1:

    ORA-19583: conversation interrupted due to error

    ORA-19870: error when restoring a full backup

    C:\ORACLE\ORA12\ASSISTANTS\DBCA\TEMPLATES\SEED_DATABASE. DFB

    ORA-19615: some files not found in the backup set

    ORA-19613: datafile 2 not found in the backup set

    ORA-06512: at "SYS." "X$ DBMS_BACKUP_RESTORE ', line 6138

    ORA-06512: at line 16 level

    I checked and everything is granted regarding the permissions and privileges.

    What can possibly be the cause?

    Thanks in advance, David.

    Found to the question, the number for each data file has changed in Oracle12.

    dbms_backup_restore.restoreDataFileTo (1, ' & ORACLE_SYS_BASE\oradata\ & ORACLE_SID\SYSTEM01.) DBF', 0, 'SYSTEM');

    dbms_backup_restore.restoreDataFileTo (2, ' & ORACLE_SYS_BASE\oradata\ & ORACLE_SID\SYSAUX01.) DBF', 0, "SYSAUX");

    dbms_backup_restore.restoreDataFileTo (3, ' & ORACLE_SYS_BASE\oradata\ & ORACLE_SID\UNDOTBS01.) DBF', 0, "UNDOTBS1");

    dbms_backup_restore.restoreDataFileTo (4, ' & ORACLE_SYS_BASE\oradata\ & ORACLE_SID\USERS01.) DBF', 0, 'USERS');

    Must be:

    dbms_backup_restore.restoreDataFileTo (1, ' & ORACLE_SYS_BASE\oradata\ & ORACLE_SID\SYSTEM01.) DBF', 0, 'SYSTEM');

    dbms_backup_restore.restoreDataFileTo (3, ' & ORACLE_SYS_BASE\oradata\ & ORACLE_SID\SYSAUX01.) DBF', 0, "SYSAUX");

    dbms_backup_restore.restoreDataFileTo (5, ' & ORACLE_SYS_BASE\oradata\ & ORACLE_SID\UNDOTBS01.) DBF', 0, "UNDOTBS1");

    dbms_backup_restore.restoreDataFileTo (6, ' & ORACLE_SYS_BASE\oradata\ & ORACLE_SID\USERS01.) DBF', 0, 'USERS');

  • Error NEST

    Hi all

    I restored 11.1.0.7 database on another box of RHEL 5.7 and by renaming the database, I have encountered this problem:

    NEST-00111: error reported in the database Oracle target during execution

    begin dbms_backup_restore.nidprocessdf (: fno,: istemp,: skipped,: idchged,: nmchged);    end;

    ORA-01116: error opening database file /oradb/ERP/db/apps_st/data/temp01a.dbf

    ORA-27037: unable to get file status

    Linux-x86_64 error: 2: no such file or directory

    Additional information: 3

    ORA-06512: at "SYS." "X$ DBMS_BACKUP_RESTORE ', line 6694

    ORA-06512: at line 1

    Change of name of database failed.

    Should complete the change or changes from the PREVIOUS version before you perform any database.

    DBNEWID - completed with errors.

    nest target $ = [oracle@dev DEV] / revert = yes

    DBNEWID: Version 11.1.0.7.0 - Production on game Jan 14 19:21:47 2016

    Copyright (c) 1982, 2007, Oracle.  All rights reserved.

    Connected to the ERP (DBID = 13949842) database

    Connected to the server version 11.1.0

    Control of database files:

    /Oracle/dev/DB/apps_st/data/cntrl01.dbf

    /Oracle/dev/DB/apps_st/data/cntrl02.dbf

    /Oracle/dev/DB/apps_st/data/cntrl03.dbf

    Restore database ERP changes (Y / [N]) = > y

    Proceed with the operation

    Name of database recovery of DEV for ERP

    Control file /oracle/DEV/db/apps_st/data/cntrl01.dbf - modified

    Control file /oracle/DEV/db/apps_st/data/cntrl02.dbf - modified

    Control file /oracle/DEV/db/apps_st/data/cntrl03.dbf - modified

    DataFile /oracle/DEV/db/apps_st/data/system02.db - back

    DataFile /oracle/DEV/db/apps_st/data/system03.db - back

    DataFile /oracle/DEV/db/apps_st/data/system04.db - back

    DataFile /oracle/DEV/db/apps_st/data/system05.db - back

    DataFile /oracle/DEV/db/apps_st/data/ctxd01.db - back

    DataFile /oracle/DEV/db/apps_st/data/owad01.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_queue02.db - back

    DataFile /oracle/DEV/db/apps_st/data/odm.db - back

    DataFile /oracle/DEV/db/apps_st/data/olap.db - back

    DataFile /oracle/DEV/db/apps_st/data/sysaux01.db - back

    DataFile /oracle/DEV/db/apps_st/data/apps_ts_tools01.db - back

    DataFile /oracle/DEV/db/apps_st/data/system12.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_txn_data04.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_txn_ind06.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_ref03.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_int02.db - back

    DataFile /oracle/DEV/db/apps_st/data/sysaux02.db - back

    DataFile /oracle/DEV/db/apps_st/data/undo02.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_txn_data05.db - back

    DataFile /oracle/DEV/db/apps_st/data/undo03.db - back

    DataFile /oracle/DEV/db/apps_st/data/icontrol01.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_media02.db - back

    DataFile /oracle/DEV/db/apps_st/data/system10.db - back

    DataFile /oracle/DEV/db/apps_st/data/system06.db - back

    DataFile /oracle/DEV/db/apps_st/data/portal01.db - back

    DataFile /oracle/DEV/db/apps_st/data/system07.db - back

    DataFile /oracle/DEV/db/apps_st/data/system09.db - back

    DataFile /oracle/DEV/db/apps_st/data/system08.db - back

    DataFile /oracle/DEV/db/apps_st/data/system11.db - back

    DataFile /oracle/DEV/db/apps_st/data/undo01.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_txn_data01.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_txn_ind01.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_ref01.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_int01.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_summ01.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_nolog01.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_archive01.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_queue01.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_media01.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_txn_data02.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_txn_data03.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_txn_ind02.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_txn_ind03.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_txn_ind04.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_txn_ind05.db - back

    DataFile /oracle/DEV/db/apps_st/data/a_ref02.db - back

    DataFile /oracle/DEV/db/apps_st/data/temp01.db - back

    DataFile /oracle/DEV/db/apps_st/data/temp02.db - back

    NEST-00111: error reported in the database Oracle target during execution

    begin dbms_backup_restore.nidprocessdf (: fno,: istemp,: skipped,: idchged,: nmchged);    end;

    ORA-01116: error opening database file /oradb/ERP/db/apps_st/data/temp01a.dbf

    ORA-27037: unable to get file status

    Linux-x86_64 error: 2: no such file or directory

    Additional information: 3

    ORA-06512: at "SYS." "X$ DBMS_BACKUP_RESTORE ', line 6694

    ORA-06512: at line 1

    Reversion of the name of the database failed.

    Changes in release PREVIOUS must be completed before you perform any database.

    DBNEWID - completed with errors.

    What should I do in this case?

    Kind regards

    Vinod

    Hello

    If there is indeed another drop the temp folder

    and try to come back = yes

    and try new nest

    -Pavan Kumar N

  • Change TAG controlfile

    Hello guys,.

    How can I change the tag name in the AutoSave?

    quick glance:

    RMAN > list backup;

    Backup list

    ===============

    S LV TY Device Type delay #Pieces compressed #Copies Tag key

    ------- -- -- - ----------- --------------- ------- ------- ---------- ---

    3202 B 0 A 3 JANUARY 16 4 DISC 1 YES BKP_FULL

    3203 B 0 A DISC 3 JANUARY 16 1 1 YES BKP_FULL

    3204 DISC 3 JANUARY 16 1 1 YES BKP_ARC

    3205 a DISC 3 January 16 1 1 no TAG20160103T121745

    3206 a DISC 3 January 16 1 1 YES TAG20160103T122034

    3207 a DISC 3 January 16 1 1 no TAG20160103T122036

    3208 DISC 3 JANUARY 16 1 1 YES BKP_ARC

    3209 a DISC 3 January 16 1 1 no TAG20160103T124507

    3210 DISC 3 JANUARY 16 1 1 YES BKP_ARC

    3211 a DISC 3 January 16 1 1 no TAG20160103T134508

    RMAN > show all.

    CONFIGURE CONTROLFILE AUTOBACKUP ON;

    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT for DEVICE TYPE DISK TO ' / u05/control_BD_%F.ctf';

    Time of accomplishment BS key Type LV size device Type elapsed time

    ------- ---- -- ---------- ----------- ------------ ---------------

    3247 full 13.42 M DISK 00:00:01 January 4, 16

    BP key: 3280 situation: AVAILABLE Tablet: No. Tag: TAG20160104T074506

    Part name: /u05/control_BD_c-25577065-20160104-07.ctf

    SPFILE included: Modification Date: 3 January 16

    SPFILE db_unique_name: BD

    Control file included: cash SNA: 95833764 cash time: 4 January 16

    Hello

    1 direct the response is not possible (as you want to edit it - existing tag name) you must ensure that you can then give him only by using backup taken tag keyword followed by the name of tag

    2. Secondly, provided the demo below, if you try and look at the syntax of the catalog and uncatalog change - you can not able to do because the option is not out with parts backupsets/backup and (its only available with datafilecopy) controlfilecopy

    Demo

    RMAN > list backup;

    List of backup sets

    ===================

    Time of accomplishment BS key Type LV size device Type elapsed time

    ------- ---- -- ---------- ----------- ------------ ---------------

    17 full 9.92 M DISK 00:00:01 5 January 16

    BP key: 159 status: AVAILABLE Tablet: No. Tag: TAG20160105T144704

    Part name: /u04/test_backup/0hqqk7f8_1_1.set

    Control file included: cash SNA: 2899792 cash time: 5 January 16

    RMAN > 159 change backuppiece uncatalog;

    backup not catalogued piece

    handle=/u04/test_backup/0hqqk7f8_1_1.set backup RECID piece = 159 STAMP = 900341225

    1 the objects not catalogued

    RMAN > catalogue backuppiece ' / u04/test_backup/0hqqk7f8_1_1.set';

    backup item catalogued

    handle=/u04/test_backup/0hqqk7f8_1_1.set element of backup RECID = 161 STAMP = 900342448

    Again, we will have the same tagname

    RMAN > backup as copy current controlfile;     -lets see controlfile copy

    From backup 5 January 16

    using channel ORA_DISK_1

    channel ORA_DISK_1: from data file copy

    copy the current control file

    tag name=/u04/test_backup/cf_D-DEMO1_id-3897516396_0iqqk8m2.set output file = RECID = 1 STAMP = 900342467 TAG20160105T150746

    channel ORA_DISK_1: datafile copy complete, duration: 00:00:01

    Backup finished on 5 January 16

    RMAN > list a copy of the controlfile;

    List of Copies of control files

    ===========================

    S time delay key cash YVERT cash

    ------- - --------------- ---------- ---------------

    1. A 5 JANUARY 16 2901078 5 JANUARY 16

    Name: /u04/test_backup/cf_D-DEMO1_id-3897516396_0iqqk8m2.set

    Tag: TAG20160105T150746

    RMAN > change controlfilecopy 1 uncatalog;

    copy of control files not catalogued

    control file RECID = 1 STAMP = 900342467 name=/u04/test_backup/cf_D-DEMO1_id-3897516396_0iqqk8m2.set copy

    1 the objects not catalogued

    Catalogue controlfilecopy ' / u04/test_backup/cf_D-DEMO1_id-3897516396_0iqqk8m2.set' we can provide any tag... more here


    If you are debugging, you can see his inspect right and we have no setting for proc send the tagname attribute


    ENTRY krmzlog [15:18:59.576]
    control file RECID = TONE 2 = 90034313 name=/u04/test_backup/cf_D-DEMO1_id-3897516396_0iqqk8m2.set copy 9

    Elapsed time LEFT krmzlog [15:18:59.576] [00:00:00:00.000]

    krmxrpc - channel kpurpc2 err = 0 db = default target proc =SYS. DBMS_BACKUP_RESTORE. SETRMANSTATUSROWID off: 0

    krmxr - default channel returned by peicnt

    krmxr - default channel finished step

    Krmqgns ENTRIES

    failure to complete channel step 1 (krmqgns)

       krmqgns: job search for failure to channel (krmqgns)
    krmqgns: commands to be executed: (krmqgns)
    krmqgns: no work not found for default channel (krmqgns)
    (krmqgns)

    Krmqgns WHOLE with status 1

    Krmqgns ENTRIES

    krmqgns: job search for failure to channel (krmqgns)
    krmqgns: commands to be executed: (krmqgns)
    krmqgns: no work not found for default channel (krmqgns)
    (krmqgns)

    Krmqgns WHOLE with status 1

    krmxr - everything is done

    krmxr - out with 0

    Krmiexe COMPLETED with status 0 [15:18:59.577] out of time [00:00:00:00.010]

    But for datafilecopy you can do

    COPYDATAFILECOPY

    Name of default input/output argument type?

    ------------------------------ ----------------------- ------ --------

    NUMBER OF COPY_RECID IN

    NUMBER OF COPY_STAMP IN

    VARCHAR2 FULL_NAME OUT

    NUMBER OF OUT RECID

    NUMBER OF STAMP OUT

    FNAME VARCHAR2 IN DEFAULT

    MAX_CORRUPT DIRECTORY BY DEFAULT

    TAG VARCHAR2 IN by DEFAULT - you have tagname with which

    DEFAULT TO BOOLEAN NOCHECKSUM

    ISBACKUP IN BOOLEAN DEFAULT

    It may be useful

    -Pavan Kumar N

  • Decompression of file created with UTL_COMPRESS

    Can we not use the UNIX 'gzip' tool to decompress a file 'gz' with UTL_COMPRESS. LZ_COMPRESS?

    gzip -d 2015-07-30_ccr_records_arc_purged.csv.gz
    
    gzip: 2015-07-30_ccr_records_arc_purged.csv.gz: not in gzip format
    
    

    We must use UTL_COMPRESS. LZ_UNCOMPRESS? That wouldn't make sense. We should be able to use gzip or gunzip.

    Here is the procedure to compress files "csv":

    PROCEDURE compress_files
    IS
      dir_path          VARCHAR2(1024)          ;
      src_file          BFILE                   ;
      l_content         BLOB                    ;
      l_blob_len        INTEGER                 ;
      l_file            utl_file.file_type      ;
      l_buffer          RAW(32767)              ;
      l_amount          BINARY_INTEGER := 32767 ;
      l_pos             INTEGER := 1            ;
      l_compress_rate   INTEGER := 6            ;
      l_csv             VARCHAR2(3) := 'csv'    ;
    BEGIN
      get_dir_info(dir_path) ;
       -- retrieve all *.csv files using DBMS_BACKUP_RESTORE.SEARCHFILES in ListDir pipe-lined function
       FOR file IN ( SELECT column_value FROM TABLE(ListDir(dir_path,l_csv)) )
       LOOP
           src_file := BFILENAME(cDIRNAME, file.column_value);
           dbms_lob.FILEOPEN(src_file, dbms_lob.file_readonly);
           l_content  := utl_compress.LZ_COMPRESS(src_file, l_compress_rate);
           l_blob_len := dbms_lob.GETLENGTH(l_content);
           l_file     := utl_file.FOPEN(cDIRNAME, file.column_value || '.gz','wb');
          
           WHILE ( l_pos < l_blob_len  )
           LOOP
               dbms_lob.READ(l_content, l_amount, l_pos, l_buffer);
               utl_file.PUT_RAW(l_file, l_buffer, TRUE);
               l_pos := l_pos + l_amount;
           END LOOP ;
          
           dbms_lob.FILECLOSE(src_file) ;
           utl_file.FCLOSE(l_file);
       END LOOP ;
       
       EXCEPTION
           WHEN   others
           THEN
               IF utl_file.is_open(l_file) 
               THEN
                  utl_file.fclose(l_file);
               END IF;
                  
               RAISE;
    END compress_files ;
    
    
    

    I had this problem. I forgot to put the variable 'l_pos' to the value 1 at the end of the loop.

    PROCEDURE compress_files
    IS
      dir_path          VARCHAR2(1024)          ;
      src_file          BFILE                  ;
      l_content        BLOB                    ;
      l_blob_len        INTEGER                ;
      l_file            utl_file.file_type      ;
      l_buffer          RAW(32767)              ;
      l_amount          BINARY_INTEGER := 32767 ;
      l_pos            INTEGER := 1            ;
      l_compress_rate  INTEGER := 6            ;
      l_csv            VARCHAR2(3) := 'csv'    ;
    BEGIN
      get_dir_info(dir_path) ;
      -- retrieve all *.csv files using DBMS_BACKUP_RESTORE.SEARCHFILES in ListDir pipe-lined function
      FOR file IN ( SELECT column_value FROM TABLE(ListDir(dir_path,l_csv)) )
      LOOP
          src_file := BFILENAME(cDIRNAME, file.column_value);
          dbms_lob.FILEOPEN(src_file, dbms_lob.file_readonly);
          l_content  := utl_compress.LZ_COMPRESS(src_file, l_compress_rate);
          l_blob_len := dbms_lob.GETLENGTH(l_content);
          l_file    := utl_file.FOPEN(cDIRNAME, file.column_value || '.gz','wb'); 
    
          WHILE ( l_pos < l_blob_len  )
          LOOP
              dbms_lob.READ(l_content, l_amount, l_pos, l_buffer);
              utl_file.PUT_RAW(l_file, l_buffer, TRUE);
              l_pos := l_pos + l_amount;
          END LOOP ; 
    
          dbms_lob.FILECLOSE(src_file) ;
          utl_file.FCLOSE(l_file);
          l_pos := 1 ; /* this fixed the probelm */
      END LOOP ; 
    
      EXCEPTION
          WHEN  others
          THEN
              IF utl_file.is_open(l_file)
              THEN
                  utl_file.fclose(l_file);
              END IF; 
    
              RAISE;
    END compress_files ;
    /
    
  • Problems with Oracle 11g R2 XE

    Hi guys,.

    I had a problem and have to solve for abt a week now and tried a lot of solutions.

    My environment:

    Windows 7 Professional SP 1 64-Bit

    AMD Phenom II x 4 940 @3.0 GH

    4 GB of RAM (in use during the installation of 40%)

    The Windows Firewall is enabled (but oracle.exe and lstnr.exe are configured as an exception)

    Avast! FREE Antivirus Version 2014.9.0.2018

    Installation (both times with the same result):

    Installed O 11g 64-Bit XE in two different ways:

    I was logged in with user lies in Admingroup

    Installation started via right click with administrationprivileges

    I activated the Administrators account and logged with adminprivileges.

    After that, I installed the 11g XE 64 bit

    between the two steps I cleaned and restarted my system, register was too empty and the file has been deleted manually

    as a first step, I get this problem: Windows cannot find " " http://127.0.0.1:%HTTPPORT%/Apex/f?p=4950 "

    -> Manually changing HTTPORT % to 8080

    -> now I could double-click the shortcut, Firefox/IE/Chrome opens but 404 not Found error is returned

    -XracleXETNListener OracleServiceXE, both are running

    [code]

    C:\Windows\System32 > lsnrctl status

    LSNRCTL for 64-bit Windows: Version 11.2.0.2.0 - Production on November 4, 2014 18:02

    : 56

    Copyright (c) 1991, 2014, Oracle.  All rights reserved.

    Connection to (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1)))

    AMT-12541: TNS:no listener

    AMT-12560: TNS:protocol adapter error

    AMT-00511: no listener

    Windows 64-bit error: 2: no such file or directory

    Connection to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = D³rsinKurt-PC)(PORT=1521)

    )))

    STATUS of the LISTENER

    ------------------------

    Alias LISTENER

    TNSLSNR for Windows 64-bit version: Version 11.2.0.2.0 - Prod

    ction

    Start date November 4, 2014 13:53:50

    Uptime 0 days 4 h 9 min 9 s

    Draw level off

    Security ON: OS Local Authentication

    SNMP OFF

    Listener log file C:\oraclexe\app\oracle\diag\tnslsnr\D³rsinKurt-PC\list

    ener\alert\log. XML

    Summary of endpoints listening...

    (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = D³rsinKurt-PC)(PORT=1521)))

    The listener supports no services

    The command completed successfully

    [/ code]

    If Listenerservice is up and running, but I can't find the http Service 8080 with netstat-a

    so I started to study a little more:

    Registryfolder: HK_LOCAL_MACHINE\SOFTWARE\ORACLE is installed

    following subdirectories are installed: KEY_XE, ODP.NET, OracleMTSRecoveryService

    What I tried (both ways, with and without adminstrationprivileges):

    I created two new DWORD values in KEY_XE ORACLE_SID_AUTOSTART and - STOP both to true and stopped and started services, nothing changes.

    Inserted the two users (Administrator and normal user) in the Group ORA_DBA, nothing changes, even tried to set and the new

    you wanted to connect to sqlplus using the console:

    C:\Windows\System32 > sqlplus system

    SQL * more: Production version 11.2.0.2.0 on 4 Nov 18:09:21 Di 2014

    Copyright (c) 1982, 2014, Oracle.  All rights reserved.

    Enter the password:

    ERROR:

    ORA-01034: ORACLE not available

    ORA-27101: shared memory realm does not exist

    Process ID: 0

    Session IDs: serial number 0: 0

    Enter the user name:

    When I start directly at the sqlplus prompt and write the start of the command I got the following msg: ORA-01031: insufficient privileges

    I looked in the folder ORA_BASE and looked at the oradat file, it contains a XE-folder that is empty, the admin folder contains: XE / and adump, dpdump and pfile, all three are empty (what does this mean? No DB created at all?)

    I looked at the file ORA_HOME and found initXE.ora, oradba.exe, oradim and PWDXE.ora

    I looked in the oradim.txt log:

    Kills Nov 04 11:21:17 2014

    C:\oraclexe\app\oracle\product\11.2.0\server\bin\oradim.exe-arret-SID xe - usrpwd * - immediate shutmode - log oradim.log

    Kills Nov 04 11:21:55 2014

    ORA-01012: not connected

    Kills Nov 04 11:23:01, 2014

    C:\oraclexe\app\oracle\product\11.2.0\server\bin\oradim.exe-demarrage-SID xe - usrpwd * - log oradim.log - nocheck 0

    Kills Nov 04 11:23:38 2014

    ORA-01078: failure in the treatment of system settings

    ORA-01565: error in the identification of the file "C:\oraclexe\app\oracle\product\11.2.0\server\dbs/spfileXE.ora".

    ORA-27041: could not open the file

    04002 - OSD: could not open the file

    S/O-error: (OS 2) Das System kann die angegebene Datei nicht find.

    -> bingo, 1st question: there is no spfileXE.ora, how can I create it? more in the dbs-file there is only an init.ora and not initXE.ora?

    Looked in the log-file files 5 from clscX.txt (probably after each systemreboot? containing the following):

    Oracle Database 11g Clusterware Release 11.2.0.2.0 - Production Copyright 1996, 2010 Oracle. All rights reserved.

    2014-11-04 - 13:53:52.197: [5576] [default] ut_read_reg:2:ocr SOFTWARE\Oracle\olr registry key cannot be opened. error 2

    [DESTROYED] clse_get_crs_home [5576]: error recovery configuration OLR [0] [error opening of the olr registry key. The system could not find the file.

    ]

    -> SystemLanguage is German, so I translated the German parts, perhaps he was lost in the translation of sth

    -> 2nd question: is there a missing registry key?

    In addition, I looked at the ORACLE_HOME/server/config/home cloesly folder:

    cloneDBCreation:

    SQL > Create controlfile reuse database "XE" value

    2 MAXINSTANCES 8

    MAXLOGHISTORY 3 1

    MAXLOGFILES 16 4

    5 MAXLOGMEMBERS 3

    6 MAXDATAFILES 100

    DataFile 7

    8 "C:\oraclexe\app\oracle\oradata\XE\system.dbf"

    9 "C:\oraclexe\app\oracle\oradata\XE\undotbs1.dbf."

    10 "C:\oraclexe\app\oracle\oradata\XE\sysaux.dbf."

    11 'C:\oraclexe\app\oracle\oradata\XE\users.dbf '.

    LOGFILE 12

    13 GROUP 1 SIZE 51200K,

    14 GROUP 2 SIZE 51200K,

    15 RESETLOGS;

    SP2-0640: not connected

    SQL > exec dbms_backup_restore.zerodbid (0);

    SP2-0640: not connected

    SP2-0641: "EXECUTE" requires the connection to the server

    SQL > shutdown immediate;

    ORA-01012: not connected

    "SQL > startup nomount pfile="C:\oraclexe\app\oracle\product\11.2.0\server\config\scripts\initXETemp.ora ";

    ORA-01031: insufficient privileges

    ---------------------------

    CloneRmanRestore:

    "SQL > startup nomount pfile="C:\oraclexe\app\oracle\product\11.2.0\server\config\scripts\init.ora ";

    ORA-01031: insufficient privileges

    SQL > @C:\oraclexe\app\oracle\product\11.2.0\server\config\scripts\rmanRestoreDatafiles.sql;

    SQL > set off echo;

    SP2-0640: not connected

    SP2-0640: not connected

    SP2-0640: not connected

    ERROR:

    ORA-01031: insufficient privileges

    SQL > spool C:\oraclexe\app\oracle\product\11.2.0\server\config\log\cloneDBCreation.log

    ---------------------------

    PostDBCreation:

    QL > Connect "SYS" / "' * ' as SYSDBA"

    ERROR:

    ORA-01031: insufficient privileges

    SQL > set echo on

    SQL > //create or replace directory DB_BACKUPS as 'C:\oraclexe\app\oracle\fast_recovery_area ';

    SP2-0103: nothing in the SQL buffer to run.

    SQL > start

    2 dbms_xdb.sethttpport('8080');

    3 dbms_xdb.setftpport('0');

    4 end;

    5.

    SP2-0640: not connected

    SQL > create spfile='C:\oraclexe\app\oracle\product\11.2.0\server\dbs/spfileXE.ora 'FROM pfile='C:\oraclexe\app\oracle\product\11.2.0\server\config\scripts\init.ora ';

    SP2-0640: not connected

    SQL > shutdown immediate;

    ORA-01012: not connected

    SQL > connect "SYS" / "' & & sysPassword ' as SYSDBA"

    ERROR:

    ORA-01031: insufficient privileges

    .

    .

    .

    ---------------------------

    SQL > @C:\oraclexe\app\oracle\product\11.2.0\server\rdbms\admin\dbmssml.sql;

    SP2-0310: cannot open the file 'C:\oraclexe\app\oracle\product\11.2.0\server\rdbms\admin\dbmssml.sql '.

    SQL > @C:\oraclexe\app\oracle\product\11.2.0\server\rdbms\admin\dbmsclr.plb;

    SQL > DROP PUBLIC DATABASE LINK DBMS_CLRDBLINK;

    SP2-0640: not connected

    SQL > CREATE the PUBLIC DATABASE LINK DBMS_CLRDBLINK with the HELP of "ORACLR_CONNECTION_DATA";

    SP2-0640: not connected

    SQL > CREATE or REPLACE LIBRARY wrapped ORACLECLR_LIB

    2 a000000

    1 of 3

    4 abcd

    5-abcd

    6 abcd

    7 abcd

    8 abcd

    9 abcd

    10 abcd

    11-abcd

    12 abcd

    13 abcd

    14 abcd

    ABCD 15

    ABCD 16

    17 abcd

    18 abcd

    19 16

    20 51 8 d

    21 L/XXXXXXXXXX...

    XXXXXXX 22...

    23

    24.

    SP2-0640: not connected

    SQL > DROP TYPE DBMS_CLRParamTable;

    SP2-0640: not connected

    SQL > DROP TYPE DBMS_CLRType;

    SP2-0640: not connected

    SQL > CREATE or REPLACE TYPE wrapped DBMS_CLRType

    ---------------------------

    XE:

    The created instance.

    So I hope this is enough information

    Thanks in advance

    Dursin Kurt

    OK guys I found:

    Problem is the XE.bat - Script could not add me to the ORA_DBA group.

    Reason: my Computername and username, both had a mutation of the vowel 'u '.

    Why it has not worked to my laptop computer company too have both my 'U' in the username

    solved!

  • In 11g default Audit policy

    Hi all

    11.2.0.3.11

    AIX6

    This point of view v$ can I select all the information on our database of Audit policy setting? This shows the type of actions, events and information that is captured?

    Thank you

    MK

    Thank you Vlad,

    So note that Oracle does not recommend, usually, to revoke the privileges of the audience granted by default to the parcel (the functionality may be affected), but warns on privileges such as (a stupid example: GRANT SELECT ANY TABLE to PUBLIC) because this will affect the security.



    Then there are stupid privileges being revoked in the document above, in part as follows:

    (one of this broke our prod database?)

    REVOKE EXECUTE ON DBMS_ADVISOR TO PUBLIC;

    REVOKE EXECUTE ON THE PUBLIC DBMS_CRYPTO;

    REVOKE EXECUTE ON DBMS_JAVA TO PUBLIC;

    REVOKE EXECUTE ON DBMS_JAVA_TEST TO PUBLIC;

    REVOKE EXECUTE ON THE PUBLIC DBMS_JOB;

    REVOKE EXECUTE ON THE PUBLIC DBMS_LDAP;

    REVOKE EXECUTE ON THE PUBLIC DBMS_LOB.

    REVOKE EXECUTE ON THE PUBLIC DBMS_OBFUSCATION_TOOLKIT;

    REVOKE EXECUTE ON DBMS_BACKUP_RESTORE TO PUBLIC;

    REVOKE EXECUTE ON THE PUBLIC DBMS_SCHEDULER;

    REVOKE EXECUTE ON THE PUBLIC DBMS_SQL.

    REVOKE EXECUTE ON THE PUBLIC DBMS_XMLGEN;

    REVOKE EXECUTE ON DBMS_XMLQUERY TO THE PUBLIC;

    REVOKE EXECUTE ON UTL_FILE TO THE PUBLIC;

    REVOKE EXECUTE ON UTL_INADDR TO PUBLIC;

    REVOKE EXECUTE ON THE PUBLIC UTL_TCP;

    REVOKE EXECUTE ON UTL_MAIL TO PUBLIC;

    REVOKE EXECUTE ON THE PUBLIC UTL_SMTP.

    REVOKE EXECUTE ON UTL_DBWS TO PUBLIC;

    REVOKE EXECUTE ON UTL_ORAMTS TO PUBLIC;

    REVOKE EXECUTE ON THE PUBLIC UTL_HTTP.

    REVOKE EXECUTE ON THE PUBLIC HTTPURITYPE.

    REVOKE EXECUTE ON DBMS_SYS_SQL TO THE PUBLIC;

    REVOKE EXECUTE ON DBMS_BACKUP_RESTORE TO PUBLIC;

    REVOKE EXECUTE ON DBMS_AQADM_SYSCALLS TO PUBLIC;

    Revoke execute on DBMS_REPACT_SQL_UTL to PUBLIC;

    Revoke execute on INITJVMAUX to PUBLIC;

    Revoke execute on DBMS_STREAMS_ADM_UTL to PUBLIC;

    Revoke execute on DBMS_AQADM_SYS to PUBLIC;

    Revoke execute on DBMS_STREAMS_RPC to PUBLIC;

    Revoke execute on DBMS_AQADM_SYS to PUBLIC;

    Revoke execute on the PUBLIC DBMS_PRVTAQIM;

    Revoke execute on the PUBLIC LTADM.

    Revoke execute on WWV_DBMS_SQL to PUBLIC;

    Revoke execute on WWV_EXECUTE_IMMEDIATE to PUBLIC;

    Revoke execute on DBMS_IJOB to PUBLIC;

    Revoke execute on DBMS_FILE_TRANSFER to PUBLIC;

    revoke EXECUTE them ALL the PROCEDURE of OUTLN;

    revoke EXECUTE them ENTIRE DBSNMP PROCESS;

    Thank you

  • Restoration of RMAN with SBT_TAPE Symantec Netbackup

    Hey, people! We have batch files to run backup who send a full and differential backups of a database. It works as below:

    RUN {}

    ALLOCATE CHANNEL ch00

    TYPE 'SBT_TAPE ';

    SEND "NB_ORA_CLIENT = corp08, NB_ORA_SID = GEDD, NB_ORA_POLICY = WINDOWS-ORACLE-FULL, NB_ORA_SERV = corp05, NB_ORA_SCHED = per default-Application-Backup";

    BACKUP

    ADDITIONAL = 0

    FORMAT "% d_ % T_ t % db_full_.

    TAG 'GIA-db-full ".

    DATABASE;

    OUTPUT CHANNEL ch00;

    # Archived backup logs

    SQL 'alter system archive log current';

    ALLOCATE CHANNEL ch00

    TYPE 'SBT_TAPE ';

    SEND "NB_ORA_CLIENT = corp08, NB_ORA_SID = GEDD, NB_ORA_POLICY = WINDOWS-ORACLE-FULL, NB_ORA_SERV = corp05, NB_ORA_SCHED = per default-Application-Backup";

    BACKUP

    FORMAT "% d_ % T_ t % arch_full_.

    TAG 'GIA-arch-full ".

    ARCHIVELOG

    ALL THE

    REMOVE ALL THE ENTRIES;

    OUTPUT CHANNEL ch00;

    # Backup control files

    ALLOCATE CHANNEL ch00

    TYPE 'SBT_TAPE ';

    SEND "NB_ORA_CLIENT = corp08, NB_ORA_SID = GEDD, NB_ORA_POLICY = WINDOWS-ORACLE-FULL, NB_ORA_SERV = corp05, NB_ORA_SCHED = per default-Application-Backup";

    BACKUP

    FORMAT "% d_ % T_ t % ctrl_full_.

    TAG 'GEDD-ctrl-full ".

    CURRENT CONTROLFILE;

    OUTPUT CHANNEL ch00;

    ALLOCATE CHANNEL ch00

    TYPE 'SBT_TAPE ';

    OVERLAP ARCHIVELOG ALL;

    OUTPUT CHANNEL ch00;

    }

    We use Symantec Netbackup software to support us on leave, the backup files to SBT_TAPE.

    The incident occurs when I try to restore a tablespace, for example.

    When I run a restore below procedure:

    RMAN > RUN {

    ALLOCATE CHANNEL ch00 TYPE SBT_TAPE SEND 'NB_ORA_CLIENT = corp08';

    recover the tablespace "T_CCEL_DAT_01", "T_CCEL_IND_01" until "to_date ('2014-06-23 08:00 ',' ' YYYY-MM-DD HH24:MI:SS)" auxiliary destination "D:\". » ;

    }

    The procedure allocates a ch00 channel, which triggers the work, find a revovery catalog but the Holy following error at the end:

    channel alocado: ch00

    channel ch00: SID = 66 = SBT_TAPE device type

    channel ch00: Veritas NetBackup for Oracle - version 7.6 (20131113)

    Iniciando recover em 24/07/14

    RMAN-05026: ADVERTENCIA: implies - is o conjunto tablespaces has seguir is applied a um ponto specific no tempo

    Espera - is a list of tablespaces have segmentos CANCEL

    SYSTEM tablespace

    Tablespace UNDOTBS1

    Preencher uma instance automatica, com SID = 'sfgw'

    inicializacao para instance automatica free time:

    db_name = ORACLE02

    db_unique_name = sfgw_tspitr_ORACLE02

    compatible = 11.2.0.0.0

    DB_BLOCK_SIZE = 8192

    DB_FILES = 500

    SGA_TARGET = 280M

    process = 50

    db_create_file_dest = D:------.

    Log_archive_dest_1 =' location = d.: \'

    Auxiliary parameter file #No used

    inicializando instance automatica ORACLE02

    Instance Oracle iniciada

    Total da Area Global Sistema 292278272 bytes

    Bytes of size 2254584 fixed

    104859912 variable size bytes

    180355072 of database buffers bytes

    Redo buffers 4808704 bytes

    Instance automatica criada

    List of tablespaces that were banco dados destino sistematicamente:

    Tablespace T_CCEL_DAT_01

    Tablespace T_CCEL_IND_01

    conteudo Memoria of Script:

    {

    # the requested value point in time

    until ' to_date ('2014-06-23 08:00 ',' YYYY-MM-DD HH24:MI:SS') ";

    # restore the controlfile

    Restore clone controlfile;

    # mount the controlfile

    SQL clone "alter database database mount clone";

    Current online journal archive #.

    SQL 'alter system archive log current';

    # avoid needless save structural changes during the TSPITR

    SQL ' start dbms_backup_restore. AutoBackupFlag (FALSE); end;';

    }

    Executando Script de Memoria

    Comando executando: SET until clause

    Iniciando restoration em 24/07/14

    Removendo instance automatica

    desativando instance automatica

    Oracle instance Encerramento

    Instance automatica removida

    channel released: ch00

    RMAN-00571: ===========================================================

    RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.

    RMAN-00571: ===========================================================

    RMAN-03002: falha comando recover em 24/07/2014 08:59:41

    RMAN-03015: erro ocorrido no armazenado memory Script script

    RMAN-06034: at least 1 channel must be distributed to run this command

    I study and I can not find a conclusion as to the error. Is there someone to help me with this?

    Kind regards

    André Luis

    I found the error: we put the channel as Symantec on Allocate environment variables below.

    RUN {}

    ALLOCATE CHANNEL ch00 TYPE SBT_TAPE SEND 'NB_ORA_CLIENT = corp0814';

    Restore tablespace t_outorgas_dat_01 until TIME ' TO_DATE ('2014-07-24 02:50 ',' ' YYYY-MM-DD HH24:MI:SS) "validate;

    }

  • Purge the Archivelogs Dataguard

    Hi all

    11.2.0.3

    How can I set up my database PRIMARY and STANDBY auto purge all archivelogs (both primary and standby) already applied in waiting?

    While I don't have to worry about full archivelog in my FRA.

    Thank you all,

    pK

    Hello

    You should not care about people not confident in this respect.

    See the blog post I linked above. There is a bug in 11.2 and there is a solution. And there is a request to check when the archivelogs recoverable or not.

    I put in place that to several customers, where there is no 'archivelog delete' at all and Oracle manages the FRA. Just be sure that one of the following is executed frequently

    either RMAN > sql "begin dbms_backup_restore.refreshagedfiles; end; « ; or rerun the CONFIGURE ARCHIVELOG

    In any case, it is good to monitor the use of FRA of space, then you should be alerted if they are not purged as you want.

    Kind regards

    Franck.

  • Oracle 11g XE on Open Suse 13.1

    Hi all

    I'm currently installing an Oracle 11 g Express on Open Suse 13.1 in a virtual machine.

    I used the document as a reference for my installation: Oracle Database Express Edition

    Comments:

    I have a facility of Open Suse 13.1 vanilla except for these changes:

    • I adjusted/etc/hostname to OpenSuse, in order to avoid special characters in the host name
    • I increase the 2045 to 2049 MB SWAP partition to ensure the minimum configuration

    I downloaded the RPM and extract. Then I started the installation

    SUSE@openSUSE:~/downloads/Disk1 > sudo rpm - ivh oracle-xe - 11.2.0 - 1.0.x86_64.rpm

    root password:

    Preparing...                          ################################# [100%]

    /var/tmp/RPM-tmp.jL4h0F: line 257: [: 18446744073709551615: integer EXPECTED]

    Update / installation...

    1:Oracle - xe - 11.2.0 - 1, 0 # [100%]

    Execution of the post-installation steps...

    You must run 'configure /etc/init.d/oracle-xe' as the root user to set up the database.

    Afterwards, I ran the configure script using the default values:

    SUSE@openSUSE:~/downloads/Disk1 > sudo /etc/init.d/oracle-xe Setup

    Oracle Database 11g Express Edition Setup

    -------------------------------------------------

    This will configure the startup properties of database Oracle 11 g Express

    Edition.  The following questions will determine whether the database should

    start the system startup and ports, it will use passwords that

    will be used for database accounts.  Press < enter > to accept the default values.

    CTRL-C will stop.

    Specify the HTTP port that will be used for Oracle Application Express [8080]:

    Specify a port that will be used for the listener to the database [1521]:

    Specify a password to use for database accounts.  Note that the same

    password will be used for SYS and SYSTEM.  Oracle recommends using

    Different passwords for each account database.  This can be done after

    initial Setup:

    Confirm the password:

    Want that Oracle Database 11g Express Edition to be started on boot (y/n) [o]:

    From Oracle Net listener... Fact

    Configuring database...

    Configuration of the database failed.  Look at /u01/app/oracle/product/11.2.0/xe/config/log for more details

    You have an idea what is happening here? I have attached the newspapers and some additional information. Maybe you can help me?

    Thank you very much in advance!

    cloneDBCreation.log

    Create controlfile reuse set database "XE".

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    BEGIN dbms_backup_restore.zerodbid (0); END;

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    ORA-01034: ORACLE not available

    ORA-27101: shared memory realm does not exist

    Linux-x86_64 error: 2: no such file or directory

    ORA-00119: invalid specification for the system LOCAL_LISTENER parameter

    ORA-00130: invalid listener address ' (ADDRESS = (PROTOCOL = TCP)(HOST=OpenSuse) (PORT = 1521))'

    Create controlfile reuse set database "XE".

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    alter system enable restricted session

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    ALTER database resetlogs open "XE".

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    ALTER database rename global_name to "XE".

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    alter system switch logfile

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    change of system checkpoint

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    alter database drop logfile Group 3

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    ALTER TABLESPACE TEMP add TEMPFILE ' / u01/app/oracle/oradata/XE/temp.dbf' SIZE 20480 K REUSE AUTOEXTEND ON NEXT 640 K MAXSIZE UNLIMITED

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    Select nom_tablespace from dba_tablespaces where nom_tablespace = "USERS".

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    Select the sid, program, serial No., user name of session $ v

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    alter user sys identified by 'oracle '.

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    change the system of the user identified by 'oracle '.

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    modify the disable restricted session system

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    CloneRmanRestore.log

    ORA-00119: invalid specification for the system LOCAL_LISTENER parameter

    ORA-00130: invalid listener address ' (ADDRESS = (PROTOCOL = TCP)(HOST=OpenSuse) (PORT = 1521))'

    Select TO_CHAR (systimestamp, 'YYYYMMDD hh') of double

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    declare

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    Select TO_CHAR (systimestamp, 'YYYYMMDD hh') of double

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0


    postDBCreation.log

    Start

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    Created file.

    ORA-01034: ORACLE not available

    ORA-27101: shared memory realm does not exist

    Linux-x86_64 error: 2: no such file or directory

    ORA-00119: invalid specification for the system LOCAL_LISTENER parameter

    ORA-00130: invalid listener address ' (ADDRESS = (PROTOCOL = TCP)(HOST=OpenSuse) (PORT = 1521))'

    Select ' utl_recomp_begin: ' | TO_CHAR (sysdate, ' hh) double

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    BEGIN utl_recomp.recomp_serial (); END;

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    Select ' utl_recomp_end: ' | TO_CHAR (sysdate, ' hh) double

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    postScripts.log

    CREATE or REPLACE a LIBRARY dbms_sumadv_lib AS ' / u01/app/oracle/product/11.2.0/xe/lib/libqsmashr.so';

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    BEGIN dbms_datapump_utl.replace_default_dir; END;

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    Commit

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    create or replace the XMLDIR directory as ' / u01/app/oracle/product/11.2.0/xe/rdbms/xml'

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    DELETE THE ORACLE_OCM_CONFIG_DIR DIRECTORY

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    DELETE THE ADMIN_DIR DIRECTORY

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    REMOVE THE WORK_DIR DIRECTORY

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    BEGIN dbms_swrf_internal.cleanup_database (cleanup_local = > FALSE); END;

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    Commit

    *

    ERROR on line 1:

    ORA-01034: ORACLE not available

    Process ID: 0

    Session IDs: serial number 0: 0

    / etc/HOSTNAME

    OpenSuse

    / etc/hosts

    #

    # hosts this file describes a number of host-address name

    mappings for the TCP/IP subsystem.  It is especially

    # used at the time, when no name servers are running.

    # On small systems, this file can be used instead of one

    # "named" server name.

    # The syntax:

    #

    # IP address full-qualified-Hostname short-Hostname

    #

    127.0.0.1 localhost

    # a special IPv6 address

    : 1 localhost ipv6-ipv6 loopback localhost

    FE00::0 ipv6-localnet

    FF00::0 ipv6-mcastprefix

    FF02::1 ipv6-allnodes

    FF02::2 ipv6-allrouters

    FF02::3 ipv6-allhosts

    Hello

    1.

    Please set up your domain in/etc/hosts FULL name

    https://en.Wikipedia.org/wiki/Fully_qualified_domain_name

    http://KB.IU.edu/data/AIUV.html

    your turns to me such as CentOS and Oracle Linux.

    Or take a look at the site of intrest:

    http://www.Novell.com/documentation/SUSE91/SUSELinux-adminguide/HTML/ch14s03.html

    127.0.0.1 localhost

    192.168.85.133 OpenSuse. ???  OpenSuse

    2.

    To connect:

    sqlplus sys / as sysdba

    or

    sqlplus system /.

    Note: the password is case sensitive!

    or disable this as SYSDBA (sqlplus sys / as sysdba):

    ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON IS FALSE SCOPE = BOTH;.

    3.

    Set the password:

    ALTER DEFAULT PROFILE LIMIT PASSWORD_LIFE_TIME UNLIMITED;

    and restart

    stop immediately;

    start-up;

    4.

    I created a /ect/profile.local file with:

    . /U01/app/Oracle/product/11.2.0/XE/bin/oracle_env.sh

    Thus, every time you start, it will set the environment.

    It's my Profile.local:

    . /U01/app/Oracle/product/11.2.0/XE/bin/oracle_env.sh

    ORACLE_HOME=/U01/app/Oracle/product/11.2.0/XE

    ORACLE_OWNER = oracle

    ORACLE_SID = XE

    LSNR = $ORACLE_HOME/bin/lsnrctl

    SQLPLUS = $ORACLE_HOME/bin/sqlplus

    Export ORACLE_HOME

    export ORACLE_SID

    export ORACLE_BASE = / u01/app/oracle

    export PATH = $ORACLE_HOME/bin: $PATH

    NLS_LANG='$ORACLE_HOME/bin/NLS_LANG.sh'

    ORACLE_ADMIN = / u01/app/oracle/admin / $ORACLE_SID

    export ORACLE_ADMIN

    ORACLE_FLASH = / u01/app/oracle/fast_recovery_area / $ORACLE_SID

    export ORACLE_FLASH

    ORACLE_ALERT = / u01/app/oracle/diag/rdbms/xe/XE/trace

    export ORACLE_ALERT

    ORACLE_DATA_PUMP_DIR = / u01/app/oracle/admin/XE/dpdump

    export ORACLE_DATA_PUMP_DIR

    DIAGNOSTIC_DEST = $ORACLE_HOME/log

    export DIAGNOSTIC_DEST

    TNS_ADMIN = $ORACLE_HOME/network/admin

    Export TNS_ADMIN

    5.

    Recreate the DBSNMP user in the database as SYSDBA (sqlplus sys / as sysdba):

    @/u01/app/oracle/product/11.2.0/xe/rdbms/admin/catnsnmp.sql

    @/u01/app/oracle/product/11.2.0/xe/rdbms/admin/catsnmp.sql

    Best regards.

  • RMAN cannot write to the mapped drive

    Hello

    8.1.7 on Win 2003 my rman script is:

    BACKUP

    ADDITIONAL = 0

    FORMAT 'F:\BACKUP\RMAN\FULL\bk_u%u_s%s_p%p_t%t '.

    FILESPERSET 6

    SETSIZE 29000000

    DATABASE;

    F is a mapped drive.

    But RMAN fails with:

    RMAN-10035: exception raised in RPC: ORA-19504: could not create the file "" F:\BACKUP\RMAN\FULL\bk_uhios0hpc_s270898_p1_t834684716. "

    ORA-27040: skgfrcre: error, unable to create the file

    04002 - OSD: could not open the file

    S/O-error: (OS 3) the system cannot find the path specified.

    In the command line when I derived:

    dir F:\BACKUP\RMAN\FULL

    It is ok.

    Thanks for the help.

    Hello

    Thanks DavidAW.

    Sorry I was on another site with other tasks.

    Here is the error of the battery:

    RMAN-00571: ===========================================================

    RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.

    RMAN-00571: ===========================================================

    RMAN-03007: renewable error occurred during the execution of the command: backup

    RMAN-07004: unhandled exception during execution of the order on channel ch00

    RMAN-10035: exception raised in RPC: ORA-19504: cannot create the file '\\SERVER\BACKUP\\RMAN\FULL\MYDB\bk_uh6os0eg9_s270886_p1_t834681353 '.

    ORA-27040: skgfrcre: error, unable to create the file

    OSD-04001: invalid logical block size (BONE 512)

    RMAN-10031: ORA-19624 has occurred during the call to DBMS_BACKUP_RESTORE. BACKUPPIECECREATE

    Complete recovery manager.

    I can do:

    NET use yourpassword \\fileshare\sharename / user: domain\username

    and to create any file.

    Kind regards.

  • Error when I configure snapshot controlfile RMAN

    Dear Experts,

    I have Oracle 11 g R2 DB primary and Standby in two Machines

    I have Window Server 2008

    I am new to RMAN tools

    I do set up RMAN primary side

    I made the OS address for a disk primary side

    Now I'm RMAN configuration as below:

    Configure default device the disk type;

    set up the device type disk parallelism 4 type of backup backupset.

    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK to 'Z:\RmanControlFileBackup\cf%F ';

    Configure controlfile autobackup on;

    Configure controlfile autobackup peripheral type disc format to "+ FRA;

    Configure controlfile autobackup format for device type sbt to "backup_ % d_controlfile_ %f."

    Configure redundancy 4 retention strategy;

    Configure the None archivelog deletion policy;

    Configure snapshot controlfile name to 'Z:\RMANCONTROLFILEBACKUP\SNAPSHOT_EPPROD1_CF. CTL';

    Next, I get the following error... I don't know how I can delete that I did my research online, I found this link

    http://pavelermakov.WordPress.com/2011/11/08/ora-01580-error-creating-control-backup-file/

    RUN SYS. DBMS_BACKUP_RESTORE. CFILESETSNAPSHOTNAME('/U01/app/Oracle/product/11.2/DB/DBS/snapcf_db1. F') ;

    I could not implemented on my setup because I do not have snapcf_db1.f file... Please any help will be appreciated.

    anyone with any solution.

    I need to erase the last transactional... .configure the controlfile Snap to 'Z:\RMANCONTROLFILEBACKUP\SNAPSHOT_EPPROD1_CF. CTL' name; who make that mistake.

    RMAN-00571: ===========================================================

    RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.

    RMAN-00571: ===========================================================

    RMAN-03002: failure of the command configure at 19/12/2013 08:44:57

    RMAN-03014: implicit recovery catalog Resync failed

    RMAN-03009: resync command failed complete default channel at 19/12/2013 08:44:57

    ORA-01580: Z:\RMANCONTROLFILEBACKUP\SNAPSHOT_EPPROD1_CF. CTL control backup file creation error

    ORA-27040: create file error, cannot create the file

    04002 - OSD: could not open the file

    S/O-error: (OS 3) the system cannot find the path specified.

    Hello

    > RMAN-03002: failure of the command configure at 19/12/2013 08:44:57

    > Implicit 03014 RMAN recovery catalog Resync failed:

    > RMAN-03009: resync command failed complete default channel at 19/12/2013 08:44:57

    "DO NOT CONNECT TO THE CATALOG.

    Thank you

  • Impossible to copy the control file.

    Hi everyone, I am trying to clone my database and get this error when you try to copy the control file.  I apologize if it's very beginner to here but I'm really stuck and need a hand!  Thank you.

    SQL > @D:\oracle\product\test\cloneinfo\test_ctl.sql

    ORA-01081: cannot start already running ORACLE - he stop first

    CREATE CONTROLFILE SET DATABASE "mediated" RESETLOGS ARCHIVELOG

    *

    ERROR on line 1:

    ORA-01503: CREATE CONTROLFILE failed

    ORA-00200: control file could not be created

    ORA-00202: control file: ' D:\ORACLE\PRODUCT\ORADATA\TEST\TEST_CONTROL01. CTL'

    ORA-27038: created file already exists

    OSD-04010: < create > option specified, the file already exists

    START: RECNO: = SYS. DBMS_BACKUP_RESTORE. SETCONFIG ("CONTROLFILE AUTOBACKUP', 'ON'")

    ; END;

    *

    ERROR on line 1:

    ORA-01507: database not mounted

    ORA-06512: at "SYS." "X$ DBMS_BACKUP_RESTORE ', line 4400

    ORA-06512: at line 1

    ALTER DATABASE OPEN RESETLOGS

    *

    ERROR on line 1:

    ORA-01507: database not mounted

    SQL > select name from v$ datafile

    2;

    Select name from v$ datafile

    *

    ERROR on line 1:

    ORA-01507: database not mounted

    Each of us has started early, don't worry.

    (1) analyze the errors:

    ORA-01081: cannot start already running ORACLE - he stop first

    your database are open? Check it with--> sqlplus > select status from v$ instance;

    (2) following error:

    ORA-00202: control file: ' D:\ORACLE\PRODUCT\ORADATA\TEST\TEST_CONTROL01. CTL'

    ORA-27038: created file already exists

    OSD-04010: option specified, file already exists

    Explain to: https://forums.oracle.com/message/9629124

    (3) to create controlfile your database should be in status "Nomount". So:

    SQL > shutdown immediate;

    SQL > startup nomount;

    4) more info on: CREATE CONTROLFILE

    If you have more problems, let us know.

Maybe you are looking for

  • the incoming progress mail is not visible as in screen

    Under in my screen in Thunderbird I could always see the status and how many emails are coming in.I can't find this option more. Where is it hidden, or how can I get this option back on screen?

  • Equium A300D - 16 c - does not start - no POST

    came to turn on my laptop this morning at a black screen after you turn on the laptop and a bunch of times, I noticed there were 2 low beeps coming from the motherboard (thought it was the hard drive, it comes to the right side of the laptop / to the

  • Satellite A60-332: a wireless network or not?

    I usually know if the model toshiba satellite sa60-332 the wireless network or not

  • HP Pavilion 15 laptop: compatible wireless cards

    I am trying to find out what wireless cards are on my list of white laptops, model No.: 15-e000sa, I want to upgrade if possible. also could you tell me if I am able to update with more ram fast ddr3 1866 or would it just be underclocked to 1600 Than

  • Location of Windows Mail

    Where are my e-mail files stored in Windows Mail?  I could find them in Outlook Express and change their location (from the default longassed directory) using tools, Options, maintenance, store folder but cannot find the parallel in Windows Mail.  In