Prev: dbms_session.set_context from JDBC fails mysteriously, how can I trap it ?
Next: sqlldr not recognizing a file without an extension on Solaris
From: Mladen Gogala on 15 Feb 2010 08:17 On Mon, 15 Feb 2010 13:45:27 +0100, Shakespeare wrote: > Try this: username: "sys", database name "DBNAME as sysdba" > > Shakespeare Will not work. -- http://mgogala.freehostia.com
From: joel garry on 15 Feb 2010 14:33 On Feb 14, 2:45 pm, syd_p <sydneypue...(a)yahoo.com> wrote: > Hi, > I am running a shell script which call a perl script which uses DBI to > connect to a remote (ie another server) which creates schemas ie table > spaces, users, tables in the waiting DB. > > Or rather it does not: > Database Connection Error: ORA-28009: connection as SYS should be as > SYSDBA or SYSOPER (DBD ERROR: OCISessionBegin) > The problem is as follows: > ./create_stuff.sh <database type> <database name> <host> <username> > <password> <port> > > I ran one of the many scripts locally on the unix command line with > the hardcoded string "sqlplus sys as sysdba/bloggs" and that works OK. > > The problem is that the shell script, calls more shell scripts, calls > perl scripts and passing in "sys" as a parameter fails at the Oracle > 10G level cos we need the AS sysdba. > And if I call the script with "sys as sysdba" "bloggs" (or similar > tried a few things) it goes wrong big time. > > Possibly the answer is to create a user that has the powers of "sys as > sysdba" or something similar. But I am stuck really... > > can anyone help plz? > > Syd Have you set things up so someone can connect remotely as sys there? Connecting locally merely means the local user has group rights. http://www.orafaq.com/wiki/Oracle_database_Security_FAQ#Managing_administrative_.28privileged.29_users_and_password_files jg -- @home.com is bogus. http://news.techworld.com/security/3212681/spam-hits-google-buzz-already/?intcmp=nws-hm-l
From: Mladen Gogala on 15 Feb 2010 18:07 On Mon, 15 Feb 2010 11:33:40 -0800, joel garry wrote: > Have you set things up so someone can connect remotely as sys there? > Connecting locally merely means the local user has group rights. The OP has asked the same question on the DBI group and Jared Still, of the "Perl for an Oracle DBA" fame, has given him the same answer I did.. -- http://mgogala.byethost5.com
From: syd_p on 15 Feb 2010 18:19 On 15 Feb, 23:07, Mladen Gogala <n...(a)email.here.invalid> wrote: > On Mon, 15 Feb 2010 11:33:40 -0800, joel garry wrote: > > Have you set things up so someone can connect remotely as sys there? > > Connecting locally merely means the local user has group rights. > > The OP has asked the same question on the DBI group and Jared Still, of > the "Perl for an Oracle DBA" fame, has given him the same answer I did.. > > --http://mgogala.byethost5.com Hi Guys, I am the OP and actually I have only asked the question on this group. I kind of thought the answer lies in the Oracle world, hence my posting in this group. I guess I did not phrase the question very well. The problem is that I have a selection of scripts that dont like "sys as sysdba" as a username. Dont know why and I dont want to mess with the scripts. What I need is a username of one word (not three that makes the scripts barf) that has the powers to create tablespaces and users in a database that I created with dbca. Maybe that is possible? If so please help me. Thanks for your input so far! Syd
From: Tim X on 16 Feb 2010 01:45
Shakespeare <whatsin(a)xs4all.nl> writes: > Op 14-2-2010 23:45, syd_p schreef: >> Hi, >> I am running a shell script which call a perl script which uses DBI to >> connect to a remote (ie another server) which creates schemas ie table >> spaces, users, tables in the waiting DB. >> >> Or rather it does not: >> Database Connection Error: ORA-28009: connection as SYS should be as >> SYSDBA or SYSOPER (DBD ERROR: OCISessionBegin) >> The problem is as follows: >> ./create_stuff.sh<database type> <database name> <host> <username> >> <password> <port> >> >> I ran one of the many scripts locally on the unix command line with >> the hardcoded string "sqlplus sys as sysdba/bloggs" and that works OK. >> >> The problem is that the shell script, calls more shell scripts, calls >> perl scripts and passing in "sys" as a parameter fails at the Oracle >> 10G level cos we need the AS sysdba. >> And if I call the script with "sys as sysdba" "bloggs" (or similar >> tried a few things) it goes wrong big time. >> >> Possibly the answer is to create a user that has the powers of "sys as >> sysdba" or something similar. But I am stuck really... >> >> can anyone help plz? >> >> Syd >> > > Try this: username: "sys", database name "DBNAME as sysdba" > If that doesn't work, my suggestion would be to look at the perl documentations for the DBD::Oracle driver. This has a lot of useful information and examples and will likely give better results than random shots in the dark. As the driver is regularly being updated and as its not uncommon to find multiple versions of perl on one system, its also important to check driver versions and ensure the docs you are looking at match the driver being used. Doing a grep for sysdba for the DBD::Oracle driver on my system gives the following (as well as other matches - this is just an example). Connect Attributes ora_session_mode The ora_session_mode attribute can be used to connect with SYSDBA authorization and SYSOPER authorization. The ORA_SYSDBA and ORA_SYSOPER constants can be imported using use DBD::Oracle qw(:ora_session_modes); This is one case where setting ORACLE_SID may be useful since connecting as SYSDBA or SYSOPER via SQL*Net is frequently disabled for security reasons. HTH Tim -- tcross (at) rapttech dot com dot au |