SQLPLUS @ command should open script file with a WRITE lock

I know that this might be considered petty; but there are at least two reasons why it would be nice if the @command files were locked while processing.
(1) It is currently possible to edit the file while it is processing. Sqlplus reads the file line by line; so the same line might be read more than once, or lines might be lost depending on whether the editor added or removed lines. I seem to fall into this error when I am busy, launch a long running script and then, 10 minutes later, think of a change I want to make and start editing the file. In any event, it seems logical to me that SQLPLUS might legitimately require that once an @ command file has started processing that it be locked for changes while processing.
(2) While it is all well and good just to say that I shouldn't do that, the number of times in the last 25 years that I have put spool file.sql instead of spool file.log in a command file called file.sql beggers the imagination. Sometimes my fingers just type faster than my brain. The result of this typo is that in combination with (1), file.sql is overwritten and terminates having done nothing except replace itself with an empty file.
I know that these problems could easily be avoided if I was perfect; but I've been doing this long enough to know that I'm not and never going to be.
So just my 2 cents worth as a suggestion.
Thank you, Mark
Edited by: mmillman on Dec 3, 2009 2:17 PM

If you ever find this answer, it would be extremely useful to me right now.

Similar Messages

  • Inquiry about opening any file with internet explorer

    Dear all,
    i am opening any file with internet explorer on the client machine.but i want to open it as READ-ONLY. so is there any parameter i should add to the command.
    the command i am using is :
    client_host('"\Program Files\Internet Explorer\iexplore.exe " "'||v_file_name||'"'; );
    Thanks in advance

    Hi,
    I don't think there is a way to open a file as read only using Client_Host. But i can give you another suggestion. Change the permission of the file to readonly (may be using chmod command) before opening the file in the browser.
    client_host('chmod -w '||v_file_name);Regards,
    Arun

  • Output format of sqlplus commands under shell script

    hi experts
    Can you help with some problems please?
    1.) I try to run shell script from dbms_scheduler, which runs sqlplus and the output of sqlplus commands is written to file using command spool. To this point everything is running ok.
    My problem is, that output of this file is: (e.g.)
    SQL> PROMPT ****************USERB******************
    ****************USERB******************
    SQL> --SELECT sid
    SQL> -- FROM v
    SQL> -- WHERE audsid = SYS_CONTEXT('userenv','sessionid');
    But I don't want the whole first line in the output file. I only want the output of this command, like on the second line.
    2.) How Can I write two outputs from sqlplus using command spool running at the same time into one file?
    Like in first issue described above. The main sqlplus create a job and this execute the background sqlplus using shell script. But both, the main and the background sqlplus are written to output file at the same time. But only one is written into. But I want the both outputs in the file.
    How Can I do that, if I can?
    Thanks a lot.

    user9357436 wrote:
    hi experts
    Can you help with some problems please?
    1.) I try to run shell script from dbms_scheduler, which runs sqlplus and the output of sqlplus commands is written to file using command spool. To this point everything is running ok. then why are you here?
    My problem is, that output of this file is: (e.g.)
    SQL> PROMPT ****************USERB******************
    ****************USERB******************so remove PROMPT line from the file
    >
    SQL> --SELECT sid
    SQL> -- FROM v
    SQL> -- WHERE audsid = SYS_CONTEXT('userenv','sessionid');
    But I don't want the whole first line in the output file. I only want the output of this command, like on the second line.
    2.) How Can I write two outputs from sqlplus using command spool running at the same time into one file?you can not do so.
    Like in first issue described above. The main sqlplus create a job and this execute the background sqlplus using shell script. But both, the main and the background sqlplus are written to output file at the same time. But only one is written into. But I want the both outputs in the file.
    How Can I do that, if I can?Can't.
    Now what?
    >
    Thanks a lot.Why using DBMS_SCHEDULER to invoke OS script to run sqlplus that runs SQL statements?
    this is like making THREE Left Turns, instead of single Right Turn.
    Just invoke PL/SQL procedure that does what needs to be done.

  • Error in opening a file with name in chinese characters with Runtime.exec

    The issue at hand is when I try to open a file with file name containing chinese characters in a localized environment in Windows through the following java code:
    Runtime.exec("rundll32 SHELL32.DLL,ShellExec_RunDLL {File_With_FileName_containing_Chinese_character}");
    the following error is thrown by windows.
    Cannot open file "C:\??.txt".
    with the exception
    java.io.IOException: CreateProcess: [Ljava.lang.String;@f5da06 error=2
            at java.lang.Win32Process.create(Native Method)
            at java.lang.Win32Process.<init>(Win32Process.java:66)
            at java.lang.Runtime.execInternal(Native Method)
            at java.lang.Runtime.exec(Runtime.java:566)
            at java.lang.Runtime.exec(Runtime.java:428)
            at java.lang.Runtime.exec(Runtime.java:364)
            at java.lang.Runtime.exec(Runtime.java:326)
            at Launcher.main(Launcher.java:26)
    When I try to use the same command (shown below) from the Windows Run command, the file opens sucessfully
    rundll32 SHELL32.DLL,ShellExec_RunDLL {File_With_FileName_containing_Chinese_character}
    Please suggest.
    Thanks in advance

    This may be a file association problem.  To solve that:
    In Windows 7:
    1. Right-click the file,
    2. Select "Open With" 
    select [Your Program Here]
    3. Check always use this program. 
    In Windows XP:
    1. Locate the file as you have described above
    2. Right click the file
    3. Select Open with from the pop-up menu
    4. Click Choose default program…
    5. Select Excel in the Recommended Programs box
    6. Check Always use the selected program to open this kind of file
    7. Click on OK.
    1.  Make Excel not available from Office 2007 listed under Programs and Features in Control Panel.
    2. Take a registry backup using the steps given here
    3. In the registry editor window expand HKEY_CLASSES_ROOT and navigate to .xls right and delete it.
    4. Exit Registry Editor
    5. Undo Step 1 to make Excel available.
    6.  Restart the computer and verify it the issue is fixed.
    If this answer solves your problem, please check Mark as Answered. If this answer helps, please click the Vote as Helpful button. Cheers, Shane Devenshire

  • Opening a file with custom FileDialog. (VERY URGENT)

    hi everybody,
    I have a problem and stuck. I have developed a MDI application that provides all function like open saved files, create new, edit and lots of other. It only opens, save ,edit etc the graphical diagrams inside JInternalFrames. I have an icon on my desktop when clicked opens this Application. Just like Editplus, Word or some other application when you click on the icon it opens that. Same way I have created such functionality.
    Now instead of this I have created a custom FileDialogfrom which the user selects this application and is opened. Now I have small icon for this FileDialog on the desktop when opened gives the interface to select the files to be opened. My FileDialog just looks like the FileDialog but some more functionality and more components like JComboBox, Jlist, JtextField, JButtons etc. in it and have removed some of them. I am extending JDialog. But now my probelm is when you select a file and click open, it should open the selected file. How can I achive this functionality in my custom FileDialog as I am not extending FileDialog and as it is built in the FileDialog. How can I open the files with any extension in it's related application e.g .doc files to be opened in MicrosoftWord, .txt to be opened in notepad, .c or .cpp in Visual Studio C++ etc.
    How can I put this kind of functionality in my custom FileDialog. It's really important for me please any comments will help me alot. Thanks for the help

    Hello,
    I think you can write :
    Runtime.getRuntime().exec("start.exe " + MyFileDialog.getDirectory() + MyFileDialog.getFile());
    So, "start.exe" choose the application (not valid for NT machine), ".getDirectory()" return the PATH and ".getFile()" return the NAME.
    Best regards from France
    Thierry

  • Issues opening RAW files with CS2...

    I find if a bit complicated to open RAW files with Photoshop CS2 in iPhoto 08 (I'm using OS X 10.5). Currently the only way I've been able to do this is do a search for the file name in the finder, at the bottom of the Finder window, in the path, double click on the folder that the RAW files are in (user/my name/pictures/iphoto library/originals/2007/RAW files), then highlight the NEF files (the cameras a Nikon D200) I want to open, hit command/O then Photoshop CS2 opens the files in the RAW converter. If I try this from CS2 (command/O) the path goes as for as iphoto library (user/my name/pictures/iphoto library), at this point the iphoto library icon is ghosted out and can not be opened. If I drag and drop the image from iPhoto to the CS2 icon in the dock it opens as a jpg not the RAW file I need. If I try clicking my way to the folder from the left side of the finder, my name/pictures/iphoto library this is as far as I can go. There's something strange going on here. How can you go to a folder only one way and not the others? There seems to "hidden" folders now.
    So... My question (finally), how can I simply open RAW files from iPhoto 08 in CS2?

    In iPhoto's Advanced preferences select the checkbox under RAW Photos: "Use RAW when using external editor". That will open the Cr2 file in the raw editor. To get the edit to show in iPhoto you'll need to click on the Open Image button so the jpg version is created with the edits you made to the RAW file. Then when you save you'll need to navigate in the Save window to the Modified folder and save it into the folder representing the event that the original is in. It's not easy. I've not done much with RAW, just a few tests, so there may be an easier way to get iPhoto to recognize the edited version.
    If you don't use the Open File and close iPhoto won't display the edits you made to the RAW file.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Opening a file with a .WPS Ext.

    Does anyone know how to open a file with the Extension of .WPS? The file was created on a PC but i can't get it to open on my MAC. Maybe i don't have the right program. What program creates this Extension? Sorry if this is not the right place for this question.

    .wps is for a +Word Perfect+ file. make a backup copy and try changing the extension to .doc or .txt and you might be able to open and read it.
    else, you may take a look @ http://www.dataviz.com/products/maclinkplus/mlp_xlators.html. AFAIK, *open office* should be able to open .wps files, too.
    JGG

  • I need to open a file with an associated programm.

    I need to open a file with an associated programm.
    I'm looking for two solutions:
    1. for Linux/Solaris/Unix/...
    2. for Windows 95/98/Nt/2000
    For Windows I have done this with command line
    Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + uSavePath);
    but it doesn't work on windows2000. We need an universal solution.
    For linux
    Process p = Runtime.getRuntime().exec("netscape openURL " + uSavePath);
    But may be anybody know better solution?

    You are right. For unix better solution is that my program to care about all association itself. As I undestend now it's a common solution for unix applications.
    But for windows it will be ugly enough. I've found another way for windows
    Win2000/NT: "cmd /C start filename /B"
    other Wins: start filename
    for linux I've stopped at doing this via Netscape.
    May be in future I'll make my property file.
    start filename - on Win95(may be 98/ME) returns -1 if file not assotiated with a programm, and doesn't shows openWith dialog. It solved using something like "rundll32 shell32, OpenWith filename"
    It's all for those how will solve this problem in future.

  • Opening .doc files with wrong program

    Hi *,
    first I've installed open office. A few month later I installed micorsoft office. After that I converted all office files. Everything was working fine. Now my mac forgot to open .doc files with ms word, he chooses oo word. I do'nt have these problems with .xls files.
    Where are the global settings that I can tell my mac to open .doc files with ms word (I will not use "open with" each time;-)
    Thanks in advance
    Michael
    Message was edited by: MichaelLudt

    Select the file. Do a "Get-Info" from the File menu. (command-I). In the drop down menu "open with" select the program and then confirm you want all files like these to open with that program.

  • I cannot open PDF files with my Mountain Lion system. What APP's do I need?

    What Apps do I need  to open PDF files with Mt. Lion installed?

    Double-click the PDF and it should open in Preview.

  • CUCM 4.1(3) installing Dev Pack 89 - "can't open script file"

    Hello All,
              I'am trying to isntall the 4.1 dev pack 89 on CUCM 4.1(3) server.  It unpacks the contents then says "can't open script file".  I closed the CSA agent and I have no virus scanners running.  Has anyone had this issue before?  Thanks
    Jason Steig

    Paul,
    I assume you are referring to 10.1.3 DP4. The previews are not reverse compatible with previous previews. Unfortunately this means that you will need to re-map any project created in 10.1.3 DP3 or earlier.
    We believe we have finalized the file formats for the release and our intention is to have the DP4 projects be completely compatible with the final release.
    Sorry for the inconvenience,
    Doug

  • Finder can't open video files with VLC?

    Hi,
    Having recently got OSX Mavericks, trying to open videos from Finder I get an error message saying "The application can't be found" referring to VLC or any other video playing program I try to use.   Despite the newest VLC version being re-downloaded and in my Applications folder, this happens with all video formats across all programs.  If I go through VLC and open the file from there it plays without a problem.  The preview from pressing space isn't working on videos either but does work on doc, pdf, ppt files etc.  Any help greatly appreciated, thanks.

    tomspeller wrote:
    It's a problem with AVI, MKV and MP4 files I've tried to open and VLC can play them all, just not through Finder.
    Yeah, so? You didn't seem to grasp what I posted before. It doesn't matter if the file should be able to be played by the Finder. It may say it is an AVI (which I don't think QuickTime plays natively), but that doesn't mean a program that normally can play an AVI can play that one. The video content could have been encoded with the double-monkey franken-codec which you do not have installed on your Mac. You wouldn't be able to play it unless you used a program that had that codec installed with the program.
    Perian (not being developed anymore) can help QuickTime play some codecs. Flip4Mac (the free version) can enable QuickTime to play a lot of Windows video/audio.
    If you were previously able to play those files in QuickTime, did you have any QuickTime helpers (like Perian) installed?  Also, the new Quicktime X doesn't handle a lot of the older stuff which Quicktime 7 may be able to.  If you had the Pro version, Quicktime Player 7 should still be in the Applications/Utilities folder.
    You keep saying it plays in VLC. Great, tell the Finder to open the files with VLC then. Whatever is set to currently open it doesn't have the codec to decode the content.

  • Can't open .wmf files with Illustrator

    I'm using Creative Suite CS2 on a PC/Windows XP operating system.
    I'm suddenly unable to launch Illustrator when I try to open a .wmf file from within Windows Explorer. Instead, I get an error message that the file itself is not a valid program (DUH!).
    I also cannot open them with the "Edit Original" command in InDesign.
    I have tried changing the "Opens With Program..." option in the file properties from within Windows Explorer over and over.
    Oddly, I can always open .wmf files with Illustrator from within Adobe Bridge, simply by double-clicking the file. And of course, I can open them from within Illustrator by simply going to "open file".
    But I really want to be able to use the "Edit Original" feature in InDesign to launch and open .wmf files in Illustrator.
    Anybody know what's going on? Is this a Windows problem, an Illustrator problem or an InDesign problem? And how do I fix it?
    Thanks so much for any suggestions.

    I'm sorry you're having this problem with Illustrator.  Would you mind reposting over on the Illustrator forums?  You've posted in the AIR forum and I think you'll have better luck over there.
    Thanks,
    Chris

  • Unknown Command when opening a file

    When I try to open a file created in freehand it tells me
    "could not complete your request because an unknown command was
    encountered." I get this message on a lot of files. However, when I
    go to "my computer" and open the folder containing the file you can
    see the thumbnail and the file is there. I need help.

    > When I try to open a file created in freehand it tells
    me "could not complete
    > your request because an unknown command was
    encountered." I get this message
    > on a lot of files. However, when I go to "my computer"
    and open the folder
    > containing the file you can see the thumbnail and the
    file is there. I need
    > help.
    In most cases, it seems, it is about fonts. FreeHand can't
    find the font used in the document and stumbles in the replace
    function (dialog). Also FreeHand saves information about default
    printer (?!?!) and may get confused there too.
    If you know the fonts used, install, if not reduce the number
    of installed fonts to minimum. Also try to import into new document
    like Judy suggested.
    If you have (access to) Illustrator CS3 try to open the files
    with it. If it works you'll know at least the file is ok.
    Thumbnail is probably the last survivor when the rest of the
    file gets corrupted.
    Jukka

  • CS4 opens unchanged file with changes made to different saved file

    Ok, I searched for this but couldn't find anything. Probably because I have no idea what is happening. 1) I opened a raw file from a CD in photoshop cs4, lets call it photo1.nef. 2) I saved the file with a different name on my HARD DRIVE after making changes, photo1b.tif. I did not in any shape or form save the file on the CD (can't anyways). 3) Now, whenever I open the original file, photo1.nef on the CD it opens with all the changes I made previously to the file saved as photo1b.tif (remember this is the original unchanged file not the file I changed). But, when looking at thumbnails it appears to be the unchanged version of the file. I have closed photoshop and deleted all my temp files and still it opens the file with the changes, even though other programs open the file in it's original state without any of my changes. How do I stop this? I think I may be going nuts over this! Help! My wife is laughing at me when I show her.

    Sounds like you may be using a centralized cache for your Camera Raw adjustments (as opposed to sidecar XMP files).  Check your preferences inside Camera Raw or do an Edit>Camera Raw Preferences from Bridge.
    You should be able to clear the edits by right-clicking the image in Bridge and selecting Develop Settings>Clear Settings.
    Only Adobe programs are going to use those edits by the way.  That's why opening the file in other programs doesn't show them.

Maybe you are looking for

  • Creating a boot disk with minimal system

    I just upgraded to Tiger. I have an external FireWire drive that has two partitions. One (large) partition is for a backup of my Mac's entire hard drive. The other (much smaller partition) is a boot drive - that boots from Mac OS 9. It's time to upda

  • Connecting to Oracle XE via regular 10g client - ORA-12514

    I have had the 10g client installled on my computer for a while, for developing against our company Oracle databases. I have now installed the XE database locally on my computer so I can do some local development - according to the information I've b

  • Tranport request missing

    Hi all, our dev server crash. after database restore the problem is solved but it is status on when backup is taken during backup and crash we upgrade some program with transport request. those request are missing after backup restore those request a

  • How to reset status in JSPM for component modified by NWDI

    Hello, We have a E-Commerce landscape connected to NWDI. One of the standard software components was initially modified by the developers through NWDI. Later on, the component was excluded from deployment. Now, when we try to update the component thr

  • FORM. INSERT IMAGE(. JPG) IN A SQUARE

    Hello, anyone know how I can do a button to put a picture (.jpg) in that square for her. A greeting and thank you all in advance