Question: I have a (SQL 2005) stored procedure that processes a giant table and groups old data from the past (up til one year ago). It has this main steps:

* copy old data grouped to a new table
* copy recent data as is to the new table
* rename table

Now I want to log every run and every step in logging tables. However I start a transaction in the beginning so that I can rollback the whole batch if something goes wrong. But that would also rollback my logging which isn't what I want.

How can I resolve this?

Answer: 
The `web_reg_save_param` function in LoadRunner is used for this. The following line will save the current page URL to the parameter (URL).

```
web_reg_save_param("URL", "LB/ic=Location: ", "RB=\r\n", "Search=Headers", LAST);

```

If you know what the ID is that your looking for, ie. <http://www.example.com/?id=298374293847> you can adjust the call accordingly.

```
web_reg_save_param("URL", "LB/ic=Location: http://www.example.com/?id=", "RB=\r\n", "Search=Headers", LAST);

```

Hope this helps.
If you are recording your scripts using Web http/html you can use automatic correlation. For automatic correlation go to Design Studio
If you are unable to find the value there,then you must correlate manually using **web\_reg\_save\_param** by giving the left and right boundaries.