0% found this document useful (0 votes)
66 views4 pages

Kishan 2

The document discusses how to create and manage database users in Oracle including creating and altering users, assigning tablespaces and quotas, granting and revoking privileges like creating tables and sessions, and performing transactions with commands like commit and rollback. Key points covered include the syntax for creating users, altering users, granting privileges, and revoking privileges from users as well as concepts like default and changing tablespaces, quotas, and manual versus dynamic data insertion.

Uploaded by

Nabaraj Tiwari
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)
66 views4 pages

Kishan 2

The document discusses how to create and manage database users in Oracle including creating and altering users, assigning tablespaces and quotas, granting and revoking privileges like creating tables and sessions, and performing transactions with commands like commit and rollback. Key points covered include the syntax for creating users, altering users, granting privileges, and revoking privileges from users as well as concepts like default and changing tablespaces, quotas, and manual versus dynamic data insertion.

Uploaded by

Nabaraj Tiwari
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/ 4

User Creation:

Create User:
Purpose: Use the CREATE USER statement to create and configure a database user,
which is an account through which we can log into the database, and establish the
means by which Oracle Database permits access by the user. We can enable a user to
connect to the database through a proxy application or application server.
Syntax: create user username identified by password

Alter User:

Purpose: Use the ALTER USER statement:


• To change the authentication or database resource characteristics of a database
user
• To permit a proxy server to connect as a client without authentication
Syntax: alter user username

Tablespace Clause and Quota:


Purpose: Use this clause to assign or reassign a tablespace for the user’s permanent
segments. This clause overrides any default tablespace that has been specified for the
database.
Assigning a quota does two things:
• Users with privileges to create certain types of objects can create those objects
the specified tablespace.
• Oracle limits the amount of space that can be allocated for storage of a user’s
objects within the specified tablespace to the amount of the quota.

Default Tablespace:-
Oracle comes with the following default tablespaces: SYSTEM, SYSAUX, USERS, UNDOTBS1,
and TEMP.

Change Default Tablespace:-


Change Quota:

Grant Session:
Purpose: Use the GRANT statement to grant:
• System privileges to users and roles.
• Roles to users and roles. Both privileges and roles are either local, global, or
external.
• Object privileges for a particular object to users, roles and PUBLIC.
Session grant has not been given to user Kishan1.

Grant is given from System.

After granting Session previlage.

Grant Create Table:


To create a new table in our schema, we must have the CREATE TABLE system
privilege. To create a table in another user’s schema, we must have the CREATE ANY
TABLE system privilege. Additionally, the owner of the table must have a quota for the
tablespace that contains the table, or the UNLIMITED TABLESPACE system privilege.
Create tables using the SQL statement CREATE TABLE.
Creating table from user privileges is not given to user.

Giving privilege to user to create table from System.


Table created after giving Grant.

Manual Insertion:

Dynamic Insertion:
Dynamic insertion is the insertion of a new valid combination into a combinations table
from a form other than the combinations form. If we allow dynamic inserts when we set
up our key flex field, a user can enter a new combination of segment values using the
flex filed windows from a foreign key form. Assuming that the new combination satisfies
any existing cross-validation rules, the flex field inserts the new combination into the
combinations table, even through the combinations table is not the underlying table for
the foreign key form.

Revoke:
Use the REVOKE statement to remove privileges from a specific user or role, or from all
users, to perform actions on database objects. We can also use the REVOKE statement
to revoke a role from a user, from PUBLIC, or from another role.
The following types of privileges can be revoked:
• Delete data from a specific table.
• Insert data into a specific table.
• Create a foreign key reference to the named table or to a subset of columns from
a table.
• Select data from a table, view, or a subset of columns in a table.
• Create a trigger on a table.
• Update data in a table or in a subset of columns in a table.
• Run a specified routine (function or procedure).
• Use a sequence generator or a user-defined type.

Table Revoke:

Session Revoke:
Commit:

Rollback:
Purpose: Use the ROLLBACK statement to undo work done in the current transaction or
to manually undo the work one by an in-doubt distributed transaction.
Syntax: rollback;

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