Connecting to Database as sysadmin using DBI
Connecting to Database as sysadmin using DBI
am 09.09.2008 09:47:56 von Rameez Thonnakkal
Hi All,
Not sure this is the correct mail id for posting this query.
I am using DBI for connecting to a oracle Database. By using a specific user and password i am able to connect. But my requirment is to connect as sysadmin without password.
Could any one give me the piece of code for the same. Tried bit of googling but of no luck :(
Thanks
Rameez
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Connecting to Database as sysadmin using DBI
am 09.09.2008 11:50:39 von Brian Raven
Rameez Thonnakkal <> wrote:
> Hi All,
>
> Not sure this is the correct mail id for posting this query.
>
> I am using DBI for connecting to a oracle Database. By using a
> specific user and password i am able to connect. But my requirment is
> to connect as sysadmin without password.
>
> Could any one give me the piece of code for the same. Tried bit of
> googling but of no luck :(
Depends what you mean. If you want to connect using the username
"sysadmin", but with no password, then whether that is possible, or even
advisable, is a question for your database admin (DBA).
If you mean that you want to connect as a DBA with no password, then
that is probably a very bad idea, right up there with allowing
root/sysadmin access to your computer with no password.
If you mean something else, please say.
HTH
--
Brian Raven
------------------------------------------------------------ -----------------------------------------------
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Connecting to Database as sysadmin using DBI
am 09.09.2008 12:15:25 von Rameez Thonnakkal
Hi Brian,
I am trying to code the following in perl..
sqlplus '/as sysdba' -- (Where we don't need to give password.)
Typo .. please read sysadmin as sysdba..
Thanks
Rameez
--- On Tue, 9/9/08, Brian Raven wrote:
> From: Brian Raven
> Subject: RE: Connecting to Database as sysadmin using DBI
> To: activeperl@listserv.activestate.com
> Date: Tuesday, September 9, 2008, 3:20 PM
> Rameez Thonnakkal <> wrote:
> > Hi All,
> >
> > Not sure this is the correct mail id for posting this
> query.
> >
> > I am using DBI for connecting to a oracle Database. By
> using a
> > specific user and password i am able to connect. But
> my requirment is
> > to connect as sysadmin without password.
> >
> > Could any one give me the piece of code for the same.
> Tried bit of
> > googling but of no luck :(
>
> Depends what you mean. If you want to connect using the
> username
> "sysadmin", but with no password, then whether
> that is possible, or even
> advisable, is a question for your database admin (DBA).
>
> If you mean that you want to connect as a DBA with no
> password, then
> that is probably a very bad idea, right up there with
> allowing
> root/sysadmin access to your computer with no password.
>
> If you mean something else, please say.
>
> HTH
>
> --
> Brian Raven
>
> ------------------------------------------------------------ -----------------------------------------------
> This e-mail may contain confidential and/or privileged
> information. If you are not the intended recipient or have
> received this e-mail in error, please advise the sender
> immediately by reply e-mail and delete this message and any
> attachments without retaining a copy. Any unauthorised
> copying, disclosure or distribution of the material in this
> e-mail is strictly forbidden.
>
>
> _______________________________________________
> ActivePerl mailing list
> ActivePerl@listserv.ActiveState.com
> To unsubscribe:
> http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Connecting to Database as sysadmin using DBI
am 09.09.2008 12:38:39 von Brian Raven
Rameez Thonnakkal wrote:
> Hi Brian,
>
> I am trying to code the following in perl..
>
> sqlplus '/as sysdba' -- (Where we don't need to give password.)
>
> Typo .. please read sysadmin as sysdba..
Aaah... I think I see what you mean. As this is Oracle specific, see
'perldoc DBD::Oracle'. Look for ora_session_mode for details.
HTH
--
Brian Raven
------------------------------------------------------------ -----------------------------------------------
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
LWP dropping tabs?
am 15.09.2008 22:34:15 von Wayne Simmons
All,
I didn't see an LWP specific list, so I hope someone here knows about this.
I'm using LWP agent to submit an HTTP::Request for a url that is returning
text/htmlcharset=UTF-8 content type. However it's supposed to be tab
delimited data but by the time $response->content gets it the tabs are gone
and it seems to have been space expanded!
I can see the data from the website through a regular browser and it looks
like the data is tab delimited in the source view on mozilla (ie the second
column is all lined up) but when I analyze within perl the data I'm getting
multiple 0x20 bytes instead of a single 0x09.
Is it possible the source is wrong? Unfortunately I don't have control over
the source, and I can't post the link to the data (as it requires a
user/password to access). The code I use is in essence:
my $browser = LWP::UserAgent->new;
my $response = $browser->get( $URL );
my $foo = pack("C",9);
if ( $response->content =~ /$foo/)
{
print "found tab!";
} else
{
print "no tabs!";
}
And I get no tabs. Can anyone think of a way to verify the source data is
correct, and/or know if there is a LWP or HTML header I should be setting to
prevent tab expansion to spaces (if that's what's happening).
-Wayne Simmons
--
Software Engineer
InterSystems USA, Inc.
303-858-1000
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: LWP dropping tabs?
am 16.09.2008 03:45:52 von Bill Luebkert
Wayne Simmons wrote:
> All,
>
> I didn't see an LWP specific list, so I hope someone here knows about this.
> I'm using LWP agent to submit an HTTP::Request for a url that is returning
> text/htmlcharset=UTF-8 content type. However it's supposed to be tab
> delimited data but by the time $response->content gets it the tabs are gone
> and it seems to have been space expanded!
>
> I can see the data from the website through a regular browser and it looks
> like the data is tab delimited in the source view on mozilla (ie the second
> column is all lined up) but when I analyze within perl the data I'm getting
> multiple 0x20 bytes instead of a single 0x09.
>
> Is it possible the source is wrong? Unfortunately I don't have control over
> the source, and I can't post the link to the data (as it requires a
> user/password to access). The code I use is in essence:
>
> my $browser = LWP::UserAgent->new;
> my $response = $browser->get( $URL );
>
> my $foo = pack("C",9);
> if ( $response->content =~ /$foo/)
> {
> print "found tab!";
> } else
> {
> print "no tabs!";
> }
>
> And I get no tabs. Can anyone think of a way to verify the source data is
> correct, and/or know if there is a LWP or HTML header I should be setting to
> prevent tab expansion to spaces (if that's what's happening).
Are you sure there are tabs ? Have you tried editing the file or
can't you get at the actual file source ?
I would try dumping the content in hex and see what you're getting.
PS:
You can search for a tab a little easier using \t or \x09 instead of
bothering with pack - you could count the tabs like this (assuming tab
is indeed a binary 9 in your source):
my $content = $response->content || '';
if (my $num = $content =~ tr/\t/\t/) {
print "Found $num tabs\n";
} else {
print "No tabs\n";
}
# or a bit slower
if (my $num = $content =~ s/\x09/\x09/gs) {
print "Found $num tabs\n";
} else {
print "No tabs\n";
}
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: LWP dropping tabs?
am 16.09.2008 07:17:32 von casteele
As far as I know, LWP (and most modules) do not do any data conversions, except maybe
for line terminators (CR vs LF vs CRLF), without explicitely stating so in their documentation.
You said you looked at the source and the second columns lined up--visually--but did you
check to see if they were lined up with spaces or tabs?
Open the page you want in your web browser, and try to save it to your local computer. Then,
open it in MS-Word or some other text editor or word processor which has some way to
check, display, and/or convert tabs and spaces. (I use EditPad Pro, which can be set to
highlight spaces vs tabs, as well as line endings, etc.)
Another thing you can do, since you're not 100% certain the web page you're trying to get has
data in the format you want, is create a web page that you are 100% certain has tabs, upload
it somewhere, then use LWP to get it and see if it gets the same thing, byte for byte. Then
you can at least be sure it is not (or maybe it is) LWP that is the problem--One of the first
things I was taught in computer science: Garbage in, garbage out.
Good luck,
C. M.
PS: I uploaded several test pages myself and LWP returned them all for me, byte for byte,
with no conversions. This further leads me to suspect the input data is bad.
On 15 Sep 2008 at 14:34, Wayne Simmons wrote:
From: "Wayne Simmons"
To:
Subject: LWP dropping tabs?
Date sent: Mon, 15 Sep 2008 14:34:15 -0600
> All,
>
> I didn't see an LWP specific list, so I hope someone here knows about
> this. I'm using LWP agent to submit an HTTP::Request for a url that is
> returning text/htmlcharset=UTF-8 content type. However it's supposed
> to be tab delimited data but by the time $response->content gets it
> the tabs are gone and it seems to have been space expanded!
>
> I can see the data from the website through a regular browser and it
> looks like the data is tab delimited in the source view on mozilla (ie
> the second column is all lined up) but when I analyze within perl the
> data I'm getting multiple 0x20 bytes instead of a single 0x09.
>
> Is it possible the source is wrong? Unfortunately I don't have
> control over the source, and I can't post the link to the data (as it
> requires a user/password to access). The code I use is in essence:
>
> my $browser = LWP::UserAgent->new;
> my $response = $browser->get( $URL );
>
> my $foo = pack("C",9);
> if ( $response->content =~ /$foo/)
> {
> print "found tab!";
> } else
> {
> print "no tabs!";
> }
>
> And I get no tabs. Can anyone think of a way to verify the source data
> is correct, and/or know if there is a LWP or HTML header I should be
> setting to prevent tab expansion to spaces (if that's what's
> happening).
>
> -Wayne Simmons
>
>
> --
> Software Engineer
> InterSystems USA, Inc.
> 303-858-1000
>
>
>
> _______________________________________________
> ActivePerl mailing list
> ActivePerl@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: LWP dropping tabs?
am 16.09.2008 16:37:39 von Wayne Simmons
Bill, and C.M.
Thanks for the responses; I have indeed verified it was the data. We finally
used a packet sniffer yesterday to ensure that prior to anything even
getting the data it was coming in as multiple 0x32 bytes. I had tried with
my own data as C.M. suggested and successfully got the tabs from LWP (as did
he). I'm just still an optimist at heart and have a hard time believing that
a company can't follow its own spec. Again thanks for your help!
-Wayne
--
Software Engineer
InterSystems USA, Inc.
303-858-1000
-----Original Message-----
From: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of
Casteele/ShadowLord
Sent: Monday, September 15, 2008 11:18 PM
To: activeperl@listserv.activestate.com
Subject: Re: LWP dropping tabs?
As far as I know, LWP (and most modules) do not do any data conversions,
except maybe
for line terminators (CR vs LF vs CRLF), without explicitely stating so in
their documentation.
You said you looked at the source and the second columns lined
up--visually--but did you
check to see if they were lined up with spaces or tabs?
Open the page you want in your web browser, and try to save it to your local
computer. Then,
open it in MS-Word or some other text editor or word processor which has
some way to
check, display, and/or convert tabs and spaces. (I use EditPad Pro, which
can be set to
highlight spaces vs tabs, as well as line endings, etc.)
Another thing you can do, since you're not 100% certain the web page you're
trying to get has
data in the format you want, is create a web page that you are 100% certain
has tabs, upload
it somewhere, then use LWP to get it and see if it gets the same thing, byte
for byte. Then
you can at least be sure it is not (or maybe it is) LWP that is the
problem--One of the first
things I was taught in computer science: Garbage in, garbage out.
Good luck,
C. M.
PS: I uploaded several test pages myself and LWP returned them all for me,
byte for byte,
with no conversions. This further leads me to suspect the input data is bad.
On 15 Sep 2008 at 14:34, Wayne Simmons wrote:
From: "Wayne Simmons"
To:
Subject: LWP dropping tabs?
Date sent: Mon, 15 Sep 2008 14:34:15 -0600
> All,
>
> I didn't see an LWP specific list, so I hope someone here knows about
> this. I'm using LWP agent to submit an HTTP::Request for a url that is
> returning text/htmlcharset=UTF-8 content type. However it's supposed
> to be tab delimited data but by the time $response->content gets it
> the tabs are gone and it seems to have been space expanded!
>
> I can see the data from the website through a regular browser and it
> looks like the data is tab delimited in the source view on mozilla (ie
> the second column is all lined up) but when I analyze within perl the
> data I'm getting multiple 0x20 bytes instead of a single 0x09.
>
> Is it possible the source is wrong? Unfortunately I don't have
> control over the source, and I can't post the link to the data (as it
> requires a user/password to access). The code I use is in essence:
>
> my $browser = LWP::UserAgent->new;
> my $response = $browser->get( $URL );
>
> my $foo = pack("C",9);
> if ( $response->content =~ /$foo/)
> {
> print "found tab!";
> } else
> {
> print "no tabs!";
> }
>
> And I get no tabs. Can anyone think of a way to verify the source data
> is correct, and/or know if there is a LWP or HTML header I should be
> setting to prevent tab expansion to spaces (if that's what's
> happening).
>
> -Wayne Simmons
>
>
> --
> Software Engineer
> InterSystems USA, Inc.
> 303-858-1000
>
>
>
> _______________________________________________
> ActivePerl mailing list
> ActivePerl@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs