Saturday, 27 February 2010

Using Oracle Client with SQLDeveloper

SQLDeveloper by default has limited connection configuration possibilities (thin jdbc driver) so 'edge cases' may need the Oracle (instant) Client install and full *.ora configuration

- sqldeveloper
- Tools preferences -> database -> advanced -> use oci/thick driver
- oracle client
- connection type TNS->connect identifier
- click kerberos to allow null username/password (or OS authentication but I think that has more consequences)

(and effectively kick the config back to the oracle thick client *.ora files and 'sqlplus' C code (where kerberos may not be configured))

Thursday, 16 July 2009

Radius

Just checked with latest code in development should work in earlier versions:

Note that if you can

sqlplus username/password@database (using Radius)

you should be able to use sqldeveloper in the same way using OCI/Thick driver (see tools->preferences->database->Advanced (Use OCI/Thick driver) for the check box to use OCI/Thick tested, for example, with 11.1.0.7 instant client)

i.e. set up radius server and client, then oracle sqlnet.ora, then sqlplus [see core database administration documents], then sqldeveloper on top should be easy.

Authentication (using user name and password for each connection) via Radius authentication server has been verified over OCI/thick, where username is saved/stored for each attempt at authentication (the password can be saved (bad for security) or prompted). 'Challenge/response' mode is not supported.

-Turloch

Friday, 1 May 2009

Hi,

If your connection entry is unusual you could try these simple things that may cause variation/different code paths:

1/ORACLE_HOME being set /unset by for example a bat script before launching sqldeveloper see in see in sqldeveloper help/about/properties/ oracle.home and jdbc.library to see what oracle sqldeveloper is using
(you could be using sqldeveloper or other oracle install jdbc)

2/Tools/preferences/database/Advanced Parameters/Use oci thick driver set/unset
(you could be using 'pure' jdbc thin or 'mixture of c & java' ie. thick oci driver using another Oracle Home or instant client)

3/use Connection type=advanced then you can enter a fancy description (these descriptions are simple but you could have load balancing for example):
thin is pure java
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MACHINE_NAME_OR_IP)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=dev11gr1)))
oci8 is thick/c/oci-java
jdbc:oracle:oci8:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MACHINE_NAME_OR_IP)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=dev11gr1)))
(or get SQLDev to look up tnsnames.ora, connection type = tns might work)

Please post your findings and put in an enhancement request (see sqldeveloper forum for details) for particular connection feature support, documented with a test case.

-Turloch

Friday, 13 March 2009

SQLDeveloper Ldap success and failure modes

(slightly clearer update:

Works/Happy day scenario:

1/LDAP Server: your.ldap.com:389:636
(machine:nonssl port:ssl port)
(bug in 154 ssl port required, can be entered but non ssl is used)
(fix in development, ssl port can be left out entirely i.e.
machine:nonssl port)
2/press enter in the LDAP Server field
3/choose context (with a db service)
4/press load->get db service populated with pull down ,
5/select db service enter username/password
6/test gives successfull connection

Error scenarios with bad error messages:

LDAP Server: your.ldap.com:389:636
(machine:nonssl port:ssl port) (bug ssl port required can be entered but nonssl is used) EDIT typo switched to "nonssl is used".
Error_mode:press test: Status -Test failed: Required property 'hostname' is not set on the DataProvider (because no Db service is available and selected)

LDAP Server: your.ldap.com:389:636
press enter
Error_mode:different contexts are available do not select one
press load->get Status: Failure -null (as no context is selected)

Error_mode:choose a context with no db service,
press load->get Status: Failure -setSelectedIndex:0 out of bounds (as there are no db services with this context.

End of update)

LDAP Server: your.ldap.com:389:636
Error_mode:press test: Status -Test failed: Required property 'hostname' is not set on the DataProvider (because no Db service is available and selected)

1/LDAP Server: your.ldap.com:389:636
(machine:nonssl port:ssl port) (bug ssl port required in sqldeveloper, though I do not think ssl is used)
2/press enter
Error_mode:different contexts are available do not select one
press load->get Stataus: Failure -null (as no context is selected)
3/NON Error mode:choose context with a db service
4/press load->get db service populated with pull down , select db service enter username/password -> test(->>>>>>success)

FYI
Error_mode:choose a context with no db service,
press load->get Status: Failure -setSelectedIndex:0 out of bounds (as there are no db services with this contxt.

I think that describes getting the connection details [internally hostname, port and sid] - need to add username/password.

Thursday, 26 February 2009

GET ERROR ORA-00942 ON DATA MOVE STEP

For data move when you are not dba and not data move user additional privileges are required:

8228281 04-FEB-09 2 (null) 11 1875 MIGRATION NO RELEASE MYSQL QUICK
MIGRATION STOPED IN CONVERT STEP WHEN MIGRATE TABLE AND DATA

where hrcp2 is the user doing the data move:

Multi schema requires the following if you are not dba:

--disable triggers and disable table constraints
alter any table to hrcp2;

--disable primary keys also affects indexes.
create any index to hrcp2;
drop any index to hrcp2;
alter any index to hrcp2;

and if you are not the dba or the datamove user:

--select to get the datatypes (where 1 = 0) and insert to insert the data
grant select any table to hrcp2;
grant insert into table to hrcp2;

(optionally sqldeveloper created) datamove user is granted:
alter any trigger
and on each table is individually granted
select insert and alter

not sure how datamove user gets around:
create any index to hrcp2;
drop any index to hrcp2;
alter any index to hrcp2;
which is implicitly required as disabling a primary key constraint affects an
index.

Friday, 27 June 2008

Installing mathematical fonts

THERE HAS GOT TO BE A MORE CONVIENIENT WAY TO GET MATHEMATICAL/
FULL UNICODE FONT SET
, please post if you have better information

Getting mathematical fonts on Linux

There may be mathematical truetype fonts already on your system
or available through you packaging system.
I searched the internet for them.

http://www.mozilla.org/projects/mathml/fonts/
points to a STIX Fonts Project beta font download
http://www.mozilla.org/projects/mathml/fonts/stix/STIXBeta.zip

download and extract these fonts they are *.otf they can
be converted to *.ttf as described here:

http://www.stuermer.ch/blog/convert-otf-to-ttf-font-on-ubuntu.html

the ttf fonts can be installed in Linux and installed in the
fallback directory (which may need to be created)
jdk1.5.0_06jre/lib/fonts/fallback

I tried the raw *.otf and it did not work so the conversion
to ttf may well be necessary.

I copied to /usr/share/fonts/truetype

Then I did
xset fp rehash
and could use the fonts but they may have been already installed.

Testcase (supplied by customer):

create table test ( testcol VARCHAR2(10));

insert into test values (unistr('\D835\DCAB'));

then view the table in SQLDeveloper.

Please comment if you have any problem/improvements.