Author Topic: Pvd locks the Firebird database...  (Read 7301 times)

0 Members and 1 Guest are viewing this topic.

Offline raldo

  • Power User
  • ****
  • Posts: 140
    • View Profile
Pvd locks the Firebird database...
« on: April 24, 2009, 10:08:54 am »
Hi,

In my effort to make a plugin for JRiver MediaCenter for PVD import, I have noticed that PVD locks the firebird database (.pvd)

Is it possible to change PVD so that other clients clients can be attached?

I.e. in PVD, disconnect after operations towards the DB are finished... Reconnect when new stuff must be done.

(I noticed that Firebird Maesto also locks the DB...)

Offline nostra

  • Administrator
  • *****
  • Posts: 2852
    • View Profile
    • Personal Video Database
Re: Pvd locks the Firebird database...
« Reply #1 on: April 24, 2009, 11:08:55 am »
If you need such functionality then you should install firebird server and connect to the database using the "connect to server" function.
Gentlemen, you can’t fight in here! This is the War Room!

Offline raldo

  • Power User
  • ****
  • Posts: 140
    • View Profile
Re: Pvd locks the Firebird database...
« Reply #2 on: April 24, 2009, 12:08:07 pm »
If you need such functionality then you should install firebird server and connect to the database using the "connect to server" function.

Yes, that is one solution, but as far as I understand, a server install is hardly something a casual user would accept (with extra windows OS services etc.)?

I presume that's the reason why you use fbembed.dll too?


Offline nostra

  • Administrator
  • *****
  • Posts: 2852
    • View Profile
    • Personal Video Database
Re: Pvd locks the Firebird database...
« Reply #3 on: April 24, 2009, 02:29:54 pm »
There is no way unblocking the file if not using the server.

Actually installing the server with default settings does the trick pretty good, so I think it is easy enough for the majority of users.
I do not see anything wrong with running an extra service.
« Last Edit: April 24, 2009, 02:32:03 pm by nostra »
Gentlemen, you can’t fight in here! This is the War Room!

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Pvd locks the Firebird database...
« Reply #4 on: April 24, 2009, 07:23:40 pm »
Quote
I think it is easy enough for the majority of users.

True—It works for me! ;)

Once Firebird server is running as a service and and you've "connected to server," it's done—it will do so automatically on startup. The only thing that gave me a bit of trouble was it's so seamless, it's impossible to tell whether it's connected to the server or directly. If that mattered—and it probably doesn't—I can include my computer name or IP address in the connection string, and then that will appear in the title bar. Also, if I want to switch connection methods—and this too seems pointless—I have to disconnect/close the database by opening another, then open/connect the original database.

Offline raldo

  • Power User
  • ****
  • Posts: 140
    • View Profile
Re: Pvd locks the Firebird database...
« Reply #5 on: April 26, 2009, 09:30:15 pm »
Pvd still locks the database, even if I am using the server component on my side.

I can now run MC and Firebird Maestro simultaneously as long as I use a server connection on both...

I.e. with Pvd started, a can't connect to the db neither from firebird maestro nor from my plugin.

Any suggestions?

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Pvd locks the Firebird database...
« Reply #6 on: April 26, 2009, 11:07:15 pm »
I should have mentioned... not only was I able to connect to the server from PVD, I was able to do so simultaneously with FlySpeed SQL Query. So I doubt PVD is locking the database. Are you sure you're not having the same difficulty I had—trying to connect PVD once the database is already connected directly?

Offline nostra

  • Administrator
  • *****
  • Posts: 2852
    • View Profile
    • Personal Video Database
Re: Pvd locks the Firebird database...
« Reply #7 on: April 26, 2009, 11:31:03 pm »
raldo, did you use the "Connect to server" function from the Main menu?
Gentlemen, you can’t fight in here! This is the War Room!

Offline raldo

  • Power User
  • ****
  • Posts: 140
    • View Profile
Re: Pvd locks the Firebird database...
« Reply #8 on: April 27, 2009, 06:49:31 pm »
raldo, did you use the "Connect to server" function from the Main menu?
Yes, I tried that (after I realized that I need to install the beta, 0.9.9.5 beta 4).

But which string should I enter in the "Connect to Server" dialog?

I have tried the path, but then it looks as if the embedded server is still used.

localhost:<path>
<computername>:<path>

-- Both of these create an exception..

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Pvd locks the Firebird database...
« Reply #9 on: April 27, 2009, 08:05:11 pm »
Is this the problem?

if I want to switch connection methods...I have to disconnect/close the database by opening another, then open/connect the original database.

Offline raldo

  • Power User
  • ****
  • Posts: 140
    • View Profile
Re: Pvd locks the Firebird database...
« Reply #10 on: April 27, 2009, 08:30:27 pm »
I'm trying to open the database from within PVD using the "Connect to server" dialog.

I've tried many strings, the last one:
   dionysus:C:\Documents and Settings\Harald\My Documents\Personal Video Database\movies.pvd

Where dionysus is my computer's name. I've also tried "\\dionysus..."

When I use just the filename, a connect from another client (My plugin or maestro) fails. It looks as if embedded client is used by PVD because fbembed.dll cannot be deleted.

Are you using just the filename?

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Pvd locks the Firebird database...
« Reply #11 on: April 27, 2009, 09:21:54 pm »
Connect with [computer name:|ip address:]path (i.e., computer name or ip address are optional). All three ways work for me. So I don't understand why your last attempt would not work, unless...

You haven't acknowledged the possibility I've suggested several times. If PVD is connecting to your database via Firebird embedded—because that's how it was previously loaded—you have to "disconnect" by switching to another database (or by creating a new one). Then Connect to server, entering the path to your original database.

Offline raldo

  • Power User
  • ****
  • Posts: 140
    • View Profile
Re: Pvd locks the Firebird database...
« Reply #12 on: April 27, 2009, 09:26:10 pm »
Connect with [computer name:|ip address:]path (i.e., computer name or ip address are optional). All three ways work for me. So I don't understand why your last attempt would not work, unless...

You haven't acknowledged the possibility I've suggested several times. If PVD is connecting to your database via Firebird embedded—because that's how it was previously loaded—you have to "disconnect" by switching to another database (or by creating a new one). Then Connect to server, entering the path to your original database.
Ok, I forgot to tell you that  I've tried that...

Offline nostra

  • Administrator
  • *****
  • Posts: 2852
    • View Profile
    • Personal Video Database
Re: Pvd locks the Firebird database...
« Reply #13 on: April 27, 2009, 11:04:20 pm »
Did you install the Firebird Server in first place?
http://www.firebirdsql.org/index.php?op=files
Gentlemen, you can’t fight in here! This is the War Room!

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Pvd locks the Firebird database...
« Reply #14 on: April 27, 2009, 11:16:46 pm »
Quote
It looks as if embedded client is used by PVD because fbembed.dll cannot be deleted.

You may have a point. I'm able to delete that with PVD running (connected to server).

I run Firebird as a service now, but until I figured out how to use it, I ran it as an application. Doing so provided a notification tool that would allow me to see if a connection I attempted was successful. If you're not already doing that, it might help you trouble-shoot.

What version of Firebird are you using? I don't know why there would be any problem using 2.1.2, but I'm using 2.0.5—because the embedded version used by PVD is 2.0.3.

I know nothing about Maestro, but this caught my eye:

With the trial version of Firebird Maestro I was able to find the option for indicating connecting to an embedded database, and then I was able to connect just fine.

Is it possible you have Maestro configured to connect to the database via Firebird embedded, instead of the server?

Offline raldo

  • Power User
  • ****
  • Posts: 140
    • View Profile
Re: Pvd locks the Firebird database...
« Reply #15 on: April 28, 2009, 12:02:44 am »

I run Firebird as a service now, but until I figured out how to use it, I ran it as an application. Doing so provided a notification tool that would allow me to see if a connection I attempted was successful. If you're not already doing that, it might help you trouble-shoot.

What version of Firebird are you using? I don't know why there would be any problem using 2.1.2, but I'm using 2.0.5—because the embedded version used by PVD is 2.0.3.

I know nothing about Maestro, but this caught my eye:

With the trial version of Firebird Maestro I was able to find the option for indicating connecting to an embedded database, and then I was able to connect just fine.

Is it possible you have Maestro configured to connect to the database via Firebird embedded, instead of the server?

I've installed 2.1.2 and I have used Maestro to connect both as an embedded client and through the server. Ditto with my own app.

Maybe I'll try 2.0.5 tomorrow...

Offline raldo

  • Power User
  • ****
  • Posts: 140
    • View Profile
Re: Pvd locks the Firebird database...
« Reply #16 on: April 28, 2009, 12:09:58 am »
Maybe I'll try 2.0.5 tomorrow...

Yup, The older version worked. Thanks, Rick!

I've got Maestro, PVD, and my own app all connected now...

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Pvd locks the Firebird database...
« Reply #17 on: April 29, 2009, 05:15:31 am »
While the version may very well be important, your troubles may have had more to do with a bug in the recent update to 0.9.9.5, reported here. If your connection is working, leave it alone—the problem is it cannot be changed it using Connect to server.

Offline raldo

  • Power User
  • ****
  • Posts: 140
    • View Profile
Re: Pvd locks the Firebird database...
« Reply #18 on: April 30, 2009, 12:04:50 am »
While the version may very well be important, your troubles may have had more to do with a bug in the recent update to 0.9.9.5, reported here. If your connection is working, leave it alone—the problem is it cannot be changed it using Connect to server.
Yup. It is still not working properly...