Archive for the ‘TEChNoLoGY’ Category

Steps To Configure Archive Log Mode in Oracle Database 11g

April 24th, 2016, posted in Oracle Queries
Share

Mode of Logging

There are two types of logging modes in Oracle Database :

ARCHIVELOG : 
In this type of logging whatever oracle writes in a redo log file related to transactions in database, saved to another location after a log file has been filled . This location is called Archive location. if database is in Archive log mode then in case of any disaster, we can recover our database upto the last commit and user don’t have to reenter their data. Until a redo log file is not written to the Archive location it cannot be reused by oracle to write redo related data.

NOARCHIVELOG :
In this type of logging whatever oracle writes in a redo log file related to transactions in database must be overwritten when all the log files have been filled. In this type of logging we can recover our database upto the last consistent backup we have with us, after that users have to reenter their data.

How to check log mode in Oracle Database 10g/11g :

[cognos@rac1 u02]$ sqlplus
 
 SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 25 23:03:44 2012
 
 Copyright (c) 1982, 2009, Oracle.  All rights reserved.
 
 Enter user-name: /as sysdba
 
 Connected to:
 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
 With the Partitioning, Automatic Storage Management, OLAP, Data Mining
 and Real Application Testing options
 
 SQL> archive log list
 Database log mode              No Archive Mode
 Automatic archival             Disabled
 Archive destination            /backup/orcl/
 Oldest online log sequence     1
 Current log sequence           1
 SQL> select name,log_mode from v$database;
 NAME      LOG_MODE
 --------- -    -----------
 ORCL      NOARCHIVELOG
 
 Currently the ORCL database is in NOARCHIVELOG mode

To change the Oracle database in ARCHIVELOG mode. Below mentioned steps :

1. If needed set the archive log destination where you want to save your archive logs whether to a single location or to multiple location. If this is not set then Oracle save archive log files in DB_RECOVERY_FILE_DEST location if set. If you have not set your DB_RECOVERY_FILE_DEST location then you have to set your archive location before changing your database to ARCHIVELOG mode.

SQL> alter system set log_archive_dest_1='LOCATION=/u02/archive' scope=spfile;
System altered.
 
Note -- To change this parameter while database is open, your database has to run with SPFILE, if running through PFILE then shut down your database and make changes in your PFILE and then start the database in MOUNT mode using that changed PFILE
2. After this you need to shut down your database and start again in MOUNT mode
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
 
Total System Global Area 1025298432 bytes
Fixed Size                  1341000 bytes
Variable Size             322963896 bytes
Database Buffers          696254464 bytes
Redo Buffers                4739072 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.

SQL> archive log list

Database log mode              Archive Mode
 Automatic archival             Enabled
 Archive destination            /u02/archive
 Oldest online log sequence     1
 Next log sequence to archive   1
 Current log sequence           1
SQL> select name,log_mode from v$database;

NAME      LOG_MODE
---------      ------------
ORCL      ARCHIVELOG

Database changed to ARCHIVELOG mode.

 

 

Note :- After you changed your database to ARCHIVELOG mode, take a backup of your database immediately because in recovery scenarios you can recover your database from the last backup taken in this mode. #############################################################################

To change the Oracle database in NOARCHIVELOG mode. Below mentioned steps:

 

1.Shutdown your running database.


SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

2. Start your database in MOUNT mode.

SQL> startup mount
ORACLE instance started.

Total System Global Area 1025298432 bytes
Fixed Size                  1341000 bytes
Variable Size             322963896 bytes
Database Buffers          696254464 bytes
Redo Buffers                4739072 bytes
Database mounted.

SQL> alter database noarchivelog;
Database altered.

SQL> alter database open;
Database altered.

SQL> archive log list
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /u02/archive
Oldest online log sequence     1
Current log sequence           1

SQL> select name,log_mode from v$database;
NAME      LOG_MODE
---------      ------------
ORCL      NOARCHIVELOG

Database changed to NOARCHIVELOG mode !!
Share

Taking explorer on SUN machines

April 21st, 2016, posted in Linux OS
Share

If your system is a SunFire midframe server (38×0, 48×0, or 68×0 model), use this command to include data from the system console:

/opt/SUNWexplo/bin/explorer -q -e -w default,scextended

If your system uses an alom (advanced lights out manager), some additional data can be collected. Systems that use that include:
Sun Fire V210,V240,V250,V245,V440,V440R,V445 Server Netra 240,440 (AC) Server
Use this command:

# /opt/SUNWexplo/bin/explorer -q -e -w default,alomextended

 

If your system uses T1 processors (system type starts with T, and uname -a command will say architecture is sun4v), use this command:

# /opt/SUNWexplo/bin/explorer -q -e -w default,Tx000

For any other model of Sun system, use this command:

# /opt/SUNWexplo/bin/explorer -q -e

 

The -q option suppresses printing of error messages during the run.
The -e option prevents explorer from automatically sending email.
The -w scextended option collects data from the system console (sc).

If you cannot run explorer for some reason, here are the most important things to collect:

/var/adm/messages or messages.# file for the time when the crash was taken. Be sure to include any messages that occurred just before panic.

/etc/system file

output of the showrev -p command, for a list of patches on system

Detailed hardware configuration of the system. To determine which command to use, issue the command uname -m to find the system architecture type.

If it is sun4u, send the output of this command:
/usr/platform/sun4u/sbin/prtdiag -v
If it is sun4v, send the output of this command:
/usr/platform/sun4v/sbin/prtdiag -v
Output of this command:
prtconf -vp

If your system is a SunFire midframe server (38×0, 48×0, or 68×0 model), include the output of these commands to collect data from the system console:

showlogs -v
showlogs -d showboards -v showplatform -v showenvironment -v showsc -v

Link : http://ram-y.blogspot.com/2011/02/taking-explorer-on-sun-machines.html

Share

How to get SUN server serial number ?

April 12th, 2016, posted in Solaris
Share
Are you breaking your head to find the Sun/oracle server serial number ?Many times its  required to get support hardware vendor and every time we can;t go back to look at the server builds books to find it.Here i am just sharing few tips to find the server serial number from OS console.Download the STB (Sun explorer )bundle from oracle website and install it by just executing the script.After installing STB bundle,by default SNEEP utility also will be installed on the server.
You can find the sneep utilities in the below mentioned location.
[root @ /opt/SUNWsneep/bin]# ls -l
total 298
-r-xr-xr-x   1 root     other       5519 Feb 15  2012 add_sneep_to_bin
-r-xr-xr-x   1 root     other       5995 Feb 15  2012 install_explorer_plugin
-r-xr-xr-x   1 root     other       5120 Feb 15  2012 serial_finder
lrwxrwxrwx   1 root     root           5 Apr 15  2012 setcsn -> sneep
lrwxrwxrwx   1 root     root           5 Apr 15  2012 showplatform -> sneep
-r-xr-xr-x   1 root     other     120925 Feb 15  2012 sneep
There are many commands with link to same binary to pull the server serial numbers.In the above output you can see serscn &  showplatform softlinks of sneep.
[root @ /opt/SUNWsneep/bin]# ./showplatform
BDFxxx2E4E
[root @/opt/SUNWsneep/bin]#./sneep
BDFxxx2E4E
In another way, we can grep the “ChassisSerialNumber” from eeprom  or prtconf command’s output.

[root@ /]# eeprom |grep -i ChassisSerialNumber
." ChassisSerialNumber BDFxxx2E4E " cr

[root @ /]# prtconf -pv |grep chassis
   chassis-sn:  'BDFxxx2E4E'
[root @ /]#

Please see the below examples taken from an Oracle/Sun Explorer utility.In these examples, if we already know the serial number, these examples show what commands could be used to retrieve the serial number. In these examples a portion of the serial has been masked. Ex: M9000/M8000

# cd /opt/SUNWexplo/output/explorer*
# grep AKD11XXXXX *

chassis_serial.out:AKD11XXXXX
eeprom.out:." ChassisSerialNumber AKD11XXXXX " cr
env.out:EXP_SERIAL_847c7878=AKD11XXXXX
prtconf-vp.out: chassis-sn: 'AKD11XXXXX'
prtpicl-v.out: :chassis-sn AKD11XXXXX
In M-series server , If the XSCF is UP, and they can log into it, they can also retrieve this from the showhardconf command output.
XSCF>showhardconf
SPARC Enterprise M5000;
+ Serial:BDF1219XXX; Operator_Panel_Switch:Locked;

How to update or store  serial number ?
To store serial number into the EEPROM.

# sneep -s AKDXXXX
To add other information
#sneep -t -s XXXXXX

 use the “-t” to set the tag name and the “-s” option to set its value as below:
Ex:# sneep -t “SiteTag” -s INDIA-BANGALORE

To display other tag information
# sneep -T
Installation of STB. (i.e Oracle explorer):
Download the oracle explorer from oracle website and copy to /var/tmp for installation.
The Oracle Services Tools Bundle (STB) is a self-extracting installer bundle that supports all Solaris standard operating systems and architectures, enabling customers to get the most from their Oracle Premier Support plans.
bash-3.00# ls -lrt |grep -i Solaris86
-rwxr--r--   1 root     root     47291285 May 27 13:36 p16469063_73_Solaris86-64.zip
bash-3.00# unzip p16469063_73_Solaris86-64.zip
Archive:  p16469063_73_Solaris86-64.zip
  inflating: README.txt
  inflating: install_stb.sh          
bash-3.00# ls -lrt |grep stb
-rw-r--r--   1 root     root     51074006 Mar  6 22:14 install_stb.sh
bash-3.00# chmod 700 install_stb.sh
bash-3.00# ./install_stb.sh
List of Services Tool Bundle Components:
   Oracle Explorer Data Collector 7.3
   Oracle Serial Number in EEPROM (SNEEP) 7.3
   Service Tag (ST) packages
   Oracle Autonomous Crashdump Tool 8.17 (ACT)

Would you like to (I)nstall, (X)tract, or (E)xit ? (I by default)
bash-3.00#
You can burn new serial number and other information to EEPROM.

bash-3.00# sneep -s AKZD34567
bash-3.00# sneep
AKZD34567
bash-3.00# sneep -t "Location" -s INDIA
bash-3.00# sneep -T
"ChassisSerialNumber"   "AKZD34567"
"Location"      "INDIA"
bash-3.00# sneep -t "AssetTag" -s 45675
bash-3.00# sneep -T
"ChassisSerialNumber"   "AKZD34567"
"AssetTag"      "45675"
"Location"      "INDIA"
bash-3.00#

To find the sneep version,

bash-3.00# sneep -V
Release 7.3

Its recommended to keep the oracle STB version update to date for to collect necessary information for  diagnostics.

Thank you for reading this article.Please leave a comment if you have any doubt ,i will get back to you as soon as possible.

Share

Enabling And Checking the Status of Flashback On Database

February 6th, 2016, posted in Oracle Queries
Share

Enabling the FLASHBACK DATABASE on the standby database :Oracle : Size Of Database,Oracle,Size Of Database,Database,data files, redo log files, control files, temporary files,Oracle data files,Oracle  redo log files,Oracle  control files,Oracle  temporary files,Enabling And Checking the Status of Flashback On Database,Oracle Database,Oracle DBA,Enabling Flashback On Database,Checking the Status of Flashback On Database, Status of Flashback On Database, Enable Flashback On Database, Enabling Flashback On Database,Enable Flashback On Oracle Database, Enabling Flashback On Oracle Database,

SQL> alter database flashback on;
Database altered.

 

Checking the status of the flashback on the database :

SQL> select flashback_on from gv$database;

FLASHBACK_ON
——————

YES
YES

Share

OnePlus 2 Android Smartphone

February 2nd, 2016, posted in MOBiLE
Share

OnePlus 2,OnePlus,2,GSM,mobile,phone,cellphone,information,info,specs,specification,opinion,review,OnePlus 2 Android Smartphone,OnePlus 2 Android ,Smartphone,OnePlus 2, Android Smartphone

oneplus2-specs

OnePlus 2,OnePlus,2,GSM,mobile,phone,cellphone,information,info,specs,specification,opinion,review,OnePlus 2 Android Smartphone,OnePlus 2 Android ,Smartphone,OnePlus 2, Android Smartphone

Links :

https://oneplus.net/2

http://www.gsmarena.com/oneplus_2-6902.php

http://www.techradar.com/reviews/phones/mobile-phones/oneplus-2-1300253/review/1

OnePlus 2,OnePlus,2,GSM,mobile,phone,cellphone,information,info,specs,specification,opinion,review,OnePlus 2 Android Smartphone,OnePlus 2 Android ,Smartphone,OnePlus 2, Android Smartphone

oneplus-two-2

Share