Create or replace directory temp as '/oradata2';

Hi All,
i created the folder by using :
create or replace directory temp as '/oradata2';
where i can find that folder which created with this command?
thanks

user944 wrote:
ok thanks, i am not able to find that directory.
i mean path of that directory?
thanksIf your Oracle server runs on Linux OS, create the directory /tmp/test and create virtual directory in Oracle to refer OS directory that you've created
create or replace directory temp as '/tmp/test';
If your Oracle server runs on Windows, create the directory C:\temp and create virtual directory in Oracle to refer OS directory that you've created
create or replace directory temp as 'C:\temp';
Additionaly you can refer to below article to understand "Oracle directory" more clearly
http://www.dba-oracle.com/t_oracle_create_directory.htm
Edited by: Kamran Agayev A. on Aug 19, 2009 1:19 PM

Similar Messages

  • How to check if the directory is created using create or replace directory

    Hello,
    I have create a directory as below:
    Create or Replace Directory TEST_DIR AS 'C:\ABCD'
    How to check if the directory is created or not? Is there any query for that?
    Thanks in advance.
    PK

    This command does create a directory object inside the database. It does not mean that a directory is created outside the database (e.g. the file system).
    You can check if this oracle directory exists with:
    untested
    select * from user_directories;To check if the directory in the OS exists and if the database has the appropriate permissions to read/write to this directory you need to connect as user "oracle" (default installation) and try to get to this folder.
    Edited by: Sven W. on Jun 16, 2010 4:20 PM - Typo corrections

  • CREATE OR REPLACE DIRECTORY

    Hi,
    I have a doubt..
    I'm trying to create an Oracle directory:
    CREATE OR REPLACE DIRECTORY
    PROTPL[b]-RP[b]-01_TPL_DB AS
    '/utl_db/skedul/protpl-rp-01';
    But I get an error:
    Message Code ORA-00905 was not found. Please verify and re-enter.
    Instead using a different name, witout char '-' , I have no problem.
    Is char '-' not legal for the name of Oracle directory?
    Thanks a lot

    Is char '-' not legal for the name of Oracle directory?As in all oracle object name, until you use double-quote :
    SQL> CREATE OR REPLACE DIRECTORY
      2  PROTPL-RP-01_TPL_DB AS
      3  '/utl_db/skedul/protpl-rp-01';
    PROTPL-RP-01_TPL_DB AS
    ERROR at line 2:
    ORA-00905: missing keyword
    SQL> ed
    Wrote file afiedt.buf
      1  CREATE OR REPLACE DIRECTORY
      2  "PROTPL-RP-01_TPL_DB" AS
      3* '/utl_db/skedul/protpl-rp-01'
    SQL> /
    Directory created.
    SQL> But in this case, you will need to use double-quote on each call of this object :
    SQL> drop directory PROTPL-RP-01_TPL_DB;
    drop directory PROTPL-RP-01_TPL_DB
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL> ed
    Wrote file afiedt.buf
      1* drop directory "PROTPL-RP-01_TPL_DB"
    SQL> /
    Directory dropped.
    SQL> Nicolas.

  • Create OS filesystem Directory Using Apex, SQL commands of SQL worshop

    I am using Apex 3.0, Oracle Database 10g and IE 6.5
    Code Here:
    Create or replace Directory 'Data_Dir' as 'C:\temp\'
    Error Message:
    Insufficient Priveleges
    This code runs fine when I access server remotely. Our projec team has no APex experience. our workspace administrator does not know how to grant appropriate privileges to my user accounts.
    Please provide us step by step help immediately on 'How to create OS Directory from APEX'.
    Thank you very much.

    Please provide us step by step help immediately on 'How to create OS Directory from APEX'.Please bear in mind that most people in this forum are doing it in their own time, without any financial gain from it. If you have an urgent support issue that is critical to your business and you want it answered immediately you should contact Oracle support, otherwise remember that you may need to wait some time for someone to answer your question here (especially considering it's the weekend).
    However, in answer to your question, yes your DBA will need to grant 'create directory' or 'create any directory' to the user you've specified. If you're saying it runs fine when you access the server remotely (I'm assuming you mean via SQLPlus etc), that probably suggests your DBA has granted the right via a role which won't work while connected in the APEX environment (you will need to explicitly grant the permission to the user).
    Hope this helps.

  • How do I CREATE IF NOT EXISTS Temp table in PLSQL?

    hello, how do I CREATE IF NOT EXISTS Temp table in PLSQL? The following table is to be created in FIRST call inside a recursive function (which you'll see in QUESTION 2).
    QUESTION 1:
    CREATE GLOBAL TEMPORARY TABLE TmpHierarchyMap
                                  Id numeric(19,0) NOT NULL,
                                  ParentId numeric(19,0) NOT NULL,
                                  ChildId numeric(19,0) NOT NULL,
    ... more ...
                             ) on commit delete rows');
    QUESTION 2: How to return a temp table from a function?
    For example, this is how I'm doing it at the moment, using Nested Table.
    EXECUTE IMMEDIATE 'CREATE OR REPLACE TYPE TmpHierarchyMapObjType AS OBJECT
                   Id numeric(19,0) ,
                   ParentId numeric(19,0),
                   ChildId numeric(19,0),
    ... more ...
         EXECUTE IMMEDIATE 'CREATE OR REPLACE TYPE TmpHierarchyMapTableType AS TABLE OF TmpHierarchyMapObjType;';
    CREATE OR REPLACE FUNCTION fnGetParentsTable
    ObjectId number,
    ObjectClassifier varchar2
    RETURN TmpHierarchyMapTableType
    IS
    TmpHierarchyMap TmpHierarchyMapTableType := TmpHierarchyMapTableType();
    ThisTempId varchar2(32);
    CURSOR spGetParents_cursor IS
    SELECT
    Id,
    ParentId,
    ChildId,
    FROM TMP_HIERARCHYMAP
    WHERE TempId = ThisTempId;
    BEGIN
    SELECT sys_guid() INTO ThisTempId FROM dual;
    spRecursiveGetParents(ObjectId, ObjectClassifier, ThisTempId);
    FOR oMap in spGetParents_cursor LOOP
    TmpHierarchyMap.Extend();
    TmpHierarchyMap(TmpHierarchyMap.Count) := TmpHierarchyMapObjType( oMap.Id
    , oMap.ParentId
    , oMap.ChildId
    END LOOP;
    DELETE FROM TMP_HIERARCHYMAP WHERE TempId = ThisTempId;
    RETURN TmpHierarchyMap;
    END fnGetParentsTable;
    QUESTION 3: what does the word GLOBAL means? I read that temp table is visible only to a particular database connection/session and will be dropped automatically on termination of the session. i can only find this information in some forum discussion but failed to locate this in Oracle doc, can someone point me in right direction please?
    Many thanks!
    REF:
    http://stackoverflow.com/questions/221822/sybase-developer-asks-how-to-create-a-temporary-table-in-oracle
    http://www.oracle-base.com/articles/8i/TemporaryTables.php

    devvvy wrote:
    so if I CREATE GLOBAL TEMPORARY TABLE twice on second pass of my recursive function what then...?You don't create it inside your function.
    You create the GTT once on your database outside of the function and then just leave it there and use it.
    Tables should not be dynamically created and dropped.
    Only other database engines such as SQL Server use the concept of creating temporary tables during the execution of code. Oracle uses a "create once, use whenever" methodology.

  • Error while using Create or Replace Java Soruce ....

    Hello,
    I am very much new to JAVA. I got requirement which is very urgent.
    I have a Java file in the UNIX box and i am trying to put them in the Data base and call them through the PLSQL Package.
    These Java files were using for OA Framework, Now i have to use these files through PLSQL.
    1) In order to call java files in through PLSQL, first we need to create Java soruce.(CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED...
    ..... java class)
    2) Once this is compiled, then we can able to access through PLSQL Package. Is this correct.
    While doing So i am getting following errors when creating the JAVA SOURCE.
    Class oracle.apps.jtf.aom.transaction.TransactionScope not found in import
    Class oracle.apps.jtf.base.resources.FrameworkException not found in import.
    Class oracle.apps.jtf.base.resources.FrameworkException not found in import.
    Class oracle.apps.jtf.util.ErrorStackUtil not found in import.
    Class oracle.apps.jtf.util.FndConstant not found in import.
    But i am using
    import oracle.apps.jtf.aom.transaction.TransactionScope;
    import oracle.apps.jtf.base.resources.FrameworkException;
    import oracle.apps.jtf.cache.CacheManager;
    import oracle.apps.jtf.util.ErrorStackUtil;
    import oracle.apps.jtf.util.FndConstant;
    Can anyone please let me know why this error is comming up.
    Thanks,
    Srikanth.

    You seem to be new to java and three tier archietecture, probably from sql background. First understand the difference between an application server and database server.Java files reside in application server and not database server.
    In order to load OAF java files to server you need to put the files at appropriate location under JAVA_TOP and compile them using javac command to generate class files. Or else you can directly put the class files but it will give compile time errors if you don't have all dependencies locally.
    You need to upload UI xml files in MDS repository in db server and other xml files under appropriate directory structure under JAVA_TOP.
    Read dev guide for details.This is really an interesting TAR for Oracle support guys!
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Where the create or replace packagebody will  be stored?

    Friends,
    can anybody clear this doubt pls?...
    writing create or replace packagebody in the sql*plus will be stored in the database.
    but if i write the same create or replace packagebody in the forms where it will be stored?
    will it store in the database or in temp memory?
    thanks

    Like Francois said...
    When you create a program unit in forms, it will be stored in the form module.
    It's not available on the database.
    When you call a package in forms, it will first look in the form.
    If the package doesn't exist, it will check the libraries attached to the form.
    If the package doesn't exist in a library, it will check the database.
    I hope this helps...

  • Howto replace Permanent "Temp" table?

    Hi,
    I'm joining a project, but I am too novice on PL/SQL. One particular Procedure does a search query. The approach can be summarized as:
    * Build a SQL string base on values passed in the list of parameters
    * Truncate a permanent table named Temp_SearchID
    * Execute the dynamic SQL string which will populate the Temp_SearchID table (INSERT INTO Temp_SearchID SELECT ...)
    * Populate the returned cursor by a SELECT joining other tables with the IDs in Temp_SearchID
    {color:#ff0000}*Q1.*{color} If the application load increases, there will be a higher concurrency and let assume that there are several simultaneous calls to the procedure above. What would happen as all these calls has different parameters and they all want to compete to use the Temp_SearchID table their own way?
    *{color:#ff0000}Q2.{color}* If the approach using a permanent Temp_SearchID table is not recommended, it is possible to dump the IDs in a cursor which is local only to the procedure. Then make a SELECT joining with this cursor? In the SQL Server world, this is possible using Table variable or session local temp tables. If it is possible to achieve this with PL/SQL, can you please show me the syntax or point me to some code snippets?
    Thank you very much for any help.

    CarbonFiber wrote:
    In the scenario I am dealing with, the business rules are a little bit complex. Writing the entire SQL query in a string would indeed solve the problem. But it would be come hard to debug & test as the entire query now appear as a big string. I might ressort to that. As I am used to SQL Server, I would like to know if Oracle has a memory based structure, then join it with other tables to produce the final results. I don't know PL/SQL well enough to write a query joining a cursor with a table. Can you show me the PL/SQL syntax to do that?
    From a performance perspective in Oracle the single, plain SQL approach probably would be the best, depending on some other factors, like e.g. how sharable the SQL generated would then be (or are you going to generate then literally thousands of different large SQL statement as part of your process).
    As already discussed here you have in Oracle the option to create a GLOBAL TEMPORARY TABLE that holds data visible only to the session that's using it, but it's still writing/reading that data potentially from disk.
    The subquery factoring approach outlined by David might also be a quite good option if statement complexity is your main issue.
    The in-memory approach in Oracle is a bit more complex. You would need to create an type, a collection type on top of that and then use the PL/SQL collection to use in the query, e.g. like that:
    create or replace type t_qualified_id as object (
    productid integer
    create or replace type t_qualified_id_array as table of t_qualified_id;
    create or replace procedure test_collection as
      in_memory_table t_qualified_id_array;
    begin
      select t_qualified_id(object_id)
      bulk collect into in_memory_table
      from user_objects;
      for rec in (select object_id
      from table(in_memory_table) a
      inner join user_objects b
      on a.productid = b.object_id) loop
        null;
      end loop;
    end;
    /or like that if you don't want to use the "object" type, you can just create an array of the built-in number/integer type.
    create or replace type t_qualified_id_array as table of integer;
    create or replace procedure test_collection as
      in_memory_table t_qualified_id_array;
    begin
      select object_id
      bulk collect into in_memory_table
      from user_objects;
      for rec in (select object_id
      from table(in_memory_table) a
      inner join user_objects b
      on value(a) = b.object_id) loop
        null;
      end loop;
    end;
    /But you can see that there are subtle differences and you need to study the SQL and PL/SQL developer guide to get the details. It gets even more confusing because you can have in Oracle PL/SQL collection types and SQL collection types which differ in various aspects in terms of usage.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/
    Edited by: Randolf Geist on Sep 22, 2008 6:57 PM
    Subquery factoring mentioned

  • Create a Windows directory

    Hi,
    how to create a windows directory at runtime ?
    thanks
    olive

    Thats easy oliver
    Just first of all invoque a batch file
    let's call make_dir.bat
    in the make_dir.bat enter instructions to manipulate the directorios as MSDOS
    ie
    echo off
    \windows\temp
    md new
    save this file
    add a line in the part of you oracle code in wich you need to create this directory and do the following
    host('\windows\make_dir.bat',no_screen);
    in which windows is the name of the folder in wich you are going to store the file Make_dir.bat
    and That's all
    Is not so easy?

  • Is there a way to create a new directory or file in application install directory programatically

    Hi to all,
    Is there a way to create a new directory or file in
    application install directory programatically.
    I want a xml file to be created with in the application
    install directory programatically(not the application storage
    directory)
    I have used the following code snippet:
    var file:File = new File();
    file = File.applicationDirectory;
    file = file.resolvePath("assets");
    if(!file.exists)
    file.createDirectory()
    I am thrown an exception when using this .....Security
    Exception

    Thanks, but my main problem is to delete the locally stored
    data that is stored in the application storage directory when the
    application is uninstalled.
    The data is not being deleted automatically when the
    application is uninstalled, thats why I want to write some file to
    application directory.
    My application is remembering the login username and password
    even I uninstall the application and reinstall the next
    time.

  • Error while creating the backup directory

    I bought a Time Capsule yesterday. As with all of Apple's networking products, it set up like a breeze. Took about 10 minutes. I have two MacBooks running on the network now. I set Time Machine to start working on both of them (one of them has used TM before with an attached external hard drive). The machine that never used TM before is backing up nicely to the TC. On my machine, however, I keep getting this error: Time Machine Error. Unable to complete backup. An error occurred while creating the backup directory."
    Have any of you run into this before and, if so, how do I get around it?
    Both MacBooks are 2.16 GHz Intel Core 2 Duo with 2 GB RAM and running 10.5.2
    Thanks,
    Martin

    Maybe I have the answer for you, TommorowNeverKnows. Somewhere on the forum in the many emails about this subject, someone proposed a solution and yesterday it worked for me. (I'm sorry that I can't find it right now, but I do remember it).
    He (or she) proposed first using Onyx to see whether that solved the problem. If not, then download the combo updater for 10.5.2 and try that. He was unable to run it, however; and I couldn't run it either -- a message about it's not being able to run on "this machine." That might be because the machine was already running 10.5.2.
    In that case, he proposed doing an archive and install from the original system disc (being sure, of course, to save your settings). Well, I dreaded doing that, just because of the time it took, but by yesterday evening I was so frustrated that I bit the bullet. So I archived and installed and was back to 10.5. Then I ran the combo updater and it worked. Then I did a Software Update, and there was loads of stuff to be updated. After all that, I turned on Time Machine and went to bed.
    When I woke this morning, the machine was fully backed up to the Time Capsule with no errors (about 92+ gig). And when I looked at my Time Machine files, everything was just fine.
    So, if you haven't tried this yet, I would say that it's definitely worth an attempt.
    Hope this helps,
    Martin

  • Create or replace trigger

    hi i want to create trigger . when insert a row on table , it returns new value and old value . I have many tables and columns . i should to use :new.columntitle and :old.columntitle .Columntitle is refere to name of column in table . but sql developer is not accept it and show this error : BAD BIND VARIABLE 'NEW.COLUMNTITLE' .My code is this :
    Create or replace TRIGGER hr.departments_before_insert   
      before insert       on HR.departments 
       for each row
       DECLARE
          columnid number ;
         columnval number ;
         columntitle varchar2(4000);
         cursor c2 is
         select id,tableid from hr.columns where tableid = 1 ;
          tablesid number ;
          tablenames varchar2(4000);
          cursor c1 is
          select id , title from hr.tables where id = 1;
                    BEGIN
                    open c1;  
                           loop
                              fetch c1 into tablesid , tablenames;
                                  EXIT WHEN C1%NOTFOUND;    
                                   for rec in c2
                                            loop
                                                 select substr(title,instr(title,'.',-1,1)+1) into columntitle  from hr.columns where id = rec.id ;
                                                 dbms_output.put_line(:new.columntitle); -- in this line the eroor occured  : error = " bad bind variable 'new.columntitle' "
                                             end loop;
                             end loop;
                    close c1;    
                     end;
    -- in loop columntitle=deparment _id and department_name ; when i replace columntitle with department _id in :new , code is work ...
    thanks                                                                                                                                                         

    You have no choice but to specifically list the column names.
    If you really have "too many columns", that would tend to imply that you have improperly normalized your schema.  Perhaps you need to rethink the data model.
    If the real problem is that you want to generate similar triggers for a large number of different tables, you could write a PL/SQL block that generates the CREATE TRIGGER statement for each table and use EXECUTE IMMEDIATE to run those statements for each table.  Using dynamic SQL like this significantly complicates the complexity of building the trigger.  This may be balanced out, though, by the fact that you only have to write it once rather than writing separate triggers for each table.
    Justin

  • Cannot create or replace : The specified extended attribute name was invalid.

    New problem arrived today. Trying to copy a file from 10.6 server with an XP (SP3) client. I get this error:
    Cannot create or replace (file name here): The specified extended attribute name was invalid.
    The contents of the file can be copied, but not the folder. Other files can be copied. There are no funny characters. The name is not too long. I propogated the permissions on the share and that had no affect. The problem exists on three different XP systems. Can't find extended properties that could be causeing a problem. Any ideas?

    Nikon just released a Firmware update today for the D750

  • I have LR 4 and now I cannot open the software because I get this warning: light room cannot start because it cannot create files in the temp file location.. C:/windows/temp. How do I fix this? I have removed and downloaded LR and even used by disc and st

    I have LR 4 and now I cannot open the software because I get this warning: "light room cannot start because it cannot create files in the temp file location. C:\windows\temp\". I think I need to have LR open in a different place but I have no idea how to do that. Any help is most appreciated.
    Alex

    Jim
    Thank you for your prompt reply. Unfortunately I am not that tech oriented and
    cannot easily find that folder. I did notice when I was booting up the LR software
    that I could accept the site where LR usually is set up or choose a place. I am
    thinking that the standard location for LR software is corrupted and that if I
    chose a different place it would work. I say this because whether I use my
    original disc or download from adobe I get the same warning. I have 100GB of
    memory on the hard drive and I have cleaned the computer with Mcaffee and free
    software. What should I do next? I can't use this software and I doubt LR 5
    would open up with my current problem.
    Alex

  • " An error occurred while creating the backup directory"

    Hi all,
    I recently bought an external drive because my mac was just about full.
    It's made by Lacie, model # P'9231... (1TB)
    I got it working, for moving and accessing files (I moved the iPhoto library-and that works fine)...  but...
    I told Time Machine to use it as the backup disk, but TM often tells be that the backup failed. I get this message;
    "Backup failed.  An error occurred while creating the backup directory"
    I don't understand this.  I did some experiments with Time Machine, and I've been able to restore some things, but I still keep getting this message.
    I don't know what is getting backed up and what is not..
    Did I do something wrong? Or, more importantly, what is the fix?
    Any advice is much appreciated.  Thanks in advance,
    Jim

    I'm having the same problem.  I just got the drive Saturday at the local Apple store.
    Have you figured it out?

Maybe you are looking for