Issue with UTL FILE use

Hi Guys
(5)     Write a stored procedure that creates a comma separated flat file called ‘GradChallenge’ followed by today’s date formatted ‘yyyymmdd’ and add the extension ‘.txt’.
The file will contain the ID, LOGINNAME, FORENAME and SURNAME of the USERS table. The header will consist of today’s date in the format ‘yyyymmdd’ and the footer will contain a row count.
I just have a little error situated at the end of the code.
crreate or replace
PROCEDURE Grad_Five
IS
v_out_eate or replace
PROCEDURE Grad_Five
IS
v_out_file UTL_FILE.FILE_TYPE;
v_out_directory all_directories.directory_path%type;
v_out_filehandle UTL_FILE.FILE_TYPE := NULL;
v_out_buffer varchar2(32767);
v_header VARCHAR2(32759 BYTE);
r_users varchar2(32759 BYTE);
BEGIN
FOR r_users IN
( SELECT *
FROM users
WHERE directory_name IS NOT NULL
) LOOP
-- Output file
v_out_file := utl_file.fopen (r_users.directory_name, 'GradChallenge' || TRIM(TO_CHAR(SYSDATE,'YYYYMMDD')) || '.txt', 'W');
-- Header
v_header := sysdate;
utl_file.PUT_LINE(v_out_file,v_header,TRUE);
FOR r_users IN
( SELECT
USERS.ID,
USERS.LOGINNAME,
USERS.FORENAME,
USERS.SURNAME
FROM USERS
LOOP
BEGIN
UTL_FILE.PUT_LINE (v_out_file,
r_users.ID|| ',' || r_users.LOGINNAME|| ',' ||r_users.FORENAME|| ',' ||r_users.SURNAME);
END;
END LOOP;
FOR r_users in
( SELECT COUNT (ID) from Users )
LOOP
BEGIN
UTL_FILE.fclose (v_out_file);
END;
END LOOP;
COMMIT;
END Grad_Five;
Error(58,5): PLS-00103: Encountered the symbol "GRAD_FIVE" when expecting one of the following: loop
It is situated right at the end
I wonder if anyone can help me on this matter
Thanks :D

Hello,
CREATE OR REPLACE
PROCEDURE Grad_Five
IS
    v_out_file UTL_FILE.FILE_TYPE;
    v_out_directory all_directories.directory_path%type;
    v_out_filehandle UTL_FILE.FILE_TYPE := NULL;
    v_out_buffer VARCHAR2(32767);
    v_header     VARCHAR2(32759 BYTE);
    r_users      VARCHAR2(32759 BYTE);
BEGIN
    FOR r_users IN
    (SELECT      *
    FROM users
    WHERE directory_name IS NOT NULL
    LOOP
        -- Output file
        v_out_file := utl_file.fopen (r_users.directory_name,'GradChallenge' || TRIM(TO_CHAR(SYSDATE,'YYYYMMDD')) ||
        '.txt','W');
        -- Header
        v_header := sysdate;
        utl_file.PUT_LINE(v_out_file,v_header,TRUE);
        FOR r_users IN
        (SELECT USERS.ID
          , USERS.LOGINNAME
          , USERS.FORENAME
          , USERS.SURNAME
        FROM USERS
        LOOP
            BEGIN
                UTL_FILE.PUT_LINE (v_out_file, r_users.ID|| ',' || r_users.LOGINNAME|| ',' ||r_users.FORENAME|| ',' ||
                r_users.SURNAME);
            END;
        END LOOP;
        FOR r_users IN
        (SELECT COUNT (ID)
        FROM Users
        LOOP
            BEGIN
                UTL_FILE.fclose (v_out_file);
            END;
        END LOOP;
        COMMIT;
END Grad_Five;I think the outer loop should end just before the commit. Or better instead of the commit. You don't do DML, so you don't need a commit
Regards
Marcus
Edited by: Marwim on 09.02.2012 13:04
BTW: you close your file in a loop. That makes no sense, since you opend only one.

Similar Messages

  • Issue with utl file

    Hi,
    I am using UTL file to export records from table with fixed delimiter to a text file.
    It works fine except that I see an additional character @ at the end of the file in the last line.
    Can anyone let me know why are we getting this and how can we delete it..
    Thaks in advance..

    I assume, as you are saying you can see the file ok in notepad/wordpad that you are creating a text file.
    So a) what are you using to view the file in unix and b) how did you transfer the file to unix?
    When you transfer files from Windows/DOS based operating systems to unix based operating systems you have to be aware that Windows uses a CR/LF pair of characters to terminate a line (a 'newline') and unix just uses a single LF character (character 10 in the ascii table) to terminate a line.  So when you transfer the files you need to convert the CR/LF pairs into just LF characters.
    Typically this is done if you transfer the files using FTP and specify the 'mode' to be ASCII rather than BINARY.
    c:\>ftp testserver
    Connected to testserver.mycompany.com.
    220 sunny2 FTP server ready.
    User (testserver.mycompany.com:(none)): myuser
    331 Password required for myuser.
    Password:
    230 User myuser logged in.
    ftp> ascii
    200 Type set to A.
    ftp>
    This tells the FTP software that you are transferring text files and that it needs to convert newline characters, if necessary, when transferring between Windows and Unix operating systems.
    And for reference, if it's not a text file, then you must transfer in BINARY mode to ensure the files remain byte for byte the same...
    ftp> bin
    200 Type set to I.
    ftp>
    If you don't transfer text files, between different operating systems, in ASCII mode, then those files will either be missing characters or have additional characters that aren't wanted.

  • Issues with Exporting files using Lightroom 5

    I bought Lightroom 5 for Mac a couple of months ago and have been using it without any issues, then out of the blue I ran into export problems. Sometimes the exported images wouldn’t have the sharpness adjustments, sometimes it wouldn’t have the noise adjustments, sometimes the saturation or vibrancy, and then sometimes a combination of the above. I know there’s a known issue that effects noise on export if you export on files sizes less than 1/3 of the original size, but mine have always been exported at full size with image quality 70, exporting as jpeg.
    I installed the latest update and that didn’t help. I uninstalled the software and that didn’t help either. I then uninstalled everything completely (including the library) by searching both lightroom and adobe in finder > system files> are included and deleted everything I could find pertaining to adobe lightroom (I didn’t delete everything adobe as I have other adobe products). This didn’t help either. What is really bizarre is that I tried restoring my Mac back to a time when Lightroom worked fine, and this didn't solve the issue, and I've also tried wiping the hard drive and just installing lightroom and this didn't work. This really baffled me.
    What I have also found with Lightroom (and I'm sure it's all somehow linked) is that if I'm working on a file, and either close LR down and re-open it, or go to another file and then back to the one I was working on, initially the image has lost it's sharpening again, but if I click on the sharpen slider (without moving it) the sharpening comes back.
    So has anyone any ideas on what my issues are and how to fix them. I’ve tried the advice on here too [url]http://helpx.adobe.com/lightroom/kb/manually-remove-lightroom.html[/url].
    My workaround at the minute is to use full screen view when I've completed my adjustments and take a hi-res screen shot, but the problem is that the saved images are only approx 1600 x 1000 pixels, which is fine for viewing on my Macbook pro but not good if I want to zoome etc.

    snerkler wrote:
    As I said in my first paragraph I don't think it's the known issue...
    Sorry snerkler - I didn't read closely enough .
    Sounds like you have a different problem - if it's a bug, be sure to report it:
    http://feedback.photoshop.com/photoshop_family/products/photoshop_family_photoshop_lightro om
    Rob

  • Issue with UTL FILE, does not read directory path

    Hi Guys
    I have created a procedure using a UTL_File, but when I execute that procedure, it comes with an invalid directory path.
    create directory r_bmw as 'C:\BMW';
    grant read, write on directory r_bmw to bmw;
    The above have been created successfully. (r_bmw is the Directory Name. C:\BMW is the directory path.)
    Below is my code:
    create or replace
    PROCEDURE DCA_BMW_OUT
    IS
    -- Declare all variables as reference
    v_out_file UTL_FILE.FILE_TYPE;
    v_row_Count NUMBER;
    r_bmw NUMBER;
    v_out_directory all_directories.directory_path%type;
    v_out_filehandle UTL_FILE.FILE_TYPE := NULL;
    v_out_buffer varchar2 (32767);
    v_records NUMBER;
    body_output varchar2(32759 BYTE);
    dictionary_guarantorsexist varchar2 (1 Char);
    -- Text required within this part of the procedure
    v_body varchar2(32767 BYTE);
    v_header VARCHAR2(32759 BYTE);
    BEGIN
    --- Directories have been created
    FOR r_bmw IN
    ( SELECT *
    FROM dcaadditionaldata
    WHERE directory_name IS NOT NULL
    ) LOOP
    -- inner loop produces the rows in each file
    -- outer loop identifies each of the dca's you want to generate a file for
    BEGIN
    -- Output file to be added into the directory specified
    v_out_file := utl_file.fopen (r_bmw.directory_name, 'DCAExport_1_' || TRIM(TO_CHAR(SYSDATE,'DDMMYYYY_HH24MISS')) || '.txt', 'W');
    -- The Header data which will be outputted to the file
    v_header := 'KennzeichenBrgschaftsforderungGesamtforderung|Währung|Übergabedatum|DifferenzierungAnwalts-oderInkassofall|MainMarktpartnernummer|
    MainAnrede|MainTitel|MainName|MainVorname|MainStraße|MainHausnummer|MainPLZ|MainOrt|MainLand|MainGeburtsdatum|MainTelefonnr.Schuldner|G1Marktpartnernummer
    |G1Anrede|G1Titel|G1Name|G1Vorname|G1Straße|G1Hausnummer|G1PLZ|G1Ort|G1Land|G1Geburtsdatum|G1Telefonnr.Schuldner|G2Marktpartnernummer|G2Anrede|G2Titel|
    G2Name|G2Vorname|G2Straße|G2Hausnummer|G2PLZ|G2Ort|G2Land|G2Geburtsdatum|G2Telefonnr.Schuldner|G3Marktpartnernummer|G3Anrede|G3Titel|G3Name|G3Vorname|
    G3Straße|G3Hausnummer|G3PLZ|G3Ort|G3Land|G3Geburtsdatum|G3Telefonnr.Schuldner|G4Marktpartnernummer|G4Anrede|G4Titel|G4Name|G4Vorname|G4Straße|G4Hausnummer|
    G4PLZ|G4Ort|G4Land|G4Geburtsdatum|G4Telefonnr Schuldner|G5Marktpartnernummer|G5Anrede|G5Titel|G5Name|G5Vorname|G5Straße|G5Hausnummer|G5PLZ|G5Ort|G5Land|
    G5Geburtsdatum|G5Telefonnr.Schuldner|Kundennr.|Bestandsnr.|Finanzierungsnr.|KennzeichenFinanzierung/Leasing|Kennzeichenprivat/gewerblich|
    reguläresVertragsende|Laufzeit|Vertragsdatum|Vertragsstatus|Ratenbetrag|Filiale/Gebiet|Finanzierungstyp|BankverbindungKonto|BankverbindungBLZ|
    RSVKennzeichen|Kündigungsdatum|Modell|Fahrgestellnummer|KFZKennzeichen|KFZZulassungsdatum|CoD1Marktpartnernummer|CoD1Anrede|CoD1Titel|CoD1Name|
    CoD1Vorname|CoD1Straße|CoD1Hausnummer|CoD1PLZ|CoD1Ort|CoD1Land|CoD1Geburtsdatum|CoD1Telefonnr.Schuldner|CoD2Marktpartnernummer|CoD2Anrede|CoD2Titel|
    CoD2Name|CoD2Vorname|CoD2Straße|CoD2Hausnummer|CoD2PLZ|CoD2Ort|CoD2Land|CoD2Geburtsdatum|CoD2Telefonnr.Schuldner|CoD3Marktpartnernummer|CoD3Anrede|
    CoD3Titel|CoD3Name|CoD3Vorname|CoD3Straße|CoD3Hausnummer|CoD3PLZ|CoD3Ort|CoD3Land|CoD3Geburtsdatum|CoD3Telefonnr.Schuldner|CoD4Marktpartnernummer|
    CoD4Anrede|CoD4Titel|CoD4Name|CoD4Vorname|CoD4Straße|CoD4Hausnummer|CoD4PLZ|CoD4Ort|CoD4Land|CoD4Geburtsdatum|CoD4Telefonnr.Schuldner|
    CoD5Marktpartnernummer|CoD5Anrede|CoD5Titel|CoD5Name|CoD5Vorname|CoD5Straße|CoD5Hausnummer|CoD5PLZ|CoD5Ort|CoD5Land|CoD5Geburtsdatum|
    CoD5Telefonnr.Schuldner Y|Y|5830,99|EUR|20/08/2009|DCA|4|123456|Herr||Mueller|Rainer|Messigasse|33|84432|Filz|Deutschland|01/07/1957|08912345|234567|Frau|Dr|Mueller|Rita|Messigasse|33|84432|Filz|Deutschland|13/12/1955|08912345|||||||||||||||||||||||||||||||||||||||||||||||||76543|5000234567||Lease|Privat|12/12/2013|60|12/12/2008||250,50|US|Rate|1234567890|32343450|N||BMW 320 i|W34567890PA34567|M-H-3456|09/12/2008||||||||||||||||||||||||
    N|450,80|EUR|20/08/2009|DCA|4|987654|Frau||Meier|Heide|Beinstr.|44|86353|Laus|Deutschland|03/06/1949|08987654|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||87654||8765675585|Loan|Gewerblich|14/03/2012|72|14/03/2006||500,01|DF|Select|976579657|32343450|N||BMW 500 sl|W94567890PA34568|M-H-3457|10/03/2006|34343434|Herr|Dipl|Meier|Rudolf|Heislestr.|69|85433|Maus|Deutschland|28/05/1945|08934567|234567|Frau|Dr|Mueller|Rita|Messigasse|33|84432|Filz|Deutschland|13/12/1955|08912345
    Y|33970,50|EUR|20/08/2009|Lawyer|4|64646464|Frau||Schmidt|Susanne|Hueftgasse|55|89363|Maus|Deutschland|23/08/1933|08934567|34343434|Herr|Dipl|Meier|Rudolf|Heislestr.|69|85433|Maus|Deutschland|28/05/1945|08934567|234567|Frau|Dr|Mueller|Rita|Messigasse|33|84432|Filz|Deutschland|13/12/1955|08912345|||||||||||||||||||||||||||||||||||||98757|5000785675||Lease|Privat|11/11/2009|48|11/11/2005||380,70|GH|Zielrate|234567899|32343450|Y||BMW 380 s|W54567890PA34569|M-H-3458|07/11/2005||||||||||||||||||||||||
    N|10040,20|EUR|20/08/2009|Lawyer|4|4865465|Herr||Schulz|Karl|Nasenweg|77|83354|Schuh|Deutschland|18/01/1965|08972545|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||46789|50004765787||Lease|Privat|16/09/2012|60|16/09/2007||1234,56|OS|ZUS|98765432|32343450|Y||BMW 280 i|W74567890PA34570|M-H-3459|12/09/2007||||||||||||||||||||||||';
    utl_file.PUT_LINE(v_out_file,v_header,TRUE);
    -- Below will output a row of data which satisfy the requirements.
    FOR body_output IN
    ( SELECT
    AccountDetails.CUSTOMERNUMBER, AccountDetails.ACCOUNTNUMBER, CUSTOMERDETAILS.CDTITLE, CUSTOMERDETAILS.CDFIRSTNAME, CUSTOMERDETAILS.CDLASTNAME, AccountDetails.ACCOUNTTYPE,
    AccountDetails.ORIGINALCONTRACTENDDATE, AccountDetails.CONTRACTTERM, AccountDetails.CONTRACTENDDATE, AccountDetails.BRANCHAREA, AccountDetails.PRODUCTTYPE,
    AccountDetails.HOUSEBANKACCOUNT, AccountDetails.CARMODEL, AccountDetails.CARLICENCE, AccountDetails.ARREARSBALANCE, AccountDetails.CODEBTOR, AccountDetails.GUARANTORNUMBER
    FROM AccountDetails
    JOIN CUSTOMERDETAILS ON AccountDetails.CUSTOMERNUMBER = CUSTOMERDETAILS.CUSTOMERS1
    WHERE EXISTS
    ( SELECT *
    FROM Dcaaccountallocation
    JOIN DebtEpisodes ON DebtEpisodes.ACCOUNTID = Dcaaccountallocation.ACCOUNTID
    WHERE Dcaaccountallocation.DCAID = 41
    AND Dcaaccountallocation.status = 3
    AND DebtEpisodes.DCASentDate IS NULL
    AND Dcaaccountallocation.ACCOUNTID = AccountDetails.ACCOUNTNUMBER
    AND DebtEpisodes.DCAORLAWYER = 'DCA'
    LOOP
    UTL_FILE.PUT_LINE (v_out_file,
    body_output.CUSTOMERNUMBER|| '|' || body_output.ACCOUNTNUMBER|| '|' ||body_output.CDTITLE|| '||' ||body_output.CDFIRSTNAME || '|||||' ||
    body_output.CDLASTNAME|| '||||' || body_output.ACCOUNTTYPE|| '|' ||body_output.ORIGINALCONTRACTENDDATE|| '||||' ||body_output.CONTRACTTERM || '|||||' ||
    body_output.CONTRACTENDDATE|| '|' || body_output.BRANCHAREA|| '||' ||body_output.PRODUCTTYPE|| '||' ||
    body_output.HOUSEBANKACCOUNT|| '|||' || body_output.CARMODEL|| '||||' ||body_output.CARLICENCE|| '|' ||
    body_output.ARREARSBALANCE|| '||||' || body_output.CODEBTOR|| '|' ||body_output.GUARANTORnumber);
    END LOOP;
    -- UTL_FILE.fclose (v_out_file);
    -- EXCEPTION
    --WHEN OTHERS THEN
    --UTL_FILE.put_line (v_out_file, 'failed');
    -- If any errors occur when closing the file, then we close the opened file.
    IF utl_file.is_open(v_out_file) THEN
              UTL_FILE.put_line (v_out_file, 'failed');
    UTL_FILE.fclose (v_out_file);
    END IF;
    END;
    UPDATE DebtEpisodes
    SET handoverdate = null
    WHERE DCAORLAWYER = 'DCA'
    AND accountid IN
    ( SELECT accountid
    FROM Dcaaccountallocation
    WHERE Dcaaccountallocation.status = 3
    AND Dcaaccountallocation.dcaid = 41
    END LOOP;
    END DCA_BMW_OUT;
    -- It compiles successfully, but when executes, it provides me with the 'invalid directory path' error message.
    Any help?
    Thanks

    Ram wrote:
    DCAID DIRECTORY_NAME MPNO IN_DIRECTORY_NAME INVESTOR
    4     DCA_PKFO_OUT     51950     DCA_PKFO_IN     (null)
    41     INV_ALTOR_OUT     488742     INV_ALTOR_IN Y
    2     DCA_NIG_OUT     686007     DCA_NIG_IN     (null)
    3     DCA_RAF_OUT     777163     DCA_RAF_IN     (null)
    21     INV_INFOSCORE_OUT 3482400     INV_INFOSCORE_IN     Y
    22     INV_HOIST_OUT     2866813     INV_HOIST_IN     Y
    Above is the output when select * from dca additional data.
    I have edited the r_bmw to varchar (32757 BYTE);
    however, the same errors still appear. Would I need to change the select statement to a different table...and not dca additional data?
    ThanksSo you have created a directory name r_bmw
    create directory r_bmw as 'C:\BMW';
    grant read, write on directory r_bmw to bmw;And your are querying select * from dca additional data, which doesn't return your recently created directory.... So... what to do what to do.... You should query the all_directories with directory_name = 'r_bmw'.

  • Issue with Opening Files using Multiple Actions

    I've noticed a strange issue when I attempt to use multiple actions in my Captivate 4 project.
    I have a button that does two things: open an HTML file in another window and make another button visible. Of course, for the Open URL or File action, I'm entering the name of the HTML file and select New from the drop-down list so it opens in a new window.
    Captivate doesn't seem to store that setting. When I click OK for that dialog box and then OK for the button dialog box, it reverts back to Current.
    Is this a bug or am I doing something wrong?
    Here I am, setting the property...
    ...and here's me checking Captivate 4 to see if the setting "stuck" and seeing that it didn't:

    Hi there
    I've recently encountered that behavior myself. I found it was a lot more reliable to avoid using the Multiple Actions for the Button click. Instead, configure an Advanced Action to do the work and you should have better results.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Hi.  I am having issues with copying files to my shared WB 2TB HDD connected to my airport extreme.  Comes up with error 50.  I am using a Macbook Pro to copy from so not sure what I am doing wrong.  Can someone help? thanks Rory

    Hi.  I am having issues with copying files to my shared WB 2TB HDD connected to my airport extreme.  Comes up with error 50.  I am using a Macbook Pro to copy from so not sure what I am doing wrong.  Can someone help? thanks Rory

    These links might provide some information that may be of help.
    http://support.apple.com/kb/TA20831
    https://discussions.apple.com/message/2035035?messageID=2035035
    I've encountered this error myself upon occasion.  If I remember correctly, it was a permissions/ownership issue with the some of the files I was copying.

  • I am having issues with Sidebar files not appearing from within InDesign CS5.5. They show up fine from other Adobe applications. Using OS10.6.8.

    I am having issues with Sidebar files not appearing from within InDesign CS5.5. They show up fine from other Adobe applications. Using OS10.6.8.

    I would first of all trash the preference file for InDesign, make sure the application is closed then find the prefs in
    /Users/USER NAME/Library/Preferences/Adobe InDesign and just throw the entire folder away, it will generate a new one after you launch InDesign again.
    Now launch InDesign and see if the problems are resolved.
    If not I would repair your permissions on your hard drive wih disk utility, and if that fails then di-install InDesign and re-install that single application.
    Let me know if any of these suggestions work for you
    I will be checking my email although you might have to wait for a response as I will be taking a microlight flight over the Victoria Falls tomorrow. Yay can hardly wait.

  • A serious issue with excel file read in ODI

    hi gurus,
    Issue with excel file read is that we can read only one file by setting the path from ODBC Data Source Administrator-->System DNS -->Select Work book
    what i want to read the dynamic path(Every time I cant go back and set the Work book to select the excel file..
    So i came up with a solution to write a Vbscript that convert the excel to csv my problem got solved for dynamic paths the script is as follow:
    Set objArgs = WScript.Arguments
    For I = 0 to objArgs.Count - 1
    FullName = objArgs(I)
    FileName = Left(objArgs(I), InstrRev(objArgs(I), ".") )
    Set objExcel = CreateObject("Excel.application")
    set objExcelBook = objExcel.Workbooks.Open(FullName)
    objExcel.application.visible=false
    objExcel.application.displayalerts=false
    objExcelBook.SaveAs FileName & "csv",23
    objExcel.Application.Quit
    objExcel.Quit
    Set objExcel = Nothing
    set objExcelBook = Nothing
    Next
    Now this script convert the xls file to csv with comma seprated values
    e.g in excel sheet if data is ABC XYZ PQR
    csv will come with ABC,XYZ,PQR
    here the delimiter is , i want the delimiter as pipe | who's ascii code is 124
    but if i change 23 with 124 its not working i getting the error cannot save as...
    can anyone tell me that what should be the correct code for pipe
    so that the output is ABC|XYZ|PQR
    AS WE CAN USE THE SCRIPTS IN TOOLS
    Edited by: 789141 on Sep 14, 2010 11:33 PM

    I dont have the answer for your question but i have different approach in handling multiple Excel File.
    Step 1. Copy a sample source Excel File and Call it Final.xls .
    Step 2. Map this Final.xls to DSN and in Topology call this Final.xls
    Step 3. Do the Reversing and Map and test the Interface . Once its done.
    Step 4. Create a Package and using a http://odiexperts.com/?p=1426 get the list of all the Excel File
    Step 5 . Using this http://odiexperts.com/?p=273 create a Loop to Read the Excel File name
    Step 6 . Copy using OdiFileCopy to Final.xls and run your interface .
    Step 7. Increment the Loop and copy your next File for Final and run the interface
    Step 8 . Finally you will be able to read all the Excel File .
    Step 9 . Delete the source file [ Optional ]
    Hope this helps.

  • RMAN-05001 auxiliary .... conflicts with a file used by the target database

    I can´t recreate my physical standby.
    It worked in the past.
    Now I reinstalled the 3 standbyclients.
    Copied the spfile from the primary - modified the entries and did a rman backup.
    But when issuing the duplicate database command - it comes up with the error above
    SPFILE standyby db:
    *.db_file_name_convert='+DATA/prim/','+DATA/stdy/','+RECOVERY/prim','+RECOVERY/stdy'
    *.log_file_name_convert='+DATA/prim/','+DATA/stdy/','+RECOVERY/prim','+RECOVERY/stdy'
    Starting restore at 15-APR-10
    using channel ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: starting datafile backupset restore
    channel ORA_AUX_DISK_1: restoring control file
    channel ORA_AUX_DISK_1: reading from backup piece /oracle/stage/33lb65n2_1_1
    channel ORA_AUX_DISK_1: restored backup piece 1
    piece handle=/oracle/stage/33lb65n2_1_1 tag=TAG20100415T102434
    channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:11
    output filename=+REDO1/stdy/controlfile/current.262.716293055
    output filename=+REDO2/stdy/controlfile/backup.262.716293055
    Finished restore at 15-APR-10
    sql statement: alter database mount standby database
    released channel: ORA_AUX_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 04/15/2010 10:31:46
    RMAN-05501: aborting duplication of target database
    RMAN-05001: auxiliary filename DATA/prim/datafile/system.262.715097535 conflicts with a file used by the target database+
    RMAN-05001: auxiliary filename DATA/prim/datafile/sysaux.263.715097499 conflicts with a file used by the target database+
    RMAN-05001: auxiliary filename DATA/prim/datafile/undotbs3.269.710521021 conflicts with a file used by the target database+
    RMAN-05001: auxiliary filename DATA/prim/datafile/undotbs2.270.710521021 conflicts with a file used by the target database+
    RMAN-05001: auxiliary filename DATA/prim/datafile/example.272.710521021 conflicts with a file used by the target database+
    RMAN-05001: auxiliary filename DATA/prim/datafile/users.268.710521021 conflicts with a file used by the target database+
    RMAN-05001: auxiliary filename DATA/prim/datafile/sysaux.273.710521021 conflicts with a file used by the target database+
    RMAN-05001: auxiliary filename DATA/prim/datafile/undotbs1.271.710521021 conflicts with a file used by the target database+
    RMAN-05001: auxiliary filename DATA/prim/datafile/system.264.710521021 conflicts with a file used by the target database+

    Hi ,
    I feel you are using ASM but still check the below details:
    Cause
    Production and Auxiliary have same directory structure and are running on two different machines. RMAN must be told not check that the target datafiles are sharing the same names as the duplicated files being created. Otherwise, the following errors will be returned:
    RMAN-05001: auxiliary filename /qmaxnt/u04/qmaxntorafiles/table/QMAXAD08_03.dbf
    conflicts with a file used by the target database
    RMAN-05001: auxiliary filename /qmaxnt/u04/qmaxntorafiles/table/QMAXAD08_02.dbf
    Solution
    To implement the solution, please use nofilenamecheck in syntax as follows:
    1. Connect to Target, auxiliary, and rman catalog and
    2. use script as
    run{
    set until time "to_date('2005/09/17 14:00:00','yyyy/mm/dd HH24:MI:SS')";
    allocate auxiliary channel aux1 type 'sbt_tape';
    allocate auxiliary channel aux2 type 'sbt_tape';
    duplicate target database for standby dorecover nofilenamecheck;
    Make sure to use auxiliary type of channel so RMAN restore take place at auxiliary database.
    Thanks,
    Rafi.
    http://rafioracledba.blogspot.com/

  • Issue with Sender File FCC

    Hi Experts,
    I have an issue with Sender File FCC Adapter. The file being picked is of type TXT and it is tab seperated. The first line contains the field names and from next line onwards we have values for those fields.
    The field names and field values are tab seperated. Even inserting a single letter in some field value manually disrupts the whole setup & alignment of the TXT file and the Sender File CC is unable to pick up the file from the shared folder. If the first file is errorenous and after that a correct TXT file is posted, it fails to pick up the correct file as it is trying to pick the errorenous file first.
    The Error thrown is :
    "Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR converting document line no. 2 according to structure 'ABCD':java.lang.Exception: ERROR in configuration / structure 'ABCD.': More elements in file csv structure than field names specified!"
    I have two questions:
    1. Is there a way to handle such a scenario? For e.g., the errornous TXT file gets picked but throws error in PI.
    2. Is there an alternative that the sender FCC channel picks up the correct files and filter out the errorneous ones ? ?
    Thanks,
    Arkesh

    Hi Arkesh,
    I think you are passing more number of fields than expected. Please check paramters defined and send the data accordingly.
    In the processing parameters tab of sender file adapter, you have an option called Archive faulty source files, below to that you would have option to enter the " Directory for Archiving files with Errors".
    I hope this helps you....
    Thanks,

  • Issue with attachment file name

    Hi All,
    This is about an issue with attachment file name:
    we have a scenario wherein we have payload with attachments ...(attachments can be any doc ,pdf) , problem is main document is comming with messageid.sap.com and thats normal but attachments are comming with file names for example something.pdf or something.doc or something.txt ...this is failing in adapter as it expects same name as u have in main document...anybody have any idea to get through this issue...
    Regards
    kiran

    we have a scenario wherein we have payload with attachments ...(attachments can be any doc ,pdf) , problem is main document is comming with messageid.sap.com and thats normal but attachments are comming with file names for example something.pdf or something.doc or something.txt ...this is failing in adapter as it expects same name as u have in main document...anybody have any idea to get through this issue...
    - <SAP:Payload xlink:href="cid:payload-4CED452F17C601BDE10080000A492050---sap.com">
      <SAP:Name>1 .Header1.txt</SAP:Name>
    Error we are getting is
    Cannot cast 'Header' to boolean] in class com.sap.aii.mappingtool.flib7.NodeFunctions method createIf[Header, com.sap.aii.mappingtool.tf7.rt.Context---27a73bfa]
    So we have to change the File name Header1.txt to something which we can cast to creatif....(we cannot tell the sendr to change the file name as its is set already)
    Thanks for interste and assisting
    Regards
    Kiran

  • Issue with corrupted file when dragging to timeline

    Has anyone ever had an issue with a files audio becoming corrupted when moving the file from the editing window to the timeline.  I am also seeing the my camtasia mp4 becomes blurry on the timeline but plays fine in the editing screen.
    I had not problem with camtasia Mp4s previously and today I have had so many issues with premier pro

    Hi,
    Even i faced this issue before...the problem with file adapter is the attribute nxsd:quotedBy takes &quot; as default even if u dont mention it takes the same and now after the quotes it immediately expects | wch is not there in the data and it throws the error...now the fix for the problem is put some symbol for nxsd:quotedBy wch u never expect in the data some thing like less than or greater than symbol ....some thing like below
    <element name="FieldTwo" type="string" nxsd:style="terminated"
    nxsd:terminatedBy="|" nxsd:quotedBy="<"/>

  • Auxiliary filename  conflicts with a file used by the target database

    Hi,
    I am using RMAN backup to duplicate my prod database.
    My database is 10g on Linux.
    My RMAN script is like this
    connect auxiliary /;
    connect catalog rman/rman@catalog;
    connect target sys/sys@prod;
    sql "alter session set optimizer_mode=RULE";
    run {
    allocate auxiliary channel dup1 type disk;
    allocate auxiliary channel dup2 type disk;
    allocate auxiliary channel dup3 type disk;
    set newname for datafile 1 to '/d05/u08/oracle/qadata/system01.dbf';
    set newname for datafile 2 to '/d05/u08/oracle/qadata/system02.dbf';
    set newname for datafile 3 to '/d05/u08/oracle/qadata/system03.dbf';
    set newname for tempfile 1 to '/d05/u09/oracle/qadata/temp01.dbf';
    set newname for tempfile 2 to '/d05/u09/oracle/qadata/temp02.dbf';
    set newname for tempfile 3 to '/d05/u09/oracle/qadata/temp03.dbf';
    set newname for tempfile 4 to '/d05/u09/oracle/qadata/temp04.dbf';
    duplicate target database to qa logfile
    group 1 ('/d05/u09/oracle/qadata/log1a.log',
    '/d05/u09/oracle/qadata/log1b.log') size 50m,
    group 2 ('/d05/u09/oracle/qadata/log2a.log',
    '/d05/u09/oracle/qadata/log2b.log') size 50m,
    group 3 ('/d05/u09/oracle/qadata/log3a.log',
    '/d05/u09/oracle/qadata/log3b.log') size 50m;
    I am getting the following error in the middle
    Starting Duplicate Db at 18-SEP-10
    released channel: dup1
    released channel: dup2
    released channel: dup3
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 09/18/2010 11:32:07
    RMAN-05501: aborting duplication of target database
    RMAN-05001: auxiliary filename /db01/u08/oracle/proddata/GRCM.dbf conflicts with a file used by the target database
    Recovery Manager complete.
    Previously the duplicate db was successful, but now it is giving error.
    How can I solve this.
    Thanks,
    Kavitha

    5001, 1, "auxiliary file name %s conflicts with a file used by the target database"
    // *Cause: RMAN is attempting to use the specified file name as a restore
    //         destination in the auxiliary database, but this name is already
    //         in use by the target database.
    // *Action: Use the CONFIGURE AUXNAME command to specify a name for the data
    //          file that does not conflict with a file name in use by the
    //          target db.

  • Issues with RAW files from my 7D

    I have Aperture 1.5.6 on my computer and the software updater says that is the current version. I shoot with a 20D and a 7D. I upload my raw files to Aperture and edit them from there and then process for a jpeg. However, every time I upload a raw file from my 7D I get the following message when I click on it to edit it: Unsupported Image format.
    Any words of advice, other than just buy Aperture 3??

    I have Aperture 2.X and had zero issues with RAW files from a 7D, so I think the problem is you are on 1.X. Converting to DNG first was a good suggestion if you don't want to purchase 3.X. Yet another reason to hate proprietary raw image file formats.......

  • Sharpening issues with RAW files

    Hi,
    I have downloaded lightroom 5 as a one month trial and have been playing with the program. I am not an experienced user and are wondering if I am doing something wrong, have wrong settings applied or if it is the known sharpening bug that messes with my photos. I know that sharpening and noise reduction includes a bug that does not let you export pictures 1/3 of original size with sharpening/noise intact. However, in my case, this also happens with RAW files. I do not crop or change size/resolution to any of the photos, but the sharpening is still not working. Photos look great in develop mode, but when I click on library mode to export them, all sharpening disappears!
    Is this the same bug previously reportered "only for pictures 1/3 of original size", or do I have some strange settings applied?
    I was loving lightroom 5 up until I noticed this, and now I am reluctant to buy the product...
    I'd be greatful if anyone has any input on this!
    Thanks in advance

    I have Aperture 2.X and had zero issues with RAW files from a 7D, so I think the problem is you are on 1.X. Converting to DNG first was a good suggestion if you don't want to purchase 3.X. Yet another reason to hate proprietary raw image file formats.......

Maybe you are looking for

  • LE7 crashed?

    I'm posting this for a friend who's LE7 just crashed. He got the following messages: error readi/writing file "com.apple.logic.espress.cs'' logical end-of-file reached during read operation any ideas on what caused this or how to fix it?

  • Batch determination with condition next inspection date is =10

    Hi, I want to configure the batch determination in such a way that if next inspection date is <=10 then the batch should not consider in the batch determination at the time of creation of process order, only those batchs should conside whose next ins

  • IPhone 5c upgrade to ios 7.1.1 - STUCK!

    I'm in the process of updating my iPhone 5c and when it asks me to connect to the computer (iTunes), I do so, but then iTunes pops up and says "iTunes has detected an iPhone in recovery mode.  You must restore this iPhone before it can be used with i

  • 57F4 challan completion

    Hi Friends, When i do the "57F4 challan completion", system throws a error "Excise modvat accounts not defined for 57CM transaction and 01 excise group" How can i fix it? regards, sathes

  • Problemi chiamate in uscita

    Da qualche giorno ho sempre lo stesso problema. Quando effettuo una chiamata il microfono del mio cel non funziona, ma sento perfettamente l'altro cel. Invece nelle chiamate in entrata funziona bene. Può essere un problema di lollipop dato che mi suc