Export data from the database to excel file using the procedure

Hello

I need to export data from database to oracle 10 g for the excel file, I try this code:

First, I create directory to the user sys and give permition to user that I'm working on it
create or replace directory PALPROV_REPORTS as 'c:\temp';

grant read, write on directory PALPROV_REPORTS to user12 ;
then I run this code
declare
    output utl_file.file_type;
begin
    output := utl_file.fopen( 'user12' , 'emp1.slk', 'w',32000 );
    utl_file.put_line(output, 'line one: some text');
    utl_file.fclose( output );
end;
the problem appears as
ORA-29280: invalid path ORA-06512: at "SYS." UTL_FILE", line 29 ORA-06512: at"SYS." UTL_FILE", line 448 ORA-06512: at line 4

Notice that I use the operating system windows as a client and a linux as a server database

The file will be written to the database server or your GNU / linux and I'm quite sure, there is no folder named "c:\temp" on linux. It will probably be ' / tmp' on a unix server.

And open the file, you must give the name logic directory 'PALPROV_REPORTS' it instead of the user name "utilisateur12".

Tags: Database

Similar Questions

  • Export data from the database Table in the CSV file with OWB mapping

    Hello

    is it possible to export data from a database table in a CSV with an owb mapping. I think that it should be possible, but I didn't yet. Then someone can give me some tips how to handle this? Someone has a good article on the internet or a book where such a problem is described.

    Thank you

    Greetings Daniel

    Hi Daniel,.

    But how do I set the variable data file names in the mapping?

    Look at this article on blog OWB
    http://blogs.Oracle.com/warehousebuilder/2007/07/dynamically_generating_target.html

    Kind regards
    Oleg

  • Export data from the forms to Excel

    Hello

    I am facing a problem with exporting data from a form to excel.

    When I go to the menu - and file-> export. The export starts then progress, then disappears.

    If I do just steps above and hold down the CTRL key... the excel opens.

    I remember there was a setting to recognize that this export goes to Excel. But have forgotten what I did to solve the problem.

    My pop Blocker is turned off.


    If anyone can help out me... that would be greatly appreciated.

    Thank you

    Hello

    In the browser, please add the URL of the application to the trusted sites list and sign the application again.

    Also, be sure that no errors are reported in the log database (no space).

    Export option in menu Apps does not work under Windows-XP OS
    Export option in menu Apps does not work under Windows-XP OS

    Export form data to Excel the FILE using file > EXPORT
    Export form data to Excel the FILE using file > EXPORT

    Kind regards
    Hussein

  • How to export data from the table with the colouring of cells according to value.

    Hi all

    I use jdeveloper 11.1.1.6

    I want to export data from the table with a lot of formatting. as for color cells based on value and so much. How to do this?

    You can find us apache POI-http://poi.apache.org/

    See this http://www.techartifact.com/blogs/2013/08/generate-excel-file-in-oracle-adf-using-apache-poi.html

  • export data from the table in xml files

    Hello

    This thread to get your opinion on how export data tables in a file xml containing the data and another (xsd) that contains a structure of the table.
    For example, I have a datamart with 3 dimensions and a fact table. The idea is to have an xml file with data from the fact table, a file xsd with the structure of the fact table, an xml file that contains the data of the 3 dimensions and an xsd file that contains the definition of all the 3 dimensions. So a xml file fact table, a single file xml combining all of the dimension, the fact table in the file a xsd and an xsd file combining all of the dimension.

    I never have an idea on how to do it, but I would like to have for your advise on how you would.

    Thank you in advance.

    You are more or less in the same situation as me, I guess, about the "ORA-01426 digital infinity. I tried to export through UTL_FILE, content of the relational table with 998 columns. You get very quickly in this case in these ORA-errors, even if you work with solutions CLOB, while trying to concatinate the column into a CSV string data. Oracle has the nasty habbit in some of its packages / code to "assume" intelligent solutions and converts data types implicitly temporarily while trying to concatinate these data in the column to 1 string.

    The second part in the Kingdom of PL/SQL, it is he's trying to put everything in a buffer, which has a maximum of 65 k or 32 k, so break things up. In the end I just solved it via see all as a BLOB and writing to file as such. I'm guessing that the ORA-error is related to these problems of conversion/datatype buffer / implicit in the official packages of Oracle DBMS.

    Fun here is that this table 998 column came from XML source (aka "how SOA can make things very complicated and non-performing"). I have now 2 different solutions 'write data to CSV' in my packages, I use this situation to 998 column (but no idea if ever I get this performance, for example, using table collections in this scenario will explode the PGA in this case). The only solution that would work in my case is a better physical design of the environment, but currently I wonder not, engaged, as an architect so do not have a position to impose it.

    -- ---------------------------------------------------------------------------
    -- PROCEDURE CREATE_LARGE_CSV
    -- ---------------------------------------------------------------------------
    PROCEDURE create_large_csv(
        p_sql         IN VARCHAR2 ,
        p_dir         IN VARCHAR2 ,
        p_header_file IN VARCHAR2 ,
        p_gen_header  IN BOOLEAN := FALSE,
        p_prefix      IN VARCHAR2 := NULL,
        p_delimiter   IN VARCHAR2 DEFAULT '|',
        p_dateformat  IN VARCHAR2 DEFAULT 'YYYYMMDD',
        p_data_file   IN VARCHAR2 := NULL,
        p_utl_wra     IN VARCHAR2 := 'wb')
    IS
      v_finaltxt CLOB;
      v_v_val VARCHAR2(4000);
      v_n_val NUMBER;
      v_d_val DATE;
      v_ret   NUMBER;
      c       NUMBER;
      d       NUMBER;
      col_cnt INTEGER;
      f       BOOLEAN;
      rec_tab DBMS_SQL.DESC_TAB;
      col_num NUMBER;
      v_filehandle UTL_FILE.FILE_TYPE;
      v_samefile BOOLEAN      := (NVL(p_data_file,p_header_file) = p_header_file);
      v_CRLF raw(2)           := HEXTORAW('0D0A');
      v_chunksize pls_integer := 8191 - UTL_RAW.LENGTH( v_CRLF );
    BEGIN
      c := DBMS_SQL.OPEN_CURSOR;
      DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
      DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
      --
      FOR j IN 1..col_cnt
      LOOP
        CASE rec_tab(j).col_type
        WHEN 1 THEN
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,4000);
        WHEN 2 THEN
          DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);
        WHEN 12 THEN
          DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);
        ELSE
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,4000);
        END CASE;
      END LOOP;
      -- --------------------------------------
      -- This part outputs the HEADER if needed
      -- --------------------------------------
      v_filehandle := UTL_FILE.FOPEN(upper(p_dir),p_header_file,p_utl_wra,32767);
      --
      IF p_gen_header = TRUE THEN
        FOR j        IN 1..col_cnt
        LOOP
          v_finaltxt := ltrim(v_finaltxt||p_delimiter||lower(rec_tab(j).col_name),p_delimiter);
        END LOOP;
        --
        -- Adding prefix if needed
        IF p_prefix IS NULL THEN
          UTL_FILE.PUT_LINE(v_filehandle, v_finaltxt);
        ELSE
          v_finaltxt := 'p_prefix'||p_delimiter||v_finaltxt;
          UTL_FILE.PUT_LINE(v_filehandle, v_finaltxt);
        END IF;
        --
        -- Creating creating seperate header file if requested
        IF NOT v_samefile THEN
          UTL_FILE.FCLOSE(v_filehandle);
        END IF;
      END IF;
      -- --------------------------------------
      -- This part outputs the DATA to file
      -- --------------------------------------
      IF NOT v_samefile THEN
        v_filehandle := UTL_FILE.FOPEN(upper(p_dir),p_data_file,p_utl_wra,32767);
      END IF;
      --
      d := DBMS_SQL.EXECUTE(c);
      LOOP
        v_ret := DBMS_SQL.FETCH_ROWS(c);
        EXIT
      WHEN v_ret    = 0;
        v_finaltxt := NULL;
        FOR j      IN 1..col_cnt
        LOOP
          CASE rec_tab(j).col_type
          WHEN 1 THEN
            -- VARCHAR2
            DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
            v_finaltxt := v_finaltxt || p_delimiter || v_v_val;
          WHEN 2 THEN
            -- NUMBER
            DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
            v_finaltxt := v_finaltxt || p_delimiter || TO_CHAR(v_n_val);
          WHEN 12 THEN
            -- DATE
            DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
            v_finaltxt := v_finaltxt || p_delimiter || TO_CHAR(v_d_val,p_dateformat);
          ELSE
            v_finaltxt := v_finaltxt || p_delimiter || v_v_val;
          END CASE;
        END LOOP;
        --
        v_finaltxt               := p_prefix || v_finaltxt;
        IF SUBSTR(v_finaltxt,1,1) = p_delimiter THEN
          v_finaltxt             := SUBSTR(v_finaltxt,2);
        END IF;
        --
        FOR i IN 1 .. ceil( LENGTH( v_finaltxt ) / v_chunksize )
        LOOP
          UTL_FILE.PUT_RAW( v_filehandle, utl_raw.cast_to_raw( SUBSTR( v_finaltxt, ( i - 1 ) * v_chunksize + 1, v_chunksize ) ), TRUE );
        END LOOP;
        UTL_FILE.PUT_RAW( v_filehandle, v_CRLF );
        --
      END LOOP;
      UTL_FILE.FCLOSE(v_filehandle);
      DBMS_SQL.CLOSE_CURSOR(c);
    END create_large_csv;
    
  • Export data from the table

    Hello. Is it possible to export data from a table in Oracle using SQL Loader? If Yes, can you tell a good examples?

    Hello

    Hello. Is it possible to export data from a table in Oracle using SQL Loader?

    No, with SQL * Loader, you can load data from external files into tables not export.

    coil c:\temp\empdata.txt
    sqlplus abc.sql (assumes that abc.sql runs select * from emp)
    spool off

    It cannot work like this, because the declaration of the COIL is not recognized outside the SQL * Plus the term.

    But, you can include the statement of the COIL in abc.sql like this:

    spool c:\temp\empdata.txt
    select * from emp;
    spool off
    

    Then, you just have to run the SQL script as follows:

    sqlplus  @abc.sql 
    

    However, I advise you to use Oracle SQL Developer, this is a free tool and with it you can export a Table in several types of format (html, xml, csv, xls,...).

    Please find attached a link to this tool:

    http://www.Oracle.com/technetwork/developer-tools/SQL-Developer/Overview/index.html

    Hope this helps.
    Best regards
    Jean Valentine

  • Can I import data from a database in a FrameMaker using ExtendScript document?

    I want to import the part of database information in a structured document in FrameMaker (XML). The document would be an illustrated parts catalog, built by merging the text in the document structured with Bill of material stored in a database and graphic files. ExtendScript for this, or do I have to study a different language for this programmatic approach to the construction of a document?

    There is no direct way to connect to a database with FrameMaker ExtendScript. It is possible to write code C++ to interact with scripts, so you could write some kind of connector in C++ that would work with ExtendScript. ExtendScript can work with XML files, then another solution is to export the data from the database in XML format and ExtendScript allows you to analyze and import it into FrameMaker.

    I'd take a serious look at FrameScript. FrameScript has built-in ODBC support, you can connect directly to your database and use SQL queries to get your data into FrameMaker. There also ActiveX is supported, so you can use ADODB technology to get data from your database. I did the import of the database in a bunch of my scripts over the years. Please let me know if you have any questions or comments. -Rick

  • Export data from the file in 3dsMax

    It is a kind of problem aside I have to deal with before I can contiune with what I spend in my previous thread.

    I've been reading around and I realized that for axonal HAVE I'll go with the implementation of nodes (zero in my 3dscene) for the AI to use. If I understand correctly, I need to export information about nodes in 3dsmax and save that in a Director text member? Well... How can I do this?
    Thank you

    After a quick glance, I think you can get useful data from both groups.
    Personally I'd still go to the simple geometry as nodes in first place. I don't think you will have much more control with it, but it is easier to work if you can see your nodes as objects in your w3d scene. Dummies are not as easy to spot.
    The nodes of the geometry is to be there forever. If everything works fine, you can always hide/delete (after their data storage) them.

  • Export data from the Oracle Test Manager test

    Hello

    I created a few test (req.s, tests etc.) data in my OTM. Suppose if iam resettlement OATS, how can I get the test data in the new OTM. Can I export these test data to a CSV (windows) so that I can use in important in OTM.
    Can someone help me in this topic?

    Alex, can you please?

    Thank you
    Sandeep.

    Sandeep

    I see, well, you could do a report and export all the test cases, but I think it will be a lot of your time and you would lose another users, attachments, custom projects etc. fields...

    If you need to re - install the database, the best thing to do is a back up and restore, I assume that you use the database default installed (Oracle XE), here are the instructions on how to do a back up and restore:

    http://www.Oracle.com/technology/software/products/database/XE/files/install.102/b25144/TOC.htm#BABJCFBD

    Concerning

    Alex

  • Export data from the zip with PC?

    Is it possible to export the data of the folio (creation with digital publishing suite) with a PC?

    Whenever I try to export the data-folio, the zip data disappear after completing the download.

    What do I need create the datas for PC/Mac, Tablet and Smartphone?

    You will need to have a Mac to build your application. As Bob mentions, in InDesign select Create App in the context menu of the Folio Builder Panel.

    You can design your content on a PC and then use the download command in the Folio Builder Panel to put it on our servers. Then, the Mac, you can save in the Panel with the same account and Create App from there.

    Neil

  • Export data from the ASO

    With Version 11.1.1.3, is it possible to export a slice of data from a cube ASO? How would you do so?

    The report didn't need of any reporting software. Its similar to a calc script writing and easy enough to use once you have a sample report. I think this is your best bet. I can provide a sample if you are interested.

  • Question about exporting data from Virtualbench.

    Hello

    I am new to the forums and VirtualBench and hoped that someone might be able to help.

    When I export data from the VirtualBench, I get 4 columns of data for the 2 channels. They are "1 Min", "1Max", "2 Min", "2Max.

    Example:







































    Timestamps (ns) 1 min 1 Max 2 min Max 2
    -3000600000 -0.205761317 0.12345679 -0.013168724 -0.001646091
    -2990598000 -0.205761317 0.12345679 -0.013168724 -0.003292181
    -2980596000 -0.205761317 0.12345679 -0.013168724 -0.003292181
    -2970594000 -0.205761317 0.12345679 -0.013168724 -0.001646091

    I don't understand what means min/max. I have not any spread. VirtualBench takes in fact several samples at each point?

    Thank you.

    In some places, VirtualBench application will automatically the peak of detection equipment.

    Peak - detect mode, over-samples scope and returns the minutes and the maximum voltage in each period the sample.

    You can manually control the sample mode by going to the settings of acquisition:

  • Import data from different DBs to HFM Application using FDQM

    Hi gurus

    1. how to import data from different databases to HFM Application using FDQM?
    Do we need to write scripts for integration in FDQM, or is there an alternative method, we need to do?

    concerning
    Dev

    Data import is long to explain,

    To be more precise,
    1. you would establish a connection with your source systems and destination where you pull the data.
    You can do this by registering adapters of integration for send_break_action source machines
    2. you would then upward some formats for importing, maps and tables of control.
    Please go through the Administrator's guide,

    One of the experts will help you better understand.

    Kind regards

    David Martin

  • Received the error when transferring data from the database file

    Hello...

    I have my using SOA 10.1.3.1.0. I am trying to transfer the data from the CSV of the oracle database.

    The settings of connection in file xml oc4j DBA adapter file in the path C:\product\10.1.3.1\OracleAS_1\j2ee\oc4j_soa\application-deployments\default\DbAdapter is shown below.

    < location connector-factory = name of the connector "ist/DB/DBConnection1" = "Adapter database" >
    < config-property name = "xADataSourceName" value = "jdbc/DBConnection1DataSource" / >
    < config-property name = "dataSourceName" value = "loc/DBConnection1DataSource" / >
    < config-property name = "platformClassName" value="oracle.toplink.platform.database.Oracle9Platform"/ >
    < config-property name = "usesNativeSequencing" value = "true" / >
    < config-property name = "sequencePreallocationSize" value = "50" / >
    < config-property name = "defaultNChar" value = "false" / >
    < config-property name = "usesBatchWriting" value = "true" / >
    < connection pooling using 'none' = >
    < / connection pooling >
    < use security-config 'none' = >
    < / security-config >
    < / connector-factory >


    I get the following error:

    < name of part = "summary" >
    < Summary >
    file:/C:/product/10.1.3.1/OracleAS_1/BPEL/domains/default/tmp/.bpel_FileToDb_v1.0_188277739ed1e0b720c1fefd0275d1c0.tmp/FileToAdapterService.WSDL [FileToAdapterService_ptt::insert (FiletodbCollection)] - SISM JCA Execute of operation "insert" has no reason to: could not create/access the TopLink Session.
    This session is used to connect to the data store. Caused by: loc/DBConnection1DataSource not found
    ; nested exception is:
    ORABPEL-11622
    Could not create/access the TopLink Session.
    This session is used to connect to the data store. [Caused by: loc/DBConnection1DataSource not found]
    See the first exception for the specific exception. You may need to configure the connection settings in the deployment descriptor (i.e. $J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml), and then restart the server. Caused by the Exception TOPLINK-7060 (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.ValidationException

    Description of the exception: could not acquire data source loc/DBConnection1DataSource

    Inner exception: javax.naming.NameNotFoundException: loc/DBConnection1DataSource not found.
    < / Summary >
    < / part >


    What is the error in the loc/DBConnection1DataSource line? Guys thank you in advance...


    Thank you...

    Published by: userus007 on January 2, 2010 17:16

    Published by: userus007 on January 2, 2010 17:18

    Visit similar thread oc4j - RA.xml and data - sources.xml

  • Reg: Export data of the physical database system standby.

    Hi all

    We have a standard edition one 11 GR 1 material oracle environment, I need to export the data from the physical monitoring system.

    If anyone can suggest me, how to do it safely (up state).

    Kind regards

    Konda.

    Oracle Data Guard is available only as a feature of Oracle Database Enterprise Edition. It is not available with Oracle database Standard edition.

    Then you must export data only from primary or you use EXP instead of EXPDP on the standby database. Because EXPDP create a temporary table export process duration.

    Concerning

    Mr. Mahir Quluzade

Maybe you are looking for

  • Download the Ribbon off my screen plugins update!

    I have a Power PC Mac that does everything that I need. When the Ribbon of 'update plug-ins' appeared on my screen I did my best to comply. But at least four plug-ins obsolete may not be updated until I buy a new computer. You'll make me look orange

  • External HD fat32 partition is not mounted

    I've updated to Yosemite to El Capitan 10.11.2. My external hard drive has 2 partitions, 1 used for Time Machine, the other partition formatted in Fat32. Everything works fine so far. I had to make some adjustments in SIP (csrutil toggle) to get my w

  • HP Pavilion g6 Notebook PC display limited access for wireless internet

    I have a problem with the connection Wireless in my laptop. My router is W-link. I tried everything but nothing happen please help me with the problem. My OS is win 8.1 Enterprise

  • HP Officejet 6500 E710n-z: how to get the hardware support for HP Officejet 6500 E710n-z

    I'm probably in the wrong forum, but I'm not anywhere else to go.  Just throw it out there and I hope someone has the answer. My very reliable Officejet printer has lost the ability to feed paper from the paper tray.  It is that decend on top of pape

  • BlackBerry Enhanced Gmail App smartphones?

    OK a little background- I had a couple of BB before... whe I got the Tour, I have supported all my data on my computer. When I went to the VZ store, they set up my phone for me, including my Gmail account. Once I had the home phone, I noticed that th