Executing .sql file, path problem,help!

Hi, could anyone tell me that how to change the default .sql file running path in Oracle 8?
I am running Oracle 8 resides on IBM AIX server. i found that under SQL prompt, the default .sql file running path is my home directory,e.g./home/user01,so i have to save all .sql files under that directory....could anyone tell me how to modify the default path to other directories.e.g,/home/user01/sql, so i could collect all .sql files under a specified directory?
Many thanks

Set the environment variable SQLPATH
For more information see
SQLPATH on 9iRel2 on Win XP

Similar Messages

  • 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.

  • How to execute .sql file using ODI

    Hi All,
    I need to execute .sql file using ODI.
    I tried @{path}{file} command in ODI procedure selecting oracle technology.but it is failing.
    Do any one have any other idea to execute .sql file.
    Thanks in advance

    Ohk...I think you can try creating batch file(.bat) if its Windows & call that from ODIOSCommand.
    The bat file should contain scripts which call .sql file using sqlplus  & there you can use @{path}{file} format.
    See if this helps.
    Regards,
    Santy

  • File path problem

    I have looked an read through almost all the file path problem post possible and I am still having issues maybe one of you guys can help me, here are my files
    I am doing this as an example so that I can apply it to all of my file problems....
    Harold Timmis
    [email protected]
    Orlando,Fl
    *Kudos always welcome
    Attachments:
    pathexample.zip ‏122 KB

    First of all, to troubleshoot the problem it would help to put some filepath indicators at each point so that you can see what is going on. Also, in your exe having an error dialog "Simple Error Handler.vi" to let you know what LabVIEW didn't like in the exe.
    Now, when you run a top level ("Main.vi") and use the "Current VI's Path " in the development mode it returns <Filepath>\"Current path"\Main.vi. So stripping once will get you to  <Filepath>\"Current path" .    Now if you make it into an exe the "Current VI's Path" returns <Filepath>\"Current path"\"Name.exe"\Main.vi so you are "nested" one deeper.
    I use the following construct to determine whether the vi is being used as in the development environment or as an exe, the parse the path accordingly, although in this instance it is used to supply different directory names to a little more complex file system.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • Execute sql files

    Hi,
    I'm trying to execute sql files located in
    unix environment using sqlplus from forms 6i
    in windows Me environment. I give the full
    directory like @/usr/users/oracle/toto.sql.
    But an error occures telling me that file
    cannot found (error SP2 0310).
    I hpe deeply that you can help me, please.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by dany:
    Hi,
    I'm trying to execute sql files located in
    unix environment using sqlplus from forms 6i
    in windows Me environment. I give the full
    directory like @/usr/users/oracle/toto.sql.
    But an error occures telling me that file
    cannot found (error SP2 0310).
    I hpe deeply that you can help me, please.<HR></BLOCKQUOTE>
    Be carreful of upper/lower-case. Unix is case sensitive !! Maybe @/usr/users/oracle/toto.SQL or @/usr/users/oracle/Toto.Sql or ...

  • How to execute .sql file

    hi,
    i want to execute .sql files in sql plus from a fixed location whether it may be network location or from system drive. so that i can use it from other computers when i will be working on different pc.
    so please tell me for network location solution and from drive. by default it fetch from BIN directory
    i am using oracle 10g.
    thanks

    Hi FRNzzz!! wrote:
    if the .sql files are placed on some network place then also i just need to put the path of that directory ? Sure. You can either set up a desktop shortcut for SQL*Plus using the remote folder as the "Start in" location, or (what I usually do) drag the script file into your SQL*Plus window.
    Edited by: William Robertson on Feb 26, 2011 2:21 PM

  • How to execute sql file from servlet

    Hi,
    I am using JSP, Servlets and Oracle 8i in my application. I want to execute .sql file from java code. Is it possible to do that,
    as we execute .sql file from sql plus prompt.
    Suppose I have abc.sql file and I want to execute it from java code.
    If any body have the solution then pl. reply with sample code.
    Thanks,
    Rajesh

    If any body have the solution then pl. reply with
    sample code.No, no, dec - s/he doesn't want the actual solution, but the full code!
    /k1

  • Help File Path Problem

    Hi,
    I recently upgraded to a new computer and I have Develope toolbox and some other extensions from Web Assist and curiously when I click on HELP button in any of them I receive in error message like the one below.....virtually all of the error messages are the same. I known that it is a path problem, but when I follow the path indicated in the error message I find the file exactly where it should be on the computer.....hmmmm...any ideas out there?
    Firefox can't find the file at /MacHD/Users/jimelander/Library/Application Support/Adobe/Dreamweaver 9/Configuration/Shared/DeveloperToolbox/classes/temp.htm

    I think un install ADDT then reinstall it..
    Hope this helps
    Mohnkhan
    http://www.mohitech.com

  • Help Files Path Problem

    Hi,
    I recently upgraded to a new computer and I have Develope
    toolbox and some other extensions from Web Assist and curiously
    when I click on HELP button in any of them I receive in error
    message like the one below.....virtually all of the error messages
    are the same. I known that it is a path problem, but when I follow
    the path indicated in the error message I find the file exactly
    where it should be on the computer.....hmmmm...any ideas out there?
    Firefox can't find the file at
    /MacHD/Users/jimelander/Library/Application
    Support/Adobe/Dreamweaver
    9/Configuration/Shared/DeveloperToolbox/classes/temp.htm

    OleLena wrote:
    > Firefox can't find the file at
    /MacHD/Users/jimelander/Library/Application
    > Support/Adobe/Dreamweaver
    > 9/Configuration/Shared/DeveloperToolbox/classes/temp.htm
    I'd check to ensure that you have the latest versions of the
    WebAssist extensions as this may have been fixed. I seem to recall
    seeing this issue when the primary browser (from Dreamweaver's
    perspective, the one that F12 or preview in browser opens up) is
    not open when the help is accessed. Try having your browser open
    and then access the help.
    Danilo Celic
    |
    http://blog.extensioneering.com/
    | WebAssist Extensioneer
    | Adobe Community Expert

  • How to execute sql files with windows path ?

    Hi , here's my stupid question :
    I have my parent SQL script say A.sql in directory C:\program files\my files\A.sql
    A.sql has calls to multiple sql files like this
    @@1.sql;
    @@2.sql;
    When I call A.sql using sqlplus as:
    sqlplus <username> <connection_string> @"C:\program files\my files\A.sql"
    A.sql gets executed but then while calling "1.sql" it fails with the error
    SP2-0310: unable to open file "C:\program.sql"
    This is happening because of the space, how can this be handled. thx in advance :)
    Regards,
    Neuron

    my A.sql is:
    @@1.sql
    @@2.sql
    1.sql and 2.sql are in the same directory as A.sql.
    sqlplus <username> <connection_string> @"C:\program files\my files\A.sql"
    VG2,
    Yes. Specify the entire path/filename and put double quotes around itA.sql has the double quotes around it, however what additional things can be done so that 1.sql and 2.sql which are present in same directory as A.sql also runs.
    Ashish,
    Yes the assumption is correct. Although when I cd to this directory then this issue won't come for sure.
    But the requirement is you can't 'cd' to the directory and want to execute with complete path.
    There is no issues in Solaris as the space is not allowed.

  • Execute  *.sql file ????

    Hello every body.
    I need to execute a *.sql file from my VB 6.0 application.
    I connect to oracle by ODBC ....
    connBD.Open "PROVIDER=MSDASQL;dsn=PRUEBA;uid=" & Prueba.User.Text & ";pwd=" & Prueba.Password.Text & ";database=" & Prueba.connBD.Text & ";"
    Ok... no problem
    But,,, How can I do for execute my "cTable.sql" file???
    I try with ... connBD.Execute "@cTable.sql" , but no
    I try with ... connBD.Execute "START cTable.sql", but no..
    Some body can Help Me???
    Thank You very much
    Glenn

    SQL*Plus is generally the preferred tool to execute a .sql file-- that's what it is designed for. Assuming that your users all install SQL*Plus, you could call out to the command line and invoke that app with the .sql file, then parse the output.
    The other option would be to read in the .sql file in your application, parse it, and send the individual PL/SQL blocks to the database.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • EXECUTE sql file in an procedure,just like sql prompt.

    Hi,
    I am using ORACLE 11g on an AIX box.
    Just to explain first :- Assume we have an .sql file in which i have 20 DML statements. Like 10 inserts,5 updates and 5 deletes. Now if i want to run this file in any particular DB , the best thing for one file i can do is .. simply go to the prompt i.e. SQL> on that DB and run that file :-
    SQL>@/oracle/scripts/metadata_update.sql
    just this will execute the whole file. Also here i can spool and keep the log of execution.
    Now i want the same functionality but this time their are many files and and i have to run them on different DB's.
    Can anyone suggest me some code in which if i pass the filename and the DB's name .. it should execute in that DB and create a log file in the same directory as the sql file.
    Something like procedure, which will take file name and DB name as parameter
    and then we will read file using UTL_FILE
    and then go to the destination DB with the help of TNSENTRIES we have.
    execute it and store the log for the same.
    Please suggest some sample code or ideas.
    thanks in advance.

    VIRU wrote:
    Our team gets those scripts on regular basis. We need to apply them on different DB's around 4 of them.
    So i wanted a utility by which i can apply it from one procedure.PL/SQL is wrong tool for this job.
    When your only tool is a hammer, all problems are viewed as nails.
    While a hammer is a GREAT tool, it is suboptimal to divide 1 board into 2 pieces
    sqlplus user/pass@remote1 @new_script.sql
    sqlplus user/pass@remote2 @new_script.sql
    sqlplus user/pass@remote3 @new_script.sql
    sqlplus user/pass@remote4 @new_script.sql

  • SQL Server 2008 Execute SQL Task parameter problem

    hi, guys
    i create a very simply package which only Execute SQL task, set the properties as:
    the testing table structure:
    create table t(
    idx int,
    cname varchar(60)
    Execute SQL Task setting:
    [genaral]
    ResultSet: None
    ConnectionType: Ado.net
    connection:LocalHost.APR11.sa1
    SQLsourceType:Direct input
    SQLStatement:delete from t where idx=?
    [parameter mapping]
    variable name: user::idx
    direction: input
    data type: Int32
    parameter name:NewParameterName
    parameter size:-1
    i hardcode the idx=1, but get error:
    SSIS package "test.dtsx" starting.
    Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query "delete from t where idx=?" failed with the following error: "Parameter name is unrecognized.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
    Task failed: Execute SQL Task
    SSIS package "test.dtsx" finished: Success.
    help me please.
    Regards.

    Hello,
    Here you go
    http://decipherinfosys.wordpress.com/2008/03/26/running-parameterized-sql-commands-using-the-execute-sql-task-i/
    http://technet.microsoft.com/en-us/library/ms140355.aspx
    if you use ADO.NET then the way Execute SQL task take parameter is different then "?".... you have to use @paramter.. Please check the above link
    Thanks
    http://sqlage.blogspot.com/

  • Executing .sql file in oracle using php

    Hello friends
    I am converting the oracle form into web application.
    My requirement is to execute a .sql file when i click on a button in the html form.
    What i need to do is when the user click on the button then the sql+ window shoudl open up and a file located on the server should get executed.
    Please note i have to do this in php. If any other alternative is there for this requirement then that also is welcomed.
    Any help would be appreciated.
    Thanks
    Vinod

    The thing is i am using
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    I am connecting to the DATABASE using
    the below php code
    =========================
    <?php
    if (!ini_get('display_errors')) {
    ini_set('display_errors', 1);
    PutEnv("ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/");
    PutEnv("LD_LIBRARY_PATH=-Wl,-rpath,/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib -lclntsh");
    $dbstr ="(DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = XXX.XXX.XXX.XXX)(PORT = XXXX))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    if(!@($conn = oci_connect('SYSTEM','passwordString',$dbstr)))
         print_r(ocierror());
    else
    echo "connected succesfully";
    exit;
    ?>
    ========================
    I am able to connect the database and ececute query and fetch the results.
    Now one file will be present in some directory on the server let say abc.sql
    Now i need to execute that file and display the output to the user by means of php code.
    So please provide me the detailed step on how to get this done.
    Thanks

  • Execute sql file from forms

    Hello, how is it possible to execute a sql file from forms without using sqlplus, because we have only the forms runtime on our pc.
    We can't use forms_ddl because we have a very big sql script for creating a package.
    Please help,
    GJ

    Strange, whenever I have installed forms I got sqlplus too without asking for it. If it is not installed, wouldn't your best bet be to install it ?

Maybe you are looking for

  • SD report for the open sales orders with items

    Hi, Is there any standard SAP report which display open sales order togeather with the open items. I want to have columns target quantity, delivered quantity and open quantity. Any tip? BR Saso

  • Firewire

    Is it true that the new Macbook Pro looks like a PC? No firewire? just USB. Can I stil use my firewire stuff?

  • Esso Agents 11.1.1.2.0 with Legacy Logon manager and PG

    Hi I have many applications that fail on single sign-on.Although the eso services are started I have many pcs having to be re-installed because of esso not working. I have tried the troubleshooting methods on repair and un/re-installation of the esso

  • BDC upoad for FB01 always gives the same msg in output even when file is ok

    Hi1 I have created a BDC upload program to upload data through a csv file . Whenever i run the program with teh file name with the data from teh csv file I just get the same error message in the output be it any data when its corect data . the messag

  • Genius Not So Smart?

    I've had this problem on both my Mac and iPhone in iTunes. I choose a song to build a genius playlist off of and get this message: Try Again This song does not have enough related songs to create a Genius Playlist. The song was from an album, ("Amazi