Oracle Live SQL


Needing to test out a Table creation script before posting it online.
SQL Server is easy, but not so much Oracle.

And, so googled for free online Oracle DB playground.

Oracle Live SQL


Oracle Live SQL is available here.

Here is my welcome screen.


Previous Account

Tried to use an old Oracle account that I have from yester years, but no go.

New Account

Signed up for a new Account.

Got sent an email and confirmed it is mine.



Sample SQL

Here is my sample SQL:

           numberofTableMatches number  := 0;
           objectName VARCHAR2(60);
           sqlStatement VARCHAR2(255);
           sqlMessage_ VARCHAR(255);
           table_name_ VARCHAR(60);


  numberofTableMatches := 0;
  objectName := 'MetaStage_Loc_Info';

  SELECT count(*) 
  into   numberofTableMatches
  where  (
                ( table_name = objectName )
            or  ( table_name = upper(objectName) )
  sqlMessage_ := 'numberofTableMatches ' ||  numberofTableMatches || '';
  IF (numberofTableMatches = 10) THEN
      sqlStatement := '
create table MetaStage_Loc_Info
     Computer			VARCHAR2(64)
   , SoftwareProduct	VARCHAR2(64)
   , DataStore			VARCHAR2(64)
   , DataSchema		VARCHAR2(64)

      dbms_output.put_line('Executing SQL pasted below :');
      execute immediate sqlStatement;
      dbms_output.put_line('Executed SQL:');

      sqlMessage_ := 'Table (' || objectName || ') exists';
  END IF ;





Save Session



Saved Session


SQL Developer – Cannot find a Java SE SDK installed at path


Back in 2011, 5 years ago now, I posted about an error message I was experiencing.

The error message reads “Oracle – 11G – Client – SQL Developer (64-bit) – Error – WARNING: Could not find jvm.cfg!”. And, it is available here.


Last Week

In the last week I have received a couple of comments around that post and the comments were a nice “It does not work“.

As busy with other stuff could not really quite get to it, but had a bit of down time today.  And, so here we go.



Downloaded the latest version of SQL Developer from

The version # is …

SQL Developer 4.1.3
Version, Updated December 22, 2015

Available Media

Our OS is a 64-bit Windows, specifically MS Windows 7 x64.



Downloaded Media


  1. No-JRE
  2. x64

As we have a 64-bit OS, the easiest and best file is Window 64-bit win JDK 8 included.

But, to make things interesting and address the specific error we chose the Windows 32/64-bit.


Extracted the compressed file.

Packages Comparison

Once we extracted the compressed files, we ran a folder comparison tool against the extracted folders.



Results of Comparison

From comparing the folder, we see that the version that has JDK bundled has a JDK folder.

Presumably under the JDK folder, we have the JDK files.


Bundled Install


File Relative Path

How is the bundled install handled in terms of the in-built Java JDK?

Traditionally the location where the Java JDK should be found is designated in the sqldeveloper.conf file.

From the base home of SQL Developer, the relative path is sqldeveloper\sqldeveloper\bin.




We can set that SetJavaHome is set to ../../jdk


Where is ../../jdk?



StandAlone Install

Download and install Java JDK

Available Media

Download JDK from here.

For sake of comparison we chose to download both the 32 and 64 bit files for Windows.



  1. 64-bit
    • jdk-8u102-windows-x64.exe
  2. 32-bit
    • jdk-8u102-windows-i586.exe


We installed unto a drive other than our system drive.


Here are a steps of trials we undertook to answer the question ( Please Specify the Path to the Java JDK home )


  1. Trial 1
    • JRE – 32 bit
      • D:\Program files (x86)\Java\jre1.8.0_120
      • Errors
        • Cannot find jre\bin\java.exe
  2. Trial 2
    • JDK – 64 bit
      • D:\Program Files\Java\jdk1.8.0_102
      • Errors
        • Cannot find lib\tools.jar
  3. Trial 3
    • JDK – 32 bit
      • D:\Program Files (x86)\Java\jdk1.8.0_102\
    • Errors
      • ( None )

Trial 1- D:\Program Files (x86)\Java\jre1.8.0_102

Please Specify the Path to the Java JDK home


Path Entered – Java JRE  ( D:\Program Files (x86)\Java\jre1.8.0_102 )



Error – Cannot find a Java SE SDK installed at path : <HOME> – D:\Program Files (x86)\Java\jre1.8.0_102





When we capture via SysInternals, we will see that SD searched for D:\Program Files (x86)\Java\jre1.8.0_102\jre\bin\java.exe.

And, so from D:\Program Files (x86)\Java\jre1.8.0_102 we get D:\Program Files (x86)\Java\jre1.8.0_102\jre\bin\java.exe

Not a logic god, but it seems that SD adds the jre\bin and looks for java.exe (  relative file name jre\bin\java.exe)


Trial 2 – 64 Bit – Java JDK ( D:\Program Files\Java\jdk1.8.0_102 )

Specify Path


Error Message – Cannot find a Java SE SDK installed at path





Checked D:\Program Files\Java\jdk1.8.0_102\lib


…. but no tools.jar



Trial 3 – 32 Bit – Java JDK ( D:\Program Files (x86)\Java\jdk1.8.0_102 )

Specify The Path



Splash Screen






Configuration is saved in C:\Users\<user>\AppData\Roaming\sqldeveloper\<version>

For me, C:\Users\daniel.adeniji\AppData\Roaming\sqldeveloper\4.1.3

Explorer View


File Contents



One is able to go and edit the product.conf file.

Part of the customization is to set the JavaHome.


JDK Versioning

It is foundationally good to determine the bitness of Java JDK you have installed.

Internet Help

Took to the Net to find out that best way to determine the bitness of the JDK we have installed.

Best and most accessible help came from Coderwall and it is available here.

Commands Syntax

The available options are:

  1. java -version
  2. java -d64 version

java -version


java -version

java -d64 version

What is -d64 ?




java -d64 version

Results Matrix

Product Version File Version
 JRE Bundled (x64)
java -version  java version “1.8.0_60”
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
 java -d64 version  java version “1.8.0_60”
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
64-bit JDK installed separately
 java -version  java version “1.8.0_102”
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
 java -d64 version  java version “1.8.0_102”
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
32-bit JDK installed separately
  java -version java version “1.8.0_102”
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) Client VM (build 25.102-b14, mixed mode)
 Error: This Java instance does not support a 64-bit JVM.
Please install the desired version.




SysInternals – Process Monitor

Launched SysInternal’s Process Monitor.

And, filtered for:

  1. Process name is sqldeveloper.exe




SysInternal’s Process Monitor is very helpful to trace application errors.

Back in 2014, Jiji Sasidharan posted that Oracle changed the folder where configuration for SQL Developer is saved.

This change is effectual with SQL Developer v4+.

Again, it is likely more expedient to go with the version, “Windows 64 bit with JDK included”.

Please do not overlook the fact that your machine and OS has to be 64-bit.

For those lagging with computer or OS, please continue to choose the separate bundles.



SQL Developer – Configuration

  1. Oracle SQL Developer – How to change Java SDK?

Application Data

  1. Accessing “Application Data” in Windows 7


Database – Modeling – Oracle SQL Developer Data Modeler (v 3.3)


In the thick of converting from a legacy database to a new system and thank goodness the legacy system has well defined relationship mappings (Primary Key and Foreign Keys).

And, this will help my familiarization.

It always helps to look at a diagram and make sure that my relationships are maintained in the new DB.

Potential Problem

The in-built tool that comes with SQL Server Management Studio is just not cutting it for me.   There some important pieces missing.  And, so looked on the .Net for free Data Modeling tools.

Oracle SQL Developer Data Modeler

Kent Graziano talked a good game about “Oracle SQL Developer Data Modeler” in his web post (  and so I think I will give it a good look).

Download – Oracle SQL Developer Data Modeler

Downloaded the v3.3 tool from

Download – Microsoft JDBC Driver

Downloaded the latest Microsoft JDBC Driver (v 4.0 ) from

Extract – Oracle SQL Developer Data Modeler

Extract the compressed file.


Extract – Extract Microsoft JDBC Driver

Extract Microsoft JDBC Driver.  The files we really want are the jar files named sqljdbc.jar and sqljdbc4.jar and they are in the sqljdbc_4.0\enu folder.

Copy Extracted Microsoft JDBC Jar files to Tools (jdbc\lib) folder

Copy the extracted jar files from \sqljdbc_4.0\enu to the tool’s jdbc-lib path (jdbc\lib)

Aware Oracle SQL Developer of location of MS SQL Server JDBC Jar files

  • In SQL Developer, access the menu Item Tools/Preferences/
  • Access Data Modeler/Third Party JDBC Drivers
  • Depending on the version of Java JRE bin, indicate SQL Server Jar file.  If you chose to the download SQL Developer with the bundled JRE, then please choose sqljdbc4.jar

Reverse Engineer

To reverse engineer an existing database, please do the following:

  1. On the main menu, select File\Import\Data Dictionary
  2. On the “Connect to Database” Tab, click the “Add” button
  3. Enter Database specific connection detail
    1. Connection Name: Any name you  like
    2. Username: Database user name
    3. Password: Database User Password
    4. For anything other than Oracle, please select the JDBC Tab
    5. JDBC URL :- jdbc:sqlserver://<hostname>:<portNumber>;database=database
    6. Driver Class :-
    7. From the Database Type drop-down, select the Database Type


  1. Verify your connection data, by pressing on the Test button
  2. Click Save once verified
  3. Ensure that the right Connection Item is selected and click on the Next button
  4. On the “Select Schema/Database”, select the Database NameSelectSchemaAndDatabase
  5. On the “Select Objects to Import” screen, please select the objects you want


  1. On the “Generate Design” screen, please review the summary per how many objects will be imported
  2. Click the Finish button to generate your model


Here is sample model from the ASP.Net Membership Database.

Sample - ASP.Net Membership Model


A quick round-up of possible errors:

Error – Status : Failure -Test failed: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.

Get Java JRE Version#

Using GUI

The relative path to the bundled JRE is datamodeler\jdk\jre\bin and the file’s name is java.exe.

Get the file’s property by right clicking on the file in Windows Explorer.

Java Version (GUI)

Using OS Cmd Line

java -version


java version "1.6.0_35"
Java(TM) SE Runtime Environment (build 1.6.0_35-b10)
Java HotSpot(TM) Client VM (build 20.10-b01, mixed mode)

Adjust Third Party JDBC Drivers

  • Access Menu Item Tools/Preferences/
  • Access Data Modeler/Third Party JDBC Drivers


DataModeler-ThirdPartyJDBCDrivers (incorrect)


DataModeler-ThirdPartyJDBCDrivers (correct)

Error – Status : Failure -Test failed: Driver class not found.  Verify the Driver Location


Please ensure that you have entered the Driver Class exactly as “”.  I had an extra space before the Driver Class (on the screen dump above).



Microsoft – SQL Server – Msg 7302 – Cannot create an Instance of OLE DB Provider “OraOLEB.Oracle” for Linked Server


One of our end-users upon issuing a Linked-Server Query was getting an error that read

“Microsoft – SQLServer – Msg 7302 – Cannot create an Instance of OLE DB Provider “OraOLEB.Oracle” for Linked Server”.

I re-issued  a similar query and confirmed that that the exact query was working for me.

This led me to believe that the error was user or permission related.


There are a few tools and areas that one uses to gather more diagnostic information:

  1. Use Microsoft\SysInternals Process Monitor tool
    • Initiate a Process Monitor Session
    • From MS Windows Task Manager, determine the “Process ID” for the MS SQL Server Service
    • Filter for all events excluding those whose result is marked “success”
  2. Using Local Policy, ensure that Object access failures are logged in the Event Viewer
    • Using the result from the areas briefly discussed above led us to determine that the user account lacked some permissions.




To augment the user’s account:

  1. Via Component Services, offer more permissions by default to all DCOM objects
  2. Via Component Services, offer more permissions to specific DCOM Objects
    • OraOLEDB.Oracle  (DCOM Configuration \ OraOLEDB.Oracle)
  3. Determine Account incubator Group – which group will “carry” the permissions
    • Local or Machine “Distributed Com Users” group
    • Custom Active Directory Group
    • Default Active Directory group such as “Domain Users’

Related Error Messages

  1. The machine-default permissions settings do not grant Local Activation permission for the Com Server application with CLSID {2206CDB0-19C1-11D1-89E0-00C04FD7A829} to the User <xxxx>.  Thus security permissions can be modified using the Component Services Administrative tool.



Results of running “Microsoft\SysInternals” Tool


Filtered on:

  1. MS SQL Server’s Process ID (derived from Task Manager)
  2. Results not tagged Success


Results of running “Microsoft\SysInternals” Tool:

Review list of modules loaded:

a) msdaora.dll

Event Properties - msdaora.dll

Results of enabling auditing on failed object access (via Local Policy):

What to look for

  1. Source –> DCOM
  2. Type –> Error
  3. Event ID –> 10016

Event - DCOM - 10016 - whittedout


  1. Troubleshooting “Cannot create an instance of OLE DB provider”

Microsoft – SQL Server – Integration Services – Handling Unicode\NonUnicode Data mismatch

Microsoft – SQL Server – Integration Services – Handling Unicode\NonUnicode Data mismatch

As we attempted to deploy code from Dev to Production, we ended up with SSIS packages that could not be moved from QA to Production.

The problem ended up being related to mismatches between QA and Production unicode settings.

First we need to determine whether we have a “core” problem of mismatch in the Unicode Support Settings between the various environments.

To determine an Instance NLS_CHARACTERSET Setting, issue:

select value
from   nls_database_parameters
where  parameter = 'NLS_CHARACTERSET'

In our case, we received ‘conflicting’ settings:

  1. In QA, WE8MSWIN1252 was returned
  2. In Production, AL32UTF8 was returned

There are quite a few different approaches that we can try to insulate against differences in character set settings:

  1. One approach will be to isolate all differences to the back end database.  In essence, define somewhat rigid datatypes for all columns on the back end server and use Vendor’s native database conversion functions to convert individual interpretations to our ‘template’ versions.
  2. In Microsoft SQL Server Business Intelligence Studio (BIDS), attempt to address ‘incompatible’ datasets
  3. ‘Firewall’ back end database character differences by setting rigid Client datasets

Vendor’s Native Database Conversion Function

Because of the differences in unicode\non-unicode, we tried to use a couple of Unicode functions:

  1. Compose – Convert a string in any data type to a Unicode string
  2. Decompose – Converts a unicode string to a string


  1. Felipe Cruz – Oracle String Function (Oracle v 10.1)

But, the function that seems to actually help the most is the Oracle Convert function: (


select convert(<column>, <destination char set>, <source char set>)


select convert('Ä Ê Í Ó Ø A B C D E ', 'US7ASCII', 'WE8ISO8859P1')

Further readings suggests that we can also consider using (UTL_I18N):

UTL_I18N provides a set of services that provides additional globalization.

To convert BUYER_NAME to character set WE8MSWIN1252 (non-unicode):

utl_i18n.raw_to_char(utl_raw.cast_to_raw(BUYER_NAME),'WE8MSWIN1252' )

To convert BUYER_NAME to character set WE8MSWIN1252 (unicode):

utl_i18n.raw_to_nchar(utl_raw.cast_to_raw(BUYER_NAME),'WE8MSWIN1252' )


  1. Thread: Converting between CP1252 and Unicode in a 8859-1 database
  2. Oracle Database PL/SQL Packages & Type References – DBMS_CRYPTO
  3. Oracle Database PL/SQL Packages & Type References – DBMS_CRYPTO

Additional References ( SQL Functions):

  1. SQL Functions (O’Reilly)

Microsoft SQL Server – Business Intelligence Studio

Setting up properties (Designer -> SSIS Package):

  1. AlwaysUseDefaultCodePage is true
  2. ValidateExternalMetadata is False


Set “AlwaysUseDefaultCodePage” to true if you get an error message stating “Cannot retrieve the column code page info from the OLE DB provider (

If speed were important these additional links may be useful:

  1. Moving Large Amounts of Data Between Oracle and SQL Server: Findings and Observation

Setting OS System Parameters (Oracle Specific)

Setting OS System Parameters (Oracle Specific) – NLS_LANG

  1. Setting NLS parameters on multiple db instance


  1. What is Unicode – Part 1
  2. Remedy\Oracle – Unicode
  3. Oracle – String Functions
  4. O’Reilly – SQL in a nutshell
  5. Exporting Unicode String to Oracle Database – SSIS Conversion Error
  6. Cannot convert between Unicode and Non-Unicode String Data Types
  7. Features of OraOLEDB
  8. Moving large amounts of Data between Oracle & SQL Server – Findings and Observations
  9. PLSQL – Convert Function
  10. Thread: Converting between CP1252 and Unicode in a 8859-1 database
  11. Network Steve

SQL Server – Integration Services – Attunity – Error – OCI error encountered. ORA-12154: TNS:could not resolve the connect identifier specified

Error configuring Oracle Connection Manager:

OCI error encouneterd. ORA-12154: TNS:could not resolve the connect identifier specified

The error, though hard to decipher, was due to the server being 64-bit and Microsoft’s BIDS was installed as a 32-bit WOW Application (on to “C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe”)

The (x86) caused untold of problems for Oracle.

One workable solution was to create a symbolic link folder and launch BIDS via symbolic link.

  1. Download junction from
  2. Extract the compressed (zipped) app
  3. Create Junction such as by invoking -> junction  “C:\IDE”   “C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE”
  4. Launch from C:\IDE


  2. ORA-12154: TNS:could not resolve the connect identifier happened to 64 bit BizTalk Host
  3. Error connecting to database after installing on Windows 64-Bit OS: “ORA-12154 TNS:could not resolve the connect identifier specified” or “ORA-06413: Connection not opened” or “Can’t initialize OCI. Error -1”
  4. Junction v1.06 (By Mark Russinovich)
  5. Connecting to Oracle on 64-bit (x64) machine

Oracle – 11 G/R2 Client – Install – Error moving orandce11.dll.dbl

Tried installing Oracle 11G/R2, but failing saying that it could not move orandce11.dbl.dll:

INFO: moving 'E:\app\oracle\x32\product\11.2.0\client_1\bin\orandce11.dll.dbl' to 'E:\app\oracle\x32\product\11.2.0\client_1\bin\orandce11.dll' 

INFO: moving 'E:\app\oracle\x32\product\11.2.0\client_1\bin\orandce11.dll.dbl' to 'E:\app\oracle\x32\product\11.2.0\client_1\bin\orandce11.dll' 

INFO: Exception thrown from action: moveFile 

Exception Name: FileNotFoundException Exception String: File not found E:\app\oracle\x32\product\11.2.0\client_1\bin\orandce11.dll.dbl Exception Severity: 2 

INFO: Exception handling set to prompt user with options to Retry Ignore User Choice: Retry 

INFO: moving 'E:\app\oracle\x32\product\11.2.0\client_1\bin\orandce11.dll.dbl' to 'E:\app\oracle\x32\product\11.2.0\client_1\bin\orandce11.dll' 

INFO: moving 'E:\app\oracle\x32\product\11.2.0\client_1\bin\orandce11.dll.dbl' to 'E:\app\oracle\x32\product\11.2.0\client_1\bin\orandce11.dll' 

INFO: Exception thrown from action: moveFile Exception Name: FileNotFoundException Exception String: File not found E:\app\oracle\x32\product\11.2.0\client_1\bin\orandce11.dll.dbl Exception Severity: 2  

Please ignore the error\warning and proceed with installation.