Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: oracle 9i connection string with SYS account

Re: oracle 9i connection string with SYS account

From: Howard J. Rogers <dba_at_hjrdba.com>
Date: Wed, 5 Jun 2002 20:49:05 +1000
Message-ID: <adkqbl$eet$1@lust.ihug.co.nz>


I suspect this one will run and run.

First off, what you are doing in SQL Server is not creating a database as far as Oracle is concerned. You are, instead, creating a tablespace. And you don't need to be SYS to do that. It's the tablespace in Oracle that is the home for tables, indexes and their data. I realise it doesn't help when Microsoft put out outrageous videos saying 'look how easy it is to create a "database" in SQL Server and how hard it is in Oracle" -but the two just aren't comparable. The fact they have the same name shouldn't confuse you).

Second, the SYS account really is only to be used to perform the 5 privileged actions -startup, shutdown, back, recover, create (database -which, in SQL Server-speak is like creating the Server itself). Those 5 things imply that you are performing them (usually) on the server itself, not via a client connection. And certainly not over an ODBC connection. Therefore, I doubt that there's a provision for the supply of the 'as sysdba' keywords that you need (I'm prepared to stand corrected, however).

But Sybrand's point should be heeded: the SYS account is unique, and if all you need to do is create tablespaces and Users, then you don't need it. All routine administration should be done as SYSTEM (default password = 'manager').

There is a way to connect as SYS without supplying the 'as sysdba' keywords, but I'm not going to tell you what it is, because you really, really don't want to do what you are thinking of doing. Heed Sybrand's advice, and connect as SYSTEM instead, and read the Oracle Concepts manual, so you understand how to compare SQL Server apples with Oracle apples, and not oranges.

Regards
HJR "Bertus Dam" <b.dam_at_gmx.net> wrote in message news:3cfdc0b0$1_at_news.mhogaming.com...
> I know I need to change the sys password, I know the SYS account isn't
meant
> for daily use, and I know I need to read those manuals too :)
>
> Only one thing: I'm trying to get my application to work with Oracle. It
> already supports SQL Server. I have a
> script to fill my database with some stuff. But first I want to create a
> database of course. Now in SQL Server it works like this: You log on to
the
> master database with Integrated Security (O/S security) From there I can
> create a database and create users etc. etc. Only thing I want to know is
> how to do this in Oracle.
>
>
> "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote in message
> news:n8upfu030be6jplvqd3sbde0mi87tcc1d5_at_4ax.com...
> > On Tue, 4 Jun 2002 11:24:08 +0200, "Bertus Dam" <b.dam_at_gmx.net> wrote:
> >
> > >I'm trying to create a connectionstring in my application to an oracle
9i
> > >database.
> > >I can't get it to work though. This is what I try:
> > >
> > >Provider=OraOLEDB.Oracle;Data Source=svr;User
> > >ID=SYS;Password=change_on_install;
> > >
> > >Errormessage:
> > >
> > >Message: "ORA-28009: connection to sys should be as sysdba or sysoper"
> > >
> > >How can I fix this? Or how do I create a connectionstring which uses
> > >integrated O/S security?
> > >
> > >
> > >
> > >Thanx, Bertus
> > >
> > >
> >
> >
> >
> > You should NEVER EVER use the SYS account as an ordinary account, you
> > should NOT use it to create tables under it, and you should ALWAYS
> > change the password from the default, which you clearly didn't do.
> > In Oracle 9i the SYS account has been changed into a special with
> > special privileges.
> > Oracle did that in order to BLOCK access to sys, anyone using SYS as
> > an ordinary account is likely to create havoc.
> > Disregard the other advice, it is clearly 100 percent unprofessional
> > in your situation.
> > Please start reading those manuals now.
> >
> > Regards
> >
> > Sybrand Bakker, Senior Oracle DBA
> >
> > To reply remove -verwijderdit from my e-mail address
>
>
Received on Wed Jun 05 2002 - 05:49:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US