Professional Documents
Culture Documents
CS-6014 Submitted
CS-6014 Submitted
CS-6014 Submitted
AHEED
Student Signature
Final Exam / Spring 2021 (Paper Duration 24 hours)
(Online Assignment Based Question Paper)
Course No.: CS-601 Course Title: Data Base Administration and Management
Total Marks: 20 Date of Exams:
Degree:BSIT Semester: 6th Section:
Marks
Q.No. 1 2 3 4 5 6 7 8 9 10 Obtained/
Total Marks
Marks
Obtaine
d
Obtained Marks in Words:
Name of the Teacher: HINA UMBRIN
Who taught the course: Signature of Teacher / Examiner:
To be filled by Student
(PRACTICAL EXAMINATION)
and B = 1000,In such cases we can permit the transactions that are trying to access the same
data items in serial order. Or we can permit the transactions as they are if they produce the
same result as a serial execution or not serializable. Prove that with the help of data.
Transaction Transaction T2
T1
read(A);
A := A +500;
write(A);
read(A);
temp := A * 0.2;
A := A + temp;
write(A);
read(B);
B := B + 500;
write(B); read(B);
B := B + temp;
write(B);
Transaction T1 Transaction T2
read(A);
temp := A * 0.2;
A := A – temp;
write(A);
read(B);
B := B + temp;
write(B);
read(A);
A := A+500;
write(A);
read(B);
B := B + 500;
write(B);
(Marks 12)
Answer:
Transaction T1 Transaction T2
read(A); 5000
A: = A +500; 5500
write(A); 5500
read(A); 5500
temp: = A * 0.2; 1100
A: = A + temp; 6600
write(A);6600
read(B); 1000
B: = B + 500; 1500
write(B); 1500 read(B); 1500
B: = B + temp; 2600
write(B);
2600
We perform all the transaction so the value of A, in the end, is 6600 And the value of B, in
the end, is 2600.
Transaction T1 Transaction T2
read(A); 5000
temp: = A * 0.2;
1000
A: = A – temp; 4000
write(A); 4000
read(B);1000
read(A); 4000 B: = B + temp; 2000
A: = A+500; 4500 write(B); 2000
write(A); 4500
read(B); 2000
B: = B + 500; 2500
write(B); 2500
We perform all the transaction so the value of A, in the end, is 6500 And the value of B, in
the end, is 2500.
Results
All the transaction we get to know that the result of both concurrent schedules are not the
same so it is not serializable.
Q.No.2. Write down the different methods for shut down a to shut down the oracle database
(Marks 08)
Answer:
To shut down a database and instance, you must first connect as SYSOPER or SYSDBA.
There are several modes for shutting down a database. These are discussed in the following
sections:
Shutdown Timeout
SHUTDOWN NORMAL
Before the database is shut down, the database waits for all currently connected users to
disconnect from the database.
The next startup of the database will not require any instance recovery procedures.
the IMMEDIATE clause:
SHUTDOWN IMMEDIATE
No new connections are allowed, nor are new transactions allowed to be started, after the
statement is issued.
Any uncommitted transactions are rolled back. (If long uncommitted transactions exist,
this method of shutdown might not complete quickly, despite its name.)
Oracle Database does not wait for users currently connected to the database to disconnect.
The database implicitly rolls back active transactions and disconnects all connected users.
The next startup of the database will not require any instance recovery procedures.
3. Shutting Down with the TRANSACTIONAL Clause
When you want to perform a planned shutdown of an instance while allowing active
transactions to complete first, use the SHUTDOWN command with
the TRANSACTIONAL clause:
SHUTDOWN TRANSACTIONAL
No new connections are allowed, nor are new transactions allowed to be started, after the
statement is issued.
After all transactions have completed, any client still connected to the instance is
disconnected.
At this point, the instance shuts down just as it would when a SHUTDOWN
IMMEDIATE statement is submitted.
The next startup of the database will not require any instance recovery procedures.
A transactional shutdown prevents clients from losing work, and at the same time, does not
require all users to log off.
You can shut down a database instantaneously by aborting the database instance. If possible,
perform this type of shutdown only in the following situations:
The database or one of its applications is functioning irregularly and none of the other types
of shutdown works.
You need to shut down the database instantaneously (for example, if you know a power
shutdown is going to occur in one minute).
You experience problems when starting a database instance.
When you must do a database shutdown by aborting transactions and user connections, issue
the SHUTDOWN command with the ABORT clause:
SHUTDOWN ABORT
No new connections are allowed, nor are new transactions allowed to be started, after the
statement is issued.
Current client SQL statements being processed by Oracle Database are immediately
terminated.
Uncommitted transactions are not rolled back.
Oracle Database does not wait for users currently connected to the database to disconnect.
The database implicitly disconnects all connected users.
Shutdown Timeout
Shutdown modes that wait for users to disconnect or for transactions to complete have a limit
on the amount of time that they wait. If all events blocking the shutdown do not occur within
one hour, the shutdown command cancels with the following message: ORA-01013: user
requested cancel of current operation.