Re: Set Restricted_User

From: Sue Hoegemeier (Sue_H_at_nomail.please)
Date: 11/10/04


Date: Wed, 10 Nov 2004 10:27:44 -0700

And the difficulty you are having is what exactly? What is
the error? Does the database go into restricted_user mode?
Are you closing the connection after you execute the
statement?
On a side note, if you are doing this with an login that is
a sysadmin, you don't need to add that login to db_owners.
Sysadmins can access a database that is in restricted_user
mode.

-Sue

On Tue, 9 Nov 2004 19:52:01 -0800, "Eric"
<Eric@discussions.microsoft.com> wrote:

>Hi there,
>
>I'm having difficulty trying to lock a databse so as to prevent people from
>logging in, and at the same time, not logging myself out. The following
>statement allows me to lock the db, however, it also logs me out at the same
>time.
>
>Alter Database dbname Set Restricted_User With Rollback Immediate
>
>I have created a separate executable through VB that locks and unlocks, and
>is executed from within another application. This application uses the SQL
>Server as the backend. I need to log into the application first using a
>system admin account that also has db_owner rights, and then perform locking,
>and still remain logged into the db.
>
>Using the statement above, the db_owner will still have access to the db,
>but how do I ensure that the statement does not log me out as soon as I
>execute it?
>



Relevant Pages

  • Re: Cross-database execution permissions with certificates and sch
    ... activated user cannot access objects in other schemas in this database. ... injection is defended against, however, the threat exists anywhere EXECUTE ... CREATE USER dispatcher ... the certificate is a trusted authenticator because you granted AUTHENTICATE ...
    (microsoft.public.sqlserver.security)
  • Re: Execute Persmission denied on object sp_OACreate
    ... SQL Server doesn't check permissions on indirectly referenced objects as ... You can prevent ad-hoc execution of powerful master database procs while ... >I have a user who has execute permissions on a store procedure in a>database> which in turns executes 4 stored procedures in the master database. ...
    (microsoft.public.sqlserver.security)
  • Re: SQLCE performance from .NET CF v2.0
    ... Please remember when bulk inserting is being executed against SQL CE, ... > local database functionality. ... > database technology and I am considering switching to SQLCE at the same ... > execute the prepared statement again. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: CFS: some bad numbers with Java/database threading
    ... execute multiple queries on the same data, ... workload is "pathological". ... lock-less algorithms (like variations on optimistic locking) because ... if the locking is implemented using database ...
    (Linux-Kernel)
  • Re: Business objects, subset of collection
    ... SQL only works when the statements are ... all items (invoices) are subscribing for events. ... all items and all items has to execute the criteria evaluation, ... The features of a OO database is basically the same as of a network ...
    (comp.object)

Quantcast