Tag: Linkedin Osama Mustafa
Avoid Backup Database with corrupted Archivelog
Corrupt block seq: 34229 blocknum=1.
Bad header found during deleting archived log
Data in bad block – seq:0. bno:0. time:0
beg:0 cks:0
calculated check value: 0
No need for Oracle DBA to tell you there’s corruption , usually this error indicate that archivelog is corrupted in our case Archivelog number 34229.
To Solve this problem :
1- Check Validate for this archivelog
RMAN> validate archvielog sequence 34229;
2 – Now to avoid this error , you should delete archivelog on Os level.
3 –
RMAN > crosscheck archivelog all;
DELETE EXPIRED ARCHIVELOG sequence 34229;
Then Backup database.
Thank you
Osama Mustafa
Oracle Security Case Study
In most of the companies , there is access to Email Systems, Intranet , networks and internet , most of these user are using the application that connected to Database ( assume that it’s Oracle Database).
By Creating Security Procedure to protect database and what this database contain you create hard environment to deal with since the three compentents are availability, integrity and secuirty which mean if you increase the security then integrity will not be on the same level and so on,The Oracle database has several layers of security and provides auditing functionality at each level. most of then mention in Oracle Security Section website.
- Password management : One of the basic steps to Enforce user to follow the rules such as : password expiration, limit password reuse, limit the number of failed logon attempts, force password complexity, lock and expire database accounts
- Database Auditing to monitor user activity.
- Fine Grained Auditing to define specific conditions necessary for an audit record to be generated, resulting in a more meaningful audit trail
- Database Resource Manager to set resource limits and quotas on the amount of various system resources available to users
- Roles to manage object privileges
- Oracle Label Security for more sophisticated row level security
- Data Encryption to provide an additional layer of protection
Limit The Access To The Database
Resource_limit should set to True
SQL> show parameter resource
NAME TYPE VALUE
———————————— ———– ——————————
resource_limit boolean TURE
resource_manager_plan string
After change this parameter Bounce database.
Connect to database using sysdba privileges
sqlplus / as sysdba
create profile Only_one_user limit sessions_per_user 1;
Create New User/modify old one depend on what you want:
create user test identified by test profile Only_one_user;
grant connect to test;
Now Try to connect to this user using more than one terminal, if you did you will receive error
ORA-02391: exceeded simultaneous SESSIONS_PER_USER limit
Thank you
Osama Mustafa
Most Common Dbcontrol issue
Notice that sometime the Solution will be different Regarding to DB version and OS Version I will Post Some MOS notes that could help you. Sometimes you need to apply Patch and on other hand there’s Workaround.
Error #1 :
Exception in thread “main” oracle.sysman.emcp.exception.DatabaseUnavailableException: Database instance unavailable
Solution :
- -Make Sure you Database is Up and Running.
- -Set/export ORACLE_SID.
- -Check if Database registered with Listener.
You can get back to this MOS note :
EMCA fails with “SEVERE: Database instance unavailable” [ID 750697.1]
EMCA fails with Database Instance is unavailable. Fix the ORA error thrown and run EM Configuration Assistant again. [ID 1511262.1]
Creating dbconsole 11.2 fails with “Exception in thread “main” oracle.sysman.emcp.exception.DatabaseUnavailableException: Database instance unavailable” on Windows [ID 1332546.1]
Error #2:
Running EMCA fails with “SEVERE: Invalid username/password”
Solution :
- -Make Sure You Insert Correct Password.
- -In Some Version you can use “Password”
- -Recreate Password File.
You can Get back to this MOS note :
Problem: Running EMCA fails with “SEVERE: Invalid username/password” [ID 744176.1]
EMCA fails with SEVERE: Invalid username/password or database/scan listener not up or database service is not registered with scan listener. [ID 1330272.1]
Error #3:
WARNING: ORA-01031: insufficient privileges
Solution
You need to check the logs, different error could be appear.
Failed to unlock all EM-related accounts
Alter User Identified By
Also Check MOS Notes :
Troubleshooting the ‘ORA-01031: insufficient privileges’ error when using EMCA to Create or Drop DBconsole [ID 358201.1]
Error #4:
SEVERE: Listener is not up or database service is not registered with it. Start the Listener and register database service and run EM Configuration Assistant again .
Solution :
- – set/export ORACLE_SID
- -Check your Listener.
- -Check if Database Registered.
Check the below MOS note :
Troubleshooting the EMCA Error “ORA-12514” “Listener is not up. Start the Listener and run EM Configuration Assistant again” When Creating or Dropping DBConsole [ID 368591.1]
EMCA Fails With Error “ORA-12541: TNS:no listener” and “Listener is not up. Start the Listener and run EM Configuration Assistant again” [ID 975024.1]
DBMS_METADATA
TableSpace
select dbms_metadata.get_ddl(‘TABLESPACE’,tablespace_name) from dba_tablespaces;
Get All Tablespace Script :
set head off echo off
select ‘select dbms_metadata.get_ddl(”TABLESPACE”,”’
|| tablespace_name || ”’) from dual;’ from dba_tablespaces
Table
select dbms_metadata.get_ddl(‘TABLE’,’DEPT’,’SCOTT’) from dual;
User
SELECT dbms_metadata.get_ddl(‘USER’,’SCOTT’) FROM dual;
Role
SELECT DBMS_METADATA.GET_GRANTED_DDL(‘ROLE_GRANT’,’SCOTT’) from dual;
SELECT DBMS_METADATA.GET_GRANTED_DDL(‘OBJECT_GRANT’,’SCOTT’) from dual;
SELECT DBMS_METADATA.GET_GRANTED_DDL(‘SYSTEM_GRANT’,’SCOTT’) from dual;
SELECT dbms_metadata.get_ddl(‘ROLE’,’RESOURCE’) from dual;
This is the Most common Usage for this package more information read Oracle Documentation
Thank you
Osama mustafa
Using Production Data is this Right ?
I seen lot of Company Use Production Data on development database/Test Database because it’s great for testing,really easy and No cost for doing this but is this right ? My View On this Topic No production data is allowed on the development. There’s lot of point to discuss to proof exactly what i mean and if it’s necessary to use it then hide it with multiple ways i will talk about it.
There is a lot more chance that the data may be compromised,This data should be removed and sanitized to make it anonymous / De-personalized.I read lot of articles every article explain something different for example This article support using Prod Data. after reading this blog ask yourself one question how the production make job easier ? by let developer/unauthorized people looking to customer Data !!!! Different point of view Customer want their data to be secure and the employees want to test the code and something easy and real to use.
Check this The Ponemon Institute has come out with some interesting (and scary) data on data security during development and testing.
This chart shows what Breach of data. It shows a lot of sensitive data such as card holder data, customer data, credit card information and business confidential information.
Personally I prefer to use a subset or dummy data use Red-Gate Data Generator,
There’s lot of security issue can be lead by Using Prod data for testing/development such as severely compromise its confidentiality, even leading to legal action.
Take this example Hannaford Brothers,In March, the Maine-based Hannaford Brothers grocery store chain
announced that 4.2 million customer card transactions had been compromised by the hackers. More than 1800 credit card numbers were immediately used for fraudulent transactions.
after all this examples is it Ok to use Prod Data On test ? Do you have a legitimate reason? do you have
Security,Encryption, Firewalls, Breech Detection , Include to that There’s difference Security Rules On prod data and Test Data , Production database For authorized People, Privacy, Auditing, Roles , Privileges lot of conditions to access it. on the other hand Development data Frequently wide open,Dozens of employees have access, Access from many to unlimited places, Home access And you still Want to use Production Data ? Do you programs care or know the difference ?
Some Rules you have to follow :
- Make your employees aware of the policies and procedures.
- If it is possible to not use production data, take that option.use alternate ways of testing scenarios.
- Ensure that production data is masked or scrubbed when it is moved out of the production environment.
if it’s necessary to use your Production Data Then Do it right by scrambling (Scrambling is the function of replacing a character (or byte) of data with a different character (or byte) of data) Oracle Provide you with solutions to do that called data masking By write your own function that will Scramble data for you.
another option could be use is encryption (Encryption is a series of algorithms used to encrypt data into nonsensical characters (not in the English alphabet)). There’s Another way you can hide production data NULL’ing Out,Substitution, Gibberish Generation ….
Finally Using live data in non-production is either illegal or expensive. For the companies using it illegally, it’s only a matter of time before somebody slips up and the practice is discovered
Read Ponemon Institute Report
Osama Mustafa
Cancel Request In Conurrent Manager
Update Fnd_Concurrent_Requests
SET Phase_Code = ‘C’,
Status_Code = ‘E’
Where Request_ID = ;
Or you can Replace Retest_id with CONCURRENT_PROGRAM_ID.
Thank you
Osama Mustafa
What is ORA-00600
ORA 600 “internal error code, arguments: [%s], [%s],[%s], [%s], [%s]”
and you should it’s different Oracle errors , Because when you see this error then it’s indicating for bugs, the above is general description for the error the first characterset / Number is is used with database version to identify the problem by oracle support. and maybe you will find related document on https://support.oracle.com.
When you face this error you should check the below document searching for some Notes/Patch could help you :
Note 600.1 ORA-600/ORA-7445 Lookup tool
You need to Choose database version ( 4 digit ) and First argument in the error, also for more information how to use this tool :
Note 1082674.1 : A Video To Demonstrate The Usage Of The ORA-600/ORA-7445 Lookup Tool [Video]
Notice when you check the alert log and see this error, a trace file is generated and an entry is written to the alert.log with details of the trace file location, trace file provide you with more information about the error that could help you to solve it. you can check the below document how to use trace file :
Note 453125.1 11g Diagnosability Frequently Asked Questions
Note 443529.1 11g Quick Steps to Package and Send Critical Error Diagnostic Information to Support[Video]
Most Common Reason for ORA-00600 File-Corruption, Failure in Hardware, I/O , or memory, to solve this error you need to do some steps before Open Services Request :
- Check Alert Log .
- Don’t forget to look at the Ora-00600 Tools.
- If you find any Notes related to your problem use it and read it carefully.
- The last option you could help is contact Oracle Support by open Services Request but provide the full information such as:
- alertlog for database.
- Traces.
- If any change happened lately included with SR.
- I post About RDA it’s useful to use it when you open SR.
Thank you
Osama Mustafa
EBS 11i MOS notes
NOTE.362473.1 : Cloning E-Business Suite Using Hot Backup for Minimal
NOTE.216212.1 : Business Continuity for Oracle Applications Release 11i
NOTE.233428.1 : Sharing the Application Tier File System in Oracle
NOTE.230672.1 : Cloning Oracle Applications Release 11i with Rapid Clone
NOTE.216664.1 : FAQ: Cloning Oracle Applications Release 11i
NOTE.135792.1 : Cloning Oracle Applications Release 11i
Patching
NOTE.174436.1 : Oracle Applications Patching FAQ
NOTE.175485.1 : How to Apply an 11i Patch When adpatch is Already Running
NOTE.181665.1 : Release 11i Adpatch Basics
Autoconfig:
NOTE.218089.1 : Autoconfig FAQ
NOTE.165195.1 : Using AutoConfig to Manage System Configurations with
NOTE.270519.1 :Customizing an AutoConfig Environment
General Notes:
165195.1 “Using Autoconfig to Manage System Configurations with Oracle Applications 11i”.
218089.1 “Frequently Asked Questions about Using Autoconfig with Oracle Applications Release 11i”.
217368.1 “Advanced Configurations and Topologies for Enterprise Deployments of E-Business Suite 11i”.
362135.1 “Configuring Oracle Applications Release 11i with 10g Release2 Real Application Clusters and Automatic Storage Management”
123718.1 “A Guide to Understanding and Implementing SSL with Oracle Applications 11i”.
125767.1 “Upgrading Developer 6i with Oracle Applications 11i”.189708.1 Oracle Reports 6i Setup Guide for Oracle Applications 11i
273888.1 Steps to Upgrade Oracle Apps 11.5.4 to Latest Version or 11.5.9
437794.1 Database Status Check Before, During And After Migrations and Upgrades
362202.1 Oracle Applications Release 11i with Oracle 10g(10.1.0.4)
165195.1 for more information on how to run autoconfig
233436.1 Installing Oracle Application Server 10g with Oracle E-Business Suite Release 11i
313418.1 Using Discoverer 10.1.2 with Oracle E-Business Suite 11i.
352843.1 HOW TO RUN A PATCH IMPACT ANALYSIS IN OAM











