473,387 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Database corruption Issue

10
Hello All,

I have created a database in A2K. It was working fine for past 2 years.

All of the sudden it start corrupting. When I am testing with these users on the test database for at least 2 hours I do not get any error or corruption but as soon as I start working with other databases these "VERY SMART" users keep corrupting the database and funny thing is they don’t remember what they have done last.

Does anyone know how to find out who is messing with my database?

I got reply from "mmccarthy". to open a hidden form and run "Application.Quit acQuitSaveAll" on form "Unload" event. Still they are able to do the damage.

I am desperate to get some help on this issue.

Thanks
Mar 12 '07 #1
21 1655
Rabbit
12,516 Expert Mod 8TB
The only way to keep track is to create a log-in for the database either through a workgroup or through your own programming and to create a log of what the users are doing.

Note that this is not entirely foolproof as it is far too easy to get around these measures for those who know how.
Mar 12 '07 #2
hshah
10
I am using workgroup file also I am also capturing all the data modification. Users can view only custom menu. Title bar is not visible. BE database is on server which is get corrupted.

Thanks
Mar 12 '07 #3
Rabbit
12,516 Expert Mod 8TB
The only thing you can do is to pore through the log and inspect each item scrupulously to see what action could be causing the damage and who's doing it. I doubt there's a .Corrupt flag.
Mar 12 '07 #4
MMcCarthy
14,534 Expert Mod 8TB
Check the Options - Advanced and make sure the Default Record locking is set to Edited Record and the Open databases using Record Level locking box is ticked. Do this in both the backend and frontend to ensure integrity.

Mary
Mar 12 '07 #5
hshah
10
Mary,

I checked both database and both have default record locking='Edited' and Record level locking box = 'Checked'.

Thanks
Mar 12 '07 #6
MMcCarthy
14,534 Expert Mod 8TB
In that case the problem as you've previously stated is most likely caused by illegal close downs. Create a login/logout routine. When a user logs in insert a record into the table showing user, timestamp and "Login". Assuming you have an exit button then add a piece of code to insert into the table the user, timestamp and "Logout". This way you will be able to see who appears to have logged in but not logged out. They have obviously logged out illegally.

Mary
Mar 12 '07 #7
hshah
10
Mary,

Thanks again.

I did that. On startup of the database "Main Form" opens. On load event I am pulling Username, LoginTime and LoginDate.

On the same form I am adding "EXIT" button. On click of that button first it pull username, logoutdate, logouttime, save all the data and than "EXIT" application. If user do not click on the button Logout info will not be inserted.

Tested and Works great.

BUT still I have to do the copy and repair the database and relink all the users to the new database. Once database is correpted server is not allowing me to delete .ldb file. Is there a solution for that.

As always Thanks a lot.
Mar 12 '07 #8
MMcCarthy
14,534 Expert Mod 8TB
Mary,

Thanks again.

I did that. On startup of the database "Main Form" opens. On load event I am pulling Username, LoginTime and LoginDate.

On the same form I am adding "EXIT" button. On click of that button first it pull username, logoutdate, logouttime, save all the data and than "EXIT" application. If user do not click on the button Logout info will not be inserted.

Tested and Works great.

BUT still I have to do the copy and repair the database and relink all the users to the new database. Once database is correpted server is not allowing me to delete .ldb file. Is there a solution for that.

As always Thanks a lot.
I'm going to point a couple of other experts in this direction who may have more experience with scripting ldb files.

Mary
Mar 12 '07 #9
Killer42
8,435 Expert 8TB
I'm going to point a couple of other experts in this direction who may have more experience with scripting ldb files.
The whole corruption thing is over my head, but there is one point made in this thread with which I take issue.

Mary, you have suggested setting the default behaviour on both the front-end and back-end databases. But I seem to recall that in a fairly recent thread (within the past couple of months, at least) we established that setting these options sets them for the user/PC, and not for the specific database.

If this is the case (and I'm not saying it definitely is, but we need to be certain) then the OP may not have put in place all of the precautions/safeguards that they thought.
Mar 12 '07 #10
nico5038
3,080 Expert 2GB
As long as an Access session is active the .ldb can't be deleted. Even when there's no database visible, an Access session can be running. You'll need to check the running processes (Ctrl+Alt+Del -> Task Manager) and kill the MSAccess.exe.

There's however in general no need to remove the .ldb as it will only hold an active user. Looks to me that you're triggering multiple Access sessions, often caused by starting the same form twice.
I would also check upon the form's that can cause your corruption. I've had similar corruptions when a bound field was deleted from the recordset of the form, but not from the form. Nasty to find, but worth a try.

Nic;o)
Mar 12 '07 #11
MMcCarthy
14,534 Expert Mod 8TB
The whole corruption thing is over my head, but there is one point made in this thread with which I take issue.

Mary, you have suggested setting the default behaviour on both the front-end and back-end databases. But I seem to recall that in a fairly recent thread (within the past couple of months, at least) we established that setting these options sets them for the user/PC, and not for the specific database.

If this is the case (and I'm not saying it definitely is, but we need to be certain) then the OP may not have put in place all of the precautions/safeguards that they thought.
Problem is that the backend can be anywhere on the network and I'm not sure what instance of Access it will use. It's just a precaution.

Mary
Mar 12 '07 #12
NeoPa
32,556 Expert Mod 16PB
I don't think the BE uses separate settings as it is controlled by the FE.
HShah, you mentioned implementing the logging system but not checking it ever. You do realise, I presume, that this is a tool to discover where the problem is coming from, rather than a fix to the problem per se?
Mar 12 '07 #13
MMcCarthy
14,534 Expert Mod 8TB
I don't think the BE uses separate settings as it is controlled by the FE.
I agree you are probably right. However as this is an issue of corruption and I wasn't 100% sure I didn't see any harm in suggesting the precaution.
Mar 12 '07 #14
Killer42
8,435 Expert 8TB
I agree you are probably right. However as this is an issue of corruption and I wasn't 100% sure I didn't see any harm in suggesting the precaution.
I agree that the precautions are a good idea. My point was that perhaps they have only been applied to the OP, and not the users who are apparently causing the corruption.

Would like to get this point cleared up, if possible.
Mar 12 '07 #15
NeoPa
32,556 Expert Mod 16PB
I agree you are probably right. However as this is an issue of corruption and I wasn't 100% sure I didn't see any harm in suggesting the precaution.
I can't argue with that (rare I know). Just trying to clarify though.
My second point to the OP was the important part in that post though.
Mar 12 '07 #16
missinglinq
3,532 Expert 2GB
I've never had much experience with corruption but two thoughts came to me reading these exchanges here. The first is that all users need to be made aware of the problem, if they aren't already aware, and warned to exit the database in the approved manner. The second is concerning who is the "culprit" here. Since the db had been running smoothly for two years and then suddenly started corrupting, maybe a look should be taken at which new users came on board recently ! Oh, a third thought! They come so seldom, I like to grab them! The database hasn't grown so much that it's reaching the 2 gigabit limit , has it? I seem to remember that this will cause an increase in incidents of corruption.
Mar 12 '07 #17
Killer42
8,435 Expert 8TB
I've never had much experience with corruption but two thoughts came to me reading these exchanges here. The first is that all users need to be made aware of the problem, if they aren't already aware, and warned to exit the database in the approved manner. The second is concerning who is the "culprit" here. Since the db had been running smoothly for two years and then suddenly started corrupting, maybe a look should be taken at which new users came on board recently ! Oh, a third thought! They come so seldom, I like to grab them! The database hasn't grown so much that it's reaching the 2 gigabit limit , has it? I seem to remember that this will cause an increase in incidents of corruption.
Good points. Especially about cehcking who might have started - I always try to watch for suspicious timing at work. Oh look, this program started crashing the very day that new guy changed it. What a coincidence! :D
Mar 12 '07 #18
ADezii
8,834 Expert 8TB
Hello All,

I have created a database in A2K. It was working fine for past 2 years.

All of the sudden it start corrupting. When I am testing with these users on the test database for at least 2 hours I do not get any error or corruption but as soon as I start working with other databases these "VERY SMART" users keep corrupting the database and funny thing is they don’t remember what they have done last.

Does anyone know how to find out who is messing with my database?

I got reply from "mmccarthy". to open a hidden form and run "Application.Quit acQuitSaveAll" on form "Unload" event. Still they are able to do the damage.

I am desperate to get some help on this issue.

Thanks
I am making the assumption that you have a Security System established on the Database with individual Log-Ins. If you don't, well, I just wasted 45 minutes of my time (just kidding). What I do in the case of suspect Users is to create an inconspicuous Log File (in this case ODBCLog.txt) buried deep in the Window's System Directory along with many other files. You can re-direct it to a Server Directory, etc. It should at a minimum pinpoint exactly who Logged in immediately prior to corruption. You can also adapt it to register when Users Log Off to pinpoint the culprit(s). Hope this is what you are looking for. Any questions, feel free to ask.
Expand|Select|Wrap|Line Numbers
  1. 'You must Declare the API Function
  2. Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Expand|Select|Wrap|Line Numbers
  1. Dim ReturnValue As Long, PathBuffSize As Long
  2. Dim PathBuff As String, intOpenFileNumber As Integer
  3.  
  4. PathBuffSize = 255
  5. PathBuff = Space$(PathBuffSize)     'Buffer for Return Value
  6.  
  7. intOpenFileNumber = FreeFile()      'Next available File#
  8.  
  9. 'The Windows System Directory will be returned in PathBuff parameter
  10. ReturnValue = GetSystemDirectory(PathBuff, PathBuffSize)
  11.  
  12. 'C++ Strings returned from API calls usually have a Null Terminating Zero at
  13. 'the end - it must be removed.
  14. Open Left(PathBuff, InStr(PathBuff, Chr(0)) - 1) & "\ODBCLog.txt" For Append As #1
  15. Print #intOpenFileNumber, CurrentUser; " logged off at " & Time() & " on " & Format$(Now(), "ddd, dd/mm/yyyy")
  16.  
  17. Close #intOpenFileNumber
OUTPUT: C:\Windows\System32\ODBCLog.txt
Expand|Select|Wrap|Line Numbers
  1. Admin logged on at 7:26:26 PM on Mon, 12/03/2007
  2. Admin logged off at 7:46:51 PM on Mon, 12/03/2007
Mar 13 '07 #19
hshah
10
Thanks All,

Sorry for tuning late.

Adezii,
I am using .mdw file for the database.
Does your code help to find out when they close the database or when they logout of the server folder?

Missingling, Killer42
I have send all the users an email with complete instruction how to "Log out" with the warning of tracking information will be forwarded to VP of IT.

NeoPa,
I have created an tracking for data change. So I can link users with their changes. For me if "DataChange" table is OK. Than there is no data corruption. It works fine till last month.

Mary,
I am checking all the users with their login and logout time.

Thanks all
Mar 13 '07 #20
hshah
10
Mary,

I am about to give up. Friday it happens again, twice.

I found out two of the users are using WindowsXP and rest are working on Windows2000 as OS. Does this create an issue? All are using Access2000.

Also is there a way to find out if any recordsets are open or not before Application.quit

please please help....
Mar 26 '07 #21
MMcCarthy
14,534 Expert Mod 8TB
Mary,

I am about to give up. Friday it happens again, twice.

I found out two of the users are using WindowsXP and rest are working on Windows2000 as OS. Does this create an issue? All are using Access2000.

Also is there a way to find out if any recordsets are open or not before Application.quit

please please help....
If each machine has a different installation of Access go around to each machine and make sure the Default Record Locking is set on each individual machine to Edited Record.

The operating systems shouldn't make any difference.

The only way to check open recordsets would be to see who is on the database. This is done via the ldb file but I'm afraid this is not my area of expertise. One of the others may be able to help.

Just one other thing. Did you recreate the file after corruption by importing everything into a new file. The reason I asked is because in my experience it can be difficult sometimes to identify all corrupt records and only by importing them to a new database can this be identified.

Mary
Mar 26 '07 #22

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Hallgeir | last post by:
My msdb database is marked as suspect. This means that my maintenance plan doesn't work. I'm a novice when it comes to sql server so now I'm wondering if anyone could give a hint on how to fix the...
5
by: Upendra Agnihotram | last post by:
Hi, I am having Client-Server Access application. The source db resides on WinNT Server and some of the client systems are on Windows 2000 Professional. These days i am experiencing frequent...
14
by: L Mehl | last post by:
I tested a FE/BE application developed in A2000 on a A2002 machine and got this message when exiting the app. Clicking the only available button "OK", exits the application, as intended. The FE...
19
by: adirat | last post by:
I have read a lot on this subject on newsgroups and other access related websites on data corruption, but since we are still not able to isolate the problem – I am posting this detailed explanation...
3
by: Leinad Kong | last post by:
I'm using Access 2002, as front-end and back-end as well: 1) I faced database corrupted problems, when more than 1 user edit concurrently. I'm using All-records Locking, and open-exclusively as...
47
by: ship | last post by:
Hi We need some advice: We are thinking of upgrading our Access database from Access 2000 to Access 2004. How stable is MS Office 2003? (particularly Access 2003). We are just a small...
6
by: Gary | last post by:
I have recently placed an access database (back end) on a network folder. The standalone pc's accessing the network have in their own respective C drives a copy of the database (minus the table). I...
1
by: MAILTONRK | last post by:
Hi, I am a Mainframe guy. I am working with MS access(maintaining a application) for the last 2 weeks. I had one master database and four replicas. One of my replica had trouble in...
3
by: chris.spano | last post by:
I'm running Access 2003 on an XP machine, and there are multiple developers who are working on different "assignments" of our large database project. We all work on a local copy and export changes...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.