Changing current directory under SQL plus

Can someone please tell me how I change the current directory under SQL Plus? I'm trying to run the nisetup.sql for XMLNEWS application in Oracle's sample application. I tried @"D:\Downloaded Files\XMLNEWSDIR\nisetup.sql", but, that doesn't work.
Can anyone help me on this?
TIA,
A

> I do not know of any way to change the default directory once SQL*Plus is running.
One very late response, but... I have been using the Windows GUI version of SQl Plus (SqlplusW.exe) for years and I change the default directory all the time. Here is how:
Use the File, Open pull-down menu dialog, and navigate to the folder you want. Then, select one of the files in that directory. I keep a file named 0~A.sql in each folder where I use SQL Plus for that purpose. It contains only comments, something like:
--SET ECHO ONOnce I open such a file, all the START commands run scripts in that folder.
Now... since the Windows version of SQL Plus has been deprecated, how in the world can I do the same thing in the DOS command window version of SQL Plus?
Why in the world doesn't Oracle provide such an obviously useful feature???

Similar Messages

  • Javax.swing.JFileChooser -- open button change current directory... Why?

    Hello community.
    I use javax.swing.JFileChooser class. After press open button, JFileChooser change current directory. Why?
    I was not find in documentation about changing curret directiry by JFileChooser. Take me please reference to doc for understanding this effect.
    Thank you.

    This is my code:
    private void jFileChooser1ActionPerformed(java.awt.event.ActionEvent evt) {                                             
    // TODO add your handling code here:
    // label1.setText("3: "+evt.);
    // label1.setText("3: ");
    label1.setText(evt.getActionCommand());
    System.out.println(evt.getActionCommand());
    if (evt.getActionCommand().startsWith("Approve")){
    label1.setText("You push Open key");
    System.out.println(jFileChooser1.getCurrentDirectory().getPath());
    label1.setText(jFileChooser1.getCurrentDirectory().getPath());
    }else{
    label1.setText("You push Close key");
    I not add method for change current directory. But after press on open button javax.swing.JFileChooser class was change current directory.

  • E-mailing report changes current directory

    When I e-mail report the current directory is changed and when
    there is Image in the report it can't be found.
    And the next time I run the report and DESTYPE=File, the file is saved at
    c:\Program Files\Common Files\System\Mapi\1033\NT

    change your registry key entry which says
    REPORTS60_TMP to which ever dir you want

  • How can i open a directory in sql*plus?

    i need to run a file in sql* but i didn't know how to open the directory which contains it, can u tell me plz?

    i need to run a file in sql* but i didn't know how to open the directory which contains it, can u tell me plz? SQL > start C:\jungle\island\yourscript.sql

  • Change installation directory for SQL 2008 SP3 or CU

    My C drive is full, Server built long time ago. Not enough space available in C Drive but other local drive have storage.
    Is there anywhere i can use my other drive for patching or apply CU.
    Env: win 2003 ,SQL 2008 SP1

    My C drive is full, Server built long time ago. Not enough space available in C Drive but other local drive have storage.
    Is there anywhere i can use my other drive for patching or apply CU.
    Env: win 2003 ,SQL 2008 SP1
    Hi,
    Why dont you move SQL server user data file and log file from C drive to other drives this will create space. It would require a SQL Server restart
    Refer this link
    http://msdn.microsoft.com/en-GB/library/ms189133%28v=sql.100%29.aspx
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • What environment variable I will set  for the default SQL*plus file directory

    Hi there,
    I run sql*plus on windows 2000 professional. I want to set a file
    directory for sql*plus so that when I write something in a file,
    it will be in my default file directory. What environment
    variable I will set for that? Thanks in advance.

    hi , i have already install my oracle 8i personnel edition to my computer , but my sql plus don't seen to work ,
    i understand that they username are ( scott ) and password are ( tiger ) but after i type them and press ok there will be a box coming out and it said ( Cannot open registry Software \ORACLE\HOME1\SID_LIST Starting with default sid )
    after i click ok there will be another box asking for password , but i what is the password ? it look to me like a internal password , it can't be tiger for this , cos before that i have already type in my username and password , this is the later part , anyone can help? pls reply, thank alot Nigel,
    I'm not sure about Oracle8i Personal Edition. The default username/passwords are:
    scott/tiger
    system/manager
    sys/change_on_install as sysdba
    You could try the database installation discussion forum for more help. If you find out what the password for this dialog is, please post it to this group for the benefit of others.
    Alison

  • Default SQL*Plus directory

    Hi everyone,
    I'm trying to reset the default directory for SQL*Plus. Now it's something like c:\orant\bin. Does somebody have any ideas?

    Hi Germaine
    if you prefere
    to launch sqlplus.exe from a script:
    begin of the script: myscript.cmd
    ----- begin ----
    cd c:\myApplication\mySqlDirectory
    d:\Orant\Bin\SQLPLUS.EXE id/pswd@instance "myscript.sql"
    echo It's over
    pause
    --- end ----
    myscript.sql must have an "EXIT" on last command.
    null

  • Cancel runnning SQL in SQL*Plus Worksheet?

    Hi,
    can I Cancel a runnning SQL in SQL*Plus Worksheet?
    Thanks
    Markus

    Probably not in current versions.
    SQL*Plus Worksheet is just a Java wrapper around
    command-line SQL*Plus. I recall the EM team were keen
    to see a cancelling feature in 10g, which is one of the
    reasons EM 10g will call iSQL*Plus.
    The iSQL*Plus web interface has had cancel for a few versions
    already. It has a button specially for that.
    (For reference, the EM forum is at Enterprise Manager
    -- CJ

  • SQL script runs under SQL Devoper, will not run under UNIX, SQLPlus

    I have a sql program I developed under the SQL Developer tool and it runs fine. I have ftp'd the sql to the Unix server and I am trying to run the same program under SQL Plus in unix. The program echo's back the line number that is the last line number in the code before the 'Exception' code in the program and it goes out into never never land.
    I can't figure out why this runs under SQL Developer but will not run under SQLPlus in Unix. Any ideas would be appreciated!!!!

    Assuming that the ftp process did not append any invisible characters(which it usually does) at the end of each line,
    did you put the '/' symbol at the end of your program before running in sql*plus
    something like
    begin
    end;
    /

  • Within SQL*Plus, get error code of host command

    Hello everyone,
    I am currently writing an SQL*Plus (Oracle 10g) that has a big logic and somewhere in the middle, I have to call a host command, which is an C++ function.
    I call it using
    SQL> HOST cd
    SQL> HOST cd bins
    SQL> HOST ./my_procedureBut, I need to get the return code of my procedure to see if it finished correctly?
    I checked [the manual|http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch4.htm#sthref883] but they don't say anything about return codes.
    When I try:
    SQL> host echo $?
    0It always returns 0, even if I SIGTERM or SIGKILL the child process. Anyone has an idea on how is it possible to retrieve the return code?
    Thanks

    user13117585 wrote:
    Hello guys and thanks for your answers.
    Let me tell you a little more about my problem... I have a 3 steps process. The first step is done in the database. It updates a few tables. Then, when that step successfully ends, I need to start a second step. That second step is done on the server where I have my SQL Plus session. Because I actually have 2 different machines. The first one is where the database is running and the second one where I have SQL Plus (Oracle client 10g) and the program that I have to start in this second step. Then, once this process is finished and his return code is 0, then I have to execute the third step in the database.
    Basically, I wanted to have something like:
    VARIABLE returnCode
    BEGIN
    :returnCode := some_package.do_step_1;
    -- do whatever I want with returnCode.
    EXCEPTION WHEN ...
    END;
    HOST execute_external_program
    BEGIN
    IF external_job_succeed THEN
    some_package.do_step_3
    END IF;
    EXCEPTION...
    END;
    /I wanted to use the Oracle Scheduler to create an EXTERNAL JOB. The problem is that the external program is not deployed on the same machine as the database.I know that on 11g, we have external remote jobs. But I'm on 10g and I have no agent on the server where the external program is. So, what are my options? SQL*Plus and the host command... Or I can also write a bash script to do that... Or any hight level programming language...
    Any other idea?
    Thanks again guys,move functionality of second step into PL/SQL procedure resident inside DB.

  • Can we invoke sqlloader from sql * plus

    Hi,
    I need to invoke sql * loader from sql plus.
    is it possible?

    SQL*Loader is an OS prompt command, why want to use it under sql*plus ?
    Anyway, you can find threads searching to see how run a shell scripts into the database.
    Nicolas.

  • SQL*Plus: Run Command as SYSDBA

    I'm currently logged into SQL*Plus as CARLOS & even though I don't want to grant CARLOS specific DBA or SYSDBA roles, I was wondering if there was a way in SQL*Plus I could run a command as SYSDBA while logged in as CARLOS? Kind of like how I can sudo a command in Bash as the root user while logged in as my current non-priveleged user.
    SQL> shutdown immediate;
    ORA-01031: insufficient privileges:(

    CarlosinFL wrote:
    I'm currently logged into SQL*Plus as CARLOS & even though I don't want to grant CARLOS specific DBA or SYSDBA roles, I was wondering if there was a way in SQL*Plus I could run a command as SYSDBA while logged in as CARLOS? Kind of like how I can sudo a command in Bash as the root user while logged in as my current non-priveleged user.
    SQL> shutdown immediate;
    ORA-01031: insufficient privileges:(SQL> CONNECT SYS/ AS SYSDBA

  • Testing stored procedure using sql plus

    I'm attempt to create and test a stored procedure in sql plus.
    I enter:
    create procedure sp_getconfiguration(mygroup in char, myparameter in char, myvalue in out char) as begin select configvalue into myvalue from tblconfiguration where configgroup = mygroup and configparameter = myparameter; end;/
    I get a procedure created. response by when I type:
    variable myval char
    call sp_getconfiguration('Language','Enabled', myval);
    I get the following error:
    error at line 1:
    ora-06576: not a valid function or procedure name
    I can go into DBA studio and see the procedure listed and can compile it and it says "valid". I have tried granting execute permission to public and trying it again under sql plus and nothing seems to help.
    I'm also attempting to run this same procedure from VB and get an invalid column name error from there.
    Thanks for any help in advance.
    Lee

    Thanks for all your help. What I actually called product support and they helped me solve it. But what I found out is that if using oracle 8.1.# you have to invoke the stored procedure without the "call " in front of the procedure name. For instance.
    sp_getconfiguation()
    In version 9.# it appears that you use the call in front of the procedure. Dah! So if anyone else is having this problem. That is the solution. Thanks anyway.

  • 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

  • Special character when changing password in sql plus

    Hi i'm having a problem with setting password for user's in sql plus. I get a ORA-00922 whenever I try to change a user's password to contain ! in it. See below. Do I have to escape special characters or something or this a bug?
    (Previously I've always used Enterprise Manager for this and can set ! characters for password without issue but we're currently having an issue with it and I need to alter passwords in sql plus while I'm waiting for it to be fixed )
    SQL> alter user lbtest identified by oraclesux!;
    alter user lbtest identified by oraclesux!
    ERROR at line 1:
    ORA-00922: missing or invalid option
    SQL> alter user lbtest identified by oraclesux;
    User altered.
    System and O/S details below:
    O/S = MS Server 2008 Standard Service Pack 1 64 bit
    Oracle 11g Standard Edition (11.1.0.7.0)
    SQL> select * from nls_database_parameters;
    PARAMETER VALUE
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CHARACTERSET WE8MSWIN1252
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    PARAMETER VALUE
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY $
    NLS_COMP BINARY
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_RDBMS_VERSION 11.1.0.7.0
    20 rows selected.

    Found the answer here, must user double quote for exclamation marks but not other characters like #.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:897930000346894755

Maybe you are looking for

  • How to reassign a budget type which has been assigned

    hi, i wanted to know how to reassign the budget type assigned for psoting period ending 30.09.2008. i want to change the key figure assigned to the budget type so i am trying to delete the budget type for that purpose. i cannot delete key figure for

  • Account Not found on resource

    Hi frenz, I got the following error when I tried to edit the user A29666. Account 'A29666' not found in Resource 'SecurID - usatli69'. XPRESS exception: Can't call method listResourceObjects on class com.waveset.ui.FormUtil ==> com.waveset.util.Waves

  • ITunes unstable after recent update

    Since the last itunes update, the new red one, 12.0.1.26 my iPad Mini refuses to connect to my PC, I had issues in the past, but usually a reinstall fixed all the connectivity issues, but now it just constantly refuses to connect No matter what I try

  • ***Help*** Double data

    Hello, can anyone tell me how I receive only the current salary if a join person details and salary. Now I get all salary changes of the whole year. But I only want the last one. Is there a simple solution ? Something with the salary change date ? Th

  • OS patching - RAC Db post actions.

    Dear All, We are Running Oracle 10g R2 Rac (two nodes) on Hp unix Itanium 11.31. Due to Some Os related issues, they recommended to apply OS patches.this patch is not changing the os version (bundle patch- Current Patch Spet 2007 to March 2010). What