0

I installed Oracle 19c Database software. Im trying to create a database with script; Im created a listener and pfile (parameter) file. Then type this commands,

--> #sqlplus / as sysdba --> SQL> startup nomount

After that;

--> CREATE DATABASE DBNAME

When i type this commands, im getting just "2" on the screen. And then, anything does not happen.

2 Answers 2

1

the "2" is just SQL Plus saying "I am waiting for you to type into line 2" and so on...

However, I would recommend using the Database Configuration Assistant to create a database. On Windows its on the Start menu, and on Unix it is "dbca" available from $ORACLE_HOME/bin.

If you really want to manually create a database, the commands look similar to something like this

CREATE DATABASE mynewdb
   USER SYS IDENTIFIED BY sys_password
   USER SYSTEM IDENTIFIED BY system_password
   LOGFILE GROUP 1 ('/u01/app/oracle/oradata/mynewdb/redo01.log') SIZE 100M,
           GROUP 2 ('/u01/app/oracle/oradata/mynewdb/redo02.log') SIZE 100M,
           GROUP 3 ('/u01/app/oracle/oradata/mynewdb/redo03.log') SIZE 100M
   MAXLOGFILES 5
   MAXLOGMEMBERS 5
   MAXLOGHISTORY 1
   MAXDATAFILES 100
   CHARACTER SET US7ASCII
   NATIONAL CHARACTER SET AL16UTF16
   EXTENT MANAGEMENT LOCAL
   DATAFILE '/u01/app/oracle/oradata/mynewdb/system01.dbf' SIZE 325M REUSE
   SYSAUX DATAFILE '/u01/app/oracle/oradata/mynewdb/sysaux01.dbf' SIZE 325M REUSE
   DEFAULT TABLESPACE users
      DATAFILE '/u01/app/oracle/oradata/mynewdb/users01.dbf'
      SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
   DEFAULT TEMPORARY TABLESPACE tempts1
      TEMPFILE '/u01/app/oracle/oradata/mynewdb/temp01.dbf'
      SIZE 20M REUSE
   UNDO TABLESPACE undotbs
      DATAFILE '/u01/app/oracle/oradata/mynewdb/undotbs01.dbf'
      SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

but (with no disrepect intended) if you're new to Oracle, then use the configuration assistant to get up and running.

Here's a video walkthrough on the steps involved.

https://www.youtube.com/watch?v=cl_90YYVA10

Sign up to request clarification or add additional context in comments.

Comments

1

The CREATE DATABASE command requires a LOT more parameters. Here's an example:

CREATE DATABASE test
USER SYS IDENTIFIED BY manager
USER SYSTEM IDENTIFIED BY manager
LOGFILE GROUP 1 (‘/u01/test/redo01.log’) SIZE 50M,
GROUP 2 (‘/u01/test/redo02.log’) SIZE 50M,
GROUP 3 (‘/u01/test/redo03.log’) SIZE 50M
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 50
MAXDATAFILES 100
MAXINSTANCES 1
DATAFILE ‘/u01/test/system01.dbf’ SIZE 100M autoextend on
SYSAUX DATAFILE ‘/u01/test/sysaux01.dbf’ SIZE 100M autoextend on
DEFAULT TABLESPACE users datafile ‘/u01/test/users01.dbf’ size 100m autoextend on
DEFAULT TEMPORARY TABLESPACE temp
TEMPFILE ‘/u01/test/temp01.dbf’ SIZE 50m
UNDO TABLESPACE undotbs1
DATAFILE ‘/u01/test/undotbs01.dbf’
SIZE 200M;

You should read up on the syntax, study some tutorials and make sure you are setting all of the options you need for your specific environment. Here's a couple of other links:

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.