0% found this document useful (0 votes)
9 views2 pages

DBMS Assignment 4 Writeup

The document outlines the commands for Data Control Language (DCL) and Transaction Control Language (TCL) in database management. DCL commands include user creation, privilege assignment, and revocation, while TCL commands focus on managing transactions with commit, rollback, and savepoint functionalities. Syntax for each command is provided to facilitate understanding and execution.

Uploaded by

Saba kudchiwale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views2 pages

DBMS Assignment 4 Writeup

The document outlines the commands for Data Control Language (DCL) and Transaction Control Language (TCL) in database management. DCL commands include user creation, privilege assignment, and revocation, while TCL commands focus on managing transactions with commit, rollback, and savepoint functionalities. Syntax for each command is provided to facilitate understanding and execution.

Uploaded by

Saba kudchiwale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Assignment-4

Execute DCL TCL Commands

DCL:
DCL is Data control Language which includes the command used by DBA for user
creation, assigning or removing privileges.
1. Create a user
Syntax:
Create user <user_name> identified by <assign a Password>
2. Display Usernames
Syntax:
Select username from DBA_users;
3. To display privileges of a specific user
Syntax:
Select * from DBA_sys_privs
Where grantee=<user>;
4. To Assign Privilege to User
Syntax:
grant <privilege> to <user>;
5. To Revoke privilege
Syntax:
Revoke <privilege> from <users>;

TCL:
Transaction control language:- These commands are basically used for managing and
controlling the transactions in a database.
A set of SQL statements executed on the data stored in the DBMS is known as a
transaction. Following commands are used to control transactions.
a) Commit: This command helps a user to save a given transaction into the database
permanently. When using a DML command like DELETE, UPDATE or INSERT the alterations
made are not permanent until one closes the current session.
Meaning ,the changes can rollback if one does ‘t store data permanently. Thus, to avoid it we
use the commit command. It makes these changes permanent.
Syntax:
COMMIT;
b) Rolback: This command restores the database to the last committed restores
the database to the last committed state or to the specified Savepoint.
Syntax:
1. ROLLBACK;
 Restores the database to the last commit;
2. ROLLBACK to Savepoint name
 Restores the database to the specified Savepoint.
c) Savepoint: This command helps in saving a database state temporarily. So that a user can
easily rollback to that point as and when required.
Syntax:
SAVEPOINT <Savepoint_name>
EX: SAVEPOINT A;

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy