Question: SQL - I do not have permission to create users but I need to write the code as if I did. Scenario: You are the
SQL I do not have permission to create users but I need to write the code as if I did.
Scenario:
You are the database administrator for a company that uses SQL Server. The task is to create a script that automates the process of creating users and setting permissions for them.
Requirements:
Write a TSQL script that connects to the SQL Server database.
The script should create two users: 'user and 'user
Set appropriate permissions for each user:
'user should have readonly access to mydb database. 'user should have read and write access to 'otherdb' database.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
