Access a table on Oracle 8 Ver into Oracle 10g

Hello All,
Could you please tell me how to access a table directly sitting on Oracle 8.1.6 version database into Oracle 10G database. Appreciate your time.
Thanks & Regards,
Ariean.

Hello,
If you runninng from a client machine then you can use sql script to extract and use sqlldr to load from it. But if you want to extract using pl/sql procedure (utl_file) then you need to write a procedure which generates .csv format on 8i db server, then you ftp .csv formatted and use sqlldr. Setting up utl_file in 8i is easy but it might requires a restart. But in this case, write a small sql script to generate (spool) a data file (csv) and loaded up in 10g using sqlldr. Here a small script to genereate a sql script which in turn will generate "|" delimited datafile.
Just replace "MY_OBJECTS" with your table name and it will generate sql script which you can run from client to generate .csv ('|" ) delimited. You can change it to generate ","
{code}
SET pagesize 0
SET verify off
SET feedback off
SET linesize 400
SET termout off
SET TRIMSPOOL on
SET TRIMOUT ON
SPOOL mytest.sql
SELECT 'spool test.csv' FROM DUAL;
SELECT DISTINCT
'set termout off'
|| CHR (10)
|| 'set feedback off'
|| CHR (10)
|| 'set heading on'
|| CHR (10)
|| 'set pagesize 0'
|| CHR (10)
|| 'set linesize 800'
|| CHR (10)
|| 'set TRIMOUT on'
|| CHR (10)
|| 'set trimspool on'
|| CHR (10)
|| 'set long 2000'
FROM user_tab_columns
WHERE table_name = UPPER ('MY_OBJECTS');
SELECT 'select '
FROM DUAL;
SELECT (CASE
WHEN column_id = 1
THEN
(CASE
WHEN data_type LIKE '%CHAR%'
THEN
column_name
WHEN data_type = 'DATE'
THEN
'to_char(' || column_name || ',''DD-MON-YYYY'')'
ELSE
column_name
END)
ELSE
(CASE
WHEN data_type LIKE '%CHAR%' AND data_length = 4000
THEN
'||''|''||substr(' || column_name || ',1,4000)'
WHEN data_type LIKE '%CHAR%'
THEN
'||''|''||' || column_name
WHEN data_type = 'DATE'
THEN
'||''|''||to_char('
|| column_name
|| '|''DD-MON-YYYY'')'
ELSE
'||''|''||' || column_name
END)
END)
FROM user_tab_columns
WHERE table_name = UPPER ('MY_OBJECTS')
ORDER BY column_id;
SELECT '||''DELIM'''
FROM DUAL;
SELECT ' from MY_OBJECTS;'
FROM DUAL;
SELECT 'spool off'
FROM DUAL;
{code}
Regards
Edited by: OrionNet on Mar 18, 2009 10:15 AM

Similar Messages

  • Oradata from oracle ee into oracle xe

    hi
    When I shutdown the db and copy the oradata of the oracle10gEnterprise Edition to oracle xe's oradata location, I cannot open the database. Even I make new pfile and start to open with it, it doesnt open.
    Why not?

    Even I make new pfile and start to open with it, it doesnt open.Do You mean you are trying to clone the database from EE to XE? Please elaborate the steps that you are peforming, only Pfile will not work, Control file is the one that stores information about datafiles and log files, that also needs to be recreated in case you are cloning.
    There are certain limitations with Oracle XE.
    http://download.oracle.com/docs/cd/B25329_01/doc/install.102/b25143/toc.htm
    Use SE or EE.
    XE should be used mostly for learning purpose or teaching purpose.
    Edited by: Manoj Alwani on Sep 9, 2008 10:44 AM

  • Extract the data from SQL Server and Import into Oracle

    Hi,
    I would like to run a daily job that will export the table data from SQL server table (it will be only one or two table) and Import back into Oracle table (it might one or two table tables).
    Could you please guide me that how can i do this using either sql server or oracle?
    We have oracle 9.2 and sql server 2005.
    Normally i do from flat file which is generated by source destination nand i dump into oracle using sql*loader but this time I have to directly extract/export the data from MS Sql server and load into Oracle table, mostly it will reload so i might doing any massaging data during the load.
    If you show me the detail approach, it will be really appreciated.
    I have access to Sql server but i don't how to use sql server to do this or using oracle as a daily job even becuase have to schedule the job for this as it will be a daily job.
    Thanks,
    poratips

    Unless you can find an open source ODBC driver for SQL Server that runs on Solaris (and I wouldn't be overly hopeful there) Heterogeneous Services would require that you license something-- a third party ODBC driver, a new Oracle instance, or an Oracle Transparent Gateway.
    As I stated below, you could certainly use SQL Server's ETL tool, DTS. Oracle's ETL tools would require additional licensing since you're just on 9.2. You could also write a small application (Java or otherwise) that connected to both databases and transferred the data. If you're particularly enterprising, you could load the SQL Server Type 4 JDBC driver into Oracle's JVM and write a Java stored procedure that connected to the SQL Server database via JDBC, but that's a pretty convoluted approach.
    Justin

  • Import oracle 11g database into oracle 10g Server -

    Hi guys,
    We have a oracle db running on Oracle 11g. Now, we would like to export from oracle 11g into Oracle 10g XE for important demo. Is it possible??
    When i try to import into Oracle 10g XE, the following Error msg appears :
    IMP-00010: Not a valid export file, header failed verification
    Pls help soonest possible...
    tx
    Rama

    A BIG thank you to both of you, Managed to import succesfully. appreciate your help.
    Just for others who would be using this forum.
    Steps involved
    1. connect with Oracle 10g Export utility to the source db.
    2. export the db from source to target server
    3. create DDL & schema of the source db.... ( i used toad dba )
    4. run the DDL & schema of the target db (oracle 10g) .. ( i used toad dba )
    5. import the dump to target server.
    6. done...
    thanks.

  • Import  oracle forms into portal

    Can anyone please give me some pointers in importing forms created by orcale forms into portal?

    There is no direct way to import your Oracle Forms into Oracle Portal, as the Forms within our Portletbuilder components are of a smaller, simpler functionality set than that provided within Oracle Forms.
    What I would recommend is to invoke your Oracle Forms from Portal by integrating Forms with Oracle Single-Sign-On (SSO). Integration of Oracle Forms with Oracle SSO is described in Chapter 5 of the Oracle9iAS Forms Services Deployment Guide, available here on OTN:
    http://otn.oracle.com/products/forms/pdf/B10170_01.pdf
    Hope this helps.
    Best Regards,
    Harry

  • How to inetgrate BPM workspces into oracle webcenter ?

    Hi All,
    can any one please give me some guidelines to following:
    1.oracle bpm into oracle web-center
    2.worklist application into oracle webcenter.
    regards
    shankar

    I went through the same links, Here we are developing again webcenter portal application.Is There any out of box integration of the same.Did you look at 'Process spaces' ?
    http://docs.oracle.com/cd/E23943_01/user.1111/e15175/bpmug_pp_gt_strt.htm#BEHIGHJH
    How 'out of the box' do you expect it to be for your specific usecase?
    Here's another example that how the re-usable taskflows from BPM workspace can be reused in your standalone ADF application or a WebCenter application..
    http://andrejusb.blogspot.co.uk/2012/07/lightweight-adf-task-flow-for-bpm-human.html
    Jang-Vijay Singh

  • Migration from Oracle Forms to Oracle Apex 3.2

    Hi I am learning Apex, I mainly work in Oracle developer. I have converted one Oracle form into Oracle Apex. the migrated Form appears on the screen,works, but not as I like it to be. All the triggers are migrated into Apex but they don't work as they did in Oracle Form. I cant make the form work as it should be. please help.
    Hasan Al Mamun
    Bangladesh Bank
    Bangladesh

    Triggers in forms will NOT work EXACTLY like they do in Forms, that is the nature of the beast.. APEX runs under a browser and you are running with html events to trap on..
    Suggestion, the Forms conversion tools converts only so much, you will have to do some work to get what you want. Also, I would suggest re-evaluating your application, since it was probably a client server based application, moving it to the web will involve some re-engineering..
    Thank you,
    Tony Miller
    Webster, TX

  • Loading MS Access Table and Data into Oracle

    Hi,
    I have few tables in MS Access. I want to create same layout of tables in Oracle and want to populate data from MS Access tables to Oracle tables.
    Please let me know if there is a way by which I can create tables and load data automatically (thru some option or script)?
    I have Oracle 10g database and its clients.
    Thanks in advance,
    Rajeev.

    You can use Oracle migration workbench
    Loading MS Access Table and Data into Oracle
    It´s very easy to use and good to import
    regards,
    Felipe

  • XML data into Oracle Tables. XML file on Application Server.Oracle Apps R12

    Hi All,
    My Database version : 11.2.0.2.0
    I have an XML file which needs to be loaded into the Database Tables. How ever i do not want to use the XMLTYPE as given below
    insert into test1 (
    SELECT PrcDate, PmtType, PmtStatus, PmtTypeCount, PmtTypeAmt
    FROM XMLTABLE(
    '/WFPaymentAck/RejectedDom1ACH'
    PASSING XMLTYPE( BFILENAME('ECX_UTL_LOG_DIR_OBJ','wf_test_xml.XML'), NLS_CHARSET_ID('UTF8') )
    COLUMNS
    PrcDate VARCHAR2(2000) PATH '@PrcDate' ,
    PmtType VARCHAR2(2000) PATH '@PmtType' ,
    PmtStatus VARCHAR2(100) PATH '@PmtStatus' ,
    PmtTypeCount VARCHAR2(100) PATH 'PmtTypeCount' ,
    PmtTypeAmt VARCHAR2(100) PATH 'PmtTypeAmt'
    Because this way the XML file needs to reside on the DB server.
    I am looking into other option of loading the XML file into a CLOB column of a table and reading it from that column.
    I did a couple of tests and feel that this way also the XML file has to reside on the Database Server itself. I am not sure if this is correct or if there is any problem with our TEST instance.
    ++Can anyone let me know if i need to have the XML file on the DB server instead of the Application server to load into a CLOB column of table ??++
    ++Or++
    ++Is there any other workaround for me to load XML into Oracle Tables, while having the XML file on Application Server.++
    Your immediate help is appreciated. I need to get past this ASAP.
    Thanks in Advance.
    VJ

    1) Are you asking me to create a folder on Database directory which points to a folder on the Apps server ?I suggest creating an Oracle directory object (a database object) pointing to a real location (folder) on Application server.
    we DONOT want a hand shake between the DB Server and the APPS server.I don't see where the problem is.
    I'm not familiar with Apps R12 but there's no doubt the two servers are already communicating, at least App server should be able to access the DB for the whole thing to run.
    As I said :
    One way or another, the data has to make its way to the database, there's no workaround to that.How do you imagine the data will end up in a database table if it doesn't come to the DB server?
    There's no magical method out there, both servers have to communicate at some point.
    About client-server approaches (client being here the App server), you can read about accessing the XML DB repository in the XML DB Developer's Guide : http://download.oracle.com/docs/cd/E11882_01/appdev.112/e23094/toc.htm
    Other option : SQL*Loader can load a CLOB, or an XMLType column too
    Edited by: odie_63 on 19 déc. 2011 20:22

  • How do I import the data from Excel (.xls) file into Oracle Database table

    I have an excel file with 5 columns of 5000 rows.
    I have to import 5000 rows of data into my oracle table with
    same column names & Data types.
    What is the best advise for this ?
    Thanks.
    Srini

    You can connect to Oracle from Excel directly. I know you can read data but am not sure if you can export data.
    Other option is to import the data into Access.
    Create an ODBC connection for Oracle
    Use the to connect to Oracle from Access
    Export data to Oracle from Access
    Shakti
    http://www.impact-sol.com
    Developers of Guggi Oracle - Tool for DBAs and Developers

  • Error when using SQL Developer to IMPORT Access data into Oracle

    Hello,
    I am using SQL Develoepr to export Access mdb file into Oracle. When I try to use Tools ---? Migration---> Microsssfot access exported -->
    I am getting an error message upon attaching the Access database file, the error states
    "Error#40179 - XMLExporter - Methiod'AddFromFile' of object'_References failed. Export did not complete successfully.
    What could be the reason for this error please advise.
    Thanks

    Hi,
    Try searching for:Re: 30EA2 - No Available Databases in Capture step with MS Access Migration
    Thread: 30EA2 - No Available Databases in Capture step with MS Access Migration
    Posted: Dec 20, 2010 11:04 AM
    Also note that copy to oracle - (for just table/column information) is available on right click.
    -Turloch
    SQLDeveloper team

  • Help Required:How Upload Excel file Into Oracle Table Using PLSQL Procedure

    Please Help , Urgent Help Needed.
    Requirement is to Upload Excel file Into Oracle Table Using PLSQL Procedure/Package.
    Case's are :
    1. Excel File is On Users/ Client PC.
    2. Application is on Remote Server(Oracle Forms D2k).
    3. User Is Using Application Using Terminal Server LogIn.
    4. So If User Will Use to GET_FILE_NAME() function of D2K to Get Excel File , D2k Will Try to pick File from That Remote Server(Bcs User Logind from Terminal Server Option).
    5. Cannot Use Util_File Package Or Oracle Directory to Place That File on Server.
    6. we are Using Oracle 8.7
    So Need Some PL/SQL Package or Fuction/ Procedure to Upload Excel file on User's Pc to Oracle Table.
    Please Guide me wd some Code. or with Some Pl/SQL Package, or With SOme Hint. Or any Link ....
    Jus help to Sort This Issue ........
    you can also write me on :
    [email protected], [email protected]

    TEXT_IO is a PL/SQL package available only in Forms (you'll want to post in the Forms forum for more information). It is not available in a stored procedure in the database (where the equivalent package is UTL_FILE).
    If the Terminal Server machine and the database machine do not have access to the file system on the client machine, no application running on either machine will have access to the file. Barring exceptional setups (like the FTP server on the client machine), your applications are not going to have more access to the client machine than the operating system does.
    If you map the client drives from the Terminal Server box, there is the potential for your Forms application to access those files. If you want the files to be accessible to a stored procedure in the database, you'll need to move the files somewhere the database can access them.
    Justin

  • Importing Access Data into Oracle Forms through Forms 10g

    Sirs,
    How can i import the data of Access file into Oracle tables.
    i have the tables in access of approx 10 how can it be imported in oracle with same data structure.
    ThanX in advance

    DECLARE
    kAccess client_ole2.obj_type;
    kdb client_ole2.obj_type;
    ktables client_ole2.obj_type;
    krec client_ole2.obj_type;
    kcurr client_ole2.obj_type;
    begin
    kaccess:=client_ole2.create_obj('Access.application);
    kdb:=client_ole2.invoke_obj(kaccess,'open','D:\acc.mdb');
    ktables:=client_ole2.get_obj_property(kdb,'tables',1);
    //then process teh data of the table which is at 1 using another
    krec:=client_ole2.invoke_obj(ktables,'count');
    for s in 1 .. krec
    loop
    /// code for sinserting the current records data into the oracle tables.
    kcurr:=client_ole2.get_obj_type(ktables,'recordset',s);
    // then access each filed in kcurr and then insert in oracle table
    end loop;
    end;
    the above code is not tested your can alter any syntatical error if any.

  • Can you import Access into Oracle 10g Express Edition?

    Hi all,
    I know you can import files from Access into some other versions of Oracle, but is it possible with 10g XE?
    I've been looking at all the tools in my browsers and none seem to do it.
    I guess I'll need to convert the tables into text, and then from text into Oracle?
    Thanks

    Why not give SQLDeveloper's migration a shot?
    You can get it for free here.
    http://www.oracle.com/technology/software/products/sql/index.html
    I've never personally done it, but it doesn't look to mind bending :)
    http://www.oracle.com/technology/obe/11gr1_db/appdev/msamigrate/msamigrate.htm
    Should work fine with XE.

  • Can you import local tables into Oracle to query in Discoverer?

    long time lurker, first time poster...
    I've got a local list in excel of over 100k records. I want to bounce this list off our network's data in Oracle to add a few fields to my file. Is there a way to import the local list into Oracle (like I might using MS Access) so that I can query the data using Discoverer, and output my local list with the additional data I pull out of Oracle? Thanks so much for any assistance!

    Hi,
    Create an external table in the database that points to the excel workbook then you will be able to query the excel workbook like any other table in Discoverer. You will need to create a database directory which points to the directory containing the excel workbook. You will also have to save the workbook in a csv format. But once that is set up you will be able to make changes in the excel workbook save them, then refresh the Discoverer workbook and immediately see the changed data in Discoverer.
    Rod West

Maybe you are looking for

  • SUP native app on iOS

    Hi, I just started development on SUP 2.1.2 and created an MBO for BAPI_FLIGHT_GETLIST successfully. I assigned an PersonalizationKey for Input parameter ARLINE and tested the MBO in Eclipse - it works like as expected. Then I followed the Sybase tut

  • How To Upload OPening or Closing Balance In RG1 Register.

    How To Upload OPening or Closing Balance In RG1 Register.in this table with the help of bdc J_2IRG1BAL. I had seen all the links in sdn but didnt get. Edited by: Pritesh kumar on Apr 3, 2011 12:20 PM

  • Using a variable for a query? Advice needed

    Hello everyone, I am new to JDBC and have a small problem with my application: I want the user to enter a word and depending on the word he enters, the program will run a query searching for that word. For example the user input is stored in a variab

  • Template.fmb missing

    Where can i find the template form. It should it be in dir $AU_TOP/forms/US but i can't find it. I'm using oracle express 10g

  • How do i reorganise my full disk

    I have a 250GB disc on my iMac but I also have a Terra Byte and a 500GB external drive. My files are not well organised and my iMac HD is nearly full. I would like to store my iPhoto library externally but it will not allow me to drag and drop it. Ca