Archive for the ‘Solaris’ Category

Check OS BIT is 32 or 64 For Solaris and Linux

May 15th, 2016, posted in Solaris
Share

Is my Operating System 64-bit?

In Solaris, from the command line (you don’t have to be root in most cases) run this command:
/usr/bin/isainfo -kv

If your OS is 64-bit, you will see output like:
64-bit sparcv9 kernel modules

If your OS is 32-bit, you will get this output:
32-bit sparc kernel modules

For Linux users :

If you are running Linux, you can check your distribution with the uname command:

uname -m

The output will read x86_64 for 64-bit and i686 or similar for 32-bit.

How about this Oracle install? Is it 64-bit?

The question here is weather your Oracle binaries are 64-bit. While some of the binaries associated with Oracle may be 32-bit, the important ones will be 64 bit. To check those, follow these steps from the command line:

cd $ORACLE_HOME/bin
file oracl*

This will display the file type of your oracle binaries. If you are running 64-bit binaries, the output should look like this:

oracle: ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, not stripped
oracleO: ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, not stripped

If your binaries are 32-bit, the output will look like this:

oracle: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, not stripped

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

Add A User From The Command Line In Solaris

December 12th, 2015, posted in Solaris
Share

Add A User From The Command Line In Solaris,Add A User From The Command Line In Solaris 10,Add A User From The Command Line, In Solaris10 ,Add A User ,The Command Line In Solaris10,The Command Line In Solaris,solaris 10,

This shows how to use useradd in Solaris to add a user.

Add A User From The Command Line In Solaris,Add A User From The Command Line In Solaris 10,Add A User From The Command Line, In Solaris10 ,Add A User ,The Command Line In Solaris10,The Command Line In Solaris,solaris 10,

You must be root (superuser) to add a user. An easy way to remember the syntax of the useradd command in Solaris is to run it with no options. Follow the resulting usage information including the parts that you require. Important options are:

-d home-directory-path
This is the new user’s home directory, typically /export/home/username

-m
make home directory and copy the default skeleton files (these files are located in /etc/skel directory).

-u uid
The uid (userid) is a number from 0 to 65535 which identifies the user on the system. uid 0 is reserved for root. If you don’t specify one, the next available uid will be used automatically.

-c “User Name”
Comment field which usually contains the name of the user. Make sure you enclose the name in quotes if it contains a space.

-s /path/to/shell
The shell to use. If you don’t specify this, it will default to /bin/sh. Make sure you specify the fully qualified path.

So, putting it together, a typical addition of a user named fred would be:

useradd -d /export/home/fred -m -s /bin/ksh -c "Fred Smith" fred

It’s a smart idea to run pwck (passwd check) whenever you make a change to the /etc/passwd file (as when adding or changing a user). This program will identify any problems with the passwd file. If it doesn’t tell you anything, then you are in good shape.

Share

Oracle : Up And Down of Oracle Application And Oracle Database

December 2nd, 2015, posted in Oracle, Solaris
Share

Shutdown Oracle Application :

Go to the path :
/u88/appprodinst/apps/ListenerName_ServerName/admin/scripts

Run Command from Bash
bash-3.00$ ./adstpall.sh


Shutdown Oracle Database :

Go to the path :
/u77/oraprod/prod/db/tech_st/11.1.0/appsutil/scripts/ListenerName_serverName

bash-3.00$ ./addbctl.sh stop

If its taking to much time. You can use this command on extreme cases only :
ps -ef|grep pmon

Than Stop Listener :
bash-3.00$ ./addlnctl.sh stop ListenerName

————–

Start Oracle Database :

Go to the path :

/u77/oraprod/prod/db/tech_st/11.1.0/appsutil/scripts/ListenerName_serverName

bash-3.00$ ./addbctl.sh start

bash-3.00$ ./addlnctl.sh start ListenerName

 

Start Oracle Application :

Go to the path :
/u88/appprodinst/apps/ListenerName_ServerName/admin/scripts

Run Command from Bash
bash-3.00$ ./adstrtal.sh

Share

AC-00005: No write permissions for creating the Context file – /tmp/temp.xml

September 12th, 2015, posted in Oracle, Solaris
Share

Problem : 

While making Oracle Application Clone : 

Target System Root Service [enabled] :

Target System Web Entry Point Services [enabled] :

Target System Web Application Services [enabled] :

Target System Batch Processing Services [enabled] :

Target System Other Services [disabled] :

Do you want to preserve the Display [hooraps1:0.0] (y/n) ? : n

Target System Display [erp2:0.0] :
RC-50004: Error occurred in CloneContext:
AC-00005: No write permissions for creating the Context file – /tmp/temp.xml
Raised by oracle.apps.ad.context.AppsContext
Check Clone Context logfile /u07/appprod/apps/apps_st/comn/clone/bin/CloneContext_0908103640.log for details.

ERROR: Context creation not completed successfully.
For additional details review the file /tmp/adcfgclone_17325.err if present.

When you check log file you will get this : 

StackTrace:
java.lang.Exception: AC-00005: No write permissions for creating the Context file – /tmp/temp.xml
Raised by oracle.apps.ad.context.AppsContext
at oracle.apps.ad.context.AppsContext.getOaEnabledValues(AppsContext.java:733)
at oracle.apps.ad.context.CloneContext.setConfigHome(CloneContext.java:2306)
at oracle.apps.ad.context.CloneContext.doClone(CloneContext.java:606)
at oracle.apps.ad.context.CloneContext.main(CloneContext.java:5023)

RC-50004: Error occurred in CloneContext:
AC-00005: No write permissions for creating the Context file – /tmp/temp.xml
Raised by oracle.apps.ad.context.AppsContext
Context file creation not succesful

 

Solution :

Simply go to this path by root user /tmp/temp.xml . Give 777 rights to temp.xl .
And now login with application user and run perl adcfgclone.pl appsTier  !!

GoodLuck !! 🙂

Share