go-oci8 | Oracle driver for Go using database/sql | SQL Database library

 by   mattn Go Version: v0.1.1 License: MIT

kandi X-RAY | go-oci8 Summary

kandi X-RAY | go-oci8 Summary

go-oci8 is a Go library typically used in Database, SQL Database, Oracle applications. go-oci8 has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Golang Oracle database driver conforming to the Go database/sql interface.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              go-oci8 has a low active ecosystem.
              It has 547 star(s) with 200 fork(s). There are 41 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 7 open issues and 260 have been closed. On average issues are closed in 251 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of go-oci8 is v0.1.1

            kandi-Quality Quality

              go-oci8 has 0 bugs and 0 code smells.

            kandi-Security Security

              go-oci8 has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              go-oci8 code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              go-oci8 is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              go-oci8 releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              It has 12923 lines of code, 168 functions and 23 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of go-oci8
            Get all kandi verified functions for this library.

            go-oci8 Key Features

            No Key Features are available at this moment for go-oci8.

            go-oci8 Examples and Code Snippets

            No Code Snippets are available at this moment for go-oci8.

            Community Discussions

            QUESTION

            ORA-01735 when altering table with inline constraint
            Asked 2019-Jul-15 at 11:46

            Oracle Version: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

            Query: ALTER TABLE "TAB" ADD "XVAR" CLOB CHECK ("XVAR" IS JSON);

            I can't quite understand what is wrong with this statement. Can someone point out what is wrong with this ?

            As far as I understand, the constraint does not need to be named by default. Even naming the constraint has not helped here.

            I'm trying to run the query on the DB via the go-oci8 driver.

            The code to do the same is:

            ...

            ANSWER

            Answered 2019-Jul-15 at 11:46

            Remove the semicolon at the end of the ALTER statement:

            Source https://stackoverflow.com/questions/57037549

            QUESTION

            Avoiding Go panic when Oracle Database client libraries not found
            Asked 2019-Jul-07 at 09:35

            I have a server written in Go that accesses an Oracle database. It works fine. However, there will be multiple instances running at different (currently 2) locations some of which do not need to access the database. (They get the same info passed on to them from their peer servers.)

            I want the same executable running in all places but some will be configured to not use the database since they don't need it. The problem is that once I import the OCI package, its init() function is called which panics when it can't talk to the database.

            Running GO 1.12.5 on Windows Server 2019.

            I tried adding OCI.DLL to the same directory as the .EXE but it still panics.

            ...

            ANSWER

            Answered 2019-Jun-04 at 02:34

            As you said, adding the DLLs to the same directory as the exe solves your problem, so if you wanted a single file to still work you can have the exe copy all of the DLLs over when it starts, and even delete then when it is done if you want. This way, you can transfer the file to multiple locations, but there is most likely no way to keep it one file while running.

            Source https://stackoverflow.com/questions/56436128

            QUESTION

            Go lang connect to Oracle 9i (using go-oci8)
            Asked 2018-Nov-06 at 11:27

            I have a 32 bit Oracle DB (version 9i - 9.2.0.7.0), a 64 bit Mac and am trying to connect to it using go-oci8 with Go Lang (version go1.11.1 darwin/amd64).

            I used SQL-Developer 4.0.2 to successfully connect to the DB and then enabled InstantClient connection through it using this tutorial. So I've got things running from the Oracle Client's side.

            I'm using InstantClient Version 11.2.0.4.0 (32-bit) for MacOS (basic and SDK), I've used mainly this tutorial almost successfully. After everything, the error I'm getting is:

            github.com/mattn/go-oci8 ld: warning: ignoring file /Users/myusername/Downloads/instantclient_11_2/libclntsh.dylib, file was built for i386 which is not the architecture being linked (x86_64): /Users/myusername/Downloads/instantclient_11_2/libclntsh.dylib Undefined symbols for architecture x86_64:

            And then a long stack of symbols. Basically the Go oci8 library is trying to use C (which is 64 bit) and tries to build 64 bit files, which will then be used by Go. If I try with the 64 bit version of InstantClient, I have no problems, but I get a "driver: bad connection" error which is because 64bit won't work to connect some reason.

            I have no idea what to do to resole this issue - can I somehow force the build of 32 bit files while using go get -u -v github.com/mattn/go-oci8? Or somehow make the 64 bit InstantClient version connect to the old 32 bit Oracle DB?

            Any kind of help on how to get this running would be much appreciated.

            Edit: I've tried 10.2 Oracle Client, but I can't connect it with go-oci8 (I'm assuming it doesn't support it). The error I get is ../github.com/mattn/go-oci8/oci8.go:113:25: could not determine kind of name for C.OCI_SYSASM

            Final edit for people who have the same problem (coming on to a very old Oracle Database) - you can't interface with the readily provided solutions using Go. The libraries listed to work with Oracle operate with Client versions 11.2 and up.

            ...

            ANSWER

            Answered 2018-Nov-05 at 19:05

            The architecture of the Oracle Client have to match so architecture of your application. I.e. if your Go Lang is 64-bit then the Oracle Client have to be also 64-bit. It does not matter whether the database is 32 or 64-bit.

            I think the main problem is, you cannot connect with an Oracle 11.2 Client to a (20 years old!) Oracle 9i database.

            Check Client / Server Interoperability Support Matrix for Different Oracle Versions (Doc ID 207303.1) for details.

            It says:

            For connections between 10.2 (or higher) and 9.2 the 9.2 end MUST be at 9.2.0.4 or higher. Connections between 10.2 (or higher) and 9.2.0.1, 9.2.0.2 or 9.2.0.3 have never been supported.

            You did not tell us which version of "Oracle 9i" your ar using.

            Source https://stackoverflow.com/questions/53158732

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install go-oci8

            Install Oracle full client or Instant Client:. Install a C/C++ compiler. Install pkg-config, edit your package config file oci8.pc (examples below), then set environment variable PKG_CONFIG_PATH to oci8.pc file location (Or can use Go tag noPkgConfig then setup environment variables CGO_CFLAGS and CGO_LDFLAGS). Go get with Go version 1.9 or higher.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/mattn/go-oci8.git

          • CLI

            gh repo clone mattn/go-oci8

          • sshUrl

            git@github.com:mattn/go-oci8.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link