Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Login in to the Linux Oracle server and access the database using sqlplus in eac

ID: 3711246 • Letter: L

Question

Login in to the Linux Oracle server and access the database using sqlplus in each of the two terminals .Display the SQL commands using: SET ECHO ON for each of the two terminals .To enable manual commit for changes: SET AUTOCOMMIT OFF for each of the two terminals Create transaction1 log file using in 1st terminal: SPOOL 4-FirstLastName-Lab_T1.txt Create transaction 2 log file using in 2nd terminal: SPOOL 4-FirstLastName-Lab_T2.txt . 1. Execute the following statements and observe: Terminal 2 Terminal 1 1 insert into team values (7, Lakers,3, LA,O: 2 3 commit; 4 insert into team values (7, 'Knicks' , 8. 'NY, 0); commit a. (5 points) What happens after step 2 and why? b. (5 points) What happens after step 3 and why?

Explanation / Answer

a. After step 2 the second insert statement in terminal 2 will be executed without any errors because after statement execution we didn't give any commit command anywhere so it doesn't pose any problem for this statement.

b. At step when we click on commit we will get error stating primary key constraint violated because of the same value for the 2 statements.

c. First we are inserting the row into team table from terminal1 it will be successfully executed and inserted but the change is not final because we didn't commit the change.
In the second step we are inserting another row from terminal2 it also successfully inserted without any problem because untill unless we give the commit command from any of the terminal after the insertion on same database it didn't get committed, if it is not committed then it diesn't show the insertions of one terminal into another terminal.
Then in the step3 we are giving commit from terminal1 but it will give an error primary key constraint voilated.
In the step4 also we get the same error because we have same value for the 2 insert statements.

d. At step7 we will get the rows inserted from the terminal1 it doesn't include the rows inserted through terminal2 because we didn't commit the changes.

According to the chegg policy I am allowed to answer 4 parts only. Please post the remaining the as new post

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote