Verify the existence of the file on the disk does not not (utl_file.fgetattr)

Hello

With the help of 11.2.0.3 and have the following code in an attempt to verify the existence of the file.

Directory and file are certainly and user/schema was the allowance all the specfifed directory for them.

Another thing to do?

Wjen, run it says file does not exist - I tried uppare and tiny.

declare

v_file_exists BOOLEAN;

v_file_length NUMBER;

v_block_size NUMBER;

Start

-Create a process to load data to archive

-A process necessary to run on a regular basis to query the datain.txt_finance_gl table. If an error is triggered which shows that the file is not found then it stops and expected to run next time.

-If the data is returned, then the data can be queried and loaded into the table in the archive with the relevant number of sequence and datestamp.

-The txt_load_control will be used to control and verify the transfer.

-The next sequence in the txt_finance_gl_seq number is obtained as well as current datetime object and create a new entry in the control panel (edc_type will be "GL") and give a working state.

-At the end of the load, the flat file will be renamed (pre-fixing on the old name, sequence number) and moved to the processed Finance folder.

-The control panel can then be updated to show the run as it is complete.

-First check to see if the file already exists on the disk in the box provided.

UTL_FILE.fgetattr ('big_tab_data', 'testfile', v_file_exists, v_file_length, v_block_size);

IF v_file_exists THEN

dbms_output.put_line ("'File Exists");

ON THE OTHER

dbms_output.put_line ('file does not exist');

END IF;

end;

user5716448 wrote:

Location was just prove that the oracle schema user can see the directory and database files.

create or replace directory BIP_TAB_DATA

as ' / oracle/finance/export ";

give all the BIP_TAB_DATA of archiving directory;

declare

v_file_exists BOOLEAN;

v_file_length NUMBER;

v_block_size NUMBER;

Start

UTL_FILE.fgetattr ("BIG_TAB_DATA", "samplefile", v_file_exists, v_file_length, v_block_size);

IF v_file_exists THEN

dbms_output.put_line ("'File Exists");

ON THE OTHER

dbms_output.put_line ('file does not exist');

END IF;

end;

[BEEP] / finance/export-oracle $ sqlplus archive / pwd @por.sql

SQL * more: Production release 11.2.0.3.0 the sea Mar 4 16:06:12 2015

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to:

Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

With partitioning, OLAP, Data Mining and Real Application Testing options

18.

PL/SQL procedure successfully completed.

SQL > set serveroutput on

SQL > /.

File does not exist

PL/SQL procedure successfully completed.

SQL >

[BEEP] / oracle/export/finance $ ls-l

total 1192

-rw-rw-rw-1 orabip s/n 152953 16 Feb 14:42 weekly sales (SAP) .txt

-rw - r - r - 1 orabip s/n 49 Mar 04 13:44 afiedt.buf

-rw-rw-rw-1 orabip s/n 172280 17 February 14:38 new weekly sales (SAP) .txt

-rw - r - r - 1 orabip s/n 374 Mar 04 16:05 por

-rw - r - r - 1 orabip s/n 374 Mar 04 16:07 por.sql

-rw - r - r - 1 orabip s/n 0 Mar 04 16:04 samplefile

-rw-rw-rw-1 orabip s/n 172280 17 February 14:38 sap_weekly_gl_data.txt

-rw - r - r - 1 s/n 55 16 Feb 09:52 testfile.bad orabip

-rw - r - r - 1 orabip s/n 13535 16 Feb 22:00 testfile.log

-rw-rw-rw-1 orabip s/n 42-16 Feb 09:53 testfile.txt

-rw-rw-rw-1 orabip s/n 62908 12 February 16:45 test.txt weekly sales

[BEEP] / oracle/export/finance $

These two are not even!

Tags: Database

Similar Questions

  • Check the disk does not start if he had to run when you restart the computer.

    I selected automatically fix system errors file and Scan for and attempt recovery of bad sectors.
    I was prompted to reschedule the disk check for the next time you restart your computer. 

    However, when I rebooted my computer, nothing happened. No disk check has been performed. I tried tha procedure above a couple of times without success.

    Someone please help I was able to do this before, but can't do the job now?  Thank you.

    ACHOIWONG,
    Well, it's system files to discover good good news.  Is probably why chkdsk does not work due to not having permission start upward.  Try to run it from an elevated command prompt:
    Click Start and type cmd in the box start the search.
    Right click on cmd in the list programs, and then click Run as administrator.
    If you are prompted for an administrator password or a confirmation, type your password or click on continue
    At the command prompt, type chkdsk c:/r

    Try and let us know if it works.
    Thank you
    Gloria
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Check the disk does not

    When you try to run the disk check or sfc/scannow a screen small black consol flashes on the screen for a fraction of a second and disappears. Nothing else happens!

    Simple help please.

    Thank you both for your valuable advice.

    I have never run once before (2 or 3 years) and could not remember how!

    I had a couple of niggles that need looking at, if they come back I will post back.

    Once again, thank you, problem solved.

  • Lightroom 3 verify the updates does not?

    I recently bought the new Nikon D7100 and of course this is not yet supported by my Lightroom 3.  I open Lightroom 3 and click 'Help', the user has clicked "check for updates" and he said: there is no update for this software!  Which is not true.  Why should I go manually to Lightroom online to check updates?  Why not check updates from inside Lightroom 3 work?

    Thank you

    Dave

    Exactly.

    There are updates and upgrades there.

    Lr 3.5 to 3.6 Lr is an update.

    L3 to Lr4 is an upgrade.

    Updates are free, for upgrades, you have to pay.

    The feature in the help of Lr is called "Check for updates", not "check for upgrades".

  • Player version listed in the GUI does not match that of the executable file (new)

    I've posted about this before (http://forums.adobe.com/message/4817948), but has never been able to find an answer.

    I am currently deployment of Adobe Reader versions 10.1.5 using the MSI installer and group policy. The problem is that a user stops his midway to Windows 7 computer while installation MSI interrupt (i.e. screwing) installation process. I had to remove some entries from the registry and restart the PC of the user in order to restart the installation of the reader (something I've done in the past).

    To verify that the drive has been installed successfully, I navigate to the Reader (AcroRd32.exe) executable Program Files, double-click the executable, select on Adobe on the Help menu, check the version number in the info box and see that the version number is 10.1.4 (i.e. the old version that I'm upgrading to). However, when I travel to the Reader (AcroRd32.exe) executable in Program Files and and open the properties of the file, I see the version 10.1.5 (i.e. the new version I am upgrading to).

    So the Player version listed in the GUI does not match that specified in the executable box.

    It's the second time that this has happened with a Windows 7 PC. I've never known this kind of thing with a PC running Windows XP.

    Why is the different version number in the GUI? Where the version number read to leave for the GUI? The registry? Anyone can shed some light on this situation?

    Hi Grittyminder,

    Remove some reg entries is not going to give you clean uninstall if you pouvez get a viable product. You can run this to get a better result: http://labs.adobe.com/downloads/acrobatcleaner.html.

    While I don't know what the problem is, it would be interesting to check the version of the product using the MSI API as described in the guide of the administrator to the www.adobe.com/go/acrobatetk.

    Ben

  • Forced to model in the file dialogue VI Express does not

    Hi all

    I have a simple VI to open and read a file.  I use 'File dialogue Express VI' to get the file name of the user, in order to use the "pattern" of entry to limit the type of file.  Unfortunately, appears not to limit the list of the files somehow.  I enclose a picture of my code, and the dialog box produced during its execution, which demonstrates that the VI does not indeed limit the list of files.  Is this a bug?  No one knows how to fix?  I'm under LV 2010 10.0 32 bit on a 2.93 GHz Intel Core i7 iMac with Mac OS X 10.6.4.

    Thank you

    Riprock99


  • installed the latest updates of windows 7... now the computer does not recognize my video files avi... says "format not supported".

    I have installed the latest updates (02/27/10) and when I open sony vegas to edit some files avi... they were offline... when I tried to read with windows media player it says format not supported... before when I played these files, they would not have to synchronize audio... it never happened with my other computer with Vista... system restore solved the problem of format not supported... but so far has caused this problem? and what about the problems of synchronization? the files seem to sync when played with the hp program...

    Hi derlonewolf,
     
    Because you performed a System Restore you would not be able to determine which update problem from occurring. You will have to wait for the update to your computer to determine the update that caused the problem. The update does not necessarily cause the problem to occur again. However, you can view the history of updates to updating history.
     
    1. open the control panel (all items view), and click the Windows Update icon.
     
    2. click on the link to view update history.
     
    3. to view the details of a single Windows Update-
     
    (A) select and right-click on a Windows Update list, and then click details.
     
    (B) click on close when finished.
     
    As far as the question of timing is concerened, you can scan SFC on your computer and check if the problem persists.

    Steps to perform a scan SFC:
     
    1. Click Start, click principally made programs, accessories, right-click Guest, and then click Run as administrator. If you are prompted for an administrator password or a confirmation, type the password, or click on allow
     
    2. type the following command and press ENTER:
    sfc/scannow
    [The command sfc /scannow. analysis of all protected system files and replaces incorrect versions with appropriate Microsoft versions.]
     
    A message appears indicating that "the system scan will start. Be patient, because the analysis may take some time
     
    3. If all the files require that a SFC replace will replace them. You may be asked to insert your Win7 DVD for this process to continue
     
    4. If all goes although you should, after the analysis, see the following message "Windows resource protection not found any breach of integrity.
     
    5. once the scan is finished, close the command prompt window, restart the computer and check.
     
    Check the link below for further guidance on scan SFC - mentioned
     
    You can also make manual updates instead of automatic updates and then see what are updates will be installed on the computer.

    See : http://windows.microsoft.com/en-us/windows7/Turn-automatic-updating-on-or-off

    Post back with the status

     
     
    Aziz Nadeem - Microsoft Support
  • I can not burn CD when I try to burn a file to a CD, the system does not recognize that I have a CD in D drive.

    Original title: I can not burn CD

    I can down load soft ware, playing CDs; s & DVD, but when I try to burn a file to a CD, the system does not recognize that I have a CD in D drive. How to fix this?

    Hello

    1. have you tried using different CD and check?
    2. were you able to burn CDs without any problem earlier?
    3. have you made changes on the computer before this problem?

    The hotfix in the following article might help you.
    Your CD or DVD drive cannot read or write media
    http://support.Microsoft.com/mats/cd_dvd_drive_problems/

  • When I go to move file e drive windows does not recognize the format

    ORIGINAL TITLE: files and folders

    running windows xp pro version 2002 service PAC 3, when I go to move the file e disc windows does not recognize the format, already file types are jpeg and php have tried a restore and fix computer center has not helped. Any suggestion or solutions would be appreciated ARTuro_974

    Thanks to all the answers, don't know how, but the problem fixed, have learned a little about pc THANKS AGAIN to all.

  • While I'm trying to remove the MPEG-4 file, it says "make sure that the disk is not full or write protected and that the file is not currently in use.

    Original title: When I'm trying to delete file MPEG4, is not deletion. How can I delete file MPEG4?

    While I'm trying to remove the MPEG-4 file, it says "make sure that the disk is not full or write protected and that the file is not currently in use.

    Hello
     
    Method 1: Ownership of the file and then try to delete and see if that helps.
    Reference:
    How to capture a file or a folder in Windows XP
    http://support.Microsoft.com/kb/308421
    Method 2:
     
    Error message when you try to delete a file in Windows XP: "access denied".

    http://support.Microsoft.com/kb/298345

  • Can Windows Media Player XP play MTS file type? I tried, but the video does not play smoothly. Is this fix really?

    I tried, but the video does not play smoothly.  Is this fix really?

    There is a possibility that Windows Media Player could
    read the file if you rename the MTS to MPG or AVI.

    And/or...the suite of freeware Media Player can be
    worth a try.

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    Media Player Classic Home Cinema
    http://MajorGeeks.com/Media_Player_Classic_Home_Cinema_d6213.html
    (works on XP/Vista/7)
    (The name of the file to download is: "MPC - HomeCinema.1.5.2.3456.x 86 .exe ')

    If this fails, it may be worth trying to convert the MTS file
    WMV format:

    There are many converters available on the net... some
    free... some detail.

    The following freeware converters are a few examples:

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    (1) Sothink Free Video Converter
    http://www.Sothinkmedia.com/video-converter/
    (Windows XP / Vista / 7)

    You will need to unzip the file... or you could just drag
    the Setup.exe from the file out of the folder and drop it on your
    desktop and install from there.

    Once installed... Open Sothink and go to... Add the files button...
    Find and select the clips you want to convert.

    Next... in the encoding settings... Choose... Video credits.
    WMV - Windows Media Video (*.wmv).

    Choose an output folder and on the left, click on the button convert.

    You can experiment with other settings later but
    This should help you get started.

    (2) format Factory (freeware)
    http://www.videohelp.com/tools/Format_Factory
    (the 'direct link' is faster)
    (the file you want to download is: > FFSetup270.zip<>
    (FWIW... installation..., you can uncheck
    ('all' boxes on the last screen)
    (Windows XP / Vista / 7)

    First, you will need to decompress the file or just open the
    Drag FFSetup270.exe out of the folder
    and drop it on your desktop. To install left click.

    Next, after the download and installation of Format
    Factory... you can open the program and
    left click on the toolbar, the "Option" button and
    "Select an output folder to" / apply / OK.
    (this is where you find your files after they)
    are converted)

    Drag and drop your video clips on the main screen...

    Select "all to WMV" / OK...

    Click on... Beginning... in the toolbar...

    That should do it...

    Good luck...

  • I need to remove the uneeded files: Purenetworks and PCFix. But I get: not deletenmrsrc.dll: access denied make sure the disk is not full or write protected and that the file is not in use.

    Original title: remove unnecessary files

    I need to remove the uneeded files: Purenetworks and PCFix. But I get: not deletenmrsrc.dll: access denied make sure the disk is not full or write protected and that the file is not in use.

    Ditto for PCFIX.exe.

    How can I remove these and clean unnecessary files? Thank you.

    Hello

    1. how exactly you are trying to remove it?
    2 have you connected the administrator account?

    Step 1: Check if the problem persists in the clean boot state.

    From your computer by using a minimal set of drivers and startup programs so that you can determine if a background program is interfering with your game or program. This type of boot is known as a "clean boot".

    Reference:

    How to configure Windows XP to start in a "clean boot" State

    http://support.Microsoft.com/kb/310353

    When you are finished troubleshooting, follow these steps to reset the computer to start as usual:

    1. click on start and then click Run.

    2. type msconfig and click OK.

    The System Configuration Utility dialog box appears.

    3. click on the tab general, click Normal Startup - load all services and device drivers and then click OK.

    4. When prompted, click on restart to restart the computer.

    Step 2: Take possession of these program at the following location folder, and then check the issue. C:\Program Files\ 

    Reference: How is ownership of a file or a folder in Windows XP

  • App, opening a file via windows shell commands: "a device attached to the system does not work.

    Hello!

    I hope that someone here will be able to throw some lights on my question, if I post this is the wrong place please let me know because I was directed here (which forum? ). OK, I support and develop custom applications. An older application especially written in Delphi allows users to attached documents (pdf, jpg, txt, etc.) to the records of equipment in a data base. Later users can view these records of equipment and press a button to display the document.

    When the user presses the button to view the document, the application uses the folder variable to save the document to the temporary path and then asks windows via a shell command to open the file. The appeal of Delphi for windows used is the following:

    ShellExecute (GetDesktopWindow, 'open', PChar (TempFile), ",", SW_SHOWNORMAL);

    Normally this process works very well, we have had no problems so far. On a single computer (windows xp pro with Service Pack 3) belonging to a client, instead of opening the file, windows returns the system 31 error and the message ""a device attached to the system is not functioning. ". is displayed.

    * If I navigate to the location where the file is stored on the disk and try to open it, software adobe reader opens the file correctly.

    * I found some suggestions that the file extension is associated properly. PDF associated with Notepad, I changed, and the application could ask windows to open the file very well. Open the file from the location on the work of disc as well. Change the file for adobe and the problem persisted.

    * I reinstalled adobe reader software, but also a previous version of adobe and the problem persisted.

    * The application doesn't have any problem asking other files opened, only those associated with adobe reader on this same machine. The problem does not exist on other machines.

    That about sums up the problem. Any suggestion would be appreciated.

    Thank you

    Louis

    It was determined that the version of adobe reader was at fault.

  • error indicates "file is possibly corrupted. The checksum does not match the checksum calculated.

    Hello world

    I use Vista Home Basic, SP2. Windows takes a lot of time in the judgment and often fails to do this completely. Windows after logout again a soft purr at the disk continues. Windows fails to start quickly. After several reboot it starts and sometimes even refuse except CD assisted.

    In order to repair boot directly from CD is not possible either. Jump the trunk and windows from the Windows CD start loading.

    Error, States "Checksum error. The file is possibly corrupted. The checksum does not match the checksum calculated'.

    Do I have to reinstall windows or any help please.

    Jean-Philippe

    Hello

    I suggest you to follow the methods and check.

    I suggest you perform a check disk in Windows Recovery Options.

    What are the system recovery options in Windows Vista?

    http://Windows.Microsoft.com/en-us/Windows-Vista/what-are-the-system-recovery-options-in-Windows-Vista

    Warning of Chkdsk.

    Important: If all data on the hard disk may be lost when running chkdsk, as the chkdsk attempts to repair that affected sector.

    Diagnosing memory problems on your computer

    http://Windows.Microsoft.com/en-us/Windows7/diagnosing-memory-problems-on-your-computer

  • When you try to import a .mp4 file in windows movie maker, the program does not list the file when I search for it in his file.

    When you try to import a .mp4 file in windows movie maker, the program does not list the file when I search for it in his file.  Help, please.

    As I suggested previously, conversion to a format like
    . WMV before you import it into Movie maker may be the solution.

    The free Converter from Microsoft can be a place to start:

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    Download Microsoft Expression Encoder 4 with Service Pack 1 (SP1) (freeware)
    http://www.Microsoft.com/download/en/details.aspx?displaylang=en&ID=24601
    (runs under WinXP SP3 / Vista / 7)

    When you install the program...
    Start Microsoft Expression Encoder 4
    (Start / programs / Microsoft Expression /)
    Microsoft Expression Encoder 4)

    On the "Load a new project" screen...
    Left click... "Transcoding project '...

    When the program opens, click on... File / import...

    (If at any time you get lost while browsing
    the program of... to... Window / active Reset
    Type or workspace... CTRL + SHIFT + R)

    Look for the file/s that you want to convert.
    (If files do not appear... open the fall
    window and choose... All files)

    Click (highlight) left the files and the left on the Open button.

    You can see the files in the "Multimedia content" pane

    In the right column... left click on the tab "Output"...

    Open the drop directory window and choose an output folder.
    (This is where you will find your converted file)

    On the left, click on the button "encode".

    Wait... video encoding CPU intensive and can
    be a slow process. It is always best if you do not have
    multi-task while files are encoded.

    Now... try import you again. File WMV in Movie Maker.

    More converters:

    There are to many converters available on the net...
    the following links are some examples. You can
    need to experiment to find the best result.

    Proceed at your own risk *.

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    (1) format Factory (freeware)
    http://www.videohelp.com/tools/Format_Factory
    (the 'direct link' is faster)
    (the file you want to download is: > FFSetup270.zip<>
    (FWIW... installation..., you can uncheck
    'all' boxes on the last screen... even in this case, it may
    install the Ask toolbar on your system)
    (Windows XP / Vista / 7)

    First, you will need to decompress the file or just open the
    Drag FFSetup270.exe out of the folder
    and drop it on your desktop. To install left click.

    (2) Freemake Free Video Converter (freeware)
    http://www.Freemake.com/free_video_converter/
    (Windows XP / Vista / 7)

    (3) Koyotesoft Free Video Converter
    http://www.koyotesoft.com/indexEn.html
    (2000/XP/2003/Vista/Seven)

    (4) Sothink Free Video Converter
    http://www.Sothinkmedia.com/video-converter/
    (Windows XP / Vista / 7)

    (5) hamster Free Video Converter
    http://www.PCWorld.com/downloads/file/FID, order 155794, 4 pages, 1/download.html
    (Windows XP, Vista, 7)
    (If you choose Custom Installation
    You can uncheck additional modules you
    do not want to install)

    (6) quick Media Converter
    http://www.Cocoonsoftware.com/
    (Win XP, Vista, Win 7 Home Premium)

    (7) SUPER © Simplified Universal Player Encoder & Renderer
    http://www.videohelp.com/tools/Super
    (the download mirror site is faster) (Windows XP / Vista / 7)

    (8) Xilisoft Video Converter
    http://www.Xilisoft.com/video-converter.html
    (not freeware but receives good reviews)
    (Windows XP (SP2 or later) / Vista / 7)

    Good luck...

Maybe you are looking for

  • How can I get my iTunes movies to fit the entire screen?

    When I watch movies on iTunes, every movie has a big black bar at the top and bottom.  Is there a way to get the film to fit the entire screen?  I have a 13 "MacBook Pro.  Everything is as up-to-date as possible at the moment.

  • Keyboard acting strange on Tecra A2

    Hey,. Keyboard is really strange on my Tecra A2. Him answer one key held for a long time, then react quickly with 2/3/4 of the same letters. I think it may have something to do with the function key as the F10 touchpad light icon still flashes, also

  • Low performance of the HP 110-3100 PC Mini

    Hello, I have a HP Mini 110 with Widows 7 Starter 32-bit with 1 GB of RAM memory, and it is amazing, slow, after working for about 20 minutes, how is that possible? I have almost no software installed and I do not use it for software that requires hi

  • E2500 - Possible to disable wireless?

    My E2500 is running firmware 1.0.01 build 3. Is there a way to disable the wireless with this router? I checked in the advanced through Cisco Connect, and if it's there, I missed. Thanks in advance for any ideas on that.

  • Impossible to connect to the internet using dial-up modem cricket or network cable using the ip address

    tried cricket a600 but dormant, says it is connected but does not work, I tried modem on another computer and it market, tried by cable network using the ip address, same thing, connected but doesn't work, I tried install sp2, don't work, software re