How can I log (to a table) the text of ALL SQL Statments fired against SQL Server ? (Similar to what profiler is doing but by using SP or custom application).
Try creating a custom trace using the system stored procedures. Check in the previous posts in this forum how to manually create a trace. After you have done so, import the text file created by trace into SQL Server. See the Article INF: How to Create a SQL Server 2000 Trace (283790) This article describes how to create and use a stored procedure called trace_build that creates a trace from arguments in a text file. This stored procedure is an alternative to using SQL Profiler to create a script to create a trace. http://support.microsoft.com/default.aspx?scid=kb;en-us;283790 HOW TO: Programmatically Load Trace Files into Tables (270599) In SQL Server 2000, system stored procedures are used to implement server-side tracing, but there is no way to programmatically trace directly to a table. However, you can easily import the trace file into a table by using the fn_trace_gettable... http://support.microsoft.com/default.aspx?scid=kb;en-us;270599 HTH. Gaurav
Apart from Gaurav's tip, if interested and management supports with budget then adopt third party tools like ENTEGRA from LUMIGENT or NETIQ http://www.netiq.com/products/am/modules/database/sql.asp]. HTH _________ Satya SKJ