Month: October 2012
Oracle Application server 10g unable to start HTTP
Hi all
Today When I was Supporting for some customer , i faces issue in application server 10gthe solution is so simple
Let describe the problem :
when we use
./opmnctl startall
all service is up expect Http_server is down
Check Logs nothing , Check Application server logs nothing
And when you try to shutdown IAS again it will give you :
For first i was thought its permission issue but who can change the permission .
the solution like the following :
On Os
ps -ef | grep oracle
you must find 2 process
Oracle PID $PATH/opmn.d
kill them both
Kill PID PID
or
Kill -9 PID
kill -9 PID
After this
./opmnctl startall
Oracle Enterprise Manager 10.2.0.4 Unable to start
Hi All
we gonna talk about Bug in oracle 10.2.0.4 , 10.2.0.5 since its unable to start enterprise manager after run
“emctl start dbconsole”
CONFIG: Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://myhost:5501/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control
................................................ failed
This error appear because the SSL certification has been end .
But the question is what can i do ?
Forget Enterprise manager and start using command line
Not just kidding
What if we try to recreate it again ?
emca -config dbcontrol db -repos recreate
STARTED EMCA at Jan 11, 2011 4:11:01 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database unique name: catest
Database Control is already configured for the database catest
You have chosen to configure Database Control for managing the database catest
This will remove the existing configuration and the default settings and perform a fresh configuration
Do you wish to continue? [yes(Y)/no(N)]: Y
Listener port number: 1521
Cluster name: mycluster
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
........
Jan 11, 2011 4:18:05 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Jan 11, 2011 4:19:31 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jan 11, 2011 4:28:38 PM oracle.sysman.emcp.EMConfig perform
SEVERE: Error starting Database Control
Refer to the log file at /myhost/oracle/product/10.2.0/db_1/cfgtoollogs/emca/catest/emca_2011-01-11_
04-11-01-PM.log for more details.
Could not complete the configuration. Refer to the log file at /myhost/oracle/product/10.2.0/db_
1/cfgtoollogs/emca/catest/emca_2011-01-11_04-11-01-PM.log for more details.
So what can i do in this case ? i try to recreate what more i can do ?
./emctl status dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
https://myhost:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is not running.
./emctl status agent
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Agent is Not Running
Refer to Oracle Metlink Doc [1222603.1]
we need to do the following :
1- Ignore any errors and continue with the installation or upgrade. The database will be created without errors.
2- Apply Patch 8350262 to your Oracle Home installation using OPatch
To apply the patch :
A-change to Patch directory .
B-export ORACLE_SID = ORCL
C-export ORACLE_HOME= /u01/oracle/product/10.2.0/db_1/
D-$ORACLE_HOME/OPatch/Opatch apply
Invoking OPatch 10.2.0.4.2
Oracle Interim Patch Installer version 10.2.0.4.2
Copyright (c) 2007, Oracle Corporation. All rights reserved.
Oracle Home : /myhost
Central Inventory : /scratch/pchebrol/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.4.2
OUI version : 10.2.0.4.0
OUI location : /myhost/oui
Log file location : /myhost/cfgtoollogs/opatch/opatch2011-01-02_11-00-00AM.log
ApplySession applying interim patch '8350262' to OH '/myhost'
Running prerequisite checks...
OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.
Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '8350262' for restore. This might take a while...
Backing up files affected by the patch '8350262' for rollback. This might take a while...
Patching component oracle.sysman.agent.core, 10.2.0.4.0a...
Updating jar file "/myhost/sysman/jlib/emCORE.jar" with
"/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/fsc/FSWalletUtil.class"
Updating jar file "/myhost/sysman/jlib/emCORE.jar" with
"/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/rep/RepWalletUtil.class"
Updating jar file "/myhost/sysman/jlib/emCORE.jar" with
"/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/RootCert.class"
Updating jar file "/myhost/sysman/jlib/emCORE.jar" with
"/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/SecConstants.class"
Updating jar file "/myhost/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_
java.jar/oracle/sysman/eml/sec/fsc/FSWalletUtil.class"
Updating jar file "/myhost/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_
java.jar/oracle/sysman/eml/sec/rep/RepWalletUtil.class"
Updating jar file "/myhost/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_
java.jar/oracle/sysman/eml/sec/util/RootCert.class"
Updating jar file "/myhost/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_
java.jar/oracle/sysman/eml/sec/util/SecConstants.class"
ApplySession adding interim patch '8350262' to inventory
Verifying the update...
Inventory check OK: Patch ID 8350262 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 8350262 are present in Oracle Home.
OPatch succeeded.
3-If you using linux you need to kill all dbconsole process by “KillDbconsole” you will find it in the same patch directory , if you are using windows no need to kill anything .
$ /killDBConsole
ORACLE_HOME=/myhost/db_1
ORACLE_SID=caem31
State directory = /myhost/db_1/staxd10_caem31
WatchDog PID = 802932
DBconsole PID = 577716
EMAgent PID = 512156
Killing WatchDog (pid=802932) ...
Successfully killed process 802932
Killing DBConsole (pid=577716) ...
Successfully killed process 577716
Killing EMAgent (pid=512156) ...
Successfully killed process 512156
4-This not optional steps you need to do it :
./emctl secure dbconsole -reset
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://myhost:5501/em/console/aboutApplication
Enter Enterprise Manager Root Password :
DBCONSOLE already stopped... Done.
Agent is already stopped... Done.
Securing dbconsole... Started.
Checking Repository... Done.
Checking Em Key... Done.
Checking Repository for an existing Enterprise Manager Root Key...
WARNING! An Enterprise Manager Root Key already exists in
the Repository. This operation will replace your Enterprise
Manager Root Key.
All existing Agents that use HTTPS will need to be
reconfigured if you proceed. Do you wish to continue and
overwrite your Root Key
(Y/N) ?
Y
Are you sure ? Reset of the Enterprise Manager Root Key
will mean that you will need to reconfigure each Agent
that is associated with this OMS before they will be
able to upload any data to it. Monitoring of Targets
associated with these Agents will be unavailable until
after they are reconfigured.
(Y/N) ?
Y
Generating Enterprise Manager Root Key (this takes a minute)... Done.Fetching Root Certificate from
the Repository... Done.
Updating HTTPS port in emoms.properties file... Done.
Generating Java Keystore... Done.
Securing OMS ... Done.
Generating Oracle Wallet Password for Agent.... Done.
Generating wallet for Agent ... Done.
Copying the wallet for agent use... Done.
Storing agent key in repository... Done.
Storing agent key for agent ... Done.
Configuring Agent...
Configuring Agent for HTTPS in DBCONSOLE mode... Done.
EMD_URL set in /myhost/myhost/sysman/config/emd.properties
Done.
Configuring Key store.. Done.
Securing dbconsole... Sucessful.
Sometimes reset secure its not enough the same error will be appear , I know its lot of steps but i told you use command line Ok Ok what i can do just recreate enterprise manager again :
emca -config dbcontrol db -repos recreate
Ok are you sure its working ??!!
emctl status dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://localhost:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
——————————————————————
Logs are generated in directory N:\oracle\product\10.2.0\db/klpdbscph601.klpcph.local_KLPSTAGE01/sys
man/log
Thank you all
hope this topic will be useful .
Upgrade Oracle from 10.2.0.1 To 10.2.0.4
Patch set release 10.2.0.4. Before installing this patch set you must be need 10.2.0.1 version.
2. Requirements
Oracle DB : Oracle 10.2.0.1 (later) Operating System: Any Platform
1. Identify prior installation
Before installing this patch you must install oracle 10.2.0.1 (or later version)
2. Download Patch set
Download 6810189 patch set installation archive to a directory that is not the Oracle home directory or under the Oracle home directory.
3. Shutdown oracle database.
export oracle_sid= ORCL
sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 – Production on Tue Nov 13 10:49:26 2007
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect sys@ORCL as sysdba Enter password: Connected.
SQL> SHUTDOWN Database closed. Database dismounted. ORACLE instance shut down.
4. Stop all services
EMCTL STOP DBCONSOLE
4. Backup your database (Just In Case).
Oracle recommends that you create a backup of the Oracle 10g installation before you install the patch set.
5. Check Tablespace Sizes and Set Parameter Values
Review the following sections before upgrading a database.
6. Upgrade the Database
After you install the patch set, you must perform the following steps on every database associated with the upgraded Oracle home:
1. Start all services
2. Connect sys user
sqlplus /NOLOG
CONNECT SYS/SYS_password AS SYSDBA
3. Enter the following SQL*Plus commands:
SQL> STARTUP UPGRADE
SQL> SPOOL patch.log
SQL> @ORACLE_BASE\ORACLE_HOME\rdbms\admin\catupgrd.sql
SQL> SPOOL OFF
Review the patch.log file for errors and inspect the list of components that is displayed at the end of catupgrd.sql script.
This list provides the version and status of each SERVER component in the database. If necessary, rerun the catupgrd.sql script after correcting any problems.
4. Restart the database:
5. Compile Invalid Objects
Run the utlrp.sql script to recompile all invalid PL/SQL packages now instead of when the packages are accessed for the first time. This step is optional but recommended. SQL> @ORACLE_BASE\ORACLE_HOME\rdbms\admin\utlrp.sql
SQL> select * from v$version;
BANNER —————————————————————- Oracle Database 10g Release 10.2.0.4.0 – Production PL/SQL Release 10.2.0.4.0 – Production CORE 10.2.0.4.0 Production TNS for 64-bit Windows: Version 10.2.0.4.0 – Production NLSRTL Version 10.2.0.4.0 – Production
Export Data Bump , Import Data Bump In Oracle
Oracle Data Pump is a newer, faster and more flexible alternative to the “exp” and “imp” utilities used in previous Oracle versions. In addition to basic import and export functionality data pump provides a PL/SQL API and support for external tables.
Steps :
In Sql Plus (Conn /as sysdba)
CREATE OR REPLACE DIRECTORY "Dir-name" AS "Dir-path"; GRANT READ, WRITE ON DIRECTORY "Dir-path" TO "username";
CREATE OR REPLACE DIRECTORY test_dir AS '/u01/app/oracle/oradata/'; GRANT READ, WRITE ON DIRECTORY test_dir TO scott;
TABLES
parameter is used to specify the tables that are to be exported. The following is an example of the table export and import syntax.
expdp scott/tiger@db10g tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=expdpEMP_DEPT.log impdp scott/tiger@db10g tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=impdpEMP_DEPT.log
FULL
parameter indicates that a complete database export is required. The following is an example of the full database export and import syntax.
expdp system/password@db10g full=Y directory=TEST_DIR dumpfile=DB10G.dmp logfile=expdpDB10G.log impdp system/password@db10g full=Y directory=TEST_DIR dumpfile=DB10G.dmp logfile=impdpDB10G.log
You can Use For more information :
"expdp help=y"
Or "impdb help=y"
Basic Rman (Recovery manager) Guide
Today we are gonna talk about Oracle Rman ( Recovery Manager) This tools from oracle makes backup and restore database looks easily , If you lose you data it will be problem so oracle provide solution for this issue
Rman is Command line tools that gives you lot of benefits for backup
such as backup database, control file , archive log , create scripts … etc
you can connect to the following types of databases.
Target database :
RMAN connects you to the target database with the SYSDBA privilege. If you do not have this privilege, then the connection fails.
Recovery catalog database:
This database is optional, you can also use RMAN with the default NOCATALOG option.
Auxiliary database :
You can connect to a standby database, duplicate database, or auxiliary instance (standby instance or tablespace point-in-time recovery instance.
Connecting to the Target Database
Information About your Schema And display datafiles Currently In the target database .
To list the backup sets and image copies that you have created, run the list command as follows:
To list image copies, run the following command:
Show Rman Confurgation :
List All the backup has been taken by Rman :
Validate Your backup that has been taken By Rman , to check there’s no corrputed file in it :
RMAN>validate backupset
Take anote that I mention Rman basic command in earlier Blog , Please take a look at it .
And ENJOY .
How To Secure/Unsecure your Oracle Application Server 10g
Regarding To Oracle Support Document Please Follow the below steps to Secure and Unsecured Oracle AS
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 :
<....secure="true">
to
<....secure="false">
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:
<... https://:/emd/console"/>
to <... http://:/emd/console"/>
6.Start iasconsoleemctl start iasconsole
Resize Redo Log
Here is a newly created database redo log information:
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIME
———- ———- ———- ———- ———- — —————- ————- ——————-
1 1 17 52428800 1 NO INACTIVE 996238 06/09/2007 22:01:59
2 1 18 52428800 1 NO INACTIVE 1006432 06/09/2007 22:13:32
3 1 19 52428800 1 NO CURRENT 1036439 07/09/2007 09:56:44
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER
———- ——- ——- ————————————————-
3 ONLINE /database/data/redo03.log
2 ONLINE /database/data/redo02.log
1 ONLINE /database/data/redo01.log
Here is how i changed this to five 200M redo logs:
SQL> alter database add logfile group 4 (‘/database/data/redo04.log’) size 200M;
SQL> alter database add logfile group 5 (‘/database/data/redo05.log’) size 200M;
while running following sql commands, if you hit an error like this:
ORA-01623: log 3 is current log for instance RPTDB (thread 1) – cannot drop
ORA-00312: online log 3 thread 1: ‘/database/data/redo03.log’
you should run ” alter system switch logfile;” until current log is 4 or 5. Then execute “alter system checkpoint;”
SQL> alter database drop logfile group 1;
SQL> alter database drop logfile group 2;
SQL> alter database drop logfile group 3;
then move (or maybe drop) old redo logs
mv /database/data/redo01.log /database/data/redo01_old.log
mv /database/data/redo02.log /database/data/redo02_old.log
mv /database/data/redo03.log /database/data/redo03_old.log
finally
SQL> alter database add logfile group 1 (‘/database/data/redo01.log’) size 200M;
SQL> alter database add logfile group 2 (‘/database/data/redo02.log’) size 200M;
SQL> alter database add logfile group 3 (‘/database/data/redo03.log’) size 200M;