How to fetch,update,insert the data using database link on diff. servers

I am using two oracle server.
1st) Oracle 9i ( Server1 )
2nd) Oracle 10g ( Server2 )
3) Forms 6i
I have created a database link on Server 1 for connecting to Server 2.
I written a piece of code which will be executed in Forms 6i and is connected to Server1.
The piece of code brings the data from SErver2 via cursor and I try to insert / update the relevant records
in my Server1 database users.
The Insert/Update runs sucessfully but at the time of commit I get the following errors
in Forms ORA-01041:internal error. hostdef does not exist.
Then it forcefully rollback the data and come out of the application.
contact :email-id : [email protected]

Suggest you test your code from sqlplus before running from forms.
Start by testing a simple "select sysdate from dual@<database link>;" then test select from application_table@<database link> then test the insert/update code. After it works from sqlplus, then try it from forms.

Similar Messages

  • How to insert the data using matrix

    Hi
      All how to insert the data using matrix feild
      plz help me
       thanks
        Loy

    Hi Loy,
    The best way to fill an entire matrix is to use a DBDatasource, here is some sample code:
    Dim oForm As SAPbouiCOM.Form
    oForm = SBO_App.Forms.Item("YourFormTypeID")
            '1. Add a DBDataSource to the form
            oForm.DataSources.DBDataSources.Add("OUSR")
            Dim oColumnDBS As SAPbouiCOM.Column
            Dim oColumnUDS As SAPbouiCOM.Column
            Dim i As Integer
            Dim GenEdt As SAPbouiCOM.EditText
            Dim oMatrix As SAPbouiCOM.Matrix
            Dim oColumns As SAPbouiCOM.Columns
            Dim oDBDataSource As SAPbouiCOM.DBDataSource
            oMatrix = oForm.Items.Item("7").Specific
            oColumns = oMatrix.Columns
            '2. DBDataSource: Binding a field / alias of the table to a column
            oColumnDBS = oColumns.Item("V_1")
            oColumnDBS.DataBind.SetBound(True, "OUSR", "U_NAME")
            '3. getting the data sources bound to the form
            oDBDataSource = oForm.DataSources.DBDataSources.Item("OUSR")
            oMatrix.Clear()
            ' Querying the DB Data source
            oDBDataSource.Query()
            ' Adding the data to the matrix
            oMatrix.LoadFromDataSource()
    When you want to fill a specific field use :
    GenEdt = oMatrix.Columns.Item("V_2").Cells.Item(1).Specific
                    GenEdt.String = "Hello"

  • Fetching the data using Db link through cursor

    Hi ,
    I created the cursor in which i want to access the data using Db link , can u tell the way to access the data
    Code Which gives error
    for rec in (
         SELECT ac_no as ac_code,drcr_ind as dr_cr,lcy_amount as amt
              FROM actb //"Public Synonym Of Db Link "
              Where period_code <> 'FIN'
              And AC_NO = '100130000'
              AND AC_BRANCH = '254'
    Its Urgent.
    With Regards,
    Anand

    An ORA-00600 error indicates an internal Oracle error. There are literally thousands of possible reasons that you might get one of these, but it generally boils down to Oracle bugs (you should never get this sort of error).
    - You'll need to log a support request with Oracle Support
    - There should be a number of parameters (generally rather cryptic) that come with the ORA-00600 error. You should look up those particular parameters in the Metalink ORA-00600 lookup tool
    - Hopefully, that tool will point you at a patch or a workaround. If not, you'll need to get support to figure out what's going on behind the scenes.
    Justin

  • How to insert the data using  SyncoBo Object

    Hi ,
        please provide the code for inserting the data such tat my meRepMeta.xml
    contains
                  one Top Row
                  4 Child Row
    i done the coding for inserting top row

    Hi Saravana,
        I am not sure about the query based on sync_key value but i am suggesting  the code snippet that you can use to get the SyncBo by the SyncBoName and SyncKey.
      public SyncBo getSyncBoInstance(String syncBoName, String syncKey) {
              SyncBoDescriptor sbd = descriptorFacade.getSyncBoDescriptor(syncBoName);
              try {
                   SyncBo sb = dataFacade.getSyncBo(sbd, syncKey);
                   return sb;
              } catch (PersistenceException pex) {
                   System.out.println(pex.getMessage());
                   return null;
              Based on the SyncBo value from the previous code snippet , you can obtain the rowCollection thru this method. 
    public RowCollection[] getRows()
                            throws PersistenceException
    Ex:
    sb.getRows()
    Once you obtain the RowCollection for the particular syncBo,you can iterate thru rowCollection to get the row entities.
    //To get the iterator of the Row entities in this RowCollection.
    MeIterator it = rowList.iterator();
    From each row entity you can get  the field values by this method
    public MeIterator getFieldValues()
    I would suggest you to go through the API Doc which is clearly explained about all the methods which would be useful for you to do all sort of operation.
    Regards,
    Rajan

  • [Forum FAQ] How do I restore the CDC enabled database backups (FULL + DIFF) while maintaining the CDC integrity

    Question
    Background: When restoring Full + DIFF backups of a Change Data Capture (CDC) enabled database to a different SQL server, the CDC integrity is not being maintained. We did RESTORE the databases with the KEEP_CDC option.
    How do I successfully restore the CDC enabled database backups (FULL + DIFF) while maintaining the CDC integrity?
    Answer
    When restoring a CDC enabled database on a different machine that is running SQL Server, besides using use the KEEP_CDC option to retain all the CDC metadata, you also need to add Capture and Cleanup jobs. 
    In addition, as you want to restore FULL + DIFF backups of a CDC enabled database, you need to note that the KEEP_CDC and NoRecovery options are incompatible. Use the KEEP_CDC option only when you are completing the recovery. I made a test to display
    the whole process that how to restore the CDC enabled database backups (FULL + DIFF) on a different machine.
    Create a database named ’CDCTest’ in SQL Server 2012, then enable the CDC feature and take full+ differential backups of the database.
    -- Create database CDCTest
    CREATE DATABASE [CDCTest] ON  PRIMARY
    ( NAME = N'CDCTest ', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\ CDCTest.mdf' , SIZE = 5120KB ,
    MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
     LOG ON
    ( NAME = N'CDCTest _log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\ CDCTest _log.LDF' , SIZE = 3840KB ,
    MAXSIZE = 2048GB , FILEGROWTH = 10%)
    GO
    use CDCTest;
    go
    -- creating table
    create table Customer
    custID int constraint PK_Employee primary key Identity(1,1)
    ,custName varchar(20)
    --Enabling CDC on CDCTest database
    USE CDCTest
    GO
    EXEC sys.sp_cdc_enable_db
    --Enabling CDC on Customer table
    USE CDCTest
    GO
    EXEC sys.sp_cdc_enable_table
    @source_schema = N'dbo',
    @source_name = N'Customer',
    @role_name = NULL
    GO
    --Inserting values in customer table
    insert into Customer values('Mike'),('Linda')
    -- Querying CDC table to get the changes
    select * from cdc.dbo_customer_CT
    --Taking full database backup
    backup database CDCTest to disk = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\ CDCTest.bak'
    insert into Customer values('David'),('Jane')
    -- Querying CDC table to get the changes
    select * from cdc.dbo_customer_CT
    --Taking differential database backup
    BACKUP DATABASE CDCTest TO DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\ CDCTestdif.bak' WITH DIFFERENTIAL
    GO
    Restore Full backup of the ‘CDCTest’ database with using KEEP_CDC option in a different server that is running SQL Server 2014.
    Use master
    Go
    --restore full database backup
    restore database CDCTest from disk = 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\Backup\CDCTest.bak' with keep_cdc
    Restore Diff backup of the ‘CDCTest’ database.
    Restore Database CDCTest From Disk = 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\Backup\CDCTest.bak'
        With Move 'CDCTest' To 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\DATA\CDCTest.mdf',
            Move 'CDCTest _log' To 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\DATA\CDCTest _log.LDF',
            Replace,
            NoRecovery;
    Go
    --restore differential database backup
    restore database CDCTest from disk = 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\Backup\CDCTestdif.bak' with keep_cdc
    Add the Capture and Cleanup jobs in the CDCTest database.
    --add the Capture and Cleanup jobs
    Use CDCTest
    exec sys.sp_cdc_add_job 'capture'
    GO
    exec sys.sp_cdc_add_job 'cleanup'
    GO
    insert into Customer values('TEST'),('TEST1')
    -- Querying CDC table to get the changes
    select * from cdc.dbo_customer_CT
    Reference
    Track Data Changes (SQL Server)
    Restoring a SQL Server database that uses Change Data Capture
    Applies to
    SQL Server 2014
    SQL Server 2012
    SQL Server 2008 R2
    SQL Server 2008
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Question
    Background: When restoring Full + DIFF backups of a Change Data Capture (CDC) enabled database to a different SQL server, the CDC integrity is not being maintained. We did RESTORE the databases with the KEEP_CDC option.
    How do I successfully restore the CDC enabled database backups (FULL + DIFF) while maintaining the CDC integrity?
    Answer
    When restoring a CDC enabled database on a different machine that is running SQL Server, besides using use the KEEP_CDC option to retain all the CDC metadata, you also need to add Capture and Cleanup jobs. 
    In addition, as you want to restore FULL + DIFF backups of a CDC enabled database, you need to note that the KEEP_CDC and NoRecovery options are incompatible. Use the KEEP_CDC option only when you are completing the recovery. I made a test to display
    the whole process that how to restore the CDC enabled database backups (FULL + DIFF) on a different machine.
    Create a database named ’CDCTest’ in SQL Server 2012, then enable the CDC feature and take full+ differential backups of the database.
    -- Create database CDCTest
    CREATE DATABASE [CDCTest] ON  PRIMARY
    ( NAME = N'CDCTest ', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\ CDCTest.mdf' , SIZE = 5120KB ,
    MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
     LOG ON
    ( NAME = N'CDCTest _log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\ CDCTest _log.LDF' , SIZE = 3840KB ,
    MAXSIZE = 2048GB , FILEGROWTH = 10%)
    GO
    use CDCTest;
    go
    -- creating table
    create table Customer
    custID int constraint PK_Employee primary key Identity(1,1)
    ,custName varchar(20)
    --Enabling CDC on CDCTest database
    USE CDCTest
    GO
    EXEC sys.sp_cdc_enable_db
    --Enabling CDC on Customer table
    USE CDCTest
    GO
    EXEC sys.sp_cdc_enable_table
    @source_schema = N'dbo',
    @source_name = N'Customer',
    @role_name = NULL
    GO
    --Inserting values in customer table
    insert into Customer values('Mike'),('Linda')
    -- Querying CDC table to get the changes
    select * from cdc.dbo_customer_CT
    --Taking full database backup
    backup database CDCTest to disk = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\ CDCTest.bak'
    insert into Customer values('David'),('Jane')
    -- Querying CDC table to get the changes
    select * from cdc.dbo_customer_CT
    --Taking differential database backup
    BACKUP DATABASE CDCTest TO DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\ CDCTestdif.bak' WITH DIFFERENTIAL
    GO
    Restore Full backup of the ‘CDCTest’ database with using KEEP_CDC option in a different server that is running SQL Server 2014.
    Use master
    Go
    --restore full database backup
    restore database CDCTest from disk = 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\Backup\CDCTest.bak' with keep_cdc
    Restore Diff backup of the ‘CDCTest’ database.
    Restore Database CDCTest From Disk = 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\Backup\CDCTest.bak'
        With Move 'CDCTest' To 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\DATA\CDCTest.mdf',
            Move 'CDCTest _log' To 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\DATA\CDCTest _log.LDF',
            Replace,
            NoRecovery;
    Go
    --restore differential database backup
    restore database CDCTest from disk = 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\Backup\CDCTestdif.bak' with keep_cdc
    Add the Capture and Cleanup jobs in the CDCTest database.
    --add the Capture and Cleanup jobs
    Use CDCTest
    exec sys.sp_cdc_add_job 'capture'
    GO
    exec sys.sp_cdc_add_job 'cleanup'
    GO
    insert into Customer values('TEST'),('TEST1')
    -- Querying CDC table to get the changes
    select * from cdc.dbo_customer_CT
    Reference
    Track Data Changes (SQL Server)
    Restoring a SQL Server database that uses Change Data Capture
    Applies to
    SQL Server 2014
    SQL Server 2012
    SQL Server 2008 R2
    SQL Server 2008
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

  • What's the exact trigger for when updating/inserting/deleting data from one DB to another DB which contains same info?

    Hi guys,
    I have created a copy of the AdventureWorks2012 DB called AdventureWorks2012_new on the same instance.
    I have created the following trigger below but my friend who is a DBA told me that this is not correct and I should be using the inserted table when creating this trigger. I would like AdventureWorks2012_new DB to be updating/inserting/deleting data from
    the same tables that have been updated/inserted/deleted in the AdventureWorks2012 DB. How exactly should I do this for all the tables in the whole database ? What I have written below is just for one of the tables, is there a quicker way to do it for all tables
    in this DB so that it performs the actions mentioned above, automatically ? Help would be greatly appreciated so I can understand how this works, thanks
    CREATE TRIGGER [HumanResources].[tr_HumanResources_AfterUpdate]
    ON [AdventureWorks2012].[HumanResources].[Department]
    AFTER UPDATE
    AS
    BEGIN
    SET NOCOUNT ON;
    UPDATE AdventureWorks2012_new.HumanResources.Department
    SET Name = t2.Name,
    GroupName = t2.GroupName,
    ModifiedDate = t2.ModifiedDate
    FROM AdventureWorks2012.HumanResources.Department AS t2
    INNER JOIN AdventureWorks2012_new.HumanResources.Department AS t1
    ON t2.DepartmentID = t1.DepartmentID
    END

    For insert it's easy:
    CREATE TRIGGER [HumanResources].[tr_HumanResources_AfterInsert]
    ON [AdventureWorks2012].[HumanResources].[Department]
    AFTER INSERT
    AS
    BEGIN
    SET NOCOUNT ON;
    Insert INTO AdventureWorks2012_new.HumanResources.Department
    (DepartmentID, Name, GroupName, ModifiedDate)
    SELECT DepartmentID, Name, GroupName, ModifiedDate
    FROM Inserted;
    END
    I didn't verify column names, so you may need to make sure to use correct column names for that table.
    Setting replication is a bit advanced topic although BOL is clear and you may start here
    http://technet.microsoft.com/en-us/library/ms151198.aspx
    If it will be complicated for you, you can ask extra questions in the MSDN Replication forum.
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • How to insert the data from XML to a table

    Hi,
    I'm using Oracle 10g Express Edition
    I need help in How to insert the data from XML file into the table.
    Below is the example i'm working on..
    I have create ridb user with below mentioned privileges:
    Account Status Locked Unlocked
    Default Tablespace: USERS
    Temporary Tablespace: TEMP
    User Privileges :
    Roles:
    CONNECT
    RESOURCE
    Direct Grant System Privileges:
    CREATE DATABASE LINK
    CREATE MATERIALIZED VIEW
    CREATE PROCEDURE
    CREATE PUBLIC SYNONYM
    CREATE ROLE
    CREATE SEQUENCE
    CREATE SYNONYM
    CREATE TABLE
    CREATE TRIGGER
    CREATE TYPE
    CREATE VIEW
    & table is created TRIALZIPCODES below mentioned is the DDL:
    CREATE TABLE TRIALZIPCODES
    STATE_ABBR VARCHAR2(20) NOT NULL
    , ZIP_CODE NUMBER(10, 0) NOT NULL
    , ZIP_CODE_EXT VARCHAR2(20)
    Below is the XML FILE: which is stored in C:\OracleProject Folder
    File name: trial.xml
    <?xml version="1.0" ?>
    <metadata>
    - <Zipcodes>
    - <mappings Record="4">
    <STATE_ABBREVIATION>CA</STATE_ABBREVIATION>
    <ZIPCODE>94301</ZIPCODE>
    </mappings>
    - <mappings Record="5">
    <STATE_ABBREVIATION>CO</STATE_ABBREVIATION>
    <ZIPCODE>80323</ZIPCODE>
    <ZIP_CODE_EXTN>9277</ZIP_CODE_EXTN>
    </mappings>
    </Zipcodes>
    </metadata>
    PL/SQL Procedure:which i'm trying to execute from SQLDeveloper
    create or replace
    PROCEDURE TRIAL AS
    BEGIN
    DECLARE
    -- declare attributes
    charString varchar2(80);
    finalStr varchar2(4000) := null;
    rowsp integer;
    v_FileHandle UTL_FILE.FILE_TYPE;
    l_context_handle dbms_xmlgen.ctxHandle;
    insCtx DBMS_XMLStore.ctxType;
    begin
    -- DBMS_XMLGEN.setRowTag ( ctx IN ctxHandle, rowTag IN VARCHAR2);
    -- DBMS_XMLGEN.setRowSetTag ( ctx IN ctxHandle, rowSetTag IN VARCHAR2);
    -- the name of the table as specified in our DTD
    DBMS_XMLGEN.SETROWSETTAG(l_context_handle,'zipcodes');
    -- the name of the data set as specified in our DTD
    DBMS_xmlgen.setRowTag(l_context_handle,'mappings');
    -- for getting the output on the screen
    dbms_output.enable(1000000);
    -- open the XML document in read only mode
    v_FileHandle := utl_file.fopen('c:/OracleProject','trial.xml', 'r');
    loop
    BEGIN
    utl_file.get_line(v_FileHandle, charString);
    exception
    when no_data_found then
    utl_file.fclose(v_FileHandle);
    exit;
    END;
    dbms_output.put_line(charString);
    if finalStr is not null then
    finalStr := finalStr || charString;
    else
    finalStr := charString;
    end if;
    end loop;
    -- for inserting the XML data into the table
    insCtx := DBMS_XMLSTORE.NEWCONTEXT('RIDB.TRIALZIPCODES');
    insCtx := DBMS_XMLSTORE.INSERTXML(insCtx, finalStr);
    dbms_output.put_line('INSERT DONE '||TO_CHAR(rowsp));
    DBMS_XMLStore.closeContext(insCtx);
    END;
    END TRIAL;
    For the first time when i complied i got the errors as :
    Procedure RIDB.PROCEDURE1@RIDB
    Error(16,14): PLS-00201: identifier 'UTL_FILE' must be declared
    Error(16,14): PL/SQL: Item ignored
    Error(29,1): PLS-00320: the declaration of the type of this expression is incomplete or malformed
    Error(29,1): PL/SQL: Statement ignored
    Error(33,1): PL/SQL: Statement ignored
    Error(33,19): PLS-00320: the declaration of the type of this expression is incomplete or malformed
    Error(36,1): PL/SQL: Statement ignored
    Error(36,17): PLS-00320: the declaration of the type of this expression is incomplete or malformed
    So i logged in as sys & grant the permission to execute on UTL_FILE to ridb (user):
    SQL Statement:
    grant execute on utl_file to ridb
    So, it got compiled successfully but when i execute it gives me error as:
    Source does not have a runnable target.
    What does this mean?
    So I browse through forum & i got to know that i need to initial the UTL_FILE_DIR ="C:/OracleProject" in init.ora
    So can i edit the init.ora with notepad.When i tried to do that it says permission denied
    In my system it shows the init.ora file in path C:\oraclexe\app\oracle\product\10.2.0\server\config\scripts
    but there is also other file initXETemp in the same path do i need to do the changes in it.
    I have tried even editing the SPFILE as mentioned below:
    C:\oraclexe\app\oracle\product\10.2.0\server\dbs\SPFILEEXE - I had edit this file using notepad & set the value of UTL_FILE_DIR ="C:/OracleProject". So next time when i restarted i'm unable to log on to the database.
    So i had reinstall the software again.
    Could you please let me know how to proceed..

    hi,
    I have created the directory from sys database
    CREATE or replace DIRECTORY XML_DIR2 AS 'C:\OracleProject';
    & grant read,write access to the user
    grant read,write on directory XML_DIR2 to RIDB;
    & i had change the tag name in the xml file as shown below:
    <?xml version = '1.0'?>
    <metadata>
    <Zipcodes>
    <mappings Record="4">
    <STABBRE>CA</STABBRE>
    <ZIPCODE>94301</ZIPCODE>
    </mappings>
    <mappings Record="5">
    <STABBRE>CO</STABBRE>
    <ZIPCODE>80323</ZIPCODE>
    <ZIPCODEEXT>9277</ZIPCODEEXT>
    </mappings>
    </Zipcodes>
    </metadata>
    TRIALZIPCODE table as shown below:
    CREATE TABLE "RIDB"."TRIALZIPCODE"
    (     "STABBRE" VARCHAR2(20 BYTE),
         "ZIPCODE" NUMBER(*,6) NOT NULL ENABLE,
         "ZIPCODEEXT" NUMBER
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS" ;
    I have tried two methods as shown below:
    Procedure 1:
    create or replace
    PROCEDURE TRIAL_V2 AS
    BEGIN
    DECLARE
    -- declare attributes
    charString varchar2(80);
    finalStr varchar2(4000) := null;
    rowsp integer;
    v_FileHandle UTL_FILE.FILE_TYPE;
    l_context_handle dbms_xmlgen.ctxHandle;
    insCtx DBMS_XMLStore.ctxType;
    cnt NUMBER;
    xmldoc xmltype := xmltype( bfilename('XML_DIR2','trialxml.xml'), nls_charset_id('AL32UTF8') );
    --XML_DIR VARCHAR2(40) := 'C:\\OracleProject';
    BEGIN
    insCtx := DBMS_XMLStore.newContext('DEV.TRIALZIPCODES');
    DBMS_XMLStore.setUpdateColumn(insCtx, 'STABBRE');
    DBMS_XMLStore.setUpdateColumn(insCtx, 'ZIPCODE');
    DBMS_XMLStore.setUpdatecolumn(insCtx, 'ZIPCODEEXT');
    DBMS_XMLStore.setRowTag(insCtx, 'mappings');
    cnt := DBMS_XMLStore.insertXML(insCtx, xmldoc);
    DBMS_XMLStore.closeContext(insCtx);
    END;
    Procedure 1 was compiled with out errors but when i execute i got the error as :
    Source does not have a runnable target.
    Procedure 2_
    CREATE OR REPLACE PROCEDURE TRIAL_V3 AS
    BEGIN
    DECLARE
    -- declare attributes
    charString varchar2(80);
    finalStr varchar2(4000) := null;
    rowsp integer;
    v_FileHandle UTL_FILE.FILE_TYPE;
    l_context_handle dbms_xmlgen.ctxHandle;
    insCtx DBMS_XMLStore.ctxType;
    cnt NUMBER;
    xmldoc xmltype := xmltype( bfilename('XML_DIR2','trialxml.xml'), nls_charset_id('AL32UTF8') );
    --XML_DIR VARCHAR2(40) := 'C:\\OracleProject';
    BEGIN
    INSERT INTO trialzipcode (STABBRE, ZIPCODE, ZIPCODEEXT)
    SELECT extractvalue(x.column_value, 'mappings/STABBRE'),
    extractvalue(x.column_value, 'mappings/ZIPCODE'),
    extractvalue(x.column_value, 'mappings/ZIPCODEEXT')
    FROM TABLE(
    XMLSequence(
    EXTRACT(
    xmltype( bfilename('XML_DIR2','trialxml.xml'), nls_charset_id('AL32UTF8') ),
    'metadata/Zipcodes/mappings'
    ) x
    END;
    END TRIAL_V3;
    Procedure 2 was complied without errors but when i execute i got the error as:
    Connecting to the database RIDB.
    ORA-22288: file or LOB operation FILEOPEN failed
    The system cannot find the file specified.
    ORA-06512: at "SYS.DBMS_LOB", line 523
    ORA-06512: at "SYS.XMLTYPE", line 287
    ORA-06512: at "RIDB.TRIAL_V3", line 12
    ORA-06512: at line 2
    Process exited.
    Disconnecting from the database RIDB.
    Could you please let me know how to proceed...

  • How can i open a DOC or TXT file and insert the data into table?

    How can i open a DOC or TXT file and insert the data into table?
    I have a doc file . the doc include some columns and some rows.(for example 'ID,Name,Date,...').
    I'd like open DOC file and I'd like insert them into the table with same columns.
    Thanks.

    Use the SQL*Loader utility or the UTL_FILE package.

  • How do I update just the day of a date value?

    Example:
    Table: FC_GQ_SOURCE_ANALYSIS
    Sample_type = C
    Effective_date = null
    Sample_date = 20/13/07/14 09:00:00
    What needs to happen is for any sample analysis that has a sample_type of "C" we need the effective date to be the first of the month for whatever month the sample date is and keep the time as it is…
    so in the example data the effective date should be 2013/07/01 09:00:00.
    How would I update just the day part of that date string?

    Hi,
    You don't need to convert to a string and back again to do that.  Use TRUNC to get the right day, and date arithmetic to get the right time, like this:
    UPDATE  fc_gq_source_analysis
    SET     effective_date = TRUNC (sample_date, 'MONTH')
                                 + (sample_date - TRUNC (sample_date))
    WHERE   sample_type  = 'C'
    TRUNC (sample_date, 'MONTH')        is midnight on the 1st of the month that you want.
    sample_date - TRUNC (sample_date)   is the time that you want, expressed as a number of days (e.g., 9/24 of a day).

  • How to insert the data to selected cell in multicolumn

    Hello Labviewer
    I am new for labview, and have a problem when i am using a multicolumn listboxes, how can i insert the data to my selected cell,
    something like
    header      XXX   

    mengyi
    The property node of the listbox has a "Item Names" property. This is a two dimensional array corresponding accordingly to the row by column listbox. You can modify this array to change the listed string for the selected cell(s).
    --Russ

  • How to do not insert the message content in the Message Inbox when use MFMessageComposeViewController control

    Dear all.
    In my app use the MFMessageComposeViewController control to send SMS message.The message content will be inserted to Message Inbox of iPhone.
    How to do not insert the message content in the Message Inbox when use this control?Because my message content has been encrypted. I don't want user can see them.
    Thanks

    I can't remember the steps, but if i'm not wrong, there are many "next" to click, and at the last windows, there is one dialog box with "do not show this message again".Maybe something to do with the registry, to enable to view this dialog box again. Date: Thu, 2 Feb 2012 06:38:24 -0700
    From: [email protected]
    To: [email protected]
    Subject: How to enable  the option "do not show this message again" in dreamweaver cs5
        Re: How to enable  the option "do not show this message again" in dreamweaver cs5
        created by Murray ACP in Dreamweaver - View the full discussion
    So, you open Site manager, click New, and then what?  I'm trying to understand which dialog you dismissed.  Can you help me?
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4180872#4180872
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4180872#4180872. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Dreamweaver by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • How do i insert a drop down calender to insert the date field.

    How do i insert a drop down calender to insert the date field i my create a form

    Hi,
    You can use the date object FormsCentral provides. When you test the form in browser, the date field will show a pulldown calendar when clicked upon.
    Thanks,
    Wenlan

  • How to increment the date using sequence?

    how to increment the date using sequence?
    01-jan-10
    02-jan-10
    30-jan-10

    794244 wrote:
    how to increment the date using sequence?
    01-jan-10
    02-jan-10
    30-jan-10This doesn't look like a task where a sequence is usefull.
    A sequence is a number generator that guarantees that multiple sessions will all get a different number.
    Even if the sequence is fetched for differnent users (=sessions) that the same time.
    This in turn means that the value returned by the sequence will depend on actions done in other sessions.
    Typical task: create a new unique primary key number. The number MUST be different in all sessions.
    In your case I guess that the same logic should work regardless of the session that executes it. So you need a "number generator" that works indepented from other session values. There are several ways to create such a numbered list.
    The basic idea is to create a select statement that simply returns as many rows as you need. And then use ROWNUM as the number generator. Examples how to do this have already been given. LEVEL works also in hierarchical queries.
    if my interpretation of your requirement is right, then all answers that really used a sequence seem to be wrong. Even if the output looks ok. At best they are just slow. To create new sequence values is a complex task and the database needs a little time for all the synchonization issues that come with it. At worst it will have gaps in the sequence because other sessions used the same value while the numbers were created.
    Edited by: Sven W. on Sep 20, 2010 2:08 PM

  • How to insert the data which is present in the variable into the table

    Hi,
    Let's consider that I have one table and I have stored the table column names in one variable and their values in another variable.
    I want to insert the data that is present in the variables into the table.
    I tried the following way :
    Declare
    V_columns    Varchar2(50) := 'Empno';
    V_values       Number(10) := 101;
    Begin
    Insert Into Emp (V_columns) Values (V_values);
    End;
    The above procedure gives an error : PL?SQL : ORA-00904 : "V_COLUMNS": invalid identifier
    Using the Execute Immediate, we can insert the data which is present in the variables into the table.
    Is there any other way to insert the data which is present in the variable into the table..?
    Can anyone please give me the solution..?
    Thanks..

    plz use this...
    DECLARE
       v_columns   VARCHAR2 (50) := 'Empno';
       v_values    NUMBER (10)   := 101;
    BEGIN
       EXECUTE IMMEDIATE    'Insert Into Emp ('
                         || v_columns
                         || ') Values ('
                         || v_values
                         || ')';
       COMMIT;
    END;

  • Does anyone know how to display (in LabVIEW) the memory use during execution of an image and data acquisition VI to predict when it is time to cease the acquisition to prevent the program crashing?

    Does anyone know how to display (in LabVIEW) the memory use during execution of an image and data acquisition VI to predict when it is time to cease the acquisition to prevent the program crashing?
    I am acquiring images and data to a buffer on the edge of the while loop, and am finding that the crashing of the program is unpredictable, but almost always due to a memory saturation when the buffers gets too big.
    I have attached the VI.
    Thanks for the help
    Attachments:
    new_control_and_acquisition_program.vi ‏946 KB

    Take a look at this document that discusses how to monitor IMAQ memory usage:
    http://digital.ni.com/public.nsf/websearch/8C6E405861C60DE786256DB400755957
    Hope this helps -
    Julie

Maybe you are looking for