Re: Set Restricted_User
From: Sue Hoegemeier (Sue_H_at_nomail.please)
Date: 11/10/04
- Next message: Yaron: "Change password to sa user from remote client"
- Previous message: Sue Hoegemeier: "Re: Overlapping Permissions"
- In reply to: Eric: "Set Restricted_User"
- Next in thread: Eric: "Re: Set Restricted_User"
- Reply: Eric: "Re: Set Restricted_User"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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?
>
- Next message: Yaron: "Change password to sa user from remote client"
- Previous message: Sue Hoegemeier: "Re: Overlapping Permissions"
- In reply to: Eric: "Set Restricted_User"
- Next in thread: Eric: "Re: Set Restricted_User"
- Reply: Eric: "Re: Set Restricted_User"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|