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: How do I set ORACLE_SID in windows NT environment

Re: How do I set ORACLE_SID in windows NT environment

From: <fitzjarrell_at_cox.net>
Date: 13 Dec 2004 14:25:08 -0800
Message-ID: <1102976708.392468.163410@c13g2000cwb.googlegroups.com>

hpuxrac wrote:
> snip
> > > Did the op ask for advice on setting unix environment variables?
> No.
> > >
> >
> > He did provide his take on doing so, and it was incorrect.
>
> On UNIX when you create a new database instance you issue
>
> set ORACLE_SID=xyx;export xyz
> set ORACLE_HOME=.....; export ORACLE_HOME
>
> *** Looks peachy to me except possible typo of export xyz
> *** versus export ORACLE_SID
>
> >
> > > Did the op ask for advice on the startup options available? No.
> > >
> >
> > Yet he provided a snippet of his 'technique' that even the scripts
> > generated by DBCA don't follow.
>
> *** Now you totally lost me
>
> startup nomount pfile=.....
>
> ***
> *** Many people know how to create a database manually and prefer
> *** not to use DBCA. The startup nomount pfile= technique can be
used
> *** after creating a pfile. Next step is create control file.
> ***
> *** aka Looks peachy to me
> ***
>
> > I've never stopped at that point when creating a database ...
>
> ***
> *** Can you create an oracle database manually without using dbca?
> *** If so what are the steps, exactly?
> ***
>

I most certainly can, and I shall also admit to misreading the startup nomount, which is, indeed, correct. To this I issua an apology to the OP.

Now to get about creating a new database with Oracle:

One must have, in any order prior to issuing the create database command, a proper init.ora file, the direectories for the datafiles, controfiles, logfiles, archivelogs and redo logs created and the environment properly set, including ORACLE_SID. To do so (set ORACLE_SID) under any shell except csh:

ORACLE_SID=xyz; export ORACLE_SID

This works in sh, ksh, bash and zah, although under ksh and bash (I've not used zsh, so I reserve comment):

export ORACLE_SID=xyz

works quite nicely.

Given this is at least a 9i database:

$ sqlplus /nolog

.....

SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup nomount pfile=<path to init.ora file here> Oracle instance started.

<various memory sizes here>
SQL> CREATE DATABASE xyz
MAXINSTANCES 1
MAXLOGHISTORY 1
MAXLOGFILES 32
MAXLOGMEMBERS 3
MAXDATAFILES 1024
DATAFILE '/oraunix/sysdata/xyz/system01.dbf' SIZE 200M REUSE
AUTOEXTEND ON
NEXT 10240K
MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL
DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '/oraunix/tempdata/xyz/temp01.dbf'
SIZE 94M REUSE
AUTOEXTEND ON
NEXT 640K
MAXSIZE UNLIMITED
UNDO TABLESPACE "UNDOS" DATAFILE '/oraunix/oradata1/xyz/undos01.dbf' SIZE 200M REUSE
AUTOEXTEND ON
NEXT 5120K
MAXSIZE UNLIMITED
CHARACTER SET WE8ISO8859P15
NATIONAL CHARACTER SET AL16UTF16

LOGFILE GROUP 1 ('/oraunix/oradata1/xyz/redo01.log') SIZE 102400K,
GROUP 2 ('/oraunix/oradata2/xyz/redo02.log') SIZE 102400K,
GROUP 3 ('/oraunix/oradata3/xyz/redo03.log') SIZE 102400K;

Database created.

SQL> create spfile from pfile;

File created.

SQL>
>From this point it's a matter of creating tablespaces and running the
various catalog scripts, none of which I shall list here. Does this satisfy your curiosity that I can indeed create a database from scratch, in the absence of DBCA?

> >
> > > Did the op ask for advice on customer relationships? No.
> > >
> >
> > Again, he's charging for a service he is ill-equipped to provide,
> given
> > his post. And, if he hasn't personally taken on this project, and
> has,
> > by some stretch, been given this assignment by his manager, it is
> still
> > helpful to know he's not up to the task. Unpleasant, yes, rude,
no.
> >
>
> At my customer's windows 2003 server I installed 10g, 10.1.0.2
database
> with starter database orcl.
>
> ***
> *** That's all he or she said. Seems like quite a stretch to be able
> to
> *** somehow deduce more than the fact that op has a question on how
to
> *** set an environment variable in unix.
> ***
>

No, it is NOT all he said:

>> At my customer's windows 2003 server I installed 10g, 10.1.0.2
database
with starter database orcl.
>>
>> I am basically a UNIX person.
>>
>> I have familiarized with most of the windows environment.
>>
>> I want to create a new database named xyz.
>>
>> I stopped the 2 oracle services for orcl from the windows services.
>>

Indicating, to me and others, that he/she has created a database which is completely useless to the client. Why one would do this is beyond me, when it is known from the beginning that database 'xyz' is to be used. He now has an 'orcl' database occupying space unnecessarily. This shows his lack of knowledge and/or control of the installer. Such acts would not bolster my confidence in his abilities.

> I am done with this thread. My final thought, which I saw recently
in
> another thread by someone else, is to consider the tone and manner in
> which contributors such as Tom Kyte or Jonathan Lewis approach this
> newsgroup.
>
> Perhaps you and HJR are already at this same level as those people.
> More power to you guys if that's the case.
>
> Neither of those guys, to my knowledge, ever asks why people are
asking
> questions or alleges that the person asking the question may be not
be
> up to the challenge. They just answer the question ... that's it.
>

They most certainly do. Jonathan usually doesn't reply to a thread until it's fairly well developed, and the why's and wherefore's have been sorted out. Tom Kyte DOES ask why, because blindly answering a question can sometimes be disastrous.

> I used the word insult in my earlier post. I apologize if that was
not
> your intention. It is way too easy to type into a computer and have
> your fingers come up with words you would not use in a face to face
> conversation.
>

Apology accepted.

> My opinion only -- pointing out problems and correcting the advice
that
> people give in response to questions posted on this newsgroup is way
> different from speculations about the posters asking questions.

No 'speculations' were made by me; my response was issued based upon the text of the original post and what it clearly, in my mind, said about the OP and his skills. Again, it wasn't rude, and there was no intent or desire to call the OP 'un-professional'; it was honest. The only intent was to inform the OP he was likely out of his league with this assignment/client. And I stand by that assessment. David Fitzjarrell Received on Mon Dec 13 2004 - 16:25:08 CST

Original text of this message

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