Sql-plus... choice user directory

is it possible to show a dialog to choose the directory used by PL-SQL?

From the sqlplus there are no popup windows that perform this task. You can use the & substitution character, as well as prompt sqlplus commands to request the user for a variable and pass it inside sqlplus, whatever the provided string.
accept variable
accept variable number
accept variable char
accept variable date
accept variable binary_float
accept variable binary_double
accept variable format format-string
accept variable default default-value
accept variable prompt prompt-string
accept variable noprompt
accept variable hideExample:
accept foo prompt 'Enter value for foo'Or
accept pw prompt 'Enter your secret password' hideMadrid

Similar Messages

  • Specify different location of SQL*PLUS EDIT/SPOOL directory

    Where can I specify the location of the SQL*PLUS edit/spool directory such that I can change it from the default? I'm running on Linux (Ubuntu 6.10) if that helps...

    Check this Link :
    Error while Invoking Editor
    Regds.

  • [urgent]sql plus 's user login

    how do i know my sql plus login name and password? when i install...they never ask me to set my own login name and password...

    Hi 489652,
    Which version of oracle you are using?
    Oracle 8i & below sys password is change_on_install & system password is manager
    You can even login as internal with a password oracle.
    if 9i & above you need to provide oracle password for sys & system and no internal login.
    What ever version you use this should work as generic
    01. Login as oracle user in unix box in windows as admin.
    02. export ORACLE_SID=dbname in unix . set ORACLE_SID=dbname in windows
    03. sqlplus "/ as sysdba" you should be loggin as sys ..(as oracle admin)
    Moreover, please remember when you raise this kind of question try to include the version of oracle and OS.
    Cheers,
    kamalesh jk

  • SQL Plus - Prompt user with: "Would you like to continue?"

    I am running a PL/SQL script using SQL Plus. In the middle of the script, I'd basically like to have the following logic:
    Prompt the user: "Would you like to continue?"
    IF user types 'Y', continue with script (run update statements)
    ELSE IF
    user types 'N', end script
    What is the best way to do this? Thanks!

    I see. So ACCEPT/PROMPT statements are a SQL Plus feature that can only be run BEFORE the DECLARE section?
    ACCEPT i_idnumber PROMPT 'Enter the Prospect ID: '
    ACCEPT i_transnum PROMPT 'Enter the Transnum: '
    ACCEPT i_remark PROMPT 'Enter reason for updating the tribute info: '
    ACCEPT i_hmflag PROMPT 'Enter the tribute type - H or M: '
    ACCEPT i_honor PROMPT 'Enter the Tribute ID: '
    ACCEPT i_hm_remark PROMPT 'Enter a remark for the honor/memorial party: '

  • How to change the default directory from within SQL*Plus ?

    Hello,
    I want to change the default directory directly from within SQL*Plus to be able to launch my command files with simple instructions like :
    @my_command.sql
    If I haven't launched SQL*Plus from the directory containing the file my_command.sql, how do I change the default directory to the directory of my command files ?
    I've searched through the Oracle documentation, there's no SET DEFAULTDIR or something like that. When I do a SHOW ALL, there's no variable containing the default directory.
    If you have an idea...
    regards,
    Jérôme.

    Hi Jérôme (J鲴me ?),
    You cannot directly do that, but you can use @@ instead of @ to run subscripts in the same directory as the superscript
    # head /tmp/tl30/xxx/[xyz].sql                    
    ==> /tmp/tl30/xxx/x.sql <==
    prompt call y
    @y
    prompt call z
    @@z
    quit
    ==> /tmp/tl30/xxx/y.sql <==
    prompt i am in y
    ==> /tmp/tl30/xxx/z.sql <==
    prompt i am in z
    # pwd                                             
    /root
    # sqlplus -s scott/tiger@lsc62 @/tmp/tl30/xxx/x.sql
    call y
    SP2-0310: Datei "y.sql" konnte nicht geöffnet werden
    call z
    i am in zKind regards
    Laurent Schneider
    OCM DBA

  • NEW FEATURE:AUTOTRACE IN SQL*PLUS 3.3(EXECUTION PLAN)

    제품 : SQL*PLUS
    작성날짜 : 2003-10-07
    NEW FEATURE:AUTOTRACE IN SQL*PLUS 3.3
    ======================================
    Autotrace는 SQL*Plus 3.3부터 지원하는 New feature로서 기존에는 init.ora에
    SQL_TRACE=TRUE를 setting 후 얻어진 trace file을 TKPROF란 utility를
    이용하여 SQL 문의 수행 경로, 각종 통계 정보를 얻었다.
    그러나, SQL*Plus 3.3부터는 이것을 간단히 처리할 수 있는 방법을 제공한다.
    1. SQL*Plus를 실행하여 scott user로 접속한 후, plan table을 생성한다.
    #sqlplus scott/tiger
    SQL>@$ORACLE_HOME/rdbms/admin/utlxplan
    2. 다음에 sys user에서 PLUSTRACE란 ROLE을 만든다.
    SVRMGR>connect internal;
    SVRMGR>create role plustrace;
    SVRMGR>grant select on v_$sesstat to plustrace;
    SVRMGR>grant select on v_$statname to plustrace;
    SVRMGR>grant select on v_$session to plustrace;
    SVRMGR>grant plustrace to dba with admin option;
    SVRMGR>grant plustrace to scott;
    비고) 위의 grant 문은 client에 SQL*Plus 3.3이 install되어 있는 경우
    C:ORAWIN95\PLUS33\PLUSTRCE.SQL이라는 script에 기록되어 있다.
    다음과 같이 실행해 주면 된다.
    1> connect sys/manager
    2> @$ORACLE_HOME/sqlplus/admin/plustrce.sql
    3> grant plustrace to scott;
    3. 다음에는 scott user로 connect하여 작업한다.
    #sqlplus scott/tiger
    SQL>set autotrace on
    SQL>select * from emp;
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE
    1 0 TABLE ACCESS (FULL) OF 'EMP'
    Statistics
    389 recursive calls
    5 db block gets
    53 consistent gets
    12 physical reads
    0 redo size
    1049 bytes sent via SQL*Net to client
    239 bytes received via SQL*Net from client
    4 SQL*Net round-trips to/from client
    0 sorts (memory)
    0 sorts (disk)
    13 rows processed
    4. 참고로 set autotrace에는 여러가지 option을 부여해 작업할 수도 있다.
    예)set autotrace on => Explain plan and statistics.
    set autotrace on explain => Explain plan only.
    set autotrace traceonly => select된 결과는 빼고 trace만 display
    시킴.
    set autotrace on statistics=> sql statement execution statistics.
    5. 서버 버젼과 상관없다.
    Server가 7.2 version 이하일지라도 clinet에 SQL*Plus 3.3이 install되어
    있으면 client에서 sqlplus 3.3을 구동시켜 server에 접속하여 위와 같이
    작업하면 무리없이 작업이 가능하다.
    Reference Documents
    <Note:43214.1>

    Hi Roman,
    I don't have an Oracle 9.2 database readily available, but it works fine on 10g XE. Please note 3.1 is not certified with 9i:
    http://www.oracle.com/technetwork/developer-tools/sql-developer/certification-096745.html
    Regards,
    Gary
    SQL Developer Team

  • Starting SQL PLUS in Oracle 9i

    Hi All,
    I have Oracle 9i installed.
    I can login to SQL PLUS by User name : scott Password : tiger
    It shows me the prompt SQL>
    What is Host String? And what value or characters is supposed to be entered there.
    Nisarg Sutaria

    Global database name is : matrix.neo
    so SID : matrix
    now if I give Host String : [email protected] (It does not work)
    if I give Host String : matrix.neo (It does not work)
    If I give Host String : matrix (IT WORKS)
    It shows SQL> prompt.
    Let me know if I am correct.
    Nisarg

  • Different execution plan in ApEx and SQL/PLUS

    Hi
    I have weird problem with sql query exectuion plans.
    DB version: 10.2.0.1
    ApEx version: 3.1.2
    I have workspace parsed as SCHEMA1.
    I have a view under different schema - SCHEMA2.view1 and a function SCHEMA2.func1.
    I have a query like SELECT * from SCHEMA2.view1 WHERE col1 = SCHEMA2.func1(:bind1)
    "col1" is a indexed column.
    When I execute this query in SQL/PLUS under user SCHEMA1 with the same bind value, then index is used perfectly.
    When I execute this query in ApEx report then index is not used, full scan is performed and hash join is done between the tables used in the view and explain plan shows that a view is formed during execution.
    What can be the reason for such a different behaviour.
    Statistics are freshly calculated, FIRST_ROWS hint doesn't help, using the INDEX hint results only index full scan.
    This happens only if I use a view and pl/sql function together in the query. If I use view with Oracle built in function like NVL instead then it works perfectly. Also when I access directly the same tabels with the same PL/SQL function then the execution plan is perfect. Only if the view and pl/sql function is used together in the query then execution plan is bad.
    It is not a problem of this specific query but, many different other queries with same pattern also. I have tried ApEx versions 3.0, 3.1.1 and 3.1.2.
    At the same time the exectuion plan is good in SQL/PLUS and TOAD.
    Any ideas?
    Best regards,
    jan

    I didn't help. But I rewrote the queries so that there is no database view and PL/SQL function used in the same query. I still don't know the reason for such different behavior, but I just try to accept it and keep in mind for future :)
    Thanks anyway!
    jan

  • 1st Login to Oracle 9i Personal SQL Plus (To 355099)

    To 355099
    Thank You for trying to help.
    I did as you told me in your reply but I am sorry to tell
    you that it did not worked.I steel demanded
    Password.
    If there is another thing that you forgot or you know
    another way to solve that problem then I shall
    be great thankful to you if you will let me know.
    You can reply to E-Mail [email protected]
    With Many Thanks and Great Respect
    Menahem Sharon

    it is very strange you still not got the solution because i read the sotion which work good on my system.
    do you remember the password which you gave during the installation of oracle database on you system . If so then your system user pass will the same.
    so when you click sql*plus enter user name => system
    and in Password field enter the password which you gave during installation . If you gave no password during installation then the password of user 'system' will be 'manager' so enter this information. and do the same processes which I told you.
    Thankyou.

  • Restricting the user to operate DML's from SQL PLUS Environment

    how to Restrict the user to operate DML statements from SQL PLUS Environment.

    Once you restrict SCOTT user to not be able to do an INSERT command, the SQL*Plus returns an error for user SCOTT when he tries to execute an INSERT statement.
    Note however, that this is enforced by SQL*Plus, not the database!
    Look into the use of product_user_profile from Oracle documentation for more information.
    SQL> insert into product_user_profile values('SQL*Plus', 'SCOTT', 'INSERT', NULL, NULL, 'DISABLED', NULL, NULL) ;
    1 row created.
    SQL> commit ;
    Commit complete.
    SQL> disconnect
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.3.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.3.0 - Production
    SQL>
    SQL> connect scott
    Enter password:
    Connected.
    SQL>
    SQL> insert into emp select * from emp ;
    SP2-0544: invalid command: insert
    SQL>
    SQL>

  • User Name/Password for SQL*Plus

    I installed the Oracle 8i Personal Version in my PC.
    I have been trying to log on to the Oracle SQL*Plus screen, which asks me for the User Name, Password and the Host String.
    Does anybody out there know what I should use here to log on to this screen?
    Thanks in advance.
    Jay
    [email protected]

    Hi,
    Please check old mails and then forward questions.
    User scott/tiger
    DBA system/manager
    SYS sys /change_on_install
    with regards,
    Boby Jose Thekkanath,
    Dharma Computers(P) Ltd.
    Bangalore-India.
    www.dharma.com

  • User name in sql*plus

    hi there
    I want to know if we can store the user by which one has logged in sql*plus .
    like if I want to store the names , times etc of all the users who logged into oracle using SQL*PLus can I store the name in a varible and insert into a table afterwards..
    thankx
    dg

    There is an environment variable USER that you can use. (select USER from dual).
    null

  • SQL Plus not work with domain user

    Hey guys,
    have a problem with sql plus in our network. when i started it with the admin it works. but when i started it with a user account, fill in the username, the password and the host and click on the ok button, the window closes and nothing happen. no error no new window, the window simply closes.
    what to do?
    regards

    Hi,
    There might be different reasons behind this.
    Check whether user is created in database or not.
    There might be possibility that, user is in different database.
    SELECT * FROM V$DATABASE; --This will help you to findout database name.
    SELECT * FROM DBA_USERS WHERE USERNAME = 'HR';  --HR is user present on database. If your user is present in database then user might not have connect privilege.
    GRANT CONNECT , RESOURCE TO HR; --HR is user. To execute this command, login as sys You can also try to login with command prompt.
    sqlplus user/password@host

  • Sql  plus not accepting user id and password as scott, tiger resp

    Hi, this is mihir shah
    I have just installed oracle9i
    And I have a problem in opening the sql plus. It asks for user id and pass but when entered scott, tiger it always gives a tns error.
    Could you tell me how to make a database & how to log on & how to make a new user id and password

    It seem that you have problem with network connectivity to you database.
    Check the listener status and the configuration of the files: tnsnames.ora & listener.ora
    In all cases you must specified the error.
    Bye, Aron

  • Accepting User input in SQL*Plus

    I am writing a SQL script in SQL*Plus that accepts a value from the user and plugs that value into a variable that exist in several locations outside of the PL/SQL block.
    I am able to do this, yet everytime this variable is encountered, the user is prompted for input. I would like to have the user prompted only once at the beginning and then use that value throughout. This seems like a simple task, yet I cannot get it to work.
    Any help would be greatly appreciated.

    You can use &&<variable_name> and it will define the variable and use it throughout the SQL code.

Maybe you are looking for

  • Set up for Form-16-PYIN

    Hi All, When i run the report PC00_M40_F16 & try to check the form for the employee through Print Form-Print Preview-i am not getting any data/form. The emplyee has only worked in the organization for 1 month, so 1 months payroll result is available

  • Drag and Drop Listbox: Box 1 to Box 2 then same data dragged back to Box 1

    Right now, I have one listbox (1) with string data that can be dragged to another listbox (2).  However, I cannot take that same string data and drag it back to the original listbox (1). If I try to do that, the string data just disappears and I cann

  • 57 GB of Movie Files that I can't locate to delete, please help.

    When I look at my storage, it says there is 57GB of movie files, however, I can't find those files.  I have deleted all movie files that I can find and also emptied the trash can.  But can't seem to find the 57GB of movies.  Can someone help please.

  • Help with Ipad /USB

    Hi we off camping in a few days to the Kimberleys and the 12v TV plays the movies saved on my USB expansion drive but in the tiniest size, and a bit hard to watch something the size of say a phone, so I am wondering if anyone can advise me if there i

  • Video content

    Keep getting an error message whenever I try to play video content on some www sites, particularly the BBC, in safari. It tels me that the plug in cannot deal with the mime content. Woks OK in firefox - but I want to use safari! Don't get this proble