bizoo / OracleSQL

Sublime Text 2 plackage for editing Oracle SQL and PL/SQL
47 stars 34 forks source link

Fails to run on UNIX/Mac systems #9

Open davidhooey opened 11 years ago

davidhooey commented 11 years ago

It would be awesome if it would work on UNIX systems. I hacked it to work on my Mac with the Oracle Instant Client (11.2.0.3).

Check out the hack here.

https://github.com/davidhooey/OracleSQL/commit/f483d71de35be267c30cac2a4fb7eaafb98656de

Basically four things that needed to be done.

  1. Set the DYLD_LIBRARY_PATH environment variable to be system wide.
$ launchctl setenv DYLD_LIBRARY_PATH $DYLD_LIBRARY_PATH 
  1. Add the Instant Client to the PATH variable so Sublime can see it.
  2. Change sqlplus.exe to sqlplus.
  3. For some reason the USER_ERRORS query was failing. I should investigate this further but for now I removed this one query.

Also, Easy Connect needs to be used or Sublime will need to know how to get to the tnsnames.ora file. My build command file looks as follows.

{
    "target": "oracle_exec",
    "selector": "source.plsql.oracle",
    "variants":
    [
        {
            "name": "hooey-davidh",
            "dsn": "davidh/oracle@//hooey.mydomain.net/orcl"
        }
    ]
}

Thanks!

bizoo commented 11 years ago

Sorry for the late answer.

I only use Oracle on a Windows box, so I've no idea what to do on other OS to make it works. But doesn't the point 1 and 2 be addressed from outside ST ? Or don't you have to do this for every application that use Oracle client ?

davidhooey commented 11 years ago

Yes, that is correct! Points 1 and 2 are configuration steps for the Oracle Instant Client.

bizoo commented 11 years ago

Thanks for your quick reply. So basically the only thing to change is the sqlplus binary name ? And add the configuration steps to the readme.

davidhooey commented 11 years ago

Yes, however there is still the issue with the USER_ERRORS which I have not figured out yet. I can test some more and see if I can figure it out.