DBA Report
DBA Report
LAB REPORT
of
Database Administrator
(BIT 352)
Submitted to
Bachelor in Information Technology(BIT)
Department of Science & Technology
Thakur Ram Multiple Campus, Birgunj
Submitted by
Name: - PRAKASH KUMAR GIRI
Symbol No:- 783/078
Year:- 2081
BIT 6th Semester
Objective: The objective of this lab is to install and configure Oracle Database 19c on a local machine.
Equipment/Tools Required:
2. Internet connection
Procedure:
• Once the download is complete, navigate to the directory where the downloaded file is located.
• Extract the installation files from the downloaded archive to a directory on your local machine.
3|Page
• Choose "Install database software only" if you are setting up a standalone database.
• Provide the necessary details such as the installation directory and Oracle Home.
6. Installation Progress:
• Allow the installer to complete the installation process. This may take some time depending on
your system specifications.
7. Configuration Assistant:
• Once the installation is complete, run the Database Configuration Assistant (DBCA) to create and
configure the database.
• Follow the prompts in DBCA to configure the database settings.
8. Listener Configuration:
9. Completing Installation:
Results: Oracle Database 19c has been successfully installed and configured on the local machine.
Screenshots:
4|Page
2. Extracted Installation Files:
5|Page
4. Database Configuration Assistant (DBCA):
5. Installation Complete:
Conclusion: In this lab, we have successfully installed and configured Oracle Database 19c on a local machine.
This database can now be used for various development and testing purposes.
6|Page
Lab-2
Title: Configuring and Managing Tablespace and Control Files(SPfile or pfile or redo log
file)
Objective: The objective of this lab is to configure and manage tablespaces, control files, and redo log files in
an Oracle Database environment.
Equipment/Tools Required:
Procedure:
2. Creating a Tablespace:
• Replace tablespace_name with the desired name, path_to_datafile with the path to the
datafile, and size_in_MB with the size of the tablespace.
3. Managing Tablespaces:
7|Page
Alter tablespace attributes (e.g., resizing):
Results: Tablespaces, control files, and redo log files have been successfully configured and managed in the
Oracle Database environment.
8|Page
Conclusion: In this lab, we have learned how to configure and manage tablespaces, control files, and redo log
files in an Oracle Database. These components play a crucial role in database administration and ensuring the
integrity and performance of the database.
9|Page
Lab-3
Objective: The objective of this lab is to learn how to manage user accounts, assign roles, and grant privileges
in an Oracle Database environment.
Equipment/Tools Required:
Procedure:
1. Connecting to the Database:
• Replace username with the desired username and password with the desired password.
3. Granting Roles to Users:
10 | P a g e
• Replace privilege_name with the desired privilege.
5. Assigning Roles to Users:
Results: User accounts have been successfully managed, roles have been assigned, and privileges have been
granted in the Oracle Database environment.
Conclusion: In this lab, we have learned how to manage user accounts by creating users, assigning predefined
and custom roles, and granting privileges in an Oracle Database. Proper management of user accounts and
privileges is crucial for maintaining database security and controlling access to database resources.
11 | P a g e
Lab-4
Title: Creating CDB and PDBs (Container Database and Pluggable Databases)
Objective: The objective of this lab is to learn how to create a Container Database (CDB) and Pluggable
Databases (PDBs) in an Oracle Database environment.
Equipment/Tools Required:
Procedure:
• Replace cdb_name with the desired name for the Container Database.
3. Creating a Pluggable Database (PDB):
• After creating the CDB, use the following SQL command to create a Pluggable Database:
12 | P a g e
• Replace pdb_name with the desired name for the Pluggable Database, pdb_admin with the
administrative user, pdb_password with the password for the administrative user, and
/pdb_source_location/ and /pdb_destination_location/ with the source and destination paths for the
PDB files.
4. Opening the PDB:
• Once the PDB is created, use the following SQL command to open the Pluggable Database:
6. Managing PDBs:
• List all Pluggable Databases in the Container Database:
Results: A Container Database (CDB) has been successfully created, and Pluggable Databases (PDBs) have
been created within the CDB in the Oracle Database environment.
Conclusion: In this lab, we have learned how to create a Container Database (CDB) and Pluggable Databases
(PDBs) in an Oracle Database environment. CDBs and PDBs provide a flexible and efficient way to manage
multiple databases within a single Oracle instance.
13 | P a g e
Lab-5
Objective: The objective of this lab is to create users in both the Container Database (CDB) named "Prithvii"
and the Pluggable Database (PDB) named "Yadav" in an Oracle Database environment.
Equipment/Tools Required:
Procedure:
• Replace cdb_user with the desired username and password with the desired password.
3. Granting Privileges to CDB User:
• Grant necessary privileges to the user (e.g., create session, create table) as required:
4. Switching to PDB :
• Switch to the PDB "Yadav" using the following SQL command:
14 | P a g e
5. Creating Users in PDB:
• Create users in the PDB "Yadav" using the same SQL commands as in the CDB.
• Connect to the PDB using the appropriate credentials:
7. Verifying Users:
• Verify that the users have been created in both the CDB and the PDB:
Results: Users have been successfully created in both the Container Database (CDB) "Prithvii" and the
Pluggable Database (PDB) "Yadav" in the Oracle Database environment.
Conclusion: In this lab, we have learned how to create users in both a Container Database (CDB) and a
Pluggable Database (PDB) in an Oracle Database environment. Creating users at both levels allows for better
management and control of access to database resources.
15 | P a g e
Lab-6
Objective: The objective of this lab is to configure Oracle Net using the netca command, which is a graphical
user interface (GUI) tool provided by Oracle for configuring Oracle Net Services.
Equipment/Tools Required:
Procedure:
1. Launching netca:
• Open a terminal or command prompt on your computer.
3. Running netca:
• Execute the netca command to launch the Oracle Net Configuration Assistant.
5. Select Operation:
• Choose the operation you want to perform. In this case, select "Configure." Click "Next" to continue.
16 | P a g e
7. Select Listener:
• Choose the listener you want to configure. If there are no listeners configured, you can create a new one.
Select the appropriate option and click "Next."
8. Listener Configuration:
• Provide the necessary information to configure the listener, such as the listener name, protocol, port
number, etc. Click "Next" to proceed.
9. Select Database:
• Choose the databases for which you want to configure the listener. If there are no databases listed, you
may need to configure them separately. Click "Next" to continue.
12. Verification:
• Verify the listener configuration by checking the listener status using the lsnrctl command.
Results: Oracle Net has been successfully configured using the netca command-line utility.
Conclusion: In this lab, we have learned how to configure Oracle Net Services using the netca command-line
utility. This tool provides a user-friendly interface for configuring listeners and other network components in an
Oracle Database environment.
17 | P a g e
Lab-7
Objective: The objective of this lab is to perform backup and recovery operations using Oracle Recovery
Manager (RMAN), a powerful tool provided by Oracle for managing backups and restoring databases.
Equipment/Tools Required:
Procedure:
Backup Operation:
2. Starting RMAN:
• Launch RMAN by typing the following command in the terminal or command prompt:
4. Verifying Backup:
18 | P a g e
• Once the backup operation is complete, verify the backup files generated by RMAN.
Recovery Operation:
3. Starting RMAN:
• Launch RMAN in the terminal or command prompt.
4. Performing Recovery:
• Use the following RMAN command to perform recovery:
6. Verifying Recovery:
• Once the recovery operation is complete, verify that the lost data has been successfully recovered.
Results: Backup and recovery operations using RMAN have been successfully performed in the Oracle
Database environment.
Conclusion: In this lab, we have learned how to perform backup and recovery operations using Oracle
Recovery Manager (RMAN) with the provided hostname and password. RMAN provides a comprehensive set of
features for managing backups and restoring databases, ensuring data protection and minimizing downtime in
case of data loss or disaster.
19 | P a g e
Lab-8
Objective: The objective of this lab is to create an event-based schedule in an Oracle Database environment.
Event-based schedules allow users to schedule tasks or jobs based on specific events occurring within the
database.
Equipment/Tools Required:
Procedure:
• Replace event_schedule_name with the desired name for the event-based schedule and
event_queue_name with the name of the event queue associated with the schedule.
20 | P a g e
3. Verifying Schedule Creation:
• Verify that the event-based schedule has been created successfully by querying the
Results: An event-based schedule named "event_schedule_name" has been successfully created in the Oracle
Database environment using the provided hostname and password.
Conclusion: In this lab, we have learned how to create an event-based schedule in an Oracle Database
environment. Event-based schedules allow users to schedule tasks or jobs based on specific events occurring
within the database, providing flexibility and automation in task management.
21 | P a g e