Showing posts with label business. Show all posts
Showing posts with label business. Show all posts

Tuesday, March 20, 2012

alter table lock?

Hi!

I use proc handling special business logic (I also use constraints, indexes for that ;-)

Now I have a situation where I should check multiple rows with an proc.

Preventing multi-user issues I want to lock the table (yes, yes potential performance issue, but in this case there are few simultaneous jobs) - in Oracle I could lock the table, but what to do in SQL Server?

Maybe you have an better alternative, then let me hear ;-)

Or should I use "begin transaction"...

Thanks for help

Hmm, maybe

SET TRANSACTION ISOLATION LEVEL SERIALIZABLE

-- DO YOUR stuff

SET TRANSACTION ISOLATION LEVEL READ COMMITTED

will be the solution...

Some comments?

sql

Thursday, February 16, 2012

Allow user to Kill Sesions

I have a user who is Business owner of a database that is transactional.

At times some of here staff will be the leadblocker.

She has requested that she be allowed the abiity to KILL spids that are blocking her remaining users. All have blessed this process and I havve been tasked to create a way for this to be accomplished.

Is this as simple as allowing this user a permission or is it more in depth.Only a system administrator can kill processes.

My suggestion would be to create a login specifically for this purpose (kills by a business owner), and write a small application that actually uses that login to do the kill.

You have a minor problem working out how to authenticate the user, but I wouldn't think that would be too complicated, especially if you use Windows Authentication.

-PatP|||My suggestion would be to find out why the processess are being blocked and actually fix the problem...but that's just me.|||I have to agree with Pat and Blindman here on the right way to approach this. You may end up with this user killing backup jobs, data updates, and other stuff that can be a real pain to both troubleshoot, and fix.

That said, you can accomplish this by adding the user to the processadmin server role. Good luck.|||Thank you all for your suggestions.

I will try to implement. I would attempt to fix the problem however I am just keeping the lights on, on this server. No longer in my sphere of control.|||Thank you all for your suggestions.

I will try to implement. I would attempt to fix the problem however I am just keeping the lights on, on this server. No longer in my sphere of control.Pehaps, given the requirements of this task, that is for the best from your point of view ;)