PDA

Ver la Versión Completa : zeos 7.0.3 stable +firebird + delphi xe2 + problemas de conexion?


maxid
10-05-2013, 05:25:40
Pregunto por si a alguien le pasa, tengo empezada una aplicacion, que ya me haria perder mucho tiempo pasar a los objetos IB.
Instale Zeoz7 estable, con delphi XE2, firebird 2.1.3 64bits, win7 64bits.
Resulta que abro con EMS Sql una base y desde el ide no puedo abrirla de nuevo. Como si estuviera abierta en modo exclusivo. Si cierro alguna de las dos puedo trabajar. Esto tambien pasa si dejo la propiedad conected del zconnection en true, al iniciar la apllicacion me da un error -904, (justo ahora no tengo la pc de desarrollo. Despues pego una imagen).
Me esta dando dolor de cabeza, trabajar asi y ni les cuento probar la aplicacion en el cliente.
Pido alguna ayuda o sugerencias que me puedan brindar.

Casimiro Notevi
10-05-2013, 10:12:58
Explica mejor lo que te ocurre, no está claro ¿puedes conectar o es que sólo puede conectar uno al mismo tiempo?
¿Qué versión de firebird (2.1) has instalado?, ¿no será por casualidad la "embebed"?

maxid
10-05-2013, 16:56:27
Las versiones instaladas estan nombradas, Instale Zeoz7 estable, con delphi XE2, firebird 2.1.3 64bits, win7 64bits.
No es embedded, la enbedded no se instala solo se copia en el mismo lugar del exe, pero no hay nada.
Es mas, hice la prueba en otro equipo todo con 32bits y me da el mismo error.
La base de datos la restauré de un backup, como local.
Pero me parece que es un problema de la base, porque con los objetos IB, me acusa que la base esta shutdown.
Alguna idea?

Casimiro Notevi
10-05-2013, 18:08:46
Database Shutdown
If there is maintenance work required on a database, you may wish to close down that database under certain cir-
cumstances. This is different from stopping the Firebird server as the server may well be running other databases
which you do not wish to affect.
The command to close a database is:
gfix -shut OPTION TIMEOUT database_name
The TIMEOUT parameter is the time, in seconds, that the shutdown must complete in. If the command cannot
complete in the specified time, the shutdown is aborted. There are various reasons why the shutdown may not
complete in the given time and these vary with the mode of the shutdown and are described below.
The OPTION parameter is one of the following:

-at[tach]
- prevents new connections.

-tr[an]
- prevents new transactions.
Gfix - Database Housekeeping
18

-f[orce]
- simply aborts all connections and transactions.
When a database is closed, the SYSDBA or the database owner can still connect to perform maintenance oper-
ations or even query and update the database tables.
Note
If you specify a long time for the shutdown command to complete in, you can abort the shutdown by using the
-online
command (see below) if the timeout period has not completed.
Preventing New Connections
-at[tach]
: this parameter prevents any new connections to the database from being made with the exception
of the SYSDBA and the database owner. The shutdown will fail if there are any sessions connected after the
timeout period has expired. It makes no difference if those connected sessions belong to the SYSDBA, the
database owner or any other user. Any connections remaining will terminate the shutdown with the following
details:
linux> gfix -shut -attach 5 my_employee
lock conflick on no wait transaction
-database shutdown unsuccessful
Anyone other than the SYSDBA or database owner, attempting to connect to the database will see the following:
linux> isql my_employee -user norman -password whatever
Statement failed, SQLCODE = -901
database my_employee shutdown
Use CONNECT or CREATE DATABASE to specify a database
SQL>
Connections in the database will still be able to start new transactions or complete old ones.
Preventing New Transactions
-tr[an]
: prevents any new transactions from being started and also prevents new connections to the database.
If there are any active transactions after the timeout period has expired, then the shutdown will fail as follows:
linux> gfix -shut -tran 5 my_employee
lock conflick on no wait transaction
-database shutdown unsuccessful
If any user connected to the database being shutdown with the
-tr[an]
tries to start a new transaction during
the shutdown timeout period, the following will result:
SQL> select * from test;
Statement failed, SQLCODE = -902
database /home/norman/firebird/my_employee.fdb shutdown in progress
Statement failed, SQLCODE = -902
database /home/norman/firebird/my_employee.fdb shutdown in progress
Statement failed, SQLCODE = -901
Dynamic SQL Error
-SQL error code = -901
-invalid transaction handle (expecting explicit transaction start)


Gfix - Database Housekeeping
19
Force Closure
-f[orce]
: shuts down with no regard for the connection or transaction status of the database. No new con-
nections or transactions are permitted and any active sessions are terminated along with any active transactions.
Anyone other than SYSDBA or the database owner trying to connect to the database during the timeout period
will not be able to connect successfully or start any (new) transactions.
Be nice to your users, use the
-f[orce]
option with great care.
Warning
There is a bug in Classic Server which still exists at version 2.0. The bug is such that the
-f[orce]
option
behaves in exactly the same way as the
-at[tach]
option.
Starting a Database
Once all maintenance work required on a database has been carried out, you need to restart the database to allow
normal use again. (See shutdown option above for details of closing a database.)
The
-o[nline]
command allows a database to be restarted. It takes a single parameter which is the database
name as follows:
gfix -o[nline] database_name
The following example shows a closed database being started.
linux> gfix -online my_employee

Casimiro Notevi
10-05-2013, 18:09:39
http://www.intitec.com/varios/Firebird-gfix.pdf

maxid
10-05-2013, 19:00:08
Casimiro, gracias pero no entiendo para que me pones toda la documentacion. La base es restaurada de un backup. No tiene errores. Igual le hice gfix -f mibase.fdb y sigue igual.
:eek:

Casimiro Notevi
10-05-2013, 20:25:09
Te pongo la documentación para que la leas, ¿para qué si no? :D

Como dice ahí, con -shut la cierras a conexiones y con -o la pones online, por si acaso es eso.

gfix -shut -tran 5 my_employee

The -o[nline] command allows a database to be restarted. It takes a single parameter which is the database name as follows:

gfix -o[nline] database_name

Y si no es eso, entonces, tendrás que das más información.

maxid
10-05-2013, 20:50:44
Probe de nuevo desde win y desde un server con linux.
Desde cualquier lado no me deja abrir la base en 2 lugares a la vez. Incluso usando controles IB y con lazarus.
Lo raro es que tengo un backup y lo restauro sin garbage ni transacciones in limbo. Pero solo me pasa con esta base, y es la primera vez que me ocurre en años de uso de Interbase/Firebird

Casimiro Notevi
10-05-2013, 21:11:11
Pero si no tienes instalado bien firebird, te está pidiendo fbclient.dll :confused:

maxid
10-05-2013, 21:24:06
Parece que se arregló, no se que es al final. :confused:
voy a probar en otro equipo con esta base a ver si anda bien

Casimiro Notevi
10-05-2013, 21:35:31
Hombre, algo habrás hecho, él solo no se arregla ;)