Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6154995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:21:32+00:00 2026-05-23T20:21:32+00:00

I am trying to connect to Oracle using Perl. I am trying to connect

  • 0

I am trying to connect to Oracle using Perl.

I am trying to connect from a Windows XP machine that has Perl installed. I also have downloaded Oracle SQL Developer and Oracle Instant Client. I can connect to the Oracle DB using Oracle SQL Developer using the TNS connection type.

I use the following Perl.

use DBI;
$db=DBI->connect( "dbi:Oracle", "username", "password" ) or die "Can't connect $DBI::errstr\n";

I get the following error message.

DBI connect(”,’username’,…) failed: ERROR
OCINlsEnvironmentVariableGet(OCI_NLS_CHARSET_ID) Check NLS settings etc. at oracle2.pl line3
Cant connect to database ERROR OCINlsEnvironmentVariableGet(OCI_NLS_CHARSET_ID) Check NLS settings etc.

Do I need to do anything with Oracle Instant Client because it does not have an installer? Is there something else that needs to be configured in Perl?

Are there any variables I need to set at the beginning of the Perl to link to either SQL Developer or Instant Client?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T20:21:32+00:00Added an answer on May 23, 2026 at 8:21 pm

    I used a different method to connect Perl to an Oracle DB. I used SQLPlus instead of DBI. This is a command line utility from Oracle that can be called from Perl. Below is a sample of my code. The test.sql file can contain one or multiple queries and must end with exit.

    my $connect_string = 'username/password@server'; # connection to the DB
    my $file = 'test.sql'; # location of SQL file. The file must end with "exit"
    
    my $sqlcmd = "sqlplus -S $connect_string \@$file"; # sqlcommand
    system $sqlcmd; # executes command
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I am trying to connect Oracle 10g(Source/Target) from ssis using connection string as
I am trying to connect to oracle database from c++ using OCCI, I am
I have been trying to connect to an Oracle server using the following connection
I've been trying to connect to an Apache Derby/JavaDB embedded database using Oracle SQL
I'm trying to connect to an oracle database with SQL Developer. I've installed the
I am trying to connect to Oracle DB using JDBC. I have put ojdbc.jar
I am trying to connect to a Oracle database by using the Windows Identity
I am trying to connect to an Oracle Database using nHibernate. I can connect
I'm using the current version of ODP.NET and trying to connect to an Oracle
I'm trying to link SQL Server 2005 to an Oracle 10g database. I've installed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.