Showing posts with label situation. Show all posts
Showing posts with label situation. Show all posts

Sunday, March 11, 2012

Cascading Blocking ?

We have a situation that occurs every so often with blocking of
various databases on one server (Win200 SQL7). It appears to happen at
random, so I'm assuming it originates from something a user does and
not a regularily run process.

We've examined the data available to us and used the very helpful
blocking code on http://www.algonet.se/~sommar/sqlutil/aba_lockinfo.html
(Thanks Erland).

Were getting closer to finding the problem, but need some advice on
what to look for.

This is a bit of guesswork, but we suspect that we get into a
situation where blocking takes places, and this then cascades to other
processes which then block others in turn. The original culprit then
finishes, but the blocks continue as the newer processes are holding
something else up. A bit like dominoes. It seems to take a while to
free this up.

The problem we have is determining the start of this process. Once we
are made aware of blocking issues, we can find out who is doing what,
but almost always get a different answer/user and think we're getting
to it a little late.

Ideally, I want to log the blocking somewhere so I can examine the
files when this occurs and can therefore establish a pattern etc...

Any ideas or suggestions would be welcome.Take a look at
http://support.microsoft.com/defaul...kb;EN-US;251004.

--
Hope this helps.

Dan Guzman
SQL Server MVP

--------
SQL FAQ links (courtesy Neil Pike):

http://www.ntfaq.com/Articles/Index...epartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
--------

"Ryan" <ryanofford@.hotmail.com> wrote in message
news:7802b79d.0310170116.c4b64ed@.posting.google.co m...
> We have a situation that occurs every so often with blocking of
> various databases on one server (Win200 SQL7). It appears to happen at
> random, so I'm assuming it originates from something a user does and
> not a regularily run process.
> We've examined the data available to us and used the very helpful
> blocking code on
http://www.algonet.se/~sommar/sqlutil/aba_lockinfo.html
> (Thanks Erland).
> Were getting closer to finding the problem, but need some advice on
> what to look for.
> This is a bit of guesswork, but we suspect that we get into a
> situation where blocking takes places, and this then cascades to other
> processes which then block others in turn. The original culprit then
> finishes, but the blocks continue as the newer processes are holding
> something else up. A bit like dominoes. It seems to take a while to
> free this up.
> The problem we have is determining the start of this process. Once we
> are made aware of blocking issues, we can find out who is doing what,
> but almost always get a different answer/user and think we're getting
> to it a little late.
> Ideally, I want to log the blocking somewhere so I can examine the
> files when this occurs and can therefore establish a pattern etc...
> Any ideas or suggestions would be welcome.

Friday, February 24, 2012

Capture Referrer URL within a report.

I have a situation where my best solution is to capture the full Referrer URL in my SSRS 2005 Report to facilitate "Back" links within my reports. I have looked but don't see a way to capture this information natively in a report.

Any help is appreciated.

We don't expose the referrer URL to the processing engine, so there is no way to embed it into the report. In many cases, there is no referrer URL (consider all of the cases where you are not rendering to HTML).

What is wrong with the browser's back button?

|||

John Gallardo - MSFT wrote:

What is wrong with the browser's back button?

That is the same question I posed, but we are using a series of drill through reports and some reports have many pages. When clicking through from one report to another and they click the Back button, it returns them to the first page of the previous report. This can get tedious if they are looking at the detail on several rows from the first report.

Therefore, if I could capture the full URL from the previous report, I would be able to return them to the previous report with a link and they would be on the same page.

Otherwise, it will require trapping the full URL in the code environment which will not be easy to deal with on an infinity basis. I want to have unlimited drill throughs and unlimited Back links, maintining state.

If you have any ideas, I appreciate it.

|||How are you displaying the report? If you are using the HTML viewer control then it should be doing this already.|||

It would make my life easier if I had an ASP.NET solution using report viewer but that is not my situation. My reports are being viewed through JSP pages where the code is posting the request URL string to report server and integrating the returning HTML into the web page. It has posed many challenges, but this is the first one we haven't found a solution for.

If it can't be done, just let me know and I'll deliver the news. I know the JSP code environment should be able to capture this info, and if nothing native will work, I'll probalby setup a named variable placedholder in the Report Server reports that the JSP code will replace with the URL. That might work, but I'd rather keep it in the reports so it works when we internally browse to it directly through the report server web as well.

|||Yes, since you are not directly using the viewer control you will probably have to roll your own solution into your application.|||Thanks for your help John. For the benefit of anyone else in the same boat, the reason the back button doesn't work for me is that it is running under an SSL so the pages aren't cached locally. It works fine if I try it from a standard HTTP insecure address. For those browsing on the company intranet it should be ok.|||Hey,

Can you please share the information on how you are trying to integrate JSP and SSRS 2005. That will be helpful.

Regards,

Raj

Capture Referrer URL within a report.

I have a situation where my best solution is to capture the full Referrer URL in my SSRS 2005 Report to facilitate "Back" links within my reports. I have looked but don't see a way to capture this information natively in a report.

Any help is appreciated.

We don't expose the referrer URL to the processing engine, so there is no way to embed it into the report. In many cases, there is no referrer URL (consider all of the cases where you are not rendering to HTML).

What is wrong with the browser's back button?

|||

John Gallardo - MSFT wrote:

What is wrong with the browser's back button?

That is the same question I posed, but we are using a series of drill through reports and some reports have many pages. When clicking through from one report to another and they click the Back button, it returns them to the first page of the previous report. This can get tedious if they are looking at the detail on several rows from the first report.

Therefore, if I could capture the full URL from the previous report, I would be able to return them to the previous report with a link and they would be on the same page.

Otherwise, it will require trapping the full URL in the code environment which will not be easy to deal with on an infinity basis. I want to have unlimited drill throughs and unlimited Back links, maintining state.

If you have any ideas, I appreciate it.

|||How are you displaying the report? If you are using the HTML viewer control then it should be doing this already.|||

It would make my life easier if I had an ASP.NET solution using report viewer but that is not my situation. My reports are being viewed through JSP pages where the code is posting the request URL string to report server and integrating the returning HTML into the web page. It has posed many challenges, but this is the first one we haven't found a solution for.

If it can't be done, just let me know and I'll deliver the news. I know the JSP code environment should be able to capture this info, and if nothing native will work, I'll probalby setup a named variable placedholder in the Report Server reports that the JSP code will replace with the URL. That might work, but I'd rather keep it in the reports so it works when we internally browse to it directly through the report server web as well.

|||Yes, since you are not directly using the viewer control you will probably have to roll your own solution into your application.|||Thanks for your help John. For the benefit of anyone else in the same boat, the reason the back button doesn't work for me is that it is running under an SSL so the pages aren't cached locally. It works fine if I try it from a standard HTTP insecure address. For those browsing on the company intranet it should be ok.|||Hey,

Can you please share the information on how you are trying to integrate JSP and SSRS 2005. That will be helpful.

Regards,

Raj

Sunday, February 19, 2012

CAPTURE DML FROM TRIGGER

Hi All!

SQL Server 2000

I've situation where I've to capture a DML executing against let say Table1 and later may at the end of the day or week I want to be able to extract all the DML executed against Table1 and execute them against similar tables on different sql server to synchronize the data. I don't want to use profiler as this is quite expensive resource for my problem niether can use any third party tool.

Is it possible to capture sql statement in the trigger?

I hope I made my question clear. Urgent help will be highly appreciated.

--Sohail.

There is no way to obtain this information accurately in SQL Server right now. So you will have to run a Profiler trace on the desired table and filter the statements. We are considering adding support for obtaining the DML statement that caused a trigger to fire in a future release.|||

If you're just capturing the DML to replicate it on a different server then do you need the actual DML?

Why not just a trigger to log which rows have been updated then when you run your replication batch you can easily copy the relavent data over (or delete where appropriate)