Oracle: ORA-24327 need explicit attach before authenticating a user in perl script

Hi,

i write the sequent script:

#######################################################################
use DBI;

my $orachehost = "*********";
my $oracleuser = "**********";
my $orachepasswd = "******";
my $oraclesid = "*****";
my $oracle_home = "/usr/lib/oracle/11.2/client";

$ENV{ORACLE_HOME}=$oracle_home;
$ENV{ORACLE_SID}=$oraclesid;
$ENV{PATH}="$oracle_home/bin";

my $dbh = DBI->connect( "dbi:Oracle:host=$orachehost:sid=$oraclesid",
$oracleuser, $orachepasswd, { AutoCommit =>
1,RaiseError=>1,PrintError=>1 }  ) ||   die("Errore nella connessione
al db: $DBI::errstr");

$dbh->disconnect;

exit 0;

#######################################################################

When i run the script, it doesn't work and write:

DBI connect('host=**********:sid=*******','********',...) failed:
ORA-24327: need explicit attach before authenticating a user (DBD
ERROR: OCISessionBegin) at /usr/local/sbin/myscript.pl

Any ideas?

0
giovanniman
10/21/2010 5:11:43 PM
perl.dbi.users 11100 articles. 1 followers. Follow

1 Replies
5779 Views

Similar Articles

[PageSpeed] 16
Get it on Google Play
Get it on Apple App Store

  On 10/21/2010 1:11 PM, suuuper wrote:
Funny that should work.
What version of DBD Oracle are you using??

Can you connect using sqlplus??

If no it means there is some sort of TNSNAMES.ORA or other problems on 
the oracel network side of things


I would try using an oracle easy connect string like this

DBI->connect( "dbi:Oracle","testuser", "password@someoracle.sid")'

hope this helps
cheers
John Scoles
> Hi,
>
> i write the sequent script:
>
> #######################################################################
> use DBI;
>
> my $orachehost = "*********";
> my $oracleuser = "**********";
> my $orachepasswd = "******";
> my $oraclesid = "*****";
> my $oracle_home = "/usr/lib/oracle/11.2/client";
>
> $ENV{ORACLE_HOME}=$oracle_home;
> $ENV{ORACLE_SID}=$oraclesid;
> $ENV{PATH}="$oracle_home/bin";
>
> my $dbh = DBI->connect( "dbi:Oracle:host=$orachehost:sid=$oraclesid",
> $oracleuser, $orachepasswd, { AutoCommit =>
> 1,RaiseError=>1,PrintError=>1 }  ) ||   die("Errore nella connessione
> al db: $DBI::errstr");
>
> $dbh->disconnect;
>
> exit 0;
>
> #######################################################################
>
> When i run the script, it doesn't work and write:
>
> DBI connect('host=**********:sid=*******','********',...) failed:
> ORA-24327: need explicit attach before authenticating a user (DBD
> ERROR: OCISessionBegin) at /usr/local/sbin/myscript.pl
>
> Any ideas?
>

1
scoles
10/22/2010 12:37:35 PM
Reply:

Similar Artilces:

DBD::Oracle 'make test' fails
--_a2731cda-c8bb-48e5-8a2b-1fc21e6180af_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Everybody=2C =20 I am trying to install DBD::Oracle 1.27 on Red Hat Enterprise Linux Server = release 5.5 (Tikanga)=2C Linux 2.6.18-194.17.1.el5 x86_64 x86_64 x86_64 GNU= /Linux. I have already deployed the latest Oracle InstantClient and can con= nect to the Oracle server (running on a different box) via sqlplus. Since I= 'm not allowed to log on as 'root'=2C I am installing everything in my home= directory. I set the ORACL...

Validating a user and authenticating a user with Oracle
I am trying to get my arms around the providers and how to best use the login controls in asp.net 2.0 with Oracle. First, I have read through a number of documents discussing the provider model, different providers (membership, role, etc.) ref: ASP.NET 2.0 Provider Model:Introduction to the Provider Model Oct. 2005 I am getting a mental disconnect from what I think I understand about the provider model and how to code the web application.To me it seems the provider model abstracts the code so I am not coupled to a specific database. This is great if you need to use multiple or di...

Combining non-authenticated users with authenticated users
Hi!I'm busy with "upgrading" my ASP-website's to asp.Net-website's.I've done a lot of tutorials on the net, but I still have a question. All the tutorials are about securing a whole directory (I need to use forms authentication). This means, a user is logged in and can access all files in the secured directory. When the user is not logged in, he will be forwarded to the login-page.My question is about the technique used, for example, by forums. A user that is not logged in, can read the page. But a user that is logged in, can read the page also, but has also the rights to post messages....

Login Control logs user in, but User is not authenticated, but user really is!
I am using aspnetmembershipprovider.  Everything works fine.  I slap a login control on my login page and am able to login and get to my secure folder etc.  When I try and put some code in the LoggedIn method "User.Identity.IsAuthenticated" = false, yet if I blow through that, I am logged, authenicated etc.  The documentation says that the LoggedIn event is "after the user is authenticated".  Any Ideas what is up?Thanks,TPS------------------------------------------------------Note Collaboration for your next confernce call.http://www.ConferenceCallNotes.com I am...

How to user user-functions in Oracle
Hi, Using PB5.0 & PFC & Or7.1/7.2/7.3 I have a user defined function in Oracle in the format Function foo( in number) return varchar2 which i wish to use as follows, in my Datawindow syntax select var1, foo( var2 ) from tab1 This works perfectly in SQL*plus but when I try putting this in the datawindow SQL by converting to syntax or otherwise I get erroe ORA-00904, Invalid column name. What is to be done to use user defined functions & Stored Proc in this manner --- Sanjay Minni Software Consultant Minisoft Pvt. Ltd. 2...

How to user user-functions in Oracle
Hi, Using PB5.0 & PFC & Or7.1/7.2/7.3 I have a user defined function in Oracle in the format Function foo( in number) return varchar2 which i wish to use as follows, in my Datawindow syntax select var1, foo( var2 ) from tab1 This works perfectly in SQL*plus but when I try putting this in the datawindow SQL by converting to syntax or otherwise I get erroe ORA-00904, Invalid column name. What is to be done to use user defined functions & Stored Proc in this manner --- Sanjay Minni Software Consultant Minisoft Pvt. Ltd. 2...

A user control to authenticate users
Hi all I have a simple user control..with two textboxes(Email and Password) and a button and two links (Forgot your password & To  register click here) ... i'm using windows forms ... when the sign in button is clicked ...i'm trying to validate user credentials against a database..if valid..i instantiate a new principal object ...and place it in the Context.User   string encPassword = new User().Encrypt(txtPassword.Text); MySitePrincipal newUser = MySitePrincipal.ValidateLogin( txtEmailAddress.Text, encPassword); if (newUser != null) { Context.User = newUser; Response....

Impersonate a different user than authenticated user
Can anyone explain how I would solve the following problem? The purpose of this app is to allow users access to corporate reports based on their username. The a web app that has the the integrated windows authentication selected at the IIS security level. I am able to retrieve the username using "Page.User.Identity.Name" to verify from an SQL database what group of reports a user is able to see. The reports are located in a network directory that I do not want to add "everyone" to the directory security in order for the application to retrieve the report. This woul...

Mobilink User vs Authentication User
Can the Authentication user be different from ml_user ? Here is the scenario I am trying to understand. user A has 10 devices. A's password is stored in custom user_table. authentication done using custom authentication providing username/password. If authentication successful, the ml_user is added with the username I provided. Now how would the ml_user be unique in this scenario with the same user using 10 devices. Is there a get around for this ? what I am looking for is user providing same login information on any device, but make th...

Get User Groups of an Authenticated User
I am currently running applications in an Intranet Environment which only authenticated users are allowed to access. I was wondering if anyone new of a way to get the User Groups of the authenticated user, without having to have them type in the login information of username, pass, and domain. The current method I'm using to get the user group information using a Directory Entry and Directory Searcher Object require Username, Password, and Domain to be entered. My Code: Dim domainAndUsername As String = "domain\username" Dim entry As DirectoryEntry = New...

Script/Procedure to Users in User Databases
Hi Folks, I am running the below script/procedure to find the "sysusers" from each USER DATABASE, but somehow the script doesn't recognize the @<variable>..sysusers and it throws error "Incorrect syntax near '@DBSName'." Any help on this is appreciated. Thanks ! ========================== CREATE PROC getsysusers AS BEGIN CREATE TABLE #Results (Instance_Name varchar (50), Database_Name varchar (50), name varchar (20), suid int, uid int) SET NOCOUNT ON declare @DBSName varchar(50) select @DBSName = '' wh...

user script to logout users from unix
Hi guys, I created the following script to logout users from a unix system. Please take a look and let me know if the syntax is correct. #!/usr/bin/perl # #Purpose: To logout users off the system during after hours. # sub DEBUG () { 1 }; # set level of debugness. open (STDERR, "/tmp/userlog.log") or die $!; select STDERR; `who > /tmp/userin` open (USERS, "/tmp/usersin") or die "can't open $entry: $!\n"; while (<USERS>) { my ($user) = (split())[0]; unless ($user = root or ipl) { print "user root and ipl will not be l...

test DBD::Oracle DBI connect('','user/password@database',...) failed: ORA-12154
--0-621501335-1235620987=:55352 Content-Type: text/plain; charset=us-ascii I can connect to the database using sqlplus as user oracle, but not as root. I can compile DBD::Oracle but not complete the test. I tried to set variables properly: ORACLE_HOME=/u/oracle/10.2.0 ORACLE_HOST=hostname ORACLE_PORT=1522 ORACLE_SID=databasename ORACLE_USERID=user/password@databasename PATH=/u/oracle/10.2.0/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin PWD=/usr/src/pub/dbd-oracle/DBD-Oracle-1.22 TNS_ADMIN=/u/or...

Authenticating users against Windows NT User GROUPS
Hello all,In my web app I want to authenticate users using the Windows NT user Groups they blong to. The app will be used internally. Users will all belong to the same domainUsers are separated by groupsIn more details I want to know if the user is administrator, users, customer service (a windows group i create) and so on.I tried using Request.LogonUserIdentity.Groups but did not result in what I want.So far I can do it at the individual level using Request.LogonUserIdentity.Name.ToString();but this only works if i have a limited number of users, not a huge number.Please advisethanks in adv...

Mapping SSL authenticated user to bugzilla user?
I'm setting up a Bugzilla instance accessible only over SSL with basic auth, so by the time the bugzilla code is running the web server has an authenticated user ID. Is there any support for Bugzilla using that ID and mapping it to a bugzilla ID so the user doesn't have to login twice (first time SSL, second time bugzilla)? A pointer to documentation, or even where to start looking in the code to write a such a feature if it doesn't already exist, would be appreciated. TIA Jim Garrison jhg@athensgroup.com Jim Garrison wrote: > I'm setting up a Bugzilla i...

User is authenticated, but User.Identity.Name is blank!?
Anyone know what might cause such a situation?  This has been working for over a year as I work on a small site I've been working on.  It stopped working sometime soon and there is only a few things I can think of that might have something to do with it. I enabled Roles.  For a sub-directory that I wanted only admins to be able to access. I installed VS 2008 Team System.  I did not upgrade my website to a new .Net version  Here are the relevant sections of my web.config file:<roleManager enabled="true" /><membership defaultProvider=&qu...

BUG: unauthenticated user being logged in as authenticated user.
I read the ardvark thread... not sure where to post. So I am going 50/50 and posting here. I am running 2.04 on a windows 2000 server using all the latest patches. DNN is using windows forms authentication and an SQL database. User 1 with admin privs (UserId 1) logged on 6/1/2004 @ 17:30, did not log off. The page is on a 120 second refresh, so the sitelog logs User 1 with UserId 1 throughout the night. User 2 on 6/2/2004 @ 07:50 navigated to DNN site and found that he was already authenticated as UserId 1. User 2 is on a completely different subnet than User 1. User 2 is...

Asterisk(*) for All users or Authenticated Users (web.config)
Hi, I'm a bit confused about the Asterisk in the deny users or allow users  in web.config. Does it mean all or authenticated users?   This means all users. You can also specify anonymous with a question mark. See for more info http://msdn2.microsoft.com/en-us/library/aa719554(VS.71).aspxRichardhttp://www.richardsoeteman.net Basic Idea :The following shows the syntax for the authorization section: <authorization> <[allow|deny] users roles verbs /></authorization> The allow or deny element is required. You must specify either the users or the...

site with mix of annoymous users and authenticated users
I have a site where I have some pages that I want anyone to access but others that only authenticated users should access once they have logged on. Right now I have membership turned on and have some menu items available for all users, some pages for logged on users and then a couple of meu items for admin users. Also have specific pages restricted in my web.config file for the admin users. This works great until the session times out. Once the session has timed out, results are unpredictable and old stale data shows up if the user had been viewing pages with security turned on.  ...

Getting error "Login failed for user ''. The user is not associated with a trusted SQL Server connection" on trying to authenticate a user
Hi, I created aspnetdb on Sql Server 2005 and modified my web.config LocalSqlServer connection string to connect to the Sql Server instead of mdf file on Sql Server. When i click Log In button on my login control i am getting the error "Login failed for user ''. The user is not associated with a trusted SQL Server connection" But when i bind a radio button list or any control to select from aspnet_users or roles table data is displayed fine without any login errors (i am using aspnetdbConnectionString given below for binding data). Why is it happening only when i authenticate but...

login script provided--User cannnot login as local user the script fails but can login as local admin on xp pc
> Hi all > the error is as follows > novell client scripts has encountered a problem > and needs to close > the exception unknow s/w exception 0xc06d007e > occured in the application at location ox77e738b2 > I have never seen this before and i have tried reinstalling the cleint > but it didnt work. This occurs when the user ins logged into a xp pro pc > as a user though it doesnt occur when logged in as a local admin on the > box. this is only happening on one box. > Login script is below > MAP ERROR OFF BREAK OFF if member of ".every...

Login control authenticates user and redirects, but does not log user in
I am trying our the "SQLite 3.0 Membership and Role Provider for ASP.NET 2.0" found here: http://www.eggheadcafe.com/articles/20051119.asp since I do not have access to a SQL server. However I have run into a problem where the login control authenticates the user, then redirects to the redirect page, but ASP.NET detects the user as not logged in. One weird thing I noticed is that on the redirect page there is a check: if(Page.User.Identity!=null) this.Label1.Text = "Welcome," + Page.User.Identity.Name + "!"; The label control displays "Welcome, !" meaning the login c...

Script Running well as Root user but not as Apache user ?
I am setting in place an Apache Web server and I want to get access to a remote Oracle 8 database. Here are the step I did 1) I set up Linux RedHat 7.3 (Kernel 2.4.18-3 2) I updated OS through RHN (Kernel 2.4.18-17.7.x) 3) I installed Oracle Client 8.1.5 for Linux in /home/oracle (user: oracle, group: oracle) 4) I Installed Apache 2.0.43 5) I Installed Perl 5.8.0 6) I updated CPAN (v.1.63) 7) I installed DBI from cpan and run the test successfully 8) I Installed DBD::Oracle from cpan and run test successfully 9) I ran tests (DBI and DBD) successfully with perl command as root ...

afptcpd[8126]: [error] User authentication failed for user:
I have read the other posts on this error but I am confused so I was hoping someone could help. SLES 10SP3/OES2 SP2 I have the universal PW policy enabled and assigned to the appropriate user containers and those same containers have been added to the Context field in the AFP configuration. My problem is that if I do not actually set the universal password for the user I get the -1639 error. If I do set their UP then they can log in. I really hope that I don't have to set the UP to match the NDS password for approx 2,000 mac users HELP!!!! -- smurray ---------...

ZCM user authentication failed user applications disappear
Hi all, yesterday the Oracle DB server that the ZCM database runs on ran out of space (opps!), and this caused our clients to fail user authentication during refresh - they received the below error "User Authentication failed during a refresh. User applications will not be available This may occur if the user's password is changed or if the user is deleted from the user source" The ZCM server was still up, but as the database server was down logins were failing (both clients and to the ZCC) With Zenworks 7 if the server went down clients would continue happily, there would be no messages to users and all applications (user and workstation) would remain available So my question is, is there a way for user applications to remain available during a server outage? When they login off the network they have all the applications cached...so I'm not sure why in the case of a server outage the client just can't keep everything going in a cached state and just retry user authentication to the server on the next refresh cycle. Help? -- baarsd ------------------------------------------------------------------------ baarsd, It appears that in the past few days you have not received a response to your posting. That concerns us, and has triggered this automated reply. Has your problem been resolved? If not, you might try one of the following options: - Visit http://support.novell.com and search the knowledg...

Web resources about - Oracle: ORA-24327 need explicit attach before authenticating a user in perl script - perl.dbi.users

Self-authenticating document - Wikipedia, the free encyclopedia
This means that if a defendant does not stipulate to the authenticity and accuracy of a trade inscription, and the plaintiff lacks testimony ...

Scholar Denies Authenticating 'Lost Leonardo' Found in Swiss Vault
Leonardo expert denies that he authenticated painting found in a Swiss bank vault.

New in Android Samples: Authenticating to remote servers using the Fingerprint API
... tampered with, and positively identifies the original author of that data. In this way, asymmetric keys can be used for network login and authenticating ...

Leonardo expert denies authenticating 'lost' Leonardo
MILAN (AP) — Assertions that an eminent scholar had authenticated a portrait by Leonardo da Vinci tantalized art lovers with the prospect of ...

Lack Of Authenticating Expert Renders Valuable Artwork Practically Worthless
When is a perfectly authentic work of art by someone who changed art history worth a fraction of it real value?

DEVELOPING: US authenticating video of American journalist's reported killing at hands of ISIS
DEVELOPING: US authenticating video of American journalist's reported killing at hands of ISIS

Keep Your Files Safe With Voice-Authenticating USB Drive
... don't fall into the wrong hands, such as contracts, financial records, and that stash of naked pics you have from college. This voice-authenticating ...

Patent US6182219 - Apparatus and method for authenticating the dispatch and contents of documents - Google ...
Apparatus and method for authenticating that a sender has sent certain information via a dispatcher to a recipient is disclosed. The method includes ...

'Pawn Stars': Authenticating Paul Newman's Autograph
The late, great Paul Newman was not just an Oscar-winning actor. The philanthropist, humanitarian and family man was also a passionate race car ...


Resources last updated: 3/2/2016 2:44:30 AM