Hi everyone.

 

I am cloning a DB using a recipe found at:
http://www.firebirdsql.org/file/documentation/reference_manuals/user_man
uals/html/gbak-recipies.html#gbak-recipies-clone-nodump via a batch
script (Windows) but prior to cloning it, I wanted to see if there were
any active connections to the destination (to avoid errors).

 

I run this command: 

echo set heading; select rtrim(ltrim(count(mon$attachment_id))) from
mon$attachments; | isql %DBPlay% -u %DBA% -p %DBPASS% -q

 

and get the following output:

 

Database:  employee.fdb, User: sysdba

SQL>

2

 

All I want is 2, none of the other stuff, so I can plug it into a
variable, compare it etc.  Is it possible or am I way off the mark or is
there a better tool?

 

TIA.

 

Andrew Zenz

 

 

 

 

 

 

 

 

 

 

Reply via email to