Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 12 total
Thread ElevateDB Error #300 Cannot lock the database ConciergeDB for exclusive access
Tue, May 29 2012 2:19 AMPermanent Link

IQA

Hi All,

Just trying to do a simple RESTORE in ElevateDB Manager (UNICODE) on an
existing REMOTE session / database.

The database works perfectly, no tables are open when I try and I run
the following:

RESTORE DATABASE "TESTDB"
FROM "Backup On 2012-05-29"
IN STORE "mystore"

And get:

ElevateDB Error #300 Cannot lock the database TESTDB for exclusive access
Tue, May 29 2012 3:43 AMPermanent Link

Adam Brett

Orixa Systems

Sounds to me as though you may have a hanging session. I think Roy posted something on the Binaries group to cope with this problem, although in my experience is it usually a "switch it off and on again" issue.

You might do well to run the RESTORE to a new DB Name so that you have the restored DB available, and leave the locked one, if you can point any applications to a new-name DB easily.
Tue, May 29 2012 8:07 PMPermanent Link

IQA

Thanks Adam,

I totally removed the session, database and deleted the physical folders.

Installed the program again and have the same problem when using
ElevateDB Manager to restore a backup.

Let me ask a question...

If I'm using ElevateDB Manager connected to a REMOTE session and have a
local store, can I RESTORE a backup from the local store to the remote
session? I backed up fine from the remote session to the local store,
but get the same error when trying to restore:

ElevateDB Error #300 Cannot lock the database ConciergeDB for exclusive
access
Tue, May 29 2012 8:12 PMPermanent Link

IQA

OK I just worked out I cant do anything such as ALTER database, so I'll
look further into this and check the configuration file path.
Tue, May 29 2012 9:44 PMPermanent Link

IQA

On looking further it all appears correct.

I'm using a client / server setup.

My Server program also accesses the database and runs queries etc.
Should the session for this be Local ?

Obviously the client program uses a Remote session
Wed, May 30 2012 12:30 AMPermanent Link

IQA

OK I nailed it down to the Server Application using a Session and
Database component to access the database.

If I disconnect the session / database and leave the TEDBEngine as is, I
can then ALTER / RESTORE from the client program.

So my question is, what am I doing wrong AND do I have to disconnect the
session / database on the server program when it's not needing to access
the database?

For example my SERVER program periodically imports an external CSV file
and INSERTS the data into a table in the database amongst a number of
other things.

Thanks,

Phil.
Wed, May 30 2012 3:12 AMPermanent Link

Adam Brett

Orixa Systems

>>If I'm using ElevateDB Manager connected to a REMOTE session and have a
>>local store, can I RESTORE a backup from the local store to the remote
>>session?

Simple "no" to that. you have to COPY the file from your local store to a store which is local to the remote session, then call RESTORE.

--

Several of your other problems have me scratching my head though!!

NOTE: I always INCLUDE CATALOG when I restore. There is a chance that the problem you are having is in the CATALOG & this persists through your restoration if you don't INCLUDE CATALOG.

i.e. your "restored" database is actually restored _data_ in the context of the old database.
Wed, May 30 2012 3:19 AMPermanent Link

Adam Brett

Orixa Systems

>>For example my SERVER program periodically imports an external CSV file
>>and INSERTS the data into a table in the database amongst a number of
>>other things.

None of the things you are doing here is wrong. They are all basic data-actions which EDB ought to be able to do bloody fast without raising a sweat.

However it depends on how you have actually programmed stuff & what other TRIGGERS etc., are set in motion within the DB as a result of the INSERTS & IMPORT. If design is not good you may be getting cascades of events which might lock up the database resulting in the problems you are experiencing.

I would probably try to debug an IMPORT process running step-by-step to see when you hit a bit of code which is locking something.
Wed, May 30 2012 4:19 AMPermanent Link

IQA

Thanks Brett,

> None of the things you are doing here is wrong. They are all basic data-actions which EDB ought to be able to do bloody fast without raising a sweat.
>
> However it depends on how you have actually programmed stuff&  what other TRIGGERS etc., are set in motion within the DB as a result of the INSERTS&  IMPORT. If design is not good you may be getting cascades of events which might lock up the database resulting in the problems you are experiencing.
>
> I would probably try to debug an IMPORT process running step-by-step to see when you hit a bit of code which is locking something.

I have nailed the problem Error #300 down to my SERVER program having in
addition to the Engine component, a database and session component. If I
disconnect the database / session components then the client program (or
ElevateDB Manager) can ALTER the database, RESTORE etc without the #300
error. Just as if I was running the ElevateDB Server program as oppose
to my own Server program.


Wed, May 30 2012 4:23 AMPermanent Link

IQA


> Simple "no" to that. you have to COPY the file from your local store to a store which is local to the remote session, then call RESTORE.

OK strange, cause if I used the ElevateDB Server program as oppose to my
server program I can RESTORE from the ElevateDB Manager via the remote
session and it's nice as fast being it's only across a LAN.

> Several of your other problems have me scratching my head though!!
> NOTE: I always INCLUDE CATALOG when I restore. There is a chance that the problem you are having is in the CATALOG&  this persists through your restoration if you don't INCLUDE CATALOG.
> i.e. your "restored" database is actually restored _data_ in the context of the old database.

All the problems refer to having active database / session components on
the server program when trying to ALTER or RESTORE from the EDB Manager
or my own client program, as soon as I diconnect the servers database /
session component I don't get the Error #300 so I guess the question is
should I be turning off the database / session components in the server
program when not in use?

Thanks,

Phil

Page 1 of 2Next Page »
Jump to Page:  1 2
Image