Sql srver datetime to oracle by sql developer

Using the tool Sql Developer 3.1.07, try to migration an sql server 2008 database to oracle 11gR2. The tool failed at a few places. One point:
sql server table:
create table Table1 (
[modificationDatetime] [datetime] NOT NULL,
The tool generated Oracle script for the same table:
create table Table1 (
modificationDatetime DATE DEFAULT SYS_EXTRACT_UTC NOT NULL,
The script actually does not work in oracle with the error:
SQL Error: ORA-00984: column not allowed here
00984. 00000 - "column not allowed here"
Simplely replacing 'SYS_EXTRACT_UTC' with 'sysdate' works.
Wondering if this is a bug of the tool.
Thanks,
Fan
Edited by: FanZeng on Feb 23, 2012 11:42 AM

The SQL Server table I used to reprot the issue at our SQl Dev team is:
drop table DateTimeMig;
create table DateTimeMig ([modificationDatetime] [datetime] NOT NULL default getutcdate());
And I reproduced with 3.1 the migration code issue:
-- DROP TABLE DateTimeMig CASCADE CONSTRAINTS;
PROMPT Creating Table DateTimeMig ...
CREATE TABLE DateTimeMig (
modificationDatetime DATE DEFAULT SYS_EXTRACT_UTC NOT NULL
Issue is investigated by migration developer team.
Edited by: kgronau on Feb 29, 2012 11:40 AM

Similar Messages

  • Convert SQL SERVER DATETIME into ORACLE TIMESTAMP

    I have to convert a column's datatype.
    The source column's datatype is DATETIME which is in SQL Server to TIMESTAMP(datatype in target which is oracle)
    Can anyone help me please

    Just issue ALTER TABLE MODIFY:
    SQL> create table tbl(c date)
      2  /
    Table created.
    SQL> insert into tbl values(sysdate)
      2  /
    1 row created.
    SQL> select to_char(c,'mm/dd/yyyy hh24:mi:ss') from tbl
      2  /
    TO_CHAR(C,'MM/DD/YY
    12/26/2009 20:50:58
    SQL> alter table tbl modify c timestamp
      2  /
    Table altered.
    SQL> select c from tbl
      2  /
    C
    26-DEC-09 08.50.58.000000 PM
    SQL> SY.

  • ORA-01841 Converting SQL Server DateTime to Oracle Date

    I have Oracle 11gR2 x64 running on my Win7 Enterprise x64 personal system. I'm trying to convert the TSQL to create a database in SQL Server 2008 Express for my C# class to Oracle, and I've run into a "interesting" problem loading date data.
    The SQL Server 2008 TSQL InvoiceDate column in the Invoices table has datatype DATETIME:
    *[InvoiceDate] [datetime] NOT NULL,*
    which Oracle does not support. The Oracle InvoiceDate column in the MMAB_Invoices table has datatype DATE:
    InvoiceDate DATE NOT NULL,
    The fun begins with the TSQL INSERT statements (for example):
    INSERT [dbo].[Invoices] ([InvoiceID], [CustomerID], [InvoiceDate], [ProductTotal], [SalesTax], [Shipping], [InvoiceTotal]) VALUES (18, 20, CAST(0x00009CFD00000000 AS DateTime), 151.0000, 11.3300, 6.2500, 168.5800)
    As you can see, whoever wrote the load script thought it would be totally awesome to convert hex (binary?) data to generate a date, instead of using data readable by a human being.
    BTW, the date generated is 2010-01-13 00:00:00.000.
    After Reading The Fabulous Manual and searching the OTN Discussion Fora, what I came up with is
    INSERT INTO MMAB_Invoices (CustomerID, InvoiceDate, ProductTotal, SalesTax, Shipping, InvoiceTotal) VALUES (20, TO_DATE(UTL_RAW.CAST_TO_VARCHAR2(HEXTORAW('00009CFD00000000')), 'YYYY-MM-DD HH:MI:SS'), 151.0000, 11.3300, 6.2500, 168.5800);
    which returned
    Error starting at line 846 in command:
    INSERT INTO MMAB_Invoices (CustomerID, InvoiceDate, ProductTotal, SalesTax, Shipping, InvoiceTotal) VALUES (20, TO_DATE(UTL_RAW.CAST_TO_VARCHAR2(HEXTORAW('00009CFD00000000')), 'YYYY-MM-DD HH:MI:SS'), 151.0000, 11.3300, 6.2500, 168.5800)
    Error report:
    SQL Error: ORA-01841: (full) year must be between -4713 and +9999, and not be 0
    *01841. 00000 - "(full) year must be between -4713 and +9999, and not be 0"*
    **Cause: Illegal year entered*
    **Action: Input year in the specified range*
    The PK InvoiceID is automatically generated by a BEFORE INSERT trigger that uses a sequence.
    Suggestions?
    Thanks.
    P.S. Happy New Year!!!

    Your hex conversion is certainly not returning a date format:
    sql> select UTL_RAW.CAST_TO_VARCHAR2(HEXTORAW('00009CFD00000000')) from dual;
    UTL_RAW.CAST_TO_VARCHAR2(HEXTORAW('00009CFD00000000'))
      ┐²To convert the hex number to decimal, simply use to_number:
    sql> select to_number('00009CFD00000000', 'xxxxxxxxxxxxxxxx') from dual;
    TO_NUMBER('00009CFD00000000','XXXXXXXXXXXXXXXX')
                                          1.7261E+14Now, before you can make any further calculations with that number, you need to know how it represents the date of 2010-01-13. Luckily, we've got Google nowadays. ;-)
    Sql server representation seems to be an 8 byte field. The first 4 bytes stores the number of days since SQL Server's epoch (1st Jan 1900). The second 4 bytes stores the number of milliseconds after midnight.
    sql> select to_number('00009CFD', 'xxxxxxxxxxxxxxxx') from dual;
    TO_NUMBER('00009CFD','XXXXXXXXXXXXXXXX')
                                       40189
    sql> select to_date('1900-01-01','yyyy-mm-dd') + 40189 from dual;
    TO_DATE('
    13-JAN-10So, the conversion would be something like this:
    sql> select to_date('1900-01-01','yyyy-mm-dd') + to_number(substr('00009CFD00000000',1,8), 'xxxxxxxx') + to_number(substr('00009CFD00000000',9,8), 'xxxxxxxx') / (24*60*60*1000) from dual;
    TO_DATE('
    13-JAN-10Note: Oracle DATE format specifies a datetime up to the second, whereas the sqlserver DATETIME format specifies a datetime up to the millisecond; if that precision is needed, use Oracle's TIMESTAMP instead.
    Note: using an internal representation is risky, implementation details may change. In this case, it seems pretty unlikely that Microsoft will ever change the datetime internal representation, since that would break lots and lots of code.
    Edited by: theoa on 2-jan-2012 9:14

  • Convert this sql server query to Oracle?

    I've some SQL Server queries that I need to make a copy for to run against Oracle databases. (10G), any help would be appreciated.
    SELECT COUNT(*) COUNT, CONVERT(DATETIME, CONVERT(VARCHAR(8), M.START_DATE, 1)) [DATE]
         FROM OPTC.ORD_M_ORDER M
         INNER JOIN OGEN.GEN_M_PATIENT_MAST P ON M.PAT_NUMBER = P.PAT_NUMBER
         INNER JOIN OPTC.ORD_C_ORDER_TYPE C ON C.ORDER_TYPE_KEY = M.ORDER_TYPE_KEY
         WHERE OGEN.DATEONLY(END_DATE)- OGEN.DATEONLY(START_DATE) < '1900/03/01'
         --AND OGEN.DATEONLY(CREATED_ON) = OGEN.DATEONLY(CURRENT_TIMESTAMP)
         AND ORDER_STATUS IN (4,7,8)
         AND M.FACILITY_KEY IN (SELECT VALUE FROM OGEN.COMMA_TO_TABLE(@FACILITYKEY))
         AND [START_DATE] BETWEEN @STARTDATE AND @ENDDATE
         AND CAST(M.ORDER_FLAGS AS BIGINT) & 64 <> 64 AND P.DISCHARGE_DATE IS NULL
         GROUP BY CONVERT(DATETIME, CONVERT(VARCHAR(8), [START_DATE], 1))

    Hi,
    You could use the 'Translation Scratch Editor' in SQL*Developer to translate SQL*Server statements to Oracle.
    SQL*Developer is free and can be downloaded from here -
    http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html
    Once installed start it up, then go to 'Tools' - 'Migration' - 'Translation Scratch Editor'
    I did run the statement you have posted here through it but it gave errors so looks like there may be a problem with the syntx in any case.
    Does this query run as it is in SQL*Server ?
    Regards,
    Mike
    Edited by: mkirtley on Jan 5, 2012 12:45 PM

  • Migrating data from oracle to sql server

    I have two databases(Oracle and Sql Server) in my company.
    I want to migrate some data on daily basis from Oracle to Sql Server.
    what are the best methodologies used to perform this task?
    Can we schedule this task on daily basis?
    please help me guys

    Salma,
    First and foremost, you need to understand that there are architectural difference between Oracle and SQL Server (with the major one being the difference between Oracle's PL/SQL and Microsoft's Transact-SQL) thus, it will not be an easy task to migrate data from Oracle Database to SQL Server. As far as the use of tools is concerned, you can utilize the following tools (third party tools not recommended) to achieve this:
    Microsoft SQL Server Migration Assistant (Oracle to SQL)
    http://www.microsoft.com/sqlserver/2005/en/us/migration-oracle.aspx
    Oracle SQL Developer Migration Workbench (SQL to Oracle)
    http://www.oracle.com/technology/tech/migration//workbench/index_sqldev_omwb.html
    But before proceeding with anything, I would recommend you to read through the following post as it lists down the primary compatibility resources and migration guidelines:
    Migrating from Oracle to SQL Server
    http://vyaskn.tripod.com/oracle_sql_server_differences_equivalents.htm
    Hope this helps.
    Regards,
    Naveed.

  • Oracle PL/SQL Developer Certified Associate

    I am planning to take the exam for "Oracle PL/SQL Developer Certified Associate".
    There are 2 exams under this certification. The first exam can be taken from any of these 4- 1Z0-007 or 1Z0-007 or 1Z0-047 or 1Z0-051. The second exam is 1Z0-147. But does any of these 2 exams need a mandatory online/inclass course offered from Oracle?
    I appreciate if anyone who has taken this exam could help me and explain this.
    Thanks in advance.

    Hi,
    Welcome to the OTN
    please, post your thread here
    Oracle Certification Program
    Regards,
    Christian Balz

  • Oracle Database 11g Administrator or Oracle PL/SQL and Forms Developer?

    Hi,
    I am thinking about doing an Oracle certification course- Oracle Database 11g Administrator or Oracle PL/SQL and Forms Developer.
    Oracle Database 11g OCP and OCM certification requires 3 mandatory training courses to be completed that costs between $1900 and $3250/each. Oracle PL/SQL certication doesn't require any mandatory training course.
    Which one of these would be a good choice? Please advise.
    Thank you,
    Tracy

    Regardless of which path you want to take, in order to get the OCP certification in either the DBA or PL/SQL developer track, you must first obtain the respective OCA certification for that track. I'm assuming that since you are still undecided in which path to take that you haven't started working on either yet. If you look at the pages for the OCA DBA and OCA PL/SQL Developer certs and what is required for each, you'll see that the first block of tests for either certification (the SQL based exams) has the same options (1Z0-007, 1Z0-047, 1Z0-051) and passing one of those SQL based exams gives credit towards obtaining both OCA certifications. That might be a good place to start.
    Doing one of these tests first might give you some extra time to decide which track you want to pursue. But as Justin said, it really depends on what you do (or plan on doing) in your career as to which path might be more beneficial for you.
    As for the OCM level stuff, I wouldn't even think about it until you get the OCP. One step at a time... Same with OCP before OCA. That being said, my suggestions are just that, suggestions. You're free to take any exams/courses in any order, but you won't be able to obtain the certs until you have completed the requirements for each.

  • Query Regarding the Oracle PL/SQL Developer OCA

    Hi All
    I am planning to go for the certification "Oracle PL/SQL Developer OCA "
    But I am not sure what is value of this certification in market.
    Please help me out.
    Thanks in advance
    Amit

    My view is this: The more you can put on your resume, usually the better. By itself, its not worth anything. Combined with several years of experience, it could make a difference. If you go for a job and have 5 years of experience and a certification, and the other candidate just has 5 years, as long as you both interview well, I'd say you have a slightly better shot because you have that extra thing on your resume.
    You need to look at it in that respect - but its not a magic key to get you any job. Of course different countries may be different in how they view certiciations.

  • Migration Error from Access to Oracle through SQL Developer.

    Hi,
    Actually I am trying to migrate data from MS Access 2002 to Oracle 9i database through the SQL Developer. But Whenever I go to Capture Database from Access it will show me an error.... Invalid procedure Call and then it shows an error message... >>>>>>
    ShowSplashScreen("_OracleSplashScreen",3)
    after that i wont be able to do this task anymore..... So please help me get out of it... How Cam I Maigrate data from Access to Oracle 9i...
    Is any other tool i use or you can help me for this tool to migrate date...
    Please tell me..
    If yu can send me a mail then mail me on [email protected]
    regards,
    Vishal

    Hi Vishal,
    I have responded to your related thread on the Migration Workbench forum - Migration Error from Access to Oracle through SQL Developer.
    Regards,
    Hilary

  • Developing database views between Oracle and SQL Server tables

    I am on Oracle 10.2, my organization has many SQL Server databases as well and has now made
    SQL server as company standard so many new databases will be developed in SQL Server. It is of course
    not possible to convert all Oracle databases to SQL Server, so a mix environment will exist. Two questions:
    1.     Is it possible to develop database views in Oracle (10g in my case) which join Oracle tables with tables in SQL Server 2008? If yes, how. I have seen some heterogeneous connectivity setup to connect SQL Server to Oracle, but not sure whether it is possible to develop a database view across two databases.
    2.     I know it is not a SQL Server forum, but many DBA’s know both Oracle and SQL Server. Is it possible to develop views in SQL Server (SQL Server 2008 R2 in my case) which join Oracle 10g and SQL Server 2008 tables? I know in SQL Server, there is way to set up linked servers, but do not know whether it is possible to develop views.
    Thanks a lot for your insight.

    You can create views that join local Oracle tables and remote SQL Server tables. I'm pretty sure you can do the reverse as well but I haven't personally done it.
    However, I would be very concerned about the performance you'd get if you created that sort of view. You'd very frequently end up in a situation where Oracle has to pull all the data in the remote table across the database link in order to apply predicates and join the data locally. That could be disastrous from a performance standpoint.
    Justin

  • How to buy vouchers for Oracle PL/SQL Developer Certified Associate ?

    I want to become Oracle PL/SQL Developer Certified Associate.
    For this, I want to write 1Z0-007 (Introduction to Oracle9i SQL) and
    1Z0-147 (Program with PL/SQL) tests.
    I went through so many posts in the forum, but I didn't get the required answers.
    Kindly reply my queries:
    1) Will clearing the above two tests will make me Oracle PL/SQL Developer Certified Associate?
    2) Should I purchase two separate vouchers for those two tests?
    3) Should I give both the tests one by one at the same time or can I give them on different days?
    Please answer my questions. Or atleast guide me where can I get the answers?

    Ravindra wrote:
    I want to become Oracle PL/SQL Developer Certified Associate.
    For this, I want to write 1Z0-007 (Introduction to Oracle9i SQL) and
    1Z0-147 (Program with PL/SQL) tests.
    I went through so many posts in the forum, but I didn't get the required answers.
    Kindly reply my queries:
    1) Will clearing the above two tests will make me Oracle PL/SQL Developer Certified Associate?These exams fulfill the requirements of the certification which should be awarded if you pass the exam. Even if you pass the exams you are not certified until you received confirmation from Oracle via a success kit or Certview that you are certified
    2) Should I purchase two separate vouchers for those two tests?In my opinion there is usually little advantage in buying vouchers; but you may have different situation with your particular situation. Vouchers also may go wrong on people from time to time. Probably the excpetion for vouchers being good is when discounted vouchers are offered as part of training.
    See: http://www.pearsonvue.com/oracle
    3) Should I give both the tests one by one at the same time or can I give them on different days?Best practice for ordinary mortals is probably to take exams on different days. However as you are choosing 1z0-007 and 1z0-147 and not the more modern choices of 1z0-051 and 1z0-144 I shall leave that to yourself
    >
    Please answer my questions. Or atleast guide me where can I get the answers?1) http://www.oracle.com/education/certification
    2) Read the forum annnouncement sticky posts and links

  • Same SQLs different in two versions of Oracle 12c RDF Developer's Guide

    There are two versions of Oracle 12c RDF Developer's Guide, one has the SQL insert as
    INSERT INTO articles_rdf_data VALUES (2,
    SDO_RDF_TRIPLE_S ('articles','http://nature.example.com/Article1',
    'http://purl.org/dc/elements/1.1/creator',
    'Jane Smith'));
    the other one has the change highlighted:
    INSERT INTO articles_rdf_data VALUES (2,
    SDO_RDF_TRIPLE_S ('articles','<http://nature.example.com/Article1>',
    '<http://purl.org/dc/elements/1.1/creator>',
    '"Jane Smith"'));
    Which one is correct?
    Thanks.

    The second one is correct. It is from the latest version of the user guide.
    http://docs.oracle.com/cd/E16655_01/appdev.121/e17895/toc.htm
    Thanks,
    Matt

  • Migrating SQL Server DB to Oracle DB - probably EASY answer

    I completed the tutorial on migrating SQL Server DB to Oracle. When I try on my own database, it all migrated well except anything containing a datetime. When I run the oracle_ctl.bat file and view any of the log files, I see Record 1: Rejected - Error on table DBO_RIVERSIDEDB_NCWCD_TEST.TS6HOUR_TAIN, column DATE_TIME.
    ORA-01843: not a valid month. Do I need to change the first line of the file set NLS_DATE_FORMAT=Mon dd YYYY HH:mi:ssAM ? In the .dat file created from the unload_script.bat, the data starts out 1275<EOFD>2007-05-11 00:00:00.000<EOFD>74.900000000000006<EOFD><EOFD><EORD>1275<EOFD>. So my questions is about the date_format - is that the same for all SQL Server databases or do I need to enter something based on MY database? I am definitely a newbie so this is probably a super easy question. Thanks so much for any help!

    Hello,
    There are two different date format in SQL Server.
    1] DateTime : 2010-08-03 12:48:15.170
    2] SmallDateTime: 2010-08-03 12:48:00     
    Both the date will be inserted in Oracle Date column.
    Is there any automated way to generate datamove script to tackle these differences? I've around 200 tables to be migrated and there may be many such cases.
    The issue with Oracle SQL Developer setting i.e. Tools >Preferences> (Under) Migration> Data Move Option, there are two masks we can specify, one for Date Mask and other for Timestamp. How can I set both of these for converting data into Date, not in timestamp.
    Below is my .CTL file, none of below fields are timestamp, but since incoming data in in timestamp format, it is applying timestamp mask and eventually failing to insert data into table
    load data
    infile '[PARTSORDER].dat'
    "str '<EORD>'"
    into table admin.PARTSORDER
    fields terminated by '<EOFD>'
    trailing nullcols
    ORDERID ,
    GenDate "TO_TIMESTAMP(:GenDate, 'YYYY-MM-DD.HH24.MI.SS.ff3')",
    Status "DECODE(:Status, CHR(00), ' ', :Status)",
    StatusBy ,
    StatusDate "TO_TIMESTAMP(:StatusDate, 'YYYY-MM-DD.HH24.MI.SS.ff3')",
    Approved ,
    ApprovedBy ,
    ApprovedDate "TO_TIMESTAMP(:ApprovedDate, 'YYYY-MM-DD.HH24.MI.SS.ff3')",
    TrackingNumber "DECODE(:TrackingNumber, CHR(00), ' ', :TrackingNumber)",
    SVOther "DECODE(:SVOther, CHR(00), ' ', :SVOther)",
    ShippedVia "DECODE(:ShippedVia, CHR(00), ' ', :ShippedVia)",
    ShippedBy "DECODE(:ShippedBy, CHR(00), ' ', :ShippedBy)",
    ShippedDate "TO_TIMESTAMP(:ShippedDate, 'YYYY-MM-DD.HH24.MI.SS.ff3')",
    CompletedBy "DECODE(:CompletedBy, CHR(00), ' ', :CompletedBy)",
    CompletedDate "TO_TIMESTAMP(:CompletedDate, 'YYYY-MM-DD.HH24.MI.SS.ff3')",
    ORDERType "DECODE(:ORDERType, CHR(00), ' ', :ORDERType)",
    RMAID ,
    RMANumber "DECODE(:RMANumber, CHR(00), ' ', :RMANumber)",
    BackOrdered ,
    XORDERID ,
    PARTSORDERSENT "DECODE(:PARTSORDERSENT, CHR(00), ' ', :PARTSORDERSENT)",
    SHIPMENTID "DECODE(:SHIPMENTID, CHR(00), ' ', :SHIPMENTID)"
    Any help in this regard will be highly appreciated!
    Thanks
    Vinod

  • How to UpLoad the Diffent type of files Through Oracle Pl/Sql...?

    Hi TOM,
    I want one reusable component to be developed, My requirement is as follows...
    We get .CSV,.XML,.DOC.PDF files on the N/w drive. One Batch Job will be running every night and this job should upload all the files present in that N/w drive to the database (Each File should be stored in one row with unique ID) and after loading of each file is done , move the uploaded file to the backup directory.
    Note : Average file size is 10-15 MB.
    Loading of files in database should be done only using Oracle procedure/function.
    Already return this process in Pro*C. But I don't know How to write in Oravle Pl/Sl...?
    Functionality of this FUNCTION(In Pro*C):
    ===================================
    *****set_item_blob
    *****Input:     
    *****======
    *****1. Path of the file in Windows folder which contains the part number's content
    *****2. Item number in the T_ITEM table
    *****3. Revision level in the T_ITEM table
    *****Processing:
    *****===========
    *****1. Get the BLOB pointer for the ITM_BLOB column,
    ***** for the corresponding item number and revision level
    *****2. Update the ITM_BLOB column with the content of the input file
    ***** ( using the EXEC SQL LOB WRITE function )
    *****Output:
    *****=======
    *****1. ITM_BLOB column updated with the content of input file
    int set_item_blob (char chr_item_number,int revision_level,char file_path)
         exec sql begin declare section;
              OCIBlobLocator     *blob_locator;
              varchar               vc_item_number[12];
              long               file_length=0;
              varchar               alert_message [500+1];
              int                    plsql_err_code = 0;
         exec sql end declare section;
         FILE     *fp_input_file;
         char     *blob_buffer;
         EXEC SQL VAR blob_buffer IS RAW(BUFFER_LENGTH);
         EXEC SQL ALLOCATE :blob_locator;
         memset ( vc_item_number.arr, '\0', 12 );
         strcpy ( vc_item_number.arr, chr_item_number );
         vc_item_number.len = strlen ( vc_item_number.arr );
         fp_input_file = fopen( file_path, "rb" );
         if( fp_input_file == NULL)
              sprintf ( alert_message.arr, "ngetupld BLOB upload failed for item_number = [%s], rev_level = [%d]. Failure in opening the file to be uploaded [%s]", chr_item_number, revision_level , file_path );
              alert_message.len = strlen ( alert_message.arr );
              EXEC SQL EXECUTE
              BEGIN
                   P_INSERT_INTO_INFO_MESSAGES('AL',:alert_message,'BLB',NULL,NULL,:plsql_err_code);
              END;
              END-EXEC;
              exec sql commit;
              return 1;
         else
              (void) fseek(fp_input_file, 0L, SEEK_END) ;
              file_length = (unsigned int)ftell(fp_input_file) ;     
              (void) fseek(fp_input_file, 0L, SEEK_SET) ;
              if ( file_length > BUFFER_LENGTH )
                   sprintf ( alert_message.arr, "ngetupld BLOB upload failed for item_number = [%s], rev_level = [%d]. Length of the file to be uploaded(%ld) is more than the supported length(%ld)", chr_item_number, revision_level , file_length, BUFFER_LENGTH );
                   alert_message.len = strlen ( alert_message.arr );
                   EXEC SQL EXECUTE
                   BEGIN
                        P_INSERT_INTO_INFO_MESSAGES('AL',:alert_message,'BLB',NULL,NULL,:plsql_err_code);
                   END;
                   END-EXEC;
                   exec sql commit;
                   return 1;
              EXEC SQL
                   UPDATE          T_ITEM
                   SET               ITM_BLOB = EMPTY_BLOB()
                   WHERE          ITM_NUMBER = :vc_item_number
                   AND               ITM_REVISION_LEVEL = :revision_level
                   RETURNING     ITM_BLOB INTO :blob_locator;
              if ( sqlca.sqlcode != 0 )
                   sprintf ( alert_message.arr, "ngetupld BLOB upload failed for item_number = [%s], rev_level = [%d]. SQL error %d occured while trying to get the BLOB locator", chr_item_number, revision_level , sqlca.sqlcode );
                   alert_message.len = strlen ( alert_message.arr );
                   EXEC SQL EXECUTE
                   BEGIN
                        P_INSERT_INTO_INFO_MESSAGES('AL',:alert_message,'BLB',NULL,NULL,:plsql_err_code);
                   END;
                   END-EXEC;
                   exec sql commit;
                   return 1;
              blob_buffer=(char *)malloc(BUFFER_LENGTH); // Dynamic Memory Allocation for Itm_Blob
              fread((void *)blob_buffer, (size_t)BUFFER_LENGTH, (size_t)1, fp_input_file);
              EXEC SQL LOB WRITE ONE :file_length FROM :blob_buffer INTO :blob_locator;
              if ( sqlca.sqlcode != 0 )
                   sprintf ( alert_message.arr, "ngetupld BLOB upload failed for item_number = [%s], rev_level = [%d]. SQL error %d occured while trying to update the BLOB content", chr_item_number, revision_level , sqlca.sqlcode );
                   alert_message.len = strlen ( alert_message.arr );
                   EXEC SQL EXECUTE
                   BEGIN
                        P_INSERT_INTO_INFO_MESSAGES('AL',:alert_message,'BLB',NULL,NULL,:plsql_err_code);
                   END;
                   END-EXEC;
                   exec sql commit;
                   return 1;
              exec sql commit;
         fclose(fp_input_file);
         free(blob_buffer);
         return 0;
    Can Possible to do in Oacle Pl/Sql...?

    > Hi TOM,
    This is not asktom.oracle.com.
    > Can Possible to do in Oacle Pl/Sql...?
    Yes it can be done. Simply consult the applicable manuals that contains all of the details on how to do it. The manuals are:
    - Oracle® Database Application Developer's Guide - Large Objects (refer to Chapter 6 section on Using PL/SQL (DBMS_LOB Package) to Work with LOBs)
    - Oracle® Database PL/SQL Packages and Types Reference (refer to the chapter on DBMS_LOB)

  • General question on SQL Server 2000 to Oracle 10g

    Hello all,
    I just have a general question on migration from SQL Server 2000 to Oracle 10g using SQL Developer.
    How does it migrate Users with proper privileges from SQL Server to Oracle? Follow the interface steps? Or should the users be created on destination Oracle side?
    Thank you.

    Hi,
    It depends which type of migration you are making.
    For a 'Standard' migration when you migrate data a 'create user' statement is created as part of the migration and you will see this in the generated code.
    If you are using the 'Quick' migration option then you need to create the Oracle user or use an existing user to receive the data.
    Your best option is to review the documentation available from -
    http://www.oracle.com/technology/tech/migration//workbench/index_sqldev_omwb.html
    or directly from -
    http://download.oracle.com/docs/cd/E12151_01/index.htm
    and then get back with specific questions if this does not give you the information you need.
    Review the chapter -
    2. Migrating Third-Party Databases
    in -
    Oracle® Database SQL Developer User’s Guide Release 1.5
    Regards,
    Mike

Maybe you are looking for

  • Exporting processed messages from adapter engine monitoring to excel

    Hey experts, I have some messages that are processed successfully. I can see them in the message monitoring for adapter engine in the RWB. I want to know if there is a way to export these messages to excel file. Also we have a files archived by PI wi

  • Error 404 Not Found

    Hi, When i am opening an URL(http://hema-vaio:9704/analytics) in IE i'm getting Error 404 not Found some times and some times i'm getting analytics page.how to resolve this issue.

  • System Update keeps failing "Package did not download" and does not show all updates

    I recently installed win8 64-bit on my X1 (1294-2PG) using a clean install formatting the hard drive. Now I want to use System Update to install right drivers. Two problems occur: System Updates fails to show all the updates available for my PC in th

  • Problem about MuVo V200,PLX HELP ME

    this is not the first time my mp3 player has problems,and i try to fix the problems by myself.i have already downloaded the files: MStorage_PCDRV_LB__07_00_250 MuVoV200_PCFW_LF__05_02?after i pressed the play button and waited for 0 sec, I still cann

  • U310 jumpy touchpad with pluggen ac\dc adapter

    u310 jumpy touchpad with pluggen ac\dc adapter - impossible to work with notebook I have this very strange problem. Ever since getting a replacement AC adapter for my laptop, the mouse has started going all crazy. If the adapter is unplugged, the mou