How To Change Timezone on a CentOS 6 and 7 Easily

You can easily change timezone in CentOS Linux using the following methods.
CentOS timezone config files and directories

/usr/share/zoneinfo/ – The system timezone directory contains the files as per timezone name. For example, the file /usr/share/zoneinfo/America/New_York represents time zone for New York.
/etc/localtime – It is a symlink to the file localtime or to the correct timezone file in the system located in /usr/share/zoneinfo/ directory.
How do I see the current time zone?

Type the date command or the ls command:
$ date
$ ls -l /etc/localtime


To find list of all available time zones, run:
# timedatectl list-timezones
##*** Grep possible Asian timezones ***##
# timedatectl list-timezones | grep Asia

Sample outputs:

…. Continue reading


Installing Oracle WebLogic Server and Creating a Domain

Oracle WebLogic Server 10.3 offers a common application architecture that includes the following:

  • A set of integrated technology framework that provides a solutions-oriented starting point for addressing your project needs
  • A unified, simplified management architecture empowering developers and administrators to realize business objectives in an environment that is populated with distributed, heterogeneous technologies and platforms
  • A highly-reliable, available, scalable, extensible, standards-based and high-performing foundation—WebLogic Server—that allows you to have flexibility in your IT solutions


You are an application server administrator in Dizzyworld Corporation. You will install and configure the Oracle WebLogic Server for your enterprise setup. By using Oracle WebLogic Server, you can deploy, execute, and maintain highly integrated and reliable enterprise applications. Oracle WebLogic Server increases productivity and lowers the Total Cost of Ownership (TCO) for enterprise setups by providing a unified, simplified, extensible platform for system administrators and management.

Continue reading

Performing a Point-in-Time Recovery use SCN

In this exercise, you will do a point-in-time recovery by restoring the database to a previous SCN.

1. Back up the database. Details on how to do a full online database backup are found in online backup. In summary, follow these steps:

  • First put the database in hot backup mode.
  • Copy all database datafiles to a backup location.
  • Take the database out of hot backup mode.
  • Force a log switch. Back up the archived redo logs.

Here is an example of a backup:

[oracle@localhost orcl]$ sqlplus “/ as sysdba”

SQL*Plus: Release – Production on Sun Aug 17 15:35:48 2008

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release – Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

Continue reading

Restoring a Database Using a Cold Backup (Offline Backup)

In this exercise you will be restoring the database with a cold backup. It is assumed the database is in NOARCHIVELOG mode.
1. Make sure the database is shut down.
2. Copy the files on the backup media to the original location. You would copy the following files:

  • NN Database datafiles
  • NN Database control files
  • NN Database online redo logs

If the original location of the database files is not available, copy them to an alternate location. Having copied the files to an alternate location, you will likely need to execute an optional step 3 for the control files and optional step 4 for all database files and/or online redo logs. Here is an example of the copy command:

Continue reading

Creating a Trace File with the Create Control File

If all else fails and you do not have a backup control file, don’t worry; you have another option, the create controlfile command. Normally, manually executing the command can be challenging because you need to know a lot of information about your database (like the names and locations of all the database datafiles). However, you can prepare for the possibility of having to use the create controlfile command by creating one in advance.
The alter database backup controlfile to trace command will create a trace file with the create controlfile command in it for you. The trace file is stored in the new diagnostic directory structure in Oracle Database 11g. The diagnostic directory structure is a new standard introduced in Oracle Database 11g that defines where Oracle stores files related to database troubleshooting and diagnostics.The base directory of this structure is defined by the parameter DIAGNOSTIC_DEST. Here is an example of the setting of DIAGNOSTIC_DEST on an Oracle database:
SQL> show parameter diag
———————————— ———– ———
diagnostic_dest string C:\ORACLE

Continue reading

Creating a Backup Control File

The backup control file is almost the same as a regular control file. It has some areas in it that are marked such that Oracle recognizes that it’s a backup control file. When a backup control file is used, some form of recovery will be required (typically just involving the use of the archived and online redo logs if the database is otherwise intact).To create the backup control file simply issue the alter database backup controlfile to command, indicating at the end of the command where you want the control file to be created.
For example, if you wanted to create a backup control file after the online backup , you would simply need to issue the following command:
SQL> alter database backup controlfile to ‘c:\backup\orcl\backup2\backup_control.ctl’;
Database altered.
The result is the creation of a backup control file called backup_control.ctl found in the c:\backup\orcl\backup2 directory, as you can see here:

Continue reading

Performing Oracle Online Backups

In this tutorial we will be performing an online database backup. As mentioned in the text, your database will need to be in ARCHIVELOG mode to successfully execute this backup.
1. We assume your database is already running in ARCHIVELOG mode. If it’s not, put your database in ARCHIVELOG mode.
2. As with the previous offline/cold backup, you need to know what datafiles need to be backed up.
SQL> Select file_name from dba_data_files;
7 rows selected.

Continue reading