Creating directory under specific schema

What is the syntax to create a directory under a specific schema?
Here is what I've tried and I get an error:
CREATE OR REPLACE DIRECTORY test.utl_dir AS 'D:/utl_dir' ;
Here is the error:
Error starting at line 1 in command:
CREATE OR REPLACE DIRECTORY rcdtpump.novus_dir AS 'D:/Novus/novus_dir'
Error at Command Line:1 Column:36
Error report:
SQL Error: ORA-00905: missing keyword
+00905. 00000 - "missing keyword"+
*Cause:+
*Action:+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

You can't, directories are database wide objects, see:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_5007.htm#i2061958
...+All directories are created in a single namespace and are not owned by an individual schema+...
HTH
Enrique

Similar Messages

  • Allow user to create objects in specific schema

    I would like to be able to grant a user/role permission to create/drop tables/views/etc.. in a specific schema, other than their own.
    It appears like I can do either
    grant create table to role
    or
    grant create any table to role
    the former allowing them to create tables in their own schema, the latter allowing them to create tables anyplace.
    Is there really nothing in the middle?
    Why....
    In my application i have a couple of "users" that are really just schemas. They are not used for users to login.
    We have actual user account(s) that are used for connecting to the db by the application.
    We have a role that all of these users belong to.
    At certain points in our application, our use needs to modify one of these application schemas.
    I do not want the user to be able to modify any other schema in the database.
    I can't be the first person to have encountered this. I'm hoping that there is some clever solution that I have just missed thus far.
    10g would be ideal, 11g only would be ok.
    Thanks.
    Edited by: 854248 on Apr 23, 2011 8:54 AM

    854248 wrote:
    I would like to be able to grant a user/role permission to create/drop tables/views/etc.. in a specific schema, other than their own.
    It appears like I can do either
    grant create table to role
    or
    grant create any table to role
    the former allowing them to create tables in their own schema, the latter allowing them to create tables anyplace.
    Is there really nothing in the middle?
    Why....
    In my application i have a couple of "users" that are really just schemas. They are not used for users to login.
    We have actual user account(s) that are used for connecting to the db by the application.
    We have a role that all of these users belong to.
    At certain points in our application, our use needs to modify one of these application schemas.
    I do not want the user to be able to modify any other schema in the database.
    I can't be the first person to have encountered this. I'm hoping that there is some clever solution that I have just missed thus far.
    10g would be ideal, 11g only would be ok.
    Thanks.
    Edited by: 854248 on Apr 23, 2011 8:54 AMYou can give them CREATE ANY TABLE/VIEW privileges and then limit their actions by DDL triggers:
    http://psoug.org/reference/ddl_trigger.html
    http://www.java2s.com/Tutorial/Oracle/0560__Trigger/AFTERDDLONSCHEMA.htm
    Regards
    Gokhan

  • Creating table under SOAINFRA schema

    hi all,
    As iam a fresher in oracle fmw i need to know about how to create a table under SOAINFRA schema.

    You can't, directories are database wide objects, see:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_5007.htm#i2061958
    ...+All directories are created in a single namespace and are not owned by an individual schema+...
    HTH
    Enrique

  • How to find out no of table being created in a specific schema

    Hi all,
    I wanted to know how many table i have created in my schema.i have tried with this query but it is giving wrong information.
    [sql>select count(*) from tab;
    need your help please.
    Regards
    Laxman                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    select count(*)
    from dba_tables
    where owner= 'YOUR_SCHEMA_NAME'or
    select count(*)
    from user_tables

  • Impdp specific schema from dump which has been created using full=y

    Hi,
    I have received a dump (expdp) which has been created using the parameter FULL=Y. I just want to import (impdp) only one schema into my database. I have used remap_schema and exclude=grants. The schema i want to import is carried out successfully, but in my import log i keep getting the messages such as :
    ORA-31684: Object type TABLESPACE:"TS_BCST1" already exists
    ORA-31684: Object type USER:"OUTLN" already exists
    ORA-31684: Object type SEQUENCE:"SYSTEM"."MVIEW$_ADVSEQ_GENERIC" already exists
    How can i use impdp only to import objects under my specific schema and not have impdp attempt to create system/sys users and its objects, create tablespaces, etc etc.
    Kindly assist.
    Regards,
    Karan

    Use SCHEMAS parameter in the impdp command to import the scpecific schema.
    Eg.
    impdp system/password schemas=user1 remap_schema=user1:user2 directory=dir dumpfile=user1.dmp...........
    You can specify list of schemas you want to import with , (comma) saperated in the SCHEMAS parameter.

  • Create WBS Element under Specific existsing Level1 WBS Element

    Hi friends,
           In a Project definition, once the User creates the Level 1 WBS Element,
    I need to Create a Level 2 WBS Element by default. Please suggest me any function modules or BAPI
    to Create the WBS element under Particular WBS Element.
    I checked the BAPI BAPI_BUS2054_CREATE_MULTI
    I hope it creates WBS elements, but not under Specific WBS element.
    I am checking the function module CJWB_CREATE_PRPS
    Please suggest how to go ahead.........
    Thanks in Advance,
    Ganesh

    wbs cant b created under network,
    just go to cj20n, select network/activity, then right click there, u ll never see any wbs element in create tab.
    Graphically network is above a wbs in cj20n, does not mean that wbs is coming under network.
    ashis

  • Problems on creating table under schema for BPM Demo project

    hi,
    i have not enough experience in database concepts, but i can create ,insert and modify the tables and data by using SQL query in oracle database 10 g express edition
    The reason behind send this qurery is i wanted to create the database tables under "Quote" schema., which is necessary to store and retrive data for my BPM demo project.
    Two important . Sql scirpt file namely create_user.sql and quote.sql used to create the database tables under "quote" schema available on e:/bpm/sql
    i could create "quote" schema by this command on commandline,
    >cd e:/bpm/sql
    >sqlplus sys/welcome as sysdba @create_user.sql quote quote
    but when creating database tables under "quote" schema , i got "SP2-0734 - unknown command exception thrown
    in commandline i was used like this to create table,
    >sqlplus quote quote @quote.sql
    Can anyone who familiar with database query concept help me to create tables on "quote " schema,
    thanks in advance

    Hello,
    Please find enclosed a complete chapter about the CREATE TABLE statement:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm#i2095331
    At the end there're many examples.
    Hope this help.
    Best regards,
    Jean-Valentin

  • Why can't create file under /home directory?

    I user solaris10, and login as root,I find I can't create any file or directory under /home directory! It say "operation not applicable" ,Why? I am puzzled it for a long time. Anyone could tell how to do it?
    Thanks

    For Solaris,
    /home is not an on-disk file system, it is a file system under the
    control of the automounter, and only the automounter can create
    directories/files in it.
    If you don't want the automounter to manage /home, then remove the
    "/home" entry from /etc/auto_master
    (and issue the command "automount -v" to force the file
    to be reread, or reboot).
    However, the typical setup for Solaris is to locate user's home directories
    in /export/home.
    Kapil Khanna

  • Getting error while creating the variable of Schema Element type

    Hi everybody,
    For creating a variable of schema element type I am doing the following steps...
    Select 'Variables' after right clicking on bpel process. IN this window, go to 'Create VAriable' then select 'Element' type. Now in Type Choose, I expanded the my imported schema files. And selected a element type, then click ok to create this variable... I am getting the message...
    IN ORDER TO SAVE IMPORTED WSDL/SCHEMA FILES, YOU MUST HAVE A PARTNER LINK LOCATED UNDER THE CURRENT PROJECT DIRECTORY.
    What is mean by that.
    I have imported the schema files in project. AFter that I have imported them into the WSDL also. Now why I am getting error while creating the variable. However I can create variable directly in .BPEL file then everything is fine. And it is working also. But what is mean with the above error? Why I am not able to create variable through GUI?
    Thanks.

    Hi,
    I have this same problem this morning, and I was going crazy, until I found this webpage on the internet:
    [http://technology.amis.nl/blog/1803/problem-importing-xml-schema-in-bpel-process|http://technology.amis.nl/blog/1803/problem-importing-xml-schema-in-bpel-process]
    The idea is that the jdeveloper is not very good working with directories with spaces on the directory name. If you move all your work to a directory without spaces, it will work smoothly. At least, it had worked for me.
    Regards,
    Nacho

  • VMS, create directory and the chamber of secrets

    Ok, here I am bumbling around in the dark. Here is the scenario I am developing an application using PL/SQL under the constraints of the SCT Banner web form system. The Banner function calls create the web page on the fly from data obtained with PL/SQL. What I would like to do is incorporate a java function into the web page. The only method available to me is via Banners function call twbkfrmt.p_printmessage (my_string); Here is the 'Plan' (caution: may be seriously flawed). I thought I could store my java code in a the CLOB field of a table, access it with a cursor and insert the code into the generated web page like so: twbkfrmt.p_printmessage (my_java_from_the_CLOB); I am having troubles loading the .js into my table. Here is how I attempted to accomplish this and the result (and to add insult to injury, it is on a VMS system!):
    CREATE TABLE js_holder (
    js_name varchar(30),
    js_body CLOB );
    CREATE DIRECTORY foos as 'USR$DISK:[CLEMENSD.SQL_EDIT]';
    CREATE OR REPLACE PROCEDURE Load_CLOB IS
    dest_clob CLOB;
    in_file BFILE := BFILENAME('foos', 'supernote.js');
    dst_offset number := 1 ;
    src_offset number := 1 ;
    lang_ctx number := DBMS_LOB.DEFAULT_LANG_CTX;
    warning number;
    BEGIN
    DBMS_OUTPUT.ENABLE(100000);
    INSERT INTO js_holder(js_name, js_body)
    VALUES('supernote', empty_clob())
    RETURNING js_body INTO dest_clob;
    DBMS_LOB.OPEN(in_file, DBMS_LOB.LOB_READONLY);
    DBMS_LOB.LoadCLOBFromFile(
    DEST_LOB => dest_clob
    , SRC_BFILE => in_file
    , AMOUNT => DBMS_LOB.GETLENGTH(in_file)
    , DEST_OFFSET => dst_offset
    , SRC_OFFSET => src_offset
    , BFILE_CSID => DBMS_LOB.DEFAULT_CSID
    , LANG_CONTEXT => lang_ctx
    , WARNING => warning
    DBMS_LOB.CLOSE(in_file);
    COMMIT;
    DBMS_OUTPUT.PUT_LINE('Loaded File using DBMS_LOB.LoadCLOBFromFile.');
    END;
    then the following:
    EOUTST> set serveroutput on
    EOUTST> exec Load_CLOB
    EOUTST> exec load_clob
    BEGIN load_clob; END;
    ERROR at line 1:
    ORA-22285: non-existent directory or file for FILEOPEN operation
    ORA-06512: at "SYS.DBMS_LOB", line 672
    ORA-06512: at "BANINST1.LOAD_CLOB", line 13
    ORA-06512: at line 1
    EOUTST>

    Is the directory owned by the same schema that owns the procedure?
    If not did you GRANT READ and WRITE to the proc's schema?
    If so then you might want to create a simple external table to confirm that your directory and permissions are valid.

  • Priveleges to create procedures/functions in schemas

    Greetings,
    I have a default schema associated with my user account. Can permissions be given for my user account to create functions and procedures in another schema without giving that user priveleges to create in ANY schema.
    Our default schema for HTMLDB is not the schema associated with my user account. I want to be able to create my functions inside that schema, but our DBA's havent been able to find out how to give the privelege without opening up all schemas to that account.
    hope this made sense,
    Cliff Moon

    Okay Cliff, no problem.
    Now, Michael, I don't know of any prepared docs specifically about this but fwiw, I'll try to recap how it works.
    1. HTML DB uses a public account to create (or reclaim) a distinct database session to service each page request. The connection is configured with the modplsql DAD and the database user (schema) that owns the session is HTMLDB_PUBLIC_USER. (The exception to this is when you configure a DAD for basic authentication.)
    2. The public packages (like wwv_flow) and procedures (like f) invoked through each HTTP request are owned by schema FLOWS_xxxxxx. Packages like wwv_flow use definers rights. This means, among other things, that they can execute any other packages owned by the FLOWS_xxxxxx schema, including the highly privileged, non-public packages that execute user code.
    3. The more privileged non-public packages do all the real work of rendering pages and processing POSTed pages. During these phases, your application code is executed (your report region queries, your DML operations, your page processes, validations, condition evaluation, your API calls, everything). All of this code is "parsed as" the database user (schema) assigned to your application. (Only one schema is assigned to a given application, although the assigned schema can be changed using the builder whenever you like.) The HTML DB engine can execute all of your application code as the "parse as" schema because it has SYS privileges to do so.
    4. Any of your code that HTML DB executes dynamically runs with the security privileges of your application schema. These privileges must have been granted explicitly and not through roles. So if your report query does 'select * from emp' it's necessary for emp (or a synonym for it) to exist in your application schema and for that schema to have select privilege on emp.
    5. The SQL Workshop works the same way, except things happen there at a workspace level, not at an application level. A workspace has one or more database schemas mapped to it. This means only that a conscious decision has been made (by an admin) to allow each workspace to access specific schemas. The list of schemas mapped to a given workspace appears in LOVs in various places, such as the SQL Command Processor. Selecting a schema from this LOV allows you to perform operations in that schema. You can perform operations in any of the other mapped schemas by selecting them from the LOV in turn.
    Note: so far we've said nothing about who the authenticated user is using your application (or the SQL Workshop application), because it has absolutely no bearing on anything so far.
    6. HTML DB allows developers to specify a plan to be used by the engine at the start of every page request to perform the chores of authentication, initial session registration and session management. This plan is called an authentication scheme. HTML DB provides standard schemes that are used by most developers, but developers can also design and build custom authentication schemes over which developers have complete control.
    7. During the execution of the authentication scheme for a page view (show) or page processing (accept) request, it is common for the scheme to cause a branch/redirect to a login page if it determines that no valid session yet exists. The operation of the login page results in the user being challenged for credentials and for those credentials to be verified. If they check out, related housekeeping tasks are performed such as recording the session ID in a table and session cookie creation. And a token is established to be used to identify the authenticated user for the duration of the HTML DB session. This value is stored in APP_USER and can be queried by developer-owned code and HTML DB-owned code as required.
    8. The credentials verification step is where user accounts come into play. It doesn't matter to HTML DB whether your application uses custom tables, an LDAP directory, an SSO infrastructure, or database accounts to verify credentials -- the verification takes place, usually once per HTML DB session, and that's that. The authentication scheme determines the exact method used.
    9. One example of an application that uses its own custom tables to hold account information (usernames/passwords) is HTML DB itself. You get the first account created for you during product installation and then you create administrator and developer accounts as you create multiple workspaces for developers at the site. These accounts are just rows in tables, a username, a password, an email address, the ID of the workspace, basic stuff like that. They are not database user accounts (schemas). And with these accounts, you can authenticate to HTML DB and use the Builder, the SQL Workshop, and the administration functions. Just remember, the database knows nothing of these accounts (they are like Oracle Applications user accounts).
    10. These HTML DB user accounts exist primarily to allow developers to use HTML DB. But they can also be used to allow end users to authenticate to applications created using HTML DB. That relieves each developer of having to "reinvent the wheel" and set up account repository tables and to have to write APIs to store/manage passwords, the work we did for HTML DB itself. Your application can simply use the built-in HTML DB authentication scheme which uses the account repository for credentials verification. It's not the only way for your application to verify credentials. In fact it's best suited for experimental applications, small workgroup applications, prototypes, apps on that scale. Applications that are slated for actual production deployment should be fitted with enterprise-level identity management solutions.
    11. Finally, HTML DB provides a very, very basic group-membership model that allows developer accounts (not database schemas) to be assigned to arbitrarily organized named groups. There is a supporting API for queries against these groups and an admin UI to create/maintain these groups. The same caveats given for using developer accounts for production applications apply to this facility.
    Recap:
    Database accounts: HTML DB does not use these accounts, their roles, or their privileges except to dynamically execute application code using these schemas as the "parsing schema".
    HTML DB user accounts: No relation to database schemas (*). They exist in custom tables owned by the HTML DB product. Accounts can be created and used by application developers as an out-of-the-box credentials verification method for authentication.
    *Exception: The "default schema" associated with an HTML DB user account is the name of a schema used to prime an LOV when the user sees a list-of-schemas LOV in places like the SQL Workshop.
    Scott

  • How to create an application-specific policy file?

    Hi Everybody:
    I'm a .NET developer with C #. I have a few applications currently running on my computer using the ODP 10.1
    Two weeks ago I installed on my computer the ODP 10.2 Release & now my previous applications have stopped working: when I try to make the connection to the database gives me this exception:
    OraOLEDB (0x80004005)
    ORA-12154: TNS: could not resolve the connect identifier specified
    In FAQ section for ODP.NET I found the next:
    Q: I have two .NET applications on the same machine running two different versions of ODP.NET. How do I ensure both these applications use the correct ODP.NET version?
    A: Beginning with ODP.NET 10.1.0.3, the Oracle installer will register the following publisher policy DLLs in the Global Assembly Cache (GAC) that redirect 9.2, 10.1 and 10.2 ODP.NET applications to use the last installed version of ODP.NET: Policy.9.2.Oracle.DataAccess.dll and Policy.10.1.Oracle.DataAccess.dll.
    ODP.NET 9.2 includes just the first policy DLL above. These policy files ensure that all your ODP.NET applications use the most recently installed version of ODP.NET.
    You may undo the redirection manually. Policy DLLs can be de-installed through gacutil.exe using the /u option. Another approach is to navigate to the GAC directory (i.e. C:\WINNT\assembly) through the Windows Explorer and delete the policy folders. That will eliminate any policy enforcement for all your ODP.NET applications.
    If you have applications on the same machine using different ODP.NET versions, you should create an application-specific policy file.
    I'm trying to do that, but I don't know what is an application-specific policy file. Someone can give me an example of How can I create and application-specific policy file???
    Regards

    Hi,
    Binding redirection is a ".net thing" as opposed to a "odp.net thing", see if this helps:
    http://msdn.microsoft.com/en-us/library/7wd6ex19(VS.71).aspx
    Hope it helps,
    Greg

  • Error 7 occurred at Create Folder in Create Directory Recursive.vi-

    Recieved following message when attemoting to create source distribution
    Error 7 occurred at Create Folder in Create Directory Recursive.vi->ABAPI Dist Create Directory Recursive.vi->ABAPI Dist Chk for Destinations.vi->ABAPI Copy Files and Apply Settings.vi->SDBEP_Invoke_Build_Engine.vi->SDBUIP_Build_Invoke.vi->SDBUIP_Build_Rule_Editor.vi->SDBUIP_Item_OnDoProperties.vi->SDBUIP_Item_OnDoProperties.vi.ProxyCaller
    Possible reason(s):
    LabVIEW:  File not found. The file might have been moved or deleted, or the file path might be incorrectly formatted for the operating system. For example, use \ as path separators on Windows, : on Mac OS, and / on Linux.

    Hello,
    Could you please list which options you are selecting when building a
    source distribution (I am assuming you are using LabVIEW 8.0?).
    Do you get this error when clicking on "Generate Preview" button when configuring source distribution properties?
    Under "Distribution Settings" category, could you try checking the
    "Disconnect type definitions and remove unuses polymorphic VI
    instances" option and see if that helps with the build process?
    Also I suggest Mass Compiling your VIs (Tools -> Advanced -> Mass Compile) before creating a source distribution.
    If these do not help, could you attach your project with all the VIs it contains here?
    Thank you and best regards,
    Shakhina P.
    Applications Engineer
    National Instruments

  • Any reason NOT to create subfolders under user folder?

    I'm switching over from a 5+ year old MacBook Pro to a new one. I do a lot of audio recording and production work. On my old machine, which was my first Mac, I created a subfolder 'Recordings' under my user folder (let's say it's named "bob"). I don't remember why I did that. Probably I was thinking well, this stuff isn't documents.
    On the new machine, running Yosemite, I discovered that Apple in it's wisdom had made my "bob" user folder hidden, which meant I had to go figure out how to show it because there are some audio plugin settings files I needed to add manually from the old machine into my user/ Library area. Did that.
    BUT... I'm wondering if there is some reason why Apple changed the user folder to hidden (other than "you dumb users don't need to know about this stuff"), and specifically, if I should avoid creating any subfolders under my user folder? I would really rather not have my 'Recordings' folder  inside the Documents folder, but I guess I can if there's some good reason not to create subfolders under 'bob'.
    Thanks in advance.

    They didn't make it hidden (like the Library sub folder), but I believe it is no longer included in the sidebar by default. Probably for the reason you state. As you've found, you can add it back through Finder Preferences menu.
    Matt

  • Can I create a new iFS schema by command line ?

    For creating a new iFS Schema you have to run ifsconfig and this
    is a GUI tool. Is there a way to specify all the parameters to
    this command by input file so that it can create the schema
    without popping up the GUI ? If yes how can one catch errors in
    the schema creation if there are any?

    Hi,
    I think I am having a similar question here. I am using Oracle 10g on Windows xp.
    I logged in to Oracle from command prompt. I used command “create directory myFunDir as 'd:/funDir';”. Oracle returns: “Directory created”. But I couldn’t find the directory “myFunDir”! Where is it?
    Thanks.
    Newbie.

Maybe you are looking for