Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 8 of 8 total
Thread cannot lock table for exclusive access (on new server)
Thu, Jan 15 2015 5:25 PMPermanent Link

Bryn Lewis

Intelligent Software and Systems

I moved an existing database onto a dedicated database server, and reconfigured the connection as a remote connection. Everything is orking fine, except -

After moving the db to the server, I created a new table. When attempting an 'alter table new_table' (in EDB Manager), I get error 300:

Cannot lock new_table for exclusive access.

new_table is not open in EDB Manager - In fact, I can't even do an open table in EDB manager (on the new table), as I get the same error message when I try to open it.

The new server is windows server 2012 (64 bit), so I wondered if it was about file permissions. I can't see any obvious issue in the new_table database file permissions though.

Bryn
Thu, Jan 15 2015 8:08 PMPermanent Link

Barry

Bryn,

What happens if you execute:
 select * from configuration.serversessionlocks

from EDBMgr? Does another session have your table open?

Also
 select * from configuration.serversessions

will show the other sessions that are connected. When debugging my app In the Delphi IDE I sometimes terminate the program so I have to get EDBMgr to execute "remove server session 3" to remove the old session (#3) if I want to alter a table in EDBMgr and my terminated app has that table open. Either that or wait until the EDB server determines the connection was lost.

Hope this helps.

Barry
Fri, Jan 16 2015 12:02 AMPermanent Link

Raul

Team Elevate Team Elevate

On 1/15/2015 5:25 PM, Bryn Lewis wrote:
> The new server is windows server 2012 (64 bit), so I wondered if it was about file permissions. I can't see any obvious issue in the new_table database file permissions though.

What is the location in the table files?

UAC changed in 2012 so just having permissions might not be enough.

Raul
Fri, Jan 16 2015 4:47 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Bryn


In addition to other suggestions make sure that EDBManager and the server are both pointing to the same configuration file

Roy Lambert
Tue, Jan 20 2015 6:16 AMPermanent Link

Bryn Lewis

Intelligent Software and Systems

-Sorry, I have only just been able to get back to this -  server is in production so I don't get to bring it down and investigate on it easily.

Just tried again - My initial description was incomplete.

1. Existing db, moved to 2012 server.
2. On the new server, created a new table (new_table)
-All fine so far.

3. Tried to 'alter table new_table add newfield varchar(10)', but get this error:

ElevateDB Error #600 File manager error (Access denied to the file D:\EDB\new_table.EDBBlb

4. I try any statement on the new_table (select or alter) and get the 'cannot lock' error (300)

5. I try to open the table and get a metadata is not correct error.

Looking at the file timestamps, I suspect the alter table got interrupted - changed the EDBBlb but not the EDBTbl (?)

thanks, Bryn
Tue, Jan 20 2015 8:24 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Bryn


It may be av software. Can you suspend that and try altering the table again?

Roy Lambert
Mon, Feb 2 2015 5:30 PMPermanent Link

Bryn Lewis

Intelligent Software and Systems

In EDB, I created a remote session on the server, which allowed me to do the update table new_table - so I don't have a problem now, although I am still unable to access the table when connecting via a local session.

I think this has something to do with file permissions - the new_table files were created by the session on the new server, whereas all other files where pre-existing.

I can't see any differences in the premissions, but I can't see what else it may be.

(av is not the issue)
Tue, Feb 10 2015 8:29 AMPermanent Link

Chris Clark

>>Bryn Lewis wrote:

>>In EDB, I created a remote session on the server, which allowed me to do the update table new_table - so I don't >>have a problem now, although I am still unable to access the table when connecting via a local session.

Not sure if this helps, but bear in mind that opening the table via a local session and via a remote session will be accessing the file system with 2 different sets of security credentials if the remote server is running as a service, and this is most likely the problem.

Using EDB server (remote session) you will be trying to open the file with whatever user is configured in the windows services list - quite probably local system.

When you run your app or EDB manager connecting to a local session you will be trying to open the file with the credentials you logged in to the server with.  
Image