Stored procedure : spool to output file

i have to spool data from a stored proc to a csv file.I am using dbms_output.put command as i have mulitiple things to put in a row , comma delimited
My proc looks like this
create or replace proc xyz
declare
cursor c is select x y z .....
form
d f f f
where ....
variable declaration
begin
someting something ..
for rec in cursor
loop
dbms_output.put(x1||',');
dbms_output.put(x2||',');
dbms_output.put(x3||',');
dbms_output.put(x4||',');
dbms_output.NEW_LINE;
endloop
This does not seem to be working ,Can you please tell me the correct way to do so .
I need a comma delimited file at the end .

I cannot use util_file .
I am ussing dbms_output.put . Thats fine .
i am spooling currently
I want to know how I can set the SET variables that only the dbms_output.put variables are spooled to the .
When you do spool get all the command s?.
Currently i am doing this
$ORACLE_HOME/bin/sqlplus -s <<EOI
$CONNECT_STR
WHENEVER SQLERROR EXIT FAILURE;
SET FEED OFF TERM OFF
SET SERVEROUTPUT ON
SPOOL $SQL_LOG
BEGIN
${PROCESS_SCHEMA_NM}.${STORED_PROC}.CONVERT_FLEX_2_TIMESHEET;
END;
is this correct ?

Similar Messages

  • Spool an output file to dynamic filename

    Hi.
    Let say I have an Oracle Script as following:
    spool c:\hms_report\HMS.xls
    SELECT
    field1||chr(9)||field2
    from table1;
    spool off
    exit
    Question:
    Currently the output file will be HMS.xls
    If I run the script thrice a day, the HMS.xls will be overwrite.
    Is there any way to name the output file to be HMS+sysdate ie: If I run the script on 05-Nov-2002 09:00,
    the output file name will be HMS051120020900.xls
    where 05 = dd
    11 = mm
    2002 = yyyy
    0900 = hhmi
    Thanks.

    Have you actually tried what you proposed below? I think not. And I don't see that working. Still, if you do succed like
    you have proposed, please tell me.This works, see this SQL*Plus session:
    SQL> column file_name new_value fname noprint
    SQL> select 'HMS'||TO_CHAR(SYSDATE, 'DDMONYYYYHH24MI')||'.xls' file_name from dual ;
    1 row selected.
    SQL> prompt &&fname
    HMS05NOV20020908.xls
    SQL> spool &&fname
    SQL> select sysdate from dual ;
    SYSDATE
    05-NOV-2002
    1 row selected.
    SQL> spool off
    SQL> exit
    Disconnected from Oracle8i Enterprise Edition Release 8.1.7.4.1 - Production
    With the Partitioning option
    JServer Release 8.1.7.4.1 - Production
    C:\TEMP\Test>dir
    Volume in drive C is Windows NT 4.0
    Volume Serial Number is F8F6-BE0C
    Directory of C:\TEMP\Test
    05-11-02  09:19a        <DIR>          .
    05-11-02  09:19a        <DIR>          ..
    05-11-02  09:19a                   378 HMS05NOV20020908.xls
    05-11-02  09:18a                   139 script.sql
                   4 File(s)            517 bytes
                                628,746,240 bytes free
    C:\TEMP\Test>type HMS05NOV20020908.xls
    SQL> select sysdate from dual ;
    SYSDATE
    05-NOV-2002
    1 row selected.
    SQL> spool off
    C:\TEMP\Test>

  • Stored procedure, returning array output

    i am new to oracle and stored procedure and i have tried to do this but, still no luck, can anyone help me out?
    my stored procedure & package is as follows;
    create or replace package prebooking
    is
        type tr_contract_data
        is
            record (
                    custcode  customer_all.custcode%TYPE        ,
                    des       rateplan.des%TYPE                 ,
                    dn_num    directory_number.dn_num%TYPE      ,
                    cd_sm_num contr_devices.cd_sm_num%TYPE
        type tt_contract_data
        is
            table of tr_contract_data
            index by binary_integer;
        procedure customer_data (
                                    pc_custcode             in  customer_all.custcode%TYPE,
                                    pc_customer_name        out varchar2                  ,
                                    pc_customer_address_1   out varchar2                  ,
                                    pc_customer_address_2   out varchar2                  ,
                                    pc_user_lastmod         out varchar2
        procedure contract_data (
                                    pc_custcode             in  customer_all.custcode%TYPE,
                                    pt_contract_data        out tt_contract_data
    end prebooking;
    drop public synonym prebooking;
    create public synonym prebooking for prebooking;
    grant execute on prebooking to wpa;
    -- EOF: PREBOOKING.plh
    create or replace package body prebooking
    is
        procedure customer_data (
                                    pc_custcode             in  customer_all.custcode%TYPE,
                                    pc_customer_name        out varchar2                  ,
                                    pc_customer_address_1   out varchar2                  ,
                                    pc_customer_address_2   out varchar2                  ,
                                    pc_user_lastmod         out varchar2
        is
            cursor c_customer_data ( pc_custcode customer_all.custcode%TYPE )
            is
                select ccline1  || ' ' || ccfname || ' ' || cclname         customer_name,
                       ccstreet || ' ' || ccaddr2 || ' '     || ccaddr3 ||
                                   ' ' || cccity  || ' zip ' || cczip   ||
                                   ' ' || ccline4                           customer_address_1,
                       ccstate  || ' ' || ccline6                           customer_address_2,
                       b.user_lastmod                                       user_lastmod
                from ccontact_all a,
                     customer_all b
                where b.customer_id = a.customer_id
                  and a.ccbill = 'X'
                  and b.custcode = pc_custcode;
        begin
            open c_customer_data ( pc_custcode );
            fetch c_customer_data into pc_customer_name     ,
                                       pc_customer_address_1,
                                       pc_customer_address_2,
                                       pc_user_lastmod      ;
            close c_customer_data;
        end customer_data;
        procedure contract_data (
                                    pc_custcode             in  customer_all.custcode%TYPE,
                                    pt_contract_data        out tt_contract_data
        is
            cursor c_contract_date ( pc_custcode customer_all.custcode%TYPE )
            is
                select h.custcode,
                       g.des,
                       e.dn_num,
                       d.cd_sm_num
                from curr_co_status      a,
                     contract_all        b,
                     contr_services_cap  c,
                     contr_devices       d,
                     directory_number    e,
                     rateplan            g,
                     customer_all        h
                where h.customer_id = b.customer_id
                  and b.co_id = a.co_id
                  and b.co_id = c.co_id
                  and b.co_id = d.co_id
                  and c.dn_id = e.dn_id
                  and b.tmcode = g.tmcode
                  and c.cs_deactiv_date is null
                  and h.custcode = pc_custcode;
        begin
            for c in c_contract_date ( pc_custcode )
            loop
                pt_contract_data (nvl (pt_contract_data.last, -1) + 1).custcode  := c.custcode ;
                pt_contract_data (     pt_contract_data.last         ).des       := c.des      ;
                pt_contract_data (     pt_contract_data.last         ).dn_num    := c.dn_num   ;
                pt_contract_data (     pt_contract_data.last         ).cd_sm_num := c.cd_sm_num;
            end loop;
        end contract_data;
    end prebooking;
    -- EOF: PREBOOKING.plhand i am using the following php code to do this
    <?php
      $conn=OCILogon("USER", "USER", "DB");
      if ( ! $conn ) {
         echo "Unable to connect: " . var_dump( OCIError() );
         die();
      $collection_name = 1.1;     
      $stmt = OCIParse($conn,"begin PREBOOKING.CONTRACT_DATA(:INN, :OUTT); end;");
      OCIBindByName($stmt, ":INN", $collection_name, 200);
      //OCIBindByName($stmt, ":", $collection_desc, 100);
      $blobdesc = OCINewDescriptor($conn, OCI_D_LOB);
      OCIBindByName($stmt, ":OUTT", $blobdesc, -1, OCI_B_BLOB);
      $blobdesc->WriteTemporary($binary_junk, OCI_B_BLOB);
      OCIExecute($stmt);
      OCILogoff($conn);
    ?>the error i get when i run this code is;
    Warning: OCI-Lob::writetemporary() [function.writetemporary]: Cannot save a lob that is less than 1 byte in C:\apachefriends\xampp\htdocs\POSP\oci53.php on line 18
    Fatal error: Call to undefined function OCIDefineArrayOfStruct() in C:\apachefriends\xampp\htdocs\POSP\oci53.php on line 19

    Hi Varun,
    To combine the first xml-formatted column to one XML, If you want to do that in SQL server, you can reference the below sample.
    CREATE PROC proc1 -- the procedure returning the resultset with 3 columns
    AS
    DECLARE @XML1 VARCHAR(MAX),
    @XML2 VARCHAR(MAX),
    @XML3 VARCHAR(MAX);
    SET @XML1='<person><name>Eric</name></person>'
    SET @XML2='<book><name>war and peace</name></book>'
    SET @XML3='<product><name>product1</name></product>'
    SELECT @XML1 AS col1,1 AS col2,2 AS col3
    UNION ALL
    SELECT @XML2,2,3
    UNION ALL
    SELECT @XML3,2,3
    GO
    CREATE PROC proc2
    AS
    DECLARE @TbL TABLE(id INT IDENTITY, col1 VARCHAR(MAX),col2 INT,col3 INT)
    INSERT INTO @TbL EXEC proc1
    SELECT id as '@row' ,cast(col1 as xml) FROM @TbL FOR XML PATH('XML'),TYPE
    GO
    EXEC proc2
    DROP PROC proc1,proc2
    /*output
    <XML row="1">
    <person>
    <name>Eric</name>
    </person>
    </XML>
    <XML row="2">
    <book>
    <name>war and peace</name>
    </book>
    </XML>
    <XML row="3">
    <product>
    <name>product1</name>
    </product>
    </XML>
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • Calling Stored Procedure with Boolean Output Parameter

    Hi all,
    I'm running into an issue (or is it a BUG) when calling a Database Stored Procedure that has an output parameter of the boolean type.
    procedure proc(p_text in varchar2, p_result out boolean)
    is
    .....I use the following 'standard' code (developer guide 36-19 36-20) to invoke this procedure from my application module.
            try {
                // 1. Define the PL/SQL block for the statement to invoke
                String stmt = "begin proc(?,?); end;";
                // 2. Create the CallableStatement for the PL/SQL block
                st = getDBTransaction().createCallableStatement(stmt, 0);
                // 3. Register the positions and types of the OUT parameters
                st.registerOutParameter(2, Types.BOOLEAN);
                // 4. Set the bind values of the IN parameters
                st.setObject(1, "Some text");
                // 5. Execute the statement
                st.executeUpdate();
                ..............................As soon as 'st.registerOutParameter(2, Types.BOOLEAN);' is invoked I run into a SQLexception. "Invalid ColumnType: 16". Obviously 16 refers to Types.BOOLEAN.
    [edit by Luc]
    SOLUTION / WORKAROUND
    To answer my own question.
    It looks like BOOLEAN output parameters are not supported. I just Read "Appendix D Troubleshooting" of the Oracle® Database JDBC Developer's Guide and Reference 10g Release 2 (10.2).
    I found that JDBC drivers do not support the passing of BOOLEAN parameters to PL/SQL stored procedures. If a PL/SQL procedure contains BOOLEAN values, you can work around the restriction by wrapping the PL/SQL procedure with a second PL/SQL procedure that accepts the argument as an INT and passes it to the first stored procedure. When the second procedure is called, the server performs the conversion from INT to BOOLEAN.
    I'm not very happy with this but I guess I've no choice.
    Regards Luc
    Edited by: lucbors on Nov 30, 2010 10:37 AM

    fyi
    Related to the solution/workaround posted by Luc.
    see "Do Oracle's JDBC drivers support PL/SQL tables/result sets/records/booleans? "
    at http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#34_05
    regards
    Jan Vervecken

  • Stored Procedure with Input & output parameter as XML

    Hi
    I have a requirement wherein i need to have a stored procedure with accepts huge XML from Java and the SP has to process all the records in the XML and return XML output with some messages in it.
    Currenty, I have a stored procedure to process the xml stored in Oracle Database.
    I am using the following SQL statement to read the data from the XML column.
    select xmltest1.id,xmltest1.name
      from xmltest,
           XMLTABLE(
              XMLNamespaces(default 'syncpsna/schemas'),
              '/XMLTestRequest/insert/row'
                    PASSING xmltest.data_xml
                    COLUMNS
                    "ID" number(10) PATH 'id',
                    "NAME" varchar2(50) PATH 'name') xmltest1
    where xmltest.id = 2;I want to execute similary queries to fetch data from the XML Passed as an input parameter from JAVA.
    if i could get some examples of reading the XML and sending the xml back to the calling program.
    Regards

    Hi,
    if i could get some examples of reading the XML and sending the xml back to the calling program.What kind of process do you want to perform on the input XML?
    You said "reading", but for what purpose? Storing data in the database, or just transform the XML into another form?
    Anyway, you'll probably need a function, something like :
    create or replace function processXML (inputXML in xmltype)
    return xmltype
    is
      outputXML xmltype;
    begin
    -- process inputXML here, and construct outputXML
    return outputXML;
    end;Back in Java, you can use the oracle.xdb.XMLType class to map the XMLType SQL datatype to a Java object and manipulate it.

  • Writing from Stored Procedure directly into a file...

    Hi guys,
    I would like to write the results of a stored procedure into a file. Indeed, I am calling a Stored Procedure from a script and I would like to write the result of that procedure to a file and not a table.
    Thanks guys,
    Pipoca

    Hi,
    The UTL would be nice, but since I am calling the procedure from a unix script and *I wanted to keep the file in the unix machine* I don't believe this is the solution.UTL_FILE - will refers to a directory - which resides on Server - I Hope your DB is placed on Unix and you script is exeucted from their only. Then obviously your resulted file and source exits on unix machine only.
    HTH
    - Pavan Kumar N
    OCP- Oracle 9i/10g
    http://oracleinternals.blogspot.com

  • ESB calling stored procedures

    Hi,
    I am trying to invoke a stored procedure from a ESB Routing Service. I have done mapping from the input schema to Stored procedure schema.
    Input xml looks like this,
    <CRequest xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.doe.gov/strs">
                        <Transaction>
                             <transactionID>0</transactionID>
                             <sourceSystemID>STRIPES</sourceSystemID>
                             <transactionDate>2007-07-24T15:24:52-04:00</transactionDate>
                             <SystemAccess>
                                  <userID/>
                                  <password/>
                             </SystemAccess>
                        </Transaction>
                        <Requisition>
                             <ORIGIN>PRISM</ORIGIN>
                             <REQUISITIONNUM>FRANK-REQ-001</REQUISITIONNUM>
                             <RequisitionLine>
                                  <ITEMNUM>1</ITEMNUM>
                                  <SEQNUM>2</SEQNUM>
                                  <Shipment>
                                       <SHIPTOADDR_CODE>5896383</SHIPTOADDR_CODE>
                                       <SHIPTOADDR_NAME>PEGGYE WILKERSON-504-589-6383</SHIPTOADDR_NAME>
                                       <Account>
                                            <ACCOUNTCODE>ACCT 1-ACCT 2-2007</ACCOUNTCODE>
                                            <GENERIC1>00500</GENERIC1>
                                            <GENERIC2>2007</GENERIC2>
                                       </Account>
                                  </Shipment>
                             </RequisitionLine>
                        </Requisition>
                   </CommitmentRequest>
    My Stored procedure schema looks like this
    <schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/C_STRIPES_APIS_PKG/CREATE_C_MAIN/" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/C_STRIPES_APIS_PKG/CREATE_COMMITMENT_MAIN/" elementFormDefault="qualified">
    <element name="InputParameters">
    <complexType>
    <sequence>
    <element name="PVN_TRANSACTION_ID" type="decimal" db:index="1" db:type="NUMBER" minOccurs="0" nillable="true"/>
    </sequence>
    </complexType>
    </element>
    <element name="OutputParameters">
    <complexType>
    <sequence>
    <element name="PVN_RETCODE" type="decimal" db:index="2" db:type="NUMBER" minOccurs="0" nillable="true"/>
    </sequence>
    </complexType>
    </element>
    </schema>
    I am writing the payload that goes into the Stored procedure to an output file and it contains the proper value for transactionId (which has been mapped to SP input argument..)
    But it doesnt seem to invoke the procedure at all. I am confirming that it is not invoking the stored procedure(SP) as I have written out the input value that comes into the SP and this value is null.
    Is there something that I need to do this to work?
    I also found out that what I supply is integer , but the SP is looking for decimal. I saw these types in the mapping file.(.xsl).
    <CRequest><Transaction><transactionId> type is integer.
    <InputParameters><PVN_TRANSACTION_ID> type is decimal.
    Does that make any difference?
    Thanks,

    Thanks James.
    I always wonder where to look for errors. I look in <ORACLE_HOME>J2EE/logs.log.xml. Is it the right place? I also look under opmn folder. I dont see any good error message anywhere. ESB is very bad in communicating back to users. Sometimes it writes just the payload and no error message like why it didnt like the payload.
    Regarding executing Stored procedure, I have some logging statements in Stored procedure that writes the incoming input to a temporary table and this value is always null. So, the Stored Procedure in not getting the value passed by the ESB DB adapter node. I have the mapping done using xsl that writes from input xml to input of stored procedure.
    Any ideas?

  • How to create csv file in stored procedure

    I want the output of my stored procedure in a csv file. How can I do that?

    1) define File Paths
    2) Write the output comma seperated to the file.
    Simple :)
    Hope you are comfortable with File operations.
    URL for your reference
    PL/SQL output to .CSV file
    Regards,
    Bhushan

  • JDBC-FILE(Stored procedure)

    HI Experts,
    I have a requirement as follows
    stored procedure->stored procedure->File.
    ie initially a stored procedure would be executed(which i could execute with help of option in the jDBC communication channel).This would result in a resultset being given as output.
    This will be associated with sender datatype.Now this is to be given as input to a second stored procedure.
    The second stored procedure will return output which i need to map into a target file structure.
    Can anybody guide me in this regard?Sender will be JDBC and target will be file adapter,but how can i execute the second stored procedure?
    The blogs simply says the option for one stored procedure to file.Is there any other help or blogs?
    Thanks in advance

    Hi,
    According to your requirement you are clubbing three scenarios into one:
    1) Source > XI <> JDBC(SP1)
    2) Continued from (1) JDBC(SP1) >XI <> JDBC(SP2)
    3) Continued from (2) JDBC(SP2) -->XI --> File.
    Now you can decide what all objects you will need....the trick lies in how you are going to configure the Directory part for this.....
    Include the necessary conditions in Receiver Determination (for sending message in the second point mentioned).....
    The second communication should get iniated once you get some value from the call to SP1....this can be checked in Receiver Determination using the Exist (EX) condition...this will trigger the call to SP2.....same for SP2-----> File.
    Just create a single Configuration Scenario in ID for this and include all the objects in it.
    Regards,
    Abhishek.

  • Calling stored procedure with output parameters in a different schema

    I have a simple stored procedure with two parameters:
    PROCEDURE Test1(
    pOutRecords OUT tCursorRef,
    pIdNumber IN NUMBER);
    where tCursorRef is REF CURSOR.
    (This procedure is part of a package with REF CURSOR declared in there)
    And I have two database schemas: AppOwner and AppUser.
    The above stored procedure is owned by AppOwner, but I have to execute this stored procedure from AppUser schema. I have created a private synonym and granted the neccessary privileges for AppUser schema to execute the package in the AppUser schema.
    When I ran the above procedure from VB using ADO and OraOLEDB.Oracle.1 driver, I got the following error when connecting to the AppUser schema:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'TEST1'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    but when I was connecting to the AppOwner schema, everything is running correctly without errors.
    Also, when I switch to the microsoft MSDAORA.1 driver, I can execute the above procedure without any problems even when connecting to the AppUser schema.
    I got this error only when I am trying to execute a stored procedure with an output parameter. All other procedures with only input parameters have no problems at all.
    Do you know the reason for that? Thanks!

    If anyone has figured this one out let me know. I'm getting the same problem. Only in my case I've tried both the "OraOLEDB.Oracle" provider and the "MSDAORA" provider and I get an error either way. Also my procedure has 2 in parameters and 1 out parameter. At least now I know I'm not the only one with this issue. :)
    '*** the Oracle procedure ***
    Create sp_getconfiguration(mygroup in varchar2, myparameter in varchar2, myvalue out varchar2)
    AS
    rec_config tblconfiguration.configvalue%type;
    cursor cur_config is select configvalue from tblconfiguration where configgroup = mygroup and configparameter = myparameter;
    begin
    open cur_config;
    fetch cur_config into rec_config;
    close cur_config;
    myvalue := rec_config;
    end;
    '** the ado code ****
    dim dbconn as new adodb.connection
    dim oCmd as new adodb.connection
    dim ors as new adodb.recordset
    dbconn.provider = "MSDAORA" 'or dbconn.provider = "OraOLEDB.Oracle"
    dbconn.open "Data Source=dahdah;User ID=didi;Password=humdy;PLSQLRSet=1;"
    set ocmd.activeconnection = dbconn
    cmd.commandtext = "{call fogle.sp_getconfiguration(?,?)}"
    'i've also tried creating a public synonym called getconfiguration and just refering to procedure by that.
    ' "{call getconfiguration(?, ?)}"
    ' "{call getconfiguration(?,?, {resultset 1, myvalue})}"
    'and numerous numerous other combinations
    set oPrm = cmd.createparameter("MYGROUP", advarchar, adparaminput, 50, strGrouptoPassIn$)
    cmd.parameters.append oPrm
    set oPrm = cmd.createParameter("MYPARAMETER", advarchar, adParamInput, 50, strParameterToPassIn$)
    cmdParameters.append oPrm
    set rs = cmd.execute

  • How to execute .sql file in Stored Procedure?

    Hi,
    I have an urgent requirement, where i have to execute .sql file form Stored Procedure.
    This .sql file will have set of update statement. I need to pass value to this update statement.
    Kindly please help me.
    Regards,
    Irfan

    This is required as part of Data Migration where  i have to do 100 of table's update. Each time update table will defer, so its better to have in separate script file (.sql). Can u paste some sample/syntax to exceute .sql file from stored procedure. I am new to this PL/SQL.
    How have you determined that it's "better" to have seperate scripts?  I assume you mean the table name will "differ" (and not "defer" - I assume that's just because English isn't your first language? no problem - I think I understand what you're asking).
    So what I think you're asking is that you have dynamic table names but each table needs to be updated in the same way?
    Question: Why do you have tables with different names that all need the same process doing to them?
    Assuming it's a valid requirement (and 99% of the time doing dynamic coding implies it's not).... you could use dynamic code, rather than 'scripts'...
    e.g.
    create procedure update_table(tbl_name varchar2) is
    begin
      execute immediate 'update '||tbl_name||' set lastupdate = null';
    end;
    As you haven't bothered to provide a database version, any example code/data or explanation of what you're actually doing, you're not going to get any detailed answer.  Please do take the time to read the FAQ and post appropriate details so people can help you.

  • Stored procedure OUTPUT VARCHAR2 value truncated using 12c client on Server 2012

    Questions:
    1) Is there a version of Oracle Client 11g which runs on Server 2012? My 11.2.0.0, when the installer begins, says my Server 2012 (8GB mem, 80 GB drive) does not meet the minimum requirements and I should not install it. This same installer worked on Server 2008.
    2) Have you seen the following behavior from Oracle client 12c? Are there any patches?
    When I was unable to find a version of Oracle 11g client for Windows Server 2012, I downloaded Oracle 12c. We have a few stored procedures, when invoked from a Windows Server 2008 with an 11g client work. However, when running that some code on a Windows Server 2012 machine does not work. I have certain stored procedures with an OUTPUT parameter when executed on 2012 has the values truncated.
    For instance:
    Output parameter is set to return "SUCCESS", but was is received is "SUC"
    Ouput parameter is set to return "AllSet", but it returns "All"
    Output parameter is set to cast a NUMBER to a VARCHAR2 and the value is a 5 digit number, but only the first two digits are returned. Ex: "83976", but only "83" appears.
    The above takes place when run from Server 2012, but works fine from Server 2008 and Win 7.

    Questions:
    1) Is there a version of Oracle Client 11g which runs on Server 2012? My 11.2.0.0, when the installer begins, says my Server 2012 (8GB mem, 80 GB drive) does not meet the minimum requirements and I should not install it. This same installer worked on Server 2008.
    2) Have you seen the following behavior from Oracle client 12c? Are there any patches?
    When I was unable to find a version of Oracle 11g client for Windows Server 2012, I downloaded Oracle 12c. We have a few stored procedures, when invoked from a Windows Server 2008 with an 11g client work. However, when running that some code on a Windows Server 2012 machine does not work. I have certain stored procedures with an OUTPUT parameter when executed on 2012 has the values truncated.
    For instance:
    Output parameter is set to return "SUCCESS", but was is received is "SUC"
    Ouput parameter is set to return "AllSet", but it returns "All"
    Output parameter is set to cast a NUMBER to a VARCHAR2 and the value is a 5 digit number, but only the first two digits are returned. Ex: "83976", but only "83" appears.
    The above takes place when run from Server 2012, but works fine from Server 2008 and Win 7.

  • Tools/Preferences/Code Editor/Link Stored Procedures to Files

    Found this option, sounds promising. Is there for real a way to establish link between a stored procedure code and a file?
    There is gap in help file; it jumps from "Max Open PL/SQL Editors" straight to "Auto-Indent New Lines"
    Sincerely
    Alek

    This is for file-based debugger support (can't locate exact SQL Dev exchange reference). It works the following way. Open file based PL/SQL compilation unit, select connection. Press the "compile with debug" info tool button. Now file based and database units are linked together witnessed by a record in project.qbql file in sql dev preferences directoory. Now you can set breakpoints in file based source and when stepped into a called procedure(s) you'll be directed to file-based sources as well, (provided they are linked the same way).

  • Execute stored procedure from batch file

    Hi,
    can someone helpme hoe to run my stored procedure from a bacth file. I need it urgently. Can some one help
    Thanks,
    Sri

    Hi,
    You can perform the below step..
    1) Create .sql file and write the line as shown below there....
    exec your_procedure_name
    2) create .bat file containing authentication
    sqlplus username/password@databasename @.sqlfilename
    suppose i have a procedure called test then and my database name is oracle and user name is scott then i will create a file like
    .sql file.. and sql file name is proc.sql
    exec test {(parameter if any)};
    .bat file
    sqlplus scott/tiger@oracle @procIf you have any issue past here..

  • Design Question::Instantiating Object from Stored Procedure Output

    Hi All,
    I am confused with approaching this design issue. I called a Stored Procedure, and the output from the Stored Procedure is a REF CURSOR. The size of the REF CURSOR can be large.
    My Question is, is it a good idea to pass the values from the REF CURSOR to a class constructor, there by instantiating an object of that type. lets say
    //rset is of type ((OracleCallableStatement)callableStatement).getCursor(5);
    //rset is not ResultType
    while (rset.next()){
    new ClassXYZ(var1, var2, var3);
    /*var1, var2, var3 would be rset.getObject(1),rset.getObject(2),rset.getObject(3)
    Class XYZ does some business logic
    }Other things:
    1) Will the JVM hold up assuming good enough JVM mem size, while creating objects for the range 100 thousands?
    2) I do not know the cursor size. It can change randomly from business perspective. And, it would be in the range of 100 thousands
    I was thinking, If I can "police" the call to the Class XYZ in case of large data. May be I am totally off the best solution. Any light on the best way to approach will be great.
    Anyhow, this would be a standalone java application. Just in case if people are trying to suggest/recommend DAO etc.,
    Thank you,
    VJ

    You can use ConvertTo-Html:
    http://ss64.com/ps/convertto-html.html
    Here's an example:
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/5cb016d3-e2fb-43e7-9c01-10b6878056e4/formattable-lost-in-email
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

Maybe you are looking for

  • How to Close app metro in WinRT 8.1

    Hi Everybody, I want to implement button [Close App] in UI , not using icon [X] in WinRT 8.1 I try to using  Application.Current.Exit(); Window.Current.Close(); but not sucess. Please support me. Thanks so much.

  • Is there an answer to why notes go missing?

    Is there an answer to why notes go missing on the iPhone? Is it a software problem? I now don't have any faith with using the notes app as important things I've taken note of disappear. Andy

  • New browser window for Jump Query

    Hi SAPGuru,      I have main Query with three jumps Query (QA, QB, QC). I created web template with main query and three other web templates for jump query. All are working fine. When I am running main query template and trying to jump from main quer

  • High CPU usage new MBP C2D

    I was working on laptop today and all of a sudden both fans kicked in full speed. I noticed in the past sometimes Safari was get a glitch and lock cpu usage at 98%. But today it was a process RPC.net? I force quit, required password and all normal. W

  • ITunes 9: program error when closing iTunes9

    Ever since updating to iTunes 9 on my pc running Windows XP SP3 a couple of weeks ago, I get a program error right after having closed iTunes 9. The program error reads: +The instruction at "0x7c90100b" referenced memory at "0x0fc528dc". The memory c