Subject RE: [IB-Architect] Delete Generator
Author David Schnepper
This handles 99% of the cases -- but fails in the perverse cases
of a table named 'EMP_NO_GEN' (etc.) (you can check for blr_generator_name
before the symbol -- etc.)

Also, many metadata objects (tables & columns certainly) have two access
modes
in BLR -- symbolic and ID. (eg: blr_relation "ANAME" and blr_relation_id
203
both refer to the same relation). Symbolic is the more robust way to refer
to objects, but need to check for both as there are ways the user can
generate
blr that uses the _id method. (The _id method is slightly more efficient).

I'm not sure if there is blr to refer to generators by both ID and name.

Dave

-----Original Message-----
From: Claudio Valderrama C. [mailto:cvalde@...]
Sent: Sunday, April 16, 2000 1:46 AM
To: IB-Architect@egroups.com
Subject: RE: [IB-Architect] Delete Generator


You are right.
Actually I can do

delete from rdb$generators

and I got no complain. I didn't commit, of course. The only way to scan for
a generator is looking for it in fields like trigger_blr and procedure_blr;
for example, in employee.gdb:

select rdb$trigger_name
from rdb$triggers
where rdb$trigger_blr containing 'EMP_NO_GEN'

gives SET_EMP_NO as the only result.

C.
---------
Claudio Valderrama C.
Ingeniero en Informática - Consultor independiente
http://members.tripod.com/cvalde


> -----Original Message-----
> From: David Schnepper [mailto:dschnepper@...]
> Sent: Lunes 10 de Abril de 2000 12:58
> To: 'IB-Architect@egroups.com'
> Subject: RE: [IB-Architect] Delete Generator
>
>
>
> (A nit) - In ODS 10 (first available in v6.0), a generator is a 64 bit
> quantity.
> Still not worth recovering.
>
> However, "DROP GENERATOR" is a SQL statement which should be supported --
> a) Currently people do it with DELETE FROM RDB$GENERATORS WHERE
> RDB$GENERATOR_NAME = 'WHATEVER';
> b) Which doesn't properly check dependency graph
> c) And people need to actually "drop generators" when removing subsystems,
> or developing
> a script to upgrade a production database (or undo an update).
> d) (and a reason just for grins) - SQL 92 calls for it.
>
> Dave
>
> -----Original Message-----
> From: Jim Starkey [mailto:jas@...]
> Sent: Sunday, April 09, 2000 11:32 AM
> To: IB-Architect@egroups.com; IB-Architect@egroups.com
> Subject: RE: [IB-Architect] Insert Speed
>
>
> At 12:16 AM 4/9/00 -0400, Claudio Valderrama C. wrote:
> >
> > Some specific points, hope brief to answer:
> >- When I look at rdb$pages, am I watching at the PIP or at a high level
> view
> >of the PIP or they are not related at all?
> >- About generator pages, can I assume there're no practical limits on the
> >number of generators? When I no longer need one of these, if I delete the
> >appropriate entry in rdb$generators, will the "deleted generator" remain
> >anyway for all the lifetime of the database? Can I get rid of it with a
> >backup/restore since there's no DROP GENERATOR command? I don't expect an
> >unused generator to hold too much space, so this question is motivated
> >mainly by curiosity.
> >
>
> The PIP stuff is answered in another post.
>
> A generate consumes 32 bits from a disk file. Not worth recovering.
>
> Jim Starkey
>
> ------------------------------------------------------------------------
> Win $1000 at eGroups!
> Click here to find out how:
> http://click.egroups.com/1/2861/3/_/_/_/955305239/
> ------------------------------------------------------------------------
>
> To unsubscribe from this group, send an email to:
> IB-Architect-unsubscribe@onelist.com
>
>
>
>
> ------------------------------------------------------------------------
> Special Offer-Earn 300 Points from MyPoints.com for trying @Backup
> Get automatic protection and access to your important computer files.
> Install today:
> http://click.egroups.com/1/2344/3/_/_/_/955386069/
> ------------------------------------------------------------------------
>
> To unsubscribe from this group, send an email to:
> IB-Architect-unsubscribe@onelist.com
>
>
>


------------------------------------------------------------------------
Avoid the lines and visit avis.com for quick and easy online
reservations. Enjoy a compact car nationwide for only $29 a day!
Click here for more details.
http://click.egroups.com/1/3011/3/_/830676/_/955875093/
------------------------------------------------------------------------

To unsubscribe from this group, send an email to:
IB-Architect-unsubscribe@onelist.com