PDA

View Full Version : LDB file stays on server. CAN be deleted


avivit
04-07-2003, 01:28 PM
Hi,

I wonder.
I have asp files and MS-ACCESS database on the Intranet Server.
Recently, I find an *.ldb file in the same folder as the mdb file, and it won't terminate by itself.
It is possible to delete it. But as soon as u access the asp file that accesses the database, a new *.ldb is created.

The asp files were not changed recently.
What can cause it?
The asp files do not write to database, just read from it.

I am not the administrator, and want to know what can be the problem.

Two changes happened recently:

1. I have upgraded the db only to XP from 2000 (but the server uses the same drivers as before. There is an office 2000 installed on the server (worked great for access 97 and 2000).
I copy the xp file (after updating data), to the server, from my pc.

Btw - I use DSN to access the db.

2. The database was recently re-defined by the admin (permissions etc. DB should be read only), after a corruption of the server.

3. There is nore than 1 asp page that accesses the db, but as I mentioned, no changes have been made with the asp pages code.

Thanks

Caffeine
04-07-2003, 02:05 PM
I used to deal with access-databases a few years ago, and I did too have this little 'problem' (but this is not actually a problem since everything works. But for the picky people its a problem ;) )
And yes, i'm one of the picky ones too! :D

Anyhow, I don't remember if I fixed it by doing this but its worth a look:

* Check your code. Do you close recordsets/connections properly ?
ie)
objRS.Close
SET objRS = Nothing
(Do this for objCon too)

* There are different ways of locking the database, maybe that has some kind of effect ? I don't know but this could be it.

* The .ldb-file is created when someone use the database, read/write/update. So if there is one visitor on your site that views a page that connects to your mdb-file, an ldb-file is being created. Maybe someone was using the db at the time(s) you looked for the .ldb-file ?

That's what I can come up with for the moment.

I'm not sure of what the ldb-file is good for, but I know it needs to be created[this occur per automatique] when you update the database through a webpage, else you get an error message.

Databases should be read-only if there is absolutely no need to update the information in it.
If you are using an admin-interface, a poll, guestbook or forum and so on, you will not want the db to be read-only!

-phleg-

avivit
04-08-2003, 07:04 AM
Should the *.ldb file be re-created everytime a new user is reading from the db (reading is made from asp web pages, and shoukd be closed every time a user finishes working?

What if few users use it at the same time? It is not closed until all r finished?

Thanks

Caffeine
04-08-2003, 07:53 AM
As I said, Im not sure why the ldb-file is created but I know it has to be able to be created for some queries.


Another thing crossed my mind, since the ldb-file is not deleted when the users have used the db, it might be a permission-thing. To delete the file the IUSER-account would have to have that permission on that folder/file and that is a HUGE security-risk.

If you, as admin or webdeveloper, try to access the .ldb-file through the explorer (not internet explorer, the other one, where you browse C:\, D:\) and doubleclick on the .mdb-file, and then just close it. The ldb-file will now probably get removed.

"Wee", you may think :cool:
But when a web-visitor enters the site, a new ldb-file will most likely be created again. I do not know why, but I do know that it does no harm having it there.

-phleg-

Roelf
04-08-2003, 08:14 AM
When the databaseconnection is opened, the database doesn't know its just for reading. It creates an ldb-file to store the lock information in. If the last open connection is closed, the lockfile is deleted. What is the problem with having the file , if the site works just fine??

avivit
04-08-2003, 12:33 PM
having the file there.
I thought it means a connection that should be closed, is not closed or something.

I know it can be an un-terminated connection b/c of a problem in the asp code.
But it is not the issue here.

If u say it is ok having it there than it's ok.
I just do not remember seeing it so far, that why it looks weird to me. But could be that I have just missed it, for the db is being read all day long.

So it is not good to delete it manually.
I did it few time, it was deleted and in no time a new ldb file was created. No harm was done.
Should it harm the specific connection that was at that time (the user may have experienced problems when I forced deleting the ldb file, while user was accessing the db through the web page?).

And also - The update of new data to the database is being done on my pc, and then I copy it to the live server once a day.Users access the db through web pages all day, for read only.

Is it not ok to replace the current copy of db on server (copying the updated db), while an ldb file is opened?
So how can I copy it without interfering???

Thanks

raf
04-08-2003, 07:10 PM
You should be extremely cautious when you coppy access db for multiple reasons.
It's also not good practice. If you do updates each day, then you really shouldn't be copying the db each day. You should insert the data directly into the db-s (one at a time or using a batch or an appendquery or whatever) by coding an extra module to your app.

If you don't want other users to be able to use the db whyle you work on it, you should open in "exclusive" mode (look in the access helpfunction for more info)

Morgoth
04-08-2003, 07:32 PM
Those files that are created from my database, .mdb files are always deleted right after use.
When I open a database on the computer by clicking it, I can see the .ldb file, but when someone accesses the file fromt he internet, I never accually see it, I only later notice a .ldb in my recycling bin (using Norton Utilities, and having the recoving option) :thumbsup:

My only guess why they don't disapear after use is that you don't use SQL, or that your not closing something after use?

I really don't think it should matter much, because your database files should be secure in a folder where you don't really edit it by hand. In a perfect world, you only need to edit a database online with some sort of an admin section.

I know that's what I want. :)

pjmckelvey
05-01-2008, 02:52 AM
I have the ldb problem also. I does not occur with mdb on local c: drive … only on shared databases on a network file server. I would be glad to ignore it, but it does cause a few problems. I have a very small workgroup that uses the data and I know when the mdb is not open by anyone.

Sometime I get a ‘db is open exclusively by another user’ message when clicking on a control to open a form. Strange part is the message disappears on a second click of the control. It also prevented me from compacting the back-end data mdb.

I have a network admin working on the problem.

Morgoth
05-01-2008, 03:11 AM
Sometime I get a ‘db is open exclusively by another user’ message when clicking on a control to open a form. Strange part is the message disappears on a second click of the control. It also prevented me from compacting the back-end data mdb.

Are you sure your closing the database when you're done with it?