Showing posts with label Solaris. Show all posts
Showing posts with label Solaris. Show all posts

Monday, October 13, 2008

How to share and Access file on Solaris machine

In this example I will share a file from jupiter machine and then access it on neptune machine. Both machine uses Solaris platform.
1)On jupiter machine,

bash-3.00$ hostname
jupiter

Log on as a root user,
bash-3.00$ su
Password:

Change shell to bash
# bash

To make share persistence (after reboot is will also show) edit /etc/dfs/dfstab entry. Here I want to share directory /export/home/oracle and sharing option is read write.
# vi /etc/dfs/dfstab
share -F nfs -o rw /export/home/oracle

rw means read write permission You can also want to give ro (read only) instead of read write.

If you want it temporary you can do,
# share -F nfs -o rw /export/home/oracle
Restart your nfs server.
# /etc/init.d/nfs.server stop
# /etc/init.d/nfs.server start


Have a look at whether nfs server is running or not.
# ps -ef | grep nfs
daemon 317 1 0 Oct 10 ? 0:00 /usr/lib/nfs/lockd
daemon 311 1 0 Oct 10 ? 0:00 /usr/lib/nfs/statd
daemon 313 1 0 Oct 10 ? 0:03 /usr/lib/nfs/nfsmapid
daemon 291 1 0 Oct 10 ? 0:00 /usr/lib/nfs/nfs4cbd
root 12741 12424 0 03:20:34 pts/4 0:00 grep nfs

This must show statd and lockd running. In fact The statd and lockd must be running on server and
client.

Have a look at which file is shared and it's mode.
# share
- /export/home/oracle rw ""

2)On Saturn machine log on as a root user
oracle@neptune ~$ su -
Password:

Create a directory where you mount the network location.
root@neptune /# mkdir /export/home/oracle/remote

Mount the network drive
root@neptune /# mount -F nfs jupiter:/export/home/oracle /export/home/oracle/remote

Or, with more options issue,
# mount -o rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,vers=3,timeo=600,actimeo=0 jupiter:/export/home/oracle /export/home/oracle/remote
See whether it is mounted.
root@neptune /# df -h
.
.

jupiter:/export/home/oracle
20G 7.6G 12G 39% /export/home/oracle/remote

Now do work is it /export/home/oracle/remote is your local disk location.
Related Documents
Memory Usage of Solaris Operating System

Monday, September 1, 2008

On Solaris putty login fails with Using keyboard-interactive authentication

While connecting through putty from windows vmware machine to solaris machine after giving username and password it fails to logon to database bu displaying message 'Using keyboard-interactive authentication' and 'Access denied'.
Here is the sample output:
login as: oracle
Using keyboard-interactive authentication.
Password:
Access denied
Using keyboard-interactive authentication.

Solution of The Problem

You can solve the problem through several ways. The method I use is,
Way 1: With help of one linux machine.
1.Using putty log on to a linux machine that works.
2.With the linux mahine console I use ssh solaris_machine_name -Y
3.After providing username and password I am connected to the solaris shell.

This method is easy if you have a linux machine.

Way 2: With PuttyGen
1.Download PuttyGen.exe from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html.

2.Run the puttygen program and hit the 'generate' button.

3.After some moments public key that is displayed in the tool. Copy the key and paste it into the ~/.ssh/authorized_keys file on the Solaris machine.

4.Save the private key on the Windows machine by using the 'Save Private Key' button. While saving it give a name.

5.In the PuTTY configuration, choose Connection->SSH->Auth, and select the file (the private key) that you saved in the step 4.

6.Open the connection, and it should work.

X11 connection rejected because of wrong authentication

On my Solaris Operating System I have entered into ssh -Y option and now try to run X-windows /Graphical windows and it returned,
-bash-3.00$ X11 connection rejected because of wrong authentication.
X connection to localhost:11.0 broken (explicit kill or server shutdown).

Cause of The Problem
The error happened because ssh was unable to write my ~/.Xauthority file.

Solution of The problem
1.The most possible reason is your disk is full. Check the disk space by using df -h. I have seen that my home directory is full. After that I
deleted/move unnecessary files from my Solaris home partition and then
exit
Log on again using ssh ... -Y
And run graphical windows like dbca&


2.It may be because of the permission settings of the ~/.Xauthority file or existence of the file.
To fix it
rm .Xauthority
touch .Xauthority
chmod 600 .Xauthority

Sunday, August 17, 2008

Running Runinstaller fails with DISPLAY not set

When I running the runinstaller command on my linux server after entering through ssh it fails with DISPLAY not set.
$ssh oracle@192.168.1.91
-bash-3.1$ /oradata1/clusterware/runInstaller
Starting Oracle Universal Installer...

Checking installer requirements...

Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
Passed


All installer requirements met.

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2008-08-17_04-01-48PM. Please wait ...
DISPLAY not set. Please set the DISPLAY and try again.
Depending on the Unix Shell, you can use one of the following commands as examples to set the DISPLAY environment variable:
- For csh: % setenv DISPLAY 192.168.1.128:0.0
- For sh, ksh and bash: $ DISPLAY=192.168.1.128:0.0; export DISPLAY
Use the following command to see what shell is being used:
echo $SHELL
Use the following command to view the current DISPLAY environment variable setting:
echo $DISPLAY
- Make sure that client users are authorized to connect to the X Server.
To enable client users to access the X Server, open an xterm, dtterm or xconsole as the user that started the session and type the following command:
% xhost +
To test that the DISPLAY environment variable is set correctly, run a X11 based program that comes with the native operating system such as 'xclock':
% <full path to xclock.. see below>
If you are not able to run xclock successfully, please refer to your PC-X Server or OS vendor for further assistance.
Typical path for xclock: /usr/X11R6/bin/xclock

Solution of The Problem
If you are trying to run GUI on remote unix machine using ssh from the client unix machine then you have to ssh with the -X or -Y option. To solve the problem just quit the session and reenter to the remote machine using anyone of the following,

ssh oracle@192.168.1.91 -X
ssh oracle@192.168.1.91 -Y


If your are already on the machine and got above message then as a root user issue,

#xhost +
Now as oracle user run oracle universal installer.

Wednesday, May 14, 2008

Startup fails with ORA-27102: out of memory Solaris-AMD64 Error

Scenario of The problem:
------------------------------

In my computer I have two database. One database is running smoothly but another database is not started whenever I invoke startup. It fails with error,

SQL> startup
ORA-27102: out of memory
Solaris-AMD64 Error: 22: Invalid argument


Reason of The problem:
------------------------

The database which could not start is because of the low memory on the system or in the sga_max_size there is high value set. So the system could not allocate so large memory as it does not have free so much. There may be other reasons like OS limitation in order of usage the memory. As in this case one database is ok (Both database are running on same user)and another database is failed so I suspect either low memory on the system or in the sga_max_size parameter inside spfile there is high value set.

Solution of The problem:
------------------------------

1)Set a lower amount of memory in the first database.
You can do it by, On dbase1,

SQL> alter system set sga_max_size=1600M scope=spfile;

System altered.

SQL> alter system set sga_target=1600M;

System altered.

SQL>shutdown


Now set ORACLE_SID and start the instance.

bash-3.00$ export ORACLE_SID=dupbase
bash-3.00$ sqlplus / as sysdba


SQL*Plus: Release 10.2.0.1.0 - Production on Thu May 15 01:34:15 2008

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 171966464 bytes
Fixed Size 2019320 bytes
Variable Size 113246216 bytes
Database Buffers 50331648 bytes
Redo Buffers 6369280 bytes
Database mounted.
Database opened.

Or,
2)Lower the setting of SGA_MAX_SIZE, SGA_TARGET on the 2nd database. To do this create pfile from spfile.
SQL>create pfile from spfile;

And then edit the pfile parameter of SGA_MAX_SIZE and SGA_TARGET.

And start the database with the pfile.

SQL>STARTUP PFILE='pfile_name';


Later , Create spfile from pfile,
SQL>CREATE SPFILE from PFILE;
Related Documents
http://arjudba.blogspot.com/2008/12/expdp-fails-with-ora-39125-ora-04031.html
http://arjudba.blogspot.com/2009/05/ora-27100-shared-memory-realm-already.html
http://arjudba.blogspot.com/2008/05/startup-fails-with-oracle-error-ora.html
http://arjudba.blogspot.com/2008/09/database-startup-fails-with-ora-27302.html
http://arjudba.blogspot.com/2008/07/database-startup-fails-with-error-ora.html
http://arjudba.blogspot.com/2008/08/startup-fails-with-ora-01261-parameter.html

ORA-27123 unable to attach to shared memory segment

Error Description:
------------------------

Whenever you try to start your database instance it failed with error as follows.

SQL> startup
ORA-27123: unable to attach to shared memory segment
Solaris-AMD64 Error: 13: Permission denied


Cause of the Problem:
----------------------

As the error suggested permission denied so there is problem in proper permission settings. In the $ORACLE_HOME and in $ORACLE_HOME/bin proper permission is not set and hence error comes.

Solution of The Problem:
-----------------------------

You need to change the "umask" to the required 022, set the proper permission on $ORACLE_HOME, $ORACLE_HOME/bin directories. In my computer, I ran the following.

1)Log on as root and change permission.
bash-3.00$ su
Password:
# umask 022
# cd $ORACLE_HOME
# chmod 755 *
# cd $ORACLE_BASE/admin/$ORACLE_SID
# chmod 755 *
# cd $ORACLE_HOME/bin
# chmod 6751 oracle
# exit


2)Log on normal user and log on to database.
bash-3.00$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Wed May 14 23:40:12 2008

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

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

Saturday, April 19, 2008

Swap Space in Solaris

Many one argues different way to identify of how to check swap space in Solaris and the result varies. Like they use df -h to check swap space. But to check swap space, and to get correct result the following query need to be issued.

swap -l reports total and free space for each of the swap partitions or files that are available to the system. Note that this number does not reflect total available virtual memory space, since physical memory is not reflected in the output.

swap -s reports the total available amount of virtual memory

If swap is mounted on /tmp via tmpfs, df -k /tmp will report on total available virtual memory space, both swap and physical.