MySQL in Oracle Environments Part 1: Quick Start for the Oracle DBA

Source: MySQL in Oracle Environments Part 1: Quick Start for the Oracle DBA

This webinar covers the different use cases for MySQL and Oracle Database, as well as the tools to manage both databases. Additionally, the presentation spotlights top MySQL solutions for high availability, disaster recovery, and high-level security to protect your databases and business.You’ll also see the advantages of managing a MySQL database side by side with an Oracle database in the Oracle Public Cloud with the push-button ease of the MySQL Cloud Service.

Cheers !

Raheel

Posted in Uncategorized

ICACLS – A magic command

One of our colleague was configuring Auditing on MSSQL Server using Arcsight (more info about the tool can be found here ) and one of the steps is to create SQLTRACE folder and SHARE the folder and provided the necessary permissions for Arcsight AD user to read the SQL Trace files, and then enable the Auditing in MSSQL server and see the files are generating in the SQLTRACE folder. All went well, he could see the files but Arcsight AD user couldn’t see the files.

One thing was very sure, this is related to permissions issue but how come ? If we see the permission on the SQLTRACE it exists (right click -> properties -> security ) and even the Advanced includes “Applies To” – “This folder, subfolder and files”  for that user, but the same doesn’t exits for the SQL trace files generated from MSSQL Server.

Then this magic command ICACLS actually did the trick.

Here is the actual command

icacls * /T /Q /C /RESET

That’s it ! It worked.

Cheers !

Raheel

Posted in Auditing, Database Security | Tagged , , , | Leave a comment

ORA-01791: not a SELECTed expresssion

SQL query runs perfectly fine in 11.2.0.3 and not in 11.2.0.4 and reported with ORA-01791 error.

If the error “ORA-01791: not a SELECTed expresssion” is reported in 11.2.0.4 release then it’s a expected behavior and NOT a bug.

Solution:

Include the “order by” clause column in the SELECT statement.

Note: MOS ID: 1600974.1

Posted in Troubleshooting | Tagged , , , , | Leave a comment

Patching through OEM 12c in Offline mode

The below document is the step-by-step procedure to patch Oracle databases using OEM 12c in Offline mode.

SPU/CPU Patch Apply through OEM Cloud Control 12c (Offline Mode).pdf

Hope this helps

Cheers !!
Raheel Syed

Posted in OEM12c | Tagged , , , , , , , , | 1 Comment

Opatch Apply on Windows failed with CheckActiveFilesAndExecutables

While applying CPU Jan 2014 Patch on windows, opatch apply failed with error ‘CheckActiveFilesAndExecutables’

Following files are active :

D:\oracle\product\11.2.0\db_1\bin\oracommon11.dll
D:\oracle\product\11.2.0\db_1\bin\oraclient11.dll
D:\oracle\product\11.2.0\db_1\bin\orageneric11.dll
D:\oracle\product\11.2.0\db_1\bin\orapls11.dll
D:\oracle\product\11.2.0\db_1\bin\oran11.dll
D:\oracle\product\11.2.0\db_1\bin\oraxml11.dll
D:\oracle\product\11.2.0\db_1\bin\oci.dll
D:\oracle\product\11.2.0\db_1\bin\orahasgen11.dll
D:\oracle\product\11.2.0\db_1\bin\orahasgen11.dll
D:\oracle\product\11.2.0\db_1\bin\oraocr11.dll
D:\oracle\product\11.2.0\db_1\bin\oraocrb11.dll
D:\oracle\product\11.2.0\db_1\bin\oraocrutl11.dll
D:\oracle\product\11.2.0\db_1\bin\orannzsbb11.dll
D:\oracle\product\11.2.0\db_1\bin\orazt11.dll
D:\oracle\product\11.2.0\db_1\bin\oraasmclnt11.dll

Workaround:

1. Modify the Oracle services to Manual startup type.
2. Restart the server.
3. Rename the above .dll and try running opatch apply again.

Cheers !!!

Raheel Syed

Posted in Patch | Tagged , , , , , , , , , , , , , , , , | 2 Comments

scp – lost connection

Lost connection error when using scp

[oracle@server1 bkup]$ scp full_orcl.dmp myuser@server2:/app/oradump
myuser@server2’s password:
full_orcl  31% ********************************
lost connection

Resolution:
[oracle@server2 oradump]$ rsync –append –progress myuser@server1:/app/bkup/full_orcl.dmp .
full_orcl.dmp   5825256969   100%    1.78MB/s    1:22:47

Cheers !!!

Raheel

Posted in Linux | Tagged , | Leave a comment

ora-201 and Checker run found %n% new persistent data failures

Message from Alert.log:
Checker run found 3 new persistent data failures
ora-201 signalled during: alter database mount exclusive.

On Windows, when we stop and start the OracleService (services.msc) the above error reported.

Issue was with the permission on the controlfiles.

Moved Controlfiles to new location and issue got resolved.

Cheers !!!
Raheel Syed

Aside | Posted on by | Tagged , , , | Leave a comment

ORA-00001: unique constraint violated

IGNORE_ROW_ON_DUPKEY_INDEX hint is on rescue. This is the NEW feature in 11gR2 applied on INSERT statements, wherein duplicate values will be ignored rather causing ORA-00001 error.

Scenario: Development team wanted one of the STAGING table to be refreshed from PROD table without replacing the existing rows in the staging table.

Solution:

For understanding purpose I have created table EMP_BK as STAGING table and EMP as PROD table.

Existing table data:

Existing_table-data

SQL> insert into EMP_BK (empno,ename,job,mgr,hiredate,sal,comm,deptno) 
select empno,ename,job,mgr,hiredate,sal,comm,deptno from EMP;

insert into EMP_BK (empno,ename,job,mgr,hiredate,sal,comm,deptno) 
select empno,ename,job,mgr,hiredate,sal,comm,deptno from EMP;
*
error at line 1:
ora-00001: unique constraint (scott.pk_emp_bk) violated

SQL> insert /*+ ignore_row_on_dupkey_index(emp_bk,pk_emp_bk) */  
into EMP_BK (empno,ename,job,mgr,hiredate,sal,comm,deptno) 
select empno,ename,job,mgr,hiredate,sal,comm,deptno from EMP;

1 row created.

SQL> commit;

Commit complete.

Verify by querying the EMP_BK table


SQL> SELECT * FROM EMP_BK;

EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
7369 SMITH      CLERK           7902 17-DEC-80        800                    20
7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
7566 JONES      MANAGER         7839 02-APR-81       2975                    20
7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
7839 KING       PRESIDENT            17-NOV-81       5000                    10
7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
7900 JAMES      CLERK           7698 03-DEC-81        950                    30
7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
1022 RAHEEL     DBA             7782 29-DEC-13       2000          0         30

15 rows selected.

Cheers,
Raheel

Posted in 11gR2, New Features | Tagged , , , | Leave a comment

Recovering from rm -rf on a datafile

This should save me from embarrassment.

jarneil

This blog posting is entirely the credit of Frits Hoogland, who pointed out to me that this was possible.

I managed to delete a datafile, that while it had been created in a completely stupid location, was very much in use. I’m sure we’ve all been there, I mean who hasn’t run rm -rf somewhere they shouldn’t have? When I subsequently checked the database and saw no flashback database, I realised this was going to mean the database being recreated. It was non-production of course, so no real big deal, but still a bit of work none the less. Thanks to Frits’ suggestion though, I could have saved myself some of that work!

First lets create a tablespace, in a really dumb location:

So we have a schema temp_test with a simple table that was created in the temp_test datafile (this was default tablespace of temp_test user). Now we…

View original post 295 more words

Posted in Troubleshooting | Tagged , , | Leave a comment