Showing posts with label prevent. Show all posts
Showing posts with label prevent. Show all posts

Friday, March 30, 2012

Restrict remote admin

Hello,
Is it possible to restrict remote admin of SQL Server? I
would like to prevent anybody with Enterprise Manager on
their workstation from connecting and accessing the
databases.
Ideally I would like to prevent all Enterprise Manager
access except from the server using the local Enterprise
Manager.
Is this possible. I could not find anything on MS
knowledge base about this.
Thanks"AL" <anonymous@.discussions.microsoft.com> wrote in message
news:a5f101c3eb6e$90c6bf60$a401280a@.phx.gbl...
quote:

> Is it possible to restrict remote admin of SQL Server? I
> would like to prevent anybody with Enterprise Manager on
> their workstation from connecting and accessing the
> databases.
> Ideally I would like to prevent all Enterprise Manager
> access except from the server using the local Enterprise
> Manager.
> Is this possible. I could not find anything on MS
> knowledge base about this.

By remote admin, do you mean someone with sysadmin rights on SQL Server, or
someone with admin rights on the server? The former you can't prevent,
unless you deny access to the server itself.
If the latter, be sure you are using Windows Authentication, secure your SQL
Server logins and database permissions. You can add your own custom group in
SQL Server assign sysadmin rights to that group, place a strong password on
the sa account, finally remove the builtin\administrators group.
Stevesql

restrict local cube

Does anyone know how can we prevent users from creating offline/local cube (in Excel) from our OLAP/Analysis Service server ?
Thank you.I'm almost certain that this isn't possible. There are ways that you can make it a bit more difficult, but those will only annoy your users.

If you find some way to do this, please let me know how you went about it.

-PatP|||Deny them access to the cubes ?|||Deny them access to the cubes ?
No, users still allowed to perform live access but must be prevented from creating local (offline) cube which they can bring home.

I'm aware of a new property introduced on SQL 2000 SP3a named RESTRICTED CLIENT but not sure if it has anything to do with our need nor how to set it up.sql

Restrict Key to SA only in SQL 2005

I have data that I want to encrypt and have the key avaiable to SA
users only. How can I revoke (or prevent) DBO from using the key? I
tried
deny view definition on symmetric key::SSKey to dbo
and got...
Cannot grant, deny, or revoke permissions to sa, dbo,
information_schema, sys, or yourself.
Any suggestions?
JimYou can have SA be the only dbo in that database or you can protect the key
with a password that is only known to SA and is the only encryption method
for the key.
Laurentiu Cristofor [MSFT]
Software Design Engineer
SQL Server Engine
http://blogs.msdn.com/lcris/
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jim Youmans" <jdyoumans@.gmail.com> wrote in message
news:1147976354.347670.55540@.i40g2000cwc.googlegroups.com...
>I have data that I want to encrypt and have the key avaiable to SA
> users only. How can I revoke (or prevent) DBO from using the key? I
> tried
> deny view definition on symmetric key::SSKey to dbo
> and got...
> Cannot grant, deny, or revoke permissions to sa, dbo,
> information_schema, sys, or yourself.
> Any suggestions?
> Jim
>

restrict deletion

What would be the best practice to prevent users who didn't create a record in sql from deleting? When a record is created I have the username who created the record in one of the fields. I was thinking maybe a query?

Thank you in advance.

I have used same practice.|||Thank you Javier.|||

Hi fpena,

You can just compare the username again to the current user to see if he is the owner of this record. If yes, delete it. All this can be done in a single stored procedure.

HTH. If this does not answer you question, please feel free to mark it as Not Answered and post your reply. Thanks!

|||could you point me on the right direction? Thank you.|||

Hi fpena,

You can use a single sentence to achieve that. Assume that there is a field in the table named RecordOwner, and your stored procedure passes in a parameter named @.Deleter. You can use

DELETE FROM Table1 WHERERowID=@.RowID ANDRecordOwner=@.Deleter

You can check the AffectedRows in your code. If it is 0, it means that the row does not exist or the deleter is not the owner, so that he cannot delete it.

|||i'm not sure i can accomplish what i'm looking for with that. i have a gridview visible to everyone all records visible no matter what userID owns the record what i'm trying to do is prevent a user who doesn't own a record from deleting when trying to delete. hope my question is clear enough. Thank you.|||

Hi fpena,

I'm sure that this will do what you need. You just need to modify the delete command you're currently using to check the ownership info.

If you have any questions on how to do this, please feel free to reply to my post.

|||

how is it done?

Wednesday, March 28, 2012

Restrict certain characters in varchar column

Hi - Is it possible to restrict the domain of a varchar column to
prevent certain chatracters being accepted. I want to prevent commas.
ThanksYou could use a check constraint:
alter table <table>
add constraint <constraint name>
check (patindex('%,%', <column> ) = 0)
go
ML
http://milambda.blogspot.com/|||hals_left (cc900630@.ntu.ac.uk) writes:
> Hi - Is it possible to restrict the domain of a varchar column to
> prevent certain chatracters being accepted. I want to prevent commas.
ALTER TABLE tbl ADD CONSTRAINT nocommas CHECK col NOT LIKE '%,%'
Then again, this sounds like a somewhat strange business rule. Semicolons,
periods, colons etc are OK, but not commas? What is the real story?
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||>What is the real story?
When I pass CSV strings to a stored proc, a comma inside a value causes
a problem.
I will re-write the split code to use some other character|||Dejan Sarka posted a very nice function that you might find use for:
http://solidqualitylearning.com/blo.../10/22/200.aspx
ML
http://milambda.blogspot.com/sql