Import hangs On index level.

Today some customer contact me complaining that they are trying to sync the development with UAT, when i check the issue everything was normal for the first time, but the alert logs indicate that database could complete the checkpoint.

so this what i did to make the import faster ( which i completed it as well ) :-

  • Change database to no archive mode.
  • increase sga_target temporary.
  • use parallel command depend on cpu core.
  • Use commit=N with import parameters.
  • you can exclude indexes by exclude=indexes but i don’t prefer this at all.
  • increase db_cache_size.
This simple steps that could help someone to make import little faster or solve hang issue.
let me know if you need anything 🙂
Cheers
Merry Christmas guys 
Osama

create IPS repository in Solaris 11.2

I discussed before how to create package repository on Linux here, the same could be happened on Solaris 11.2 when you install Database any version mandatory packages should be installed to make it easy repository helps you a lot and will be available any time you need, and Image packaging system(IPS) repository is one of the important things in Solaris 11 onwards.

You need to download the following files & upload them to the server :-

Once the file is ready upload them to the server under one file called Repo for example. it should looks like the below :-

#ls -lrt
total 14373947
-rwx——   1 root     root     1771800121 Aug  9 08:24 sol-11_2-repo-1of4.zip
-rwx——   1 root     root     1889867782 Aug  9 11:20 sol-11_2-repo-2of4.zip
-rwx——   1 root     root     1902167161 Aug  9 22:34 sol-11_2-repo-3of4.zip
-rwx——   1 root     root     1790358735 Aug 10 00:16 sol-11_2-repo-4of4.zip
-rwx——   1 root     root        5594 Aug 10 20:16 install-repo.ksh
-rwx——   1 root     root         228 Aug 10 20:17 sol-11_2-repo-md5sums.txt
drwxr-xr-x   2 root     root           2 Aug 10 20:40 repo

#pkg publisher
PUBLISHER TYPE STATUS URI
solaris origin online http://pkg.oracle.com/solaris/release/

 as you see from the above output package publisher still working under oracle Link. Let’s Start Working, Set the executable bit for install-repo.ksh and execute like below.

#./install-repo.ksh -d /export/oracle/repo/ -v -c
Comparing checksums of downloaded files…done. Checksums match.
Uncompressing sol-11_2-repo-1of4.zip…done.
Uncompressing sol-11_2-repo-2of4.zip…done.
Uncompressing sol-11_2-repo-3of4.zip…done.
Uncompressing sol-11_2-repo-4of4.zip…done.
Repository can be found in /export/oracle/repo/.
Initiating repository verification.

Again Check the current publisher.

#pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F http://pkg.oracle.com/solaris/release/

configure the new publisher, Path should be the same.

#pkg set-publisher -G ‘*’ -M ‘*’ -g file:///export/oracle/repo solaris

#pkg publisher
UBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F file:///export/oracle/repo

Configure the repository service to point to the new location by run the following command :-

# svccfg -s application/pkg/server setprop pkg/inst_root=/export/oracle/repo 


Check

# svcprop -p pkg/inst_root application/pkg/server

Reload the Services Just to confirm :-

# svcadm refresh application/pkg/server

Cheers
Osama Mustafa

Use "sudo" Command without password Prompt

Sometimes you need to run Linux command without password prompt using sudo command.

to learn more about this command read the link here.

For Example i need to run the following command without password prompt, However there are three sudo commands I want to run without entering password:

  • sudo reboot
  • sudo shutdown -r now
  • sudo shutdown -P now
to do this follow the below steps :-
  • edit the following /etc/sudoers file.
  • you find the following lines depend on the username and hostname for the server.

user host = (root) NOPASSWD: /sbin/shutdown
user host = (root) NOPASSWD: /sbin/reboot

This will allow the user user to run the desired commands on host without entering a password. All other sudoed commands will still require a password.

Notes:

  • Always use the command visudo to edit the sudoers file to make sure you do not lock yourself out of the system for example 

sudo visudo -f /etc/sudoers.d/shutdown

  • Using /etc/sudoers.d instead of modifying /etc/sudoers, you could add the two lines to a new file in /etc/sudoers.d for example  /etc/sudoers.d/shutdown.
  • If you did not use visudo to edit your files and then accidentally messed up /etc/sudoers or messed up a file in /etc/sudoers.d then you will be locked out of sudo.to fix it use command pkexec.
Cheers
Osama Mustafa

ORA-47401: Realm violation for CREATE TABLE on SYSTEM.SYS_EXPORT_SCHEMA_07

When trying to export any user using system the below error appeared

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security,
OLAP, Data Mining, Oracle Database Vault and Real Application Testing optio
ORA-31626: job does not exist
ORA-31633: unable to create master table “SYSTEM.SYS_EXPORT_SCHEMA_07”
ORA-06512: at “SYS.DBMS_SYS_ERROR”, line 95
ORA-06512: at “SYS.KUPV$FT”, line 1020
ORA-47401: Realm violation for CREATE TABLE on SYSTEM.SYS_EXPORT_SCHEMA_07

The above error related because the system user is not allow to access data Dictionary files.

Run the below command
SQL>
BEGIN
DVSYS.DBMS_MACADM.ADD_AUTH_TO_REALM(
realm_name => ‘Oracle Data Dictionary’,
grantee => ‘SYSTEM’);
END;
/
PL/SQL procedure successfully completed.

Or you can use the GUI in Database vault and under Data Dictionray realms add the system user as participant.

Thank you  

connection to database cannot be established – DBCA

Environment :-

Oracle Grid Infrastructure 11.2.0.4
Nodes # : 4
Operating system : Redhat 6.6

When trying to configure enterprise manager the following error appeared :-

Connection to the database cannot be established because the listener could be down. Please make sure that the service is registered with a listener and the listener is up.

The listener is up, VIP is working on all nodes without any issue when check dbca logs looking for more details i found this error :-

dbca trace in $ORACLE_BASE/cfgtoollogs/dbca.

ORA-1017: invalid username/password

Both was correct, because of this i recreate password file on all nodes and restart my operation it’s working without any issue this time.

Thanks
Osama Mustafa

Oracle Streams ORA-44001: invalid schema

SQL> SQL> SQL> 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 job finished
  DECLARE
*
ERROR at line 1:
ORA-23616: Failure in executing block 7 for script
13F5CD569383406C82E7F63EE3F927E0 with
ORA-44001: invalid schema
ORA-06512: at “SYS.DBMS_RECO_SCRIPT_INVOK”, line 139
ORA-06512: at “SYS.DBMS_STREAMS_RPC”, line 465
ORA-06512: at “SYS.DBMS_RECOVERABLE_SCRIPT”, line 659
ORA-06512: at “SYS.DBMS_RECOVERABLE_SCRIPT”, line 682
ORA-06512: at “SYS.DBMS_STREAMS_MT”, line 7972
ORA-06512: at “SYS.DBMS_STREAMS_ADM”, line 2674
ORA-06512: at line 5

The error related to apply_queue parameter in oracle stream is not set with valid value, therefore set the parameter correctly like the below

apply_queue_user => ‘STREAM_ADMIN’ 

Cheers
Osama Mustafa 

[INS-30131] Initial setup required for execution of installer validation failed.

When trying to install Oracle client 12c the above error appeared , this issue can happened on windows Or linux.

The cause i really simple :-

On linux there is no enough space under /tmp.

On windows the solution like the following :-

  • Open Windows Services.
  • Stop Oracle Services –> OracleRemExec
  • Remove the OracleRemExecService
  • then try to install Oracle client again

Thank you 
Osama Mustafa

Apply Jdeveloper Patch

This blog post will show you how to apply Patch on Jdeveloper :-

  • Download the latest version of Opatch from http://support.oracle.com
  • Unzip the Patch Folder.
  • Set/export ORACLE_HOME to Jdeveloper hope depend on Operating system
  • Finally Opatch Apply to Jdeveloper Home.
If you faced any error with opatch commad try the below :-

opatch apply -jdk /u01/app/oracle/JDK/160_24

Cheers
Osama Mustafa