ORATAB dosyası

Bugun birden fazla database yoneten arkadaslarımızın isine yarabilecek bazı oratab özelikklerini paylaşmak istedim
Bu serverde kac process hangi databaselerde çalışıyor?
[zekeriya@zekeriyapc] cat pscnt
if [ “`echo $LINE | awk -F: ‘{print $3}’ -`” = “Y” ] ; then
ORACLE_SID=`echo $LINE | awk -F: ‘{print $1}’ -`
COUNT=`ps -ef | grep -v ora_ | grep $ORACLE_SID | wc -l`
echo “$ORACLE_SID $COUNT”
fi
esac
done
hangi database ne buyuklukte?
[zekeriya@zekeriyaPC] cat dbsizeall
for sid in `cat /var/opt/oracle/oratab | grep Y$ | cut -f1 -d:`
do
echo $sid
dbsize $sid
echo “ “
done
Kaç database var?
[zekeriya@zekeriyaPC] cat dbcnt
ORATAB=/var/opt/oracle/oratab
cat $ORATAB | grep -v “^\#” | grep -v “^*” | grep -v “^$” | wc -l
Hangi databaseler ayakta ve çalışıyor?
[zekeriya@zekeriyaPC] cat dbayakta
ORATAB=/var/opt/oracle/oratab
cat $ORATAB | while read LINE
do
case $LINE in
\#*) ;; #comment-line in oratab
*) 
if [ “`echo $LINE | awk -F: ‘{print $3}’ -`” = “Y” ] ; then
ORACLE_SID=`echo $LINE | awk -F: ‘{print $1}’ -`
if [ “$ORACLE_SID” = ‘*’ ] ; then
ORACLE_SID=””
fi
ORACLE_HOME=`echo $LINE | awk -F: ‘{print $2}’ -`
# check for database online
STATUS=`ps -fu oracle | grep “ora_[a-z]*_${ORACLE_SID}$” `
if [ $? -eq 0 ]; then
echo “${ORACLE_SID} OK”
else
echo “${ORACLE_SID} DOWN”
fi
fi
esac
done
Advertisements

About oracledocuments

Zekeriya Beşiroğlu, It joined the Bilginc IT Academy in July 2000. In the meantime, the Oracle Education, Oracle Data Base Management System and Oracle Internet Technologies, Oracle development technologies such as the training of Oracle products is responsible for training as consultants. During this task, since 1 April 2008 with 293 Oracle training in total, in 2150 Oracle customers successfully submitted. Oracle 10g New York in November 2002 have received training and education in Turkey was the first time the consultants. 20 April 2008 on education in Turkey 11g is the first who was a consultant. Oracle Real Application Cluster Expert advisor is certified is the first . Http://zekeriyabesiroglu.blogspot.com and Http://www.oracleforum.info owner and manager of the site. Its own has more than one hundred articles. In addition, creation and improvement of training materials are also related to work. Oracle products are used, database management and reporting Academy eruditely It also is working on. From the date of 1 January 2009 will continue to work as the Technical Director
This entry was posted in Uncategorized and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s