Showing posts with label case. Show all posts
Showing posts with label case. Show all posts

Wednesday, March 28, 2012

long query alert

Hi!

How to create an alert that responses in case of long querya. I haven't
noticed any counters that deals with these kind of situations?

Thx for your help!Darko Jovisic (djovisic@.fesb.hr) writes:
> How to create an alert that responses in case of long querya. I haven't
> noticed any counters that deals with these kind of situations?

First you would need to ask, whom is to be alerted? The user? The DBA?
And when is the alert to be issued? Directly? (*) When the query has been
running for a minute?

(*) This would of course not be possible.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||"Erland Sommarskog" <sommar@.algonet.se> wrote in message
news:Xns94F652F21045Yazorman@.127.0.0.1...

> First you would need to ask, whom is to be alerted? The user? The DBA?
The DBA, through e-mail notification!

> And when is the alert to be issued? Directly? (*) When the query has been
> running for a minute?
Directly.

> (*) This would of course not be possible.
Why is this not possible? There is a counter in Profiler so I expected to
have that in SQL Agent!|||Darko Jovisic (djovisic@.fesb.hr) writes:
>> First you would need to ask, whom is to be alerted? The user? The DBA?
> The DBA, through e-mail notification!
>> And when is the alert to be issued? Directly? (*) When the query has been
>> running for a minute?
>>
> Directly.
>> (*) This would of course not be possible.
> Why is this not possible? There is a counter in Profiler so I expected to
> have that in SQL Agent!

How would SQL Server know in advance that a query will run for a long
time?

I don't know what Profiler feature you are thinking off, but Duration
is not filled in until query completes.

The way to do this would be to have an app that everyonce in a while
scans sysprocesses for active process with a last_batch that is more
than, say, one minute ago, and in such case extracts DBCC INPUTBUFFER
and fn_get_sql() for that process. Of course, it should also include
blocking (and locking) information for that process.

(Hey, use aba_lockinfo, and send all rows with a last_since > 60000
in the mail. aba_lockinfo is on my web site:
http://www.sommarskog.se/sqlutil/aba_lockinfo.html.)

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Wednesday, March 7, 2012

Login with a case sensitive password with a Stored Procedure

I have a stored procedure that validates a user login against a username and password field.
How can I ensure case sensitivity in the stored procedure for the password field?Hi

If you cast both the inputted password and the stored password as varbinary, if they are not the same case they will not match.|||OK i tried it but how do I change the the user input from a string a varbinary for the
Stored procedure input parameter ?|||I figured it out.
Thank you, merkin|||If you use MD5 to encrypt the password then it will be case sensitive and won't be crackable if the table becomes visible to a hacker.

Friday, February 24, 2012

Login Related Question

When setting 2 servers to replicate (in the case of Push Subsription) at
what point one computer will log on to the other?
I am having some login related problems and I would like to understand the
tehnicality of that aspect
Thank you,
Samuel
Samuel,
in standard transactional replication, when the distribution agent runs,
it'll have to read commands from the distribution database and execute procs
at the subscriber.
For merge, it'll also be on synchronization/running of the merge agent.
For transactional with queued updating subscribers, the queue reader's
execution will initiate a logon.
What error are you seeing, and at what stage?
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .