Is there any command to disconnect all the users from the database. I don't want to set it in single user mode.
View Complete Post
We are trying to restore a SQL Server 2005 (all the databases). We have failed with the restore for a couple of times and the vendor says that we have to ensure that all database users are logged off the database. A restore will fail if other users
try to use the database while the restore operation is in
How could this be acomplished. There is no way that we can control if any user or app access the server while we are restoring.
The problem is that when when we are restoring the databases if someone access any of them while the restore is taking place the process fails.
The question is how should the restore be performed? Is there any way to change the state of the database so that the databases can be restored?
I have the following implementation and I'm sure there is an easy way to do what I want to do but I can't figure it out.
1. I use forms based authentication to authenticate to my site
2. I use active directory to authenticate the users
3. I use the Allow Users="xxx" tag to authorize the users limited to the list that can access my site. (e.g.. even though Mary is an AD user she can't access my site unless I put her credentials in the allow users tag in the web.config file)
All is working well but I want to move the users access list (e.g.. <allow users="john" />" from the web.config to a database table so that I can create a user maintenance page for my admins to add and delete user access. For the life of me I can't figure out how to do this and I can't seem to find an article on it either. I'm sure I'm just not looking for the right thing, so help is greatly appreciated.
Here is my web.config file..
<configuration> <connectionStrings> <add name="DBConnectionString" connectionString="Data Source=PRIMSRV;Initial Catalog=MAINDB;Persist Security Info=True;User ID=svc.Test;Password=password
In My WPF application I'm connecting to SQL server 2008 dataBase.
i want to give the users the option to restore the dataBase, when I'm trying to disconnect, and restore, i get the message saying that the restore failed due to the fact that it doesn't exclusive access.
I tried executing the command:
ALTER DATABASE <my db> SET SINGLE_USER with ROLLBACK IMMEDIATE
and now i can't access it at all...
1. how can i kill all the connections to the dataBase for restore?
2. How can i cancel this ALTER command?
I would like to capture the session user names of people connecting to our database and store them in a separate table.
I was hoping I could "create trigger foo on database for logon". But that is only valid for server based triggers. The problem is I know adding a server based trigger might upset some of our database guys so ideally I would like to avoid this option if possible.
Does anyone have any suggestions?
Thanks in advance
hello.. i'm a bit stuck with my project and i hope anyone out there could lend a hand.. im completely new to asp.net so please bear with me.. =)
i have a table in ms access where i have username, password and usertype.. i wanted to use that table so that when i log in, the user with the "admin" usertype will go to the admin page while the user with the "user" usertype will go to the members page.. i can log in so the only issue is how to redirect them to their respective pages.. any help would be appreciated.. =)
If a user is not authorized to see a database canÃÂ I exclude that database from even appearing inÃÂ Management Studio for that user
In SSMS, a database user is showing up as disabled (a down reddish arrow). When I look at the server login - it shows that it is a valid login to the instance. I go to Login Properties and then click User Mapping on the GUI and check the particular
database to add/enable this user to a Role. However, no luck. It still shows the user as disabled. The user cannot connect to the database. This is in SQL Server 2005, EE64.
Can someone please help? - Thanks.
how-to: needed for a security audit
System-Generated List of Users with write-access to the SQL database, showing full names and user IDs