Tuesday, May 21, 2013

em12c agent software unavailable

Sometimes you need to deploy new agent to different machine or database, and to do that you have to add target and choose which platform installed but Agent software unavailable  this is the message you will see.





to solve this :

Setup >> Extensibility >> Self Update

Connection mode should be Offline ( you need to configure System Library to change Connection mode or Error will be appeared )


After change Connection mode to offline back to self_update main screen And Press Check Updates



New Box Dialog will appear 



You need to visit https://support.oracle.com and download patch number 9348486 after finish downloading copy to OMS server using FTP and don't unzip it.

Run the below command
 ./emcli import_update_catalog -file=/u01/p9348486_112000_Generic.zip -omslocal
if the below error show up :


Error: The command name "import_update_catalog" is not a recognized command.
Run the "help" command for a list of recognized commands.
You may also need to run the "sync" command to synchronize with the current OMS.
Do the following :
 ./emcli login -username='SYSTEM'
Enter password
Login successful
 ./emcli sync
Synchronized successfully
And Re-Run The Above Command Again,

The output will look like this 



after doing this will be able to see  all the agent Software in Self-update like the below.



now each kind of agent you need to download you have to install the patch and apply
 ./emcli import_update_catalog -file= ..... 
You can download the article from here

Thank you
Osama Mustafa

Expdp Error --> ORA-31617/ORA-19505/ORA-27037

Setup like the following :

Database 11gr2
Rac 11gr2

When trying to expdp the below error appear :

expdp dumpfile=tdmp_test.dmp logfile=1.log directory=expdp_folder schemas=siebel parallel=4


ORA-31693: Table data object "CS_XM_TEMP"."CS_XM_TEMP_CC" failed to load/unload and is being skipped due to error:
ORA-31617: unable to open dump file "/u01/expdp /dump_test.dmp" for write
ORA-19505: failed to identify file "/u01/expdp/dump_test.dmp"
ORA-27037: unable to obtain file status

You need to make sure of the below :
-  Folder exdp_folder should be exists on the both nodes with same path.

even if you try to connect using tnsnames it will generate error so solution
-Remove parallel from your expdp command to be like this

expdp dumpfile=tdmp_test.dmp logfile=1.log directory=expdp_folder schemas=siebel 

-Use Cluster Option in expdp

expdp dumpfile=tdmp_test.dmp logfile=1.log directory=expdp_folder schemas=siebel cluster=n

Thank you
Osama mustafa

Monday, May 20, 2013

Startup database with ORA-00000


SQL*Plus: Release 11.2.0.3.0 Production on Mon May 20 12:26:29 2013

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

Connected.
SQL>
SQL>
SQL> startup ;
ORA-00000: normal, successful completion


you need to investigate  more about this error most the cause for this error :

1- Oracle Home contain "/" in the end of detestation.
2- if one not works for you, Then you need to check your networks included with listener


Thank you 
Osama Mustafa 

SQL*Plus: Release 11.2.0.3.0 Production on Mon May 20 12:26:29 2013

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

Connected.
SQL>
SQL>
SQL> startup ;
ORA-00000: normal, successful completion

Wednesday, May 15, 2013

Oracle Error : ORA-31003/ORA-06512

The Below Error Appear when you are trying to use dbms_network_acl_admin

ORA-31003: Parent /sys/acls/File_name.xml already contains child entry
ORA-06512: at "SYS.DBMS_NETWORK_ACL_ADMIN", line 226
ORA-06512: at line 30
ORA-01403: no data found

The Solution Is Simple

exec dbms_network_acl_admin.drop_acl('/sys/acls/file_name.xml');
Commit
Re-Run Script Again.

Thank you
Osama Mustafa

Upgrade R12.1.1 To R12.1.3

To Upgrade Oracle EBS R12.1.1 To R12.1.3 Follow the Below Steps :

From https://support.oracle.com you have to download the following patch :



  • p9239090_R12_LINUX_1of6.zip
  • p9239090_R12_LINUX_2of6.zip
  • p9239090_R12_LINUX_3of6.zip
  • p9239090_R12_LINUX_4of6.zip
  • p9239090_R12_LINUX_5of6.zip
  • p9239090_R12_LINUX_6of6.zip
  • p9239095_R12_GENERIC.zip
  • p9822544_R12.MSC.B_R12_GENERIC.zip(Optional)
  • p10349415_R12.AD.B_R12_GENERIC.zip (Optional)
  • p9239089_R12.AD.B_R12_LINUX.zip

Before Start Working You have to shutdown all application Services using  ( adstpall.sh ) and enable maintenance mode using adadmin 

Run the Patch in Order like the following, before apply Any Patch you need to check README.txt for any Pre-Install Step/Post-Install Step 


1- Start with patch Number 9239089 , before do that on Readme.txt you have to do the below :
-Open Two Session ( Terminal ) Run Apps Env On Terminal #1, Terminal #2 run database Env.
-On DB Terminal Create under $ORACLE_HOME/Appsutil/admin 
-Copy adgrants.sql (Unix)  from patch folder to Above folder.
-From $ORACLE_HOME/appsutil/admin Run adgrants.sql
-sqlplus /nolog
-SQL> @$ORACLE_HOME/appsutil/admin/adgrants.sql


2-Apply Patch 10349415
3-Apply Patch 9239090
4-Apply Patch 9239095
5-Apply patch 9822544 
6-Apply Patch  9817770 
7-Apply Patch 9966055

After you Applied all the above patch Do the below steps :

On Application Tier :

  • Run Autoconfig ( Which is Located $ADMIN_SCRIPT_HOME )
  • Run the admkappsutil.pl ( Located in $AD_TOP/bin/admkappustil.pl ) Using the below command 
perl /bin/admkappsutil.pl
This will generate new appsutil.zip located in  $INST_TOP/admin/out

On Database Tier :

Copy appsutil from Application tier to $ORACLE_HOME,Unzip in under $ORACLE_HOME Like the below

  • cd $ORACLE_HOME
  • unzip appsutil.zip
  • Run autoconfig for Database Tier located in ( $ORACLE_HOME/appsutil/admin) --> adauto.sh
Finally two more simple step, you need to run adpreclone on Database Tier & application Tier using the below command :

  • perl adpreclone.pl dbTier (located in $ORACLE_HOME/appsutil/admin)
  • perl adpreclone.pl appsTier (Located in $ADMIN_SCRIPT_HOME)
Disable Maintenance mode now. 

Sqlplus apps/***

SQL> select release_name from fnd_product_groups;

RELEASE_NAME
--------------------------------------------------
12.1.3


Start Application Services using ( adstrtall.sh )

Thank you
Osama mustafa

Tuesday, May 14, 2013

Oracle Security Topic, what you should be Afraid of ?

Again !!!!

SQL injection Occur when someone ( Hackers ) Writing Web application code that access to your database this code contain special format.

As DBA you need to understand who access to database and corporate with developers and make sure they are connect in secure way. and Use good SQL statement to avoid SQL injection, because of this Don't relay on your firewall always make sure you secure your database and your code before start working on firewall, i am not saying here firewall will not protect your database yes it will but don't forget now these days we have devices and complex network wireless, IPAD , Mobiles , Devices and Laptop are connected to your network, so in that case firewall will not protect you 100%, secure for better reasons :)

Users connect to database using Listener, Even database is down and listener is up user can still open connection to database ( which is caused the problem ) you can access to the server because there is no authentication way in listener, lot of examples on this type of attackes.

to solve this issue you need to Patch & patch OS and Database to ensure all security bugs and fixed.

there's different type of oracle vulnerabilities Buffer overflow , listener issues , misunderstanding configuration and PL/SQL which indicate to SQL injection. most of our fears is not outside hackers/attacker it's internally such as employee, hacking lessons online on internet and free everyone want to try it where mostly in work, in 2008 reports indicate that 26% of hacking issues happened because employee ignorant.

Company ignore security side because Resource such as money and consultant but they will not do that after they get hacked and lose everything data and customer information.

Most of the company has network administrator and system administrator so if you secure OS & network well your database will be secure.

Thank you
Osama Mustafa