Can I disable a constraint in a stored procedure

Hi,
I wish to disable a constraint and then enable after I do a certain insert into a database, In my procedure I put the 'ALTER ..DISABLE' command straight after the begin and the the 'ALTER..ENABLE' just before the exit command but I keep getting a compile error. Any suggestions?

Since ALTER TABLE is DDL, you would have to use dynamic SQL in order to call it from PL/SQL, i.e.
BEGIN
  EXECUTE IMMEDIATE 'ALTER TABLE ... DISABLE';
  <<do something>>
  EXECUTE IMMEDIATE 'ALTER TABLE ... ENABLE';
END;Of course, since you're executing DDL, you'll be implicitly committing after both dynamic SQL statements.
A better approach, though, may be declare the constraint to be deferrable and do
EXECUTE IMMEDIATE 'ALTER SESSION SET CONSTRAINTS = DEFERRED'since that doesn't implicitly commit. You can also avoid having to hard-code constraint names in strings in your code. Plus, the constraints will be automatically checked when you commit.
Justin

Similar Messages

  • How can I get the printed message of stored procedure in JPA

    Hi, I'm using JPA to invoke stored procedure in database, a segment of the sproc is like below:
    if @create_type != 'a1' and @create_type != 'a'
         begin
         print 'create type must be either ''a1'' if you pass in A1 ID, or ''a'' if you pass in User ID'
         select 0 as "Result"
         endI can get the 0 as the result, it means business operation failed currently, but how could I get the message of 'create type must be either ''a1'' if you pass in A1 ID, or ''a'' if you pass in User ID'?
    That information is important as it indicates why the operation failed.
    Thanks

    how can i get rows count returned by stored procedure in oracle sql developer?
    Procedures do NOT return a value - functions return a value.
    A procedure executes whatever code it contains. That code could contain many queries that produce many row counts.
    Does your procedure take one or more IN, OUT or IN OUT parameters?
    See example 8-1 for an example of executing a procedure that has an OUT parameter.
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/subprograms.htm#CHDBIEEE

  • Can JDBC adapter be scheduled to call stored procedures

    Can JDBC adapter be scheduled to call stored procedure in other database passing previous date as input parameter

    Hi Gurus,
    actually our scenario is jdbc->XI( <-RFC->)->File
      Here our payload is around 5000 records
    can it be advisable to use rfc synchronous communication.
    The scenario will be exected only in night times.so can we schedule the adapter as we are using sp9.
    If not what must be the good design approach.
    And also after scheduling to a perticular period ,if there is any down time of XI server,will the process start immediately after the sever up or it will again watch for that perticular time.

  • How can I automatically prepend comment blocks to stored procedures?

    How can I automatically prepend comment blocks to stored procedures?
    In my organization, the standard is to comment all stored procedures with a comment block that looks like this:
    /*-- =============================================
    -- Created by: <Owner>
    -- Created date: 01/08/2012
    -- Purpose: Inserts new setting value, code and description
    -- Modifications:
    -- Modified by: <Owner>
    -- Modification date: 01/08/2012
    -- Purpose: Inserts new setting value, code and description
    -- =============================================*/Thanks.
    select * from v$version;
    BANNER                                                                        
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production             
    PL/SQL Release 11.2.0.2.0 - Production                                          
    CORE     11.2.0.2.0     Production  Edited by: xDeviates on 01-ago-2012 7:37
    Edited by: xDeviates on 01-ago-2012 8:31

    Hi,
    If I want to write a package called pk_fubar, I copy the following script and call it fubar.sql
    --     ==========  package_name.sql starts here  ==========
    --     Package_Name.sql
    SPOOL     &home_dir\package_name.lst
    PROMPT     .     H   H  EEEE     A    DDDD
    PROMPT     .     H   H  E       A A   D   D
    PROMPT     .     HHHHH  EEE    A   A  D   D
    PROMPT     .     H   H  E      AAAAA  D   D
    PROMPT     .     H   H  EEEEE  A   A  DDDD
    @@package_name_head
    PROMPT     .     BBBB    OOO   DDDD   Y   Y
    PROMPT     .     B   B  O   O  D   D   Y Y
    PROMPT     .     BBBB   O   O  D   D    Y
    PROMPT     .     B   B  O   O  D   D    Y
    PROMPT     .     BBBB    OOO   DDDD     Y
    @@package_name_body
    SPOOL     OFF
    @@package_name_test
    -- EXIT
    --     ==========  package_name_head.sql starts here  ==========
    CREATE OR REPLACE PACKAGE     pk_package_name
    AS
    FUNCTION     sign_in
    (     in_user_name     IN     VARCHAR2
    ,     in_password_txt     IN     VARCHAR2
    RETURN     PLS_INTEGER
    END     pk_package_name;
    SHOW ERRORS;
    GRANT     EXECUTE     ON pk_package_name     TO schema_name_some_role;
    --     ==========  package_name_body.sql starts here  ==========
    CREATE OR REPLACE PACKAGE BODY     pk_package_name
    AS
    --  Procedures related to SCHEMA_NAME ...
    --  2012 July 23 -- Package started with proc_x.  (Frank Kulash)
    --     **   local procedures and variables   **
    --     **   x   **
    --     **   initialization section   **
    --     The following code is executed once per session, when the package is loaded.
    BEGIN
         set_var     ( 'DT_FMT_TXT'
              , 'YYYY-MM-DD HH24:MI:SS'
    END     pk_package_name;
    SHOW ERRORS;
    --     ==========  package_name_test.sql starts here  ==========
    --     PACKAGE_NAME_TEST.SQL -- Test procedures in schema_name.pk_package_name
    SET     DOCUMENT     OFF
    SET     SERVEROUTPUT     ON     SIZE     10000
    ALTER SESSION     SET NLS_DATE_FORMAT = 'DD-Mon-YYYY HH24:MI:SS';
    SPOOL     @@package_name_test.lst
    PROMPT
    PROMPT     ***********************
    PROMPT     **  Testing x  **
    PROMPT     ***********************
    PROMPT
    SPOOL     OFFThen I replace package_name with fubar, and schema_name with the actual schema name. Finally, I cut off parts from the end to create fubar_test.sql, fubar_body.sql and fubar_head.sql. You could easily include a multi-line procedure comment template in this script. Every time you add a procedure or function, ciopy and paste that comment template, and then modify the copy.

  • Can't Set Item Value After Calling Stored Procedure

    In a forms6i program unit, I call a stored procedure. The stored procedure executes successfully. Then I set the value of a date item on a data block to sysdate.
    When I run the form and execute the program unit the stored procedure executes successfully, but then the program unit gives me a No Data Found error when I set the value of the date item on the block. The value of the date item never changes. However, if I comment out the call to the stored procedure, the date item changes to sysdate and there is no error message generated.
    Just to be sure, I moved the logic to set the date item value to a separate button on the form. Then I re-ran the program unit. The stored procedure executed successfully. Then I clicked the button to set the value of the date field on the block, which gave me the same no data found error.
    Then I commented out the call in the program unit and re-ran the test. The program unit executed. Then I clicked the button to set the date value in the block and it was set to sysdate with no errors.
    Why can I not set the date item after running a stored procedure?

    Seems like a MSDTC config issue
    See if this helps
    http://support.microsoft.com/kb/2027550/en-us
    http://zarez.net/?p=1469
    http://danieladeniji.wordpress.com/2013/03/06/microsoft-sql-server-linked-server-error-the-partner-transaction-manager-has-disabled-its-support-for-remotenetw/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Can I place a restriction on my stored procedure ?

    Sir,
    I created a stored procedure and granted any user the execution privilage. The only restriction that I want to place on it is that I only want all user to execute the stored procedure in Forms and not in any other programmes.
    How can I do that ?
    Thanks a lot
    Stephen

    one way: pass an encrypted code from the Form to the procedure.
    other way: usig Application Roles.
    About Application Role:
    Application roles can be enabled only by authorized PL/SQL packages.
    CREATE ROLE admin_role IDENTIFIED USING hr.employee;
    Then you can enable and disable a role:
    SET ROLE oe_clerk IDENTIFIED BY order;
    SET ROLE ALL EXCEPT oe_clerk;

  • Can you get values back from a stored procedure via OUTPUT parameters?

    Can you get values back from calling a stored procedure via OUTPUT parameters/variables? I call the SP via a SQL statement from a script either in a WF or DF.
    I thought I read some reference that DI could not get the values from OUTPUT parameters but I could not find it again (don't know if it is in any of the documentation or referred to in a forum.
    I did try a couple of tests but it did not reutrn any values via OUTPUT. But before I give up I thought I'd see if you could and maybe I needed to change something.

    This isn't exactly an answer to your question, but I'll point out that, given that you're resorting to a SQL script in the first place, there's no reason you can't also turn the output parameters into a regular result or record set. (The following uses T-SQL, although I think it's pretty generic.)
    declare @param1 int, param2 varchar(100), @return int;
    exec @return = proc @param1 = @param1 output, @param2 = @param2 output;
    select @param1 as param1, @param2 as param2;
    That is, to get from output parameters to a "regular" output from the SQL script isn't much of a leap...
    Jeff Prenevost
    BI Consultant
    Ann Arbor, MI

  • Can we pass the HashMap object to Stored procedure using toplink

    Can we send the java.util.Map object as input to the stored procedures.
    Can any one please tell how we can do this using toplink.
    I tried to do that by doing following steps
    1. Crated the
    -- Column Name - Value Pair
    CREATE TYPE col_data_pair IS OBJECT (column_name varchar2(50), data VARCHAR2(32767))
    2. create or replace PROCEDURE XL_MAP_TEST (poData In COL_DATA_PAIR) as
    v_timestamp TIMESTAMP;
    BEGIN
    INSERT INTO RECON_ATTR_UD_TFCHILD(RECON_TABLE_KEY, RE_KEY, RECON_UD_TESTFORM_KEY,RECON_UD_TFCHILD_GROUP)
    values (RECON_TABLE_KEY_SEQ.NEXTVAL,15, 25 ,'Persistentss23');
    END XL_MAP_TEST;
    3. .
    [junit] Exception [TOPLINK-4002] (Oracle TopLink - 11g Release 1 (11.1.1.0.0) (Build 080121)): oracle.toplink.exceptions.DatabaseException
    [junit] Internal Exception: java.sql.SQLException: Invalid column type
    [junit] Error Code: 17004
    [junit] Call: BEGIN XL_MAP_TEST(?); END;
    [junit] bind => [null => poData]
    [junit] Query: ValueReadQuery()
    [junit] at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:304)
    [junit] at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:613)
    [junit] at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:467)
    [junit] at oracle.toplink.threetier.ServerSession.executeCall(ServerSession.java:447)
    [junit] at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193)
    [junit] at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:179)
    [junit] at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:250)
    [junit] at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeSelect(DatasourceCallQueryMechanism.java:232)
    [junit] at oracle.toplink.queryframework.DirectReadQuery.executeNonCursor(DirectReadQuery.java:92)
    [junit] at oracle.toplink.queryframework.DataReadQuery.executeDatabaseQuery(DataReadQuery.java:118)
    [junit] at oracle.toplink.queryframework.ValueReadQuery.executeDatabaseQuery(ValueReadQuery.java:55)
    [junit] at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:671)
    [junit] at oracle.toplink.queryframework.DataReadQuery.execute(DataReadQuery.java:104)
    [junit] at oracle.toplink.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2260)
    [junit] at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java
    [junit] Caused by: java.sql.SQLException: Invalid column type
    [junit] at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    [junit] at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110)
    [junit] at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171)
    [junit] at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:
    4. StoredProcedureCall spc = new StoredProcedureCall();
    HashMap poData = new HashMap();
    poData.put("d", "s");
    poData.put("s", "s");
    spc.setProcedureName(procedureName);
    spc.addUnamedInOutputArgument("poData", "poData", Types.OTHER,
    "COL_DATA_PAIR",HashMap.class);
    ValueReadQuery query = new ValueReadQuery();
    query.setCall(spc);
    query.addArgument("poData");
    Vector args = new Vector();
    args.add(poData);
    session.executeQuery(query, args);

    Hi
    Thanks for your inputs. Can you please send me the code stuff how we can use ObjectRelationalDescriptor. I tried to do that by doing following steps
    1. Crated one class
    oracle.InputOfTypeMap poData =
                        new oracle.InputOfTypeMap();
    poData.setKay("ddd");
    poData.setValue("ddd");
    2. oracle.toplink.objectrelational.ObjectRelationalDescriptor descriptor =
         new oracle.toplink.objectrelational.ObjectRelationalDescriptor();          descriptor.setJavaClass(oracle.iam.reconciliation.vo.InputOfTypeMap.class);      
              descriptor.setStructureName("COL_DATA_PAIR");      
              descriptor.addFieldOrdering("column_name");
              descriptor.addFieldOrdering("data");      
              descriptor.addDirectMapping("key", "column_name");
              descriptor.addDirectMapping("value", "data");
    3. I was not sure how to use this further StoredProcedureCall
    Can you plese help me, how we can do that?

  • Is there a way I can see the status of a running stored procedure?

    I have a stored procedure that takes quite a bit of time and I was wondering if there is a way I can monitor it's status?
    Thanks!

    One thing you can do is add some calls to dbms_application_info to your procedure.
    Then you can monitor the progress by querying v$session.
    More info here:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_appinf.htm

  • Can is call store function similar to stored procedures

    iam trying to call a stored function written in database similar to stored procedures .Is it possible to call funtion if yes can anybody tell me how to call ,please yar.its urgent

    I believe I already answered your question [url http://forum.java.sun.com/thread.jspa?threadID=645317&messageID=3801352#3801352]here

  • Can someone help me diagnose a strange stored procedure performance issue please?

    I have a stored procedure (posted below) that returns message recommendations based upon the Yammer Networks you have selected. If I choose one network this query takes less than one second. If I choose another this query takes 9 - 12 seconds.
    /****** Object: StoredProcedure [dbo].[MessageView_GetOutOfContextRecommendations_LargeSet] Script Date: 2/18/2015 3:10:35 PM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE PROCEDURE [dbo].[MessageView_GetOutOfContextRecommendations_LargeSet]
    -- Parameters
    @UserID int,
    @SourceMessageID int = 0
    AS
    BEGIN
    -- variable for @HomeNeworkUserID
    Declare @HomeNeworkUserID int
    -- Set the HomeNetworkID
    Set @HomeNeworkUserID = (Select HomeNetworkUserID From NetworkUser Where UserID = @UserID)
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON
    -- Begin Select Statement
    Select Top 40 [CreatedDate],[FileDownloadUrl],[HasLinkOrAttachment],[ImagePreviewUrl],[LikesCount],[LinkFileName],[LinkType],[MessageID],[MessageSource],[MessageText],[MessageWebUrl],[NetworkID],[NetworkName],[PosterEmailAddress],[PosterFirstName],[PosterImageUrl],[PosterName],[PosterUserName],[PosterWebUrl],[RepliesCount],[Score],[SmallIconUrl],[Subjects],[SubjectsCount],[UserID]
    -- From View
    From [MessageView]
    -- Do Not Return Any Messages That Have Been Recommended To This User Already
    Where [MessageID] Not In (Select MessageID From MessageRecommendationHistory Where UserID = @UserID)
    -- Do Not Return Any Messages Created By This User
    And [UserID] != @UserID
    -- Do Not Return The MessageID
    And [MessageID] != @SourceMessageID
    -- Only return messages for the Networks the user has selected
    And [NetworkID] In (Select NetworkID From NetworkUser Where [HomeNetworkUserID] = @HomeNeworkUserID And [AllowRecommendations] = 1)
    -- Order By [MessageScore] and [MessageCreatedDate] in reverse order
    Order By [Score] desc, [CreatedDate] desc
    ENDThe Actual Execution Plan Shows up the same; there are more messages on the Network that is slow, 2800 versus 1,500 but the difference is ten times longer on the slow network.Is the fact I am doing a Top 40 what makes it slow? My first guess was to take the Order By Off and that didn't seem to make any difference.The execution plan is below, it takes 62% of the query to look up theIX_Message.Score which is the clustered index, so I thought this would be fast. Also the Clustered Index Seek for the User.UserID take 26%which seems high for what it is doing.
    I have indexes on every field that is queried on so I am kind of at a loss as to where to go next.
    It just seems strange because it is the same view being queried in both cases.
    I tried to run the SQL Server Tuning Wizard but it doesn't run on Azure SQL, and my problem doesn't occur on the data in my local database.
    Thanks for any guidance, I know a lot of the slowness is due to the lower tier Azure SQL we are using, many of the performance issues weren't noticed when were on the full SQL Server, but the other networks work extremely fast so it has to be something to
    with having more rows.
    In case you need the SQL for the View that I am querying it is:
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE VIEW [dbo].[MessageView]
    AS
    SELECT M.UserID, M.MessageID, M.NetworkID, N.Name AS NetworkName, M.Subjects, M.SubjectsCount, M.RepliesCount, M.LikesCount, M.CreatedDate, M.MessageText, M.HasLinkOrAttachment, M.Score, M.WebUrl AS MessageWebUrl, U.UserName AS PosterUserName,
    U.Name AS PosterName, U.FirstName AS PosterFirstName, U.ImageUrl AS PosterImageUrl, U.EmailAddress AS PosterEmailAddress, U.WebUrl AS PosterWebUrl, M.MessageSource, M.ImagePreviewUrl, M.LinkFileName, M.FileDownloadUrl, M.LinkType, M.SmallIconUrl
    FROM dbo.Message AS M INNER JOIN
    dbo.Network AS N ON M.NetworkID = N.NetworkID INNER JOIN
    dbo.[User] AS U ON M.UserID = U.UserID
    GO
    The Network Table has an Index on Network ID, but it non clustered but I don't think that is the culprit.
    Corby

    I marked your response as answer because you gave me information I didn't have about the sort. I ended up rewriting the query to be a join instead of the In's and it improved dramatically, about one second on a very minimal Azure SQL database, and before
    it was 12 seconds on one network. We didn't notice the problem at all before we moved to Azure SQL, it was about one - three seconds at most.
    Here is the updated way that was much more efficient:
    CREATE PROCEDURE [dbo].[Procedure Name]
    -- Parameters
    @UserID int,
    @SourceMessageID int = 0
    AS
    BEGIN
    -- variable for @HomeNeworkUserID
    Declare @HomeNeworkUserID int
    -- Set the HomeNetworkID
    Set @HomeNeworkUserID = (Select HomeNetworkUserID From NetworkUser Where UserID = @UserID)
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON
    ;With cteMessages As
    -- Begin Select Statement
    Select (Fields List)
    -- Join to Network Table
    From MessageView mv Inner Join NetworkUser nu on MV.NetworkID = nu.NetworKID -- Only Return Networks This User Has Selected
    Where nu.HomeNetworkUserID = @HomeNeworkUserID And AllowRecommendations = 1
    -- Do Not Return Any Messages Created By This User
    And mv.[UserID] != @UserID
    -- Do Not Return The MessageID
    And mv.[MessageID] != @SourceMessageID
    ), cteHistoryForThisUser As
    Select MessageID From MessageRecommendationHistory Where UserID = @UserID
    -- Begin Select Statement
    Select Top 40 (Fields List)
    -- Join to Network Table
    From cteMessages m Left Outer Join cteHistoryForThisUser h on m.MessageID = h.MessageID
    -- Do Not Return Any Items Where User Has Already been shown this Message
    Where h.MessageID Is Null
    -- An Order By Is Needed To Get The Best Content First
    Order By Score Desc
    END
    GO
    The Left Outer Join to test for null was the biggest improvement, but it also helped to join to the NetworkUser table instead of do the In sub query.

  • Can I use log4j with a java stored procedure

    I have code that resides on the middle tier and on the database. Our company is using log4j for debugging purposes. In order to get my code to work on the database, I have had to remove all the log4j stuff. Has anyone tried to get code that has log4j messages to run on the database? I am not concerned with actual debugging, I just don't want to have to strip this code out if I can avoid it.

    Hi Laura,
    As far as I know, you have two choices:
    1. Load the log4j classes into the database (using the "loadjava" tool).
    2. Enable remote invocation of log4j classes via RMI (or similar).
    Hope this helps.
    Good Luck,
    Avi.

  • Script can not be invoked from a java stored procedure

    i made a java procedure and called it via a sql procedure which takes a string as input :
    the string is passed to Runtime.getRuntime().exec("myString");
    if that string is :
    rm -f /test/test22.log
    proc = Runtime.getRuntime().exec("rm -f /test/test22.log");
    the file test22.log which is in the test folder gets deleted
    but when i pass the command . /test/batchstart.ksh to execute a script the script does not execute.
    proc = Runtime.getRuntime().exec(". /test/batchstart.ksh");
    file permissions have been given and also the executable rights.
    if some bobdy can tell why the script is not executing that will be of great help

    i am Still facing the following problem:
    if i pass a parameter like :
    rm -f /test/menu.ksh
    then the required output is that the menu.ksh file gets deleted.
    but when i pass this command:
    ./test/menu.ksh
    It is supposed to execute the specified script but it does not.
    I have tried multiple things like giving chmod 777 rights to the following file and changing the command to /test/menu.ksh but nothing happens
    Can you kindly tell me what can the problem be. Is there any execution rights issue: i am executing these scripts from pl sql developer.
    You can find both the procedure and java method which is being called below
    ==========================================================================================
    create or replace procedure TEST_DISPLAY(filename in varchar2, result out varchar2, error out varchar2) is
    command varchar2(100);
    vRetChar varchar2(100);
    begin
    command := filename ;
    prc_host(command, vRetChar);
    result := vRetChar;
    dbms_output.put_line(result);
    Exception
    when No_Data_Found Then
    error := 'Command is not Found';
    dbms_output.put_line('Failure');
    return;
    end TEST_DISPLAY;
    ======================================================================
    create or replace and compile java source named host as
    import java.io.*;
    import java.lang.Runtime;
    import java.lang.Process;
    import java.io.IOException;
    import java.lang.InterruptedException;
    public class Host {
    public static void executeCommand(String command,String[] outString) {
    String RetVal;
    try {
    String[] finalCommand;
    final Process pr = Runtime.getRuntime().exec(command);
    // Capture output from STDERR...
    }

  • Can we able to call .bat file from Stored procedure?

    My actual requirement is to import an csv file(where it contains a table) into oracle Database from the front end screen when the csv file location is given.
    Where in the screen (designed by dotnet) a browse option will be present and I will give the csv file location and this will be passed into stored procedure as an input parameter.
    Now I need a stored Procedure that can Import my csv file table data into Oracle database10g.
    I shoudnot use the import option present in the physical Oracle Database.
    Can any one please provide me the stored Procedure?

    NGK246 wrote:
    My actual requirement is to import an csv file(where it contains a table) into oracle Database from the front end screen when the csv file location is given.
    Where in the screen (designed by dotnet) a browse option will be present and I will give the csv file location and this will be passed into stored procedure as an input parameter.
    Now I need a stored Procedure that can Import my csv file table data into Oracle database10g.You do not seem to understand the basic concept of client-server. If you supply a file location for the server code, and that location is not on the server, how do you expect the server to access that file in that location?
    You cannot expect the server to hacks its way across the network, crack open a remote file system somewhere, and steal that file from that location.
    As the client has access to that location and file, the client needs to read that file and supply that file's content to the server. This is how the server receives a file from a client. With Oracle. With FTP. With SCP. With SFTP. With HTTP. With SMTP and file attachments to e-mails. Etc.
    This is not specific to Oracle. This is a fundamental concept. So the problem here is your ignorance of client-server and not a problem with Oracle and not a problem with PL/SQL.
    I shoudnot use the import option present in the physical Oracle Database.Not sure what this mean, but the basic statement that "+we should not use feature 123 or feature ABC of Oracle+", is invariable an utterly idiotic statement to make. Kind of like buying a car and then making the statement that groceries may not be put into the truck as the car's trunk should not be used.
    Can any one please provide me the stored Procedure?Very arrogant of you to assume that others will spend their free time writing code for you - with you copying-and-pasting that code and providing it to your employers, as your work...

  • Can I call a stored procedure from EJB?

    Hi,
    Can I call a regular (non-Java) stored procedure from an enterprise Java bean? Transaction is managed by the ejb application server.
    Thank you for your response.
    CT

    hi, i saw your question in the forum....have you got a response
    since mars because i 've the same problem...
    thanks in advance
    cheers
    jp

Maybe you are looking for