We see that the database instance “DBST670” was already ... · Anthony Besong LAB2: Oracle 12C...
Transcript of We see that the database instance “DBST670” was already ... · Anthony Besong LAB2: Oracle 12C...
Anthony Besong LAB2: Oracle 12C installation and database backup
1 | P a g e
We see that the database instance “DBST670” was already running. So I proceeded to delete the
instance using database configuration assistant (dbca).
Anthony Besong LAB2: Oracle 12C installation and database backup
2 | P a g e
Anthony Besong LAB2: Oracle 12C installation and database backup
3 | P a g e
Anthony Besong LAB2: Oracle 12C installation and database backup
4 | P a g e
Dropping database
Anthony Besong LAB2: Oracle 12C installation and database backup
5 | P a g e
Database deletion completed. Proceeding to create a new database called DBST670
Database instance is now gone.
Anthony Besong LAB2: Oracle 12C installation and database backup
6 | P a g e
Anthony Besong LAB2: Oracle 12C installation and database backup
7 | P a g e
Anthony Besong LAB2: Oracle 12C installation and database backup
8 | P a g e
Anthony Besong LAB2: Oracle 12C installation and database backup
9 | P a g e
Anthony Besong LAB2: Oracle 12C installation and database backup
10 | P a g e
Anthony Besong LAB2: Oracle 12C installation and database backup
11 | P a g e
Anthony Besong LAB2: Oracle 12C installation and database backup
12 | P a g e
Anthony Besong LAB2: Oracle 12C installation and database backup
13 | P a g e
Anthony Besong LAB2: Oracle 12C installation and database backup
14 | P a g e
Anthony Besong LAB2: Oracle 12C installation and database backup
15 | P a g e
Anthony Besong LAB2: Oracle 12C installation and database backup
16 | P a g e
Database creation successful.
We can see that the database is open
Anthony Besong LAB2: Oracle 12C installation and database backup
17 | P a g e
Database listener is up and running too
I created a new database user called Anthony, granted him the necessary privileges for him to
connect to the database and establish a session on sql developer as above.
Anthony Besong LAB2: Oracle 12C installation and database backup
18 | P a g e
TAKING A BACKUP OF DBST670 DATABASE
First, I put configure for recoverability by setting the DB_RECOVERY_FILE_DEST (backup
location) and DB_RECOVERY_FILE_DEST_size. By setting these two parameters, the
database knows where to keep its backup once taken. It is explained as below;
Step 1
Locate directory where we want to keep backup.
It is seen that /u01 mount point is 61% full and has 6.4 GB of space left on disk.
Anthony Besong LAB2: Oracle 12C installation and database backup
19 | P a g e
STEP 2
I then proceeded to create a directory “/u01/app/oracle/oradata/FRA” which will hold the backup
and archivelog files.
STEP 3
Anthony Besong LAB2: Oracle 12C installation and database backup
20 | P a g e
It is seen from the screenshot that we have successfully configured for recoverability.
I used 4 GB for the size of our backup location because my database is currently approximately
at 2 GB as shown below;
Next, we must place the database in archivelog mode if we want to take a hot or inconsistent
backup (backup taken when database is open to 2-tier and 3-tier users). Taking a cold or
consistent (backup taken when the database is mounted in other words inaccessible to users)
backup doesn’t require putting the database in archivelog mode.
Steps to place database in archivelog mode
--To verify if database is in archivelog mode
SQL> archive log list;
--Shutdown the database
SQL> shutdown immediate;
--Mount the database
SQL>startup mount;
Anthony Besong LAB2: Oracle 12C installation and database backup
21 | P a g e
--Place database in archivelog mode
SQL>alter database archivelog;
--Open database
SQL>alter database open;
Now we are ready to take a hot backup which will be stored in “/u01/app/oracle/oradata/FRA”.
The first time we take a backup, there will be now archivelogs. So if I issued the backup database
plus archivelog command, It will fail due to no archive logs. So I used backup database fisrst as
below;
Anthony Besong LAB2: Oracle 12C installation and database backup
22 | P a g e
Now we have archivelogs, I used backup database plus archivelogs as below
Let us view the backup, archivelog and control and spfile (server parameter) file backup
(autobackup)
Anthony Besong LAB2: Oracle 12C installation and database backup
23 | P a g e
Below are the backup files
Below are the archivelog backups
Below is the control file and spfile backup
Anthony Besong LAB2: Oracle 12C installation and database backup
24 | P a g e
/U01 mount point needs to be monitored as I just kept backup files in it which caused the space
utilization to increase as below;
REFERENCES
Alapati, S. R., & Gossett, S. (2014). Oracle WebLogic Server 12c Administration Handbook.
McGraw-Hill Education.
Bryla, B., & Loney, K. (2013). Oracle Database 12c the Complete Reference. McGraw-Hill
Osborne Media.
Kyte, T., & Kuhn, D. (2014). Expert Oracle database architecture. Apress.
Greenwald, R., Stackowiak, R., & Stern, J. (2013). Oracle essentials: Oracle database 12c.
"O'Reilly Media, Inc.".