Author |
Topic |
TonyB7
Junior Member
USA
267 Posts |
Posted - 09 July 2006 : 23:55:29
|
quote: Microsoft JET Database Engine error '80004005'
You attempted to open a database that is already opened exclusively by user 'Admin' on machine 'SOLO'. Try again when the database is available.
/testforum1/admin_compactdb.asp, line 104
There's a topic about this from 2002, but no resolution was given. This db's about 50mb so it's getting to be a real pain to download and compact it.
Any help appreciated. |
|
Classicmotorcycling
Development Team Leader
Australia
2084 Posts |
Posted - 10 July 2006 : 03:08:01
|
What you need to do is make sure that you have none of the tables open when you try to compact it. You also should not do it, while it is online as you may end up with more issues than the size.
I would down the forum and ftp the DB down to your local machine (make a backup of the DB once down) and then run the compact tool from Access. Then upload the DB and bring the forum back up.
I hope that helps you.
|
Cheers, David Greening |
|
|
TonyB7
Junior Member
USA
267 Posts |
Posted - 10 July 2006 : 19:16:46
|
That's what I've been doing, but at 50mb it means the forum's gotta be down for quite a while. This late at night after everyone logs off, which is tough for me to do.
So, if the forum's been closed, why does it think the admin is still logged on? I mean, I'm still logged into _something_, but how can I run the compact if I'm not?
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 10 July 2006 : 19:41:00
|
Check whether there is a .ldb file in the same folder as the .mdb file. If there is, delete it, of course, once you have shut down the forum. Try to compact again once the deletion is done.
If there is no .ldb, then you may be in trouble... You could ask your host to make sure the DB default opening mode is set to Shared, but frankly speacking I have never had this happening to me, so I have no experience finding a solution for it.
|
Snitz 3.4 Readme | Like the support? Support Snitz too |
|
|
TonyB7
Junior Member
USA
267 Posts |
Posted - 10 July 2006 : 22:28:54
|
Sorry, you mentioned to check that in the old topic and no, there's no .ldb file in there. |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 11 July 2006 : 03:26:17
|
if there is no ldb file then the db can not be open. |
|
|
TonyB7
Junior Member
USA
267 Posts |
Posted - 11 July 2006 : 22:20:56
|
I guess the ldb file must be somewhere else, because the forum's working fine. It's a shared host, and it's not anywhere in my wwwroot/ folders. |
|
|
campinmom03
Junior Member
USA
190 Posts |
Posted - 22 January 2008 : 16:24:53
|
Hello. I did a search so I hope I am in the right topic for this problem with my db. When I try to compact my access db, I get that it cannot create a folder. Therefore leaving me unable to compact my db. Has anyone had this problem? If so, how was it fixed?
Any help would be appreciated. |
Have a great day! Terry |
Edited by - campinmom03 on 22 January 2008 16:25:30 |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
campinmom03
Junior Member
USA
190 Posts |
Posted - 22 January 2008 : 18:02:16
|
Rui, permissions are set. I see now there is more to get to the bottom of this. The db had been compacted at one time, saved to a snitz_forums_db_somenumbers.bak file. If the compact was successful it saved it to the old snitz_forums_db.mdb. Does that sound right? If so, why would it tell me it cannot create a folder? Do you know what I have to do to correct this?
Many thanks. |
Have a great day! Terry |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 22 January 2008 : 18:36:59
|
Terry, to tell you the truth, I think that code never run too well. I remember I even wrote some code to compact the Access DB without the issues our regular code had.
Actually I've been working on code to compact an Access DB today. I can probably throw up some code for you to use directly (that is, not using the forum interface) if you want me to. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
|
|
campinmom03
Junior Member
USA
190 Posts |
Posted - 22 January 2008 : 18:49:26
|
Rui, Do I have good timing or what? If it doesn't divert you from what you were doing sure, and if you can show me how to do that, that would be great.
Thank you |
Have a great day! Terry |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
campinmom03
Junior Member
USA
190 Posts |
Posted - 22 January 2008 : 19:05:17
|
strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/hosting/xxxxxxxxxxxx/xxxxxx/xxxxxxxx/xxxxxxxxxxxxxx/snitz_forums_db.mdb"
Terry |
Have a great day! Terry |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 22 January 2008 : 19:16:19
|
Ok, so this code will work. Copy it, paste it into a new file, save it in your forum folder by giving it a name of your choice (say compact.asp) and then just execute it.
<!--#include file="config.asp"-->
<!--#include file="inc_func_common.asp"-->
<%
if Session(strCookieURL & "Approval") <> "15916941253" then
scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))
end if
Set regB = new RegExp
regB.Pattern="(\w|\W):.+mdb$"
Set mtch = regb.Execute(strConnString)
If mtch.Count <> 1 Then
Set regB = Nothing
Set mtch = Nothing
Response.Write "Cannot find the database to compact.<br/>"
Response.End
Else
sourceFile = mtch.Item(0)
Set regB = Nothing
Set mtch = Nothing
End If
Set fs = Server.CreateObject("Scripting.FileSystemObject")
strExtension = DateToStr(Now())
destFile = sourceFile & "." & strExtension & ".tmp"
Set jro = Server.CreateObject("JRO.JetEngine")
dbConn = "Provider=Microsoft.Jet.OLEDB.4.0; Data source="
jro.CompactDatabase dbConn & sourceFile, dbconn & destFile
fs.DeleteFile sourceFile
fs.MoveFile destFile, SourceFile
Set fs = Nothing
Set jro = Nothing
Response.Write "Database " & sourcefile & " compacted successfully.<br/>"
%> |
Snitz 3.4 Readme | Like the support? Support Snitz too |
|
|
campinmom03
Junior Member
USA
190 Posts |
Posted - 22 January 2008 : 20:00:31
|
Rui, Thank you! One question, when I execute it, shouldn't I shut the forum down? |
Have a great day! Terry |
|
|
Topic |
|