Oracle DIRECTORY object and subdirectories

As you know, in 9i the use of the UTL_FILE_DIR is being deprecated in favour of Oracle DIRECTORY objects. This is fine for security reasons and administration but there seems to be a problem with subdirectories.
The situation: we are generating literally millions of files using UTL_FILE. These files are going to be stored in one of forty thousand directories (the precise directory is derived from parsing the file's key ID).
In the old days access could be granted simply by setting the UTL_FILE_DIR parameter to /<root>/dir/*
As far as I can see, the Oracle DIRECTORY does not support subdirectories. Is there any way of avoiding the creation of forty thousand CREATE DIRECTORY statements and a concommitant number of GRANT statements?
Oracle 9.2, any suggestions gratefully received.
Cheers, APC

Just curious Andrew-- are there things in the UTL_FILE package that you don't find implemented better in Java's I/O classes? I wouldn't claim to be the world's leading expert on Java I/O, so I won't comment on the specifics of this. Generally I think using Java to re-write a piece of existing native functionality is a hard one to sell:
(1) Java tends to run slower than native code
(2) It's a chunk of work, and my PM is already breathing down my neck.
However, I might do this as a hobby project. If I do, I'll let you know how it turns out :)
Cheers, APC

Similar Messages

  • Use Oracle directory object in SQL*loader?

    Hi All,
    We have a bunch of flatfiles that need to be read on a daily basis. We are using SQL*loader to read these files into Oracle.
    The files arrive into a different directory every day ( /filesDDMMYY/ ). We now manually copy these files into the static directory which is pointed to in our ctl file. I was wondering if it's possible to use an Oracle Directory object to point to these data files, in stead of the pysical directory we use now?
    Now we use: INFILE './sources/mydata.txt' , but I would like to make this a dynamic refrence to a directory with a different name
    I searched the documentation and the internet quite extensively, but can not get an answer if it's possible to use directory objects in conjunction with sql loader.
    Any help or suggestions would be appriciated.
    Greetz,
    Toin.
    Message was edited by:
    Toin ~ corrected typo

    you can remove the INFILE parameter from the CTL files, and instead specify it on the command line (DATA=./sources...).
    obviously this would still require changing every ctl file, but you would only need to do it once, not everytime you change a directory.
    of course, the shell script which runs sqlldr would need to change. however, you could make the shell script more robust, by having it connect to sqlplus to look up the actual directory path from ALL_DIRECTORIES, and then use that when calling sqlldr.

  • How to get file names for one oracle directory object.

    Hi all ,
    I defined one oracle directory object . Now I want to know how many files stored under this object in physical directory and their names ? anyone know how to do it by pl/sql ?
    Thanks,
    George

    Chris Poole has an [XUTIL_FINDFILES package|http://www.chrispoole.co.uk/apps/xutlff.htm] which can do this in pure SQL. It does require, though, that your DBA install code in the SYS schema and that you rely on the behavior of an undocumented X$ table. That may not be possible in certain environments.
    I personally prefer a small Java stored procedure along the lines of [this one from Tom Kyte|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:439619916584]. It isn't a pure PL/SQL solution, but it tends to fit relatively cleanly in any environment. Most DBAs will be willing to grant the privileges this sort of approach requires where they would be hesitant to grant the access necessary for XUTIL_FINDFILES.
    Justin

  • Specifying Directory path while creating Oracle Directory

    Hi All,
    I would like to know the restriction applies on directory path while creating oracle directories.
    shold directory exist on local server? What about remote locations?
    Please share your thoughts.
    _BR                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    B R wrote:
    Hi All,
    I would like to know the restriction applies on directory path while creating oracle directories.
    shold directory exist on local server? What about remote locations?It should, but it doesn't have to whilst you create the oracle directory object. It is only when oracle comes to use that directory object that it will need to exist otherwise you'll get an error. Oracle doesn't check the path upon creation of the directory object itself.
    The directory object should point to a path that is visible from the database server such that, if you were logged directly onto the server itself, you could access that directory from there (and preferably without UNC paths, as Oracle has been known to have issues with those in some versions). Typically the directory will be on the server itself, but if it must be on a remote location it will need to be mapped as if it is a local directory. You can't expect Oracle to hack across the security of a network and break into another machine to access it's directories without explicit permission having alreayd been granted at the operating system level.

  • Traversing through oracle directory in Plsql

    Hi experts ,
    I want to traverse the oracle directory to search for a particluar pdf file and then convert that pdf file into blob file.
    This blob file will be store in the oracle table.
    The problem is that the path of the oracle directory will be dynamically set with the variables.
    Please guide me for this as i dont't have the enough knowledge about the oracle directory objects.
    Any useful link will also be appreciated.
    Thanks

    Oracle is a database software. Asking it to do OS level operation is in a sense wrong. But such a thing is achievable in oracle if you take the help programming language like C or Java.
    Here is a very old post from ASKTOM where in Tom demonstrates how to do a list directory using embedded Java code and with the help of global temporary table.
    Ask Tom "reading files in a directory -- how to get a list of available files."
    This should get you started. If you have expertise in Java or C you can improvise it, as its a decade old code.
    And to load the file into blob column of a table, again I will refer you to an ASKTOM post.
    Ask Tom "Display PDF file stored in the Database"

  • Business Objects and OBIEE

    Hi,
    Can some one please explain me what are Oracle Business Objects and how is it different to Oracle Business intelligence Enterprise edition.
    Also please point me to Oracle Business Objects Documentation.
    Appreciate your help on this.
    Thanks,
    Kiran

    Kiran,
    Jokes aside, Theres a few documents on how Oracle partner with Business Objects but there is no "Oracle Business Objects" BI product, at least up until end of last year before I left Oracle Consulting BI practice.
    Yes SAP Business Objects connects and supports Oracle 10G database functionality, but that would be Oracle DB, not Oracle BI EE.
    I seriously doubt they would launch ANOTHER BI tool with the same application name as a competitor?
    I hope you can get the information you are seeking.

  • SCD's type 2 conflict with Oracle Dimension Object

    Hi everybody.
    I have a little problem understanding Oracle Dimension Objects and how to use it with SCD type 2.
    Oracle's documentation says: There must be a 1:n relationship between a parent and children. A parent can have one or more children, but a child can have only one parent.
    This makes me think that if i have, for example, a department 1 and zone 'A', this department ALWAYS have to map the same zone, the zone 'A' can have more than one department but one department have to map every time to the same zone.
    This is a correct example: department 1 maps to zone 'A' everytime
    Employee Department Zone
    1 1 A
    2 1 A
    This is an incorrect example: department 1 DOES NOT MAP to zone 'A' everytime
    Employee Department Zone
    1 1 A
    2 1 B
    Oracle's documentation says: You must not create dimensions in any schema that does not fully satisfy the dimensional relationships. Incorrect results can be returned from queries otherwise.
    OK, but what can we do if the department's zone actually change???
    In SCD type 2 we use the following technique:
    ID Employee Department Zone Start End
    1 1 1 A 2010-01-01 2010-01-02
    2 1 1 B 2010-01-03 null
    Now we can see that SCD type 2 does not follow the requirements that ORACLE recommends for the creation of Dimension Objects, I mean department 1 now maps to the older zone A and the newer zone B.
    Is it correct?
    Can somebody clarify this? I think is a conflict.
    Thanks.

    Hi,
    Is it correct?No, you are wrong. You mixed dimension attribute historization and hierarchy relationship.
    Behaviour of mapping for loading SCD2 dimension depends on how did you implement Department and Zone entities in your dimension -
    as a general attributes of lowest dimension level (EMPLOYEE) or as a higher levels in dimension hierarchy.
    If you define Department and Zone as attributes of EMPLOYEE level than behaviour of loading algorithm will be as you described -
    it is because OWB doesn't know that Department and Zone attributes compose hierarchy.
    But when you define additional levels Department and Zone - OWB tries to resolve conflicts over hierarchy in very simple way -
    for each child dimension value it choose single parent with minimal business key value.
    In your case loaded data will be:
    ID Employee Department Zone Start End
    1 1 1 A 2010-01-01 2010-01-02
    2 1 1 A 2010-01-03 null
    Since 10.2.0.4 patchset there is also Hierarchy Versioning feature (so configured for versioning level also contains EFFECTIVE_DATE, EXPIRATION_DATE columns).
    Regards,
    Oleg

  • Is Active Directory's ExtensionAttributes9 a field in user object and how to retrieve it in the class type userprincipal?

    Hi, I'm using VS2012.
    I want to use this ExtensionAttributes9 field to store date value for each user object.  I use UserPrincipal class, a collection of these objects are then bind to a gridview control.  Is ExtensionAttributes9 a field in AD user object? 
    How can I access it and bind to the gridview?
    If this field isn't available then what other field can use?
    Thank you.
    Thank you

    UserPrincipal is basically a wrapper around DirectoryEntry:
    http://msdn.microsoft.com/en-us/library/system.directoryservices.directoryentry.aspx and only provides a subset of the Active Directory, although the most common, attributes that are available for the user object.  The attribute that you
    seek is not one of them.
    By utilizing the method that I provided you a link to, it will return the underlying DirectoryEntry that was used to build the UserPrincipal object and should allow you to access the attribute that you seek.
    It would be greatly appreciated if you would mark any helpful entries as helpful and if the entry answers your question, please mark it with the Answer link.

  • Creation of Oracle managed objects - CF's and Destinations

    Hi,
    Is there a way to create Oracle CF's and Destinations apart from AQJmsFactory. What I am looking for is creating these objects through reflection which most of the JMS providers support. This allows using the Generic JMS RA in javabean mode to easily integrate with Oracle AQ. Please reply.
    Also if it is not possible when is Oracle going to change its API to be standardized as most of the JMS providers support?
    Cheers

    Your topic title, "Creation of Oracle model hanging MS SQL 7->8.1.6", caught my eye, but our situations aren't exact.
    Workbench is hanging on me during the Oracle Model creation when it gets to "Mapping tables". I also waited about 24 hours without any results.
    Do you have any insight to my problem?

  • Directory structure and files in Oracle Application server 10g and 11g

    Hi all,
    I am doing a lab migration from 10g to 11g based on the use of JAXB. There were some directory structures used in 10g to store the JAXB jar files and some other custom jar files. I want to know the equivalent folder structures in SOA 11g server. The 10g server directories are mentioned below:-
    1.<OracleAS_Home>\webservices\lib.
    2. server.xml located at <OracleAS_Home>\j2ee\home\config in 10g. Where can I find the equivalent file to "server.xml" in 11g server?
    3. <OracleAS_Home>\bpel\system\classes\com\oracle\bpel\xml\util.
    4. <OracleAS_Home> \bpel\system\classes.

    Here are the equivalents as per best of my knowledge:
    1. <WebLogic Home>\server\lib
    For example, D:\Middleware\wls1036\wlserver_10.3\server\lib
    2. config,xml located at <Domain_Home>\config\
    For example, D:\Middleware\wls1036\user_projects\domains\ArunBaseDomain1036\config\config.xml
    3. It should be the same as 10g (instead of OracleAS_Home, it will be ORACLE_Home) if you install the BPEL product. Since, I have not installed BPEL/SOA, I am not very sure.
    4. It should be the same as 10g (instead of OracleAS_Home, it will be ORACLE_Home) if you installed the BPEL product.
    Also, I would recommend that you consider using ORACLE Smart Upgrade (JDeveloper component) to help you with the upgrade process. It exactly points out these mappings of file/directory structures AND the necessary configuration changes as well.
    If you are requirement, is only about making the library jars available to your application, then consider reading the below discussion.
    Re: XIncludeAwareParserConfiguration cannot be cast to XMLParserConfiguration
    Arun

  • Oracle Objects and Domains in Java Server Pages

    We have defined this object in a Oracle 816 Enterprise:
    CREATE TYPE DESCRIPTOR AS OBJECT
    ( ID VARCHAR2(30),
    DESCRIPTOR VARCHAR2(80))
    create TYPE descriptor_table AS VARRAY(30) of DESCRIPTOR
    create table foo_test
    (foo_test_id varchar2(10),
    descrip descriptor_TABLE )
    ALTER TABLE foo_test
    ADD CONSTRAINT BIBL_test_PK PRIMARY KEY (foo_test_id)
    then we have created in JDeveloper 3.1 an Entity (footest) object and a Domain (DescriptorDom) for the type DESCRIPTOR; then set the type of attribute descript to mypackage.DescriptorDom
    After that, we created a JavaServer Page as follows:
    <jsp:useBean class="oracle.jbo.html.databeans.JSRowSetBrowser" id="abean" scope="request" >
    <% abean.setShowCurrentRow(true); abean.setVisibleRows(10); abean.setShowRecordNumbers(true); abean.setReleaseApplicationResources(false); abean.setDisplayAttributes("FooTestId,Descrip"); abean.initialize(pageContext,"ot_logics_LogicsModule.FooTestView");
    abean.render();%>
    </jsp:useBean>
    The execution of JSP shows the error:
    java.lang.ClassCastException
    void oracle.jbo.domain.Struct.convertArrayToStruct()
    java.lang.Object oracle.jbo.domain.Struct.getAttribute(int)
    java.lang.String oracle.jbo.domain.Struct.toString()
    void oracle.jbo.html.databeans.JSRowSetBrowser.internalInitialize()
    void oracle.jdeveloper.html.WebBeanImpl.initialize(javax.servlet.ServletContext, javax.servlet.http.HttpSession,
    javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.io.PrintWriter)
    void oracle.jdeveloper.html.DataWebBeanImpl.initialize(javax.servlet.ServletContext, javax.servlet.http.HttpSession,
    javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.io.PrintWriter, java.lang.String)
    void oracle.jdeveloper.html.DataWebBeanImpl.initialize(javax.servlet.jsp.PageContext, java.lang.String)
    void ot_pages_html.bibl_test._jspService(javax.servlet.http.HttpServletRequest,
    javax.servlet.http.HttpServletResponse)
    void oracle.jsp.runtime.HttpJsp.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
    void oracle.jsp.app.JspApplication.dispatchRequest(javax.servlet.http.HttpServletRequest,
    javax.servlet.http.HttpServletResponse)
    void oracle.jsp.JspServlet.doDispatch(oracle.jsp.app.JspRequestContext)
    void oracle.jsp.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
    void oracle.lite.web.JupServlet.service(oracle.lite.web.JupRequest, oracle.lite.web.JupResponse)
    void oracle.lite.web.MimeServletHandler.handle(oracle.lite.web.JupApplication, java.lang.String, int,
    oracle.lite.web.JupRequest, oracle.lite.web.JupResponse)
    void oracle.lite.web.JupApplication.service(oracle.lite.web.JupRequest, oracle.lite.web.JupResponse)
    void oracle.lite.web.JupAppHandler.handle(oracle.lite.web.JupRequest, oracle.lite.web.JupResponse)
    void oracle.lite.web.HTTPServer.include(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
    void oracle.lite.web.HTTPServer.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
    boolean oracle.lite.web.HTTPServer.handleRequest(oracle.lite.web.JupInputStream, java.io.OutputStream)
    boolean oracle.lite.web.JupServer.handle(oracle.lite.web.JupInputStream, java.io.OutputStream)
    void oracle.lite.web.JupHTTPListener$JupHTTP.run()
    Please JTeam, could you illuminate me about how implement ORACLE objects in Entity object s and JavaServer Pages?
    ps The code generated by JPublisher seems be more complete that done by wizard of Domains. We sould use JPublisher?. How set the attribute type?
    Thank in advance.
    J Luis

    Hi,
    It looks like this might be a bug. I am going to use the information you supplied to file a bug so our QA team can investigate.
    We have had problems with arrays of structs, but hope to have them fixed with our next release.

  • Data objects and code objects in oracle application

    Hi,
    can any one please help me out with following question?
    1. what are data objects and code objects in oracle apps and why is that difference?
    2. How does the objects gets created in Oracle Applications, like during the installation which part is responsible for creating objects and after the installtion later point of time, how the new objects gets created in oracle applications?
    3. what are the ways to find out if my 11i application is OATM enabled ?
    Thanks in advance

    Hello,
    I managed to find answer for question 1, yet to find answer for 2 and 3.
    Answer for question 1 --
    Data objects : store and access business data (tables, indexes, sequences, index-organized tables, etc);
    Code objects : process data objects but them don't contains business data (functions, procedures, packages, views, synonyms);
    Now, here i have a question - under which objects queues are considered ?

  • How to find files and subdirectories in a directory

    can anyone tell me how to find files and subdirectories in a directory .

    Here's a code snippet,
    http://javaalmanac.com/egs/java.io/TraverseTree.html

  • Business Objects and Oracle 10

    Post Author: DQUINTON
    CA Forum: Deployment
    Currently using a deployment of Business Objects 5.1.6 with an Oracle 8 data source. We are considering using a data source that is Oracle 10 , does anyone know if our version of business objects is compatible with Oracle 10 , or would our problems only lie in the middleware and drivers that may need updating ? Any help would be much appreciated.

    Kiran,
    Jokes aside, Theres a few documents on how Oracle partner with Business Objects but there is no "Oracle Business Objects" BI product, at least up until end of last year before I left Oracle Consulting BI practice.
    Yes SAP Business Objects connects and supports Oracle 10G database functionality, but that would be Oracle DB, not Oracle BI EE.
    I seriously doubt they would launch ANOTHER BI tool with the same application name as a competitor?
    I hope you can get the information you are seeking.

  • Transporting Integration Directory objects between N and N+1 landscapes

    I have a question regarding the transport of Integration Directory objects.
    We are implementing N+1 PI 7.3 (java only) Development and QA systems. The N+1 PI systems are a copy of the Production Support (N) PI Development and QA systems. As part of the N+1 build we will also configure the business systems in the SLD for this landscape. Is it possible to transport objects from the "N" landscape into the "N+1" landscape? These changes would only be new objects that would not overwrite anything in N+1. For anything that is also being changed in N+1 we would perform manually. Is there anything special needed when setting up the business system in the SLD for this scenario?
    Thanks!

    Thanks Barry
    That menu option is available to me too but there is no option to use CTS+ in the pull down list. 
    I can't visit imageshack from work so I can't see your screenshot but I'd bet you have the option to export using "Open CTS+ Organizer" on the first menu too - I don't. 
    I've obviously got some config missing but, given I can transport ESR and SLD objects, I'm struggling to know what.
    Edited by: Murray Nicholas on Sep 3, 2010 12:39 PM

Maybe you are looking for

  • XML and  images

    Have a quick question. How can you load an image to a dynamic text box from xml using a txt file and loadvars if you have html tags it will display &photo1 = <img src="photo1.jpg"/>&done=-1 var loadstuff = new LoadVars(); loadstuff.onLoad = function(

  • SVG Plugin and Operation Can't be Completed Error Msg

    Just added the HTML5 Pack to Illustrator and now I get two error msgs every time I open Illustrator that says "error loading plugins SVG file format.aip" and a "Operation cannot be complete because of an unknown error." Is there a fix to this? I'm on

  • Bridge Filter Tab - Color Profile

    I have an iMac (Mountain Lion OS X 10.8.4) Nikon NX2, Nikon D800E camera, and  Photoshop CS6.  Most of the 100 or so photos I have transferred to my Mac by (USB  and also card) are RAW NEF at approx. 40MB a file.    (Lossless compression)   Most all

  • Why is 50% gray different in Photoshop CC

    When you fill with 50% gray in Pshop CS5 the fill has no effect when set to overlay – this is good! CC on the other hand creates a 50% gray that is too light and when set to overlay it will lighten the image. This is a pain for creating noise or dodg

  • TS1436 I have an HP Pavilion dv5000, and there is no tab for "burning" under my preferences.

    Do I just need to use another compouter?