Creates a user-defined database role named orderentry

Assignment Help Database Management System
Reference no: EM131066989

Lab Assignment

Exercise

1. Write a script that creates a user-defined database role named OrderEntry in the MyGuitarShop database. Give INSERT and UPDATE permission to the new role for the Orders and OrderItems table. Give SELECT permission for all user tables.

2. Write a script that (1) creates a login ID named "RobertHalliday" with the password "HelloBob"; (2) sets the default database for the login to the MyGuitarShop database; (3) creates a user named "RobertHalliday" for the login; and (4) assigns the user to the OrderEntry role you created in exercise 1.

3. Write a script that uses dynamic SQL and a cursor to loop through each row of the Administrators table and (1) create a login ID for each row in that consists of the administrator's first and last name with no space between; (2) set a temporary password of "temp" for each login; (3) set the default database for the login to the MyGuitarShop database; (4) create a user for the login with the same name as the login; and (4) assign the user to the OrderEntry role you created in exercise 1.

4. Using the Management Studio, create a login ID named "RBrautigan" with the password "RBra9999," and set the default database to the MyGuitarShop database. Then, grant the login ID access to the MyGuitarShop database, create a user for the login ID named "RBrautigan", and assign the user to the OrderEntry role you created in exercise 1.

Note: If you get an error that says "The MUST_CHANGE option is not supported", you can deselect the "Enforce password policy" option for the login ID.

5. Write a script that removes the user-defined database role named OrderEntry. (Hint: This script should begin by removing all users from this role.)

6. Write a script that (1) creates a schema named Admin, (2) transfers the table named Addresses from the dbo schema to the Admin schema, (3) assigns the Admin schema as the default schema for the user named RobertHalliday that you created in exercise 2, and (4) grants all standard privileges except for REFERENCES and ALTER to RobertHalliday for the Admin schema.

Attachment:- Attachments.rar

Reference no: EM131066989

Questions Cloud

Create method called left that accepts a array of characters : Create a method called left that accepts an array of characters and the number of characters to return.
Summarise the impact of the interventions : Discuss the impact of TWO successful public health primary prevention interventions. You are expected to: briefly introduce the issue, population and population group; describe the interventions, summarise the impact of the interventions
Synthesize articles that focus on the question : In units 3 and 4, you will be asked to synthesize articles that focus on the question, "should the college athlete get paid?" Please watch this video from the CNN show Crossfire and respond to the following reflection:
Content to be understandable by your audience : 1. Mention and fully explain 4 ways that you can get a better attention from your audience during a speech. 2. Explain how can you as a presenter (say in your video) organize its content to be understandable by your audience.
Creates a user-defined database role named orderentry : Write a script that creates a user-defined database role named OrderEntry in the MyGuitarShop database. Give INSERT and UPDATE permission to the new role for the Orders and OrderItems table. Give SELECT permission for all user tables.
Brief opening scene : The purpose of the scene will be to clue the audience that this will be a modernist movie. Explain your ideas about what you would include in this brief opening scene.
Different cultures and times : Why is Austen's novel still so popular, with people returning to the story and adapting it to different cultures and times? What is it about her characters, their relationships, and her writing that has enduring resonance? Offer compelling reasons..
What is the magnitude of the friction force : what is the magnitude of the friction force opposing the motion of the block?
How the sensors and microprocessor interact to detect : A burglar alarm system uses pressure sensors and acoustic (sound) sensors to detect the presence of an intruder. A microprocessor is used to monitor and control the whole system. A keypad is used to key in a 4-digit PIN that either activates or d..

Reviews

Write a Review

Database Management System Questions & Answers

  Fundamentals of data transmission

Radio and Microwave transmission, Satellite Communication. Introduction to Data communication: Fundamentals of data transmission, Channel speed and bit rates, Bandwidth, digital and analog signals, Asynchronous and Synchronous Transmission, Modula..

  Determine the names of all tracks from table

All primary keys are underlined. All foreign keys have same name as primary key that they are referencing. Determine the names of all Tracks which are more than 10 minutes (600,000 ms) long.

  Create an oracle database

Populate your database with at least 3 rows of data and import your IDEF1X diagram into Oracle and create the appropriate tables and relationships.

  Discuss the importance of structured analysis

Context Diagram and Diagram 0 DFD/ Structured Analysis, Please also discuss the importance of structured analysis

  What is a subquery and when is it used

What is a subquery? When is it used? Does the RDBMS deal with subqueries any differently from normal queries? Illustrate with examples different types of sub-query and co-related subqueries (nested etc).

  Highest average mark

Write a program to calculate and store the average obtained by 20 pupils in 7 subjects. Output the pupil that made the highest average mark in addition to those pupils making 50 marks and over.

  Given the following sample database diagram do the

given the following sample database diagram do the followingcreate the needed tables in the sql server environment just

  Include what database software are used

When this would be a potential issue in your memorandum, eliminate details or modify information so as not to violate these rules

  Explain steps of process in increasing cardinalities

When increasing cardinalities from 1:N to N:M, which of the given steps are included in process the order of steps listed below is not relevant, only steps themselves?

  Computer literacy and information literacy

Use the Internet or the Strayer Library to research one (1) concept in information systems that you have studied in this course. You may select a topic of your choice or you may use one (1) of the following:

  Write names and e-mail addresses showing foreign key columns

Illustrate all the data in each of four tables. Don't show foreign key columns. Write down the names and e-mail addresses for all customers who have had stove repair which cost more than $50.

  Database normalization solution

Database Normalization Solution

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd