Showing posts with label UNIX. Show all posts
Showing posts with label UNIX. Show all posts

Saturday, 20 February 2016

How to determine Oracle Database And OS version

The following query determine you the database version
SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 – Production
Alternatively, you can query from product_component_version.

UNIX Crontab Basics

A crontab file has five fields for specifying day , date and time followed  by the command to be run at that interval.
#——————————————————————————————
# Minute     Hour    Month Day      Month       Weekday                      Command
#  0-59       0-23      1-31                 1-12           0-6 (0=Sunday)
#——————————————————————————————

OS commands Very useful for DBAs and OS files management

Finding OS Version and Bit

OS Version

uname -a
AIX <ServerName> 3 5 00C8E96B4C00

uname
AIX

oslevel -r
5300-06

Thursday, 18 February 2016

Some useful Linux Command for DBA

ls: List files
cp: Copy files
mv: Move and rename files
mkdir: Make a directory
alias: Define command macros
rm: Remove files and directories
more: Page through output
head: Show beginning of file contents
tail: Show end of file contents

How to take file backup from Linux Server

This article describes a simple backup method that I use every day to backup my home Linux systems. It’s an easy method that non-technical Linux users can use to backup their important data. We’ll discuss the decisions you have to make in order to do a thorough backup.

Changing Hostname on RHEL

It is possible to change the hostname without reboot; this is very helpful in Production environment.

Here I have change the hostname of the server without restarting on RHEL

Step 01: Change the HOSTNAME line in /etc/sysconfig/network

[root@aca800de root]# vi /etc/sysconfig/network
HOSTNAME=vasappserver1

Step 02: Change the hostname (FQDN and alias) in /etc/hosts

[root@aca800de root]# vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1         localhost.localdomain         localhost
172.168.0.222     vasappserver1.ring.com.bd     vasappserver1

Step 03: Run /bin/hostname new_hostname for the hostname change to take effect immediately.

[root@aca800de root]# /bin/hostname vasappserver1
[root@aca800de root]# hostname
vasappserver1

Step 04: Run /sbin/service syslog restart for syslog to log using the new hostname.

[root@aca800de root]# service syslog restart
Shutting down kernel logger:                               [  OK  ]
Shutting down system logger:                               [  OK  ]
Starting system logger:                                    [  OK  ]
Starting kernel logger:                                    [  OK  ]