Write PDF files from database to file system

Hi,
I have a requirement of writing PDF files that are stored in Oracle 10g's BLOB column to the FILE SYSTEM using PL/SQL (Not java or any external stored Proc), since i need to write a shell script which will load the PDF files from database on a timely basis.
Could anyone suggest me the way of executing this?
Environment: Oracle 10G (10.2.0.1.0) with Windows 2003 server.
Regards,
Nagarjun.

You could try to use the UTL_FILE package that is able to read/write text and binary data in a file located on the box hosting the database instance.

Similar Messages

  • Product Instance Registration Error Message: "System Failure: Error while retrieving xml file from database"

    Hi Planning installation Gurus,
    Did u get any luck to resolve this problem as i am also facing same problem "Error creating instance" during install of Planning 9.3.1. i tried 30-50 times reconfiguration every time same problem..
    OS: Vista Premium
    SQL Server 2005
    Essbase:9.3.1
    Error Message: "System Failure: Error while retrieving xml file from database"
    Details of error:::::::::::::::::::::::::
    at com.hyperion.planning.event.HspSysExtChangeHandler.run(Unknown Source
    Can not get JDBC connection for SYS external changed actions.
    Can not get JDBC connection.
    java.lang.NullPointerException
    at com.hyperion.planning.sql.HspSQLImpl.getConnection(Unknown Source)
    at com.hyperion.planning.event.HspSysExtChangeHandler.actionPoller(Unkno
    wn Source)
    at com.hyperion.planning.event.HspSysExtChangeHandler.run(Unknown Source
    Can not get JDBC connection for SYS external changed actions.
    Can not get JDBC connection.
    java.lang.NullPointerException
    at com.hyperion.planning.sql.HspSQLImpl.getConnection(Unknown Source)
    at com.hyperion.planning.event.HspSysExtChangeHandler.actionPoller(Unkno
    wn Source)
    at com.hyperion.planning.event.HspSysExtChangeHandler.run(Unknown Source
    Can not get JDBC connection for SYS external changed actions.
    Can not get JDBC connection.
    Pls provide Solution

    Hi John,
    though i am trying with SQl server authentication with different user but still status is same of planningSystemDB.properties
    SYSTEM_DB_DRIVER=hyperion.jdbc.sqlserver.SQLServerDriver
    SYSTEM_DB_URL=jdbc:hyperion:sqlserver://neeraj-PC:1433
    SYSTEM_DB_USER=windowsAuthentication
    SYSTEM_DB_PASSWORD=CAFBAEFNBGEAABHEDOADFKADACBGBIFHBLCDFBAFFH
    SYSTEM_DB_CATALOG=plandb
    SYSTEM_DB_TYPE=SQL
    INSTANCE=
    my steps:
    Using SQL Server Management Studio
    Changed Widows authentication to SQL server authentication mode
    In SQL Server Management Studio Object Explorer, right-click the server, and then click Properties.
    On the Security page, under Server authentication, select the new server authentication mode, and then click OK.
    In the SQL Server Management Studio dialog box, click OK to acknowledge the requirement to restart SQL Server.
    In SQL Server Management Studio Object Explorer, right-click the server, and then click Properties.
    On the Security page, under Server authentication, select the new server authentication mode, and then click OK.
    In the SQL Server Management Studio dialog box, click OK to acknowledge the requirement to restart SQL Server.
    To restart SQL Server from SQL Server Management Studio
    To enable the sa login by using Management Studio
    In Object Explorer, expand Security, expand Logins, right-click sa, and then click Properties.
    On the General page, you might have to create and confirm a password for the sa login.
    On the Status page, in the Login section, click Enabled, and then click OK.
    In Object Explorer, expand Security, expand Logins, right-click sa, and then click Properties.
    On the General page, you might have to create and confirm a password for the sa login.
    On the Status page, in the Login section, click Enabled, and then click OK.}}}
    anything else should i change.................

  • Product Instance Registration Error: "System Failure: Error while retrieving xml file from database"

    Hi S9 installation Gurus,
    Please try to resolve this long awaited issue with Planning installation as this is purely configuration related issue.
    Detail of Problem:-
    After Susessful configuration of
    1) Foundation Services (Hyperion Shared Services)
    2) Essbase administration services
    3) Essbase Server
    4) Hyperion reporting and analysis
    5) Planning -----> Product options, Register with shared services, configure database, deploy to application server (Appache)
    Error Point: when i tick ckeck box in front of Product instance registration
    click next
    create instance
    click next
    instance name-Plan1
    Web tier host name: my machine name (neeraj-pc, as i installed locally all component of hyperion)
    server port: 8300 (system suggesting)
    tick on active instance
    click next
    Error Pop Up "System Failure: Error while retrieving xml file from database"
    Details of PlanningSystemDB (file :- \Hyperion\common\config\PlanningSystemDB.properties)
    SYSTEM_DB_DRIVER=hyperion.jdbc.sqlserver.SQLServerDriver
    SYSTEM_DB_URL=jdbc:hyperion:sqlserver://neeraj-PC:1433
    SYSTEM_DB_USER=puser
    SYSTEM_DB_PASSWORD=GGAKFJ
    SYSTEM_DB_CATALOG=p1db
    SYSTEM_DB_TYPE=SQL
    INSTANCE=
    Note: puser (SQL Authenticated user)
    Thanks
    Kumar
    Edited by: user10385300 on Dec 4, 2008 5:44 AM

    This has been resolved at :- Product Instance Registration Error Message: "System Failure: Error while retrieving xml file from database"
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • System Failure:-Error while retreiving xml file from database

    I install Planning 9.3.1 at Windows2003 server SP1 and MS SQL 2000 SP3A. In Hyperion Planning Instance Registration I take "System Failure:-Error while retreiving xml file from database" error in Configuration .
    Please help
    Thanks

    I also have the same error. Win2000 Server and MS SQL 2005.
    Maybe someone made request for official information from Oracle about this issue?
    I'd like to change MS SQL to Oracle 10g, I hope this can helps (if reason in RDBMS). But if reason in logic of scripts... I dont't know...

  • Error while retreiving xml file from database

    Hi-
    I am trying to configure Planning and getting the following error message at instance configuration step:
    "Error while retreiving xml file from database"
    We looked at PlanningSystemDB.properties, changes server name to its ip, reinstalled planning, made sure both auth methods are selected (sql server and windows), created new relational repository.. still the same error.
    Here is the contents of the configtool error file:
    (Dec 11, 2008, 04:36:44 PM), com.hyperion.planning.PIRegistrationPanelManager, ERROR, Exception :Error while retreiving xml file from database.
    (Dec 11, 2008, 04:37:09 PM), com.hyperion.planning.PIRegistrationPanelManager, ERROR, Exception :Error while retreiving xml file from database.
    (Dec 11, 2008, 04:38:41 PM), com.hyperion.planning.PIRegistrationPanelManager, ERROR, Exception :Error while retreiving xml file from database.
    (Dec 11, 2008, 04:39:07 PM), com.hyperion.planning.PIRegistrationPanelManager, ERROR, Exception :Error while retreiving xml file from database.
    (Dec 11, 2008, 04:39:12 PM), com.hyperion.planning.PIRegistrationPanelManager, ERROR, Exception :Error while retreiving xml file from database.
    (Dec 11, 2008, 04:39:22 PM), com.hyperion.planning.PIRegistrationPanelManager, ERROR, Exception :Error while retreiving xml file from database.
    (Dec 11, 2008, 04:40:46 PM), com.hyperion.cis.config.CmsRegistrationUtil, ERROR, Failed to authenticate user = admin
    (Dec 11, 2008, 04:41:05 PM), com.hyperion.cis.config.CmsRegistrationUtil, ERROR, Failed to authenticate user = admin
    (Dec 11, 2008, 04:48:28 PM), com.hyperion.cis.DBConfigurator, ERROR, Invalid SQL statement: begin transaction IF EXISTS (select * from sysobjects where id = object_id(N'[HSPSYS_PROPERTIES]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) DROP TABLE HSPSYS_PROPERTIES IF EXISTS (select * from sysobjects where id = object_id(N'[HSPSYS_APP_CLUSTER_DTL]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) DROP TABLE HSPSYS_APP_CLUSTER_DTL IF EXISTS (select * from sysobjects where id = object_id(N'[HSPSYS_APPLICATION]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) DROP TABLE HSPSYS_APPLICATION IF EXISTS (select * from sysobjects where id = object_id(N'[HSPSYS_DATASOURCE]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) DROP TABLE HSPSYS_DATASOURCE IF EXISTS (select * from sysobjects where id = object_id(N'[HSPSYS_CLUSTER]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) DROP TABLE HSPSYS_CLUSTER IF EXISTS (select * from sysobjects where id = object_id(N'[HSP_ACTION]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) DROP TABLE HSP_ACTION IF EXISTS (select * from sysobjects where id = object_id(N'[HSPSYS_PI_INFO]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) DROP TABLE HSPSYS_PI_INFO commit begin transaction CREATE TABLE HSP_ACTION ( ID INTEGER NOT NULL IDENTITY, CONSTRAINT PK_HSP_ACTION PRIMARY KEY(ID) , FROM_ID INTEGER, TO_ID INTEGER, ACTION_ID INTEGER, OBJECT_TYPE INTEGER, PRIMARY_KEY VARCHAR(255), ACTION_TIME DATETIME ); CREATE TABLE HSPSYS_CLUSTER ( CLUSTER_ID INTEGER NOT NULL, NAME VARCHAR(255) NOT NULL, DESCRIPTION VARCHAR(255), CONSTRAINT PK_HSPCLUSTER PRIMARY KEY(CLUSTER_ID) ); CREATE TABLE HSPSYS_DATASOURCE ( DATASOURCE_ID INTEGER NOT NULL, NAME VARCHAR(255) NOT NULL, DESCRIPTION VARCHAR(255), APP_ID INTEGER, RDB_SERVER_URL VARCHAR(255), RDB_TYPE VARCHAR(255) NOT NULL, RDB_CATALOG_NAME VARCHAR(255) NOT NULL, RDB_USER VARCHAR(255) NOT NULL, RDB_PASSWORD VARCHAR(255), RDB_DRIVER VARCHAR(255) NOT NULL, ESS_SERVER VARCHAR(255) NOT NULL, ESS_USER VARCHAR(255) NOT NULL, ESS_PASSWORD VARCHAR(255), CONSTRAINT PK_HSPDTASRC PRIMARY KEY(DATASOURCE_ID) ); CREATE TABLE HSPSYS_APPLICATION ( APP_ID INTEGER NOT NULL, NAME VARCHAR(255) NOT NULL, DESCRIPTION VARCHAR(255), DATASOURCE_ID INTEGER NOT NULL, CONSTRAINT FK_HSPAPP_DSID FOREIGN KEY(DATASOURCE_ID) REFERENCES HSPSYS_DATASOURCE, VERSION VARCHAR(255) NOT NULL, CONSTRAINT PK_HSPAPP PRIMARY KEY(APP_ID) ); CREATE TABLE HSPSYS_APP_CLUSTER_DTL ( APP_ID INTEGER NOT NULL , CONSTRAINT FK_HSP_APP_ID FOREIGN KEY (APP_ID) REFERENCES HSPSYS_APPLICATION , CLUSTER_ID INTEGER NOT NULL, CONSTRAINT FK_HSPCS_CLID FOREIGN KEY(CLUSTER_ID) REFERENCES HSPSYS_CLUSTER, CONSTRAINT PK_APP_CLSTR_DTL PRIMARY KEY(CLUSTER_ID, APP_ID) ); CREATE TABLE HSPSYS_PROPERTIES ( PROPERTY_ID INTEGER NOT NULL, OBJECT_ID INTEGER NOT NULL, PROPERTY_NAME VARCHAR(255) NOT NULL, PROPERTY_VALUE VARCHAR(255), CONSTRAINT PK_HSPPROP PRIMARY KEY(PROPERTY_ID, OBJECT_ID, PROPERTY_NAME) ); CREATE TABLE HSPSYS_PI_INFO ( XML_FILE NTEXT NOT NULL ); commit
    (Dec 11, 2008, 04:50:32 PM), com.hyperion.planning.PIRegistrationPanelManager, ERROR, Exception :Error while retreiving xml file from database.
    Thanks for any help.

    After spending 2+ hrs with Hyperion Support nothing got resolved.. Just to give more background on this problem, we originally reconfigured all Hyperion components to use different SQL server, that is when the problem started happening as soon as we got to Planning Instance Configuration. Could this be the situations when old server name is still somewhere in the system?.. Could this be Shared Services problem.
    Here is another quote from SharedServices_Security.log
    2008-12-12 15:08:48,249 [http-58080-Processor1] WARN com.hyperion.css.spi.impl.nv.NativeProvider.getHierarchicalRoleTree(Unknown Source) - Exception getting Child Roles in hierarchy due to Illegal or invalid id.dflt passed in. Please check the argument.
    2008-12-12 15:31:18,121 [main] WARN com.hyperion.css.common.configuration.CSSConfigurationImplXML.<init>(Unknown Source) - Skipping the validation of the configuration because the required validating parser library not found or errors in validation. This does not guarantee the proper initialization of the component.
    2008-12-12 15:31:29,808 [Thread-8] WARN com.hyperion.css.spi.impl.msad.MSADCacheUpdater.resolveCircularDependency(Unknown Source) - INFO: Time to resolve circular dependency on the Cache for provider: DIPORTAL is : 0
    2008-12-12 15:31:29,808 [Thread-8] WARN com.hyperion.css.spi.impl.msad.MSADCacheUpdater.refreshProviderCache(Unknown Source) - INFO: Time to build Cache for provider: DIPORTAL in millis is : 1016
    2008-12-12 15:31:30,823 [main] WARN com.hyperion.css.CSSAPIImpl.initialize(Unknown Source) - The system has already been configured; skipping attempt to configure the system again with the new config file /F:/Hyperion/deployments/Tomcat5/SharedServices9/config/CSS.xml.
    2008-12-12 15:31:41,229 [http-58080-Processor4] ERROR com.hyperion.css.CSSAPIImpl.initialize(Unknown Source) - Unable to get CSS.xml file or the file may be read only
    2008-12-12 15:31:41,229 [http-58080-Processor4] WARN com.hyperion.css.CSSAPIImpl.initialize(Unknown Source) - The system has already been configured; skipping attempt to configure the system again with the new config file /null.
    2008-12-12 15:38:01,938 [main] WARN com.hyperion.css.common.configuration.CSSConfigurationImplXML.<init>(Unknown Source) - Skipping the validation of the configuration because the required validating parser library not found or errors in validation. This does not guarantee the proper initialization of the component.
    2008-12-12 15:38:13,454 [Thread-8] WARN com.hyperion.css.spi.impl.msad.MSADCacheUpdater.resolveCircularDependency(Unknown Source) - INFO: Time to resolve circular dependency on the Cache for provider: DIPORTAL is : 0
    2008-12-12 15:38:13,454 [Thread-8] WARN com.hyperion.css.spi.impl.msad.MSADCacheUpdater.refreshProviderCache(Unknown Source) - INFO: Time to build Cache for provider: DIPORTAL in millis is : 813
    2008-12-12 15:38:35,453 [main] WARN com.hyperion.css.CSSAPIImpl.initialize(Unknown Source) - The system has already been configured; skipping attempt to configure the system again with the new config file /F:/Hyperion/deployments/Tomcat5/SharedServices9/config/CSS.xml.
    2008-12-12 15:42:09,776 [http-58080-Processor3] ERROR com.hyperion.css.CSSAPIImpl.initialize(Unknown Source) - Unable to get CSS.xml file or the file may be read only
    2008-12-12 15:42:09,776 [http-58080-Processor3] WARN com.hyperion.css.CSSAPIImpl.initialize(Unknown Source) - The system has already been configured; skipping attempt to configure the system again with the new config file /null.
    2008-12-12 15:42:09,776 [http-58080-Processor2] ERROR com.hyperion.css.CSSAPIImpl.initialize(Unknown Source) - Unable to get CSS.xml file or the file may be read only
    2008-12-12 15:42:09,776 [http-58080-Processor2] WARN com.hyperion.css.CSSAPIImpl.initialize(Unknown Source) - The system has already been configured; skipping attempt to configure the system again with the new config file /null.

  • "Error retrieving xml file from database"

    Hello All,
    I have installed and configured planning with Shared services. While I try to create an instance in Configuration Utility by entering the Instance Name, Host Name, Port (8300) and Click "Next", I get this error -
    *"System failure:Error retrieving xml file from database".*
    My RDBMS is - SQL Server 2005
    OS - Windows 2003 Server
    I am unable to work on planning for few months due to this error.. I would sincerely appreciate if someone can provide me a solution for this..
    Thanks much,
    Varma.

    Hi,
    Ive seen this before.
    If this is a new environment could you create a blank database and configure it as your System database? Then try again and you should be fine.
    I think you may have some invalid entries in your sys database.
    Seb
    www.taysols.com.au

  • Opening a PDF document from an exe file

    How can I open a PDF document from a executable file??
    A friend has told me to use this:
    fscommand ("exec", "anexo01.bat")
    but it opens a black pop up window before opening the
    program..... and it don´t seems to be a good solution.....
    can someone help me on this?
    thanks!!
    Sofia
    thanks for the help.

    > How can I open a PDF document from a executable file??
    > A friend has told me to use this:
    > -------------------------------------------------
    > fscommand ("exec", "anexo01.bat")
    > -------------------------------------------------
    > but it opens a black pop up window before opening the
    program..... and it
    > don´t seems to be a good solution.....
    > can someone help me on this?
    You can't avoid the echo box, unfortunate but that's the
    compromise if you go with
    the BAT file method.
    For many years I have been using Flash Jester tool call
    JStart. Works like charm
    all the way, no extra pop up windows :)
    http://flashjester.com/?section=tricks_jtools_jstart
    JStart will allow you to not only launch a program, but use
    parameters to make the
    program open files, perform special actions and just about
    anything you can use
    parameters for. You can also choose to launch files with
    their default associated
    program.
    Another solution is provided by by Rick Turoczy, it's pretty
    old but should still
    work. Perhaps give it a try.
    http://www.flashgeek.com/tutorials/07_launchapp_01.asp
    Easy to use tool that allow you to launch basically anything
    from the projector.
    As long as there is system default application supporting
    particle file.
    Best Regards
    Urami
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • WHAT IF I DELETE THE SYSTEM06.DBF FILE FROM DATABASE /U01/DB/apps_ sid / system06.dbf and how to recover it in apps

    WHAT IF I DELETE THE SYSTEM06.DBF FILE FROM DATABASE /U01/DB/apps_<sid>/ system06.dbf and how to recover it in apps

    Hi,
    First of all you must Open a ticket with oracle Support and explore the options
    You can use this note to fix it:
    RECOVERING FROM A LOST DATAFILE IN A UNDO TABLESPACE [ID 1013221.6]
    If you is Unable to Drop Undo tablespace Since Undo Segment is in Needs Recovery
    You can Upload the following trace file while opening the ticket
    SQL>Alter session set tracefile_identifier='corrupt';
    SQL>Alter system dump undo header "<new of undo segment in recover status>";
    Go to udump
    ls -lrt *corrupt*
    Upload this trace file
    Also upload the alert log fileRegards,
    Levi Pereira
    Edited by: Levi Pereira on Nov 29, 2011 1:58 PM

  • Hello.  May I ask:  I am using Acrobat 6.0.2, and having trouble formatting a PDF created from multiple (jpeg) files.  Each page is formatted to A4 size, portrait.  But when I create the PDF, each sheet appears as tiny, in the middle of a huge white page.

    Hello.  May I ask:  I am using Acrobat 6.0.2, and having trouble formatting a PDF created from multiple (jpeg) files.  Each page is formatted to A4 size, portrait.  But when I create the PDF, each sheet appears as tiny, in the middle of a huge white page.  I cannot seem to find any controls to adjust this.  Any advice appreciated.

    Thanks CtDave, for the further info.  Unfortunately, those suggestions are not working, which is strange.
    ....Until last week, I used to make multi-page PDFs straight from Photoshop: File > Automate > Make PDF.  One simply choses the files, orders them, and creates a PDF.  (Resolution doesn't matter; 300 DPI is no problem.)  However, my new Photoshop CS5 does not have the option in Automate.
    What I've done, seeing as Acrobat is letting me down, is use Bridge (new to me) to create the PDF.  It worked without a problem, but seems like more work than the old PS method.  I will download a newer version of Acrobat to see if that makes any difference.
    .....Also, thanks Test Screen Name:  I agree with you that jpeg is irrelevant, and that one can make a PDF from Photoshop (Print > Save As - pdf).  But that only works for SINGLE PAGE pdf, not multiple pages as far as I can tell.
    Kind regards,
    Prince Nuada

  • To fetch XML files from database  AND regarding barcodes

    Hi !!
    I am very new to this forum...this is my first mail to this forum...
    1.) Actually I would like to know how to fetch XML files from database and then how to get the datas from that XML files???Right now i am using struts frame work...If u anyone send some sample code for this one,it is Very helpful for me.....
    2.)Using java ,how to generate Barcodes?In database I have Some serial number.While I try to display the serial number in Front end ,I should display with Barcode Corresponding to that number.Plz send some sample codes if u have.....
    Thanks in ADVANCE,

    PonJAVA wrote:
    Hi !!
    I am very new to this forum...this is my first mail to this forum...
    1.) Actually I would like to know how to fetch XML files from databaseStart with a JDBC tutorial. Check out DAO Pattern and Hibernate as well.
    and then how to get the datas from that XML files???Google Java & XML (there are many ways to do this
    Right now i am using struts frame work...Okay...
    If u anyone send some sample code for this one,it is Very helpful for me..... You haven't provided any detail regarding your task so there's no way anyone could post code for you.
    2.)Using java ,how to generate Barcodes?Search Google
    In database I have Some serial number.While I try to display the serial number in Front end ,I should display with Barcode Corresponding to that number.Plz send some sample codes if u have.....Try a JSP/Servlet tutorial.

  • How to execute a  .sql file from a batch file

    Hi all
    I've to take backup of a database weekly twice on every wednesday & Friday @ 5pm IST. I've written a hot backup script, which works every well.
    now i want to automate the script. ie i want this script to run on wednesday & friday @ 5pm without any human interfearance ie with out actually any1 executing this script.
    i created a batch file prod.bak with the following lines
    @echo off
    set oracle_sid=testdb
    set oracle_home=d:\oracle\ora92
    sqlplus /nolog
    connect sys as sysdba/oracletest@testdb
    this batch file when eexecuted connects me to sql prompt.
    Now i want to execute my backup script bkp.sql automatically when it is connected to sql prompt.
    (i tried with these lines in the above batch file...
    call bkp.sql---it just opens the bkp.sql file in notepad & displays the script
    start bkp.sql---same as call
    connect / as sysdba/pwd@[email protected] --- does not work simply remains a the sql prompt.
    At 17:00 /Every:w,f "d:\bkp.sql"---does not work simply remains at the sql promt.)
    Can any1 let me know what should i write in the batch file that will execute the bkp.sql file automatically after it gets connected to sql prompt. M using oracle 9i.
    I'll manage he time through windows utility of scheduling task.. Let me know how to execute the .sql file from a batch file.
    Thanks
    Tripti

    Try
    sqlplus "sys/oracletest as sysdba" @bpk.sql
    Working locally, and having set the ORACLE_SID, you don't need to specify the SqlNet alias (@testdb).
    Remember to put an exit at the end of the bpk.sql script.

  • Write blob data from database to unix server

    Hi all,
    I need to send the attachment file into the mail. I have a header form in which I have implemented Download/Upload functionality using Apex user guide. When ever a user fill all the entries and submit the form then some field information along with attachment I need to send to the user.
    I mean when ever user hit the submit button it should take blob data from my custom table tmp_downlod_files and send to the user as an attachment.
    I have searched the post and got lot information but not able to get succeed.
    I have implemented java stored procedure for sending automatic mail when user is submitting the form but what I need is to take blob content from database and send as an attachment.
    1: So I need to write blob content from custom table to unix server in some location and from there I need to attach that file.
    2: the java store which I have implemented for sending automatic mail is working and one argument is attachment which I am passing null for now. So mail is working how to write the file from database to unix server and send as an attachment.
    What I did for writing file from database to unix server:
    1:
    CREATE OR REPLACE PROCEDURE trx_blob_to_file (l_header_id IN NUMBER)
    IS
    BEGIN
    FOR rec_picture IN (SELECT ID
    FROM TMP.tpx_download_files
    WHERE header_id = l_header_id
    AND mime_type LIKE ('image' || '%'))
    LOOP
    DECLARE
    l_out_file UTL_FILE.file_type;
    l_buffer RAW (32767);
    l_amount BINARY_INTEGER := 32767;
    l_pos INTEGER := 1;
    l_blob_len INTEGER;
    p_data BLOB;
    file_name VARCHAR2 (256);
    BEGIN
    SELECT blob_content, filename
    INTO p_data, file_name
    FROM tpx_download_files
    WHERE ID = rec_picture.ID;
    l_blob_len := DBMS_LOB.getlength (p_data);
    l_out_file :=
    UTL_FILE.fopen ('/home/oracle/interfaces/out/upld',
    file_name,
    'wb',
    32767
    WHILE l_pos < l_blob_len
    LOOP
    DBMS_LOB.READ (p_data, l_amount, l_pos, l_buffer);
    IF l_buffer IS NOT NULL
    THEN
    UTL_FILE.put_raw (l_out_file, l_buffer, TRUE);
    END IF;
    l_pos := l_pos + l_amount;
    END LOOP;
    UTL_FILE.fclose (l_out_file);
    EXCEPTION
    WHEN OTHERS
    THEN
    IF UTL_FILE.is_open (l_out_file)
    THEN
    UTL_FILE.fclose (l_out_file);
    END IF;
    END;
    END LOOP;
    END;
    2: I have written a PL/SQL process and calling the above procedure on SUBMIT:
    DECLARE
    l_header_id NUMBER;
    l_filename VARCHAR2 (200);
    BEGIN
    SELECT header_id, filename
    INTO l_header_id, l_filename
    FROM tpx_download_files
    WHERE header_id = :p35_sr_header_id;
    trx_blob_to_file (l_header_id);
    END;
    But it is not writing the file from database to unix server.
    If I can get how to make working to write file from database to unix server then I will hopefully can send an attachment.
    3; I have given
    GRANT EXECUTE ON TPX_BLOB_TO_FILE TO PUBLIC.
    And
    GRANT EXECUTE ON UTL_FILE TO PUBLIC.
    Where I am doing wroung can anyone guide me or any other approach is appreciated.
    I am already late so I need soon. Please help.

    Hi all,
    I need to send the attachment file into the mail. I have a header form in which I have implemented Download/Upload functionality using Apex user guide. When ever a user fill all the entries and submit the form then some field information along with attachment I need to send to the user.
    I mean when ever user hit the submit button it should take blob data from my custom table tmp_downlod_files and send to the user as an attachment.
    I have searched the post and got lot information but not able to get succeed.
    I have implemented java stored procedure for sending automatic mail when user is submitting the form but what I need is to take blob content from database and send as an attachment.
    1: So I need to write blob content from custom table to unix server in some location and from there I need to attach that file.
    2: the java store which I have implemented for sending automatic mail is working and one argument is attachment which I am passing null for now. So mail is working how to write the file from database to unix server and send as an attachment.
    What I did for writing file from database to unix server:
    1:
    CREATE OR REPLACE PROCEDURE trx_blob_to_file (l_header_id IN NUMBER)
    IS
    BEGIN
    FOR rec_picture IN (SELECT ID
    FROM TMP.tpx_download_files
    WHERE header_id = l_header_id
    AND mime_type LIKE ('image' || '%'))
    LOOP
    DECLARE
    l_out_file UTL_FILE.file_type;
    l_buffer RAW (32767);
    l_amount BINARY_INTEGER := 32767;
    l_pos INTEGER := 1;
    l_blob_len INTEGER;
    p_data BLOB;
    file_name VARCHAR2 (256);
    BEGIN
    SELECT blob_content, filename
    INTO p_data, file_name
    FROM tpx_download_files
    WHERE ID = rec_picture.ID;
    l_blob_len := DBMS_LOB.getlength (p_data);
    l_out_file :=
    UTL_FILE.fopen ('/home/oracle/interfaces/out/upld',
    file_name,
    'wb',
    32767
    WHILE l_pos < l_blob_len
    LOOP
    DBMS_LOB.READ (p_data, l_amount, l_pos, l_buffer);
    IF l_buffer IS NOT NULL
    THEN
    UTL_FILE.put_raw (l_out_file, l_buffer, TRUE);
    END IF;
    l_pos := l_pos + l_amount;
    END LOOP;
    UTL_FILE.fclose (l_out_file);
    EXCEPTION
    WHEN OTHERS
    THEN
    IF UTL_FILE.is_open (l_out_file)
    THEN
    UTL_FILE.fclose (l_out_file);
    END IF;
    END;
    END LOOP;
    END;
    2: I have written a PL/SQL process and calling the above procedure on SUBMIT:
    DECLARE
    l_header_id NUMBER;
    l_filename VARCHAR2 (200);
    BEGIN
    SELECT header_id, filename
    INTO l_header_id, l_filename
    FROM tpx_download_files
    WHERE header_id = :p35_sr_header_id;
    trx_blob_to_file (l_header_id);
    END;
    But it is not writing the file from database to unix server.
    If I can get how to make working to write file from database to unix server then I will hopefully can send an attachment.
    3; I have given
    GRANT EXECUTE ON TPX_BLOB_TO_FILE TO PUBLIC.
    And
    GRANT EXECUTE ON UTL_FILE TO PUBLIC.
    Where I am doing wroung can anyone guide me or any other approach is appreciated.
    I am already late so I need soon. Please help.

  • Is there a way to run a script to create an RPD file from MDS XML files

    We would be interested in using the MDS XML format for the RPD file in saving it in our Subversion source code control system, and I have seen how to do this in the User documentation.
    Our question is whether or not there is a way to use a command line tool to recreate the rpd file without having to use the Admin tool, so that we can automate the deployment of the RPD file from source code control to QA and Production environments.
    If we check in the RPD file directly, then there is a way to automate the process, but we would prefer to use the MDS XML format since this allows us to save changes in text format, not binary, but we still need to be able to automate the process.
    In the Oracle Fusion Middleware XML Schema Reference for Oracle Business Intelligence Enterprise Edition document, I have found that there is a way to automate the creation of the MDS XML files from an RPD file using this command:
    biserverxmlgen -M -R repository_pathname [-P password] -D output_directory [-8] [-N] [-Q|-S]
    So my question is basically is there a way to reverse this process, to use some command line tool (or Weblogic Scripting or some other mechanism) to create the RPD file from the MDS XML files? Are there options on the biserverxmlexec command that will do what I am asking?

    Hey dmfairley,
    Thanks for the question. You can absolutely export the project as .mp3, as outlined in this resource:
    GarageBand Help: Export songs to disk
    http://help.apple.com/garageband/mac/10.0/#gbnd7cbf5ed9
    Export songs to disk
    You can export a project to your computer as a stereo audio file.
    Exported files can be reused in GarageBand to save processing resources by replacing or bypassing multiple regions, instruments, and effects. They can also be used with other music applications and devices, posted on the Internet (on a webpage, or in the iTunes Store, for example), added to an iTunes playlist, or uploaded to a mobile device such as iPhone or iPad.
    1. Choose Share > Export Song to Disk.
    2. To rename the exported file, select the name in the Save As field, then enter a new name.
    3. Choose a location to save the exported file from the Where pop-up menu.
    4. Select the format for the exported file (AAC, MP3, or AIFF).
    5. Choose the quality setting for the exported file from the Quality pop-up menu.
    6. Click Export.
    Thanks,
    Matt M.

  • Reading a Compressed File from a ZIP File, which is an entry of ZIP File

    Hello, Experts,
    Would it be possible somebody to help me with code example for the following problem?
    I want to read a compressed file from a ZIP file, which is an entry of ZIP File, without extacting/writing files on file system. Is this possible?
    Lets say we have a ZipFile1. There is ZipFile2 inside ZipFile1. And inside ZipFile2 is FileA. The scenario is reading FileA without extracting on file system.
    Thank you in advance for your help.
    Cheers
    RADY

    The classes you want to be using are java.util.zip.ZipInputStream and and ZipEntry from the same package. Construct the ZipInputStream with the input you have for the outer zip. Loop with ZipInputStream.getNextEntry until you find the inner zip you're looking for - that method returns a ZipEntry, and you get the name of the zip entry with ZipEntry.getName. Read the ZipInputStream from that point into some buffer, and read that buffer into a new ZipInputStream - rinse and repeat until you have the contents of the file in the zip in the zip...

  • How to create a .DLL file from a .C file ?

    Hi everybody
    I'm looking for a method how to create a .DLL file from a .C file .That Dll file will be used to perform a board to measure voice quality accoding to the international standard named PESQ (perceptual evaluation of speech qualty) P.862.
    Can anyone help to start dealing with Dlls and give some advices to avoid errors ?
    thx
    Attachments:
    source.zip ‏37 KB

    Hi sinaps,
    You mention that you want to create a DLL from a .C file. Just to clarify, are you using C (.c file) or C++ (.cpp) to write your code?
    Also, if you are using C++, are you using Visual Studio? (The reason I ask is because this forum is geared towards Measurement Studio, which is an add on to Microsoft Visual Studio).
    That being said,
    If you are using C: National Instruments provides an ANSI C Application Development Environment called LabWindows/CVI which makes building dlls a snap. It has templates for DLLs and you can build them either as stdcall or cdecl dlls.
    Developer Zone Tutorial: Building a DLL with LabWindows/CVI 8.5 for use with LabVIEW 8.5
    If you are using Visual C++: Look at the link that Al provided earlier.
    MSDN: Walkthrough: Creating and Using a Dynamic Link Library
    If you aren't using CVI or Visual Studio, then really the best bet is to do a google search for "Create C DLL" or post or a forum for the appropriate environment that you are using.
    Thanks!
    Message Edited by Jervin_J on 03-14-2009 02:02 PM
    Jervin Justin
    NI TestStand Product Manager

Maybe you are looking for