Showing posts with label call. Show all posts
Showing posts with label call. Show all posts

Sunday, March 11, 2012

Blocking updates of a table

Hi,
I've been trying to design a way for me to issue a transaction that:
    Block all inserts on a table when row X has a certain value (call it A)
    Add a row to the table with row X containing A Add rows to another table Unblock inserts Commit transaction
Is this possible? Can anyone give me some pointers as to what to do?
Thanks in advance!

For (1) and (2)
While inserting the row that has a certain value (A), you can request a TABLOCKX. This will acquire X lock on the table and there by block other inserts by other concurrent transactions.

For (3): Is it like any other insert to another table? In that case, nothing special needs to be done

Thanks
Sunil Agarwal

|||For 3 that is what I meant.
For 1 and 2, it sounds like TABLOCKX locks the whole table exclusively (from what I can find in Books Online) - have I read it correctly? Is there any way to block other transactions from inserting rows (while the first transaction is not yet commited) when a table key column (A in my original post) is a certain value (X in my original post) - rather than just locking the whole table?
Thanks for your help!
|||For 1 and 2, it sounds like TABLOCKX locks the whole table exclusively (from what I can find in Books Online) - have I read it correctly

sunil> yes

Is there any way to block other transactions from inserting rows (while the first transaction is not yet commited) when a table key column (A in my original post) is a certain value (X in my original post) - rather than just locking the whole table?

sunila> if you only want to block inserts by other transactions under the condition you have mentioned but allow updates/selects, then there is no way.
thanks,|||I assume you only want to block Inserts but not Updates, Deletes and SELECTS.

You could try using an Insert trigger that would rollback the other transactions until a condition has been achieved.

Blocking SQL server by machine name?

Hello,
I've Windows 2000 server with SQL 2000 server running.
I have a SQL user (let's call miniSa) which is mostly "sa" on one SQL box.
And that account is used to all over the places (VB apps,Web app, DTS
connection). Now I know that a person shouldn't be access to the SQL box bu
t
he does using the account. Only way I can track down him is from SQL profil
e
with his machine name.
Is there a way that I can block the SQL box only from a specific machine nam
e?
Thank you in advance.
SangHun"SangHunJung" <SangHunJung@.discussions.microsoft.com> wrote in message
news:F23A84F9-6350-4BE8-B002-62A9BD320BCB@.microsoft.com...
> I've Windows 2000 server with SQL 2000 server running.
> I have a SQL user (let's call miniSa) which is mostly "sa" on one SQL box.
> And that account is used to all over the places (VB apps,Web app, DTS
> connection). Now I know that a person shouldn't be access to the SQL box
but
> he does using the account. Only way I can track down him is from SQL
profile
> with his machine name.
> Is there a way that I can block the SQL box only from a specific machine
name?
It's kind of ugly, but you could do TCP/IP filtering on the server level and
block the IP address of the computer that your "SQL user" uses. A better way
would be a review of the security implementation, eliminate this commonly
used account and implement Windows Authentication with nt group membership.
Steve|||Thanks for the reply Steve.
Using TCP/IP Filtering is not an option because of DHCP server. I may use
MAC address but that way that user may not use all the apps in the server.
I
don't want that happen either. I want just SQL server databases access
denied from the PC.
I will work on the whole problem but I need some time and ofcourse runing
several projects, support developers, and admin issues......tough.
Any other suggestions?
SangHun
"Steve Thompson" wrote:

> "SangHunJung" <SangHunJung@.discussions.microsoft.com> wrote in message
> news:F23A84F9-6350-4BE8-B002-62A9BD320BCB@.microsoft.com...
> but
> profile
> name?
> It's kind of ugly, but you could do TCP/IP filtering on the server level a
nd
> block the IP address of the computer that your "SQL user" uses. A better w
ay
> would be a review of the security implementation, eliminate this commonly
> used account and implement Windows Authentication with nt group membership
.
> Steve
>
>|||
> I will work on the whole problem but I need some time and ofcourse runing
> several projects, support developers, and admin issues......tough.
> Any other suggestions?
Yes, I still recommend my previous suggestion, some times there are no
+easy+ solutions. Sorry.
Steve
[vbcol=seagreen]
commonly[vbcol=seagreen]
membership.|||You can use IPSec to block a particular machine from contacting another
machine on the network.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Saturday, February 25, 2012

block a parameter

I have parametro call client, who is a list of clients, taken from the data
base to traves of a query, access the report through the URL, by means of
Internet to explorer, in some cases desire of passing parameter clients
already selected and who the user who is seeing the report cannot modify it,
As blockade the parameter?
--
ING. JOSE DAVID GALVIZ MUÑOZ
MCAD
DCE Tercera EstrellaHi Jose,
You can, either when designing the report or through Report Manager set the
parameter to No prompt. When you do this, the parameter will not be
displayed to the user, so the user will not be able to change the value.
-Lukasz
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"José David Galviz M" <joda_26@.hotmail.com> wrote in message
news:Okp1lnQcEHA.644@.tk2msftngp13.phx.gbl...
>I have parametro call client, who is a list of clients, taken from the data
> base to traves of a query, access the report through the URL, by means of
> Internet to explorer, in some cases desire of passing parameter clients
> already selected and who the user who is seeing the report cannot modify
> it,
> As blockade the parameter?
> --
> ING. JOSE DAVID GALVIZ MUÑOZ
> MCAD
> DCE Tercera Estrella
>|||Thanks
--
ING. JOSE DAVID GALVIZ MUÑOZ
MCAD
DCE Tercera Estrella
"Lukasz Pawlowski [MSFT]" <lukaszp@.online.microsoft.com> escribió en el
mensaje news:O%23bJnl1cEHA.1000@.TK2MSFTNGP12.phx.gbl...
> Hi Jose,
> You can, either when designing the report or through Report Manager set
the
> parameter to No prompt. When you do this, the parameter will not be
> displayed to the user, so the user will not be able to change the value.
> -Lukasz
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "José David Galviz M" <joda_26@.hotmail.com> wrote in message
> news:Okp1lnQcEHA.644@.tk2msftngp13.phx.gbl...
> >I have parametro call client, who is a list of clients, taken from the
data
> > base to traves of a query, access the report through the URL, by means
of
> > Internet to explorer, in some cases desire of passing parameter clients
> > already selected and who the user who is seeing the report cannot modify
> > it,
> > As blockade the parameter?
> >
> > --
> > ING. JOSE DAVID GALVIZ MUÑOZ
> > MCAD
> > DCE Tercera Estrella
> >
> >
>