For more information, see Create a Login. Once you're successfully connected to SQL Server, you can change your default database to a different one that's currently available in the General page of login's properties in SSMS. If the login is a member of the sysadmin role, enter master, and select Connect to establish a connection to SQL Server. Under Connection Properties, modify the Connect to database value using one of the following options: On Object Explorer, select Connect > Database Engine. Open SQL Server Management Studio (SSMS). If you don't need to access the currently configured default database and you just need to connect to the SQL Server instance for other operations using SQL Server Management Studio (SSMS), follow these steps: You can take one of the following actions: Work around the issue The default database is part of a database mirror.Īdditionally, the login account may be a member of multiple groups, and the default database for one of those groups is unavailable at the time of connection.įor more information about database users in SQL Server, see Create a Database User.The default database is set to an EMERGENCY state.The default database is set to a RESTRICTED_USER state.The default database has been detached.The default database is in single-user mode, and the only available connection is already used by someone or something else.The default database is in suspect mode. The default database may be unavailable at the time of connection for the following reasons: (For example, this can happen if the user is inadvertently added to a db_denydatareader fixed database role.) The mapped user for the login has been denied access.You assigned a default database to the login but didn't create a user mapping in the specified database.The login doesn't have a corresponding mapped user in its default database.Permission issues can be one or more of the following: The SQL Server login was unable to connect to SQL Server, either due to permission issues with a database user associated with the login in the default database, or a problem with its default database.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |