0% found this document useful (0 votes)
54 views15 pages

Lab 6 Oracle Database Administration

The document provides a comprehensive guide on managing Oracle databases, specifically versions 19c and 21c, including setup, user management, and backup procedures. It details the roles and permissions for users, as well as the process for creating and deleting tables and users. Additionally, it covers the use of Oracle SQL Developer and best practices for database backups and recovery.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views15 pages

Lab 6 Oracle Database Administration

The document provides a comprehensive guide on managing Oracle databases, specifically versions 19c and 21c, including setup, user management, and backup procedures. It details the roles and permissions for users, as well as the process for creating and deleting tables and users. Additionally, it covers the use of Oracle SQL Developer and best practices for database backups and recovery.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Quản trị cơ sở dữ liệu Oracle database

Mục lục
I. Prepare: .............................................................................................................................. 2
1. Oracle database 19c/21c: ............................................................................................... 2
2. Oracle SQL developer .................................................................................................... 2
II. Oracle database administrator .......................................................................................... 2
1. Set up database:............................................................................................................. 2
2. Create and delete table .................................................................................................. 6
3. Create and delete user ................................................................................................... 8
4. User Role ...................................................................................................................... 11
5. Custom roles ................................................................................................................ 13
6. Backups and recovery ................................................................................................. 15
I. Prepare:
1. Oracle database 19c/21c:
Oracle Database is a relational database management system (RDBMS) developed and
marketed by Oracle Corporation. It is designed to store, manage, and retrieve large
amounts of data efficiently and securely. The numbers "21c" and "19c" refer to specific
versions of the Oracle Database software.
[Link]
[Link]
[Link]
[Link]

2. Oracle SQL developer:


Oracle Developer is a suite of development tools provided by Oracle Corporation to
build applications that interact with Oracle Databases. It consists of various components
and frameworks that simplify the development process.
[Link]
nologies/download/

II. Oracle database administrator:


1. Set up database:

Create connection
Create user system as a DBA database admin pass “123456”
Click test to check
Status: Success

Click save and close the tab

Right-click to connect
Enter password user system “123456


2. Create and delete table
Create table ABC

Click on table ABC to check

Drop table
3. Create and delete user
You cannot create users or roles without “C##” before the user

Because when opening, oracle will default its container to root, to create it directly must
add c##, notation for normal users

You can use this code to bypass it

*Warning: Setting undocumented parameters like this (as indicated by the leading
underscore) should only be done under the direction of Oracle Support. Changing such
parameters without such guidance may invalidate your support contract. So do this at
your own risk.
Now you can create user without “C##”

Drop user
4. User Role
Grant <role> to <user>

CONNECT: The CONNECT role provides basic privileges necessary for a user to connect to the
database.

RESOURCE: The RESOURCE role is typically used for regular users who need to create and
manage database objects such as tables, views, procedures and trigger.

DBA: The DBA (Database Administrator) role is a powerful role that has extensive privileges for
managing the entire database.
Show roles of a user
5. Custom roles
Create custom role

Grant function to the role (This role will let user command queries ABC table)

Grant role to user


Check user roles

Drop custom role


6. Backups and recovery
Open cmd

Connect to an Oracle database with “connect target” command.

To perform a full database backup use: (In this example I use this command)
RMAN> BACKUP DATABASE;
To backup all archived logs (archived redo log) use:
RMAN > ARCHIVELOG BACKUP ALL;
To back up the database and all archived log files (archived redo log) use:
RMAN> REDUCTION DATABASE PLUS ARCHIVELOG;
You will hit these errors
Now try to shutdown immediate

And startup again

Now you can backup normally


This command will auto recovery your database

You might also like