How to write the text of a stored procedure when migrating from Dephi 2006

Hi all,

I have a large (100+) parameter list for my SP in my delphi code. This is for MS SQL Server 2005. For debugging purposes, I want to capture the text of the stored procedure command, so I can execute it on the SQL server and debug the SP. Is there a way to capture what is exactly transferred to the database? I was thinking about using tracing, and I will try to do it tomorrow if it fails, but it is cumbersome to install and sift and catch the SP.

thank

+3
source share
2 answers

Profiler SQL Server. . , SP. . ctrl-F SP.

+1

.

, ClientProcessID (PID, ) - .

, , - SQL Server.

proc

create proc takes3params
@a int, @b varchar(100), @c datetime
as
select @a, @b, @c

alter proc takes3params
@a int, @b varchar(100), @c datetime
as
insert capture_takes3params(a,b,c) select @a, @b, @c  -- << -- added
select @a, @b, @c

- ,

create table capture_takes3params(
id int identity primary key, captured datetime default(getdate()), -- control
a int, b varchar(100), c datetime
)

, proc .


ADO MS SQL. , 100 + , , ? ! HL7, 100 . -

SQL Server 2008, , . , Delphi - XML, TSQL, 2005+.

0

Source: https://habr.com/ru/post/1796186/


All Articles