Monday, November 23, 2015

DBCA hangs after click Finish button

Today I have ran DBCA tool to create database.
All the sudden, I found FINISH button is not working anymore! DBCA is hangs after all. The only option is to cancel the DBCA.

However, there is warning messages after issued dbca.

It's the time to refer MASTER NOTE... Master Note: Troubleshooting Database Configuration Assistant (DBCA) (Doc ID 1510457.1)

Finally, I got this related document.
DBCA/DBUA APPEARS TO HANG AFTER CLICKING FINISH BUTTON (Doc ID 727290.1)


In 10.2 trace information should be written automatically to the following location  
$ORACLE_HOME/cfgtoollogs/dbca/trace.log

In my scenario, I am using Xming as X-tool because it is FREE! That's all!
The recommendation is to install the complete font package.

Go this website http://www.straightrunning.com/XmingNotes/


Download and install.
 
 
 
 


 

The result is

Wednesday, August 12, 2015

ORA-02024: database link not found


I am using 'SYS' to drop the database link of another owner 'ALEE'.
But, the error have been prompted.

 

There are 2 suggestions from Oracle experts to create drop db link procedure.

1) Procedure with delete single database links with owner. and db link name.
SQL> CREATE OR REPLACE PROCEDURE Drop_DbLink(schemaName VARCHAR2, dbLink VARCHAR2 ) IS
            plsql   VARCHAR2(1000);
            cur     NUMBER;
            UID     NUMBER;
            rc      NUMBER;
    BEGIN
            SELECT
                    u.user_id INTO UID
           FROM    dba_users u
           WHERE   u.username = schemaName;
             plsql := 'drop database link "'||dbLink||'"';
             cur := SYS.Dbms_Sys_Sql.open_cursor;
             SYS.Dbms_Sys_Sql.parse_as_user(
                   c => cur,
                   STATEMENT => plsql,
                   language_flag => DBMS_SQL.native,
                   userID => UID
          );
             rc := SYS.Dbms_Sys_Sql.EXECUTE(cur);

             SYS.Dbms_Sys_Sql.close_cursor(cur);
   END;
   /

 Procedure created.

SQL> EXEC Drop_DbLink( 'ALEE', 'LCNPDB_CRP' );
PL/SQL procedure successfully completed.


2) Procedure with delete all database links with single owner.
SQL> CREATE OR REPLACE PROCEDURE DropSchema_DbLinks(schemaName VARCHAR2 ) IS
    BEGIN
            FOR LINK IN(
                    SELECT
                            l.db_link
                    FROM    dba_db_links l
                    WHERE   l.owner = schemaName
            ) LOOP
                    Drop_DbLink(
                           schemaName => schemaName,
                           dbLink => LINK.db_link
                   );
           END LOOP;
   END;
   /

  Procedure created.

 SQL> EXEC dropschema_dblinks('ALEE');
 PL/SQL procedure successfully completed.

As conclusion, in order to drop private db_link is require for owner password and now we have another way to drop db links using procedures. It is consider very efficient and good to handle.

Thursday, July 30, 2015

Connect to Oracle Database through JDBC Thin/OCI Drivers


Yesterday, there was friend asked me about the jdbc connection. I have performed simple testing on his case.

The two most common methods of connecting to Oracle databases via JDBC are the Oracle Thin JDBC driver and the Oracle OCI JDBC driver.


Oracle JDBC Thin Driver Format - require Oracle JDBC driver jar file
Oracle JDBC Thin using a Service Name
jdbc:oracle:thin:@//<host>:<port>/<service_name>

Oracle JDBC Thin using an SID
jdbc:oracle:thin:@<host>:<port>:<SID>

Note: Support for SID is being phased out. Oracle recommends that users switch over to using service names.

Oracle JDBC Thin using a TNSName
jdbc:oracle:thin:@<TNSName>
Note: Support for TNSNames was added in the driver release 10.2.0.1

Oracle JDBC OCI Driver Format - require Oracle client software
jdbc:oracle:oci:@<database_name>

With the simple setup for his data source:
dataSource.url = jdbc:oracle:oci:@ADSBCPD or
dataSource.url = jdbc:oracle:thin:@AYSBDBS01:1621/ADSBCPD

The connection from his system to database was working pretty good.

Friday, June 26, 2015

PRVF-5300 - Failed to retrieve active version for CRS on this node


Did anyone of you encountered this error during the installation of 11g database instance?
I was just setup my GRID infrastructure 11.2.0.3.0 in my environment, this is further up to install database instance into my environment.
Until prerequisite verification step, oracle installation thrown me this error!
Oh my goodness, how do I continue?



To capture the exact error, I have to rerun the installation with debug mode.
 ./runInstaller -debug -logLevel finest >error1.out 2>error2.out

 "[pool-1-thread-1] [ 2015-06-26 14:57:01.348 SGT ] [ClusterInfo.getReleaseVersionString:1999]  Release version = 11.2.0.3.0]
[pool-1-thread-1] [ 2015-06-26 14:57:01.348 SGT ] [VerificationUtil.getSIHAReleaseVersionObj:4973]  HA version string obtained: '11.2.0.3.0'
[pool-1-thread-1] [ 2015-06-26 14:57:01.348 SGT ] [Version.getVersion:497]  version String is 11.2.0.3.0
[pool-1-thread-1] [ 2015-06-26 14:57:01.349 SGT ] [Version.getVersion:498]  new Version().toString is 11.2.0.2.0
[pool-1-thread-1] [ 2015-06-26 14:57:01.359 SGT ] [VerificationUtil.getSIHAReleaseVersionObj:4986]  Configuration Exception:
PRKC-1137 : Unable to find Version object with string value 11.2.0.3.0
"

In my point of view, this is related to oracle database software version 11.2.0.2.0 doesn't not recognize with version string of the newer GRID infrastructure 11.2.0.3.0.

Run the below command to ignore the prerequisite checking.
./runInstaller -ignorePrereq

The installation is completed successfully.























Friday, June 19, 2015

ACFS-9129: ADVM/ACFS not installed in Oracle Linux 6


Oracle Version: 11.2.0.3
OS: Oracle Linux 6
Database Server: oratest01

I'll been sometimes never update my blog, due to I've a busy day with performance tuning course and stock market.
Since this evening, I have sometimes, I would like to share with you the issue on my new GRID infrastructure installation. The issue is about ACFS not able to detect in my new installation.

Current OS platform checking.
[root@oratest01 bin]# uname -a
Linux oratest01 2.6.39-200.24.1.el6uek.x86_64 #1 SMP Sat Jun 23 02:39:07 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux


Go to my $GRID_HOME.
[root@oratest01 ~]#  cd /app/11.2.0/grid/bin

I would tried to start the ACFS modules, seems like it was unsuccessful.
[root@oratest01 bin]# ./acfsload start –s
ACFS-9391: Checking for existing ADVM/ACFS installation.
ACFS-9129: ADVM/ACFS not installed


Login as root user, run the query to determine if the required modules are loaded.
[root@oratest01 bin]# lsmod | grep oracle
oracleasm              53352  1


Command to cross check the ACFS state.

[grid@oratest01 admin]$ $GRID_HOME/bin/acfsdriverstate -orahome /app/11.2.0/grid installed
ACFS-9204: false
[grid@oratest01 admin]$ $GRID_HOME/bin/acfsdriverstate -orahome /app/11.2.0/grid loaded
ACFS-9204: false
[grid@oratest01 admin]$ $GRID_HOME/bin/acfsdriverstate -orahome /app/11.2.0/grid version
ACFS-9129: ADVM/ACFS not installed
[grid@oratest01 admin]$ $GRID_HOME/bin/acfsdriverstate -orahome /app/11.2.0/grid supported
ACFS-9200: Supported


I'll think during the root.sh execution, the process did not created the directory in /lib/modules and copied over the installation files.
Hence, we have to copy the
installation files manually from GRID home to new created folder.

[root@oratest01 ~]#  mkdir -p /lib/modules/2.6.39-200.0.15.el6uek.x86_64/extra/usm
[root@oratest01 bin]# cd /app/11.2.0/grid/install/usm/EL6/x86_64/2.6.32-200/2.6.32-200-x86_64/bin
[root@oratest01 bin]# cp *ko /lib/modules/2.6.39-200.0.15.el6uek.x86_64/extra/usm

Cross check the ACFS driver.
[grid@oratest01 modules]$ $GRID_HOME/bin/acfsdriverstate -orahome /app/11.2.0/grid version
ACFS-9325:     Driver OS kernel version = 2.6.39-200.0.15.el6uek.x86_64(x86_64).
ACFS-9326:     Driver Oracle version = 130428.


The next step, we should install ACFS with the corresponding drivers.

[root@oratest01 bin]# ./acfsroot install
ACFS-9300: ADVM/ACFS distribution files found.
ACFS-9312: Existing ADVM/ACFS installation detected.
ACFS-9314: Removing previous ADVM/ACFS installation. # $GRID_HOME/bin/acfsroot uninstall
ACFS-9315: Previous ADVM/ACFS components successfully removed.
ACFS-9307: Installing requested ADVM/ACFS software.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9321: Creating udev for ADVM/ACFS.
ACFS-9323: Creating module dependencies - this may take some time.
ACFS-9154: Loading 'oracleoks.ko' driver.
ACFS-9154: Loading 'oracleadvm.ko' driver.
ACFS-9154: Loading 'oracleacfs.ko' driver.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9156: Detecting control device '/dev/asm/.asm_ctl_spec'.
ACFS-9156: Detecting control device '/dev/ofsctl'.
ACFS-9309: ADVM/ACFS installation correctness verified.


Final step, activate the ACFS  and double check modules activation.

[root@oratest01 bin]# ./acfsload start -s

[root@oratest01 bin]# lsmod | grep oracle
oracleacfs           1881447  0
oracleadvm            231674  0
oracleoks             329556  2 oracleacfs,oracleadvm
oracleasm              53352  1

Is it completely outstanding?

Proceed to perform the same steps in other nodes of the your cluster environment.