Subject | Re: [firebird-support] Re: Backup in a client PC |
---|---|
Author | Gustavo |
Post date | 2008-03-16T13:36:26Z |
Adam, Helen and the others:
Finally, with your help and some "trial and error" I found the way of doing what I need. Now, with my application (wich has only one exe file in the server PC which is run form the server PC and from the client PCs), I can do the following:
1. From the server PC I can do a backup and save the FBK file in any PC (the server or a client).
2. From a client PC I can do a backup and save the FBK file in any PC (the server or a client).
3. From the server PC I can open a database (an FDB file) which is in the server PC at the same time as other users open the same database.
4. From a client PC I can open a database (an FDB file) which is in the server PC at the same time as other users open the same database.
5. From a client PC I can open a database (an FDB file) which is in the same client PC.
When I use gbak, the name of the FDB file must be "C:\..." or "<Server>:<Path and file name>.FDB", but the name of the FBK file must be "C:\..." or "<mapped drive>:\..." or "\\<Server>\C\...". For example, To make a backup:
gbak -t -v -user SYSDBA -password <password> "C:\MyDataBases\MyDB1.FDB" "C:\MyBackups\MyDB1.fbk" is right
gbak -t -v -user SYSDBA -password <password> "C:\MyDataBases\MyDB1.FDB" "P:\MyBackups\MyDB1.fbk" is right
gbak -t -v -user SYSDBA -password <password> "C:\MyDataBases\MyDB1.FDB" "\\PC2\C\MyBackups\MyDB1.fbk" is right
gbak -t -v -user SYSDBA -password <password> "C:\MyDataBases\MyDB1.FDB" "PC2:C:\MyBackups\MyDB1.fbk" gets an error
gbak -t -v -user SYSDBA -password <password> "PC2:C:\MyDataBases\MyDB1.FDB" "C:\MyBackups\MyDB1.fbk" is right
gbak -t -v -user SYSDBA -password <password> "P:\MyDataBases\MyDB1.FDB" "C:\MyBackups\MyDB1.fbk" gets an error
gbak -t -v -user SYSDBA -password <password> "\\PC2\C\MyDataBases\MyDB1.FDB" "C:\MyBackups\MyDB1.fbk" gets an error
To do this, I need the following installation:
In the server PC:
1. FireBird superserver installation
In a client PC:
1. FireBird client installation
2. Copy the following files to C:\Windows\System32:
fbembed.dll (renamed to gds32.dll)
icudt30.dll
icuin30.dll
icuuc30.dll
3. Copy the following files to C:\Archivos de programa\Firebird\Firebird_2_0\bin
fbembed.dll (renamed to fbclient.dll)
firebird.conf
firebird.msg
gbak.exe
My application has an Inno Setup Installation and in the client PCs I usually use the installation explained in the file "installation_scripted.txt". I make a call to Firebird-2.0.1.12810-0-Win32.exe with the parameter /COMPONENTS=ClientComponent. Now I know that this is not enough because I need to copy more files to C:\Windows\System32 and to "C:\Archivos de programa\Firebird\Firebird_2_0\bin". I can still call Firebird-2.0.1.12810-0-Win32.exe with the parameter /COMPONENTS=ClientComponent and then copy the other files using new instructions in my Inno Setup Script. But my question is:
Is there any way to call Firebird-2.0.1.12810-0-Win32.exe (or another file) with any parameters, to copy the files I need or, in another words, to install the embedded server in the way I need?
Gustavo
Finally, with your help and some "trial and error" I found the way of doing what I need. Now, with my application (wich has only one exe file in the server PC which is run form the server PC and from the client PCs), I can do the following:
1. From the server PC I can do a backup and save the FBK file in any PC (the server or a client).
2. From a client PC I can do a backup and save the FBK file in any PC (the server or a client).
3. From the server PC I can open a database (an FDB file) which is in the server PC at the same time as other users open the same database.
4. From a client PC I can open a database (an FDB file) which is in the server PC at the same time as other users open the same database.
5. From a client PC I can open a database (an FDB file) which is in the same client PC.
When I use gbak, the name of the FDB file must be "C:\..." or "<Server>:<Path and file name>.FDB", but the name of the FBK file must be "C:\..." or "<mapped drive>:\..." or "\\<Server>\C\...". For example, To make a backup:
gbak -t -v -user SYSDBA -password <password> "C:\MyDataBases\MyDB1.FDB" "C:\MyBackups\MyDB1.fbk" is right
gbak -t -v -user SYSDBA -password <password> "C:\MyDataBases\MyDB1.FDB" "P:\MyBackups\MyDB1.fbk" is right
gbak -t -v -user SYSDBA -password <password> "C:\MyDataBases\MyDB1.FDB" "\\PC2\C\MyBackups\MyDB1.fbk" is right
gbak -t -v -user SYSDBA -password <password> "C:\MyDataBases\MyDB1.FDB" "PC2:C:\MyBackups\MyDB1.fbk" gets an error
gbak -t -v -user SYSDBA -password <password> "PC2:C:\MyDataBases\MyDB1.FDB" "C:\MyBackups\MyDB1.fbk" is right
gbak -t -v -user SYSDBA -password <password> "P:\MyDataBases\MyDB1.FDB" "C:\MyBackups\MyDB1.fbk" gets an error
gbak -t -v -user SYSDBA -password <password> "\\PC2\C\MyDataBases\MyDB1.FDB" "C:\MyBackups\MyDB1.fbk" gets an error
To do this, I need the following installation:
In the server PC:
1. FireBird superserver installation
In a client PC:
1. FireBird client installation
2. Copy the following files to C:\Windows\System32:
fbembed.dll (renamed to gds32.dll)
icudt30.dll
icuin30.dll
icuuc30.dll
3. Copy the following files to C:\Archivos de programa\Firebird\Firebird_2_0\bin
fbembed.dll (renamed to fbclient.dll)
firebird.conf
firebird.msg
gbak.exe
My application has an Inno Setup Installation and in the client PCs I usually use the installation explained in the file "installation_scripted.txt". I make a call to Firebird-2.0.1.12810-0-Win32.exe with the parameter /COMPONENTS=ClientComponent. Now I know that this is not enough because I need to copy more files to C:\Windows\System32 and to "C:\Archivos de programa\Firebird\Firebird_2_0\bin". I can still call Firebird-2.0.1.12810-0-Win32.exe with the parameter /COMPONENTS=ClientComponent and then copy the other files using new instructions in my Inno Setup Script. But my question is:
Is there any way to call Firebird-2.0.1.12810-0-Win32.exe (or another file) with any parameters, to copy the files I need or, in another words, to install the embedded server in the way I need?
Gustavo
----- Original Message -----
From: "Adam" <s3057043@...>
To: <firebird-support@yahoogroups.com>
Sent: Wednesday, March 12, 2008 8:46 PM
Subject: [firebird-support] Re: Backup in a client PC
--- In firebird-support@yahoogroups.com, "Gustavo" <gusm@...> wrote:
>
> Adam:
>
> I can´t find the way to work with this!
>
> Now I have the following:
>
> In the server PC (PC1):
> C:\Program Files\Firebird\Firebird_2_0\... {FireBird superserver
> installation)
> C:\Program Files\MyApp\MyApp.exe (and other files not
related with
> FireBird)
> C:\Program Files\MyApp\DataBases\PC1DB1.FDB
Fine
>
> In the client PC (PC2):
> C:\Program Files\Firebird\Firebird_2_0\... {FireBird client
installation)
You don't want this. The embedded server gds32.dll is your client library.
> c:\PC2DataBases\PC2DB1.FDB
Probably fine (your logged in user will need read-write access to this
file.
>
> If I understand what you are saying, I have to put the following
files in
> the folder C:\Program Files\MyApp\ (the same where is MyApp.exe):
>
> fbembedd.dll (renamed to gds32.dll)
> icudt30.dll
> icuin30.dll
> icuuc30.dll
> firebird.conf
> firebird.msg
No, I mean the *whole* kit including sub folders (minus the doc folder
if you are desperate for disk space).
Have you read the Readme_Embedded.txt in the doc folder? Don't try and
be clever removing files you deem unnecessary until after you see it
working.
>
> I did that (and I deleted the file gds32.dll from
C:\Windows\System32 in
> PC2) and then, from PC2 (the client), I can run MyApp.exe (installed
in PC1,
> the server) and I can access both PC1DB1 (which is in PC1) and
PC2DB1 (which
> is in PC2) but... if I do this, a user in PC1 can´t access at the
same time
> PC1DB1 because the embedded server has exclusive access.
Not true.
You said in your first paragraph that PC1 (your server) has the full
Firebird 2 server installed. PC2 is *NOT* using the embedded database
engine to access PC1DB. It is using the embedded gds32.dll as standard
client.
From PC2 (or any other client for that matter), your connection string
would be of the form
PC1:c:\PC2DataBases\PC2DB1.FDB
When the embedded library sees this connection string, it pretends to
be a standard Firebird client library.
From PC2, when you need to access PC2DB, your connection string would
be of the form
c:\PC2DataBases\PC2DB1.FDB
Because you give a direct path without a host name, embedded acts as a
server. Now obviously other applications (including any other Firebird
or embedded installs on PC2) can't manipulate that database whilst
your application is connected, because under Superserver, only one
engine can control the database file at a time.
Adam
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
__________ Información de NOD32, revisión 2942 (20080312) __________
Este mensaje ha sido analizado con NOD32 antivirus system
http://www.nod32.com
[Non-text portions of this message have been removed]