Tag: Osama
2011 New start For Everything
It’s One Of the Most Amazing Year …Nothing was usual Sadness , happiness , Pressure , failure and successfully moment.
I start Blogging In January 2011 to share my knowledge with people who wants to learn more about Oracle
and here i am Writing in the end of this year to finish what i started . this year include lot of memories and decision i had made ,some of them wrong , some of them right , but as one of these decision was one of the biggest mistake i ever did in my life , i don’t love to regret on something i did but the only thing that’s makes me feel good about that decision that i met new people who let you feel good all the time .
I learned new things in oracle , give me motivation to continue my career as Oracle Database Administrator this Job , its more than a job to me , as you know there’s lot of blog on the internet ,i wish to make this blog very useful for all people who wants to learn something new . i am always here to help,teach and learn from the whole people , as human we all have leak of knowledge but we don’t measure our self how much leak of knowledge is big ? its how you can continue learning and make your self more stronger .
I want to thanks everyone who helped me in this year , if i made something wrong i apology , and finally
i promise everyone with new topics about Oracle . and as i told before we all here for learning something new.
Thank you
Osama mustafa
How To Secure/Unsecure your Oracle Application Server 10g
1.Stop iasconsole
2.Secure iasconsole
3.Start iasconsole
Unsecuring Oracle AS 10g
1.Stop iasconsole
2.Update Oracle As Console StandAlone OC4J to support unsecure port :
<web-site <span="" display-name="Oracle Enterprise Manager iAS Console Website" host="[ALL]" port="" style="color: red;"> to <web-site <span="" display-name="Oracle Enterprise Manager iAS Console Website" host="[ALL]" port="" style="color: red;">
3.In same File
<ssl-config needs-client-auth="true" keystore="server/keystore.test" keystore-password="%EMD_KEYSTORE_PASSWORD%" />
<ssl-config needs-client-auth="false" keystore="server/keystore.test" keystore-password="%EMD_KEYSTORE_PASSWORD%" />
4.Update AS Console Local Management Agent to support the unsecure HTTP protocol.
The EMD_URL property in
$ORACLE_HOME/sysman/config/emd.properties
needs to get switched back to the HTTP (non-secure) protocol.
Change:
EMD_URL=https://:/emd/main
to
EMD_URL=http://:/emd/main
5.Update the standAloneConsoleURL property of oracle_ias target.Edit the file
$ORACLE_HOME/sysman/emd/targets.xml
to change the StandaloneConsoleURL property of oracle_ias target to switch back to the HTTP (non-secure) protocol.
Change:
<target ...="" name="EnterpriseManager." type="oracle_ias"> <... <property 0);"="" 0,="" color:="" name="StandaloneConsoleURL" rgb(255,="" value="https://:/emd/console"/> to<target ...="" name="EnterpriseManager." type="oracle_ias"> <... <property 0);"="" 0,="" color:="" name="StandaloneConsoleURL" rgb(255,="" value="http://:/emd/console"/>
6.Start iasconsole Best Data Center "IRONIC"
Install Oracle Application Server 10g R2 On RHEL 4
(for people who wonder You can’t install it on RHEL 5 ).
glibc-common-2.3.4-2.9
binutils-2.15.92.0.2-13
compat-libstdc++-296-2.96-132.7.2
gcc-3.4.3-22.1
gcc-c++-3.4.3-22.1
libstdc++-3.4.3-22.1
libstdc++-devel-3.4.3-22.1
openmotif21-2.1.30-11.RHEL4.4
pdksh-5.2.14-30
setarch-1.6-1
make-3.80-5
gnome-libs-1.4.1.2.90-44.1
sysstat-5.0.5-1
compat-db-4.1.25-9
control-center-2.8.0-12
xscreensaver-4.18-5.rhel4.2
kernel.shmmax = 4347483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 256 32000 100 142
fs.file-max = 201072
net.ipv4.ip_local_port_range = 10000 65000
kernel.msgmni = 2878
kernel.msgmax = 8192
kernel.msgmnb = 65535
3) Make entry of hostname and domain name in /etc/sysctl.conf
kernel.hostname=
kernel.domainname=
* soft nproc 2047
* hard nproc 16384
* soft nofile 2048
* hard nofile 65536
session required /lib/security/pam_limits.so
if [ $USER = “oracle” ]; then
if [ $SHELL = “/bin/ksh” ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
Primary Group – oinstall#groupadd oinstall
Secondary Group#groupadd dba
#useradd -g oinstall -G dba oracle
Give the password
# passwd oracle
Changing password for user oracle.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
Thank You
Osama mustafa
How to recreate DBA roles if accidentally drop?
SVRMGRL > create role dba;
SVRMGRL > grant all privileges to dba with admin option;
VERSION 8.X: From SQL*Plus or Server Manager, logged in as internal or sys, run the following commands:
SQL > create role dba;
SQL > grant all privileges to dba with admin option;
SQL > grant select_catalog_role to dba with admin option;
SQL > grant execute_catalog_role to dba with admin option;
SQL > grant delete_catalog_role to dba with admin option;
Explanation: ============
The DBA role is created at database creation time by the “sql.bsq” script. (The “sql.bsq” script is typically found in the $ORACLE_HOME/dbs or the $ORACLE_HOME/rdbms/admin directory.) Additional grants are made to dba through other scripts in the admin directory. For example, exp_full_database and imp_full_database in catexp.sql.
Note : Version 8.X will works On 10g , 11g
Thank you
Osama mustafa
How to check default temporary tablespace
COLUMN property_value FORMAT A30
COLUMN description FORMAT A50
SET LINESIZE 200
short topic but hope it will be useful
Thank you
Osama Mustafa
Backup an entire hard disk using dd command
dd if=/dev/hdx of=/dev/hdy
dd if=/dev/hdx of=/path/to/image
dd if=/dev/hdx | gzip > /path/to/image.gz
Hdx could be hda, hdb etc. In the second example gzip is used to compress the image if it is really just a backup.
dd if=/path/to/image of=/dev/hdx
gzip -dc /path/to/image.gz | dd of=/dev/hdx
In order to backup only the first few bytes containing the MBR and the partition table you can use dd as well.
dd if=/dev/hdx of=/path/to/image count=1 bs=512
dd if=/path/to/image of=/dev/hdx
Upgrade 11.1.0.6 to 11.1.0.7 – APPS DBA
shut down all server processes or services.
On the database tier server node,
shut down the database listener in the old Oracle home.
On the database server node,
as the owner of the Oracle 11g file system and database instance, unzip and extract the 11.1.0.7 patch set file for your platform.
Use the runInstaller in the patchset to start the OUI.
Once the OUi starts from the LOV s in the Oracle_home list choose the appropriate one to be upgraded and the location also.
The present oracle_home and its location will appear if the environment is set correctly.
Proceed with the next steps on the OUI screen.
On next Screen it will Say Configuration Assistant has failed.Skip this Step since its not required for Oracle E-Business Suite .
MOST IMPORTANT STEP IN UPGRADE .
After Installation you need to Apply the RDBMS patches7486407 and 7684818
Copy $APPL_TOP/admin/adstats.sql from the administration server node to the database server node.
$ sqlplus / as sysdba
SQL> shutdown normal;
SQL> startup restrict;
SQL> @adstats.sql
SQL> shutdown normal;
SQL> startup;
SQL> exit;
Thank You
Osama mustafa
steps to upgrade 11.1.0.6.0 to 11.1.0.7.0
the steps the same for all Database with different patch .
Database : 11.1.0.6 (R1)
Let start upgrading :
1 – You need To install this patch p6890831_111070_Linux-x86-64.zip.
2- Bring Down Database And Services Down And make sure it .
*Database :
sqlplus / as sysdba
SQL>shutdown immediate ;
$ps -ef | grep pmon “to make sure the database is not running”
Listener :
$lsnrctl status
$lsnrctl stop
$lsnrctl status
3-Just In case Take backup of your database .
4-unzip the patch , and run it under Oracle User
$./runInstaller
Select the ORACLE_HOME to upgrade and then click next, the prerequisites steps will complete last click INSTALL. At the end up the installation it will ask to run root.sh as root user. We need root user password or sudo user privilege to run root.sh script.
5-After Upgrade do the following and its mandatory :
cd $ORACLE_HOME/rdbms/admin
sqlplus / as sysdba
SQL> startup upgrade;
SQL>spool pre_upgrade.log
SQL> @utlu111i.sql
6-cd $ORACLE_HOME/rdbms/admin
sqlplus / as sysdba
SQL> spool upgrade_date.log
SQL> @catupgrd.sql
Take check the validity, version of the installed components
sqlplus / as sysdba
sql>set pages 250
sql> set lines 1000
sql> col comp_name for a40
sql> select comp_name, version, status from dba_registry;
7-SQL>shutdown immediate;
8-Recompiling the invalid objects
cd $ORACLE_HOME/rdbms/admin
sqlplus / as sysdba
SQL>startup;
SQL>spool recompile.log
SQL> @utlrp.sql
Controlfiles, datafiles, redo logs, archive files, tempfiles must be included in the backup. If the files are in different paths, the same has to be backedup.
As Oracle User :
$mkdir /backup_date
$cp /u01/oracle/oradata/orcl/*.* /backup/backup_date
$cd $ORACLE_HOME/dbs
$cp inittest.ora inittest.ora_bkpdate
$cp spfiletest.ora spfiletest.or_bkpdate
$cp orapwtest.ora orapwtest.ora_bkpdate
**Take a backup of home path
$mkdir product_bkp
$cd /u01/oracle/product
$tar czf /backup/oracle_11106.tar.gz 11.1.0
**dbhome, coraenv,oraenv backup
As Root User :
#cd /usr/local/bin
#cp dbhome dhome_bkpdate
#cp coraenv coraenv_bkpdate
#cp oraenv oraenv_bkpdate
revert back to old version :
1. untar the binary backup
2. Backup the current database and then replace them with cold back taken before applying the patch.
As Root User :
cd /usr/local/bin
#cp dbhome_bkpdate dbhome
#cp coraenv_bkpdate coraenv
#cp oraenv_bkpdate oraenv
As Oracle User :
oracle binary restoration
cd /u01/oracle/product
$rm -rf 11.1.0
$mkdir 11.1.0
$cp /backup/oracle_11106.tar.gz 11.1.0
$cd 11.1.0
$gunzip oracle_11106.tar.gz
$tar -xvf oracle_11106.tar
Datafile backup restoration
cd /u01/oracle/oradata/orcl/
$rm *
$cd /backup/backup_date
$cp *.* /App1/oracle/oradata/orcl/
$cd $ORACLE_HOME/dbs
$cp inittest.ora_bkpdate inittest.ora
$cp spfiletest.ora_bkpdate spfiletest.ora
$cp orapwtest.ora_bkpdate orapwtest.ora
sqlplus / as sysdba
SQL>startup;
SQL>select * from v$version;
SQL>select comp_name, version, status from dba_registry;
Osamamustafa.blogspot.com































