Using translate for date in the control file !!

Hi,
I am having data file where in i expect date but get non-numeric character.
I am generating control file dynamically (programatically).
While creating control file i know that here the type of data will be date so i put datatype as date. But at one place i got non numeric character instead of date.
Now i want to put somekind of logic built in my dynamic generation which will check whether if value within that column is character then make it null and then load data. And if it is numeric keep it as it it.
i.e.
if(non-numericChars)
make value null before loading.
else
keep the value as it and then load it.
I heard that with translate function we can do that. Right ?
So if i have a line like this in my control file:
column_Name date "MM/DD/YYYY HH:MI:SS AM"
How should i write the above statement to put the above mentioned logic.
Any help would be highly appreciated.
Regards,
Dipesh

and Perhaps TO_DATE can help you :
TO_DATE
Syntax
to_date::=
Text description of to_date
Purpose
TO_DATE converts char of CHAR, VARCHAR2, NCHAR, or NVARCHAR2 datatype to a value of DATE datatype. The fmt is a date format specifying the format of char. If you omit fmt, then char must be in the default date format. If fmt is 'J', for Julian, then char must be an integer.
Note:
This function does not convert data to any of the other datetime datatypes. For information on other datetime conversions, please refer to TO_TIMESTAMP, TO_TIMESTAMP_TZ, TO_DSINTERVAL, and "TO_YMINTERVAL".
The default date format is determined implicitly by the NLS_TERRITORY initialization parameter, or can be set explicitly by the NLS_DATE_FORMAT parameter.
The 'nlsparam' has the same purpose in this function as in the TO_CHAR function for date conversion.
Do not use the TO_DATE function with a DATE value for the char argument. The first two digits of the returned DATE value can differ from the original char, depending on fmt or the default date format.
Note:
This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion. Please refer to "Datatype Comparison Rules" for more information.
See Also:
"Date Format Models"
Examples
The following example converts a character string into a date:
SELECT TO_DATE(
'January 15, 1989, 11:00 A.M.',
'Month dd, YYYY, HH:MI A.M.',
'NLS_DATE_LANGUAGE = American')
FROM DUAL;
TO_DATE('
15-JAN-89
The value returned reflects the default date format if the NLS_TERRITORY parameter is set to 'AMERICA'. Different NLS_TERRITORY values result in different default date formats:
ALTER SESSION SET NLS_TERRITORY = 'KOREAN';
SELECT TO_DATE(
'January 15, 1989, 11:00 A.M.',
'Month dd, YYYY, HH:MI A.M.',
'NLS_DATE_LANGUAGE = American')
FROM DUAL;
TO_DATE(
89/01/15
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/functions137a.htm#SQLRF06132
Joel P�rez

Similar Messages

  • It can't find URL when i use HLS for vod and the vod file name contain Chinese.

    It can't find URL when i use HLS for vod and the vod file name contain Chinese。eg: http://127.0.0.1:8134/hls-vod/你好.mp4.m3u8.
    How does it support Chinese path?

    To answer the post title FireFox save all downloads automatically in the download folder, which you can find in the Documents folder. If you want to choose where to save your downloads go to tools>options>check always ask me where to save files.
    Secondly, I am assuming you have IE 8 installed as this is the only version that supports this fix that is currently not in beta. Go to control panel>internet options>advanced tab and reset the settings at the bottom. This may or may not fix the problem but it is a good first step.

  • How can i validate the data in the control file?

    Consider that the SQLLoader reads the Input data File from the path and it loads the data into the tables based up on the descrition specified in the control File.
    First, the table to be filled is created:
    create table sql_loader_1 ( load_time date, field_1 Numeric, field_2 varchar2(10)
    Sample Control File :
    load_1.ctl
    load data
    infile 'load_1.dat' "str '\r\n'"
    insert into table sql_loader_1
    load_time sysdate,
    field_2 position( 1:10),
    field_1 position(11:20)
    Note that the positions 11 through 20 are loaded into field_1 and positions 1 through 10 into field_2. The field load_time is filled with the current time (sysdate) of the load.
    Here's the data. The name of the file (load_1.dat) had been specified with the infile statement in the control file.
    load_1.dat
    0123456789abcdefghij
    foo bar
    here comes a very long line
    and the next is
    short
    Here i want to validate the field_1 (Numeric Datatype) since the data file contains the character value (i.e)abcdefghij

    Good question for this forum:
    Export/Import/SQL Loader & External Tables
    Werner

  • Using trim and date function in control file

    I want to load "?30/12/2005 22:13?" into the table table1 and remove the "?" characters.
    LOAD DATA
    INTO TABLE TABLE1
    FIELDS TERMINATED BY ","
    (ORDER_DATE "TRIM('?', 'MM/DD/YYYY HH24:MI')"
    What's wrong with the above statement ?
    thanks.

    in addition, can i specify the starting row from the text file to load the data ?
    e.g. i only want to load from the 10th row Use SKIP 9 for that
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch04.htm#1004940
    and to eliminate the last 2 rows of the text file.There is no command for that, but if these rows can be identified through some pattern you could use conditional loading and exclude these rows
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch05.htm#1005658

  • Need help in writing the control file for SQLLOADER

    Is it possible to error out the Sqlloader in case the data fields in the data file for a row are more than the fields stated in the control file?
    i.e. My data file is something like
    aaa,bbb,cc
    dd,eee
    And my ctl file has just 2 columns in it. Is it possible to write a control file which will cause the Sqlloader to error out?
    Thanks...

    Nisha,
    Again I posted test example in your other post but here is how can do that
    CREATE TABLE mytest111 (
       col1 NUMBER,
       col2 NUMBER,
       col3 NUMBER
    LOAD DATA
    TRUNCATE INTO TABLE MYTEST111
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    col1 integer external,
    col2 integer external
    #mytest.dat
    1,2,3
    1,2
    SQL*Loader: Release 10.2.0.1.0 - Production on Fri Apr 10 11:40:39 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Control File:   mytest.ctl
    Data File:      mytest.dat
      Bad File:     mytest.bad
      Discard File:  none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array:     64 rows, maximum of 256000 bytes
    Continuation:    none specified
    Path used:      Conventional
    Table USIUSER.MYTEST111, loaded from every logical record.
    Insert option in effect for this table: TRUNCATE
    TRAILING NULLCOLS option in effect
       Column Name                  Position   Len  Term Encl Datatype
    COL1                                FIRST     *   ,  O(") CHARACTER           
    COL2                                 NEXT     *   ,  O(") CHARACTER           
    Table MYTEST111:
      2 Rows successfully loaded.
      0 Rows not loaded due to data errors.
      0 Rows not loaded because all WHEN clauses were failed.
      0 Rows not loaded because all fields were null.
    Space allocated for bind array:                  33024 bytes(64 rows)
    Read   buffer bytes: 1048576
    Total logical records skipped:          0
    Total logical records read:             2
    Total logical records rejected:         0
    Total logical records discarded:        0
    Run began on Fri Apr 10 11:40:39 2009
    Run ended on Fri Apr 10 11:40:40 2009
    Elapsed time was:     00:00:00.99
    CPU time was:         00:00:00.06
    {code}
    Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to read data from the excel file using java code.

    Hi to all,
    I am using below code to getting the data from the excel file but I can't get the corresponding data from the specific file. can anyone give me the correct code to do that... I will waiting for your usefull reply......
    advance thanks....
    import java.io.*;
    import java.sql.*;
        public class sample{
                 public static void main(String[] args){
                      Connection connection = null;
                          try{
                               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                               Connection con = DriverManager.getConnection( "jdbc:odbc:Mydsn","","" );
                               Statement st = con.createStatement();
                               ResultSet rs = st.executeQuery( "Select * from [Sheet1$]" );
                               System.out.println("sample:"+rs);
                                  ResultSetMetaData rsmd = rs.getMetaData();
                                  System.out.println("samplersd:"+rsmd);
                               int numberOfColumns = rsmd.getColumnCount();
                                  System.out.println("numberOfColumns:"+numberOfColumns);
                                   while (rs.next()) {
                                            System.out.println("sample1:"+rs);
                                            for (int i = 1; i <= numberOfColumns; i++) {
                                                 if (i > 1) System.out.print(", ");
                                                 String columnValue = rs.getString(i);
                                                 System.out.print(columnValue);
                                            System.out.println("");
                                       st.close();
                                       con.close();
                                      } catch(Exception ex) {
                                           System.err.print("Exception: ");
                                           System.err.println(ex.getMessage());
                        }

    1: What is the name of the excel sheet?
    2: What is printed in this program? null ? anything?
    error?Excel file name is "sample.xls" I set excel file connectivity in my JDBC driver(DSN). Here in my program I am not giving that excel file name. I am giving only that excel sheet name. that is followed
    ResultSet rs = st.executeQuery( "Select * from [Sheet1$]" );The output of this program is given bellow.
    sample:sun.jdbc.odbc.JdbcOdbcResultSet@1b67f74
    samplersd:sun.jdbc.odbc.JdbcOdbcResultSetMetaData@530daa
    numberOfColumns:2

  • Restore - filename for datafile is missing in the control file

    I am practicing RMAN recovery procedures and I encountered a problem that I do not know how to solve.
    1) I took a hot backup of my test database.
    2) Create tablespace TS_DATA_TEMP
    3) Deleted tablespace TS_DATA which had 2 datafiles
    4) Created tablespace TS_DATA with 1 datafile
    5) shutdown database
    6) logged into RMAN in nomount
    7) restore controlfile from autobackup;
    8) alter database mount;
    9) restore database;
    RMAN> restore database;
    Starting restore at 22-AUG-08
    using channel ORA_DISK_1
    the filename for datafile 5 is missing in the control file
    skipping datafile 1; already restored to file /u02/oradata/EDM91/system01.dbf
    skipping datafile 2; already restored to file /u02/oradata/EDM91/undotbs01.dbf
    skipping datafile 6; already restored to file /u02/oradata/EDM91/index
    skipping datafile 3; already restored to file /u02/oradata/EDM91/sysaux01.dbf
    skipping datafile 7; already restored to file /u03/oradata/EDM91/TS_INDEX01.dbf
    skipping datafile 9; already restored to file /u03/oradata/EDM91/TS_LOB01.dbf
    skipping datafile 4; already restored to file /u02/oradata/EDM91/users01.dbf
    restore not done; all files readonly, offline, or already restored
    Finished restore at 22-AUG-08
    10) tried to recover
    Starting recover at 22-AUG-08
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 08/22/2008 15:04:22
    RMAN-06094: datafile 5 must be restored
    SQL> select name from v$datafile where file#=5;
    NAME
    /u04/oradata/EDM91/TS_DATA.dbf
    12) alter database backup controlfile to trace
    DATAFILE
    '/u02/oradata/EDM91/system01.dbf',
    '/u02/oradata/EDM91/undotbs01.dbf',
    '/u02/oradata/EDM91/sysaux01.dbf',
    '/u02/oradata/EDM91/users01.dbf',
    '/u04/oradata/EDM91/TS_DATA.dbf',
    '/u02/oradata/EDM91/index',
    '/u03/oradata/EDM91/TS_INDEX01.dbf',
    '/u04/oradata/EDM91/TS_DATA02.dbf',
    '/u03/oradata/EDM91/TS_LOB01.dbf'
    CHARACTER SET UTF8
    So i'm not sure what the problem is. Datafile TS_DATA.dbf is located in the control file but i'm getting the error: the filename for datafile 5 is missing in the control file.
    Suggestions on what's wrong with the control file?

    I found my mistake; a newbie error.
    I did not know I needed to include in my restore command the 'until' option when doing incomplete recovery. I only included the 'until' option in the recover command:
    original command
    restore database;
    recover database until sequence =123;
    should be
    restore database until sequence = 123;
    recover database until sequence =123;
    I usually run the command using a RUN block with a SET UNTIL SEQUENCE but this case I used the single commands separately.
    RUN
    +{+
    SET UNTIL sequence 123;
    RESTORE DATABASE;
    RECOVER DATABASE;
    +}+

  • How to pass parameters to the Control file while loading the data from flat file to staging table

    Thanks in advance

    Hi ,
    LOADDATA statement is required at the beginning of the control file.
    INFILE: INFILE keyword is used to specify location of the datafile or datafiles.
    INFILE* specifies that the data is found in the control file and not in an external file. INFILE ‘$FILE’, can be used to send the filepath and filename as a parameter when registered as a concurrent program.
    INFILE   ‘/home/vision/kap/import2.csv’ specifies the filepath and the filename.
    Hope this will help you......

  • Create a Purchase order using the BAPI using the data in the XML file.

    Hello Gurus,
    here is the scenario can anyone help me how to proceed explaining the procedure?
    Create a Purchase order using the BAPI using the data in the XML file.
    comprehensive explanations are appreciated.
    thanks in advance.

    hi,
      first use fm "bapi_po_create".
      then use fm "BAPI_ACC_GL_POSTING_POST"
    The demo environment was made with real business scenario in mind, but following subjects need to be addressed in a live implementation:
    •     No exceptions and error handling is implemented, except the order rejection (e.g. partly delivery);
    •     In Navision both XML Ports and the XML DOM has been used to integrate with SAP XI, because XML ports has some drawbacks regarding to Namespaces in XML Documents (mandatory in SAP XI);
    •     A minimum of SAP and Navision customization is required to implement this solution. (e.g. user exit in SAP, Navision XML DOM).

  • Different log file name in the Control file of SQL Loader

    Dear all,
    I get every day 3 log files with ftp from a Solaris Server to a Windows 2000 Server machine. In this Windows machine, we have an Oracle Database 9.2. These log files are in the following format: in<date>.log i.e. in20070429.log.
    I would like to load this log file's data to an Oracle table every day and I would like to use SQL Loader for this job.
    The problem is that the log file name is different every day.
    How can I give this variable log file name in the Control file, which is used for the SQL Loader?
    file.ctl
    LOAD DATA
    INFILE 'D:\gbal\in<date>.log'
    APPEND INTO TABLE CHAT_SL
    FIELDS TERMINATED BY WHITESPACE
    TRAILING NULLCOLS
    (SL1 DATE "Mon DD, YYYY HH:MI:SS FF3AM",
    SL2 char,
    SL3 DATE "Mon DD, YYYY HH:MI:SS FF3AM",
    SL4 char,
    SL5 char,
    SL6 char,
    SL7 char,
    SL8 char,
    SL9 char,
    SL10 char,
    SL11 char,
    SL12 char,
    SL13 char,
    SL14 char,
    SL15 char)
    Do you have any better idea about this issue?
    I thought of renaming the log file to an instant name, such as in.log, but how can I distinguish the desired log file, from the other two?
    Thank you very much in advance.
    Giorgos Baliotis

    I don't have a direct solution for your problem.
    However if you invoke the SQL loader from an Oracle stored procedure, it is possible to dynamically set control\log file.
    # Grant previleges to the user to execute command prompt statements
    BEGIN
    dbms_java.grant_permission('bc4186ol','java.io.FilePermission','C:\windows\system32\cmd.exe','execute');
    END;
    * Procedure to execute Operating system commands using PL\SQL(Oracle script making use of Java packages
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "Host" AS
    import java.io.*;
    public class Host {
    public static void executeCommand(String command) {
    try {
    String[] finalCommand;
    finalCommand = new String[4];
    finalCommand[0] = "C:\\windows\\system32\\cmd.exe";
    finalCommand[1] = "/y";
    finalCommand[2] = "/c";
    finalCommand[3] = command;
    final Process pr = Runtime.getRuntime().exec(finalCommand);
    new Thread(new Runnable() {
    public void run() {
    try {
    BufferedReader br_in = new BufferedReader(new InputStreamReader(pr.getInputStream()));
    String buff = null;
    while ((buff = br_in.readLine()) != null) {
    System.out.println("Process out :" + buff);
    try {Thread.sleep(100); } catch(Exception e) {}
    catch (IOException ioe) {
    System.out.println("Exception caught printing process output.");
    ioe.printStackTrace();
    }).start();
    new Thread(new Runnable() {
    public void run() {
    try {
    BufferedReader br_err = new BufferedReader(new InputStreamReader(pr.getErrorStream()));
    String buff = null;
    while ((buff = br_err.readLine()) != null) {
    System.out.println("Process err :" + buff);
    try {Thread.sleep(100); } catch(Exception e) {}
    catch (IOException ioe) {
    System.out.println("Exception caught printing process error.");
    ioe.printStackTrace();
    }).start();
    catch (Exception ex) {
    System.out.println(ex.getLocalizedMessage());
    public static boolean isWindows() {
    if (System.getProperty("os.name").toLowerCase().indexOf("windows") != -1)
    return true;
    else
    return false;
    * Oracle wrapper to call the above procedure
    CREATE OR REPLACE PROCEDURE Host_Command (p_command IN VARCHAR2)
    AS LANGUAGE JAVA
    NAME 'Host.executeCommand (java.lang.String)';
    * Now invoke the procedure with an operating system command(Execyte SQL-loader)
    * The execution of script would ensure the Prod mapping data file is loaded to PROD_5005_710_MAP table
    * Change the control\log\discard\bad files as apropriate
    BEGIN
    Host_Command (p_command => 'sqlldr system/tiburon@orcl control=C:\anupama\emp_join'||1||'.ctl log=C:\anupama\ond_lists.log');
    END;Does that help you?
    Regards,
    Bhagat

  • SQL Loader: refer datafile name in the control file

    Hi All:
    Database: 10GR2
    I have a table as following:
    test (
    filename varchar2(100),
    mydata varchar2(1000)
    I am using sql loader to populate data for this table. I also need store the datafile name to column test.filename as part of dataload. How to refer datafile name in the control file?
    Again, I am processing multiple files in a batch mode. I need store datafile name in filename column so that I can know which "mydata" come from which datafile.
    Thanks in advance!
    Kevin

    As Bravid says, you can't do that from within SQL*Loader, unless the control files are dynamically generated by a script and the filename included as the default value for that particular column as a hardcoded literal.
    It's easier if you use external tables as the table definition contains the "location" which is the list of filenames it is accessing, and the value can be queried as well as being dynamically changed (though if you're dynamically changing it, then you'll programatically know the filename anyway. hint hint!)
    ;)

  • I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?

    I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?
    Attachments:
    try2.txt ‏2 KB
    read_array.vi ‏21 KB

    The problem is in the delimiters in your text file. By default, Read From Spreadsheet File.vi expects a tab delimited file. You can specify a delimiter (like a space), but Read From Spreadsheet File.vi has a problem with repeated delimiters: if you specify a single space as a delimiter and Read From Spreadsheet File.vi finds two spaces back-to-back, it stops reading that line. Your file (as I got it from your earlier post) is delimited by 4 spaces.
    Here are some of your choices to fix your problem.
    1. Change the source file to a tab delimited file. Your VI will then run as is.
    2. Change the source file to be delimited by a single space (rather than 4), then wire a string constant containing one space to the delimiter input of Read From Spreadsheet File.vi.
    3. Wire a string constant containing 4 spaces to the delimiter input of Read From Spreadsheet File.vi. Then your text file will run as is.
    Depending on where your text file comes from (see more comments below), I'd vote for choice 1: a tab delimited text file. It's the most common text output of spreadsheet programs.
    Comments for choices 1 and 2: Where does the text file come from? Is it automatically generated or manually generated? Will it be generated multiple times or just once? If it's manually generated or generated just once, you can use any text editor to change 4 spaces to a tab or to a single space. Note: if you want to change it to a tab delimited file, you can't enter a tab directly into a box in the search & replace dialog of many programs like notepad, but you can do a cut and paste. Before you start your search and replace (just in the text window of the editor), press tab. A tab character will be entered. Press Shift-LeftArrow (not Backspace) to highlight the tab character. Press Ctrl-X to cut the tab character. Start your search and replace (Ctrl-H in notepad in Windows 2000). Click into the Find What box. Enter four spaces. Click into the Replace With box. Press Ctrl-V to paste the tab character. And another thing: older versions of notepad don't have search and replace. Use any editor or word processor that does.

  • How to edit the existing data in the XML file from java programming.

    Hi all
    i am able to create XML file with the sample data as below from java programming.
    i need sample code on how to edit the existing data in the XML file?
    for example
    <?xml version="1.0"?>
       <mydata>
               <data1>
                         <key1>467</key1>
                        <name1>Paul</name1>
                        <id1>123</id1>
              </data1>
              <data2>
                         <key2>467</key2>
                        <name2>Paul</name2>
                        <id2>123</id2>
              </data2>
        </mydata>
    i am able to insert the data in the XML.
    now i need sample code on how to modify the data in the above XML file from the java programming for only key2,name2,id2 tags only. the remaining tags data in the XML file i want to keep same data except for key2,name2,id2 which are i want to modify from java code
    Regards
    Sunil
    [points will be always rewardable]

    hi
    u need a parser or validate the xml file for to read the xml file from java coding u need for this
    xml4j.jar u can download this file  from here
    http://www.alphaworks.ibm.com/tech/xml4j
    or we can use the SAX(simple API for XML)
    some sample applications for this
    http://www.java-tips.org/java-se-tips/javax.xml.parsers/how-to-read-xml-file-in-java.html
    http://www.developertutorials.com/tutorials/java/read-xml-file-in-java-050611/page1.html
    http://www.xml-training-guide.com/e-xml44.html
    let me know u need any other info
    bvr

  • In case of a DB crash what happens to the status of the Control File

    When a DB is crashed will the Control file that exists in the OS also get corrupted, What happens to the Data Files , how to recover the Control files and Data Files , the DB in case there isn't any Backup media or any Dump available on the DB.

    The only one way to recover a database is to be in archivelog mode.
    And if I said about recover stricto sensu, that's because even in noarchivelog mode we need to use the command recover until cancel before an open with resetlogs option, even if we haven't any redo/archive logs. That fake a recover, this is what we say a mimic recover. Which is not a recover stricto sensu like it can be the case with archivelog mode.
    Nicolas.

  • I can only backup the datafiles but not the control files and SPFiles

    Hello, all,
    I am using the Oracle 10g on a linux server which runs redhat 9. I want to backup the whole database to the disk, but not the flash recovery area. It is /rawdata. I will show how I configure the backup part in EM. Is there anything wrong?
    1. the ARCHIVELOG is on
    2. under Administration, in the All Initialization Parameters, I remove the string value of “log_archive_dest_1”. After that, I go to the SPFile and remove the string value of “log_archive_dest_1”
    3. configure backup settings and policies. The Disk Backup Location field is set to /rawdata. Select Image Copy for Disk Backup type. Test Disk backup is successful.
    4. go to Policy page. Select “Automatically backup the control file and server parameter file (SPFile) with every backup and database structural change.) input /rawdata into the filed: Autobackup Disk Location
    Select “Optimize the whole database backup by skipping unchanged files such as read-only and offline datafiles that have been backed up”
    Select “Retain backups that are necessary for a recovery to any time whin the specified number of days (point-in-time recovery)
    Accept the default of 31days
    5. go to Schedul Backup
    6. select customized from the backup Strategy drop-down menu. Select the Whole Database
    7. in the Options page, select “Full backup” in the Backup Type section. Select “Online Backup” in the Backup Mode section. Select “back up all archived logs on disk” in the Advanced section.
    8. in the Setting page, select “Disk”
    9. in the Schedule page, accept the default job name and description. Select Immediately to execute the job immediately.
    10. just submit the job.
    After several minutes, the job is failed while the Prebackup and Postbackup are succeeded. The log says:
    Recovery Manager: Release 10.1.0.2.0 - Production
    Copyright (c) 1995, 2004, Oracle. All rights reserved.
    RMAN>
    connected to target database: ORCL10G (DBID=770753237)
    using target database controlfile instead of recovery catalog
    RMAN>
    Starting backup at 11-OCT-06
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=268 devtype=DISK
    channel ORA_DISK_1: starting datafile copy
    input datafile fno=00001 name=+DATADG/orcl10g/system01.dbf
    output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-SYSTEM_FNO-1_68hvin50 tag=BACKUP_ORCL10G_000_101106111844 recid=108 stamp=603544772
    channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:45
    channel ORA_DISK_1: starting datafile copy
    input datafile fno=00003 name=+DATADG/orcl10g/sysaux01.dbf
    output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-SYSAUX_FNO-3_69hvin6d tag=BACKUP_ORCL10G_000_101106111844 recid=109 stamp=603544813
    channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
    channel ORA_DISK_1: starting datafile copy
    input datafile fno=00005 name=+DATADG/orcl10g/example01.dbf
    output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-EXAMPLE_FNO-5_6ahvin7g tag=BACKUP_ORCL10G_000_101106111844 recid=110 stamp=603544829
    channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
    channel ORA_DISK_1: starting datafile copy
    input datafile fno=00002 name=+DATADG/orcl10g/undotbs01.dbf
    output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-UNDOTBS1_FNO-2_6bhvin7v tag=BACKUP_ORCL10G_000_101106111844 recid=111 stamp=603544835
    channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:08
    channel ORA_DISK_1: starting datafile copy
    input datafile fno=00004 name=+DATADG/orcl10g/users01.dbf
    output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-USERS_FNO-4_6chvin87 tag=BACKUP_ORCL10G_000_101106111844 recid=112 stamp=603544841
    channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
    Finished backup at 11-OCT-06
    Starting Control File and SPFILE Autobackup at 11-OCT-06
    piece handle=/rawdata/c-770753237-20061011-05 comment=NONE
    Finished Control File and SPFILE Autobackup at 11-OCT-06
    RMAN>
    Starting backup at 11-OCT-06
    current log archived
    using channel ORA_DISK_1
    archived log /rawdata/arch_D-ORCL10G_id-770753237_S-1062_T-1_A-586368151_cqhvf270 not found or out of sync with catalog
    trying alternate file for archivelog thread 1, sequence 1062
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup command at 10/11/2006 11:20:54
    RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
    ORA-19625: error identifying file /rawdata/arch_D-ORCL10G_id-770753237_S-1062_T-1_A-586368151_puhkv41f
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
    RMAN>
    Recovery Manager complete.
    It seems the system tries to find a file “arch_D-ORCL10G_id-770753237_S-1062_T-1_A-586368151_cqhvf270” in /rawdata. I just can not understand.
    What should I do? Any advice is highly appreciated!
    Qian

    the string value in the field of 'log_archive_dest_1" under "All Initialization parameters" is "LOCATION=+DATADG/orcl10g/". The same value was in the field under SPFile.
    I reset these values and tried to backup the whole database. The same error appeared. The log says:
    Recovery Manager: Release 10.1.0.2.0 - Production
    Copyright (c) 1995, 2004, Oracle. All rights reserved.
    RMAN>
    connected to target database: ORCL10G (DBID=770753237)
    using target database controlfile instead of recovery catalog
    RMAN>
    Starting backup at 11-OCT-06
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=245 devtype=DISK
    channel ORA_DISK_1: starting datafile copy
    input datafile fno=00001 name=+DATADG/orcl10g/system01.dbf
    output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-SYSTEM_FNO-1_6ghvj9rd tag=BACKUP_ORCL10G_000_101106043753 recid=114 stamp=603563922
    channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:45
    channel ORA_DISK_1: starting datafile copy
    input datafile fno=00003 name=+DATADG/orcl10g/sysaux01.dbf
    output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-SYSAUX_FNO-3_6hhvj9sq tag=BACKUP_ORCL10G_000_101106043753 recid=115 stamp=603563963
    channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
    channel ORA_DISK_1: starting datafile copy
    input datafile fno=00005 name=+DATADG/orcl10g/example01.dbf
    output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-EXAMPLE_FNO-5_6ihvj9tu tag=BACKUP_ORCL10G_000_101106043753 recid=116 stamp=603563977
    channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
    channel ORA_DISK_1: starting datafile copy
    input datafile fno=00002 name=+DATADG/orcl10g/undotbs01.dbf
    output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-UNDOTBS1_FNO-2_6jhvj9ud tag=BACKUP_ORCL10G_000_101106043753 recid=117 stamp=603563984
    channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
    channel ORA_DISK_1: starting datafile copy
    input datafile fno=00004 name=+DATADG/orcl10g/users01.dbf
    output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-USERS_FNO-4_6khvj9uk tag=BACKUP_ORCL10G_000_101106043753 recid=118 stamp=603563990
    channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
    Finished backup at 11-OCT-06
    Starting Control File and SPFILE Autobackup at 11-OCT-06
    piece handle=/rawdata/c-770753237-20061011-07 comment=NONE
    Finished Control File and SPFILE Autobackup at 11-OCT-06
    RMAN>
    Starting backup at 11-OCT-06
    current log archived
    using channel ORA_DISK_1
    archived log /rawdata/arch_D-ORCL10G_id-770753237_S-1062_T-1_A-586368151_cqhvf270 not found or out of sync with catalog
    trying alternate file for archivelog thread 1, sequence 1062
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup command at 10/11/2006 16:40:05
    RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
    ORA-19625: error identifying file /rawdata/arch_D-ORCL10G_id-770753237_S-1062_T-1_A-586368151_puhkv41f
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
    RMAN>
    Recovery Manager complete.
    Why the system keeps trying to find files under /rawdata? It is the destination, not the source.
    Any help is appreciated!
    Qian
    Message was edited by:
    QianChen

Maybe you are looking for

  • New to the world of programing. please help!!

    ello every one. I want to start programing and create software on my mac. where do i start? i was playing around with terminal and thougth it was cool. i went on the net and came across python and discovered it was already in my mac. i dabed with it

  • Retrieve all folder & sub folder from document library in sharePoint 2013

    Hi, I want to retrieve all the folder and sub folder from document library and bind it to the dropdownlist using server object model. I used the below query to get all folder and sub folder.\ query.Query = @"<Query><Where><Eq><FieldRef Name='FSObjTyp

  • H:dataTable value as array of Strings vs array of objects

    I'm trying to use a h:dataTable with an h:inputText as one of the columns. If my bean returns an array of Strings, then the h:dataTable can't update them. (I added a submit button that just updates the fields and returns to the current page.) If I us

  • Creating new database schema in jdev

    can I create new database schema in jdev.If yes how? I have checked many links but they are telling how to create connection to an existing database but not to create new databse? Please help..

  • Your wallpaper and brighness settings crash?

    On the ipad with iOS7, if you do double click on the Wallpapers%Brightness the application is closed. Any fix?