Showing posts with label Oracle. Show all posts
Showing posts with label Oracle. Show all posts

Tuesday, January 05, 2010

Installing Oracle 11g InstantClient

I've recently begun using the Oracle InstantClient as opposed to the full client install for two reasons:
  1. Smaller footprint (42MB for 11.1.0.7.0)
  2. No Windows restart required (great for production environments)
  3. Really simple installation...

Installation Procedure

  1. Download the InstantClient zip folder (http://www.oracle.com/technology/software/products/database)
  2. Unzip the folder to a location of your choice
  3. Add that folder to the 'path' environment variable
  4. If you are using TNSNAMES, add the location of the tnsnames.ora file to the TNS_ADMIN environment variable

Worked a treat for getting ASP.NET 3.5 and SQL Server Reporting Services 2005 up and running with Oracle connectivity.

Friday, November 28, 2008

Oracle <-> SQL Server Equivalents

A growing list of comparitive SQL functions for transition from Oracle to SQL Server:

Replacing Null Values
Oracle: NVL(field1, 'THIS IS NULL')
SQL Server: ISNULL(field1, 'THIS IS NULL')

Rownum
Oracle: rownum
SQL Server: row_number() over(ORDER BY field1)

Replace Characters in String
Oracle: REPLACE(field1, ';', ',')
SQL Server: REPLACE(field1, ';', ',')

Replace New Line Characters in String (CHR vs. CHAR)
Oracle: REPLACE(REPLACE(REPLACE(field1, CHR(10), ' '), CHR(13), ' '), CHR(9), ' ')
SQL Server: REPLACE(REPLACE(REPLACE(field1, CHAR(10), ' '), CHAR(13), ' '), CHAR(9), ' ')

ToChar for DD/MM/YYYY HH24:MM:SS
Oracle: TO_CHAR(datefield1,'dd/mm/yyyy hh24:mm:ss')
SQL Server: convert(varchar,datefield1,103) + ' ' + convert(varchar,datefield1,108)

Outer Join
Oracle: table1.id =+ table2.id
SQL Server: table1.id =* table2.id

'IN' List
Oracle: IN list limited to 1000 expressions
SQL Server: 18,000 didn't hit any limits!

Decode
Oracle: Decode(field1,'Yes','Y','N')
SQL Server: CASE field1 WHEN 'Yes' THEN 'Y' ELSE 'N' END AS "Field 1"

Monday, January 07, 2008

Query Oracle Character Set

Logged in with SYSDBA priveleges:

select SYS.PROPS$.VALUE$ from SYS.PROPS$ where ((SYS.PROPS$.NAME = 'NLS_CHARACTERSET')) ;