MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What happens when a login does not have access to its default database and is used to open a connection to a SQL Server instance?
A
The login can connect to SQL Server, but an error message is reported.
B
The login cannot connect to SQL Server.
C
The login is automatically disabled.
D
The login is automatically granted access to its default database.Answer
Explanation: 

Detailed explanation-1: -occurs when the user does not specify the database for connection and the default database is not available. Resolve this error by establishing connection to an instance of SQL Server. In most cases, the connectivity is not available, the SQL server remains inaccessible thereby increasing database downtime.

Detailed explanation-2: -This error will occur if your Windows Username is the same as the computer name on your machine. Microsoft SQL Server will not install if they are the same.

Detailed explanation-3: -When a user connects with a specified login name and password from a non-trusted connection, SQL Server performs the authentication itself by checking to see if a SQL Server login account has been set up and if the specified password matches the one previously recorded.

Detailed explanation-4: -The SQL Server error “Failed to Open the Explicitly Specified Database” indicates that you specified the wrong database name in the connection string or do not have permission to access the specified database.

Detailed explanation-5: -login can be an existing SQL Server login or a Windows user or group. If a login for the Windows user or group does not exist in SQL Server, it is automatically added. [ defdb = ] ‘database’ Is the name of the new default database. database is sysname, with no default.

There is 1 question to complete.