Home » RDBMS Server » Server Administration » ORA-02165 (Oracle 11g)
ORA-02165 [message #662423] Mon, 01 May 2017 13:04 Go to next message
Gr8dba
Messages: 3
Registered: May 2017
Junior Member
Hi everyone,
I am creating an Oracle DB from scratch (command line) after running my sql script I get this error message:

SQL>@c:\oracle\scripts\createmydb.sql
undo tablespace undotbs datafile 'c:\app\brk\oradata\mydb\undotbs01.dbf' size 100m reuse
autoexend on next 5120k maxsize unlimited

ERROR at line 11:
ORA-02165: invalid option for CREATE DATABASE


please see what my input code on the "createmydb.sql" file looks like:


create database mydb
maxdatafiles 30
maxlogfiles 10
maxlogmembers 5
maxinstances 1
maxloghistory 1
datafile 'c:\app\brk\oradata\mydb\system01.dbf' size 300m reuse autoextend on next 10240k maxsize unlimited
extent management local
sysaux datafile 'c:\app\brk\oradata\mydb\sysaux01.dbf' size 120m reuse
default temporary tablespace temp tempfile 'c:\app\brk\oradata\mydb\temp01.dbf size 10m reuse autoextend on next 640k maxsize unlimited
undo tablespace undotbs datafile 'c:\app\brk\oradata\mydb\undotbs01.dbf' size 100m reuse autoextend on next 5120k maxsize unlimited
character set we8mswin1252
logfile group 1 ('c:\app\brk\oradata\mydb\redo01.log') size 10m,
group 2 ('c:\app\brk\oradata\mydb\redo02.log') size 10m,
group 3 ('c:\app\brk\oradata\mydb\redo03.log') size 10m;


I do not seem to know where the error is and how to fix it! Please help!
Re: ORA-02165 [message #662424 is a reply to message #662423] Mon, 01 May 2017 13:16 Go to previous messageGo to next message
Michel Cadot
Messages: 65201
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

You need to copy and paste your SQL*Plus session.
Either execute your statement at command line or "set echo on" in your script.

Before, Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Also always post your Oracle version, with 4 decimals, as solution depends on it.

[Updated on: Mon, 01 May 2017 13:17]

Report message to a moderator

Re: ORA-02165 [message #662425 is a reply to message #662423] Mon, 01 May 2017 13:24 Go to previous messageGo to next message
John Watson
Messages: 7150
Registered: January 2010
Location: Global Village
Senior Member
You have missed the closing quote for your tempfile name.
Re: ORA-02165 [message #662440 is a reply to message #662423] Tue, 02 May 2017 07:59 Go to previous message
joy_division
Messages: 4794
Registered: February 2005
Location: East Coast USA
Senior Member
Gr8dba wrote on Mon, 01 May 2017 14:04

character set we8mswin1252
Why have you chosen that character set vs. AL32UTF8, the recommended one?
Previous Topic: SQL Statement can not be traced
Next Topic: IP address Change of Oracle database server
Goto Forum:
  


Current Time: Tue Nov 21 23:34:40 CST 2017

Total time taken to generate the page: 0.01863 seconds