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: manual creation

Re: manual creation

From: Howard J. Rogers <hjr_at_dizwell.com>
Date: Fri, 14 May 2004 10:40:55 +1000
Message-ID: <40a4158a$0$31371$afc38c87@news.optusnet.com.au>


Anna C. Dent wrote:
> d.j. wrote:
>

>> database name is dec2g
>>
>> C:\oracle\oradata\dec2g\system_01.dbf' SIZE 400M REUSE
>>  >>UNDO TABLESPACE "UNDOTBS" DATAFILE 
>> 'c:\oracle\oradata\dec2g\undotbs01.dbf'

>
>
> Just how in blazes is the SQL parser supposed to "know"
> the actual name of the instance when you do NOT provide it?

This I don't understand. It knows the name of the INSTANCE because the ORACLE_SID environment variable tells it.

But what I think you meant, chiming in with Sybrand, is: how is 'create database' supposed to work if you don't supply the database name?

To which the answer is: because the db_name parameter in the init.ora tells it.

So that this, for example, works fine:

C:\newdb2\admin>set ORACLE_SID=newdb2

C:\newdb2\admin>sqlplus "/ as sysdba"

SQL*Plus: Release 9.2.0.1.0 - Production on Fri May 14 10:35:37 2004

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to an idle instance.

SQL> startup nomount pfile=c:\newdb2\admin\initnewdb2.ora ORACLE instance started.

Total System Global Area 89610904 bytes

Fixed Size                   453272 bytes
Variable Size              71303168 bytes
Database Buffers           16777216 bytes
Redo Buffers                1077248 bytes
SQL> create database

   2 maxdatafiles 256
   3 maxloghistory 1024
   4 datafile 'c:\newdb2\system01.dbf' size 150m autoextend on next 50m    5 undo tablespace undotbs datafile 'c:\newdb2\undotbs01.dbf' size 50m    6 logfile 'c:\newdb2\log1a.rdo' size 10m,'c:\newdb2\log2a.rdo' size 10m;

Database created.

SQL> select name from v$database;

NAME



NEWDB2 And you might note that my database has magically acquired a database name despite the 'create database' statement not actually supplying one.

Regards
HJR Received on Thu May 13 2004 - 19:40:55 CDT

Original text of this message

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