Create file, and export it to Network drive?

Ok. I have said this a few times - I am a java developer, and I am not that great at writing procedures, or function, but I try. Here is my situation. I would like a procedure that will query a table, and output this data into a file based on the queries. So for example. I would like to output something like this:
Report Name: Date:
Total Number of Proposals Missing PSR: 247
Proposals missing PSR pending credit check: 147
proposal id      prospect id   psr/document_number   credit check  description
========         ========      ================      ============= =============
818356           434345                              fail          credit check failed
634466           134556                              fail          credit check failed
etc.....
Proposals missing PSR but credit check passed: 46
proposal id      prospect id   psr/document_number   credit check  description
========         ========      ================      ============= =============
345345            345453                           pass          credit check passed
                                                                   but missing psr
345653            864564                           pass          credit check failed
                                                                   but missing psr
Proposals update with missing psr/document_number:                                     26
proposal id      prospect id   psr/document_number   credit check  description
========         ========      ================      ============= =============
778978            456473       345366                pass          proposal id [778978]
                                                                   updated with psr [345366]
944564            457756       64332                 pass          proposal id [944564]
                                                                   updated with psr [345366]Now I would like to put this data in a file.
Once I get the file I would like to put it out on the network drive.
Now I have done this with java, but I think there is a way to do it in oracle.
I found this code
create or replace
PROCEDURE PR_OUTPUT_TOFILE IS
           file_handle UTL_FILE.FILE_TYPE; -- file handle of OS flat file
           prop_id  NUMBER; 
           c1 NUMBER(9); -- C1 retrieved from testtab table
           retrieved_buffer VARCHAR2(100); -- Line retrieved from flat file
         BEGIN
           -- Open file to write into  and get its file_handle
           file_handle :=
             UTL_FILE.FOPEN('/tmp','myTestfile.txt','W');
           -- Write a line of text out to the file.
           UTL_FILE.PUT_LINE(file_handle, 'this is line 1 as a test');
           -- Select the c1 from the sat_proposal table
          SELECT c1 INTO prop_id FROM pon_user.sat_proposal
              WHERE proposal_id > 838300 and proposal_id < 840000;  
           -- Using PUTF write text with the col1 argument out to the file.     
           UTL_FILE.PUTF (file_handle,
              'This is the c1 %s.\n', prop_id);
           -- Close the file.
           UTL_FILE.FCLOSE(file_handle);
        EXCEPTION
           WHEN NO_DATA_FOUND THEN
              DBMS_OUTPUT.PUT_LINE('no_data_found');
              UTL_FILE.FCLOSE(file_handle);
           WHEN UTL_FILE.INVALID_PATH THEN
              DBMS_OUTPUT.PUT_LINE('UTL_FILE.INVALID_PATH');
              UTL_FILE.FCLOSE(file_handle);        
           WHEN UTL_FILE.WRITE_ERROR THEN
              DBMS_OUTPUT.PUT_LINE('UTL_FILE.WRITE_ERROR');
              UTL_FILE.FCLOSE(file_handle);
           WHEN OTHERS THEN
              DBMS_OUTPUT.PUT_LINE('other stuff');
              UTL_FILE.FCLOSE(file_handle);
END PR_OUTPUT_TOFILE;and it puts a file out their on the oracle server in the /tmp directory that I am running from. Is there a way to get a network connection and upload this file to the mapped drive?
you know like \\nvlplace\SAT\Reports\etc
orozcom

orozcom,
Are you running on a unix/linux server or a windows server?
If you are running on a Linux or unix server, then I would look at SAMBA mapping and mounting the SAMBA drive to a mount point and then you can properly reference it.
If you are running on Windows, you will need to go to underlying service in the services manager and change the running service from the system account to the Oracle NT account that has network privileges. Restart the service and then you can reference network drives from the database.
Take caution and read your documentation, review security concerns, before changing the Oracle background service. I have done it before, but I do not know if it is supported of hand.
Thanks,
Bryan

Similar Messages

  • Proxy Media: Transcode Source File and Export Read File...

    Hello, I'm new to FCPX. I have a Panasonic HC-X920. When I shoot things I copy the entire folder tree to my hard drive and import from there, rather than directly from the SD card.
    I learned that FCPX "re-wraps" the truly original h.264 MTS files to "Original" h.264 MOV files. Not a huge deal, as there doesn't appear to be quality loss, and the MB/s rate is slightly higher on the MOVs. Ideally I'd be able to use the MTS files but FCP is Quicktime-based and I've decided I'm not worried about it.
    Anyway,
    My computer can't handle playing back 1080p 60fps h.264 footage. In order to have playback on an FCPX timeline, I have to transcode to either Proxy or Optimized media. Optimized, of course, takes up a ton of space, so I'm curious about using Proxy. But I want more info first.
    I'm most curious about question #1, but here are two questions:
    1.
    Let's say I transcode everything to Proxy Media upon import. When I go to share/export a final file from my timeline, which of the following does FCPX do?
    (A) Export the timeline using/reading from the lower-quality Proxy media, ignoring the Originals.
    (B) Automatically replace the Proxy media with the Original media files, and export the timeline using/reading the Original media files while ignoring the Proxies.
    (And if B is the answer, is it reading the Original MTS or Original MOV? I'd assume MOV, right?)
    Does this question make sense?
    I'll mostly be editing home movies with this, so it's not imperative that I be able to see what I'm editing in vivid detail and I can use Proxy for that to save disk space. But I DON'T want my final exports to be based on that lower-quality transcoded 422 Proxy Media; I want the proxies to be view-only, and I want the final exported quality to be based on the quality of the Original media.
    My other question:
    2. (probably not a big deal either way)
    When FCPX transcodes to Proxy and/or Optimized, is it reading from (A) the "Original" MOV files it created upon import, or (B) from the "truly original" MTS files?
    Thanks!

    Tom Wolsky, thanks for your answer.
    1. Where do I switch playback to original, in the Preferences? I'm attaching what I see in my Playback preference window. I don't see a place to switch this, am I doing something wrong?
    2. That's what I suspected, thanks for clarifying.
    Here's the screenshot I mentioned in #1:

  • Flash Builder 4 super slow when Workspace and Project is on Network Drive

    Hi I was wondering if maybe it is not common practice to create a workspace and project in a Network Drive? When I do this Flash Builder runs extremely slow ( build workspace slow, saving slow, code hinting slow, undo slow, etc, etc, etc). Very painful!
    When I place the same project locally on my C drive everything runs fine. So should I not be running things off the network? I would really like to since all my files are on the network with backup system. Can anyone offer some advice? Or maybe I need to optimize something? Thanks
    - D

    Hi.
    Having your workspace and project on a network drive is not recommended as Flash Builder writes and reads a lot from the workspace and that will be slow.
    A version control system such as svn or git with a repository hosted on your network drive should be perfectly fine. (You only take the hit when you check in and check out)
    -Anirudh

  • Today My c: drive crashed...i had all my oracle database files and others in other resp drives.How to start by DB again as my services are destroyed.?!

    Today My c: drive crashed...i had all my oracle database files and others in other resp drives.How to start by DB again as my services are destroyed.?!
    or how to create a service for the database i had previously ??
    any help
    Aravind.

    AravindanJ wrote:
    Today My c: drive crashed...i had all my oracle database files and others in other resp drives.How to start by DB again as my services are destroyed.?!
    or how to create a service for the database i had previously ??
    any help
    Aravind.
    Where did Oracle software reside before  the failure & now?
    How do I ask a question on the forums?
    https://forums.oracle.com/message/9362002#9362002

  • Can the Mail files be safe on a network drive?

    Can the Mail files be safe on a network drive? That way more than one computer (same user) can access the mail?

    Depends on what you mean by a "network drive".
    I have "external USB drives", I don't have a network drive.   I had no problems putting the .lrcat files on the external USB drives, and it would surprise me a lot
    if there were a problem putting them on network drives.   "In general", drives are drives, who cares.
    On the other hand, why would you want to?  I have all my photos on a USB drive, but I keep my catalogs (4 of them) on c:\ -- for performance reasons -- I see no reason to do otherwise.  They get backed up and the BACKUPS are then copied to 2 of my 3 external USB drives -- I see no REAL reason to put the catalogs externally or on a network drive -- does not buy me anything other than bad performance.

  • .chm files don't work on network drives...

    I noticed this problem with .chm files compiled with my
    projects. Then I tried it with the Robohtml.chm file as well. If
    these files are on my local drive they work perfectly. When they
    are moved to a network drive I get the following error.
    Navigation to the webpage was canceled
    What you can try:
    Retype the address.
    I have full access permissions to the files and folders on
    the network.
    Anyone else have this problem? Any ideas?

    Ohh yes - I got into the same mess - I'd personally recommend
    using the RoboHTML version - you you'll have to do some copy/paste
    + retyping, but at least you've be ably to 'share the file.
    Another great thing is to use 'conditional build tags' for
    your project (thanks Peter G.) Now you can a "Master Version" which
    you make changes to, and say using the Single Source Layout you
    have, for example: A version for Management, one for Staff - (i'm
    not sure how many you're allowed - with regard to the tags).
    Now - here's the really useful bit - if you make a change to
    the Master version your changes are naturally reflected to all the
    other versions - and any restrictions for the other versions are
    not shown as "page unavailable" but just don't appear on the
    "menu"....
    Give it a try - it's made my life a lot easier (mines a 700+
    page company procedure manual for a Casino).
    Al

  • I'mtrying to upload my photos to shutterfly I've gone to file and export then the window gives me the option of file export webpage quicktime and slideshow .  on my macmini I have shutterfly on there also how do I get this on my new mac

    I go to file and export then a window appears with file export, webpage,quicktime and slideshow.  On my mini I have shutterfly as an option and don't remember how to do it.  What do I do to input this info so that shutterfly becomes an option

    Hi Barbara
    Are your photos in iPhoto or are you using some other Photo Software?
    The latest version of iPhoto is a lot different than iPhoto 6 for example. In iPhoto 06 you could burn the Originals from your User Picture Folder using Finder, while in iPhoto 11 it is best to burn them from within the iPhoto Application.
    Open iPhoto and select the Event(s) that you want to burn onto the CD, then select Share on the menu bar and click Burn in the drop down.
    http://www.apple.com/support/iphoto/
    Then again, maybe you got a bad batch of blank CD's and need to try another?
    Dennis

  • Please help on create files and directories in Session Bean

    Hi,
    I am trying to create files and directories at run time from a session bean. Since EJB 2.0 prohibit the use of the java.io.* package. The only thing that I know how is to use the URLConnection. After getting a connection through URL. I may use the getOutputStream() to get a output stream to write to the HTTP server. But the getOutputStream() returns an OutputStream object which is one of the package in the java.io package. Since I need to create file and directory, I need to use the FileOutputStream that is also under the java.io package.
    Can someone give me a hint what should I do. Here is a directory and the file that I may need to create;
    Directory1/Drictory2/myFiles.au
    Thank you in advance, your help is greatly appreciated.

    From 24.1.2 (Programming Restrictions) of the EJB 2.0 spec:
    � An enterprise bean must not use the java.io package to attempt to access files and directories in the file system.
    The file system APIs are not well-suited for business components to access data. Business components should use a resource manager API, such as JDBC, to store data.
    You might want to look at the File System Service Provider in JNDI for an alternative approach. I have never used an FSSP though.

  • Powershell script to search a network drive for .mdb files and export them to CSV file

    Hello all,
    I'm trying to search one of our network drives for old .mdb files, I want to write the name, location and date last modified to a csv file.
    Get-WmiObject -Class CIM_DataFile -Filter "Drive='S:' And Extension='mdb'
     AND ObjFile.drive
     AND objFile.FileName
     AND objFile.FileSize
     AND objFile.LastWriteTime" |
    Export-CSV c:\mdb_search\mdbfiles.csv\
    Obviously this isn't working or I wouldn't be posting.  I've tried many different examples from the net with no joy for now.
    Thanks for any help you can offer.

    Thanks, that did the job.
    Cheers, you're welcome.
    How do I get the powershell cursor to return to C:> ?
    Should I use "exit" or "break" ?
    Neither, the console will return to a prompt when the search has been completed.
    Don't retire TechNet! -
    (Don't give up yet - 13,225+ strong and growing)

  • How Can I Mark A CMD File As Trusted On A Network Drive?

    Windows 7 Ultimate x64 with all patches
    I have a drive letter that is permenently mapped to a folder on another machine  (workgroup network -- no DC).  There is a cmd file in a folder on the mapped drive that I want to have my users run at logon but I can't because logon scripts must
    be in a specific folder.  So I tried creating a shortcut to the cmd file and putting it in the Startup folder for each user.  The problem is the script is not run immediately.  Instead the user is prompted as to whether or not to let the script
    run. 
    Is there anyway to mark the file or network folder as trusted so the script runs without prompting the user?
    http://www.saberman.com

    Does the script run locally ok? Would it be possible to go around this problem by putting a script on the local STARTUP folder that would copy the networkdrive script to a local TEMP folder and then call the script from there?

  • How do I backup my iPad and iPhone to a networked drive?

    Since it's clear now that my Win 7 machine will never again run iTunes properly (a whole other story... sigh) I'm reduced to using my MBA for all my iTunes needs.  My music collection is huge, of course (whose isn't?) but that's no problem because it exists on a networked drive and my MBA has no issues playing from it.
    However, both my iPhone and iPad are 64GB and I need to back them up.  I can't use the Cloud, of course, because it's not big enough (it's not just music or I'd subscribe to the music service -- on my iPad it's mostly other data which takes up 50GB or more).  I can't back them up to my SSD because there's not enough room.  So I really want them to backup to the same networked drive I'm using for my music.  Except I don't see a way to do that in iTunes.
    I can't be the only one with this issue -- how are you MBA owners handling your iDevices backups with your MBA?

    I have an iMac that I installed a 128GB SSD in and that created storage issues in my mind too. What I've done is put a 1GB drive on my Airport Extreme and moved all my iTunes Media there. Just yesterday I updated and backed up my iPhone for the first time since I set up the system and to my relief it didn't add to my SSD.
    Once you move your iTunes Media file to the network drive redirect where iTunes Media is by using Preferences in iTunes.
    Hope this helps.

  • Photoshop CS5 creates file and then doesn't allow me to open it.

    I created a file on Photoshop CS5, saved it, and now when I try to open it says: "Could not complete your request because the file is not compatible with this version of Photoshop." How can I open the file? How come the same program cannot open its own file? Can anybody help me with this? Thanks.

    That can happen in any version of Photoshop and it can be for one of at least two reasons:
    1.— The file was over 2 GB in size and was saved as a PSD rather than a PSB file; or
    2.— The file got corrupted.  This can happen when attempting to work across a network or with Norton Anti Virus (NAV) running on your computer. 
    Always work locally.  To open a file stored on a network volume, copy the CLOSED file in the Finder to your local hard drive first, then open the local file.  Once you are done working on the image, save the file on your local hard drive, close it and copy the CLOSED file back to the server.
    Sometimes, Illustrator or GraphicConverter can recover the flattened composite in a corrupted file if you're lucky, but the layers will be toast.
    If the file was indeed over 2 GB and saved as a PSD rather than a PSB, I know of no way to open it.
    Give us some more details of the history of the file and maybe someone else will have other ideas.
    Wo Tai Lao Le
    我太老了

  • Office 365 files won't open from network drive

    I can’t open any office  documents from a mapped network drive. I can however go to file explorer and go straight the server directory (\\servername\share) and open any document. As a workaround, I created a shortcut on the desktop that points
    to the share to allow the user to continue working.
    I have checked permission and added the path in Trust Center. I know it’s not the computer because I have logged in with other users and everything works fine. I have also logged into other computer with the user that is having the problem and again
    everything works. I'm convinced it some setting I'm missing within the user profile on the computer.
    windows 7 x64
    office 365 bussiness

    Hi,
    This is the forum to discuss questions and feedback for Microsoft Office, the issue is more related to the user profile. I'll move your question to Windows server forum.
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winservergen
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support

  • How to set up and auto-mirror a networked drive?

    So here's the situation.  I currently have a MBP Retina 15 (max spec'd), and there are some design processes that still run a little slow for my liking.  Given that I spend about half my working life at a desk plugged into a monitor anyway, I figured I'd get a Mac Pro to use when I'm in the office.
    What I need help with is how to:
    -Set up an external networked drive so that I can open and save all my projects to the same place regardless of which machine I'm working on.  I spend 90% of my laptop working time at home on the same network.
    -Have the networked drive auto-back up to another external storage device so that in case of HD failure.  Basically I want to save a file, and have it expeditiously (ideally instantly, but the sooner the better) back up to the secondary HD. 
    Somebody at the Apple Store suggested using a USB HD plugged into Airport Extreme, and that would work, I suppose, but
    1) I'd really prefer something plugged in to the Mac Pro to speed up the data transfer at least one one machine.
    2) There's only 1 USB port on the Airport Extreme.  So if we were to go this way, the back up mechanism would need to be built in to the drive -- some sort of double external HD that auto-mirrors.
    Any suggestions?

    Could you use textarea?
    sym.$('inputfiled').html('<textarea cols="20" rows="3"></textarea>);
    actually the form I used in the file is:
    inputMessage = $('<textarea />').attr({'type':'textarea','rows':'10', 'cols': '25','value':'', 'id':'message'});

  • When I open iTunes on my new computer using the .itl file, and using the same external drive holding the songs, all of the songs I added to iTunes up to a certain date have broken links, while none of the songs have broken links on the old computer.

    I want to open the  iTunes library on my new laptop with all the playlists and stuff I built on the old computer. I have all my music on an external drive. I have copied the .itl file from the old computer and opened it on the laptop, and it has all the playlists, but all of the songs that were added to iTunes up to a certain date have broken links. What am I doing wrong?

    Moving library files around while leaving the data in the same place usually presents no problems. Moving the data around independently from the library usually breaks things. With Windows machines all you should need to do is make sure that the same drive letter is being used on the new system as with the old. If that is not possible you need to get your library into a portable layout before moving it between systems.
    Typical layout of iTunes folders:
    When the media folder is inside the main iTunes folder as shown above then the library is portable. Typically with a split library the iTunes Music or iTunes Media folder (everything inside the red outline) is moved to a different drive by choosing a new locaton for it and then consolidating.
    To make the library portable again you need to copy the library files and album artwork folder into the parent folder of the media folder so that the nested relationship is recreated. (BTW If your media isn't already inside your designated media folder then you will also need to consolidate the files that are outside of it, before you copy the library files.) You can then use the hold-down-shift-when-starting-iTunes method to open the library file in that parent folder. Once the library has been opened, tested and closed you are most of the way there.
    The iTunes window inherits its title from the folder holding the library files so, unless you created a folder called iTunes to hold the media folder, iTunes may now have an unexpected title when you run it. The parent folder can be renamed as iTunes, and the library opened again. Alternatively, if the parent folder is at the root of the drive, or has other data which you wish to leave in place, you can create a new top level folder called iTunes and move the library files, album artwork and media folders into it before opening and testing the library again.
    If the library doesn't work after any step simply reverse it by undoing a move or rename or opening the previous set iTunes Library.itl file.
    If all has gone well then the library is now portable. Once you've migrated the data to a new system you can copy the library files back to their usual internal location if you find that having them on the external drive affects performance...
    tt2

Maybe you are looking for

  • First time user questions (managing library, file size defaults, cropping,)

    I'm on my first Mac, which I am enjoying and am also using iPhoto '08 for the first time which is a great tool. It has really increased my efficiency in editing a lot of photos at one time. However, the ease of use makes a couple custom things I want

  • How can i dial up a phone number with iPad?

    How can i dial up a phone number with iPad?

  • Urgent : Is there any c++ parsers available for reading tnsnames.ora

    I have to parse the tnsnames.ora and get the connection string , host name , instance name , port etc .. and store it in my local memory structure . Is there any c++ parsers available , which parses and gives the desired output or do i have write my

  • Excise entry during customer returns

    Hi, How to take excise credit while performing customer returns in SD.Is it through J1IEX or J1IH?If we take a excise credit through J1IEX then whether we need to maintain the customer's as vendors also?? Kindly Guide.. Warm Regards Somnath

  • Deployment from JDeveloper

    Hi, I am trying to deploy using JDeveloper i created public_html folder under my project directory and created deployment descriptor, now when i click on the deployment descriptor and select deploy to an ear file i get many deployment errors saying E