{"id":19909264,"url":"https://github.com/spiderlabs/net-tns","last_synced_at":"2025-05-03T02:31:39.761Z","repository":{"id":23720292,"uuid":"27093199","full_name":"SpiderLabs/net-tns","owner":"SpiderLabs","description":"Net::TNS, a Ruby library for connecting to Oracle databases.","archived":false,"fork":false,"pushed_at":"2019-05-07T22:12:35.000Z","size":127,"stargazers_count":35,"open_issues_count":3,"forks_count":19,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-07T10:35:52.597Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SpiderLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-24T20:14:21.000Z","updated_at":"2025-03-31T00:56:25.000Z","dependencies_parsed_at":"2022-08-21T00:20:25.582Z","dependency_job_id":null,"html_url":"https://github.com/SpiderLabs/net-tns","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpiderLabs%2Fnet-tns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpiderLabs%2Fnet-tns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpiderLabs%2Fnet-tns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpiderLabs%2Fnet-tns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpiderLabs","download_url":"https://codeload.github.com/SpiderLabs/net-tns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252133727,"owners_count":21699587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T21:14:49.554Z","updated_at":"2025-05-03T02:31:39.457Z","avatar_url":"https://github.com/SpiderLabs.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Net::TNS for Ruby [![Build Status](https://travis-ci.org/SpiderLabs/net-tns.svg?branch=master)](https://travis-ci.org/SpiderLabs/net-tns) [![Coverage Status](https://coveralls.io/repos/SpiderLabs/net-tns/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/SpiderLabs/net-tns?branch=master)\n\nLibrary for connecting to Oracle databases.\n\n## Description\n\nNet::TNS for Ruby is a partial implementation of the TNS (Transparent Network Substrate) and TTI (Two-Task Interface, a.k.a. TTC) protocols used by Oracle Database. It allows users to connect and authenticate to databases; functionality beyond that point is limited. The library implements two protocols, and although TTI is the higher-level one, the library is named for TNS, which is more well-known.\n\n## Requirements\n\nNet::TNS was written for and has been most tested with Ruby 2. The specs pass on 1.9.3, although their coverage is incomplete. It may be able to work with previous versions.\n\n## Installation\n\n```gem install net-tns```\n\n## Use\n\nBecause TNS and TTI are highly related (and not very useful without the other), they are both implemented in this library, although in separate namespaces, Net::TNS and Net::TTI (```require \"net/tti\"``` is sufficient to load both protocols, while ```require \"net/tns\"``` will only load the TNS implementation).\n\nEach namespace includes a Client class, which provides access to the essential functionality for that protocol.\n\nExamples:\n\n#### Get the version of an Oracle DB server\n\n```ruby\nrequire \"net/tns\" # require \"net/tti\" would work as well\nNet::TNS::Client.get_version(:host =\u003e \"10.0.0.10\") # =\u003e \"11.2.0.2.0\"\n```\n\n#### Try authenticating to a server\n\n```ruby\nrequire \"net/tti\" # requiring TTI is necessary to get the higher-level functionality\ntti_client = Net::TTI::Client.new\ntti_client.connect( :host =\u003e \"10.0.0.10\", :sid =\u003e \"ORCL\" )\nbegin\n  tti_client.authenticate( \"jsmith\", \"bananas\" )\n  # Authentication succeeded\nrescue Net::TTI::Exceptions::InvalidCredentialsError\n  # Handle invalid credentials\nend\ntti_client.disconnect\n```\n\n## Contribute\n\nPull requests welcome! Once you've forked and cloned the project, you can ```bundle install``` to take care of the dependencies; after that, you're ready to code.\n\nYou can also create issues for any bugs or feature requests, but they may take longer to get done, of course.\n\n## Resources on TNS and TTI\n\n* http://www.csee.umbc.edu/portal/help/oracle8/network.815/a67440/ch2.htm#1007271\n* http://www.pythian.com/blog/repost-oracle-protocol/\n* http://www.nyoug.org/Presentations/2008/Sep/Harris_Listening%20In.pdf\n* https://community.oracle.com/thread/555302?start=0\u0026tstart=0 (for naming of high-level components)\n* http://ckng62.blogspot.com/2014/02/tns-data-packet-structure.html\n* https://www.thesprawl.org/research/oracle-tns-protocol/\n* The Oracle Hacker's Handbook by David Litchfield\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspiderlabs%2Fnet-tns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspiderlabs%2Fnet-tns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspiderlabs%2Fnet-tns/lists"}