What T-SQL code should you use?

You work as a database administrator at ABC.com. ABC.com is using two SQL Server 2008
sample named ABCSmp1 and ABCSmp2. Furthermore, ABCSmp1 contains a database named
ABC_DB. A ABC.com user named Mia Hamm uses her logon MiaHamm to log on to the database
on ABCSmp1. During the week you have transferred ABC_DB to ABCSmp2. You manually
recreate the Mia Hamm login on ABCSmp2. However, when she tries to login on ABC_DB at
ABCSmp2, she received an error message stating that she is not allowed access. Mia Hamm
needs to access ABC_DB and you need to make it happen.
What T-SQL code should you use? (Each correct option is part of the answer. Choose TWO)

You work as a database administrator at ABC.com. ABC.com is using two SQL Server 2008
sample named ABCSmp1 and ABCSmp2. Furthermore, ABCSmp1 contains a database named
ABC_DB. A ABC.com user named Mia Hamm uses her logon MiaHamm to log on to the database
on ABCSmp1. During the week you have transferred ABC_DB to ABCSmp2. You manually
recreate the Mia Hamm login on ABCSmp2. However, when she tries to login on ABC_DB at
ABCSmp2, she received an error message stating that she is not allowed access. Mia Hamm
needs to access ABC_DB and you need to make it happen.
What T-SQL code should you use? (Each correct option is part of the answer. Choose TWO)

A.
Use ABC.com;

B.
Use ABC_DB; *

C.
Use ABCSmp1;

D.
Use ABCSmp2;

E.
ALTER LOGIN MiaHamm WITH DEFAULT_DATABASE = ABC_DB;

F.
CHANGE LOGIN MiaHamm WITH DEFAULT_DATABASE = ABC_DB;

G.
ALTER LOGIN MiaHamm WITH PASSWORD = ‘pwd1234’ UNLOCK;

H.
CHANGE LOGIN MiaHamm WITH PASSWORD = ‘pwd1234’ UNLOCK;

I.
CHANGE USER MiaHamm WITH LOGIN = MiaHamm;

J.
ALTER USER MiaHamm WITH LOGIN = MiaHamm; *
K.
ALTER LOGIN MiaHamm ENABLE;
L.
CHANGE LOGIN MiaHamm ENABLE;

Explanation:



Leave a Reply 0

Your email address will not be published. Required fields are marked *