> 2 Does anybody know how to obtain trigger and stored procedures names and
> definitions from a interbase / SQL Server 7 database.
>
I don't know about interbase but you can get a list of stored procedures and
triggers from the sysobjects table in SQL Server. Stored procedures have
type = 'P' (and xtype = 'P' - xtype being a slightly more detailed
explanation of the object type). I don't use triggers much but they are
probably something like 'T'. You should be able to find out easily enough by
simply browsing the sysobjects table. Note that it is a system table so it
might not be visible if you are logged on with insufficient permissions or
hiding system tables.
You could get the stored procedure and trigger names directly from
sysobjects (in a loop) and then use the system procedure sp_helptext to
extract the text used to created the stored procedure/trigger/view.
Alternatively you could directly query the syscomments table which contains
the stored proc/trigger/view definition in the ctext column (in which case
you will want to join to sysobjects by the id columns).
eg
select sysobjects.name, ctext
from sysobjects
inner join syscomments
on sysobjects.id = syscomments.id
(or similiar - I haven't compiled/tested this).
Should work well enough and with a bit of work in a front end program you
could probably extract stuff in a fairly standard format.
David.
DB Solutions.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"