Skip to main content

Posts

Showing posts from September, 2015

SQL Server Database in Single User Mode

In SQL Server, some times the database is put into the Single User Mode for different reasons and it will appear like: YourDatabaseName (Single User) In order to get it into multi user mode, we can use the following command: Use Master Alter database set Multi_user In case we get an error of "Database currently in use". Then we can use the following command to kill the connections and run the above command again. exec sp_who We need to find the spid of the database for which we want the multiuser mode. Use the following command to kill that process: kill After the above command, we can run the command: Alter database set Multi_user The database will be in the multiuser state. Just refresh the whole SQL Server Browser Tree. Update: Even after trying out the steps given above, if the database is not restored, use the following commands: a. Put the database in offline mode. alter database set offline with rollback immediate b. No

SQLServer Error: 15404, Could not obtain information about Windows NT group/user Error code 0x5. [SQLSTATE 42000] (ConnIsLoginSysAdmin)

If we encounter this error "SQLServer Error: 15404, Could not obtain information about Windows NT group/user Error code 0x5. [SQLSTATE 42000] (ConnIsLoginSysAdmin)" in SQL Server in which the job fails because of the user account related problem, then we need to take the following steps to make it work: a. Go to SQL Server Agent. b. Then select the job which is giving error and not running successfully. c. Then choose properties and in the General Tab, change the owner to "SA" or any account that has the administrative privileges. The problem will be resolved.