Tracing scsi commands with dtrace / wrong ctf data on S-x86?

This is probably a bug, either in the kernel's CTF symbol information, or in dtrace:
I'm trying to trace scsi commands in the Solaris 10 b63 x86 kernel with dtrace, including any request sense
data received for failed scsi commands.
I've noticed that my D script (included below) prints bogus "sense key" values on S10_b63 (x86),
when the "es_key" member from a "struct scsi_extended_sense" is printed (see the
<sys/scsi/generic/sense.h> header file).
For example, when the first three bytes of a "struct scsi_extended_sense" are filled with the bytes
0x70, 0x00, 0x05, printing scb->sts_sensedata.es_key gives the output "1" instead of the expected "5".
Example:
dtrace: script 'scsi2.d' matched 3 probes
CPU     ID                    FUNCTION:NAME
  0  16099             scsi_transport:entry 46 02 00 00 00 00 00 00 08 00
  0  16387                     sdintr:entry state 37, reason 0, t/ms 2, to/s 5, arq sk/asc/ascq 1 20 0The user level command that has send the "0x46" scsi GET CONFIGURATION command via an USCSI
ioctl prints the correct correct sense data ("5 20 0"):
get configuration: scsi command failed with status illegal request, invalid command operation code (sk/asc/ascq 5 20 00)Here's my D script:
#!/usr/sbin/dtrace -s
fbt::scsi_transport:entry
        pkt = (struct scsi_pkt *)arg0;
        cdb = pkt->pkt_cdbp;
        printf("%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x",
                cdb[0], cdb[1], cdb[2], cdb[3], cdb[4],
                cdb[5], cdb[6], cdb[7], cdb[8], cdb[9]);
        this->start_time = timestamp;
fbt::sdintr:entry
        tim = (timestamp - this->start_time) / 1000000;
        pkt = (struct scsi_pkt *)arg0;
        scb = (struct scsi_arq_status *)pkt->pkt_scbp;
        printf("state %x, reason %x, t/ms %d, to/s %d, %sarq sk/asc/ascq %x %x %x",
                pkt->pkt_state, pkt->pkt_reason, tim, pkt->pkt_time,
                pkt->pkt_state & 0x20 ? "" : "no ",
                pkt->pkt_state & 0x20 ? scb->sts_sensedata.es_key : 0,              /* <<<<<<<<< */
                pkt->pkt_state & 0x20 ? scb->sts_sensedata.es_add_code : 0,
                pkt->pkt_state & 0x20 ? scb->sts_sensedata.es_qual_code : 0);

This is indeed a bug: thanks for finding it and sorry for the trouble. There is an issue with
the way the D compiler is trying to decode bit-fields of length greater than one byte on x86,
of which es_key is such a bit-field. We'll get a bug filed on this for you and get it fixed.
-Mike

Similar Messages

  • Create table space command with no specification of data file path.

    I am using following command for creating table space in oracle 11g
    CREATE TABLESPACE testTbSpace DATAFILE 'dataFileName.dbf' SIZE 50M REUSE AUTOEXTEND ON NEXT 1M MAXSIZE 32767M NOLOGGING"
    But it is creating datafile dataFileName.dbf at disk at following path
    echo $ORACLE_HOME/dbs
    I dont want to create datafile at this path and also dont want to specify data file path in 'create table space' command.
    Is there is any parameter,which i can set and above command start to create dataFileName.dbf at that path
    Edited by: user8680179 on May 15, 2012 1:54 AM

    user8680179 wrote:
    i issued following commands from 'SYS' user;
    1. show parameter db_create_file_dest;
    NAME TYPE VALUE
    db_create_file_dest string
    2.alter system set db_create_file_dest='dataFilePath';
    System altered.
    3.show parameter db_create_file_dest;
    NAME TYPE VALUE
    db_create_file_dest string dataFilePath
    4.CREATE TABLESPACE testTbSpace2 DATAFILE 'test1.dbf' SIZE 50M REUSE AUTOEXTEND ON NEXT 1M MAXSIZE 32767M NOLOGGING;
    Tablespace created.
    But still my test1.dbf file is creating at old path($ORACLE_HOME/dbs)Is datafilepath a real location? I don't think so! Give a proper path like "d:\oracle\" and retry.
    Aman....

  • New employee with wrong hiring date - how to change?

    Hi,
    I've entered a new employee with a wrong hiring date and I don't know how to change it. Some employee date are easily changeable not the hiring date!?

    Hi Marko.
    Go to t-code PA30, enter the personnel number of the employee whom you have hired.
    At the top in the menu bar, select "UTILITIES" - "Change entry/leaving date".
    It will take you to the screen - "Change Actions" - Change " Start date".
    This will correct the hiring date of the employee.
    Reward points, if helpful.
    Regards,
    Reema

  • I bought my i pod touch from us but i live in india .i have been using this from many days fr just a few days before something went wrong with it and the date and time has changed what do i do?

    i bought my i pod touch from us but i live in india .i have been using this from many days fr just a few days before something went wrong with it and the date and time has changed what do i do?

    Have you went to Settings>General Time&Date and correct the time.  Make sure the time zone is correct too.  Also go to Settings>General>Inernational and make sure the Gergorian calender is selected.

  • Wrong Exchange rate for Import PO with past Condition Price date

    Hi
    We do update Exchange rate type "M" on daily basis, but exchange rate in Import PO is wrong. While creating import PO, the PBXX condition automatically obtain the "exchange rate" with Old "condition price date" despite the Table "TCURR" has maintained updated data. Why system behavior is like this?
    As per our requirement, system should obtain the data based on PO date. Kindly help with your experiences.
    Prashant

    Hi Biswajit,
    Use the user parameter EVO to indicate that no price adoption from last Purchase Order must take place:
    IMG: MM -> Purchasing -> Environment data -> Default values for Buyers -> Setting for Default values.
    Select or setup a default value and on the "price adoption" tab you may choose how copying of conditions from last purchase order must behave. Select "Do not copy". Then assign this default value to the user, using the EVO parameter.
    Prashant

  • PDF saving with the wrong date

    When I save a file, it saves with the wrong date: it is off by 5 years and 1 day and the time is completely wrong. This has been happening for months and has not been fixed by installing newer versions of Adobe Reader (I currently have version 10.1.7). The date/time on my computer is fine and Microsoft Word documents save with the right date & time...

    I'm actually having a similar problem with the computers that are used at my work, though not with a 5 year difference; Our pdfs get saved as if it were 2 days previous.  We  use mostly AutoCAD and print to PDF.  The pdf gets saved to a shared drive, but everything else that we save on that drive (word documents, excel spreadsheets, AutoCAD files, etc.) have the correct date.  I checked to see if maybe it had something to do with the time stamp server settings, but we don't have a server set up.  The time on all of our computers is also set to the current date and time.  We do sometimes save pdfs from outlook, from clients, but have the problem regardless of if we were using outlook or not.  It's not a terribly huge deal, but sometimes we check to see when pdfs were updated versus their corresponding drawings and it gets confusing when the date is off.  Any help would be appreciated.  Thank you.

  • Refurbished iPod Touch didn't come with warranty, has wrong purchase date

    So I bought a refurbished iPod Touch 5G a couple of weeks ago (in September). For some reason the serial number for the iPod shows up as being out of warranty and also states that it was purchased in May. Has anyone else ever had issues with the warranty and purchase date info being mixed up for their refurb? It became an issue for me because the iPod's screen was flickering. I took it to the Apple store, where they could see that the records were incorrect, but could do nothing about it. They replaced the iPod and zeroed out the replacement fee so it didn't cost me anything, but my iPod still officially lacks a warranty and has the wrong purchase date associated with it. I wish I knew who to talk to to get this cleared up.
    I should add that I bought my iPod from the online Apple store, so this is all within their system.
    Message was edited by: ekalter

    Kappy,
    Thanks for you reponse. The serial number for my iPod brought up the following information at the Apple store:
    Warranty Status: Out of Warranty(OW)
    Model: IPOD TOUCH (5TH GENERATION)
    Date of Purchase: 06-May-13
    ...but I ordered the iPod online on September 21st. They had to bypass their system in order to give me my free replacement. I'm concerned that if I have a problem again in the future I will not get my 1 year of warranty coverage. It seems to me like someone failed to change some information associated with this iPod when they processed my order for the refurbished model.

  • Understanding open syscall on FIFO with dtrace

    Hi all,
    I'm trying to understand open syscall behaviour with respect to FIFOs using dtrace. We have a very intermittent failure with FIFOs, when writer process fails in opening pipe, but reader succeeds. I tried debugging with dtrace and found some weirdness in the failing condition. I'd appreciate if you can throw some light.
    Program desc:
    READER opens in blocking mode (O_RDONLY = 0)
    WRITER opens in non-blocking mode (O_WRONLY | O_NONBLOCK = 1 + 128 = 129)
    During failure conditions open() returns -1 to writer (non-blocking call) but reader gets a valid file descriptor.
    Please find below the filtered dtrace output (sorted by timestamp - I have stripped off some trivial information)
    {color:#999999}timestamp walltimestamp pid tid exe probe func fifo flag/return-value errno
    ===========================================================
    Failure:
    1103747969678386 2009 Aug 12 06:22:56 20656 1182 reader open entry /data/fifo1 0 0
    1103747970243629 2009 Aug 12 06:22:56 6702 14 writer open entry /data/fifo1 129 0
    1103747970401069 2009 Aug 12 06:22:56 20656 1182 reader open return /data/fifo1 48 0
    1103747970413489 2009 Aug 12 06:22:56 6702 14 writer open return /data/fifo1 -1 6{color}
    {color:#999999}In a successful open, dtrace outs like below:
    1103747860071143 2009 Aug 12 06:22:56 20656 1235 reader open entry /data/fifo2 0 0
    1103747880222083 2009 Aug 12 06:22:56 6702 14 writer open entry /data/fifo2 129 0
    1103747880376943 2009 Aug 12 06:22:56 6702 14 writer open return /data/fifo2 23 0
    1103747880394596 2009 Aug 12 06:22:56 20656 1235 reader open return /data/fifo2 49 0{color}
    I saw that errno=6 is the expected error returned by a non-blocking fifo open when there's no reader on pipe.
    Our assumption is Synchronization by open(FIFO) by reader and writer should be taken care by the OS, which implies when writer gets a valid FD, the reader must also get a valid fd. On this assumption, our guess is there's an intermittent problem with open() implementation.
    I'd appreciate if someone can confirm above, or if our assumption is wrong, or any points on further debugging.
    Thanks,
    KR
    Other details:
    *uname -a</s
    <p>SunOS xxxx 5.10 Generic_125100-09 sun4v sparc SUNW,Sun-Fire-T200
    D script:*
    syscall::open:entry, syscall::creat:entry,
    syscall::open64:entry, syscall::creat64:entry,
    syscall::unlink:entry, syscall::rename:entry
    printf("%u %Y %5d %5d %5d %5d %5d %-12s %-10s %-10s %25s %d %s %d %d\n",
    timestamp,walltimestamp, pid, tid, execname, probefunc,probename, copyinstr(arg0), arg1, errno);
    self->file=arg0;
    syscall::open:return, syscall::creat:return,
    syscall::open64:return, syscall::creat64:return,
    syscall::unlink:return, syscall::rename:return
    printf("%u %Y %5d %5d %5d %5d %5d %-12s %-10s %-10s %25s %d %s %d\n",
    timestamp,walltimestamp, pid, tid, execname, probefunc,probename, stringof(copyinstr(self->file)),arg1,errno);
    self->file = 0;

    Hi all,
    Any thoughts on this would help.
    @ Moderator,
    Please let me know if this should be moved another forum.
    Thanks,
    KR

  • APDU VERIFY command with Towitoko reader

    Hi guys,
    In OpenCard Framework I cannot verify the PIN on a SLE4442 card from the Towitoko reader. I use a CardContact CTAPI4OCF
    driver that implements a CT-API Cttwkw32.dll Towitoko driver.
    I use the following Verify (APDU) command:
    int[] Command = {0x00, 0x20, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff};
    INS = 0x20 is a Verify command code
    0xff,0xff,0xff is a PIN number
    This command, modified to "byte" type array is used in the CT-API function CT_DATA:
    CT_Data((char) 0, (byte)0, (byte)2, 8, Command, (char) lr, rsp);
    I consistently get a response rsp from card: 6D 00. This suggests that the command is wrong.
    Before I call the Verify command I do the following:
    1. Reset CT (card terminal)
    2. Request ICC (card)
    3. Reset ICC
    4. Get Status
    5. Select MF
    6. Verify PIN
    All APDU commands with, with the exclusion of Verify, are successful. With the same setup
    I am also able to to read data, Read Binary command, from the card.
    I admit I do not see what I do wrong. Could you help me?
    Thank you,
    Marek

    It appears the INS isn't supported hense the 6d 00.
    Are you sure that PIN APDU command is supported on your file system card ?
    I don't believe the reader or the reader drivers are your issue. What would happen if you verify the PIN before you select the MF ?

  • BR243W Wrong creation date

    I am trying to restore backup taken yesterday.
    The restore command is : brrestore -b <logfileneme.aft> -m full
    It terminates with error
    BR243W Wrong creation date 2000-01-01 00.00.00 for volume PRDB01 in device /dev/rmt0.1
    BR218W Checking label on volume in device /dev/rmt0.1 failed
    the out put of brbackup -i show is
    BR351I Restoring /oracle/PRD/sapbackup/.tape.hdr0
    BR355I from /dev/rmt0.1 ...
    BR133I Label of volume in device /dev/rmt0.1:
    VOLUME = PRDB01 DATE = 20000101000000 DBID = PRD ACTID = bdxoajbv FUNCID = tib USED = 2
    BR280I Time stamp 2008-03-25 11.56.21
    The tape is new and was initialized yesterday.
    The files are that I have copied from the source system in the sapbackup folder are .aft backPRD.log *.tib files.
    Let me know how I can resolve this
    OS: AIX5.3
    SAP: 4.7
    Kernel : 640 version 196

    BR243W Wrong creation date 2000-01-01 00.00.00 for volume PRDB01 in device /dev/rmt0.1
    BR218W Checking label on volume in device /dev/rmt0.1 failed
    Seems issue related to device/tape
    Initilaize tape by using below command and paste the result.
    brbackup i- force -v scratch
    Regards,
    Nick Loy

  • Wrong license data specified   - MBS 4.6D

    Hello,
    i'm trying to extend my MiniSAP (MBS 4.6D) license for the next period, I enter exactly the data mailed to me, however, receive the following error message:
    saplicense: License not installed
    Wrong license data specified
    Check the specified license data for:
    - typing errors
    - upper / lower characters
    - same values as noted on license fax
    The same result when I enter the given data via a file...
    Before i tried to extend the key with saplicense -install - i execute the DBENV command.
    Does someone have an idea?
    Thanks in advance & best regards,
    Frank

    Hi SDN Team,
    My problem is the same that reported by Frank. Since last week I was demmand in four times a renewall license key for MiniSAP (MBS 4.6D).
    After I'm trying to install license key by transaction SLICENSE and with command saplicense -install but doesnt' accept new license key.
    I'm looking in this forum some people with the same problem. Can we help us to resolve problem?
    Best Resgards,
    DLS

  • I am totally frustrated by the fact that now i have gone to iCloud and after a few synchs, my contacts are all mixed up with the wrong information.  For instance, my email and phone number comes up under someone else's name (a thousand contacts)

    I am totally frustrated by the fact that now i have gone to iCloud and after a few synchs, my contacts are all mixed up with the wrong information.  For instance, my email and phone number comes up under someone else's name (a thousand contacts).  I dont know how to repair this.  what a nightmare

    An icloud account is designed to be used by just one user.  If you have given your ID or set up your account on someone else's device, then their data will be mingled with your or worse.

  • Error: Could not continue scan with nolock due to data movement, DBCC proccache will clear the probelm

    SQL Server: 2008 R2 SP2
    Before describing my problem, I have gone via the forum, there is no view or functions inside my stored procedure
    When running a particular stored procedure inside crystal report, the error " Could not continue scan with nolock due to data movement" comes once every few weeks. After I clear the query cache plan, it works again for few weeks and the problem
    comes again. During these few weeks, there is no restart or query plan clearing.
    If I run the stored procedure inside SSMS, where the SQL statement is copied and pasted from SQL profiler during crystal report run, there is no error.
    I discovered running in SSMS and crystal report generate 2 different query plans even I copied the SQL from SQL profiler, I have actually saved the query plans. Unfortunately, this forum does not accept attachments, or otherwise I will post my query plans
    here.
    There is one thing I notice about the query plan is during nested loop operation, there is a warning "no join predicate". I don't use any views or UDF in the statement, nor did I use pre-1992 ANSI join syntax. However, I did use table variables.
    My guess is whether this will cause " Could not continue scan with nolock due to data movement", after I clear the cache, I run crystal report again, and I look at the plan again, the "nested loop no join predicate" warning is gone.
    Running this stored procedure took 1 second maximum, even when this error is popping up, it pop up within 1 second.
    DBCC checkdb has been run
    The same stored procedure running by crystal report in a SQL 2008 (non r2) live environment has no problems, so I am thinking this is R2 specific problems.
    The "nested loop no join predicate" error SQL statment is below, no views, no udf, but table variables
    INSERT @ChequeAccount
    SELECT        PS.PaySummaryID, PS.EmployeeID, PS.CostCentreID,
                (PS.GrossPay    + PS.LumpSumA + PS.LumpSumB    + PS.LumpSumD+ PS.LumpSumE+ PS.ETP+ PS.PaymentsAfterTax    - PS.DeductionsAfterTax  
     - PS.Tax- PS.ETPTax    + PS.TaxRebate) * -1 AS Amount,
                CGLM.GLAccountID
    FROM Pay_Summary PS JOIN Input_Sheet ISH ON PS.InputSheetID = ISH.InputSheetID  AND  ISH.PayrollID = @binPayrollID   
    AND PS.PaySummaryID NOT IN (SELECT PaySummaryID FROM @ChequeAccount)
    JOIN Payroll P ON P.PayrollID = ISH.PayrollID AND P.EmployerID = @binEmployerID
    JOIN CustomGLFixMapping CGLM ON CGLM.EmployerID = P.EmployerID AND CustomGLFixMappingNameID = 1 AND CGLM.CostCentreID IS NULL

    The error Could not continue scan with nolock due to data movement can occur when you use the NOLOCK table hint, or use the command SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED. That is, so-called dirty reads. The error is not related to the
    query plan per se, but when scanning a table, the storage engine will use an IAM scan rather than following the clustered index. If there is simultaneous activity, the storage engine may detect this and abort the operation to avoid returning incorrect data.
    Or it may not detect it, and return uncommitted data or fail to return committed data.
    All of these effects are transitory and they will not show up when you are alone on the system, only when there is concurrent activity in one or more of the tables in the query.
    Using dirty reads is a risky business for the reasons explained above, and it takes careful analysis to understand whether you can live with the errors you can get from a particular query. The error about data movement can be handled: trap the error and
    resubmit the query. But what about spurious incorrect results?
    If you believe locking to be a problem, you should consider setting the database to READ_COMMITTED_SNAPSHOT
    and take out all use of READ UNCOMMITTED/NOLOCK. When the database is in READ_COMMITTED_SNAPSHOT, readers read from the snapshot and only see committed data without blocking writers. This has some other effects like requiring a bigger tempdb,
    and there is a risk for other types of concurrency errors, but they tend to be smaller risks.
    I discovered running in SSMS and crystal report generate 2 different query plans even I copied the SQL from SQL profiler,
    This is because SSMS by default runs with SET ARITHABORT ON. I discuss this in more detail in this article on my web site:
    http://www.sommarskog.se/query-plan-mysteries.html
    However, as I said, this problem is not related to the query plan as such, although some query plans are more susceptible to this error than others. (All plans are suscpeitble to produce incorrect results).
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Issue with Enterprise Library's Data Access Application

    I do not know if I have the correct forum for this post. I hve put it in what I believe is the most likely best forum, but please move this if there is a more germane forum for it.
    I have inherited a solution (C#) which uses the reference Microsoft.Practices.EnterpriseLibrary.Data. The reference was included with the codebase I inherited, there are no missing references.
    When the library is called with:
    Microsoft.Practices.EnterpriseLibrary.Data.ExecuteDataSet("configConfigurationKeysSelect", parameterValues);
    It complains with the runtime error:
    [InvalidOperationException: The stored procedure 'configConfigurationKeysSelect' doesn't exist.] (I have put the full trace below)
    This is true, there IS no stored procedure  'configConfigurationKeysSelect'  but there is a table named  'configConfigurationKeys.'  
    I assumed this stored procedure is built on the fly to select from that table? Must I do something regarding  Enterprise Library's Data Access Application so that this works on the system I am running it on? (I am simply accessing the references
    included with the sourced for this, nothing else). I am looking for some guidance here, and thanks in advance.
    Stack trace on error as:
    [InvalidOperationException: The stored procedure 'configConfigurationKeysSelect' doesn't exist.]    System.Data.SqlClient.SqlCommand.DeriveParameters() +5344249
       System.Data.SqlClient.SqlCommandBuilder.DeriveParameters(SqlCommand command) +115
       Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.DeriveParameters(DbCommand discoveryCommand) +72
       Microsoft.Practices.EnterpriseLibrary.Data.Database.DiscoverParameters(DbCommand command) +251
       Microsoft.Practices.EnterpriseLibrary.Data.ParameterCache.SetParameters(DbCommand command, Database database) +225
       Microsoft.Practices.EnterpriseLibrary.Data.Database.AssignParameters(DbCommand command, Object[] parameterValues) +53
       Microsoft.Practices.EnterpriseLibrary.Data.Database.GetStoredProcCommand(String storedProcedureName, Object[] parameterValues) +161
       Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteDataSet(String storedProcedureName, Object[] parameterValues) +70
    Enterprise Library's Data Access Application 

    This is true, there IS no stored procedure  'configConfigurationKeysSelect'  but there is a table named  'configConfigurationKeys.'  
    I assumed this stored procedure is built on the fly to select from that table? Must I do something regarding  Enterprise Library's Data Access Application so that this works on the system I am running it on? (I am simply accessing the references
    included with the sourced for this, nothing else). I am looking for some guidance here, and thanks in advance.
    Why do you assume that a stored procedure is create on the fly?  Looking at the documentation for this component, I don't see a mention of such.
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • Issue with Oracle LONG RAW data type

    Hi All,
    I am facing some issues with Oracle LONG RAW DATA Type.
    We are using Oracle 9IR2 Database.
    I got a table having LONG RAW column and I need to transfer the same into another table having LONG RAW column.
    When I tried using INSERT INTO SELECT * command (or) CREATE TABLE as select * , it is throwing ORA-00997: illegal use of LONG datatype.
    I have gone through some docs and found we should not use LONG RAW using these operations.
    So I did some basic PLSQL block given below and I was able to insert most of the records. But records where the LONG RAW file is like 7O kb, the inserting is faliling.
    I tried to convert LONG RAW to BLOB and again for the record where the LONG RAW is big in size I am getting (ORA-06502: PL/SQL: numeric or value error) error.
    Appreciate if anyone can help me out here.
    DECLARE
    Y LONG RAW;
    BEGIN
    FOR REC IN (SELECT * FROM TRU_INT.TERRITORY WHERE TERRITORYSEQ=488480 ORDER BY TERRITORYSEQ ) LOOP
    INSERT INTO TRU_CMP.TERRITORY
    BUSINESSUNITSEQ, COMPELEMENTLIFETIMEID, COMPONENTIMAGE, DESCRIPTION, ENDPERIOD, GENERATION, NAME, STARTPERIOD, TERRITORYSEQ
    VALUES
    REC.BUSINESSUNITSEQ, REC.COMPELEMENTLIFETIMEID, REC.COMPONENTIMAGE, REC.DESCRIPTION, REC.ENDPERIOD, REC.GENERATION, REC.NAME,
    REC.STARTPERIOD, REC.TERRITORYSEQ
    END LOOP;
    END;
    /

    Maddy wrote:
    Hi All,
    I am facing some issues with Oracle LONG RAW DATA Type.
    We are using Oracle 9IR2 Database.
    I got a table having LONG RAW column and I need to transfer the same into another table having LONG RAW column.
    When I tried using INSERT INTO SELECT * command (or) CREATE TABLE as select * , it is throwing ORA-00997: illegal use of LONG datatype.
    I have gone through some docs and found we should not use LONG RAW using these operations.
    So I did some basic PLSQL block given below and I was able to insert most of the records. But records where the LONG RAW file is like 7O kb, the inserting is faliling.
    I tried to convert LONG RAW to BLOB and again for the record where the LONG RAW is big in size I am getting (ORA-06502: PL/SQL: numeric or value error) error.
    Appreciate if anyone can help me out here.
    DECLARE
    Y LONG RAW;
    BEGIN
    FOR REC IN (SELECT * FROM TRU_INT.TERRITORY WHERE TERRITORYSEQ=488480 ORDER BY TERRITORYSEQ ) LOOP
    INSERT INTO TRU_CMP.TERRITORY
    BUSINESSUNITSEQ, COMPELEMENTLIFETIMEID, COMPONENTIMAGE, DESCRIPTION, ENDPERIOD, GENERATION, NAME, STARTPERIOD, TERRITORYSEQ
    VALUES
    REC.BUSINESSUNITSEQ, REC.COMPELEMENTLIFETIMEID, REC.COMPONENTIMAGE, REC.DESCRIPTION, REC.ENDPERIOD, REC.GENERATION, REC.NAME,
    REC.STARTPERIOD, REC.TERRITORYSEQ
    END LOOP;
    END;
    /below might work
    12:06:23 SQL> help copy
    COPY
    Copies data from a query to a table in the same or another
    database. COPY supports CHAR, DATE, LONG, NUMBER and VARCHAR2.
    COPY {FROM database | TO database | FROM database TO database}
                {APPEND|CREATE|INSERT|REPLACE} destination_table
                [(column, column, column, ...)] USING query
    where database has the following syntax:
         username[/password]@connect_identifier

Maybe you are looking for