Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: manual creation
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'
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 bytesSQL> 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
Regards
HJR
Received on Thu May 13 2004 - 19:40:55 CDT
![]() |
![]() |