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.

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

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

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • 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

  • " 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?

  • Create or Replace Package syntax different in SQL Navigator?

    Hi,
    I compared the same piece of code in both toad and sql navigator.
    In toad, the syntax for Package was as follows:
    CREATE OR REPLACE package body name_of_package
    but in SQL Navigator, the same code is displayed as follows:
    package body name_of_package
    does SQL navigator hide the "Create or replace" keywords? or does it automatically know that they belong there?

    Is Sql navigator an Oracle product? IIRC Larry spent already all his pocket money on buying Sun.
    Kindly do not clutter up this forum with questions on products not developed by Oracle.
    Sybrand Bakker
    Senior Oracle DBA

  • Trouble Creating a New Directory to Import into

    I just upgraded to Lightroom 5 today and installed the update to 5.2 on Windows 7 64 bit.  I have run into a problem I never had before.  In the import module I want to create a new directory to import into.  I go through the same steps I did in Lightroom 4, but when I am done, the directory does not show up on the list.  I can find it in Windows Explorer, but not Lightroom.  If I leave the import module and then return, the directory shows up in the Lightroom list of directories.  I have tried this twice with the same result both times.  Has anyone else seen this?  Is there a Fix?

    Thanks that works.  I found that even though the new directory did not show in the Import list of directories when I created it usind the right-click method as I did in LR4,  LR5 is in fact creating it and will import to it.  Another odd thing is when I create the directory using the right-click, Windows Explorer method, the directory list in the Import module flickers like it is adding the new directory.  However, the new directory cannot be seen.

  • How to Create a Temporary Directory?

    Hi,
    I'd like to create a directory with all of the
    nice properties that File.createTempFile gives
    you. However, it looks as though the only way to
    do this is to:
    File tfile = File.createTempFile("blah","", parent);
    tfile.delete();
    workingCopyDir = new File(tfile.getCanonicalPath());
    workingCopyDir.mkdir();
    What I'd like is either:
    File wcd = File.createTempFile("blah","",parent,true)
    where the 4th arg is a boolean "make a directory?"
    kind of arg...
    OR
    File tfile = new File(parent,File.createTempFileName())
    where createTempFileName returns a String.
    OR
    something else that is an equally good solution.
    Now, I've somewhat searched the archive on this but
    got slogged by the large number of hits. I've browsed
    the API and didn't see anything else that would work.
    Suggestions are welcome. Advice on a better place
    to send this suggestion would also be great...
    -Jen

    File tfile = File.createTempFile("blah","", parent);
    tfile.delete();
    workingCopyDir = new File(tfile.getCanonicalPath());
    workingCopyDir.mkdir();While it isn't as good a solution as File.createTempDirectory(), there are some steps in your code that you don't need to follow. You would be able to do the following:
    File tempDirectory = File.createTempFile("blah","blah", parent);
    tempDirectory.delete();
    tempDirectory.mkdir();
    After calling tempDirectory.delete(), tempDirectory still points to the name of the temp file, which can then be used directly to create the temp directory.
    This assumes nobody creates a temp file with the same name as the original temp file between "delete()" and "mkdir()". The likelihood of this happening is not high, but it is possible.

  • Weird filename are getting created in archive directory.

    Hi All,
    Weird filename are getting created in archive directory.
    I have one ftp adapter,after the file getting processed the file's are getting moved to archive directory.
    But with some different file name/ filename are randomly generated. But the content of the file remains the same.
    Pls suggest.
    Thanks.

    This is standard functionality, it uses the original filename with a suffix of the datetime.
    cheers
    James

  • Hudson - Unable to create the home directory

    Hello, I installed tomcat and downloaded hudson.war and put it into
    /opt/tomcat/webapps/hudson.war
    I'm able to navigate to localhost:8080/hudson, but I only see this message:
    Unable to create the home directory {0}. This is most likely a permission problem.
    To change the home directory, use HUDSON_HOME environment variable or set the HUDSON_HOME system property. See Container-specific documentation for more details of how to do this.
    I've set HUDSON_HOME in a gazillion places -- yet none of them has done any good.
    Can anyone point me to a solution?
    Thanks,
    --Nate

    That indicates that Time Machine is having trouble writing to that sparse bundle.
    See #C9 and #C10 in the Time Machine - Troubleshooting *User Tip,* also at the top of the +Time Machine+ forum.

Maybe you are looking for