Question

In: Computer Science

For the following commands you must be logged in as user “system”. You will need to...

For the following commands you must be logged in as user “system”. You will need to do some research on the commands CREATE USER; GRANT CREATE SESSION; GRANT CREATE…..; GRANT ALTER …., GRANT SELECT….; REVOKE ……; and EXECUTE …..

5. Create two database users:  The first is a concatenation of your first and last name (e.g. johndoe).  The second is a concatenation of your instructors first and last name (e.g. sallysmith)

6. Assign the two users privileges to connect to the database.

7. Assign the user with your first and last name the privilege to select data from the employees table.

8. Assign the user with your instructors first and last name all privileges to the Departments table.

9. Assign the user with your first and last name the privilege to execute any procedure.

10. Take away the instructors privilege to execute any SQL commands on the Departments table

Solutions

Expert Solution

5. Create User command is:

CREATE USER '<user-name>'@'<sql-server-address>' IDENTIFIED BY '<password>'

Example: Assuming SQL server is installed on your own computer i.e. local host otherwise use server IP address.

CREATE USER 'johndoe'@'localhost' IDENTIFIED BY 'abc1234'

CREATE USER 'sallysmith'@'localhost' IDENTIFIED BY 'xyz4321'

6.

GRANT CONNECT ON DATABASE <db_name> TO user;

Example:         (You must knows the database name. This you can done by typing select db_name(). Exact command may vary depending upon the database you are using.)

GRANT CONNECT ON DATABASE test TO johndoe;

GRANT CONNECT ON DATABASE test TO sallysmith;

7.

GRANT SELECT ON TABLE <table-name> TO <user-name>

Example:

GRANT SELECT ON TABLE employees TO johndoe

8.

GRANT ALL PRIVILEGES ON TABLE <table-name> TO <user-name>

Example:

GRANT ALL PRIVILEGES ON TABLE Departments TO sallysmith

9.

GRANT EXECUTE ON PROCEDURE *.* TO <user-name>

Example:

GRANT EXECUTE ON PROCEDURE *.* TO johndoe

10.

REVOKE ALL PRIVILEGES ON TABLE <table-name> FROM <user-name>

Example:

REVOKE ALL PRIVILEGES ON TABLE Departments FROM sallysmith


Related Solutions

Simulate a problem with undo. You will need to be connected as user SYSTEM or some...
Simulate a problem with undo. You will need to be connected as user SYSTEM or some other user to whom you have granted the DBA role. . Create an undo tablespace with a single datafile of only 200 KB. Do not set the file to autoextend. . Set the database to use this small undo tablespace. Confirm that an undo segment has been created in this tablespace and that it is online by querying the views DBA_ROLLBACK_SEGS and V$ROLLSTAT. Why...
User ADT: Describes and manipulates user information. You must track the following information about a user / provide the following methods:
• User ADT: Describes and manipulates user information. You must track the following information about a user / provide the following methods:o usernameo firstNameo lastNameo a list of the 10 most recently purchased itemso A user can bid on and purchase ItemsThe User class should have a default constructor, as well as one accepting all parameters. It should also provide accessor (getter) and mutator (setter) methods for appropriate methods. By default, a user is able to buy products only (not...
List and explain the system activites that are required to be logged to ensure compliance with...
List and explain the system activites that are required to be logged to ensure compliance with the Sarbanes Oxley Act of 2002. this is for an Information Systems Security class required for Accounting major
Need this program in python. The data must be taken from user as input. Write a...
Need this program in python. The data must be taken from user as input. Write a program that prompts the user to select either Miles-to-Kilometers or Kilometers-to-Miles, then asks the user to enter the distance they wish to convert. The conversion formula is: Miles = Kilometers X 0.6214 Kilometers = Miles / 0.6214 Write two functions that each accept a distance as an argument, one that converts from Miles-to-Kilometers and another that converts from Kilometers-to-Miles The conversion MUST be done...
You must prompt the user to enter a menu selection. The menu will have the following...
You must prompt the user to enter a menu selection. The menu will have the following selections (NOTE: all menu selections by the user should not be case sensitive): 1. ‘L’ – Length a. Assume that a file containing a series of names is called names.txt and exists on the computer’s disk. Read that file and display the length of each name in the file to the screen. Each name’s middle character or characters should be displayed on a line...
What is required by Sarbanes-Oxley (SOX) to be logged? Or Describe the system processes executed and...
What is required by Sarbanes-Oxley (SOX) to be logged? Or Describe the system processes executed and data collected in the process of logging an event.
Write a python program that will allow a user to draw by inputting commands. The program...
Write a python program that will allow a user to draw by inputting commands. The program will load all of the commands first (until it reaches command "exit" or "done"), and then create the drawing. Must include the following: change attributes: color [red | green | blue] width [value] heading [value] position [xval] [yval] drawing: draw_axes draw_tri [x1] [y1] [x2] [y2] [x3] [y3 draw_rect [x] [y] [b] [h] draw_poly [x] [y] [n] [s] draw_path [path] random random [color | width...
A successful new user registration requires the following valid data: ⦁   User name: it must start...
A successful new user registration requires the following valid data: ⦁   User name: it must start with a letter and consist of only letters and digits without any space character. User name is case insensitive. Different users must have different user names. ⦁   Password: it must have at least six characters, consist of only letters, digits, and special characters (@, #, $, ^, &), and at least one upper-case letter, one lower-case letter, one digit, and one special character. ⦁  ...
What would these commands look like in Kali Linux? In Kali Linux: a) Create a user...
What would these commands look like in Kali Linux? In Kali Linux: a) Create a user (username= YOUR-FIRSTNAME). b) Create a file (filename=test) and use chmod command to add the write permission for Others. c) Use setfacl to remove write permission to YOUR-FIRSTNAME user. Use getfacl to check the file's permissions. d) Remove YOUR-FIRSTNAME user. Deliverable(Screenshots from each section if possible please)
The following jobs are waiting to be processed at the same machine center. Jobs are logged...
The following jobs are waiting to be processed at the same machine center. Jobs are logged as they arrive: A 313 8 B 312 16 C 325 40 D 314 5 E 314 3 In what sequence would the jobs be ranked according to the following decision rules: (a) FCFS, (b) EDD, (c) SPT, and (d) LPT? Which decision is best and why? All dates are specified as manufacturing planning calendar days. Assume that all jobs arrive on day 275.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT