How to invoke multiple sessions of sql*plus thru pl/sql program

Hi
How to invoke multiple sessions of sql*plus thru pl/sql program.
Thanks

How to invoke sql*plus in a procedure?????
I have to invoke more pl/sql sessions?????No you don't "have to".
Look at what you are trying to do.
You have a program running inside the PL/SQL engine. This is running nicely inside the Oracle database and is perfectly capable of issuing other SQL statements, PL/SQL programs etc. inside it's nice cosy Oracle environment.
You are asking for this PL/SQL to shell out to the operating system, run an external application, for which it will have to supply a username and password (are you planning on hard coding those into your PL/SQL?), and then that external application is supposed to run more SQL or PL/SQL against the database.
a) Why hold all this code external to the database when it can quite happily reside on the database itself and be executed through jobs or whatever.
b) Consider what would happen if someone were to replace the external application with their own program of the same file name... they'd be able to capture the username and password for connecting to the database, therefore a major security flaw.
The whole idea of doing what you want through external calls to SQL*Plus is ridiculous.

Similar Messages

  • How to pass table data to brf plus application through abap program

    Dear All,
    i have a question related to BRF Plus management through abap program.
    In brf plus application end, Field1,field2,field3 these 3 are importing parameters.
                                           Table1->structure1->field4,field5 this is the table,with in one structure is there and 2 fields.
    in my abap program, i am getting values of fields let us take field1,field2,field3,field4,field5.
    And my question is
    1) How to pass fields to BRF Plus application from abap program.
    2)How to pass Table data to BRF Plus application from abap program.
    3)How to pass Structure data to BRF Plus application from abap program.
    4)How to get the result data from BRF Plus application to my abap program.
    And finally , how to run FDT_TEMPLATE_FUNCTION_PROCESS.
    How do i get the code automatically when calling the function in brf plus application.
    Regards
    venkata.

    Hi Prabhu,
    Since it is a Custom Fm i cant see it in my system.
    Look if u want to bring data in internal table then there could be two ways::
    1) your FM should contain itab in CHANGING option , so that u can have internal table of same type and pass through FM,
    2) read values one by one and append to internal table.
    Thanks
    Rohit G

  • How to open multiple sessions for one user?

    Sorry for the silly question but I couldn't find it googling or searching through this forum, so I started wondering whether it's possible in SQL Developer to open multiple sessions for one user. I'm fairly new to SQL Developer and databases in general.
    When I open SQL Developer and connect to a schema, a worksheet opens named MYSCHEMA. If I disconnect then connect, another worksheet opens, named MYSCHEMA~1. I assumed these were different sessions, but if I enter into one worksheet:
    select col1 from my_table where row_id = 1
    -- shows result is 1
    update my_table set col1 = 0 where row_id = 1
    select col1 from my_table where row_id = 1
    -- shows result is 0and then enter into the second worksheet:
    select col1 from my_table where row_id = 1
    -- shows result is 0I would have expected the second worksheet to report 1 because the first worksheet did not issue a COMMIT. Thus, I'd guess both worksheets are the same session? Is that right? If so, how do I have two sessions open simultaneously (opened by same user)?
    I'm trying to implement the code at the bottom of this post, for which testing requires at least two sessions:
    Re: Help with Procedure
    Edited by: tem on Apr 18, 2012 6:44 AM

    Thanks Jim,
    Ctrl-Shift-N doesn't do anything for me. I'm on a mac -- by experimenting it looks like command-N does what you're looking for. This appears to be the same as left-clicking on the "New" icon in the top left corner of SQL Developer, or selecting from the pull-down menu, File > New.
    This opens "Create a New" window that appears to be a wizard. What would I select at this point? Options are: Database Connection, Table, View, Package, ...
    I don't see an option for "Worksheet".
    UPDATE:
    OK, I found that if I select "SQL File", a worksheet becomes available. Perhaps this is what you intended. However, when I issue the command
    select col1 from my_table where row_id = 1;it still returns 0 instead of 1. Hmm, maybe my initial assumption was wrong -- if this is a second (e.g. different) session, should I expect the changes made in the first session in SQL Developer (the UPDATE command) WITHOUT a commit, to be observed in this second session? I thought that changes made in one session were not viewable in a different session until these changes are committed in the first session? If so, how to show this in SQL Developer? I must be missing something basic here.
    Or, is SQL Developer issuing some sort of "auto-commit" without my knowledge?
    Edited by: tem on Apr 18, 2012 8:00 AM

  • How to handle multiple session in ADF using jdevloper11g

    Hello All
    i want to use the form in Multiple sessions.
    i have one sign up form. user enter only 4 to 5 fields & he may not fill the the manditory field & he left.but data base dont give the error to him. but next day he will come at the next day to complet his sign up i.e. when he commit the all detail that time all validation will hapen.
    for that i use one table without constrain to store the temarory detail.& use other table (with constrains) for final submition.
    1) i creat the view n entity for temparory table
    2) & also i create views n entity for Final table
    n i create one methos in viewRowImple file in that file i overrid create method from using this i set the value from tempary to final table...
    but when user left the manditory field then it allow to submit the data in temparory field but when i copy that data to final table(with constrain) n user submit the data then validation happn i.e. "this fild is mandatory".when i click this error message it goes to first screen.
    IS Thiis Possible.. in ADF

    Generally this can be done.
    I see a problem with your use case, which has nothing to do with jdev or java:
    How do you identify the user when he comes back to finish the form?
    For this you can't use information like session cookie or IP address because they change.
    So you have to save some information about the user which lets you identify him when he comes back. All other requirements can be implemented by ADF.
    Timo

  • How to invoke Oracle stored procedures in Web Intelligence Custom SQL ?

    Hi,
    Referring to some older posts, I see that there is a work around to invoke a stored procedure to return results for a Web Intelligence report. Its been posted for calling a MS SQL stored proc, whereas the mentioned method does not seem to work for an Oracle Stored Procedure.
    Steps I followed:
    a) This is the parameter I have added in the oracle.sbo file => <Parameter Name="Force SQLExecute">Procedures</Parameter>
    b) My stored procedure code is as follows:
    CREATE OR REPLACE PROCEDURE get_emp_details(var_first_name OUT VARCHAR) AS
    BEGIN
    SELECT first_name INTO var_first_name
    FROM EMP_DETAILS_VIEW
    WHERE EMPLOYEE_ID = 100;
    END;
    c) Custom SQL code I added in my Webi report:
    set nocount on;
    /* SELECT
    EMP_DETAILS_VIEW.FIRST_NAME
    FROM
    EMP_DETAILS_VIEW
    exec get_emp_details;
    On trying to validate the SQL it gives me the following error message: "The SQL query has 0 instead of 1 columns.(WIS 10810)"
    Has anyone been able to successfully call an Oracle Stored procedure using the above method ?
    Version of BO: XI R3 SP2
    Oracle version: 11gR2
    PS: I am aware that web intelligence since XI R3.1 does allow use of a dedicated Stored Procedure Universe. I would want to know if it could
    be made to run in a normal Universe(not a stored procedure Universe)
    Thanks for your time and inputs.
    Regards,
    Jez

    EXECUTE is a SQL Plus command. You can directly call SP in PL/SQL
    DECLARE
        modif number;
    BEGIN
    select data_length into modif from user_tab_columns where table_name='CONTROL' and column_name='POSITION';
    IF modif < 10 THEN
        droptable('CONTROL');
        execute immediate('CRETAE TABLE CONTROL ....';
    ...

  • How to avoid multiple session for the same username

    I need suggestions on implementing single user login , like My system has a user with a username jdavid and my application should not allow two different sessions for the same username jdavid , can one session peep into all other session
    to see if the any has a usernaem jdavid, I am basically looking for some pattern if any available for restricting multiple session for the same username . like jaas or any other security api provides this ?

    Store a Map<User, HttpSession> in application scope and let your application intercept on that. On login, just check if the User is already there, then get the associated HttpSession, invalidate it and replace it by the current HttpSession, else just store the current User-HttpSession pair in the map. On logout obviously remove the User-HttpSession pair from the map.

  • How to open multiple Sessions in Solution Manager

    Good Day Gurus,
    I am currently working on Solman 7.1 Sp12.My question is :Is it possible to open multiple sessions in Solution Manager? Here is the scenario: The client is working on multiple incidents and instead of logging on to the system again to access the 2nd incident he would like to open another session within the current call he is working on.
    Is this functionality possible in Solman? I have seen the functionality working before  in CRM interaction center not sure if it applies in Solman.
    Your help is highly appreciated.
    Thanks
    Maria

    Hi Maria,
    Options to Call a Function in an SAP System, by entering transaction codes in the command field, the transaction in bold is the one your want for opening multiple sessions.
    You can use the F1 key on the command field to display the following possible entries:
    /N to cancel the current transaction
    /NXXXX to call transaction XXXX directly from another transaction. Without the prefix, you can only call XXXX from the SAP Easy Access screen.
    /O to display the overview of the SAP GUI sessions on your computer
    /OXXXX to call transaction XXXX in a new window directly from another transaction
    /NEND to end the log on session with a confirmation dialog box
    /NEX to end the log on session without a confirmation dialog box
    /I to delete the window you are currently using
    Regards,
    Ruth

  • How to see the content of stored prodecure in sql plus worksheet or sql.plu

    Hi
    i want to see the content of the stored procedure on sql worksheet or sql plus. is there any command for this ?
    please let me know
    thanks

    Hi Anil:
    Following is for SQL*Plus
    If you are logged on to the schema that owns the stored procedure you can issue the following query:
    select text from user_source where name = 'MY_PROG_NAME'
    ORDER BY TYPE, LINE ASC;
    Where MY_PROG_NAME could be the name of a package, procedure or function. Note that when you look at a package source you'll get the specfification and the body listing, in that case you may want to split them into two with following queries:
    spool MY_PROG_NAME.spec
    select text from user_source
    where name = 'MY_PROG_NAME'
    AND TYPE = 'PACKAGE'
    ORDER BY TYPE, LINE ASC;
    SPOOL OFF
    spool MY_PROG_NAME.body
    select text from user_source
    where name = 'MY_PROG_NAME'
    AND TYPE = 'PACKAGE BODY'
    ORDER BY TYPE, LINE ASC;
    SPOOL OFF
    If you are logged on as SYSTEm, you can substitute USER with DBA and look at code for all schemas, however you may need to add OWNER to your query.
    DESC USER_SOURCE
    Name Null? Type
    NAME NOT NULL VARCHAR2(30)
    TYPE VARCHAR2(12)
    LINE NOT NULL NUMBER
    TEXT VARCHAR2(2000)
    DESC DBA_SOURCE
    Name Null? Type
    OWNER NOT NULL VARCHAR2(30)
    NAME NOT NULL VARCHAR2(30)
    TYPE VARCHAR2(12)
    LINE NOT NULL NUMBER
    TEXT VARCHAR2(2000)
    Hope this helps,
    Thomas

  • How to open Multiple session

    I am trying to OPEN multiple SESSION for same application and unable to do this using FIREFOX 7.01
    R 12(Oracle E-Business Suite), we are using FIREFOX for several clients to open the applciation. But i cannot open different session of same applcaition. it is ONLY opening singel JAVA form. In IE 8 or 9, i can do - NO MERGE option or File>New Session option. Is there some workaround for this. I am using Windows 7.

    Hi,
    When you run the form in the browser, it opens a new database session. For sharing the same session, you need to open/call/new form within the form itself.
    For using same JVM, you can use the [JVM Pooling|http://download.oracle.com/docs/cd/B14099_19/web.1012/b14032/jvm.htm] feature (assuming you are on forms >= 10.1.2).
    -Arun

  • How to select multiple values from the Parameters in the concurrent program

    How to select multiple values from the Parameters defined in the concurrent program...and i believe multiple selection is not a direct feature of EBS, but is there any workaround solution to acheive mulitple selection?

    I think there's no way to do that using standard feature.
    Some workaround I use :
    1. If the number of selections are fixed, you could use multiple parameters for the same valueset. For example :
    Selection1 : <choose first selection>
    Selection2: <choose 2nd selection>
    ..etc.
    If you don't use it then leave it empty.
    2. Use text varchar valueset and enter it manually and separate by comma (or other value) , eg : selection1,selection2,selection3....etc.

  • Oracle 9.0.1 SQL*Plus and PL/SQL

    Having just upgraded from Oracle 8.0.1 to the above, can anyone suggest a good book for learning the above languages as I believe there is quite a lot of difference in the codes, which also contains some good exercises for trying them out.
    Phil.

    I would take a look at this for PL/SQL:
    Oracle PL/SQL Programming, 3rd Edition
    If you want to learn SQL, you can try this book, which some people I know have liked: Mastering Oracle SQL
    For the extra features of SQL*Plus, the Oracle manual is very complete and should be sufficient.

  • Username password works in SQL Plus not in SQL Developer

    I have SQL Dev 1.2.1. It works fine with some databases, but with two databases with logons managed by Oracle Enterprise User it does not work. I receive an Ora 01017 error invalid username password. The user name and password work fine from SQL Plus and from a third party tool. I have a local developer client environment installed, so am using TNS. SQL Developer was installed before the client environment. I was not trying to access this database before the client environment install. I was using the basic connection before the client install. Neither basic or TNS connection works for this particular database.
    Any ideas?

    We have changed the password and it still does not work. There are no special characters in the password.
    I am tempted to think the problem is the jdbc driver versions. The logon for Enterprise user controlled databases stopped working after I installed the thick client Oracle developer. I have tried to find the threads with information on disabling the thick client jdbc but have not found them. I also have tried to enter a URL for the thin client without success. One of our DBAs is saying that the 11g clients are broken and he is in communication with Oracle about it. He says 10g works but 11g does not.
    Any further help would be appreciated.
    Gerry

  • Different behaviour in SQL*Plus and PL/SQL

    Does anyone know why the following SQL works from the command line in SQL*Plus but results in a syntax error when included within a cursor in a PL/SQL procedure?
    SELECT (SELECT 'dummy' FROM dual)
    FROM dual;
    null

    Is this what you require? This works...
    declare
    cursor cur_dummy is
    SELECT d.dum
    FROM (
    SELECT 'dummy' dum
    FROM dual
    ) d
    v_dummy varchar2(30);
    begin
    open cur_dummy;
    fetch cur_dummy into v_dummy;
    close cur_dummy;
    dbms_output.put_line(v_dummy);
    end;
    Cheers
    BigB
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Aqueel ([email protected]):
    In PL/SQL, every SELECT Statement must have a INTO clause. But still It's not working. Anyother know the answer?
    <HR></BLOCKQUOTE>
    null

  • Connecting SQL*PLUS to Micrsoft SQL Server

    I want to setup a connection to My MS Sql Server using SQL*PLUS. I've looked at the Documents but have not been able to get it to work I have download the Connector.
    Thank you for any help you can provide..

    Hi,
    If you want to connect to SQL*Server from SQLPLUS then you need to use either the Database Gateway for SQL*Server (DG4ODBC) or the Database Gateway for ODBC (DG4ODBC).
    You cannot do it using the connector supplied with SQL*Developer.
    See this note in My Oracle Support for further information -
    Note.233876.1 Options for Connecting to Foreign Data Stores and Non-Oracle Databases
    or this website -
    http://www.oracle.com/technology/products/gateways/index.html
    Regards,
    Mike

  • SQL*PLUS and PL/SQL

    HI !
    There is any way to run a command SQL*PLUS through a block pl/sql. For example to run the "copy from" command in a block pl/sql.
    Thanks for you time.

    APC wrote:
    No.
    SQL*Plus is an interactive, client-side tool. PL/SQL is a batch-oriented server side tool.I would make more distinction ...
    SQL*Plus is an interactive, client-side tool - a specialized command processor. PL/SQL is a batch-oriented server side programming language.
    >
    There are ways of doing the same sort of things in both languages, but they are different commands.
    Cheers, APC

Maybe you are looking for

  • How do i connect my laptop with my HP Photosmart C6180 Wireless

    Hello, I need help. I need to connect my HP C6180 All in One Printer with my laptop wireless. I whent and follow the wizard on the printer and it says it's wireless now but when i click print from my laptop it says it's offline. so how do i get my la

  • Audio CD not showing up in iTunes. Why?

    Apologies for posting in 2 different discussion areas, but I'm not sure if this is an iTunes or a MacBook problem http://discussions.apple.com/thread.jspa?threadID=834778&tstart=0 When I insert an audio CD in to my MacBook, the CD mounts on the deskt

  • Importing Markers to the same track from 3 different files

    Hi all, This is a marker question: I have about 60 minutes of video and I originally have it in 1 big file (export from FCP, then compressed with chapter marker so that they will be imported into DVDSP). I have no problem with importing the markers f

  • Imovie making cuts

    When I try to import video from my Sony MiniDV cam into imovie, it usually works. There's one piece of video though, it's about 8 minutes long, and imovie is chopping it up into 6 and 8 second pieces. How do I get it to import in one piece? macbookpr

  • Changing from Lion 10.7.4 to Mountain Lion

    Can I change without any problems from Lion to Mountain Lion? I am afraid becaue I run Windows office for mac, time machine, lots of Apps, Paralles Desktop with Windows 7 to use Autocad and Datev (German book keeping software) etc. Thank you for expi