"Invalid Index Key" Error - External HFS+ Drive

So I've got this external drive (Seagate Freeagent Go) that I formated with the Journaled filesystem. All of a sudden yesterday I could not access the drive after restarting my computer and when I could no longer see it on my desktop I opened Disk Utility. DU was able to see the drive and the partition but couldn't mount it, and when I ran a Verify/Repair I got the following:
Verify and Repair volume “Artimis”
Checking Journaled HFS Plus volume.
Checking Extents Overflow file.
Checking Catalog file.
Invalid index key
Rebuilding Catalog B-tree.
The volume Artimis could not be repaired.
Error: Filesystem verify or repair failed.
Can anyone help me with a potential fix? I've had no power surges and had just been using the drive with no issues the night before

It's possible that Disk Warrior may be able to repair the drive's directory. If not you will have to reformat it.

Similar Messages

  • Invalid index key - hard drive/ OS problems

    After a power surge, I was unable to boot up (using 10.5.1). However, running repairing disk permissions solved this. I still have lots of issues with the hard drive itself though - mainly with files being reported as lost, incorrect reports of the hard drive being full, lag, crashes, etc. Tried Disk Utility and Fsck, neither have been able to repair the hard drive - both report an invalid index key or problems with the catalog file.
    Is Disk Warrior the only solution, or would a format and clean install possibly solve the problem? At the moment I can still access my hard drive, and a back-up then clean install is a much easier (and less costly) solution for me.
    Thank you!

    "Invalid index key" is a much more serious error than you're likely to actually have, since you can mount the hard disk and access files on it. If the Catalog's index key is invalid, the whole filesystem is basically trashed. It's far more likely that other components were damaged by the power surge.
    In my experience, the most common components to fail this way are the logic board and/or the RAM, which means a potentially expensive trip to your local Mac repair shop.
    Sometimes a computer that was damaged by a power surge behaves better if it's placed behind a line conditioner, but your mileage may vary. Most good surge protectors are also line conditioners.
    -:sigma.SB

  • Unable to boot: Mac HD verify error - invalid index key

    Thank you in advance for your assistance. Please provide a detailed response. There is a lot I have to learn about computers.
    I allowed my macbook air mid-2013 os x 10.10.2 to update yesterday. I didn't look at what the update was (just saw the notification and clicked restart). It shut down, but did not restart. When I try to boot, the loading bar slows and tops at approx 35%, and the computer shuts off. I can boot in recovery mode. In disk utility, on the left side the first line is Macintosh HD. I can verify this without errors. The second line is also Macintosh HD written in lighter grey. I cannot interact with this until I click unlock and type in my password. After doing so, it is written in dark black, and I then have the option to verify disk. Doing so, I am given the follow error in the log:
    (in red) Invalid index key.
    (in red) Invalid record count.
    (in red) The volume Macintosh HD could not be verified completely.
    (in black) File system check exit code is 8.
    (in red) Error: This disk needs to be repaired. Click Repair Disk.
    A pop-up message says:
    Disk Utility stopped verifying "Macintosh HD"
    This disk needs to be repaired.
    I click an "ok" box, but the Repair Disk button is not available.
    At this point, I noticed the "mount" button is available. If I click this, it says:
    Mount Failed
    The disk "Macintosh HD" could not be mounted.
    Try running First Aid on the disk and then retry mounting.
    Of course, the only option in First Aid is Verify Disk, which I have already done.
    I also tried reinstalling OS X from safe mode, but the installation failed. I would ideally like to fix this without losing any data, but my computer is backed up so it won't be terrible if I have to start fresh. My SSD failed on my macbook air 2012, so I hope this isn't happening again.
    Thank you.

    Startup Issues - Resolve
    Startup Issues - Resolve (2)
    Startup Issues - Resolve (3)

  • How to Index a Lacie External Ethernet Drive

    I cannot seem to get Spotlight to (a) recognize and (b) index a Lacie external Ethernet Drive I run.
    Can anyone advise how I can get both, please?
    GWJ
    Melbourne, Australia

    In contrast to the pre-Tiger "Find" command, Spotlight can't search networked drives. I recommend downloading Easyfind at http://www.versiontracker.com/dyn/moreinfo/macosx/11706 and installing it. Easyfind isn't the very fastest utility but it performs thorough searches and fills this Spotlight design shortcoming well enough.

  • Invalid API Key Error in Ecosign API

    I'm using the sample soap code(Developer kit) given by echosign api for testping, but it always show invalid api key error while i'm executing from terminal. Please give the solution as soon as possible, and i'm not able to get solution from google also.
    This is my API Key:
    Client Secret:
    6IaJHev8N48JbsZcM4Itggzt0pAHF0iS
    I tried with this comment in terminal:
    php demo.php https://secure.echosign.com/services/EchoSignDocumentService20?wsdl 6IaJHev8N48JbsZcM4Itggzt0pAHF0iS test
    This is demo.php file:
    <?php
    // get input
    array_shift($_SERVER['argv']);
    $Url = array_shift($_SERVER['argv']);
    $ApiKey = array_shift($_SERVER['argv']);
    $cmd = array_shift($_SERVER['argv']);
    $params = $_SERVER['argv'];
    if (!$cmd) print_usage();
    $S = new SOAPClient($Url);
    call_user_func("cmd_$cmd", $params);
    function cmd_test() {
        global $Url, $ApiKey, $S;
        print "Testing basic connectivity...\n";
        $r = $S->testPing(array('apiKey' => $ApiKey));
        print "Message from server: {$r->documentKey->message}\n";
        print "Testing file transfer...\n";
        $text = file_get_contents('../test.pdf');
        $r = $S->testEchoFile(array('apiKey' => $ApiKey, 'file' => base64_encode($text)))->outFile;
        if (base64_decode($r) === $text) {
            print "Woohoo! Everything seems to work.\n";
        else {
            die("ERROR: Some kind of problem with file transfer, it seems.\n");
    function cmd_send() {
        global $Url, $ApiKey, $S;
        list($filename, $recipient) = reset(func_get_args());
        $r = $S->sendDocument(array(
            'apiKey' => $ApiKey,
            'documentCreationInfo' => array(
                    'fileInfos' => array(
                        'FileInfo' => array(
                            'file'     => file_get_contents($filename),
                            'fileName' => $filename,
                    'message' => "This is neat.",
                    'name'    => "Test from SOAP-Lite: $filename",
                    'signatureFlow' => "SENDER_SIGNATURE_NOT_REQUIRED",
                    'signatureType' => "ESIGN",
                    'tos' => array( $recipient ),
        print "Document key is: {$r->documentKeys->DocumentKey->documentKey}\n";
    function cmd_info() {
        global $Url, $ApiKey, $S;
        list($doc_key) = reset(func_get_args());
        $r = $S->getDocumentInfo(array('apiKey' => $ApiKey, 'documentKey' => $doc_key))->documentInfo;
        print "Document is in status: {$r->status}\n";
        print "Document History: ";
        foreach($r->events->DocumentHistoryEvent as $_) {
            $keytext =
              $_->documentVersionKey
              ? " (versionKey: {$_->documentVersionKey})"
            print "{$_->description} on {$_->date}$keytext\n";
        print "Latest versionKey: {$r->latestDocumentKey}\n";
    function cmd_latest() {
        global $Url, $ApiKey, $S;
        list ($doc_key, $filename) = reset(func_get_args());
        $r = $S->getLatestDocument(array('apiKey' => $ApiKey, 'documentKey' => $doc_key))->pdf;
        //$r = base64_decode($r);
        file_put_contents($filename, $r);
    function print_usage() {
        die(<<<__USAGE__
    Usage:
      demo.php <URL> <API key> <function> [parameters]
    where the function is one of:
      test
      send <filename> <recipient_email>
      info <documentKey>
      latest <documentKey> <filename>
    test will run basic tests to make sure you can communicate with the web service
    send will create a new agreement in the EchoSign system, and returns a documentKey
    info returns the current status and all the history events for a given documentKey
    latest saves the latest version of the document as a PDF with the given filename
    __USAGE__
    --------------------------  End of file ---------------------------------------------------------------

    This is my API Key:
    Client Secret:
    6IaJHev8N48JbsZcM4Itggzt0pAHF0iS
    Client secret is not the same as an api key!
    in addition to the above, integration key or access codes can be had by going to personal preferences>access code and clicking the plus sign.

  • External HFS drive with bootcamp+XP OS networked to XP PC, is it possible?

    Using a current G5 iMac intel or G5 pro Intel. Has anyone configured an external apple HFS drive running Bootcamp to plug into a dedicated XP Platform? Does the drive need to match the platform bit rate? It would be great to plug in the 2.5in external HFS Drive and use bootcamp + XP OS on dedicated XP platform and be able to use it. There must be many issues. This raises many questions! Has anyone succeeded?
    PowerMac12,1   Mac OS X (10.4.8)   iMac - Power PC G5 (3.1) - CPU 2.1 GHz - RAM 1.5 GB - BUS 700 MHz - HD 250GB

    As I am testing and measuring the bootcamp issue, I will try before posting the solution, MacDrive 6, from Majick on the metafile forum below. http://www.mediafour.com/products/macdrive6/bootcamp.asp
    Has anyone tried MacDrive 6? Is their any Plus / Minus / Interesting issues with this app.

  • To index data in external hard drives

    I'm using Time Capsule 500GB and Seagate external hard. My iMac and these two hard drives are connected wirelessly. I want to index data in those drives by using Spotlight but I can only index information in my iMac's internal hard. What should I do to index data in external hard drives?

    I resolved this problem. Just go to Time Capsule in Finder and search in the upper right corner of Finder! It was more easier than I expected.
    Message was edited by: JesseKimjd

  • Ideacenter K330B One Key Recovery External Hard Drive

    Hello, a few months back I made a full backup of my system to an external hard drive. I reached a point where it was just easiest to start my computer over using the One Key Recovery. I had to go with the factory settings at least temporarily. Is there anyway I can use the external hard drive backup to restore my stystem? The One Key system doesn't seem to agree with it.
    Thank you for any replies.
    Sorry if there is a post like this elsewhere. I tried to see if their was and didn't see any that applied directly to what I needed.

    hi Nutcracker,
    When you tried to restore your backup using OneKey Recovery, are you getting any specific error message?
    Can you also try to:
    1. Format the external HDD with NTFS (move your OneKey Recovery backup to another computer first)
    2. Make external HDD's the partition active and copy back the OneKey Recovery backup image
    3. Boot into OneKey Recovery 7.0 and try to restore your backup.
    Let me know your findings
    Regards,
    neokenchi
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • Sharing External HFS Drives

    I have a MacBook Pro and a Mac Mini. The Mac Mini have external firewire and external USB drives that are HFS formated attached. I can log into my Mac Mini from my Macbook Pro using file sharing. The problem is I can not connect to the HFS formated external drives. They are not showing up as options to mount. How can I set this up so when I connect to the Mac Mini I can access the external drives?
    I could use any help anyone has for this problem.
    Thanks

    You need to manually configure which directories to share. By default only users home directories and certain public directories are shared.
    Unless you're familiar with configuring the sharing daemons, your best bet is to get a copy of SharePoints which puts a nice GUI on the process.

  • Install failed invalid index key

    I tried to install Leopard and the install failed and then my MacBook Pro would not restart. It would give the start up tone, then would just sit. I tried the disk utility and it would not repair permissions or the disk but it would show some problems including an "invaild index key". I went to the Apple Store and bought DiskWarrior. I asked one of the genius's about the problem and he thought I would have to reformat my hard drive. I went home and ran DiskWarrior and it fixed everything. I then installed Leopard with no more problems.
    I hope this helps somebody else.

    Perseverance pays off. Great work. Sometimes even a "genius" is not correct, and once again, DiskWarrior comes through.
    You might mark this question as answered by yourself to put it to bed.
    Message was edited by: nerowolfe

  • USB keys and external hard drives disappear after 30 seconds to 1 minute of being mounted.

    I just got my 15' MacBook Pro refurbished (by Apple), and everything is working well except my USB ports. My USB keys appear for 30 seconds to as much as 2 minutes before disappearing from eveywhere, my desktop, finder and disk utility.  I have a 1 TB WD passport for mac that also has the same problem, but can stay on the desktop and copy files for around 10 minutes. Then error -36 shows up, the hard drive disappears from the desktop and finder, but only appears in disk utility. It is powered as well, The light is currently flashing indicating it's receiving power as I am typing this. But still, no way i can copy anyhting onto it.
    I have searched and searched for the solution to this problem, I have tried using apple script to find "invisible hard drives." and that doesn't work either.
    On my windows partition in bootcamp, all usb keys work perfectly fine.
    Is it because the USB ports are out of energy and dying? If so, should the refurbishment have covered that and replaced them? (Note: refurbishment included everything from my Keysboard to my battery to my Optical drive and cable optical drive flex)
    Is there anything I can do to fix this problem on my own?
    Any help I can get would be greatly appreciated.

    Hi wdmpfm,
    Here is something from an earlier post on the -36 error that may help to identify the issue:
    A -36 is a disc I/O error. You might have a corrupt file, or a corrupted drive. Try creating a new file and see if you still get the error. If you do, it might be wise to run a Disc Repair program to see if it can find any errors that it can fix.
    And one from another thread:
    You need to format your drive correctly. New drives come formatted for Windows, & then they seem to work — but not properly.
    +Applications > Utilities > Disk Utility+
    Choose one of the +Mac OS Extended+ formats.
    Obviously first you will have to back-up all the data you have already put on the drive, because it will all be lost when you re-format.
    Hope one of these may help!
    Cheers,
    GB

  • "Invalid WEP Key" Error on 7410 All-in-On Wireless Set Up

    My 7410 has been connected wirelessly for over a year but I just installed a new router (Linksys N600) and can't get the wireless connection back up.  All other wireless devices are connecting to the new router.  Using WPA2-PSK[AES] security on router.  Using installation wizard on front panel of printer and it is locating network SSID fine.  But only allowing for WEP key and giving me error code every time it is entered.  Have tried to change length of key on router to 5 or 13 characters and also tried 10 HEX digits.  Have powered off/on the printer and restored to factory network settings.  No luck with anything.  The Cisco router I previously had installed was also an N router - no problems connecting the 7410 wirelessly but swapped it out because of too many lost connections.  Any advice?
    This question was solved.
    View Solution.

    If your WEP key is all alphabet then it is not WEP, it is WPA or WPA2.  As discussed above, this printer will not accept WPA2.
    Get into your router settings and change your wireless security type to WPA or WPA/WPA2 (you can keep the same passphrase).
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • How to disable writing indexing crap on external usb drives?

    And when Apple vouchsafe to do something about it?

    Huh?
    Are you talking about spotlight indexing? If so set the Spotlight Privacy in your System Preferences.  Or stick a (empty) file named .metadata_never_index at the root of the volume.  Or use mdutil from terminal to tell spotlight not to index the volume (mdutil -i off volume).

  • IPod Classic - 80GB - Invalid Index Key. Won't Sync.

    So, my friend recently gave me his old iPod Classic 80gb 6th generation. I restored it, then began to sync it with my itunes library. It began to sync, but then froze. iTunes and Finder became frozen. I had to force quit iTunes and then unplug the iPod and restart finder to get everything in order. The iPod still doesn't work. I ran the disk utility and got the results as follows.
    http://i47.tinypic.com/mu8mft.jpg
    I would really appreciate a free solution to this problem as I can't live without my music.
    Thank you very much.

    So I had a similar problem on my 120 gig classic. After months of go around with the repairs department, we finally figured out the problem. ITUNES 9.0.3, KILLS THE HARD DRIVE on classics. What you need to do is get apple support to send you a REPLACEMENT, do NOT accept a repair, as they are idiots and only try to sync maybe one song, don't get the problem, and will send it RIGHT back to you, unfixed. Believe me, it is a Hard Drive issue. Once you get your new ipod, UNINSTALL itunes 9, and go back to using 8.2.1, it will work believe me. Hope this helps.

  • Call procedure with Spring and strange invalid index error.

    Hi I call a procedure, from java in this way:
    FlussiGiornalieriStoredProcedure proc = new FlussiGiornalieriStoredProcedure(dataSource);
                   String column_order="";
                   if (orderColumn!=null) {
                        column_order = orderColumn + " " + orderType;
                   } else {
                        column_order = " stato DESC "; //this is the invalid index column of the error               
    Map mappa = proc.execute(idGruppo, dataInizio, dataFine, startRow, endRow, column_order);
                   result = (List<VistaFlussiGiornalieri>) mappa.get("recordsetCursor");
                   numeroTotaleRighe = ((BigDecimal)mappa.get("countRow")).intValue();
    response.setSize(numeroTotaleRighe);
              response.setList((List<VistaFlussiGiornalieri>) result);
    private class FlussiGiornalieriStoredProcedure extends StoredProcedure {
            private static final String SQL = "mkt_flussi_giornalieri2";
            public FlussiGiornalieriStoredProcedure(DataSource ds) {             
                super(ds, SQL);
                declareParameter(new SqlParameter("idGruppo", Types.VARCHAR));
                declareParameter(new SqlParameter("dataInizio", Types.DATE));
                declareParameter(new SqlParameter("dataFine", Types.DATE));           
                declareParameter(new SqlParameter("startRow", OracleTypes.NUMBER));
                declareParameter(new SqlParameter("endRow", OracleTypes.NUMBER));
                declareParameter(new SqlParameter("column_order", OracleTypes.VARCHAR));
                //declareParameter(new SqlParameter("order_name", OracleTypes.VARCHAR));
                declareParameter(new SqlOutParameter("recordsetCursor", OracleTypes.CURSOR, VistaFlussiGiornalieriDaoImpl.this));
                declareParameter(new SqlOutParameter("countRow", OracleTypes.NUMBER, VistaFlussiGiornalieriDaoImpl.this));
                //declareParameter(new SqlOutParameter("QUERY_STM", OracleTypes.VARCHAR, VistaFlussiGiornalieriDaoImpl.this));
                compile();
            public Map execute(String idGruppo, Date dataInizio, Date dataFine, int startRow, int endRow, String column_order) {
                 Map inputs = new HashMap();
                 inputs.put("idGruppo", idGruppo);
                 inputs.put("dataInizio", dataInizio);
                 inputs.put("dataFine", dataFine);
                 inputs.put("startRow", startRow);
                 inputs.put("endRow", endRow);
                 inputs.put("column_order", column_order);
                return execute(inputs);
        }When The java class call the oracle procedure I receive this message:
    >
    Caused by: java.sql.SQLException: Invalid index column
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
         at oracle.jdbc.driver.OracleResultSetImpl.getString(OracleResultSetImpl.java:385)
         at it.edison.markettracker.dao.spring.VistaFlussiGiornalieriDaoImpl.mapRow(VistaFlussiGiornalieriDaoImpl.java:155)
         at it.edison.markettracker.dao.spring.VistaFlussiGiornalieriDaoImpl.mapRow(VistaFlussiGiornalieriDaoImpl.java:1)
         at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:92)
         at org.springframework.jdbc.core.JdbcTemplate.processResultSet(JdbcTemplate.java:1124)
         at org.springframework.jdbc.core.JdbcTemplate.extractOutputParameters(JdbcTemplate.java:1085)
         at org.springframework.jdbc.core.JdbcTemplate$5.doInCallableStatement(JdbcTemplate.java:997)
         at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:936)
         ... 26 more
    If I call the procedure, from toad, in this way:
    SET serveroutput ON
    DECLARE
    TROVATI SYS_REFCURSOR;
    NUMERO_TROVATI NUMBER;
    BEGIN
          DBMS_OUTPUT.ENABLE(30000);
          dbms_output.put_line('INIZIO');
          Mkt_Flussi_Giornalieri2(1, trunc(sysdate), trunc(sysdate), 100, 50, 'stato DESC', TROVATI, NUMERO_TROVATI);
          dbms_output.put_line('RECORD TROVATI:'||NUMERO_TROVATI);
    END; I don't receive any error message. Why?
    The procedure is:
    CREATE OR REPLACE PROCEDURE Mkt_Flussi_Giornalieri2
    ( idGruppo IN VARCHAR2
    , dataInizio IN DATE
    , dataFine IN DATE
    , startRow IN NUMBER
    , endRow IN NUMBER
    , column_order in varchar2
    --, order_name in varchar2
    , recordsetCursor OUT SYS_REFCURSOR
    , countRow OUT NUMBER
    ) IS
    order_clause varchar2(200) := ' ';
    sql_stm varchar2(32000);
    BEGIN
    IF column_order IS NOT NULL
    THEN
    order_clause := column_order;
    ELSE
    order_clause := ' stato DESC ';
    END IF;
    dbms_output.put_line('clausola:'||order_clause);
    sql_stm:='
         SELECT idflusso, descrizioneFlusso, dataRiferimento, strDataRiferimento,
            stato,  dataElaborazione, ultimoMessaggio, livello, utentiRiferimento,
            exec_seq, provider_description, log_info FROM
      (SELECT idflusso, descrizioneFlusso, dataRiferimento, strDataRiferimento,
            stato,  dataElaborazione, ultimoMessaggio, livello, utentiRiferimento,
            exec_seq, provider_description, log_info FROM
      (SELECT
    temp.flow_id AS idFlusso,
    MKT_FLOW.flow_id || '' - '' || MKT_FLOW.flow_description || ''('' || temp.exec_seq || '')'' AS descrizioneFlusso,
    TO_DATE(temp.date_id,''yyyymmddhh24miss'') AS dataRiferimento,
    TO_CHAR(TO_DATE(temp.date_id,''yyyymmddhh24miss''),''dd/mm/yyyy'')||'' h. ''||TO_CHAR(TO_DATE(temp.date_id,''yyyymmddhh24miss''),''hh24:mi'') AS strDataRiferimento,
    temp.status AS stato, temp.end_time AS dataElaborazione, DECODE(temp.status,3, ERROR_DESC, 1, TRACE_DES) AS ultimoMessaggio,
    DECODE(temp.status,3, error_level, 1, fk_trace_level) AS livello,
    Get_Group_Description(MKT_FLOW.flow_id) AS utentiRiferimento, temp.exec_seq AS exec_seq, mp.provider_description,
                             mp.provider_link, mfc.log_info
    FROM (
      SELECT v.*, tr.TRACE_ID, tr.TRACE_DES , tr.trace_date, tr.fk_trace_level, e.ERROR_ID, e.ERROR_CODE, NVL(e.ERROR_DESC, er.ERROR_DESC) AS ERROR_DESC, e.error_date, e.error_level,
      MIN(e.error_id) OVER (PARTITION BY e.fk_exec_seq) eid,
      MAX(tr.trace_id) OVER (PARTITION BY tr.fk_exec_seq) tid
      FROM (
        SELECT fc.*, MAX(exec_seq) OVER (PARTITION BY flow_id, flow_frequency, n_run, date_id) exsq
        FROM mkt_flow_conf_view fc
        WHERE TRUNC(end_time) >= :1
          AND TRUNC(end_time) <= :2
      ) v, MKT_ERROR er, MKT_FLOW_ERROR e, MKT_FLOW_TRC tr
      WHERE v.exec_seq        = v.exsq
        AND e.fk_exec_seq (+) = v.exec_seq
        AND tr.fk_exec_seq (+) = v.exec_seq
        AND er.error_id (+) = e.error_code
    ) temp
    INNER JOIN MKT_FLOW
    ON MKT_FLOW.flow_id = temp.flow_id AND MKT_FLOW.n_run = temp.n_run AND MKT_FLOW.flow_frequency = temp.flow_frequency
    INNER JOIN MKT_FLOW_GROUP ON MKT_FLOW_GROUP.flow_id = MKT_FLOW.flow_id
    LEFT OUTER JOIN
                             (SELECT DISTINCT flow_id, log_info
                                         FROM mkt_flow_conf) mfc
                             ON mkt_flow.flow_id = mfc.flow_id
                             , mkt_provider mp
    WHERE NVL(error_id, -1) = NVL(eid, -1)
      AND NVL(trace_id, -1) = NVL(tid, -1)
      AND MKT_FLOW_GROUP.group_id=:3
      AND NVL (mkt_flow.fk_provider_id, '' '') =
                                                         NVL (mp.provider_id, '' '') )
      WHERE ROWNUM <= :4
      MINUS
      (SELECT idflusso, descrizioneFlusso, dataRiferimento, strDataRiferimento,
            stato,  dataElaborazione, ultimoMessaggio, livello, utentiRiferimento,
            exec_seq, provider_description, log_info FROM
      (SELECT
    temp.flow_id AS idFlusso,
    MKT_FLOW.flow_id || '' - '' || MKT_FLOW.flow_description || ''('' || temp.exec_seq || '')'' AS descrizioneFlusso,
    TO_DATE(temp.date_id,''yyyymmddhh24miss'') AS dataRiferimento,
    TO_CHAR(TO_DATE(temp.date_id,''yyyymmddhh24miss''),''dd/mm/yyyy'')||'' h. ''||TO_CHAR(TO_DATE(temp.date_id,''yyyymmddhh24miss''),''hh24:mi'') AS strDataRiferimento,
    temp.status AS stato, temp.end_time AS dataElaborazione, DECODE(temp.status,3, ERROR_DESC, 1, TRACE_DES) AS ultimoMessaggio,
    DECODE(temp.status,3, error_level, 1, fk_trace_level) AS livello,
    Get_Group_Description(MKT_FLOW.flow_id) AS utentiRiferimento, temp.exec_seq AS exec_seq, mp.provider_description,
                             mp.provider_link, mfc.log_info
    FROM (
      SELECT v.*, tr.TRACE_ID, tr.TRACE_DES , tr.trace_date, tr.fk_trace_level, e.ERROR_ID, e.ERROR_CODE, NVL(e.ERROR_DESC, er.ERROR_DESC) AS ERROR_DESC, e.error_date, e.error_level,
      MIN(e.error_id) OVER (PARTITION BY e.fk_exec_seq) eid,
      MAX(tr.trace_id) OVER (PARTITION BY tr.fk_exec_seq) tid
      FROM (
        SELECT fc.*, MAX(exec_seq) OVER (PARTITION BY flow_id, flow_frequency, n_run, date_id) exsq
        FROM mkt_flow_conf_view fc
        WHERE TRUNC(end_time) >= :5
          AND TRUNC(end_time) <= :6
      ) v, MKT_ERROR er, MKT_FLOW_ERROR e, MKT_FLOW_TRC tr
      WHERE v.exec_seq        = v.exsq
        AND e.fk_exec_seq (+) = v.exec_seq
        AND tr.fk_exec_seq (+) = v.exec_seq
        AND er.error_id (+) = e.error_code
    ) temp
    INNER JOIN MKT_FLOW
    ON MKT_FLOW.flow_id = temp.flow_id AND MKT_FLOW.n_run = temp.n_run AND MKT_FLOW.flow_frequency = temp.flow_frequency
    INNER JOIN MKT_FLOW_GROUP ON MKT_FLOW_GROUP.flow_id = MKT_FLOW.flow_id
    LEFT OUTER JOIN
                             (SELECT DISTINCT flow_id, log_info
                                         FROM mkt_flow_conf) mfc
                             ON mkt_flow.flow_id = mfc.flow_id
                             , mkt_provider mp
    WHERE NVL(error_id, -1) = NVL(eid, -1)
      AND NVL(trace_id, -1) = NVL(tid, -1)
      AND MKT_FLOW_GROUP.group_id=:7
      AND NVL (mkt_flow.fk_provider_id, '' '') =
                                                         NVL (mp.provider_id, '' '') )
      WHERE ROWNUM <= :8
      )  ) ORDER BY :9' ;
    dbms_output.enable(30000);
    dbms_output.put_line(sql_stm);
    OPEN recordsetCursor FOR sql_stm USING dataInizio, dataFine, idGruppo, endRow, dataInizio, dataFine, idGruppo, startRow, order_clause;
       SELECT COUNT(*) INTO countRow FROM
      (SELECT
    temp.flow_id AS idFlusso,
    MKT_FLOW.flow_id || ' - ' || MKT_FLOW.flow_description || '(' || temp.exec_seq || ')' AS descrizioneFlusso,
    TO_DATE(temp.date_id,'yyyymmddhh24miss') AS dataRiferimento,
    TO_CHAR(TO_DATE(temp.date_id,'yyyymmddhh24miss'),'dd/mm/yyyy')||' h. '||TO_CHAR(TO_DATE(temp.date_id,'yyyymmddhh24miss'),'hh24:mi') AS strDataRiferimento,
    temp.status AS stato, temp.end_time AS dataElaborazione, DECODE(temp.status,3, ERROR_DESC, 1, TRACE_DES) AS ultimoMessaggio,
    DECODE(temp.status,3, error_level, 1, fk_trace_level) AS livello,
    Get_Group_Description(MKT_FLOW.flow_id) AS utentiRiferimento, temp.exec_seq AS exec_seq, mp.provider_description,
                             mp.provider_link, mfc.log_info
    FROM (
      SELECT v.*, tr.TRACE_ID, tr.TRACE_DES , tr.trace_date, tr.fk_trace_level, e.ERROR_ID, e.ERROR_CODE, NVL(e.ERROR_DESC, er.ERROR_DESC) AS ERROR_DESC, e.error_date, e.error_level,
      MIN(e.error_id) OVER (PARTITION BY e.fk_exec_seq) eid,
      MAX(tr.trace_id) OVER (PARTITION BY tr.fk_exec_seq) tid
      FROM (
        SELECT fc.*, MAX(exec_seq) OVER (PARTITION BY flow_id, flow_frequency, n_run, date_id) exsq
        FROM mkt_flow_conf_view fc
        WHERE TRUNC(end_time) >= dataInizio
          AND TRUNC(end_time) <= dataFine
      ) v, MKT_ERROR er, MKT_FLOW_ERROR e, MKT_FLOW_TRC tr
      WHERE v.exec_seq        = v.exsq
        AND e.fk_exec_seq (+) = v.exec_seq
        AND tr.fk_exec_seq (+) = v.exec_seq
        AND er.error_id (+) = e.error_code
    ) temp
    INNER JOIN MKT_FLOW
    ON MKT_FLOW.flow_id = temp.flow_id AND MKT_FLOW.n_run = temp.n_run AND MKT_FLOW.flow_frequency = temp.flow_frequency
    INNER JOIN MKT_FLOW_GROUP ON MKT_FLOW_GROUP.flow_id = MKT_FLOW.flow_id
    LEFT OUTER JOIN
                             (SELECT DISTINCT flow_id, log_info
                                         FROM mkt_flow_conf) mfc
                             ON mkt_flow.flow_id = mfc.flow_id
                             , mkt_provider mp
    WHERE NVL(error_id, -1) = NVL(eid, -1)
      AND NVL(trace_id, -1) = NVL(tid, -1)
      AND MKT_FLOW_GROUP.group_id=idGruppo
      AND NVL (mkt_flow.fk_provider_id, ' ') =
                                                         NVL (mp.provider_id, ' '));
    END Mkt_Flussi_Giornalieri2;
    /Please, could someone help me?
    Thanks. Bye Bye.

    Hi,
    I have solved the problem, I forgot a parameter in the select, so java tells the an error. But now I have another problem. The procedure doesn't execute the order by. I pass the couple column_name order_type in a string as ("provider_description desc") dinamically but the procedure doesn't execute the ordering. Why?
    Thanks, bye bye.

Maybe you are looking for