Viewing 15 posts - 6,721 through 6,735 (of 7,631 total)
And I wouldn't use .NET to do this (at least not based on the requirements so far).
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
June 7, 2008 at 7:34 pm
How I would do it:
1) Implement DDL triggers/events on MainDB to catch the desired changes.
2) Use Service Broker to SEND the event XML to an EndPoint on LocalDB's server.
3) Use...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
June 7, 2008 at 7:31 pm
Well the two previous responses are actually posting the same query, which would have been obvious if not for the unusal formatting of the second one.
Two points:
1) The claims...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
June 7, 2008 at 7:16 pm
Have you tried what GSquared suggested? I beleive that this (putting TRY..CATCH in the inner execution) is on the right track.
What I have ended up doing in my toughest...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
June 6, 2008 at 8:28 am
It depends on your actual source data constructs and content, but this should be pretty close:
CREATE function dbo.fnGetClassificationRankingByCode(@code varchar(10))
Returns TABLE
AS
RETURN ( Select i.SysID, Code, MAX(Name)
, MAX(Case When...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
June 5, 2008 at 11:29 pm
No problem.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
June 5, 2008 at 10:32 pm
Santiago E. Perez (6/5/2008)
I see your point, but I don't think that's right either.
Sorry, but it is right. I've been using this logic for over 30 years. ...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
June 5, 2008 at 10:26 pm
Not sure about the rest, but this is surely wrong:
Mark Shvarts (6/5/2008)
begin catchselect error_number()
select error_message()
end catch
I believe that this should be:
begin catch
...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
June 5, 2008 at 8:52 pm
Or you could avoid the use of Cursors and Loops altogether:
Declare @sql Varchar(max);
Select @sql = ''
DELETE FROM [' + TABLE_CATALOG + '].[' + TABLE_NAME...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
June 5, 2008 at 8:41 pm
Please post the code that you already have.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
June 5, 2008 at 8:28 pm
what were those processes doing when they were "waiting for Service Broker"? And how did you determine that they were waiting for Service Broker?
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
June 5, 2008 at 8:22 pm
Okey dokey
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
June 5, 2008 at 8:19 pm
Your function misses those cases where the requested time range surrounds (or "Spans") an existing one. For example, let say that the only time range in your table for...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
June 5, 2008 at 8:08 pm
GSquared (6/5/2008)
;with
CTE_CreateTime (ConID, Created) as
(select conid, max(createddatetime)
from Ex
group by conid),
CTE_SID (ConID, Created, [SID]) as
(select ex.conid, ex.createddatetime, max([sid])
from Ex
inner...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
June 5, 2008 at 7:49 pm
louis315 (6/5/2008)
Didn't execute for me with eitherSET QUOTED_IDENTIFIER OFF
or
SET QUOTED_IDENTIFIER ON
No good reason to use double quotes in this stored proc.
"SET QUOTED_IDENTIFIER OFF" works fine for me. What...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
June 5, 2008 at 7:04 pm
Viewing 15 posts - 6,721 through 6,735 (of 7,631 total)