how does pl/sql developer detect if a file was changed?

jko

Member²
Hi,

how does PL/SQL Developer detect if a file changed and shows the "file was changed - reload/discard changes/overwrite"-boxes? Is it just a simple comparison of last modified date?

I suffer under the the effect that I'm always prompted with this messages which is kinda annoying because you have to read them carefully and choose yes or no depending on the actual box. The files are stored on a fileserver.
 
how does PL/SQL Developer detect if a file changed and shows the "file was changed - reload/discard changes/overwrite"-boxes? Is it just a simple comparison of last modified date?
Yes.

I suffer under the the effect that I'm always prompted with this messages which is kinda annoying because you have to read them carefully and choose yes or no depending on the actual box. The files are stored on a fileserver.
Even if the file is stored on a file server, the warning system should still function correctly. Is the warning incorrect in your case?
 
yes it's wrong.

let's assume the following situation: you are opening a file (located on a fileserver, mapped as a network drive), editing it in pl/sql developer, saving it again (ctrl+s) and some seconds later you get a "file has been modified - reload?"-box.

just trying to figure out what might be responsible for this (new) behaviour. can a slight discrepancy (only a few seconds) between system times of my local machine and the fileserver cause this? (can't check the time on server)
 
Last edited:
It is not uncommon to save files on a fileserver, even if it's transparent to users where the administrator has set the 'my documents' folder to be located on a network share. If this would be the cause of your problem it would have been noticed earlier I guess.

You obviously excluded that somebody else uses the files. Could there be 'something else' using these files? Some backup or virus scanning process? (Both would normally not change the date, I know.) In the worst case it's a malevolent process, e.g. a virus.

Most fileserver systems allow you to log/audit access to files. You could check into this to see what's happening.
 
You could also try the following:

1. Create a new text file with notepad on the file server.
2. Note the modification timestamp of the new file.
3. Refresh the folder where the file is located.
4. Check if the timestamp matches the original timestamp.
 
wim and marco thank you for your feedback.

i got this log entries from my system admin:

[2009/06/12 15:24:24, 2] smbd/open.c:open_file(551)
jko opened file projekte_prg/trunk/sql/test.pck read=Yes write=No (numopen=2)
[2009/06/12 15:24:35, 2] smbd/close.c:close_normal_file(606)
jko closed file projekte_prg/code/trunk/sql/test.pck (numopen=1) NT_STATUS_OK

--
[2009/06/12 15:24:52, 2] smbd/open.c:open_file(551)
jko opened file projekte_prg/code/trunk/sql/test.pck read=Yes write=No (numopen=2)
--
[2009/06/12 15:24:52, 2] smbd/close.c:close_normal_file(606)
jko closed file projekte_prg/code/trunk/sql/test.pck (numopen=1) NT_STATUS_OK
[2009/06/12 15:24:52, 2] smbd/open.c:open_file(551)
jko opened file projekte_prg/code/trunk/sql/test.pck read=Yes write=Yes (numopen=2)
[2009/06/12 15:25:03, 2] smbd/close.c:close_normal_file(606)
jko closed file projekte_prg/code/trunk/sql/test.pck (numopen=1) NT_STATUS_OK

First two entries are written to logfile, when I open the file.

The next THREE entries (including the "read=Yes write=Yes"-line) are written when I press ctrl+s. Last line is written some seconds later.

Unfortunately, I have no idea what this lines mean nor do I know if you do Marco :)

Let's make it clear again: I really doubt it's a problem with PL/SQL Developer, I'm just looking for some help, because

a) this problem does NOT occur when saving to local harddrive
b) this problem does NOT occur when working with an advanced editor like notepad++ (no matter if the file is saved to harddrive or network drive)
 
Marco Kalter said:
Can you do the test I mentioned in my previous reply?

I did the test you asked me for when I posted my reply. Seems I somehow missed to mention it.

The modification time does not change, the access time does.
 
http://oreilly.com/catalog/samba/chapter/book/ch08_01.html

Reading this - and a few other messages on internet - causes me to believe that Samba might need some specific tweaking when used for hosting programmer files.

You already asked it yourself: can a time discrepancy be the cause? I think it's worth looking into. Might even be a good idea to let the Samba machine act as a time server and let your clients sync with it on logon.
 
Back
Top