Posts

Showing posts from May, 2013

Increase /tmp Using Zfs Solaris 11

zfs create -V 1gb rpool/newtmp
swap -a /dev/zvol/dsk/rpool/newtmp

 Old Size :

swap                   159M   212K       159M     1%    /tmp
rpool/export            78G    32K        67G     1%    /export
rpool/export/home       78G    32K        67G     1%    /export/home
rpool/export/home/omnix
                        78G   790K        67G     1%    /export/home/omnix
oracle                 118G   1.1M        11G     1%    /oracle
rpool                   78G    39K        67G     1%    /rpool
oracle/u01             118G    93G        25G    79%    /u01
/oracle                 11G   1.1M        11G     1%    /home/oracle
New Size :

root@HMMDB:/# zfs create -V 1gb rpool/extraswap
root@HMMDB:/# zfs list
NAME                      USED  AVAIL  REFER  MOUNTPOINT
oracle                    107G  10.6G  1.11M  /oracle
oracle/u01               92.6G  25.0G  92.6G  /u01
rpool                    12.6G  65.6G    39K  /rpool
rpool/ROOT               5.39G  65.6G    31K  legacy
rpool/ROOT/solaris       5.39G  65.6G…

Flashback version query/Operation Column is Unknown

SQL > SELECT START_SCN,OPERATION,LOGON_USER,XID FROM  FLASHBACK_TRANSACTION_QUERY WHERE TABLE_NAME='TEST'; The Output will be like this :


XID              TABLE_OWNER TABLE_NAME OPERATION           LOGON_USER UNDO_SQL
---------------- ----------- ---------- -------------------------------- ----------              ---------------
0600090064030000              TX         UNKNOWN                          TEST
0600090064030000              TX         UNKNOWN                          TEST

To avoid Unknown Status enable  supplemental logging by

SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA ;

Database altered.
Thank you
Osama mustafa

Enable FTP On Redhat

to enable FTP on Redhat on you have to follow to follow the below step,you need to define which user will use the FTP, in this article i will use root user :

Edit the files /etc/vsftpd.ftpusers and /etc/vsftpd.user_list looks like :

#

# List of users denied access to the FTP server, see ftpusers(4).
#
root
daemon
bin
sys
adm
lp
uucp
nuucp
dladm
netadm
netcfg
smmsp
xvm
mysql
openldap
webservd
nobody
noaccess
nobody4
unknown
zfssnap
aiuser

and remove root user from each file.

You can control ftp as services from


/etc/init.d/vsftpd
Thank you
Osama Mustafa

ORA-00607/ORA-00600

ORA-00600: internal error code, arguments: [4193], [4271], [4056], [], [], [], [], []
As you see the above error ORA-00600 usually Indicate for Bug, A mismatch has been detected between Redo records and Rollback (Undo)  records. and to solve this issue you need to do the below :
SQL> show parameter undo
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
undo_management                      string      AUTO
undo_retention                       integer     900
undo_tablespace                      string      UNDOTBS
SQL> alter system set undo_management='MANUAL' scope=spfile;
SQL > Shutdown immediate ;
SQL > Startup ;  SQL > create undo tablespace NEW_UNDOTBS datafile '/u01/app/oracle/oradata/SID/NEW_UNDOTBS01.DBF' size 1G ;
SQL> alter system set undo_tablespace='NEW_UNDOTBS' scope=spfile; System altered. SQL> alter system set undo_management='AUTO' scope=s…

em12c agent software unavailable

Image
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 …

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

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

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.zipp9239090_R12_LINUX_2of6.zipp9239090_R12_LINUX_3of6.zipp9239090_R12_LINUX_4of6.zipp9239090_R12_LINUX_5of6.zipp9239090_R12_LINUX_6of6.zipp9239095_R12_GENERIC.zipp9822544_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 f…

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…

" java.lang.UnsatisfiedLinkError" When Run Oracle EBS

Exception in thread "main" java.lang.UnsatisfiedLinkError: /u01/media/StageR12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.6.0/lib/i386/xawt/libmawt.so: libXi.so.6: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at sun.security.action.LoadLibraryAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.NativeLibLoader…

Which module You installed on Apps

Sometimes you need to check which module you installed in oracle E-business suite and to do that there's more one way :

using Query / as Apps User :


SELECT a.application_name,a.product_code,
DECODE (b.status, 'I', 'Installed', 'S', 'Shared', 'N/A') status,
patch_levelFROM apps.fnd_application_vl a,
apps.fnd_product_installations b
WHERE a.application_id = b.application_id
and b.status='I' order by product_code asc;

Using adutconf.sql scripts which is located in $AD_TOP

This script include information about Product installation status, version and other information.

Using Oracle Application Manager ( OAM )

Site Map ---> License Manager Which licensed word means installed.


Simple


Thank you
Osama Mustafa

Step By Step Remove Oracle Table Lock

All your query should be done using sys user or system user, after that you need to find Session SID with below query :


SQL> SELECT SESSION_ID
  2  FROM DBA_DML_LOCKS
  3  WHERE NAME = 'EMP_INFORMATION';
Where EMP_INFORMATION is Table_name

Output :

SID
___
424
Next step it's talking about How to find Serial# :


SELECT SID,SERIAL#
FROM V$SESSION
WHERE SID IN (SELECT SESSION_ID
FROM DBA_DML_LOCKS
WHERE NAME = 'EMP_INFORMATION') Output :

SID                SERIAL#
----                 -------
424                 1103 Use Alter system To kill this session :
ALTER SYSTEM KILL SESSION 'SID,SERIALl#';

Thank you
Osama mustafa





Configure Email Notification and Incidents Rule

Image
Before I talked about how to Install and Add Target in Enterprise Manager 12c today i will talk how to enable Email notification and Incidents Rule Step By Step and as usual you can download the article as PDF file :

Check the below picture the fill with Correct Parameter to enable email notification First


If you need to customize your Email format that will be deliver to you go to the below section in em12c :





The Below Page will appear to you choose which Type you want to customize



now Let's work On Incident Rules, From Setup --> Incidents --> Incident Rules

New Page will appear With Some Content All you have to do is Press "Create Rule Set" and below page will appear, Choose the name for Rule Set, which target this Rule set will be applied




On Second Tab " Rule" Press Create to add new One


There's Description for each Type I will choose the first one



After That follow the instruction to create your own Rule Set ,
First you need to choose which type …

Add Target Manually / Enterprise Manager 12c

Image
previously I mentioned how to deploy agent in enterprise manager using Auto Discovery, But today I will Post about the second way which called "Add target Manually" all you have to do is follow the screen shot and the instruction :

Setup --> Add target --> Add Target manually


Choose the first Option

 New Page will appear -- > Press add and Type Hostname for the server and which Operating system installed it on it.


Insert your Agent Path ( where you want to install agent ) and username

Review and then Deploy Agent


You can download this article here

Thank you
Osama Mustafa

Deploy Agent In Enterprise Manager 12c

Image
After I post about how to install Oracle Enterprise manager ( em12c ) today i will talk how to deploy em12c agent

there's two method to do that
1) Configuring Automatic Discovery
2) Adding targets Manually
I will describe the both :) each one separately

Before deploy you need to decide if you want to use Oracle user or root user the below steps you have to do before using oracle :

[root@em12c ~]# vi /etc/sudoers
and change and add the following lines :
Comment this line :

#Defaults    requiretty add the below line

oracle  ALL=(ALL)       ALL
and remove ! from this line :
Defaults   visiblepw Now On em12c There's something called privilege delegation

Privilege delegation allows a logged-in user to perform an activity with the privileges of another user. Sudo and PowerBroker are privilege delegation tools that allow a logged-in user to be assigned these privileges. These privilege delegation settings will be used for all provisioning and patching activities on these hosts.

R…

3872 Actual Result: Port 3872 passed is busy Check complete

This error appear while trying to deploy agent for Enterprise manager 12c (em12c) and the cause for this error that port 3872 is already in use :

solution


[root@em12c Middleware]# netstat -anp | grep 3872

tcp        0      0 :::3872                     :::*                        LISTEN      2391/java    

[root@em12c Middleware]# kill -9 2391

[root@em12c Middleware]# netstat -anp | grep 3872

Deploy Again

Thank you
Osama Mustafa